/* The landing stylesheet is these partials concatenated in file-name order (Task 7 builds them
   into the one hashed landing.css). Chrome sheets read the admin tokens from /platform/tokens.css.

   Landing-only colour tokens: --paper and --ink are the two values spec §3.4 reserves for the
   landing. The five derived tokens after them are sanctioned by name in the controller's Task 5
   fix-round-1 ruling; each is a color-mix() of --paper, --ink or an admin token, and no other
   colour literal exists in any partial. OKLab keeps the focus hue from drifting as it darkens.
   The design-tokens gate reads its exemption from each declaration's own line. */
:root {
  --paper: oklch(96% 0.01 80); /* design-token-exempt */
  --ink: oklch(20% 0 0); /* design-token-exempt */
  --ink-dim: color-mix(in oklab, var(--ink) 62%, var(--paper)); /* design-token-exempt */
  --ink-hover: color-mix(in oklab, var(--ink) 82%, var(--paper)); /* design-token-exempt */
  --paper-rule: color-mix(in oklab, var(--ink) 18%, var(--paper)); /* design-token-exempt */
  --paper-deep: color-mix(in oklab, var(--ink) 5%, var(--paper)); /* design-token-exempt */
  --paper-focus: color-mix(in oklab, var(--focus) 60%, var(--ink)); /* design-token-exempt */

  --t-label: 0.75rem;
  --t-small: 0.9375rem;
  --t-body: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  --t-lede: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  --t-h3: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  --t-h2: clamp(2.25rem, 1.05rem + 4.4vw, 5.25rem);
  --t-display: clamp(2.75rem, 0.7rem + 6.9vw, 7rem);

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  --cols: 4;
  --gutter: 16px;
  --margin: 16px;
  --rail: 0px;
  --frame: 8px;
  --masthead-h: 64px;

  --sheet-pad-top: var(--s-8);
  --sheet-pad-bottom: var(--s-8);

  scroll-padding-top: var(--s-4);
}

@media (width >= 40rem) {
  :root {
    --cols: 8;
    --gutter: 24px;
    --margin: 24px;
    --frame: 12px;
    scroll-padding-top: var(--masthead-h);
  }
}

@media (width >= 64rem) {
  :root {
    --cols: 12;
    /* Past 1776 px the margins grow, so sheet content (rail, captions, grid) holds 1680 px. */
    --margin: max(clamp(32px, 3.2vw, 48px), (100vw - 1680px) / 2);
    --rail: 56px;
    --frame: 16px;
  }
}

/* Each sheet names its material once; components read --fg, --fg-dim, --rule and --plate. */
.sheet--chrome,
.on-chrome,
.masthead,
.colophon {
  --fg: var(--text);
  --fg-dim: var(--text-dim);
  --rule: var(--border);
  --rule-strong: var(--border-strong);
  --ground: var(--bg-app);
  --plate: var(--bg-panel);
  --well: var(--bg-app);
}

.sheet--paper {
  --fg: var(--ink);
  --fg-dim: var(--ink-dim);
  --rule: var(--paper-rule);
  --rule-strong: var(--ink-dim);
  --ground: var(--paper);
  --plate: var(--paper-deep);
}

html {
  background: var(--bg-app);
  color: var(--text);
  font-family: var(--font-ui);
  font-optical-sizing: auto;
  text-size-adjust: 100%;
  scrollbar-color: var(--border-strong) var(--bg-app);
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  font-size: var(--t-body);
  line-height: 1.55;
  counter-reset: sheet;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
figure,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

::selection {
  background: var(--accent-fill);
  color: var(--text);
}

:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
}

.sheet--paper :focus-visible {
  outline-color: var(--paper-focus);
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Read by assistive technology, never painted: the hero scene's live announcements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Monospace is a role (docs/design.md, rule 1): captions, scene numbers and readouts carry
   measured metadata, so they share one face, size and tracking. */
.nav__motion,
.rail::after,
.sheet__caption,
.sheet__block,
.label,
.readout,
.step::before {
  color: var(--fg-dim);
  font: var(--t-label) / 1 var(--font-code);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Type and the 12-column grid */

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter);
}

.grid > * {
  grid-column: 1 / -1;
}

.display,
.headline {
  min-width: 0;
  font-variation-settings: 'opsz' 32;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.display {
  font-size: var(--t-display);
  line-height: 0.96;
  letter-spacing: -0.038em;
}

.headline {
  font-size: var(--t-h2);
  line-height: 1;
  letter-spacing: -0.034em;
}

.tone-a,
.tone-b {
  display: block;
}

.tone-a {
  color: var(--fg);
}

.tone-b {
  color: var(--fg-dim);
}

.chunk {
  display: inline-block;
}

.lede {
  max-width: 46ch;
  color: var(--fg);
  font-size: var(--t-lede);
  line-height: 1.45;
  text-wrap: pretty;
}

.note {
  max-width: 64ch;
  color: var(--fg-dim);
  font-size: var(--t-small);
  line-height: 1.5;
  text-wrap: pretty;
}

.label,
.readout {
  line-height: 1.5;
}

/* Skip link: the first focus stop, clipped to nothing until it has focus */

.skip-link {
  position: absolute;
  top: var(--s-3);
  left: var(--margin);
  z-index: 20;
}

.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Masthead: a floating pill of chrome that stays over the sheets from tablet width up */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  padding: var(--s-3) var(--margin);
  color: var(--fg);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fg);
  border-radius: var(--radius);
}

.brand__lockup {
  display: block;
  width: 112px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  width: 100%;
}

.nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-1) var(--s-3);
  width: 100%;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--fg-dim);
  font-size: 0.875rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.nav__link::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
}

.nav__link:hover::after {
  transform: scaleX(1);
}

.nav__link:active {
  opacity: 0.7;
}

.nav__motion {
  min-height: 36px;
  padding-inline: var(--s-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
}

/* The script shows the toggle after first paint. Until then it keeps its box, invisible and
   out of reach, so its arrival moves nothing; without the script the box stays empty. */
.nav__motion[hidden] {
  display: block;
  visibility: hidden;
}

.nav__motion:hover {
  color: var(--fg);
}

.nav__motion:active {
  opacity: 0.7;
}

.nav__motion:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (width >= 40rem) {
  .masthead {
    position: sticky;
    top: var(--s-3);
    z-index: 10;
    width: fit-content;
    margin: var(--s-3) auto 0;
    padding: var(--s-1) var(--s-1) var(--s-1) var(--s-5);
    gap: var(--s-6);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sheet);
  }

  .nav,
  .nav__list {
    width: auto;
  }

  .nav__list {
    flex-wrap: nowrap;
    gap: var(--s-5);
  }

  .nav__link {
    font-size: var(--t-small);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .nav__link::after {
    transition: transform 220ms var(--ease-out);
  }
}

/* Buttons and links: a surface step on hover, a press that dips, a ring that appears at once */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-5);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding-inline: var(--s-5);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--t-small);
  font-weight: 560;
  line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  opacity: 0.85;
}

.btn--compact {
  min-height: 40px;
  padding-inline: var(--s-3);
  font-size: 0.875rem;
}

@media (width >= 40rem) {
  .btn--compact {
    padding-inline: var(--s-4);
    font-size: var(--t-small);
  }
}

.btn--action {
  background: var(--action);
  color: var(--action-ink);
}

.btn--action:hover {
  background: var(--action-hover);
}

.btn--ink {
  background: var(--ink);
  color: var(--paper);
}

.btn--ink:hover {
  background: var(--ink-hover);
}

.btn--line {
  border-color: var(--rule-strong);
  color: var(--fg);
}

.btn--line:hover {
  background: var(--plate);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 48px;
  color: var(--fg);
  font-size: var(--t-small);
  font-weight: 560;
  line-height: 1;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  white-space: nowrap;
}

.link-arrow__glyph {
  display: inline-block;
}

.link-arrow:active {
  opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
  .link-arrow:hover {
    text-decoration-color: currentColor;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .link-arrow__glyph {
    transition: transform 160ms var(--ease-out);
  }

  .btn:active {
    transform: scale(0.97);
  }

  .link-arrow:hover .link-arrow__glyph {
    transform: translateX(4px);
  }
}

/* Sheets: the drawing-set frame every section shares */

.sheet {
  position: relative;
  isolation: isolate;
  padding-block: var(--sheet-pad-top) var(--sheet-pad-bottom);
  padding-inline: var(--margin);
  counter-increment: sheet;
  color: var(--fg);
}

.sheet--chrome {
  background: var(--bg-app);
  color-scheme: dark;
}

.sheet--paper {
  margin-inline: var(--frame);
  padding-inline: calc(var(--margin) - var(--frame));
  background: var(--paper);
  color-scheme: light;
}

.sheet--paper + .sheet--paper {
  margin-block-start: var(--frame);
}

.sheet--paper::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  filter: url('#grain');
  opacity: 0.045;
  pointer-events: none;
}

.sheet--chrome + .sheet--chrome {
  border-block-start: 1px solid var(--rule);
}

@media (width >= 64rem) {
  .sheet {
    padding-inline-start: calc(var(--margin) + var(--rail) + var(--gutter));
  }

  .sheet--paper {
    padding-inline-start: calc(var(--margin) - var(--frame) + var(--rail) + var(--gutter));
  }
}

/* The left rail: a tick scale and the sheet number, which stays in view while its sheet scrolls */

.rail {
  display: none;
}

@media (width >= 64rem) {
  .rail {
    position: absolute;
    inset-block: 0;
    inset-inline-start: var(--margin);
    display: block;
    width: var(--rail);
    padding-block-start: var(--sheet-pad-top);
  }

  .sheet--paper .rail {
    inset-inline-start: calc(var(--margin) - var(--frame));
  }

  .rail::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--rule);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' \
height='96'%3E%3Cpath d='M15 0h1v96h-1zM0 0h16v1H0zM10 24h6v1h-6zM6 48h10v1H6zM10 72h6v1h-6z'\
/%3E%3C/svg%3E")
      right top / 16px 96px repeat-y;
  }

  .rail::after {
    content: counter(sheet, decimal-leading-zero);
    position: sticky;
    top: calc(var(--masthead-h) + var(--s-5));
    display: block;
    width: fit-content;
    padding-block: var(--s-1);
    background: var(--ground);
    color: var(--fg);
  }
}

.sheet__caption {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-block-end: var(--s-8);
}

.sheet__caption::after {
  content: '';
  flex: 1;
  border-block-start: 1px solid var(--rule);
}

/* Title blocks: one closes each sheet like the box in a drawing's corner; the colophon's
   closes the whole set. Both draw their cells the same way. */

.sheet__block,
.colophon__block {
  display: grid;
  border: 1px solid var(--rule);
}

.sheet__block > * + *,
.colophon__block > * + * {
  border-block-start: 1px solid var(--rule);
}

.sheet__block {
  margin-block-start: var(--s-9);
  line-height: 1.4;
}

.sheet__block > * {
  padding: var(--s-2) var(--s-3);
}

.sheet__block > :first-child {
  color: var(--fg);
}

@media (width >= 64rem) {
  .sheet__block > * + *,
  .colophon__block > * + * {
    border-block-start: 0;
    border-inline-start: 1px solid var(--rule);
  }

  .sheet__block {
    grid-auto-flow: column;
    width: fit-content;
    margin-inline-start: auto;
  }
}

/* Figures: line drawings styled from the sheet's material, never from attributes */

.fig {
  display: block;
  width: 100%;
  height: auto;
  color: var(--fg);
}

.fig [class] {
  vector-effect: non-scaling-stroke;
}

/* A projection's viewBox is sized so its words reach 10 px on a phone plate; the cap holds them
   near 15 px on wide plates instead of letting them grow with the plate. */
.fig--cap {
  max-width: 29rem;
  margin-inline: auto;
}

/* Words in a drawing: the page's mono label face, sized in drawing units */
.f-text {
  font-family: var(--font-code);
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* The name of a document node (tag plus first class) */
.f-node {
  fill: var(--fg);
}

.f-ground {
  fill: var(--ground);
}

.f-edge {
  stroke: var(--rule);
}

.f-fill {
  fill: var(--fg);
}

.f-dim {
  fill: var(--fg-dim);
}

.f-plate {
  fill: var(--plate);
  stroke: var(--rule);
}

.f-line {
  fill: none;
  stroke: var(--fg-dim);
}

.f-slab {
  fill: var(--ground);
  stroke: var(--fg);
}

.f-side {
  fill: var(--plate);
  stroke: var(--rule-strong);
}

/* Element boxes are hairlines; a text line is a row of sampled points: round caps on zero dashes */
.f-hair {
  fill: none;
  stroke: var(--rule-strong);
}

.f-hair-far {
  stroke: var(--rule);
}

.f-chip {
  fill: var(--ground);
  stroke: var(--rule-strong);
}

.f-scan {
  fill: none;
  stroke: var(--fg);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 0 3;
}

/* Nodes that carry classes (spec §6.1): square-capped zero-length strokes */
.f-mark {
  fill: none;
  stroke: var(--fg);
  stroke-width: 3;
  stroke-linecap: square;
}

/* Each figure's one live mark (a selection, the scan line, the domain flag) in the accent line */
.f-select {
  fill: none;
  stroke: var(--accent-line);
  stroke-width: 2;
}

.f-handle {
  fill: var(--accent-line);
}

/* Reserved plates: fixed-ratio boxes that later tasks fill with screenshots or video, so the
   media arrives without reflow. Registration marks in two corners say "reserved", not "broken". */

.tile__slot,
.release__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--well);
  border-radius: 2px;
}

.tile__slot::before,
.tile__slot::after,
.release__media::before,
.release__media::after {
  content: '';
  position: absolute;
  width: var(--s-3);
  height: var(--s-3);
  border-color: var(--rule-strong);
  border-style: solid;
}

.tile__slot::before,
.release__media::before {
  top: var(--s-3);
  left: var(--s-3);
  border-width: 1px 0 0 1px;
}

.tile__slot::after,
.release__media::after {
  right: var(--s-3);
  bottom: var(--s-3);
  border-width: 0 1px 1px 0;
}

/* The anatomy figure (FIG. 05), built with the anatomy kit and emitted with these classes instead
   of the kit's own colours. Paper fills hide whatever is behind a part; the four side tones are
   ink laid at low coverage over that fill, so every tone comes from the sheet's own tokens. */

.a-f {
  fill: var(--ground);
}

.a-s0,
.a-s1,
.a-s2,
.a-s3 {
  fill: var(--fg);
}

.a-s0 {
  fill-opacity: 0.14;
}

.a-s1 {
  fill-opacity: 0.1;
}

.a-s2 {
  fill-opacity: 0.066;
}

.a-s3 {
  fill-opacity: 0.033;
}

.a-hi,
.a-mid,
.a-lo,
.a-ft,
.a-lit,
.a-wire,
.a-lead,
.a-dot {
  fill: none;
  stroke: var(--fg);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 0.75;
}

.a-hi {
  stroke-width: 1;
}

.a-mid,
.a-wire,
.a-lead {
  stroke: var(--fg-dim);
}

.a-lo {
  stroke-opacity: 0.4;
}

.a-ft {
  stroke-opacity: 0.22;
}

/* Screws and terminals: zero-length strokes with round caps, so a dot stays one size at any scale */
.a-dot {
  stroke-width: 2;
  stroke-opacity: 0.7;
}

/* The one live part: the release the domains serve */
.a-lit {
  stroke: var(--accent-line);
  stroke-width: 1.5;
}

/* Hero (chrome) */

.hero {
  --sheet-pad-top: var(--s-6);
  --sheet-pad-bottom: var(--s-7);

  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--masthead-h));
}

.hero .sheet__caption {
  margin-block-end: var(--s-6);
}

.hero__grid {
  row-gap: var(--s-5);
  align-items: start;
  margin-block-end: var(--s-7);
}

.hero__sign {
  color: var(--fg-dim);
  font-size: var(--t-lede);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero__title {
  margin-block-end: var(--s-4);
}

.hero__copy {
  display: grid;
  gap: var(--s-5);
}

.hero__scene {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.hero .sheet__block {
  margin-block-start: auto;
}

/* From 48rem, where the scene loads and the hero pins, the hero fills exactly the viewport below
   the masthead so the pinned sequence never cuts it off. Tighter spacing first; then the scene's
   row takes the remaining height and the plate gives up height, down to its row minimum, rather
   than overflow. The floor holds that minimum on viewports too short for it. */
@media (width >= 48rem) {
  .hero {
    --sheet-pad-top: var(--s-4);
    --sheet-pad-bottom: var(--s-5);
    --hero-floor: 52rem;

    box-sizing: border-box;
    height: max(calc(100svh - var(--masthead-h)), var(--hero-floor));
  }

  .hero .sheet__caption {
    margin-block-end: var(--s-4);
  }

  /* Stacked: sign, headline, copy, then the plate in the flexible row. */
  .hero__grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: auto auto auto minmax(14rem, 1fr);
    margin-block-end: var(--s-5);
  }

  /* The explicit width keeps the plate as wide as its column: with an automatic width the
     aspect ratio would carry the height limit over and narrow the plate instead. */
  .hero__scene {
    box-sizing: border-box;
    width: 100%;
    max-height: 100%;
  }
}

/* Side by side: the copy and the plate share the flexible row. */
@media (width >= 64rem) {
  .hero {
    --hero-floor: 44rem;
  }

  .hero__grid {
    grid-template-rows: auto auto minmax(16rem, 1fr);
  }

  .hero__copy {
    grid-column: 1 / span 5;
    padding-block-start: var(--s-2);
  }

  .hero__scene {
    grid-column: 6 / -1;
  }
}

/* Hero scene (Release B): the WebGL canvas over the poster, and its HTML overlays.
   The overlays keep their hidden attribute until the scene draws its first frame. */

[data-scene-root] {
  position: relative;
}

/* Vertical swipes keep scrolling the page; horizontal drags orbit the scan. The overlays sit one
   layer above the canvas (the sheet isolates these z-indices). */
.scene-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
}

.scene-canvas:active {
  cursor: grabbing;
}

[data-scene-flags] {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* A flag sits above and right of its anchor; the script moves it with a transform. */
.scene-flag {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  translate: 0 -100%;
  padding-inline-start: var(--s-2);
  border-inline-start: 1px solid var(--accent-line);
  color: var(--fg);
  font-family: var(--font-code);
  font-size: var(--t-label);
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}

[data-scene-counter] {
  position: absolute;
  z-index: 1;
  right: var(--s-3);
  bottom: var(--s-3);
  margin: 0;
  color: var(--fg-dim);
  font-family: var(--font-code);
  font-size: var(--t-label);
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* The poster is the plate at rest, captured with its overlays, on the plate from first paint. It
   is laid over the plate like the canvas, so the plate's box never depends on the image. On
   plates of another aspect (16:10 at phone width) it is letterboxed on the plate's own ground,
   so the baked labels are never cropped. It keeps the user agent's display, so its hidden
   attribute takes effect; the script fades it out as the live scene draws (hero-scene.ts). */
[data-poster] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* The scanner: the builder's selection outline, the plate's width, moved down by transform while
   the registration sweep plays. */
[data-scene-scanner] {
  position: absolute;
  z-index: 1;
  top: 0;
  inset-inline: 0;
  height: var(--s-7);
  border: 1px solid var(--accent-line);
  pointer-events: none;
}

/* Corner labels in the sheet's mono label grammar */
[data-scene-caption],
[data-scene-axes],
[data-scene-hint] {
  position: absolute;
  z-index: 1;
  margin: 0;
  color: var(--fg-dim);
  font: var(--t-label) / 1 var(--font-code);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

[data-scene-caption] {
  top: var(--s-3);
  left: var(--s-3);
}

[data-scene-axes] {
  top: var(--s-3);
  right: var(--s-3);
}

[data-scene-hint] {
  bottom: var(--s-3);
  left: var(--s-3);
}

/* The four corner labels sit on the plate's own ground, so a slab corner passing under one is
   masked instead of crossing the text. The fit is unchanged. */
[data-scene-caption],
[data-scene-axes],
[data-scene-hint],
[data-scene-counter] {
  padding: calc(var(--s-1) / 2) var(--s-1);
  background: var(--bg-panel);
}

/* The depth rail: three ticked layers on the plate's left edge. */
[data-scene-depth] {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: var(--s-3);
  translate: 0 -50%;
  color: var(--fg-dim);
  font: var(--t-label) / 1 var(--font-code);
  letter-spacing: 0.08em;
  pointer-events: none;
}

[data-scene-depth] ol {
  display: grid;
  gap: var(--s-5);
  margin-block-start: var(--s-3);
  padding-inline-start: var(--s-3);
  border-inline-start: 1px solid var(--rule);
}

[data-scene-depth] li {
  position: relative;
}

[data-scene-depth] li::before {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--s-3));
  width: var(--s-2);
  border-block-start: 1px solid var(--rule);
}

/* The PUBLISH flag, drawn like the scene's other flags; the domain keeps its lowercase. */
[data-scene-domain] {
  position: absolute;
  z-index: 1;
  top: calc(var(--s-3) + var(--s-6));
  left: var(--s-3);
  margin: 0;
  padding-inline-start: var(--s-2);
  border-inline-start: 1px solid var(--accent-line);
  color: var(--fg);
  font-family: var(--font-code);
  font-size: var(--t-label);
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}

/* One document, four views (paper): tall, like the pinned sequence it stands in for */

.document {
  --sheet-pad-top: var(--s-9);
  --sheet-pad-bottom: var(--s-9);
}

.projections {
  display: grid;
  gap: var(--s-9);
  margin-block-start: var(--s-9);
}

.proj {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--s-5) var(--gutter);
  align-items: end;
  padding-block-start: var(--s-4);
  border-block-start: 1px solid var(--rule);
}

.proj__plate,
.proj__text {
  grid-column: 1 / -1;
}

.proj__plate {
  padding: var(--s-4);
  background: var(--plate);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.proj__text {
  display: grid;
  gap: var(--s-3);
  max-width: 48ch;
}

.proj__title {
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.proj__body {
  color: var(--fg-dim);
  text-wrap: pretty;
}

.proj__text .label {
  color: var(--fg);
}

@media (width >= 64rem) {
  .proj__plate {
    grid-column: 6 / -1;
    grid-row: 1;
  }

  .proj__text {
    grid-column: 1 / span 4;
    grid-row: 1;
    padding-block-end: var(--s-2);
  }

  .proj:nth-child(even) .proj__plate {
    grid-column: 1 / span 7;
  }

  .proj:nth-child(even) .proj__text {
    grid-column: 9 / -1;
  }
}

/* The workspace (chrome): a dense bento of admin screenshots on 3:2 plates */

.workspace {
  --sheet-pad-top: var(--s-9);
  --sheet-pad-bottom: var(--s-8);
}

.bento {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gutter);
  margin-block-start: var(--s-8);
}

/* Rows size to their content and items sit on the row's end, so a wide tile's text lines up with
   the foot of its plate while a narrow tile simply stacks plate over text. */
.tile {
  display: grid;
  grid-column: 1 / -1;
  align-content: start;
  align-items: end;
  gap: var(--s-4);
  padding: var(--s-2);
  background: var(--plate);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

/* Each well holds a 3:2 capture of the seeded demo workspace (src/marketing/media/README.md), the
   aspect of both the admin content area and the builder column at 1280 wide. The registration
   marks belong to an empty plate only. */
.tile__slot {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.tile__slot > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile__slot:has(> img)::before,
.tile__slot:has(> img)::after {
  content: none;
}

.tile__text {
  display: grid;
  align-content: start;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-2) var(--s-3);
}

.tile__title {
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.tile__body {
  max-width: 48ch;
  color: var(--fg-dim);
  font-size: var(--t-small);
  line-height: 1.5;
  text-wrap: pretty;
}

@media (width >= 40rem) {
  .tile {
    grid-column: span 4;
  }

  .tile--lead {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

@media (width >= 64rem) {
  .tile--lead,
  .tile--end {
    grid-column: span 8;
  }

  .tile--end {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }

  .tile--end .tile__slot {
    grid-column: 2;
    grid-row: 1;
  }
}

/* From draft to publish (chrome): wide and short */

.release {
  --sheet-pad-top: var(--s-8);
  --sheet-pad-bottom: var(--s-8);
}

.release__grid {
  row-gap: var(--s-7);
}

.release__copy {
  display: grid;
  gap: var(--s-5);
}

.release__line {
  color: var(--fg-dim);
}

/* The plate holds the release-path loop (media/README.md), 16:10 like its 1440×900 footage. Its
   play control sits in the top corner, over the caption rule of the poster or the footage, never
   over the drawn rail; the registration marks belong to an empty plate only. */
.release__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--plate);
  border: 1px solid var(--rule);
}

.release__media > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.release__media:has(> video)::before,
.release__media:has(> video)::after {
  content: none;
}

.release__toggle {
  position: absolute;
  inset-block-start: var(--s-3);
  inset-inline-end: var(--s-3);
  min-height: 36px;
  padding-inline: var(--s-3);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-pill);
  background: var(--ground);
  color: var(--fg);
  font: var(--t-label) / 1 var(--font-code);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.release__toggle:hover {
  background: var(--plate);
}

.release__toggle:active {
  opacity: 0.7;
}

.release__toggle:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.steps {
  display: grid;
  counter-reset: step;
}

.step {
  position: relative;
  display: grid;
  gap: var(--s-2);
  padding: var(--s-4) 0 var(--s-4) var(--s-6);
  border-block-start: 1px solid var(--rule);
  font-size: var(--t-lede);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  counter-increment: step;
}

/* The <ol> already speaks the order; the empty alternative text keeps the drawn number silent.
   The first declaration is the fallback for engines without the alternative-text form. */
.step::before {
  content: counter(step, decimal-leading-zero);
  content: counter(step, decimal-leading-zero) / '';
}

.step::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--fg);
}

@media (width >= 40rem) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .step {
    padding: var(--s-5) var(--s-4) 0 0;
  }
}

@media (width >= 64rem) {
  .release__media {
    grid-column: 1 / span 7;
    grid-row: 1;
  }

  .release__copy {
    grid-column: 8 / -1;
    grid-row: 1;
    align-self: end;
  }
}

/* How strukt is built (paper): tall, with the copy holding still beside the figure */

.architecture {
  --sheet-pad-top: var(--s-10);
  --sheet-pad-bottom: var(--s-10);
}

.architecture__grid {
  row-gap: var(--s-8);
}

.architecture__copy {
  display: grid;
  align-content: start;
  gap: var(--s-6);
}

.architecture__figure {
  max-width: 560px;
}

@media (width >= 64rem) {
  .architecture__copy {
    position: sticky;
    top: calc(var(--masthead-h) + var(--s-7));
    grid-column: 1 / span 5;
  }

  .architecture__figure {
    grid-column: 7 / -1;
    justify-self: end;
    width: 100%;
  }
}

/* The readout under the drawing, and the part under the pointer or focus: the others step back
   and the one in hand draws its dim edges in full ink. Only opacity moves. */
.architecture__figure .readout {
  min-height: 2lh;
  margin-block-start: var(--s-4);
  text-wrap: balance;
}

.architecture__figure [data-part] {
  outline: none;
  transition: opacity 150ms ease-out;
}

.architecture__figure:has([data-part]:is(:hover, :focus-visible))
  [data-part]:not(:hover, :focus-visible) {
  opacity: 0.4;
}

.architecture__figure [data-part]:is(:hover, :focus-visible) :is(.a-mid, .a-wire) {
  stroke: var(--fg);
}

.architecture__figure [data-part]:focus-visible {
  outline: 1px solid var(--paper-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .architecture__figure [data-part] {
    transition: none;
  }
}

/* Brand meaning and everyday product questions, readable without JavaScript. */
.workspace__intro {
  max-width: 42rem;
  margin-block: var(--s-5) var(--s-6);
}

.structure__grid {
  gap: var(--s-7);
}

.structure .lede {
  margin-block-start: var(--s-5);
}

.structure__details {
  display: grid;
  align-content: start;
}

.structure details {
  padding-block: var(--s-4);
  border-block-start: 1px solid var(--rule);
}

.structure details:last-child {
  border-block-end: 1px solid var(--rule);
}

.structure summary {
  min-height: 44px;
  cursor: pointer;
  font-size: var(--t-lede);
}

.structure details p {
  margin-block-start: var(--s-3);
  color: var(--fg-dim);
  max-width: 42rem;
}

@media (width >= 64rem) {
  .structure__grid > :first-child {
    grid-column: 1 / span 5;
  }

  .structure__details {
    grid-column: 7 / -1;
  }
}

/* Beta (paper): short */

.beta {
  --sheet-pad-top: var(--s-8);
  --sheet-pad-bottom: var(--s-7);
}

.beta__grid {
  row-gap: var(--s-6);
  align-items: end;
}

.beta__act {
  display: grid;
  gap: var(--s-5);
}

@media (width >= 64rem) {
  .beta__title {
    grid-column: 1 / span 8;
  }

  .beta__act {
    grid-column: 9 / -1;
  }
}

/* Colophon: the closing statement over the title block of the whole set (cells in 20-sheet) */

.colophon {
  padding: var(--s-9) var(--margin) var(--s-6);
  background: var(--bg-app);
  color: var(--fg);
}

.colophon__statement {
  margin-block-end: var(--s-8);
}

.colophon__block > * {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: var(--s-3) var(--s-4);
}

.colophon__proof {
  color: var(--fg);
  font-size: var(--t-small);
}

.colophon__links {
  gap: 0 var(--s-5);
}

@media (width >= 64rem) {
  .colophon {
    padding-inline-start: calc(var(--margin) + var(--rail) + var(--gutter));
  }

  .colophon__block {
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  }
}
