/* ============================================================
   case study pages — shared layout (max-width 720, single col)
   ============================================================ */

.cs-wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 28px;
}

/* back nav */
.backnav {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 28px 4px;
}
.backnav a {
  font-family: var(--f-body);
  font-size: 13.5px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color .2s ease;
}
.backnav a .arr { transition: transform .2s ease; }
.backnav a:hover { color: var(--text); }
.backnav a:hover .arr { transform: translateX(-3px); }

/* hero block */
.cs-hero { padding: 30px 0 30px; }
.cs-hero .kicker { display: block; margin-bottom: 22px; }
.cs-hero h1 {
  font-family: var(--f-head);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  color: #fff;
}
.cs-hero h1 .big {
  display: block;
  font-size: clamp(34px, 7vw, 56px);
  line-height: 0.98;
  text-transform: uppercase;
}
.cs-hero h1 .small {
  display: block;
  font-size: clamp(19px, 3.2vw, 26px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-top: 12px;
  text-transform: none;
}
.cs-hero .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
}

/* meta grid */
.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
}
.meta-cell {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-meta);
  padding: 14px 16px;
}
.meta-cell .k {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--faint);
  display: block;
  margin-bottom: 6px;
}
.meta-cell .v { font-size: 14.5px; color: var(--text); font-weight: 500; }

/* status banner */
.statusbar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(45,212,191,0.07);
  border: 0.5px solid rgba(45,212,191,0.28);
  border-radius: var(--r-meta);
  padding: 12px 16px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: #8fe7da;
  letter-spacing: 0.01em;
}
.dot-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal);
  flex: none;
  box-shadow: 0 0 0 0 rgba(45,212,191,0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(45,212,191,0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(45,212,191,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,212,191,0); }
}

/* section rhythm */
.cs-section { padding: 44px 0 0; }
.cs-section > .label { display: block; margin-bottom: 16px; }
.cs-section h2 {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(23px, 4vw, 30px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 22px;
  text-wrap: balance;
}
.cs-section p {
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.85;
  margin: 0 0 18px;
}
.cs-section p .em { color: var(--text); }

.subhead {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--teal);
  letter-spacing: 0.02em;
  margin: 30px 0 12px;
  text-transform: uppercase;
}

.cs-divider { border-top: 0.5px solid var(--divider); margin: 46px 0 0; }

/* numbered / objective lists */
.numlist { list-style: none; counter-reset: n; margin: 8px 0 0; padding: 0; }
.numlist li {
  counter-increment: n;
  position: relative;
  padding: 16px 0 16px 46px;
  border-top: 0.5px solid var(--divider);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.numlist li:first-child { border-top: 0; }
.numlist li::before {
  content: counter(n, decimal-leading-zero);
  position: absolute;
  left: 0; top: 16px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--faint);
}
.numlist li .t { color: var(--text); font-weight: 600; display: block; margin-bottom: 3px; }

/* simple objective list (no titles) */
.objlist { list-style: none; counter-reset: o; margin: 4px 0 0; padding: 0; }
.objlist li {
  counter-increment: o;
  position: relative;
  padding: 10px 0 10px 34px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.objlist li::before {
  content: counter(o);
  position: absolute; left: 0; top: 10px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--teal);
}

/* tool tag row */
.toolrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }

/* KPI grid */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}
.kpi-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.kpi {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px 22px;
}
.kpi .num {
  font-family: var(--f-head);
  font-weight: 800;
  font-size: clamp(32px, 6vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--teal);
}
.kpi .num.coral { color: var(--coral); }
.kpi .num.amber { color: var(--amber); }
.kpi .cap { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-top: 12px; }

/* pull quote */
.quote {
  border-left: 2px solid var(--teal);
  background: rgba(45,212,191,0.05);
  border-radius: 0 var(--r-meta) var(--r-meta) 0;
  padding: 22px 26px;
  margin: 6px 0 0;
}
.quote p {
  font-style: italic;
  color: #cfcfe0;
  font-size: 16.5px;
  line-height: 1.75;
  margin: 0;
}
.quote .by { font-style: normal; color: var(--faint); font-size: 13px; margin-top: 14px; font-family: var(--f-mono); }

/* callout block (pivot / sprint) */
.callout {
  border: 1px solid var(--amber);
  background: rgba(230,178,80,0.06);
  border-radius: var(--r-card);
  padding: 26px 26px;
  margin-top: 6px;
}
.callout.blue  { border-color: var(--blue);  background: rgba(96,165,232,0.06); }
.callout .ctag {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  display: block;
  margin-bottom: 14px;
}
.callout.blue .ctag { color: var(--blue); }
.callout h3 {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--amber);
  margin: 0 0 16px;
  text-wrap: balance;
}
.callout.blue h3 { color: #9cc8f3; }
.callout p { color: var(--muted); font-size: 16px; line-height: 1.8; margin: 0 0 16px; }
.callout p:last-child { margin-bottom: 0; }

/* vertical timeline */
.timeline { margin: 6px 0 0; padding: 0; list-style: none; }
.tl-item {
  position: relative;
  padding: 0 0 30px 34px;
  border-left: 0.5px solid var(--border);
  margin-left: 5px;
}
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-item .dot {
  position: absolute;
  left: -6px; top: 2px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--bg);
}
.tl-item .dot.amber { background: var(--amber); }
.tl-item .dot.blue  { background: var(--blue); }
.tl-item .dot.gray  { background: var(--faint); }
.tl-item .dot.coral { background: var(--coral); }
.tl-item .when {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.tl-item .tt { color: var(--text); font-weight: 600; font-size: 16px; margin: 5px 0 6px; }
.tl-item .td { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }

/* finding cards */
.findings { display: grid; gap: 12px; margin-top: 8px; }
.finding {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-left: 2px solid var(--border);
  border-radius: var(--r-card);
  padding: 22px 24px;
}
.finding.red  { border-left-color: var(--coral); }
.finding.teal { border-left-color: var(--teal); }
.finding.amber{ border-left-color: var(--amber); }
.finding .fi {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 6px;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 12px;
}
.finding.red  .fi { background: rgba(248,113,113,0.12); color: var(--coral); }
.finding.teal .fi { background: rgba(45,212,191,0.12); color: var(--teal); }
.finding.amber .fi{ background: rgba(230,178,80,0.12); color: var(--amber); }
.finding h4 {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 8px;
}
.finding p { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0 0 14px; }
.finding .badge {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--faint);
  border: 0.5px solid var(--divider);
  border-radius: var(--r-pill);
  padding: 5px 11px;
  display: inline-block;
}

/* in-progress grid */
.prog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.prog {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-card);
  padding: 18px 20px;
}
.prog .ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.prog .pt { font-family: var(--f-head); font-weight: 700; font-size: 16px; color: #fff; letter-spacing: -0.01em; }
.prog .pd { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0; }
.sbadge {
  font-family: var(--f-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.sbadge.amber { color: var(--amber); background: rgba(230,178,80,0.1); border: 0.5px solid rgba(230,178,80,0.3); }
.sbadge.blue  { color: #9cc8f3;     background: rgba(96,165,232,0.1); border: 0.5px solid rgba(96,165,232,0.3); }
.sbadge.teal  { color: #7fe6d8;     background: rgba(45,212,191,0.1); border: 0.5px solid rgba(45,212,191,0.3); }

@media (max-width: 640px) {
  .meta-grid, .kpi-grid, .kpi-grid.three, .prog-grid { grid-template-columns: 1fr; }
  .cs-wrap, .backnav { padding-left: 20px; padding-right: 20px; }
}
