@charset "UTF-8";
/* Case study pages: sticky chapter rail, one reading column, figures that break out wide.
   Product-UI reconstructions (.component-workbench, screenshots) stay light in both themes. */
:root {
  --paper: #fafaf7; /* brighter, less cream than style.css #f5f3ec */
  --surface: #efeeea;
  --good: #3d6b35;
  --warn: #9a4a24;
  --warn-bg: #f3e2d6;
  --gutter: max(4.7vw, calc((100vw - 1550px) / 2)); /* homepage gutter: style.css .nav/.hero */
}
html[data-theme="dark"] {
  --surface: #1d2834;
  --good: #9fd18f;
  --warn: #f0a77e;
  --warn-bg: #3a2a24;
}
body.case-page { background: var(--paper); font-size: 19px; line-height: 1.6; }
.work code, .work pre { font-family: ui-monospace, Menlo, monospace; }

/* Shared .nav from style.css. theme.js hides it while scrolling down and brings it back on any scroll up;
   the sticky rail moves down while it shows so the two never overlap. */
.case-nav { transition: translate 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.nav-away .case-nav { translate: 0 -100%; }
.case-rail { transition: top 0.35s cubic-bezier(0.16, 1, 0.3, 1); }

/* Hero: title, thesis and facts stacked, then the full-width cover the homepage card flies into. */
.case-hero { padding: clamp(120px, 16vh, 180px) var(--gutter) clamp(48px, 7vw, 96px); }
.case-hero h1 { max-width: 14em; font: 500 clamp(44px, 6vw, 88px)/0.95 var(--display); letter-spacing: -0.04em; text-wrap: balance; }
.case-hero .dek { margin-top: 28px; max-width: 40em; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; }
.case-hero .result { margin-top: 20px; max-width: 40em; color: var(--muted); font-size: 16px; }
.case-hero .result strong { color: var(--ink); font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 16px 48px; margin: 32px 0 0; font-size: 14px; line-height: 1.45; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.case-cover { margin: clamp(40px, 5vw, 64px) 0 0; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface); }
.case-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Rail + story. */
.case { padding: 0 var(--gutter) clamp(64px, 10vw, 128px); }
.case-rail { font-size: 14px; line-height: 1.45; }
.rail-back { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); }
.rail-back:hover { color: var(--blue); }
.rail-title { font: 500 24px/1.1 Instrument, Arial, sans-serif; letter-spacing: -0.03em; margin-top: 8px; }
.rail-meta { color: var(--muted); margin: 6px 0 20px; }
.chapter-nav { display: block; position: relative; }
.chapter-nav ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.chapter-nav a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); transition: color 0.2s, border-color 0.2s; }
.chapter-nav a:hover { color: var(--ink); }
.chapter-nav a[aria-current] { color: var(--ink); border-color: var(--ink); font-weight: 600; }
@media (min-width: 1100px) {
  .case { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: clamp(48px, 7vw, 128px); }
  .case-rail { position: sticky; top: 32px; align-self: start; padding-top: 8px; }
  .scrolled:not(.nav-away) .case-rail { top: 104px; }
}
@media (max-width: 1099px) {
  .case-rail { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; margin-inline: calc(-1 * var(--gutter)); background: var(--paper); border-bottom: 1px solid var(--line); }
  .rail-back, .rail-title, .rail-meta { display: none; }
  .scrolled:not(.nav-away) .case-rail { top: 88px; }
  .chapter-nav { overflow-x: auto; scrollbar-width: none; padding-inline: var(--gutter); }
  .chapter-nav::-webkit-scrollbar { display: none; }
  .chapter-nav ol { display: flex; gap: 24px; border: 0; width: max-content; }
  .chapter-nav a { padding: 14px 0 12px; margin: 0; border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px; }
}

.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr); width: 100%; max-width: 760px; margin-inline: auto; }
.story > *, .chapter > * { grid-column: 2; min-width: 0; }
.chapter { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; row-gap: 20px; align-content: start;
  padding-top: clamp(64px, 8vw, 104px); }
.chapter + .chapter { margin-top: clamp(64px, 8vw, 104px); border-top: 1px solid var(--line); }
.chapter > figure, .chapter > .bleed { margin-block: 16px; }
.chapter > h3:not(:first-child) { margin-top: 16px; }
.chapter > h3 + p { margin-top: -12px; }
.story .bleed, .story .chapter > figure, .glance { grid-column: 1 / -1; }
.story .kicker { font: 600 15px/1.4 Instrument, Arial, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.kicker + h2 { margin-top: -12px; }
.chapter h2 { font: 600 clamp(25px, 2.3vw, 30px)/1.2 Instrument, Arial, sans-serif; letter-spacing: -0.02em; text-wrap: balance; margin-bottom: 4px; }
.story h3 { font: 600 1em/1.3 Instrument, Arial, sans-serif; letter-spacing: -0.01em; }
.story strong { font-weight: 600; }
.story a:not([class]) { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.story :not(pre) > code { font-size: 0.88em; padding: 1px 5px; border-radius: 4px; background: var(--surface); }
.note { font-size: 15px; color: var(--muted); }

/* Reusable blocks. */
/* At a glance: ownership cards stacked left, one tall story card right, impact across (after sanvithi.com/explora). */
.glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto 1fr; gap: 6px; }
.glance-card, .impact { margin: 0; padding: clamp(24px, 2.4vw, 32px); background: var(--surface); border-radius: 16px; }
.glance-story { grid-column: 2; grid-row: 1 / span 2; }
.glance-card > div + div { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.glance dt { font: 500 1em/1.3 Instrument, Arial, sans-serif; letter-spacing: -0.015em; }
.glance dd { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.impact { grid-column: 1 / -1; }
.story .impact h3 { font: 500 1em/1.3 Instrument, Arial, sans-serif; letter-spacing: -0.015em; }
.impact ul { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 24px; margin: 28px 0 0; padding: 0; list-style: none; }
.impact li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.impact b { display: block; font: 500 clamp(40px, 4vw, 60px)/1 Instrument, Arial, sans-serif; letter-spacing: -0.035em; }
/* AI triage: "59 of 66" stays on one line. */
.impact-tight b { font-size: clamp(34px, 3.2vw, 50px); white-space: nowrap; }
.impact span { display: block; margin-top: 14px; font: 500 1em/1.3 Instrument, Arial, sans-serif; letter-spacing: -0.01em; text-wrap: balance; }
.impact small { display: block; margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.hypothesis { padding: 20px 24px; background: var(--surface); border-radius: 6px; font: 500 1em/1.45 Instrument, Arial, sans-serif; letter-spacing: -0.015em; }
.hypothesis b { display: block; margin-bottom: 6px; font: 600 15px/1.4 Instrument, Arial, sans-serif; letter-spacing: 0; color: var(--muted); }
.insight { margin: 8px 0; padding: clamp(16px, 3vw, 36px); text-align: center; font: 500 1em/1.5 Instrument, Arial, sans-serif; letter-spacing: -0.025em; text-wrap: balance; }
.insight p::before { content: "“"; }
.insight p::after { content: "”"; }
.insight cite { display: block; margin-top: 14px; font: 400 15px Instrument, Arial, sans-serif; color: var(--muted); letter-spacing: 0; }
.quote { margin: 0; padding-left: 20px; border-left: 1px solid var(--ink); font-style: italic; }
.decision { margin: 8px 0; padding: 24px; background: var(--surface); border-radius: 6px; display: grid; gap: 14px; }
.decision > div { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 4px 20px; }
.decision dt { font-size: 15px; font-weight: 600; color: var(--muted); padding-top: 3px; }
.decision dd { margin: 0; font-size: 15px; }
.decision > div:first-child dd { font-weight: 600; }
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: lesson; }
.lessons li { counter-increment: lesson; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; }
.lessons li::before { content: counter(lesson); display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lessons b { display: block; font-weight: 600; }
.turns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.turns > div { border-top: 1px solid var(--ink); padding-top: 14px; }
.turns h3 { margin-bottom: 8px; }
.turns p { font-size: 15px; }
/* Process figures: filled steps are mine, outlined steps are the team's. */
.process-phases { display: grid; grid-template-columns: 8fr 5fr; gap: 6px; }
.process-phases > div, .support > div { padding: clamp(20px, 2vw, 28px); background: var(--surface); border-radius: 16px; }
.process h4, .support dt { font: 600 15px/1.4 Instrument, Arial, sans-serif; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; margin: 0; }
.process ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; counter-reset: step; }
.process li { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; line-height: 1.35; color: var(--muted); }
.process li { counter-increment: step; }
.process li::before { content: counter(step) "  "; font-variant-numeric: tabular-nums; opacity: 0.6; }
.process .is-mine { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.support { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.support dd { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.support dd.is-mine { margin-top: 16px; padding: 12px 14px; border-radius: 10px; color: var(--paper); }
.statement { position: relative; margin-block: 16px; padding: 20px 0 0; font: 500 1em/1.5 Instrument, Arial, sans-serif; letter-spacing: -0.012em; text-wrap: pretty; }
.statement::before { content: ""; position: absolute; top: 0; left: 0; width: 48px; height: 2px; background: var(--blue); }
.statement em { font-style: normal; color: var(--blue); white-space: nowrap; }
.story figure { margin: 0; display: flex; flex-direction: column; }
.story figure > .limits { order: 2; }
.story figcaption { font-size: 15px; line-height: 1.5; color: var(--muted); }
.story figcaption h3 { color: var(--ink); margin-bottom: 2px; font-size: 15px; }
.story figure > figcaption:first-child { order: 1; margin-top: 12px; }
.story figure video { display: block; width: 100%; height: auto; border-radius: 4px; background: var(--surface); }
.story figure img { display: block; width: 100%; height: auto; border-radius: 4px; background: #fff; }
/* Image panels (after sanvithi.com/explora): one soft neutral fill behind every image. */
:root { --fill: #e9e8e3; --fill-top: #f2f1ed; }
html[data-theme="dark"] { --fill: #222a33; --fill-top: #29323c; }
.frame, .story figure:has(> .frame, > .stills) { position: relative; padding: clamp(14px, 4.5%, 56px); border-radius: 12px;
  background: linear-gradient(180deg, var(--fill-top), var(--fill)); }
/* When the panel is the figure itself, the caption sits inside the fill, under the image. */
.story figure:has(> .frame, > .stills) .frame { padding: 0; background: none; border-radius: 0; }
.story .frame img { border-radius: 6px; box-shadow: 0 1px 2px #10242b14, 0 12px 32px -12px #10242b40; cursor: zoom-in; }
.enlarge { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px;
  border: 0; border-radius: 999px; background: #10242bcc; color: #fff; font: 500 13px Instrument, Arial, sans-serif; cursor: pointer;
  opacity: 0.85; transition: opacity 0.2s, background 0.2s; }
.enlarge svg { width: 14px; height: 14px; }
.frame:hover .enlarge, .enlarge:focus-visible { opacity: 1; background: #10242b; }
.enlarge:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (hover: hover) { .enlarge { opacity: 0; } }
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(16px, 3vw, 40px); border: 0; background: #0b141b; color: #fff; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: #0b141b; }
@media (max-width: 640px) { .enlarge { width: 32px; padding: 0; justify-content: center; } .enlarge span { display: none; } }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 2 * clamp(16px, 3vw, 40px)); width: auto; height: auto; border-radius: 6px; cursor: zoom-out; }
.lightbox button { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
  background: #ffffff1f; color: #fff; font: 500 14px Instrument, Arial, sans-serif; cursor: pointer; }
.lightbox button:hover { background: #ffffff33; }
.table-scroll { overflow-x: auto; }
.evidence { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.evidence th, .evidence td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); }
.evidence thead th { font-size: 15px; color: var(--muted); font-weight: 600; border-bottom-color: var(--ink); }
.evidence tbody th { font-weight: 600; min-width: 9em; }
.evidence td:nth-child(2) { white-space: nowrap; }
.stills { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 3vw, 32px); }
.stills p { margin-top: 8px; font-size: 15px; color: var(--muted); }
/* Evidence sets: 1-3 screenshots per figure. Long ones show the top; Enlarge shows the rest. */
.stills-1 { grid-template-columns: 1fr; }
@media (min-width: 901px) { .stills-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stills-crop { align-items: start; }
.stills-crop img { max-height: 520px; object-fit: cover; object-position: top; }
.clips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.clips h3 { margin-top: 12px; font-size: 15px; }
.clips p { margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.all-decisions summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; list-style: none; font: 600 15px Instrument, Arial, sans-serif; transition: border-color 0.2s; }
.all-decisions summary::-webkit-details-marker { display: none; }
.all-decisions summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; rotate: 45deg; translate: 0 -2px; transition: rotate 0.2s; }
.all-decisions[open] summary::after { rotate: 225deg; translate: 0 2px; }
.all-decisions summary:hover { border-color: var(--ink); }
.all-decisions[open] summary { margin-bottom: 16px; }
.all-decisions > .note { margin-bottom: 12px; }
.frame img { display: block; width: 100%; height: auto; }
.all-decisions ol { margin: 14px 0 0; padding-left: 24px; display: grid; gap: 6px; font-size: 15px; }
.limits { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.story figure > .limits { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.next-case { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; align-items: end; margin-top: clamp(56px, 8vw, 96px);
  padding: 28px; border-radius: 6px; background: var(--ink); color: var(--paper); }
.next-case span { font-size: 15px; opacity: 0.75; }
.next-case b { grid-row: 2; font: 500 clamp(25px, 2.3vw, 30px)/1.1 Instrument, Arial, sans-serif; letter-spacing: -0.03em; }
.next-case i { grid-row: 1 / 3; grid-column: 2; font-style: normal; font-size: 30px; transition: translate 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.next-case:hover i { translate: 8px 0; }
.case-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: baseline; padding: 32px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); font: 400 15px/1.5 Instrument, Arial, sans-serif; letter-spacing: 0; text-transform: none; }
.case-foot > * { padding: 0; }
.case-foot b { font: 500 clamp(22px, 2.4vw, 32px)/1.1 Instrument, Arial, sans-serif; letter-spacing: -0.03em; }
@media (min-width: 701px) { .case-foot > b, .case-foot > a { flex: 1 1 0; } .case-foot > a { text-align: right; } }

/* Annotation badges. */
.anno, .anno-list b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #0d52d1; color: #fff; font: 600 12px/1 Instrument, Arial, sans-serif; }
.anno { margin-right: 6px; vertical-align: 1px; }
.anno-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.anno-list li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.anno-list b { margin-top: 1px; background: var(--blue); color: var(--paper); }
.shot { position: relative; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; background: #0d52d1; color: #fff; display: grid; place-items: center; font: 600 12px/1 Instrument, Arial, sans-serif; box-shadow: 0 0 0 3px #fff; }

.lanes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lanes > li { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; padding: 14px 18px; background: var(--surface); border-radius: 4px; }
.lanes > li > b { font-size: 15px; }
.lanes ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.lanes ol li { flex: 1; position: relative; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); font-size: 15px; line-height: 1.45; }
.lanes ol li + li::before { content: "→"; position: absolute; left: -17px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); }
.lanes .lane-hold { background: var(--warn-bg); color: var(--warn); border-color: currentColor; }
.lanes ol li strong { display: block; }
.lanes .lane-coder > b { color: var(--blue); }
.lanes .lane-skip { border-style: dashed; color: var(--muted); }
/* Long step text: label sits above so the steps get the full width. */
.lanes-stack > li { grid-template-columns: 1fr; gap: 10px; }

/* Growth chart: bars share a baseline; the last value is the payoff. */
.growth { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 2vw, 28px); border-bottom: 1px solid var(--line); }
.growth li { display: grid; grid-template-rows: clamp(140px, 22vw, 240px) auto auto 1fr; padding-bottom: 18px; }
.growth li::before { content: ""; align-self: end; height: calc(var(--v) / 939 * 100%); min-height: 4px; background: var(--muted); opacity: .35; border-radius: 3px 3px 0 0; }
.growth li:last-child::before { background: var(--blue); opacity: 1; }
.growth b { margin-top: 14px; font-size: clamp(28px, 4vw, 52px); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.growth li:last-child b { color: var(--blue); }
.growth span { margin-top: 8px; font-size: 14px; font-weight: 600; }
.growth small { margin-top: 2px; font-size: 13px; color: var(--muted); line-height: 1.35; }


/* Harmony reconstructions. */
.rename { display: grid; grid-template-columns: 1fr 56px 1fr; gap: 24px; align-items: center; padding: 32px; background: var(--surface); border-radius: 6px; }
.rename-old { display: flex; gap: 10px; flex-wrap: wrap; }
.rename-old span { padding: 7px 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); font-size: 15px; }
.rename-new { font: 500 clamp(25px, 2.3vw, 30px)/1 Instrument, Arial, sans-serif; letter-spacing: -0.03em; }
.rename p { font-size: 15px; color: var(--muted); margin-top: 10px; }
.rename svg { width: 48px; height: 24px; color: var(--muted); }
.inventory { width: 100%; border-collapse: collapse; font-size: 15px; }
.inventory th, .inventory td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); }
.inventory thead th { font-size: 15px; color: var(--muted); font-weight: 600; border-bottom-color: var(--ink); }
.inventory .is-marked th { color: var(--blue); }
.inventory .gap { color: var(--muted); font-style: italic; }
.inventory-image { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.inventory-image figcaption { position: sticky; top: 120px; }
.inventory-image figcaption p + p { margin-top: 12px; }
/* Cropped to the Indicators group; Enlarge opens the full inventory. */
.inventory-image .frame img { aspect-ratio: 2.35; object-fit: cover; object-position: 50% 50%; }

.component-workbench { display: grid; grid-template-columns: 1.5fr 1fr; background: #fffefa; color: #1d2a22; border: 1px solid #0000001a; border-radius: 8px; overflow: hidden; box-shadow: 0 18px 40px -25px #1b2c3570; font-size: 13px; line-height: 1.55; }
.component-preview { padding: 32px; }
.component-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 40px; font-weight: 600; }
.component-label span { font-size: 12px; font-weight: 400; color: #5f6158; }
.step-tracker { list-style: none; margin: 0 0 28px; padding: 0; display: flex; }
.step-tracker li { flex: 1; position: relative; padding: 38px 8px 0 0; font-size: 12px; color: #5d6258; }
.step-tracker li::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 1px; background: #d2d7cd; }
.step-tracker li:last-child::before { right: 100%; }
.step-tracker li::after { content: ""; position: absolute; top: 0; left: 0; width: 19px; height: 19px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 1px solid #a7b1a0; }
.step-tracker li[data-state="complete"]::before { background: #47673d; }
.step-tracker li[data-state="complete"]::after { background: #47673d; border-color: #47673d; }
.step-tracker li[aria-current="step"] { color: #2c4325; font-weight: 600; }
.step-tracker li[aria-current="step"]::after { background: #47673d; border: 5px solid #e3ebdd; outline: 1px solid #47673d; }
.step-label, .step-state { display: block; }
.step-state { font-size: 12px; font-weight: 400; margin-top: 3px; color: #5d6258; }
.step-tracker li[data-state="complete"] .step-state { color: #3f5c36; font-weight: 600; }
.component-note { font-size: 13px; color: #4f5a49; }
.component-note code { background: #eceee6 !important; }
.story .component-note code { font-size: 12px; }
.component-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.component-actions .small { font-size: 12px; color: #4f5a49; }
.action-button { min-height: 44px; padding: 10px 18px; border: 1px solid currentColor; border-radius: 6px; background: transparent; font-size: 14px; }
.action-button:hover { background: var(--surface); }
.action-button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.action-button.primary { background: #3c5135; color: #fff; border-color: #3c5135; }
.action-button.primary:hover { background: #283b22; }
.component-spec { padding: 28px; background: #273127; color: #edf0e8; font-size: 12px; }
.component-spec h3 { font-size: 13px; color: #d1dccb; margin-bottom: 18px; }
.component-spec pre { margin: 0; font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.component-spec .syntax { color: #afc997; }
.spec-source { font-size: 12px; color: #b9c7b9; margin-top: 14px; }
.surface-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.surface-map strong { font-size: 15px; }
.surface-map p { font-size: 15px; color: var(--muted); margin-top: 2px; }
.gallery { display: grid; gap: clamp(40px, 6vw, 72px); }
.gallery figure a { display: inline-flex; min-height: 44px; align-items: center; font-size: 14px; color: var(--muted); }
.gallery figure a:hover { color: var(--blue); }
.gallery .anno-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.handoff-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.handoff-who { font-size: 15px; font-weight: 600; color: var(--muted); }
.handoff pre, .contract-compare pre { margin: 10px 0 12px; padding: 18px; border-radius: 6px; background: var(--surface); font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Aligned violation columns: scroll sideways rather than wrap mid-token. */
.contract-compare pre { white-space: pre; overflow-x: auto; overflow-wrap: normal; }
.handoff-pair p { font-size: 15px; }

.runs { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--ink); }
.runs > div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.runs dt { font-weight: 600; font-size: 15px; }
.runs dd { margin: 0; font-size: 15px; }
.contract-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.contract-compare > div { min-width: 0; border-top: 1px solid var(--ink); padding-top: 14px; }
.contract-compare p { font-size: 15px; }
.contract-lab { padding: 28px; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; }
.contract-requests { display: flex; flex-wrap: wrap; gap: 10px; }
.contract-output { margin-top: 20px; padding: 20px; border-radius: 6px; background: var(--surface); }
.contract-output p { font-size: 14px; margin-top: 6px; }
.contract-output[data-result="unsupported"], .contract-output[data-result="empty"] { background: var(--warn-bg); }
.contract-input { margin: 12px 0 0; padding: 12px 14px; background: var(--paper); font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.contract-violations { margin: 12px 0 0; padding-left: 18px; font: 12px/1.8 ui-monospace, Menlo, monospace; }
.contract-violations:empty { display: none; }

/* Sentinel reconstructions: the verdict demo is product UI, so it stays light. */
.triage { padding: clamp(20px, 2.4vw, 32px); background: #fff; color: #2f3330; border: 1px solid #0000001a; border-radius: 8px; box-shadow: 0 18px 40px -25px #1b2c3570; font-size: 14px; line-height: 1.55; }
.triage .action-button { color: #2f3330; }
.triage .action-button:hover { background: #f1f1ee; }
.triage .action-button[aria-pressed="true"] { background: #2f3330; color: #fff; border-color: #2f3330; }
.era-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.triage-stage { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.triage-stage > :first-child { position: sticky; top: 24px; }
.pipeline { list-style: none; margin: 0; padding: 0; }
.pipeline li + li { border-top: 1px solid #e6e5df; }
.pipeline button { all: unset; box-sizing: border-box; position: relative; display: block; width: 100%; min-height: 44px; padding: 11px 0 11px 26px; cursor: pointer; font-weight: 500; }
.pipeline button::before { content: ""; position: absolute; left: 4px; top: 18px; width: 9px; height: 9px; border: 1px solid currentColor; border-radius: 50%; }
.pipeline button span { display: block; font-size: 12px; font-weight: 400; color: #62646a; }
.pipeline button[aria-pressed="true"] { color: #0d52d1; }
.pipeline button[aria-pressed="true"]::before { background: currentColor; }
.pipeline button:focus-visible { outline: 2px solid #0d52d1; outline-offset: 2px; }
.stage-note { margin-top: 16px; padding: 12px 14px; border-left: 3px solid #0d52d1; background: #eef3fc; font-size: 13px; }
.stage-note:empty { display: none; }
.thread { padding: 20px; background: #fafaf8; border: 1px solid #ecebe6; border-radius: 6px; }
.thread-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.thread-head time { margin-left: auto; font-size: 12px; color: #62646a; }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: #e8e6df; font-size: 12px; font-weight: 600; }
.thread .thread-title { font-size: 17px; font-weight: 600; line-height: 1.35; color: #2f3330; }
.thread p { font-size: 13px; color: #55584f; }
.alert-values { display: flex; gap: 28px; margin-top: 14px; }
.alert-values span { font-size: 11px; color: #62646a; }
.alert-values strong { display: block; font-size: 22px; font-weight: 500; }
.reply { margin-top: 20px; padding-left: 16px; border-left: 2px solid #e2e1db; }
.reply-tag { padding: 1px 7px; border-radius: 3px; background: #eeece4; font-size: 11px; color: #55584f; }
.verdict-parts { margin: 0; }
.verdict-parts > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 9px 8px; border-top: 1px solid #ecebe4; border-radius: 3px; font-size: 13px; transition: background 0.2s, box-shadow 0.2s; }
.verdict-parts dt { font-size: 12px; font-weight: 600; color: #55584f; }
.verdict-parts dd { margin: 0; }
.verdict-parts ul { margin: 0; padding-left: 16px; }
.route { display: inline-block; padding: 3px 9px; border-radius: 4px; background: #e9f2e6; color: #3d5f35; font-size: 12px; }
.route.skipped { background: #f6e6dc; color: #8a3b1e; }
.thread .reply-foot { margin-top: 10px; font-size: 12px; font-style: italic; }
.alert-msg { border-radius: 3px; transition: background 0.2s, box-shadow 0.2s; }
[data-focus="signal"] [data-region="signal"], [data-focus="evidence"] [data-region="evidence"], [data-focus="playbook"] [data-region="playbook"],
[data-focus="confidence"] [data-region="confidence"], [data-focus="post"] [data-region="post"] { background: #eef3fc; box-shadow: inset 3px 0 0 #0d52d1; }
[data-focus="signal"] .alert-msg { padding-left: 12px; }
.triage .anno-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; margin-top: 24px; color: #55584f; }
.triage .anno-list b { background: #0d52d1; color: #fff; }
.demo-label { margin-top: 24px; font-size: 12px; color: #62646a; }
.shot-narrow { display: block; max-width: 460px; margin-inline: auto; }
.gallery.shot-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.shot-pair .shot { max-width: 460px; }
/* Long Slack threads: show the top, Enlarge shows the rest. */
.shot-narrow img, .shot-pair .shot img { max-height: 640px; object-fit: cover; object-position: top; }

@media (max-width: 900px) {
  .triage-stage { grid-template-columns: 1fr; }
  .triage-stage > :first-child { position: static; }
  .triage .anno-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .component-workbench, .inventory-image { grid-template-columns: 1fr; }
  .inventory-image figcaption { position: static; }
  .lanes > li { grid-template-columns: 1fr; gap: 10px; }
  .lanes ol { flex-direction: column; gap: 18px; }
  .lanes ol li + li::before { content: "↓"; left: 50%; top: -16px; transform: translateX(-50%); }
}
@media (max-width: 700px) { :root { --gutter: 6vw; } .scrolled:not(.nav-away) .case-rail { top: 68px; } }
@media (max-width: 640px) {
  .process-phases, .support { grid-template-columns: 1fr; }
  body.case-page { font-size: 17px; }
  .glance, .impact ul, .decision > div, .runs > div { grid-template-columns: 1fr; }
  .impact ul { grid-auto-flow: row; }
  .glance-story { grid-column: auto; grid-row: auto; }
  .impact li + li { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .turns, .stills, .clips, .contract-compare, .handoff-pair, .surface-map, .anno-list, .gallery .anno-list, .triage .anno-list, .gallery.shot-pair, .verdict-parts > div { grid-template-columns: 1fr; }
  .verdict-parts > div { gap: 2px; }
  .rename { grid-template-columns: 1fr; padding: 24px; }
  .rename svg { rotate: 90deg; }
  .component-preview, .component-spec, .contract-lab { padding: 20px; }
  .step-tracker li { font-size: 12px; }
  .next-case { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .next-case i, .chapter-nav a, .enlarge { transition: none; }
}
.primer { margin: 0 0 28px; padding: 20px 24px; background: var(--surface); border-radius: 6px; }
.primer h3 { margin: 0 0 10px; font: 600 15px/1.4 Instrument, Arial, sans-serif; }
.primer ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.impact > .note { margin: 24px 0 0; }
/* Phones: evidence and inventory rows stack instead of hiding the Result column off-screen. */
@media (max-width: 640px) {
  .evidence thead, .inventory thead, .inventory td:empty { display: none; }
  .evidence tr, .inventory tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .evidence th, .evidence td, .evidence td:nth-child(2), .inventory th, .inventory td { display: block; padding: 2px 0; border: 0; white-space: normal; }
  .evidence td[data-label]::before, .inventory td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}
.lab-try { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-block: 8px; }
.lab-try > span { font-size: 15px; color: var(--muted); }
.story .lab-cta { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 26px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; transition: background-color .2s, transform .2s; }
.story .lab-cta:hover { background: var(--blue); }
.story .lab-cta:hover [aria-hidden] { transform: translate(2px, -2px); }
.lab-cta [aria-hidden] { transition: transform .2s; }
.story .lab-cta:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .lab-cta, .lab-cta [aria-hidden] { transition: none; } }
