/* ==========================================================================
   app.css — shell layout
   Interface pattern reverse-engineered from design_references/portfolio_vc_*.png
   (measured against a 1134 CSS-px viewport captured at 2x):
     81.5px row pitch · 1px hairlines inset to the gutter · hover fill bled
     full-width past the gutter · descriptor revealed on hover only ·
     53.4% overlay panel · 1fr/216px panel head · 54px metadata pitch.
   Palette and mono voice come from the swatch SVG. See css/tokens.css.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Focus is always black (16.36:1) or alabaster on dark ground. Never the
   accent — at 2.69:1 on the page it would be an invisible focus ring. */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Boot warning ------------------------------------------------------ */
.boot-warning {
  background: var(--accent);
  color: #000;
  padding: 14px var(--gutter);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.boot-warning[hidden] { display: none; }

/* ---- Masthead ---------------------------------------------------------- */
.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 28px var(--gutter) 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
/* The reticle mark: four corner brackets clamping inward onto a core, then one
   ring pulsing off it. Carried as an <img> rather than a CSS mask because a mask
   samples the alpha channel and would throw the animation away. The SVG is
   self-contained and already falls back to the static mark under
   prefers-reduced-motion, so there is nothing to gate here. */
.wordmark__mark {
  width: 26px;
  height: 26px;
  display: block;
  flex: none;
}
.wordmark__text {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.masthead__note {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

/* ---- Display headline -------------------------------------------------- */
.display {
  margin: clamp(48px, 9vh, 112px) 0 0;
  padding: 0 var(--gutter);
  font-size: clamp(2.75rem, 6.4vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.98;
}
/* The reference sets line two in its brand colour. Coquelicot cannot do that
   on alabaster — 2.69:1 fails even the large-text floor — so large accent
   type uses the darkened display token at 3.59:1. */
.display__accent { color: var(--accent-display); }

.lede {
  max-width: 46ch;
  margin: 28px 0 0;
  padding: 0 var(--gutter);
  font-size: 1.0625rem;
  color: var(--ink-2);
}

/* ---- Filters ----------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: clamp(32px, 5vh, 56px) 0 0;
  padding: 0 var(--gutter);
}

.filter {
  position: relative;
  display: inline-flex;
  align-items: center;
}
/* Native select, restyled. Keeps the platform picker on mobile — which is
   both more accessible and less code than a custom listbox. */
.filter select {
  appearance: none;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: transparent;
  /* --border-control, not --hairline: this is an interactive boundary and
     must clear 3:1 for SC 1.4.11. The reference fails this at 1.47:1. */
  border: 1px solid var(--border-control);
  border-radius: 999px;
  padding: 9px 40px 9px 18px;
  cursor: pointer;
}
.filter::after {
  content: "";
  position: absolute; right: 16px; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* ---- Case list --------------------------------------------------------- */
.cases {
  list-style: none;
  margin: clamp(24px, 4vh, 40px) 0 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
  /* Hairlines are inset to the gutter like the reference; the hover fill
     deliberately is not (see .case__link::before). */
  margin-inline: var(--gutter);
}

.case { border-bottom: 1px solid var(--hairline); }

/* Rows are real anchors, not click-handled divs. That buys middle-click,
   copy-link, history, and full keyboard semantics for free — and a diligence
   artifact lives or dies on "here, look at this one". */
.case__link {
  position: relative;
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: clamp(76px, 6.5vw, 108px);
  text-decoration: none;
  color: inherit;
  isolation: isolate;
}

/* The fill bleeds past the gutter to the viewport edge — this is what gives
   the reference list its editorial snap. Bled by exactly the gutter rather
   than an arbitrary -100vmax: overshooting pushes the page into horizontal
   overflow and puts a scrollbar under every demo. */
.case__link::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--gutter) * -1);
  z-index: -1;
  background: transparent;
  transition: background 120ms linear;
}
.case__link:hover::before,
.case__link:focus-visible::before { background: var(--row-hover); }
.case__link[aria-current]::before { background: var(--row-selected); }

/* Accent as a >=3px graphic marker — a legitimate use, and redundant with
   the fill and aria-current, so it never carries meaning alone. */
.case__link[aria-current]::after {
  content: "";
  position: absolute;
  left: calc(var(--gutter) * -1);
  top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
}

.case__index {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  align-self: center;
}

.case__name {
  font-size: clamp(1.75rem, 3.4vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0;
}

.case__badges { display: inline-flex; gap: 6px; flex-shrink: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;           /* rounded rect, not a pill — matches ref */
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}
.badge--neutral  { background: var(--bg-paper); color: #000; border: 1px solid var(--hairline); }
.badge--emphasis { background: #000; color: var(--bg-page); }
.badge--accent   { background: var(--accent); color: #000; } /* black on accent = 6.09:1 */
.badge--outline  { background: transparent; color: var(--ink-2); border: 1px solid var(--border-control); }

/* Present but invisible at rest, exactly as in the reference — and allowed to
   be clipped by the open panel rather than reflowing. */
.case__descriptor {
  min-width: 0;
  font-size: 1rem;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 120ms ease-out;
}
.case__link:hover .case__descriptor,
.case__link:focus-visible .case__descriptor,
.case__link[aria-current] .case__descriptor { opacity: 1; }

.colophon {
  margin: clamp(56px, 10vh, 120px) 0 0;
  padding: 24px var(--gutter) 64px;
  border-top: 1px solid var(--hairline);
  max-width: 78ch;
}
.colophon p { margin: 0; font-size: 0.75rem; line-height: 1.7; color: var(--ink-3); }

/* ---- Panel ------------------------------------------------------------- */
.panel {
  position: fixed;
  /* Longhand rather than the `inset` shorthand: top+bottom pin the panel to
     the full viewport without also declaring a height, so there is nothing
     for a `dvh` fallback to get wrong on an unfamiliar browser. */
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: var(--panel-w);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-page);
  color: var(--ink);
  padding: clamp(20px, 2.8vw, 40px);
  z-index: 20;
  /* The reference has no border and no shadow, which makes a pale panel edge
     vanish against a pale page. Fixed here without adding a scrim, so the
     list behind stays lit and usable. */
  border-left: 1px solid rgba(0, 0, 0, .14);
  box-shadow: -24px 0 48px -24px rgba(0, 0, 0, .18);

  /* Closing: accelerate away and get out of the way quickly. Opacity is NOT
     animated on the panel itself — cross-fading a surface while it slides reads
     as two separate events and is what made the old motion feel loose. The
     panel is opaque throughout; only its position changes. */
  transform: translateX(100%);
  transition: transform var(--dur-panel-out) var(--ease-accel-in),
              box-shadow var(--dur-panel-out) linear;
  will-change: transform;
}
.panel[hidden] { display: none; }
.panel.is-open {
  transform: translateX(0);
  /* Opening is the slower half and uses an expo-out curve, so it arrives with a
     long decelerating tail rather than stopping dead. The shadow deepens as it
     lands, which is what sells the panel as sitting above the page. */
  transition: transform var(--dur-panel-in) var(--ease-expo-out),
              box-shadow var(--dur-panel-in) var(--ease-expo-out);
  box-shadow: -40px 0 80px -32px rgba(0, 0, 0, .30);
}

/* Contents settle just behind the panel edge, in reading order. Three tiers,
   not more — past that it stops reading as one movement and starts looking like
   a sequence of separate animations.

   These are the TOP-LEVEL children of .panel only. .panel__body is nested inside
   .panel__head, so animating both would compound the translate and multiply the
   two opacities together. The close button is deliberately excluded: it must be
   clickable and visible from the first frame. */
.panel__label,
.panel__title,
.panel .why,
.panel__head,
.panel .claim,
.panel .not-prove,
.panel .demo-mount,
.panel .brief,
.panel .brief__section,
.panel .sources {
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 190ms linear, transform 260ms var(--ease-expo-out);
}
.panel.is-open .panel__label,
.panel.is-open .panel__title {
  opacity: 1; transform: none; transition-delay: 70ms;
}
/* The stat band shares tier two with the head rather than claiming a fourth
   of its own. Three tiers is the limit the comment above is about. */
.panel.is-open .why,
.panel.is-open .panel__head {
  opacity: 1; transform: none; transition-delay: 120ms;
}
.panel.is-open .claim,
.panel.is-open .not-prove,
.panel.is-open .demo-mount,
.panel.is-open .brief,
.panel.is-open .brief__section,
.panel.is-open .sources {
  opacity: 1; transform: none; transition-delay: 165ms;
}

/* Reduced motion: keep the panel's arrival (position is information — it tells
   you where the thing came from) but drop the staged reveal entirely. */
@media (prefers-reduced-motion: reduce) {
  .panel__label,
  .panel__title,
  .panel .why,
  .panel__head,
  .panel .claim,
  .panel .not-prove,
  .panel .demo-mount,
  .panel .brief,
  .panel .brief__section,
  .panel .sources {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.panel__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 216px;
  gap: 32px;
  align-items: start;
}

.panel__title {
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0 0 20px;
}

.panel__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
}

.panel__subtitle {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 0 0 16px;
}

.panel__body { max-width: 46ch; }
.panel__body p { margin: 0 0 14px; }
.panel__body em { font-style: italic; }

.panel__close {
  position: absolute;
  top: clamp(20px, 2.8vw, 40px);
  right: clamp(20px, 2.8vw, 40px);
  width: 40px; height: 40px;          /* 40px hit target around a 24px circle */
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: inherit;
}
.panel__close span {
  width: 24px; height: 24px;
  border: 1px solid var(--border-control);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
}

.meta { margin: 0; }
.meta__item {
  border-top: 1px solid rgba(0, 0, 0, .14);
  padding: 12px 0 16px;
}
.meta__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 4px;
}
.meta__value { font-size: 0.9375rem; letter-spacing: -0.005em; margin: 0; }

.claim {
  margin: 32px 0 0;
  padding: 18px 20px;
  background: rgba(0, 0, 0, .05);
  border-left: 3px solid var(--accent);   /* >=3px graphic — accent is fine */
  font-size: 1.0625rem;
  line-height: 1.4;
}

/* The honest limit is set at body size, never as fine print. If it were
   smaller than the claim it would be a disclaimer; at parity it is a fact. */
.not-prove {
  margin: 20px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--border-control);
  border-radius: 6px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.not-prove strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
  font-weight: 500;
}

.demo-mount { margin: 40px 0 0; }

.demo-pending {
  padding: 28px 20px;
  border: 1px dashed var(--border-control);
  border-radius: 8px;
  text-align: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* ---- "Why this matters" bands ------------------------------------------
   Two placements, one component: a strip under the lede on the front page
   (.why--landscape) and the opening block of every case panel (.why).

   The band leads with numbers and closes with one sentence, in that order,
   because a reader deciding whether to care reads a figure before they read
   prose. Provenance lives behind the (i) instead of under the figures — in
   the band it would triple the height and bury the sentence that does the
   work; omitted entirely it would be a page of unsourced numbers, which is
   the thing this whole artifact is arguing against.

   Nothing here uses coquelicot. See the data-mark tokens in tokens.css for
   the measurements behind that. */
.why {
  margin: 0 0 30px;
}

.why__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.why__kicker {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

/* 32px hit target around a 22px circle, echoing .panel__close so the two
   round affordances in a panel read as the same family. --ink-3 rather than
   --border-control for the ring: control measures 1.93:1 on ember-4, and an
   interactive boundary has to clear 3:1 on every wash it can land on. */
.why__info {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin: -6px -6px -6px 0;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink-3);
}
.why__info span[aria-hidden] {
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
}
.why__info[aria-expanded="true"] span[aria-hidden] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg-page);
}

/* Hairline-topped cells rather than vertical rules between them: the count
   varies from two to four and the row wraps, and a wrapped vertical rule
   ends up separating nothing. Same treatment as the .meta stack. */
.why__figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  grid-template-rows: auto auto auto;   /* value · label · sub */
  column-gap: 20px;
  row-gap: 0;
}

.why__fig {
  border-top: 1px solid var(--rule-mark);
  padding: 12px 0 0;

  /* Subgrid so the three parts line up ACROSS cells: one label wrapping to a
     second line otherwise drops its own sub-line below its neighbours' and
     the row loses its baseline. Without subgrid support the cells still
     render correctly, just not row-aligned — which is the same as no rule
     here at all, so no fallback is needed. */
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  align-content: start;
}

/* Sans, not mono, and deliberately WITHOUT tabular figures: equal-width
   digits make a three-character number look loose at this size, and nothing
   here is in a column that needs to align. Sits below .panel__title's size
   so the title stays the largest thing in the panel. */
.why__val {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.why__lab {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--ink-3);
  margin: 9px 0 0;
}

.why__sub {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ink-3);
  margin: 4px 0 0;
}

.why__so {
  max-width: 54ch;
  margin: 18px 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.why__basis {
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--rule-mark);
  max-width: 62ch;
}
.why__basis[hidden] { display: none; }
.why__basis p {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.7;
  color: var(--ink-3);
  margin: 0 0 10px;
}
.why__basis p:last-child { margin-bottom: 0; }

/* A causal sequence rather than a set of related figures. Suppressed below
   700px, where the row can wrap and an arrow would end up pointing at the
   start of a new line. */
@media (min-width: 700px) {
  .why__figures--chain .why__fig + .why__fig { position: relative; }
  .why__figures--chain .why__fig + .why__fig::before {
    content: "\2192";
    position: absolute;
    left: -15px;
    top: 25px;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--ink-3);
  }
}

.why--landscape {
  margin: clamp(36px, 6vh, 64px) 0 0;
  padding: 0 var(--gutter);
}
/* In a panel the (i) pushed right sits under the close button and reads as a
   column. Across the full page it is a lone glyph a metre from the label it
   belongs to, so here it tucks in beside the kicker instead. */
.why--landscape .why__top { justify-content: flex-start; }

/* ---- Micro-charts ------------------------------------------------------
   Only two cases have a relationship worth plotting: a ratio against a limit
   and a pair of spans per category. Everything else in a band is a figure
   row, because rendering three headline numbers as a bar chart is the usual
   way a stat block stops being read.

   Marks are thin, the emphasised quantity is solid ink and the context is
   muted, segments are separated by a gap in the surface colour rather than a
   stroke, and every plotted number is printed as text beside it. */
.chart { margin: 20px 0 0; }

.chart__track {
  height: 10px;
  background: var(--mark-track);
  border-radius: 0 4px 4px 0;
}

/* Square at the baseline, rounded at the data end. overflow clips the last
   segment to the same radius so the bar ends as one shape. */
.chart__bar {
  display: flex;
  gap: 2px;
  height: 100%;
  min-width: 3px;
  border-radius: 0 4px 4px 0;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
  animation: bar-reveal 520ms var(--ease-expo-out) 200ms both;
}
@keyframes bar-reveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

.chart__seg { display: block; height: 100%; }
.chart__seg--ink   { background: var(--mark); flex: 1 1 auto; min-width: 2px; }
.chart__seg--muted { background: var(--mark-muted); }

.chart__ends,
.chart__axis {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 0;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

/* The one axis rule in the file: solid hairline, one step off the surface,
   never dashed. It grounds the three stacked bars as sharing a scale, which
   is the only reason they can be compared to each other. */
.chart__axis {
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--rule-mark);
}

.chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 14px;
  font-size: 0.75rem;
  color: var(--ink-2);
}
.key { display: inline-flex; align-items: center; gap: 7px; }
.key__sw {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: none;
}
.key__sw--ink   { background: var(--mark); }
.key__sw--muted { background: var(--mark-muted); }

.chart__row + .chart__row { margin-top: 14px; }
.chart__rowhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 6px;
}
.chart__rowlab { font-size: 0.875rem; }
.chart__rowval { font-size: 0.6875rem; color: var(--ink-3); text-align: right; }

.chart__cap {
  margin: 12px 0 0;
  max-width: 58ch;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-3);
}

@media (prefers-reduced-motion: reduce) {
  .chart__bar { animation: none; }
}

@media (max-width: 480px) {
  .chart__rowhead { display: block; }
  .chart__rowval { display: block; text-align: left; margin-top: 2px; }
}

.scrim {
  position: fixed;
  inset: 0;
  /* Graded rather than flat: darkest under the panel edge, clearing toward the
     left. A uniform wash flattens the page into a single grey rectangle and
     loses the sense that the panel is arriving from one side. */
  background: linear-gradient(to right, rgba(0, 0, 0, .12), rgba(0, 0, 0, .38));
  z-index: 15;
  opacity: 0;
  /* Out-curve on the way in so the dimming leads the panel slightly; linear on
     the way out so it clears without lingering. */
  transition: opacity var(--dur-panel-out) linear;
}
.scrim[hidden] { display: none; }
.scrim.is-open {
  opacity: 1;
  transition: opacity var(--dur-panel-in) var(--ease-expo-out);
}

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 1279px) {
  .panel { width: max(480px, 60vw); }
}

/* Below 1024 the panel covers most of the page, so it becomes a real modal
   with a scrim, a focus trap, and the background inert. app.js switches the
   ARIA roles at the same breakpoint — the two must stay in sync. */
@media (max-width: 1023px) {
  .panel { width: 88vw; }
  .panel__head { grid-template-columns: minmax(0, 1fr); }
  .case__descriptor { display: none; }
  .case__name { font-size: clamp(1.5rem, 4.4vw, 2.125rem); }
  .case__link { min-height: 72px; }
}

@media (max-width: 767px) {
  .case__link {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "index name" ".     badges";
    align-items: start;
    align-content: center;
    row-gap: 10px;
    min-height: 96px;
    padding: 18px 0;
  }
  .case__index   { grid-area: index; }
  .case__name    { grid-area: name; }
  .case__badges  { grid-area: badges; flex-wrap: wrap; }
  .badge { font-size: 0.75rem; height: 22px; }

  /* Bottom-sheet motion reads as native and keeps the close under a thumb. */
  .panel {
    width: 100vw;
    left: 0;
    right: 0;
    transform: translateY(100%);
    border-left: 0;
    padding-top: 64px;
  }
  .panel.is-open { transform: translateY(0); }
  .panel__close {
    position: fixed;
    top: 12px;
    right: 12px;
    background: var(--bg-page);
    border-radius: 50%;
    z-index: 2;
  }

  /* Touch has no hover, so the fill would otherwise never appear. */
  .case__link:active::before { background: var(--row-hover); }
}

@media (prefers-reduced-motion: reduce) {
  .panel { transition: opacity 120ms linear; transform: none !important; }
  .case__link::before, .case__descriptor { transition: none; }
}


/* ==========================================================================
   Sector briefs

   Deliberately quieter than the case list. The demonstrations are the argument
   and the briefs are the application of it, so they sit below, in a block that
   reads as a second movement rather than a competing first one. Reversing that
   order would turn a proving ground into a pitch deck.
   ========================================================================== */
.sectors-block {
  margin: 72px 0 0;
  padding: 40px 0 0;
  border-top: 1px solid var(--hairline);
}
.sectors-block__title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.sectors-block__lede {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0 0 24px;
}
/* Sector rows reuse .case__link wholesale — same hit area, same keyboard
   behaviour, same hover treatment — and differ only in the index column, which
   carries a word rather than a number because a brief has no ordinal. */
.sector .case__index {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---- Brief panel body -------------------------------------------------- */
.brief { margin: 8px 0 0; }
.brief__section { margin: 0 0 28px; }
.brief__heading {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, .14);
}
.brief__lede {
  font-size: 1.0625rem;
  line-height: 1.5;
  margin: 0 0 14px;
  max-width: 66ch;
}
.brief__points {
  margin: 0;
  padding-left: 20px;
  max-width: 68ch;
}
.brief__points li {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 12px;
}
.brief__points b { font-weight: 600; }

/* Superscript citation markers. Small, unobtrusive, and clickable down to the
   source list — the claim and its evidence must never drift apart. */
.cite {
  font-family: var(--font-mono);
  font-size: 0.6875em;
  vertical-align: super;
  line-height: 0;
  color: var(--accent-text);
  text-decoration: none;
  padding: 0 1px;
}
.cite:hover { text-decoration: underline; }

/* ---- Exhibit cross-links ------------------------------------------------ */
.brief__exhibits { list-style: none; margin: 0; padding: 0; }
.brief__exhibit {
  display: block;
  padding: 12px 14px;
  margin: 0 0 8px;
  border: 1px solid var(--hairline);
  background: var(--bg-paper);
  text-decoration: none;
  color: inherit;
}
.brief__exhibit:hover { background: var(--row-hover); }
.brief__exhibit-name {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin: 0 0 3px;
}
.brief__exhibit-name::after { content: ' →'; color: var(--accent-text); }
.brief__exhibit-why {
  display: block;
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.5;
}

/* ---- Ideation ------------------------------------------------------------
   Visually fenced on purpose. Everything else in this app is measured or
   cited; a concept list in the same type would borrow credibility it has not
   earned, so it gets a dashed border and says what it is at the top. */
.ideation {
  border: 1px dashed var(--border-control);
  background: var(--bg-sunken);
  padding: 18px;
}
.ideation .brief__heading { border-bottom-color: var(--border-control); }
.ideation__warning {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--accent-text);
  margin: 0 0 14px;
}
.ideation__basis {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* ---- Sources -------------------------------------------------------------
   The load-bearing element of a brief. A sector claim without a checkable
   link is exactly the kind of thing that loses a room's trust all at once, so
   the list is rendered plainly and in full rather than tucked behind a
   disclosure. */
.sources {
  margin: 32px 0 0;
  padding: 18px;
  border: 1px solid var(--hairline);
  background: var(--bg-paper);
}
.sources__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 10px;
}
.sources__list {
  margin: 0;
  padding-left: 22px;
  font-size: 0.8125rem;
  line-height: 1.7;
}
.sources__list a { color: var(--ink); word-break: break-word; }
.sources__date { color: var(--ink-3); font-family: var(--font-mono); font-size: 0.75rem; }
