/* dossier.css — the research-poster document: sticky specimen stage +
   reading field on a 24-column master grid. */

.dossier {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 0 var(--gutter);
  padding: 0 var(--margin) var(--s-12);
  align-items: start;
}

/* ---- outer chapter rail ---- */
.dossier-rail {
  position: fixed;
  right: 10px;
  top: 50%;
  translate: 0 -50%;
  z-index: 60;
  display: grid;
  gap: var(--s-2);
  justify-items: center;
}
.rail-progress {
  width: 2px;
  height: 3.4rem;
  background: var(--rule);
  position: relative;
  overflow: hidden;
}
.rail-progress::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: var(--p, 0%);
  background: var(--signal);
}
.rail-list { display: grid; gap: 2px; }
.rail-link {
  display: block;
  padding: 1px 4px;
  font-size: 9px;
  text-decoration: none;
  color: var(--ink-faint);
  position: relative;
}
.rail-link .rail-title {
  position: absolute;
  right: 100%;
  top: 50%;
  translate: -6px -50%;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .08em;
  background: var(--ink);
  color: var(--paper);
  padding: .25em .6em;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--d-micro) var(--ease-out);
}
.rail-link:hover .rail-title, .rail-link:focus-visible .rail-title { opacity: 1; }
.rail-link.is-current { color: var(--accent); font-weight: 600; }
.rail-ends { display: grid; gap: 2px; justify-items: center; }
.rail-ends a { text-decoration: none; font-size: .8rem; color: var(--ink-muted); padding: 2px 6px; }
.rail-ends a:hover { color: var(--signal); }
@media (max-width: 1279px) { .dossier-rail { display: none; } }

/* ---- sticky specimen stage ---- */
.dossier-stage {
  grid-column: 1 / span 9;
  position: sticky;
  top: calc(var(--head-h) + var(--s-3));
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-6);
}
.stage-frame {
  border: 1px solid var(--ink);
  position: relative;
  /* NOTE: the dark field is the IMAGE's pre-load placeholder (on .stage-img),
     not a frame background — putting it on the frame made its dark colour bleed
     out below the 4:3 image, under the in-flow <figcaption>, as an exposed strip
     ("mask") behind dark-on-light caption text. */
}
.stage-frame::before, .stage-frame::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1.5px solid var(--ink);
  pointer-events: none;
  z-index: 2;
}
.stage-frame::before { top: -7px; left: -7px; border-width: 1.5px 0 0 1.5px; }
.stage-frame::after { bottom: -7px; right: -7px; border-width: 0 1.5px 1.5px 0; }
.stage-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--field-dark); }
.stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  opacity: 0;
  transition: opacity var(--d-change) var(--ease-out);
  pointer-events: none;
}
.stage-canvas.is-ready { opacity: 1; }
/* live analysis-mode label — tells the reader WHAT the plate is showing */
.stage-mode {
  position: absolute;
  top: .6rem;
  left: .6rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .12em;
  color: var(--paper);
  background: color-mix(in srgb, var(--field-dark) 82%, transparent);
  padding: .35em .7em;
  backdrop-filter: blur(4px);
}
.stage-mode::before { content: "◉"; color: var(--signal); font-size: .9em; }
.stage-mode b { font-weight: 400; }

/* MEASURE toggle — clear label, dot state, explicit affordance */
.stage-xray {
  position: absolute;
  top: .6rem;
  right: .6rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .14em;
  padding: .45em .85em;
  background: var(--paper);
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background var(--d-micro) var(--ease-out), color var(--d-micro) var(--ease-out);
}
.stage-xray:hover { background: var(--ink); color: var(--paper); }
.stage-xray .xray-dot {
  width: .55em; height: .55em;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: transparent;
  transition: background var(--d-micro) var(--ease-out);
}
.stage-xray.is-on { background: var(--signal); border-color: var(--signal); color: var(--paper); }
.stage-xray.is-on .xray-dot { background: var(--paper); border-color: var(--paper); }

/* ---- MEASURE: the census readout over the plate ----
   Replaces the old decorative X-ray overlay. It sits on the plate because the
   numbers describe exactly the image underneath it. */
.stage-census {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 4;
  padding: var(--s-2);
  background: color-mix(in srgb, var(--field-dark) 88%, transparent);
  color: var(--paper-on-dark);
  backdrop-filter: blur(6px);
  display: grid;
  gap: .5rem;
  animation: censusIn var(--d-label) var(--ease-out) both;
  max-height: 100%;
  overflow-y: auto;
}
@keyframes censusIn { from { opacity: 0; translate: 0 12px } to { opacity: 1; translate: 0 0 } }
@media (prefers-reduced-motion: reduce) { .stage-census { animation: none; } }
.census-head {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .14em;
  display: flex;
  flex-wrap: wrap;
  gap: .5em;
  align-items: baseline;
}
.census-head span { color: var(--muted-on-dark); letter-spacing: .08em; }
.census-load { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .1em; color: var(--muted-on-dark); }
/* the measured proportion bar: each segment's width IS its share */
.census-strip { display: flex; height: 14px; width: 100%; overflow: hidden; }
.census-strip i { display: block; width: var(--w); background: var(--c); }
.census-rows, .census-claimed { display: grid; gap: .2rem; }
.census-rows li, .census-claimed li {
  display: grid;
  grid-template-columns: 12px auto auto 1fr;
  gap: .5rem;
  align-items: center;
  font-size: var(--t-micro);
}
.census-rows i, .census-claimed i {
  width: 12px; height: 12px;
  background: var(--c);
  border: 1px solid color-mix(in srgb, var(--paper-on-dark) 45%, transparent);
}
.census-rows span, .census-claimed span:last-child { justify-self: end; color: var(--muted-on-dark); }
.census-claimed .tag {
  justify-self: start;
  font-size: 9px;
  letter-spacing: .1em;
  border: 1px solid var(--rule-on-dark);
  padding: .1em .4em;
  color: var(--muted-on-dark);
}
.census-claimed .is-absent { opacity: .55; }
.census-claimed .is-absent span:last-child { color: var(--signal); }
.census-verify { font-size: var(--t-micro); letter-spacing: .04em; }
.census-verify .num { color: var(--paper-on-dark); }
.census-note { font-size: 10px; line-height: 1.45; color: var(--muted-on-dark); max-width: 60ch; }
.census-note .disclosure { color: var(--paper-on-dark); border-color: var(--rule-on-dark); margin-right: .4em; }

.stage-hint {
  font-size: var(--t-caption);
  color: var(--ink-muted);
  line-height: 1.5;
  margin-top: .1rem;
  max-width: 40ch;
}
.stage-hint b {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .08em;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  padding: .05em .4em;
  white-space: nowrap;
}
.stage-caption {
  padding: var(--s-1) 0;
  font-size: var(--t-caption);
  color: var(--ink-muted);
}
.stage-caption > span {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .08em;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  padding: .05em .45em;
  margin-right: .5em;
}
/* live diagnostic signals under the frame */
.stage-palette { display: flex; gap: 3px; }
.stage-sw { flex: 1; display: grid; gap: .25rem; }
.stage-sw i { display: block; height: 14px; background: var(--sw); border: 1px solid var(--rule-strong); }
.stage-sw.is-official i { box-shadow: inset 0 0 0 1px var(--paper), inset 0 0 0 2px var(--ink); }
.stage-sw b {
  font-weight: 400;
  font-size: var(--t-micro);
  color: var(--ink-muted);
  overflow: hidden;
  white-space: nowrap;
}
.stage-coords {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: var(--s-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: .45em 0;
  font-size: var(--t-micro);
}
.stage-coords div { display: flex; gap: .5em; }
.stage-coords dt { color: var(--ink-faint); letter-spacing: .1em; }
.stage-coords dd { color: var(--ink); white-space: nowrap; }
.stage-readout {
  min-height: 1rem;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .14em;
  color: var(--ink-muted);
}

/* stage responds to the chapter under inspection (canvas states arrive in P5;
   these are the DOM-level signals) */
[data-stage][data-mode="palette"] .stage-palette { outline: 2px solid var(--signal); outline-offset: 3px; }
[data-stage][data-mode="typography"] .stage-caption { color: var(--ink); }
[data-stage][data-mode="motion"] .stage-frame { border-color: var(--signal); }
[data-stage][data-mode="sources"] .stage-coords, [data-stage][data-mode="evidence"] .stage-coords { border-color: var(--signal); }

/* ---- reading field ---- */
.dossier-body {
  grid-column: 11 / span 14;
  display: grid;
  gap: var(--s-8);
  padding-top: var(--s-6);
  min-width: 0;
}
/* grid items must be allowed to shrink; wide boards scroll inside themselves */
.dossier-stage, .chapter { min-width: 0; }

.chapter { position: relative; }

/* reading rhythm: narrow prose chapters vs full-field boards, and extra air
   before each part boundary (visual / behavior / shipping) */
:is(#ch-strategy, #ch-evidence, #ch-responsive, #ch-accessibility, #ch-risks) .chapter-body,
:is(#ch-strategy, #ch-evidence, #ch-responsive, #ch-accessibility, #ch-risks) > :not(.chapter-head) {
  max-width: 62ch;
}
:is(#ch-palette, #ch-motion, #ch-production) { margin-top: var(--s-6); }
/* part boundaries are marked by the extra margin above (see the rule before),
   no longer by a thicker rule under the heading */

.chapter-head {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  /* no rule under the title — the serif heading carries the hierarchy on its
     own; the heavy black border read as a divider bar across every chapter */
  padding-bottom: var(--s-1);
  margin-bottom: var(--s-3);
}
.chapter-no {
  font-family: var(--font-mono);
  font-size: var(--t-caption);
  color: var(--accent);
  transition: color var(--d-reveal) var(--ease-out);
}
/* display serif (see typography.css) — 1.06 leaves room for Fraunces descenders
   (g, y, italic f) that a flat line-height:1 clipped */
.chapter-title { font-size: var(--t-sub); line-height: 1.06; }
.chapter-spec {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .12em;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* identity */
.identity-kicker {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .16em;
  color: var(--ink-muted);
}
.identity-name { font-size: var(--t-display); line-height: .95; margin: .05em 0 .2em; }
.identity-desc { font-size: var(--t-lead); line-height: 1.35; max-width: 46ch; font-weight: 460; margin-top: var(--s-2); }
.id-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: var(--s-2); }
.id-arch {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---- infographic stat band ---- */
.id-stats {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
  margin: var(--s-4) 0 var(--s-3);
}
.id-stat {
  background: var(--paper);
  padding: var(--s-3) var(--s-2);
  display: grid;
  align-content: start;
  gap: .5rem;
}
.id-stat-key {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.id-stat-fig { font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: .9; }
.id-stat-fig em { font-style: normal; font-size: .42em; color: var(--ink-muted); }
.id-stat-ctx { font-size: var(--t-caption); color: var(--ink-muted); }
.id-stat-score { background: var(--field-dark); color: var(--paper-on-dark); }
.id-stat-score .id-stat-key { color: var(--muted-on-dark); }
.id-stat-score .id-stat-fig { color: var(--paper-on-dark); }
.id-stat-score .id-stat-ctx { color: var(--muted-on-dark); }

/* score range gauge: this system's score within the set's 7.45–8.11 span */
.id-gauge { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5em; margin-top: .1rem; }
.id-gauge-track {
  position: relative;
  height: 6px;
  background: var(--rule-on-dark);
  border: 1px solid var(--rule-on-dark);
}
.id-gauge-fill { position: absolute; inset: 0 auto 0 0; width: var(--pos); background: var(--signal); }
.id-gauge-avg {
  position: absolute;
  top: -3px; bottom: -3px;
  left: var(--avg);
  width: 1px;
  background: var(--paper-on-dark);
}
.id-gauge-lo, .id-gauge-hi { font-size: var(--t-micro); color: var(--muted-on-dark); }

/* meta grid */
.id-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-bottom: var(--s-4);
}
.id-meta > div { background: var(--paper); padding: var(--s-2); }
.id-meta dt {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: .3em;
}
.id-meta dd { font-size: .9375rem; }

.identity-signals { margin-top: var(--s-4); }
.id-metrics .metric-row.is-top .metric-key { color: var(--ink); font-weight: 500; }
.id-metrics .metric-row.is-top .metric-track i { background: var(--accent); }
.id-metrics .metric-row.is-top .metric-val { color: var(--accent); }
.signal-line { margin-top: var(--s-3); font-size: var(--t-caption); color: var(--ink-muted); }
.signal-line strong { color: var(--ink); text-transform: uppercase; letter-spacing: .06em; }

@media (max-width: 640px) {
  .id-stats { grid-template-columns: 1fr; }
}

/* strategy + evidence */
.prose-wide p { margin-bottom: var(--s-2); }
.conf-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3);
  align-items: center;
  border: 1px solid var(--rule-strong);
  padding: var(--s-3);
  margin-top: var(--s-3);
  max-width: 40rem;
}
.conf-num { font-size: 3rem; line-height: 1; }
.conf-box p { font-size: var(--t-caption); color: var(--ink-muted); margin: 0; }

/* palette */
.palette-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--s-2);
}
.swatch { display: grid; gap: .35rem; position: relative; }
.swatch-chip {
  display: block;
  height: 5.5rem;
  background: var(--sw);
  border: 1px solid var(--rule-strong);
}
.swatch-name { font-weight: 600; font-size: .9375rem; }
.swatch-hex { font-size: var(--t-caption); color: var(--ink-muted); }
.swatch-idx {
  position: absolute;
  top: .4rem; right: .4rem;
  font-size: var(--t-micro);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  padding: 0 .35em;
}
.swatch .stamp { justify-self: start; }

/* typography chapter */
.type-directions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.font-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--s-2);
}
.font-card { border: 1px solid var(--rule-strong); padding: var(--s-2); display: grid; gap: .3rem; align-content: start; }
.font-sample {
  font-size: 1.9rem;
  line-height: 1.1;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .35em;
  margin-bottom: .35em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.font-card h4 { font-size: 1rem; }
.font-role {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.font-note { font-size: var(--t-caption); color: var(--ink-muted); }

.scale-table { border: 1px solid var(--rule-strong); }
.scale-row {
  display: grid;
  grid-template-columns: 6rem minmax(11rem, auto) 1fr;
  gap: var(--s-2);
  padding: .6em var(--s-2);
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-caption);
  align-items: baseline;
}
.scale-row:last-child { border-bottom: 0; }
.scale-head { font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }

/* layout chapter */
.layout-lab { display: grid; grid-template-columns: minmax(14rem, 22rem) 1fr; gap: var(--s-3); align-items: start; }
.layout-diagram {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 2.6rem;
  gap: 4px;
  border: 1px solid var(--rule-strong);
  padding: 4px;
}
.layout-diagram i {
  position: relative;
  background: repeating-linear-gradient(-45deg, var(--rule), var(--rule) 1px, transparent 1px, transparent 6px);
  border: 1px solid var(--rule-strong);
  display: grid;
  place-content: center;
}
.layout-diagram i span { font-size: var(--t-micro); background: var(--paper); padding: 0 .3em; }
.cell-hero { grid-column: span 4; grid-row: span 2; background: var(--ink) !important; }
.cell-hero span { color: var(--ink); }
.cell-wide { grid-column: span 4; }
.cell-mid { grid-column: span 3; }
.cell-side { grid-column: span 2; grid-row: span 2; }
.cell-tall { grid-column: span 2; grid-row: span 2; }
.cell-thin { grid-column: span 2; }
.cell-small { grid-column: span 2; }
.cell-caption { grid-column: span 3; }
.layout-meta strong { font-size: 1.1rem; }
.layout-meta p { font-size: var(--t-caption); color: var(--ink-muted); margin-top: .3em; }

/* interaction matrix */
.ix-table { border: 1px solid var(--rule-strong); }
.ix-row {
  display: grid;
  grid-template-columns: 1.1fr .9fr 1.1fr 1.6fr;
  gap: var(--s-2);
  padding: .7em var(--s-2);
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-caption);
}
.ix-row:last-child { border-bottom: 0; }
.ix-head {
  font-family: var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule-strong);
}
.ix-row [data-col]::before { content: none; }

/* motion chapter */
.motion-spec-table { border: 1px solid var(--rule-strong); margin: var(--s-3) 0; }
.spec-row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: var(--s-2);
  padding: .6em var(--s-2);
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-caption);
}
.spec-row:last-child { border-bottom: 0; }
.spec-key { font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }

.storyboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(13rem, 1fr));
  gap: var(--s-2);
  overflow-x: auto;
  padding-bottom: var(--s-1);
}
.frame { border: 1px solid var(--rule-strong); padding: var(--s-2); display: grid; gap: .5rem; align-content: start; }
.frame header { display: flex; align-items: baseline; gap: .6em; border-bottom: 1px solid var(--rule); padding-bottom: .4em; }
.frame-no { color: var(--signal); font-size: var(--t-caption); }
.frame h4 { font-size: 1rem; }
.frame p { font-size: var(--t-caption); color: var(--ink-muted); }
.frame p strong {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
}

/* do / dont */
.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }

/* principle atlas */
.atlas-6 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.principle-card { background: var(--paper); padding: var(--s-3); }
.principle-card h3 {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: .5em;
}
.principle-card p { font-size: var(--t-caption); }

/* prompt plate */
.prompt-plate { border: 1px solid var(--ink); position: relative; }
.btn-copy {
  position: sticky;
  top: calc(var(--head-h) + var(--s-1));
  z-index: 5;
  float: right;
  margin: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--t-caption);
  letter-spacing: .1em;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: .55em 1.1em;
}
.btn-copy:hover { background: var(--signal); border-color: var(--signal); }
.prompt-text {
  font-family: var(--font-mono);
  font-size: .8125rem;
  line-height: 1.6;
  white-space: pre-wrap;
  padding: var(--s-3);
  max-height: 34rem;
  overflow-y: auto;
}

/* sources + nav */
.source-links { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.dossier-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.nav-prev, .nav-next {
  background: var(--paper);
  padding: var(--s-3);
  text-decoration: none;
  display: grid;
  gap: .4rem;
  transition: background var(--d-micro) var(--ease-out), color var(--d-micro) var(--ease-out);
}
.nav-next { text-align: right; }
.nav-prev:hover, .nav-next:hover { background: var(--ink); color: var(--paper); }
.nav-dir { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .14em; color: var(--ink-muted); }
.nav-prev:hover .nav-dir, .nav-next:hover .nav-dir { color: var(--paper); }
.nav-name { font-family: var(--font-display); font-size: 1.4rem; }
.back-line { margin-top: var(--s-3); font-size: var(--t-caption); }
.back-line a { text-underline-offset: .25em; }

/* ---- tablet: stage docks above the reading field ---- */
@media (max-width: 1024px) {
  .dossier { display: block; }
  .dossier-stage {
    position: static;
    margin-top: var(--s-4);
    display: grid;
    grid-template-columns: minmax(0, 22rem) 1fr;
    gap: var(--s-2) var(--s-4);
    align-items: start;
  }
  .stage-frame { grid-row: 1 / span 3; }
  .dossier-body { padding-top: var(--s-4); }
  .type-directions, .do-dont { grid-template-columns: 1fr; gap: var(--s-3); }
  .layout-lab { grid-template-columns: 1fr; }
}

/* ---- mobile: full editorial stack ---- */
@media (max-width: 740px) {
  .dossier-stage { grid-template-columns: 1fr; }
  .stage-coords { grid-template-columns: repeat(2, auto); row-gap: .3rem; }
  .stage-frame { grid-row: auto; }
  .identity-name { font-size: clamp(2.6rem, 13vw, 4.5rem); }
  .chapter-head { flex-wrap: wrap; }
  .chapter-spec { display: none; }
  .storyboard { grid-template-columns: repeat(4, minmax(15rem, 80vw)); }
  .ix-row { grid-template-columns: 1fr; gap: .3rem; padding: var(--s-2); }
  .ix-head { display: none; }
  .ix-row [data-col]::before {
    content: attr(data-col);
    display: block;
    font-family: var(--font-mono);
    font-size: var(--t-micro);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-muted);
  }
  .dossier-nav { grid-template-columns: 1fr; }
  .nav-next { text-align: left; }
  .scale-row { grid-template-columns: 4.5rem 1fr; }
  .scale-row [role="cell"]:last-child, .scale-row [role="columnheader"]:last-child { grid-column: 1 / -1; color: var(--ink-muted); }
}
