/* Eight-stage modular configuration page (REQ-131, WEB-STAGES-001, WEB-STAGES-002). Website mode A of the design
   contracts (REQ-125): UI tokens from design-system.css, drawing tokens from home-drawing.css (one set for the eight
   schematics, which used to carry eight copies). The text column scrolls normally; the sheet beside it stays in view.
   Nothing is drawn over a schematic (REQ-028). */

.st-intro { padding-bottom: var(--bc-space-4); }
.st-intro h1 { max-width: 18ch; margin: 0 0 var(--bc-space-2); font-size: clamp(36px, 4.4vw, 56px); line-height: 1.05;
  letter-spacing: -.02em; }
.st-lead { max-width: 62ch; margin: 0 0 var(--bc-space-3); font-size: 17px; line-height: 1.65; color: var(--bc-muted); }
.st-legend { display: flex; flex-wrap: wrap; gap: var(--bc-space-1) var(--bc-space-3); margin: 0 0 var(--bc-space-2);
  padding: 0; list-style: none; font-size: 13px; color: var(--bc-muted); }
.st-legend strong, .st-planned strong { margin-right: 4px; font: 500 11px var(--bc-mono); letter-spacing: .08em;
  text-transform: uppercase; color: var(--bc-ink); }
.st-planned { max-width: 72ch; margin: 0 0 var(--bc-space-3); padding-left: 14px; border-left: 2px solid var(--bc-line);
  font-size: 14px; color: var(--bc-muted); }
.st-intro-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--bc-space-2) var(--bc-space-3); }

/* Story: chapters on the left, sticky drawing sheet on the right. */
.st-story { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 48px; }
.st-chapter { min-height: 100vh; padding: 28vh 0 var(--bc-space-4); }
.st-chapter:first-child { padding-top: 8vh; }
.st-chapter h2 { margin: 0 0 var(--bc-space-2); font-size: 30px; line-height: 1.15; letter-spacing: -.01em; }
.st-chapter p { max-width: 46ch; margin: 0 0 var(--bc-space-2); }
.st-eyebrow { font: 500 12px var(--bc-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--bc-blue); }
.st-role { font-size: 14px; color: var(--bc-muted); }
.st-caps { display: grid; gap: 6px; margin: 0 0 var(--bc-space-2); padding: 0; list-style: none; font-size: 14px; }
.st-caps li { padding-left: 14px; border-left: 1px solid var(--bc-line); }
.st-status { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--bc-line);
  border-left: 3px solid var(--bc-line); background: var(--bc-surface); font-size: 13px; color: var(--bc-muted); }
.st-status:empty { display: none; }
.st-status strong { font: 500 11px var(--bc-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--bc-ink); }
.st-status[data-status="working"] { border-left-color: var(--bc-blue); }
.st-status[data-status="partial"] { border-left-color: var(--bc-muted); }
.st-status[data-status="simulated"], .st-status[data-status="planned"] { border-left-style: dashed; }
.st-links { display: flex; flex-wrap: wrap; gap: var(--bc-space-1) var(--bc-space-3); }

.st-stage { position: sticky; top: var(--header-height, 80px); height: calc(100vh - var(--header-height, 80px));
  display: flex; flex-direction: column; justify-content: center; gap: var(--bc-space-1); }
.st-steps { display: flex; flex-wrap: wrap; gap: 6px; font: 500 11px var(--bc-mono); letter-spacing: .1em; }
.st-steps a { padding: 4px 10px; border: 1px solid var(--bc-line); border-radius: var(--bc-radius);
  color: var(--bc-muted); text-decoration: none;
  transition: color var(--bc-motion-fast) var(--bc-ease-out), border-color var(--bc-motion-fast) var(--bc-ease-out); }
.st-steps a[aria-current] { color: var(--bc-blue); border-color: var(--bc-blue); background: var(--bc-selected); }
.st-sheet-stage { width: min(100%, calc((100vh - var(--header-height, 80px) - 140px) * 780 / 610)); }

/* Drawing sheet (contract section 9). */
.st-sheet { margin: 0; background: var(--bc-draw-sheet); border: 1px solid var(--bc-line); }
.st-sheet-head, .st-sheet-foot { display: flex; justify-content: space-between; gap: var(--bc-space-2);
  padding: 7px 12px; font: 10px/1.5 var(--bc-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--bc-muted); }
.st-sheet-head { border-bottom: 1px solid var(--bc-draw-rule); }
.st-sheet-foot { border-top: 1px solid var(--bc-draw-rule); text-transform: none; letter-spacing: .02em;
  font-size: 11px; }
.st-sheet-frame { aspect-ratio: 780 / 610; }
.st-sheet-inline { display: none; margin-top: var(--bc-space-3); }

/* The eight schematics, kept as drawn on the former home stepper; one set of drawing tokens. */
.st-drawing { display: block; width: 100%; height: 100%; }
.st-drawing [data-frame][hidden] { display: none; }
.st-drawing .scene-art { fill: none; stroke: var(--bc-draw-ink); stroke-width: 1.3; stroke-linejoin: round;
  stroke-linecap: round; }
.st-drawing .surface { fill: var(--bc-draw-face-top); }
.st-drawing .end-face, .st-drawing .corridor, .st-drawing .wash { fill: var(--bc-draw-face-side); }
.st-drawing .roof, .st-drawing .glazing, .st-drawing .cutout { fill: var(--bc-draw-sheet); }
.st-drawing .detail { stroke: var(--bc-draw-label); stroke-width: .8; }
.st-drawing .module-grid { stroke: var(--bc-draw-label); stroke-width: .7; }
.st-drawing .frame { stroke: var(--bc-draw-ink); stroke-width: 2.6; }
.st-drawing .cladding { stroke: var(--bc-draw-label); stroke-width: .6; opacity: .5; }
.st-drawing .mix-group { stroke: var(--bc-draw-ink); stroke-width: 2; }
.st-drawing .mix-0 { fill: var(--bc-draw-face-side); }
.st-drawing .mix-1 { fill: var(--bc-draw-sheet); }
.st-drawing .mix-2 { fill: var(--bc-draw-member); }
.st-drawing .balcony { fill: var(--bc-draw-face-side); }
.st-drawing .plan-wall { stroke-width: 3; }
.st-drawing .selected-face { stroke: var(--bc-draw-dim); stroke-width: 2; fill: var(--bc-draw-node-on); }
.st-drawing .handoff { stroke: var(--bc-draw-dim); stroke-width: 1.5; stroke-dasharray: 5 7; }
/* One quiet entrance per frame; no loop (the motion inventory retired the endless ones). */
.st-drawing [data-frame]:not([hidden]) { animation: st-frame-in var(--bc-motion-base) var(--bc-ease-out) both; }
@keyframes st-frame-in { from { opacity: .45; } to { opacity: 1; } }

.st-ending { border-top: 1px solid var(--bc-line); }
.st-ending h2 { max-width: 24ch; margin: 0 0 var(--bc-space-2); }
.st-ending p { max-width: 60ch; }
.st-disclaimer { margin-top: var(--bc-space-3); font-size: 13px; color: var(--bc-muted); }
.st-steps a:focus-visible, .st-links a:focus-visible { outline: 2px solid var(--bc-blue); outline-offset: 2px; }

/* Phones: no sticky sheet; each chapter carries its own schematic. */
@media (max-width: 900px) {
  .st-story { display: block; }
  .st-stage { display: none; }
  .st-chapter, .st-chapter:first-child { min-height: 0; padding: 48px 0 0; }
  .st-chapter h2 { font-size: 26px; }
  .st-sheet-inline { display: block; }
  .st-ending { margin-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .st-drawing [data-frame]:not([hidden]) { animation: none; }
}

/* REQ-131 stage 5 (WEB-NAV-008): pages of this site cross-fade on navigation where the browser supports it. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
