/* Noctem Labs: site stylesheet. Layout glue + motion only, tokens only (the colours, faces and radii
   live in the noctem-labs theme, vendored under /ds/). No colour literals here: the N mark's amber and
   near-black live in its inline SVG, because the mark is the brand and is never themed. Spec: design/site/DESIGN.md.
   Sources: design/site-options/combo1/partials/_style.html (shared register + poster) and
   combo2/partials/_style.html (the home hero and the rail), merged into one state map. */

/* Self-hosted faces (latin subset from Google Fonts, SIL OFL), served from /fonts/. Archivo = variable display (weight + width axes). */
@font-face { font-family: "Archivo"; src: url("/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("/fonts/martian-mono.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

/* Layout glue + motion only. Tokens only. Durations x --ds-motion-scale.
   Stills (navigator.webdriver without ?motion), reduced motion and JS-off all render the settled register. */
:root {
  --_x-out: cubic-bezier(.16, 1, .3, 1);
  --_x-dur: calc(700ms * var(--ds-motion-scale));
  --_x-step: calc(22ms * var(--ds-motion-scale));
}
html { scroll-padding-top: calc(var(--ds-topbar-h) + var(--ds-space-6)); }
body {
  background-color: var(--ds-ground);
  /* the measurement grid: 8-unit minor lines, a stronger line every 5th */
  background-image:
    linear-gradient(var(--ds-texture-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--ds-texture-color) 1px, transparent 1px),
    linear-gradient(var(--ds-texture-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--ds-texture-color) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: -1px -1px;
  color: var(--ds-ink);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-base);
}
.x-nav { position: sticky; inset-block-start: 0; z-index: var(--ds-z-sticky); background: var(--ds-ground); }
.x-wrap { max-width: var(--ds-container-max); margin-inline: auto; padding-inline: var(--ds-gutter-page); }
.x-sec { padding-block: var(--ds-space-16); }
.x-sec + .x-sec { padding-block-start: 0; }
.x-lbl { font-family: var(--ds-font-mono); font-size: var(--ds-text-xs); font-weight: 400; letter-spacing: var(--ds-label-tracking-upper); text-transform: uppercase; color: var(--ds-ink-muted); margin: 0; line-height: var(--ds-lh-body); }
.x-mono { font-family: var(--ds-font-mono); font-variant-numeric: tabular-nums; }
.x-muted { color: var(--ds-ink-muted); }
.x-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.x-pending { font-style: italic; color: var(--ds-ink-muted); border-block-end: 1px dashed var(--ds-rule-strong); padding-block-end: 1px; }
.x-sh { margin-block-end: var(--ds-space-8); }
.x-sh .ds-section-header__eyebrow { font-family: var(--ds-font-mono); }

/* ------------------------------------------------------------------ cards + registration marks */
.x-card { position: relative; background: var(--ds-surface); border: var(--ds-border-width) solid var(--ds-rule); border-radius: var(--ds-radius-sm); padding: var(--ds-space-6); min-width: 0; }
.x-card::before, .x-card::after { content: ""; position: absolute; inline-size: var(--ds-space-3); block-size: var(--ds-space-3); border: 0 solid var(--ds-ink); pointer-events: none; }
.x-card::before { inset-block-start: calc(var(--ds-space-1) * -1); inset-inline-start: calc(var(--ds-space-1) * -1); border-block-start-width: 2px; border-inline-start-width: 2px; }
.x-card::after { inset-block-end: calc(var(--ds-space-1) * -1); inset-inline-end: calc(var(--ds-space-1) * -1); border-block-end-width: 2px; border-inline-end-width: 2px; }
.x-cat { display: flex; flex-direction: column; gap: var(--ds-space-5); }
.x-cat__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-3); padding-block-end: var(--ds-space-3); border-block-end: var(--ds-border-width) solid var(--ds-rule-strong); }
.x-cat__no { font-family: var(--ds-font-mono); font-size: var(--ds-text-lg); font-weight: var(--ds-weight-bold); letter-spacing: .04em; margin: 0; }
.x-cat__tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2); }
.x-cat__title { font-size: var(--ds-text-3xl); line-height: var(--ds-lh-tight); letter-spacing: var(--ds-display-tracking); font-weight: var(--ds-display-weight); margin: 0; overflow-wrap: anywhere; }
.x-cat__title a { color: inherit; text-decoration: none; }
.x-cat__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.x-cat--lg .x-cat__title { font-size: var(--ds-text-display-fluid); }
.x-cat__hyp { font-size: var(--ds-text-xl); line-height: var(--ds-lh-heading); color: var(--ds-ink); margin: 0; max-width: 36ch; }
.x-cat__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-3) var(--ds-space-5); padding-block-start: var(--ds-space-3); border-block-start: var(--ds-border-width) dashed var(--ds-rule-strong); }
.x-mini .x-cat__title { font-size: var(--ds-text-2xl); }
.x-mini .x-cat__hyp { font-size: var(--ds-text-lg); }
.x-fields { margin: 0; }
.x-lines { display: block; inline-size: 100%; }
.x-lines > i { display: block; block-size: var(--ds-space-6); border-block-end: 1px dashed var(--ds-rule-strong); }

/* ------------------------------------------------------------------ hero */
.x-hero { padding-block: var(--ds-space-12) var(--ds-space-16); }
.x-hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: var(--ds-space-12); align-items: start; }
.x-hero__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-3); margin-block-end: var(--ds-space-5); }
.x-hero__mark { inline-size: var(--ds-space-8); block-size: var(--ds-space-8); border-radius: var(--ds-radius-sm); flex: none; }
.x-hero h1 { font-size: clamp(var(--ds-text-2xl), 1.4rem + 3.1vw, calc(var(--ds-text-display) * 1.3)); line-height: var(--ds-lh-tight); font-weight: var(--ds-display-weight); letter-spacing: var(--ds-display-tracking); margin: 0 0 var(--ds-space-5); text-wrap: balance; }
.x-hero__voice { font-size: var(--ds-text-xl); line-height: var(--ds-lh-heading); color: var(--ds-ink-2); margin: 0 0 var(--ds-space-8); max-width: 34ch; }
.x-hero__cta { display: flex; flex-wrap: wrap; gap: var(--ds-space-3); margin-block-start: var(--ds-space-8); }
.x-tally { position: relative; padding-block: var(--ds-space-5); border-block: var(--ds-border-width) solid var(--ds-rule-strong); }
.x-tally .ds-stat-group { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--ds-space-5); row-gap: var(--ds-space-5); }
.x-tally .ds-stat__label { font-size: var(--ds-text-xs); }
.x-tally .ds-stat__value { font-family: var(--ds-font-mono); font-size: var(--ds-text-3xl); letter-spacing: -.04em; }
.x-tally .ds-stat__meta { display: flex; }

/* the index: 30 numbered cells, one per entry, coloured by state */
.x-index { position: relative; padding-block-start: var(--ds-space-5); }
.x-index__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--ds-space-2) var(--ds-space-6); margin-block-end: var(--ds-space-3); }
.x-legend { display: flex; flex-wrap: wrap; gap: var(--ds-space-2) var(--ds-space-4); list-style: none; margin: 0; padding: 0; }
.x-legend li { display: inline-flex; align-items: center; gap: var(--ds-space-2); font-family: var(--ds-font-mono); font-size: var(--ds-text-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--ds-ink-muted); }
.x-sw { display: inline-block; inline-size: var(--ds-space-3); block-size: var(--ds-space-3); border-radius: var(--ds-radius-xs); border: var(--ds-border-width) solid var(--_c, var(--ds-border-strong)); background: var(--_f, transparent); }
.x-sw[data-state="live"] { --_c: var(--ds-data-1); --_f: var(--ds-data-1-tint); }
.x-sw[data-state="parked"] { --_c: var(--ds-data-7); --_f: var(--ds-data-7-tint); }
.x-sw[data-state="buried"] { --_c: var(--ds-data-2); --_f: var(--ds-data-2-tint); }
.x-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: var(--ds-space-1); list-style: none; margin: 0; padding: 0; }
.x-cell { display: flex; flex-direction: column; justify-content: space-between; gap: var(--ds-space-1); min-block-size: var(--ds-space-12); padding: var(--ds-space-1-5) var(--ds-space-2); border: var(--ds-border-width) solid var(--_c); border-radius: var(--ds-radius-xs); background: var(--_f); color: var(--_i); text-decoration: none; min-width: 0; }
.x-cell:hover { background: var(--ds-surface); outline: 2px solid var(--_c); outline-offset: -2px; }
.x-cell[data-state="live"] { --_c: var(--ds-data-1); --_f: var(--ds-data-1-tint); --_i: var(--ds-data-1-ink); }
.x-cell[data-state="parked"] { --_c: var(--ds-data-7); --_f: var(--ds-data-7-tint); --_i: var(--ds-data-7-ink); }
.x-cell[data-state="buried"] { --_c: var(--ds-data-2); --_f: var(--ds-data-2-tint); --_i: var(--ds-data-2-ink); }
.x-cell__no { font-family: var(--ds-font-mono); font-size: var(--ds-text-xs); font-weight: var(--ds-weight-bold); letter-spacing: .04em; }
.x-cell__name { font-size: var(--ds-text-xs); line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-rule { block-size: 1px; background: var(--ds-rule-strong); transform-origin: left; }

/* ------------------------------------------------------------------ newest cards row */
.x-twin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-6); margin-block-start: var(--ds-space-6); }
.x-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-3); margin-block-end: var(--ds-space-5); color: var(--ds-ink-muted); font-size: var(--ds-text-sm); }

/* ------------------------------------------------------------------ register table <-> stacked cards */
.x-reg-cards { display: none; list-style: none; margin: 0; padding: 0; gap: var(--ds-space-3); }
.x-rc { background: var(--ds-surface); border: var(--ds-border-width) solid var(--ds-rule); border-radius: var(--ds-radius-sm); padding: var(--ds-space-4); display: flex; flex-direction: column; gap: var(--ds-space-2); min-width: 0; }
.x-rc__top { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-3); }
.x-rc__no { font-family: var(--ds-font-mono); font-size: var(--ds-text-sm); font-weight: var(--ds-weight-bold); letter-spacing: .04em; }
.x-rc__name { font-size: var(--ds-text-lg); font-weight: var(--ds-weight-semibold); letter-spacing: var(--ds-heading-tracking); overflow-wrap: anywhere; }
.x-rc__name a { color: inherit; text-decoration: none; }
.x-rc__hyp { margin: 0; color: var(--ds-ink-2); }
.x-rc__meta { display: flex; flex-wrap: wrap; gap: var(--ds-space-1) var(--ds-space-4); font-family: var(--ds-font-mono); font-size: var(--ds-text-xs); color: var(--ds-ink-muted); }
.x-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-3); margin-block-start: var(--ds-space-4); }
.x-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-4); margin-block-end: var(--ds-space-5); }
.x-tools .ds-search-input { --_w: 280px; }
.x-count { font-family: var(--ds-font-mono); font-size: var(--ds-text-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--ds-ink-muted); margin-block-end: var(--ds-space-3); }
.x-states { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ds-space-4); list-style: none; margin: 0; padding: 0; }
.x-states li { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ds-space-2); padding: var(--ds-space-4); background: var(--ds-surface); border: var(--ds-border-width) solid var(--ds-rule); border-radius: var(--ds-radius-sm); }
.x-states p { margin: 0; color: var(--ds-ink-2); font-size: var(--ds-text-sm); }

/* ------------------------------------------------------------------ failures (incident cards) */
.x-incs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-space-6); list-style: none; margin: 0; padding: 0; }
.x-inc { display: flex; flex-direction: column; gap: var(--ds-space-3); block-size: 100%; }
.x-inc__top { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-3); padding-block-end: var(--ds-space-3); border-block-end: var(--ds-border-width) dashed var(--ds-rule-strong); }
.x-inc__id { font-family: var(--ds-font-mono); font-size: var(--ds-text-xs); font-weight: var(--ds-weight-bold); letter-spacing: .08em; }
.x-inc h3 { font-size: var(--ds-text-xl); line-height: var(--ds-lh-heading); letter-spacing: var(--ds-heading-tracking); font-weight: var(--ds-heading-weight); margin: 0; }
.x-inc h3 a { color: inherit; text-decoration: none; }
.x-inc h3 a:hover { text-decoration: underline; text-underline-offset: .18em; }
.x-inc p { margin: 0; color: var(--ds-ink-2); font-size: var(--ds-text-md); }
.x-inc__foot { margin-block-start: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-2) var(--ds-space-4); padding-block-start: var(--ds-space-3); }
.x-inc time { font-family: var(--ds-font-mono); font-size: var(--ds-text-xs); color: var(--ds-ink-muted); letter-spacing: .04em; }

/* ------------------------------------------------------------------ research + night */
.x-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--ds-space-6); align-items: stretch; }
.x-study h3 { font-size: var(--ds-text-2xl); line-height: var(--ds-lh-heading); letter-spacing: var(--ds-heading-tracking); font-weight: var(--ds-heading-weight); margin: 0; }
.x-study p { margin: 0; color: var(--ds-ink-2); }
.x-night__sum { font-family: var(--ds-font-mono); font-size: var(--ds-text-lg); font-weight: var(--ds-weight-bold); margin: 0; }
.x-log { list-style: none; margin: 0; padding: 0; border-block-start: var(--ds-border-width) solid var(--ds-rule-strong); }
.x-log li { display: grid; grid-template-columns: 5.5ch minmax(0, 1fr); gap: var(--ds-space-4); align-items: baseline; padding-block: var(--ds-space-3); border-block-end: var(--ds-border-width) solid var(--ds-rule-soft); overflow-wrap: anywhere; }
.x-log time { font-family: var(--ds-font-mono); font-size: var(--ds-text-sm); font-weight: var(--ds-weight-bold); color: var(--ds-ink); }
.x-rulecta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--ds-space-6); align-items: center; }
.x-rulecta p { margin: 0; font-size: var(--ds-text-xl); line-height: var(--ds-lh-heading); max-width: 40ch; }
.x-slug { font-family: var(--ds-font-mono); font-size: var(--ds-text-md); background: var(--ds-surface-2); border: var(--ds-border-width) solid var(--ds-rule); border-radius: var(--ds-radius-xs); padding: 0 var(--ds-space-1-5); overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ page heads */
.x-head { padding-block: var(--ds-space-10) var(--ds-space-8); }
.x-head h1 { font-size: clamp(var(--ds-text-2xl), 1.2rem + 2.4vw, var(--ds-text-display)); line-height: var(--ds-lh-tight); letter-spacing: var(--ds-display-tracking); font-weight: var(--ds-display-weight); margin: var(--ds-space-4) 0 var(--ds-space-3); text-wrap: balance; }
.x-head p { margin: 0; color: var(--ds-ink-2); font-size: var(--ds-text-lg); max-width: 56ch; }

/* ------------------------------------------------------------------ experiment detail */
.x-detail { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--ds-space-8); align-items: start; }
.x-meter { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: var(--ds-space-1); inline-size: 100%; }
.x-meter i { display: block; block-size: var(--ds-space-4); border: 1px dashed var(--ds-rule-strong); border-radius: var(--ds-radius-xs); }
.x-field { display: flex; flex-direction: column; gap: var(--ds-space-2); padding-block: var(--ds-space-4); border-block-end: var(--ds-border-width) solid var(--ds-rule-soft); min-width: 0; }
.x-field:last-child { border-block-end: 0; }
.x-field__k { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-2); }
.x-field__v { font-size: var(--ds-text-lg); line-height: var(--ds-lh-heading); overflow-wrap: anywhere; }
.x-field__v--big { font-size: var(--ds-text-2xl); letter-spacing: var(--ds-heading-tracking); max-width: 30ch; }
.x-aside { display: flex; flex-direction: column; gap: var(--ds-space-6); min-width: 0; }
.x-aside h2 { font-size: var(--ds-text-md); margin: 0 0 var(--ds-space-3); font-family: var(--ds-font-mono); font-weight: var(--ds-weight-regular); letter-spacing: var(--ds-label-tracking-upper); text-transform: uppercase; color: var(--ds-ink-muted); }
.x-nb { display: flex; flex-direction: column; gap: var(--ds-space-2); list-style: none; margin: 0; padding: 0; }
.x-nb a { display: flex; align-items: baseline; gap: var(--ds-space-3); padding: var(--ds-space-2) var(--ds-space-3); border: var(--ds-border-width) solid var(--ds-rule); border-radius: var(--ds-radius-xs); background: var(--ds-surface); color: var(--ds-ink); text-decoration: none; }
.x-nb a:hover { border-color: var(--ds-ink); }
.x-nb .x-mono { font-size: var(--ds-text-xs); font-weight: var(--ds-weight-bold); color: var(--ds-ink-muted); }

/* ------------------------------------------------------------------ failure article */
.x-article { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--ds-space-12); align-items: start; }
.x-toc { position: sticky; inset-block-start: calc(var(--ds-topbar-h) + var(--ds-space-6)); display: flex; flex-direction: column; gap: var(--ds-space-5); }
.x-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: flex; flex-direction: column; border-inline-start: 1px solid var(--ds-rule-strong); }
.x-toc li { counter-increment: toc; }
.x-toc a { display: flex; gap: var(--ds-space-3); padding: var(--ds-space-1-5) var(--ds-space-3); color: var(--ds-ink-2); text-decoration: none; font-size: var(--ds-text-sm); margin-inline-start: -1px; border-inline-start: 2px solid transparent; }
.x-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--ds-font-mono); font-size: var(--ds-text-xs); color: var(--ds-ink-muted); padding-block-start: 2px; }
.x-toc a:hover { color: var(--ds-ink); border-inline-start-color: var(--ds-ink); }
.x-prose { counter-reset: sec; max-width: 68ch; min-width: 0; }
.x-prose h2 { counter-increment: sec; display: flex; align-items: baseline; gap: var(--ds-space-3); font-size: var(--ds-text-2xl); line-height: var(--ds-lh-heading); letter-spacing: var(--ds-heading-tracking); font-weight: var(--ds-heading-weight); margin: var(--ds-space-12) 0 var(--ds-space-4); padding-block-start: var(--ds-space-4); border-block-start: var(--ds-border-width) solid var(--ds-rule-strong); }
.x-prose h2:first-child { margin-block-start: 0; }
.x-prose h2::before { content: counter(sec, decimal-leading-zero); font-family: var(--ds-font-mono); font-size: var(--ds-text-sm); font-weight: var(--ds-weight-bold); color: var(--ds-ink-muted); letter-spacing: .06em; flex: none; }
.x-prose p { font-size: var(--ds-text-lg); line-height: var(--ds-lh-prose); color: var(--ds-ink-2); margin: 0 0 var(--ds-space-5); overflow-wrap: anywhere; }
.x-prose code { font-family: var(--ds-font-mono); font-size: .82em; background: var(--ds-surface-2); border: var(--ds-border-width) solid var(--ds-rule); border-radius: var(--ds-radius-xs); padding: 0 var(--ds-space-1); overflow-wrap: anywhere; color: var(--ds-ink); }
.x-kin { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-4); }

/* ------------------------------------------------------------------ footer notes */
.x-foot-notes { display: flex; flex-direction: column; gap: var(--ds-space-3); max-width: 60ch; color: var(--ds-ink-2); font-size: var(--ds-text-sm); }
.x-foot-notes p { margin: 0; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .x-hero__grid, .x-detail, .x-article { grid-template-columns: minmax(0, 1fr); }
  .x-toc { position: static; }
  .x-incs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .x-states { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .x-sec { padding-block: var(--ds-space-10); }
  .x-hero { padding-block: var(--ds-space-8) var(--ds-space-10); }
  .x-tally .ds-stat-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x-twin, .x-two, .x-incs, .x-kin, .x-states { grid-template-columns: minmax(0, 1fr); }
  .x-rulecta { grid-template-columns: minmax(0, 1fr); }
  .x-reg-wide { display: none; }
  .x-reg-cards { display: flex; flex-direction: column; }
  .x-reg-cards [hidden] { display: none; }
  .x-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .x-cell { min-block-size: var(--ds-space-10); }
  .x-cell__name { display: none; }
  .x-card { padding: var(--ds-space-4); }
  .x-tools .ds-search-input { --_w: 100%; }
  .x-tools > * { max-inline-size: 100%; }
}

/* ------------------------------------------------------------------ motion (progressive enhancement; settled by default) */
.x-js:not([data-still]) [data-draw] { transform: scaleX(0); transition: transform var(--_x-dur) var(--_x-out); }
.x-js:not([data-still]) [data-draw][data-in] { transform: scaleX(1); }
.x-js:not([data-still]) .x-cell { opacity: 0; transform: translateY(6px); transition: opacity var(--_x-dur) var(--_x-out), transform var(--_x-dur) var(--_x-out); transition-delay: calc(var(--i, 0) * var(--_x-step)); }
.x-js:not([data-still]) .x-grid[data-in] .x-cell { opacity: 1; transform: none; }
.x-js:not([data-still]) [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity var(--_x-dur) var(--_x-out), transform var(--_x-dur) var(--_x-out); }
.x-js:not([data-still]) [data-reveal][data-in] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .x-js [data-draw], .x-js .x-cell, .x-js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}


/* ================================================================== the poster voice (combo1): inner pages
   One state map (theme data-1 / data-7 / data-2) drives poster fields, chips, cells, tally and rail nodes. */
[data-state="live"]   { --_f: var(--ds-data-1); --_fi: var(--ds-data-1-ink); --_ft: var(--ds-data-1-tint); }
[data-state="parked"] { --_f: var(--ds-data-7); --_fi: var(--ds-data-7-ink); --_ft: var(--ds-data-7-tint); }
[data-state="buried"] { --_f: var(--ds-data-2); --_fi: var(--ds-data-2-ink); --_ft: var(--ds-data-2-tint); }
[data-state="idea"], [data-state="none"] { --_f: var(--ds-ink); --_fi: var(--ds-ink); --_ft: var(--ds-surface-2); }
:root { --_pdur: calc(900ms * var(--ds-motion-scale)); }
.x-state { font-weight: var(--ds-weight-semibold); }
h1, h2, h3, .x-cat__title { font-family: var(--ds-font-display); }
body:not([data-page="home"]) .x-sh { --ds-text-title-section: clamp(2.2rem, 1rem + 4.4vw, 4.8rem); --ds-heading-weight: 800; --ds-heading-tracking: var(--ds-display-tracking); }
body:not([data-page="home"]) .x-sh .ds-section-header__title { font-stretch: 90%; line-height: .95; text-wrap: balance; }
.x-sh .ds-section-header__eyebrow { color: var(--ds-ink-2); }
.x-head h1 { font-weight: 800; font-stretch: 90%; }
.x-head h1 { font-size: clamp(2.6rem, 1rem + 7vw, 7rem); line-height: var(--ds-lh-tight); }

/* ---------- the poster stage (experiment page): full-bleed state field ---------- */
.x-stage { position: relative; isolation: isolate; overflow: clip; background: var(--ds-ground); color: var(--ds-ink); transition: background-color var(--_pdur) var(--_x-out), color var(--_pdur) var(--_x-out); }
.x-stage[data-resolved] { background: var(--_f); color: var(--ds-ground); }
.x-stage[data-state="none"][data-resolved] { background: var(--ds-ground); color: var(--ds-ink); }
.x-stage__in { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; min-block-size: min(calc(100svh - var(--ds-topbar-h)), 60rem); padding-block: var(--ds-space-6) var(--ds-space-8); gap: var(--ds-space-6); }
.x-stage--entry .x-stage__in { grid-template-rows: auto 1fr; min-block-size: min(calc(100svh - var(--ds-topbar-h) - var(--ds-space-16)), 46rem); }
.x-stage__top { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-4); flex-wrap: wrap; }
.x-onfield-lbl { color: inherit; }
.x-stage .ds-breadcrumb { --ds-ink-muted: currentColor; --ds-ink: currentColor; --ds-ink-link: currentColor; color: inherit; }
.x-stage .ds-breadcrumb a, .x-stage .ds-breadcrumb__leaf { color: inherit; }
.x-slides { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; list-style: none; margin: 0; padding: 0; }
.x-ps { grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: center; gap: var(--ds-space-10); visibility: hidden; min-inline-size: 0; }
.x-ps[data-active] { visibility: visible; }
.x-ps__name { font-family: var(--ds-font-display); font-weight: 800; font-stretch: 90%; font-size: clamp(1.6rem, 3.2vw, 3rem); line-height: 1; letter-spacing: var(--ds-display-tracking); margin: 0; overflow-wrap: anywhere; }
.x-ps__why { flex-basis: 100%; font-size: var(--ds-text-lg); max-inline-size: 48ch; }
.x-sent { font-family: var(--ds-font-display); font-size: clamp(2.3rem, 6.9vw, 7.1rem); line-height: .92; letter-spacing: var(--ds-display-tracking); word-spacing: .05em; font-weight: 300; font-stretch: 112%; text-wrap: balance; margin: 0; max-inline-size: 22ch; transition: font-weight var(--_pdur) var(--_x-out), font-stretch var(--_pdur) var(--_x-out); }
.x-stage[data-resolved] .x-sent { font-weight: 800; font-stretch: 90%; }
.x-stage--entry .x-sent { font-size: clamp(2.3rem, 6.2vw, 6.4rem); }
.x-stage[data-state="none"] .x-sent { max-inline-size: 15ch; }
.x-w { display: inline-block; }
.x-resolve { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-3) var(--ds-space-6); opacity: 0; transform: translateY(var(--ds-space-3)); transition: opacity var(--_pdur) var(--_x-out), transform var(--_pdur) var(--_x-out); }
.x-stage[data-resolved] .x-resolve { opacity: 1; transform: none; }
.x-resolve .ds-enum-chip { --_h: calc(var(--ds-space-8) + var(--ds-space-1)); font-family: var(--ds-font-display); font-weight: 800; font-stretch: 100%; font-size: clamp(1.15rem, 2.2vw, 2rem); --_pad-x: var(--ds-space-4); text-transform: none; color: var(--ds-ink); }
.x-resolve .ds-enum-chip__icon { inline-size: 1.2em; block-size: 1.2em; color: var(--_f); }
.x-resolve__who { font-family: var(--ds-font-mono); font-size: var(--ds-text-sm); margin: 0; overflow-wrap: anywhere; }
.x-resolve__who a, .x-stage a { color: inherit; }
.x-resolve__line { font-family: var(--ds-font-display); font-weight: 600; font-stretch: 100%; font-size: clamp(1.1rem, 2.2vw, 1.9rem); line-height: 1.15; max-inline-size: 44ch; margin: 0; }
.x-stage__foot { display: grid; gap: var(--ds-space-3); }
@keyframes x-in { from { opacity: 0; transform: translateY(.28em); } to { opacity: 1; transform: none; } }
html.x-js:not([data-still]) .x-ps[data-fresh] .x-w { animation: x-in calc(700ms * var(--ds-motion-scale)) var(--_x-out) both; animation-delay: calc(var(--_i) * 45ms * var(--ds-motion-scale)); }
.x-more { margin-block-start: var(--ds-space-8); }
.x-night__sum { font-family: var(--ds-font-display); font-weight: 800; font-stretch: 90%; font-size: var(--ds-text-2xl); }
/* ---------- experiment page ---------- */
.x-detail { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.x-prose h2 { font-weight: 800; font-stretch: 90%; }

@media (max-width: 1100px) {
  .x-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .x-resolve .ds-enum-chip { --_pad-x: var(--ds-space-3); font-size: var(--ds-text-md); }
  .x-resolve { gap: var(--ds-space-3); }
  .x-stage__in, .x-stage--entry .x-stage__in { min-block-size: 0; }
  .x-sent, .x-stage--entry .x-sent { font-size: clamp(2.1rem, 11.5vw, 3.4rem); }
}
@media (prefers-reduced-motion: reduce) {
  .x-resolve, .x-sent, .x-stage { transition: none; }
}

/* ================================================================== the home (combo2 "clean register", re-expressed in noctem-labs)
   C's behaviour (real hypotheses at poster size, each resolving into its state) on B's grid, with the
   state shown by the same chip + colour + shape map as every other page. Classes are .x-h* so they
   never collide with the experiment page's poster stage. */
.x-hstage { padding-block: var(--ds-space-8) var(--ds-space-10); border-block-end: var(--ds-border-width) solid var(--ds-rule-strong); }
.x-hstage__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-4); margin-block-end: var(--ds-space-10); }
.x-hero__eyebrow { margin-block-end: 0; }
.x-h1 { font-family: var(--ds-font-sans); font-size: var(--ds-text-lg); line-height: var(--ds-lh-heading); font-weight: var(--ds-weight-semibold); letter-spacing: var(--ds-heading-tracking); margin: 0; }
.x-h1 span { font-family: var(--ds-font-mono); font-size: var(--ds-text-xs); font-weight: 400; letter-spacing: var(--ds-label-tracking-upper); text-transform: uppercase; color: var(--ds-ink-muted); }
.x-ctl { display: flex; gap: var(--ds-space-1); }
.x-dot { appearance: none; background: transparent; border: 0; padding: var(--ds-space-2) 0; cursor: pointer; inline-size: var(--ds-space-8); }
.x-dot span { display: block; block-size: 3px; background: var(--ds-rule-strong); transition: background var(--ds-dur-base) var(--ds-ease-out); }
.x-dot[aria-current="true"] span { background: var(--ds-ink); }
.x-dot:hover span { background: var(--ds-ink-muted); }
.x-dot:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 2px; }
.x-pstack { list-style: none; margin: 0; padding: 0; display: grid; }
.x-hps { grid-area: 1 / 1; visibility: hidden; display: flex; flex-direction: column; gap: var(--ds-space-6); min-width: 0; }
.x-hps[data-active] { visibility: visible; }
.x-hps__code { display: flex; align-items: center; gap: var(--ds-space-3); }
.x-hps__code::before { content: ""; inline-size: var(--ds-space-8); block-size: 1px; background: var(--_f); }
.x-hps__sent { margin: 0; font-family: var(--ds-font-display); font-size: clamp(2.1rem, 1.1rem + 4.7vw, 5.9rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 650; text-wrap: balance; max-inline-size: 21ch; overflow-wrap: break-word; transition: font-weight calc(900ms * var(--ds-motion-scale)) var(--_x-out), letter-spacing calc(900ms * var(--ds-motion-scale)) var(--_x-out); }
.x-hps[data-state="none"] .x-hps__sent { max-inline-size: 18ch; }
.x-hps__res { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-3) var(--ds-space-6); padding-block-start: var(--ds-space-5); border-block-start: 2px solid var(--_f); max-inline-size: 52rem; }
.x-hps__stamp { flex: none; }
.x-hps__line { margin: 0; font-family: var(--ds-font-mono); font-size: var(--ds-text-lg); font-weight: var(--ds-weight-bold); letter-spacing: -.01em; }
.x-hps__who { margin: 0; font-family: var(--ds-font-mono); font-size: var(--ds-text-sm); overflow-wrap: anywhere; }
.x-hps__why { margin: 0; flex-basis: 100%; display: flex; flex-direction: column; gap: 2px; color: var(--ds-ink-2); font-size: var(--ds-text-md); max-inline-size: 60ch; }
.x-hstage__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-4) var(--ds-space-8); margin-block-start: var(--ds-space-10); }
.x-hero__line { margin: 0; font-size: var(--ds-text-xl); line-height: var(--ds-lh-heading); color: var(--ds-ink-2); max-inline-size: 36ch; }
.x-hstage__foot .x-hero__cta { margin: 0; }
.x-sec--tight { padding-block: var(--ds-space-10); }
.x-cell[data-state="idea"] { --_c: var(--ds-border-strong); --_f: var(--ds-surface-2); --_i: var(--ds-ink); }
.x-sw[data-state="idea"] { --_c: var(--ds-border-strong); --_f: var(--ds-surface-2); }

/* ---------- the latest entries: A's time rail with state nodes, drawn in the register's marks ---------- */
.x-rail { list-style: none; margin: 0; padding: 0; --_rail: 8.5rem; --_node: 16px; }
.x-ent { display: grid; grid-template-columns: var(--_rail) minmax(0, 1fr); position: relative; }
.x-ent__time { text-align: end; padding-inline-end: var(--ds-space-6); padding-block-start: var(--ds-space-2); font-family: var(--ds-font-mono); font-size: var(--ds-text-xs); color: var(--ds-ink-muted); line-height: 1.45; }
.x-ent__kicker { display: block; text-transform: uppercase; letter-spacing: var(--ds-label-tracking-upper); margin-block-end: 2px; }
.x-ent__time time { display: flex; flex-direction: column; align-items: flex-end; }
.x-ent__time time b { font-weight: var(--ds-weight-bold); font-size: var(--ds-text-sm); color: var(--ds-ink); font-variant-numeric: tabular-nums; }
.x-ent__nodate { display: block; color: var(--ds-ink-muted); }
.x-ent__body { position: relative; padding-inline-start: var(--ds-space-8); padding-block-end: var(--ds-space-10); border-inline-start: 2px solid var(--ds-rule-strong); min-inline-size: 0; display: flex; flex-direction: column; gap: var(--ds-space-2); align-items: flex-start; }
.x-ent__body::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: -12px; inline-size: 10px; pointer-events: none;
  background: repeating-linear-gradient(to bottom, var(--ds-ink-faint) 0 1px, transparent 1px 64px) right / 10px 100% no-repeat,
              repeating-linear-gradient(to bottom, var(--ds-rule-strong) 0 1px, transparent 1px 16px) right / 5px 100% no-repeat; }
.x-ent:last-child > .x-ent__body { border-inline-start-color: transparent; padding-block-end: 0; }
.x-ent:last-child > .x-ent__body::before { display: none; }
/* one node shape per state, the same map as the chip glyphs: live dot, parked half (pause), buried square, idea dashed ring */
.x-node { position: absolute; inset-block-start: var(--ds-space-2); inset-inline-start: calc(var(--_rail) - (var(--_node) / 2) + 1px); inline-size: var(--_node); block-size: var(--_node); background: var(--ds-ground); border: 2px solid var(--ds-ink-faint); z-index: 1; border-radius: var(--ds-radius-pill); box-sizing: border-box; }
.x-node[data-state="live"] { background: var(--_f); border-color: var(--_f); box-shadow: 0 0 0 4px var(--_ft); }
.x-node[data-state="parked"] { border-color: var(--_f); background: linear-gradient(90deg, var(--_f) 50%, var(--ds-ground) 50%); }
.x-node[data-state="buried"] { border-radius: var(--ds-radius-xs); background: var(--_f); border-color: var(--_f); }
.x-node[data-state="idea"] { border-style: dashed; border-color: var(--ds-ink-muted); }
.x-ent__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2) var(--ds-space-3); }
.x-ent__no { font-size: var(--ds-text-sm); }
.x-ent__name { margin: 0; font-size: var(--ds-text-3xl); line-height: var(--ds-lh-tight); letter-spacing: var(--ds-display-tracking); font-weight: var(--ds-display-weight); overflow-wrap: anywhere; }
.x-ent__name a { color: inherit; text-decoration: none; }
.x-ent__name a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.x-ent--first .x-ent__name { font-size: var(--ds-text-display-fluid); }
.x-ent__hyp { margin: 0; font-size: var(--ds-text-lg); line-height: var(--ds-lh-heading); color: var(--ds-ink); max-inline-size: 44ch; }
.x-ent--first .x-ent__hyp { font-size: var(--ds-text-xl); }
.x-ent__why { margin: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ds-ink-2); font-size: var(--ds-text-md); max-inline-size: 56ch; }
.x-ent__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2) var(--ds-space-6); margin-block-start: var(--ds-space-2); font-size: var(--ds-text-sm); }
.x-ent--more .x-ent__body { padding-block-start: var(--ds-space-2); }
@media (max-width: 760px) {
  .x-rail { --_rail: 0px; }
  .x-ent { grid-template-columns: minmax(0, 1fr); margin-inline-start: 7px; padding-inline-start: var(--ds-space-5); border-inline-start: 2px solid var(--ds-rule-strong); }
  .x-ent:last-child { border-inline-start-color: transparent; }
  .x-ent__body { border-inline-start: 0; padding-inline-start: 0; padding-block-end: var(--ds-space-8); }
  .x-ent__body::before { display: none; }
  .x-ent__time { text-align: start; padding: 0 0 var(--ds-space-1); display: flex; flex-wrap: wrap; gap: var(--ds-space-1) var(--ds-space-2); align-items: baseline; }
  .x-ent__kicker { margin: 0; }
  .x-ent__time time { flex-direction: row; align-items: baseline; gap: var(--ds-space-1); }
  .x-node { inset-inline-start: -28px; inset-block-start: 2px; }
  .x-hstage { padding-block: var(--ds-space-5) var(--ds-space-8); }
  .x-hstage__top { margin-block-end: var(--ds-space-6); }
  .x-hps { gap: var(--ds-space-4); }
  .x-hstage__foot { margin-block-start: var(--ds-space-6); }
  .x-ent__name, .x-ent--first .x-ent__name { font-size: var(--ds-text-2xl); }
  .x-dot { inline-size: var(--ds-space-5); }
}

/* ---------- home hero motion: each hypothesis resolves into its state. Settled by default (stills, reduced motion, JS off). */
@media (prefers-reduced-motion: no-preference) {
  .x-js:not([data-still]):not([data-ambient="off"]) .x-hstage:not([data-resolved]) .x-hps__sent { font-weight: 400; letter-spacing: -.005em; }
  .x-js:not([data-still]):not([data-ambient="off"]) .x-hstage:not([data-resolved]) .x-hps__res { opacity: 0; transform: translateY(10px); }
  .x-js:not([data-still]):not([data-ambient="off"]) .x-hstage:not([data-resolved]) .x-hps__stamp { transform: scale(1.5); }
  .x-js:not([data-still]):not([data-ambient="off"]) .x-hps__res { transition: opacity calc(600ms * var(--ds-motion-scale)) var(--_x-out), transform calc(600ms * var(--ds-motion-scale)) var(--_x-out); }
  .x-js:not([data-still]):not([data-ambient="off"]) .x-hps__stamp { transition: transform calc(500ms * var(--ds-motion-scale)) var(--_x-out); }
  .x-js:not([data-still]):not([data-ambient="off"]) .x-hps[data-fresh] .x-w { animation: x-in calc(700ms * var(--ds-motion-scale)) var(--_x-out) both; animation-delay: calc(var(--_i) * 45ms * var(--ds-motion-scale)); }
}

/* ================================================================== pages the prototypes did not draw (same system) */
.x-prose--plain { counter-reset: none; }
.x-prose--plain h2 { display: block; }
.x-prose--plain h2::before { content: none; }
.x-prose ul, .x-prose ol { font-size: var(--ds-text-lg); line-height: var(--ds-lh-prose); color: var(--ds-ink-2); margin: 0 0 var(--ds-space-5); padding-inline-start: var(--ds-space-6); }
.x-prose li { margin-block-end: var(--ds-space-2); overflow-wrap: anywhere; }
.x-prose h3, .x-prose h4 { font-size: var(--ds-text-xl); line-height: var(--ds-lh-heading); letter-spacing: var(--ds-heading-tracking); margin: var(--ds-space-8) 0 var(--ds-space-3); }
.x-prose a, .x-foot-notes a { color: var(--ds-ink-link, var(--ds-accent-ink)); text-underline-offset: .18em; }
.x-prose pre, .x-symptom pre { margin: 0 0 var(--ds-space-5); padding: var(--ds-space-4); background: var(--ds-surface-2); border: var(--ds-border-width) solid var(--ds-rule); border-radius: var(--ds-radius-sm); overflow-x: auto; max-inline-size: 100%; }
.x-prose pre code, .x-symptom pre code { background: none; border: 0; padding: 0; font-family: var(--ds-font-mono); font-size: var(--ds-text-sm); line-height: var(--ds-lh-body); color: var(--ds-ink); white-space: pre; overflow-wrap: normal; }
.x-symptom { margin-block-end: var(--ds-space-10); }
.x-symptom pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
.x-symptom .x-lbl { margin-block-end: var(--ds-space-2); }
.x-evidence { margin-block-start: var(--ds-space-10); padding-block-start: var(--ds-space-4); border-block-start: var(--ds-border-width) dashed var(--ds-rule-strong); color: var(--ds-ink-muted); font-size: var(--ds-text-sm); max-width: 68ch; }
.x-evidence code { font-family: var(--ds-font-mono); font-size: .9em; overflow-wrap: anywhere; }
.x-single { padding-block-end: var(--ds-space-16); }
.x-single .x-prose { max-width: 68ch; }
.x-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ds-space-2); max-width: 40rem; }
.x-links a { display: flex; justify-content: space-between; gap: var(--ds-space-3); padding: var(--ds-space-3) var(--ds-space-4); background: var(--ds-surface); border: var(--ds-border-width) solid var(--ds-rule); border-radius: var(--ds-radius-xs); color: var(--ds-ink); text-decoration: none; }
.x-links a:hover { border-color: var(--ds-ink); }
.x-links .x-muted { font-size: var(--ds-text-sm); }
.x-studies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-6); list-style: none; margin: 0; padding: 0; }
.x-keynums { list-style: none; margin: 0 0 var(--ds-space-5); padding: 0; display: grid; gap: var(--ds-space-3); }
.x-keynums li { padding: var(--ds-space-4); background: var(--ds-surface); border: var(--ds-border-width) solid var(--ds-rule); border-inline-start: 4px solid var(--ds-accent); border-radius: var(--ds-radius-xs); font-size: var(--ds-text-lg); line-height: var(--ds-lh-heading); color: var(--ds-ink); }
.x-cite { font-family: var(--ds-font-mono); font-size: var(--ds-text-sm); background: var(--ds-surface-2); border: var(--ds-border-width) solid var(--ds-rule); border-radius: var(--ds-radius-xs); padding: var(--ds-space-3); overflow-wrap: anywhere; color: var(--ds-ink); }
.x-nights { display: grid; gap: var(--ds-space-6); }
.x-log a { color: inherit; }
.x-draftbar { background: var(--ds-warning-tint); color: var(--ds-warning-ink); border-block-end: var(--ds-border-width) solid var(--ds-warning); }
.x-draftbar p { margin: 0; padding-block: var(--ds-space-2); font-family: var(--ds-font-mono); font-size: var(--ds-text-xs); letter-spacing: .06em; text-transform: uppercase; }
.x-stage .x-pending { color: inherit; opacity: .8; border-block-end-color: currentColor; }
.x-tools[hidden] { display: none; }
@media (max-width: 760px) {
  .x-studies { grid-template-columns: minmax(0, 1fr); }
}
.x-sent__lbl { margin: var(--ds-space-6) 0 var(--ds-space-2); }

.x-night__sub { font-family: var(--ds-font-mono); font-size: var(--ds-text-sm); margin: var(--ds-space-4) 0 var(--ds-space-2); opacity: .8; }
.x-night__total { margin: 0 0 var(--ds-space-4); opacity: .8; }
.x-night .x-log li { grid-template-columns: minmax(0, 1fr); }

/* ------------------------------------------------------------------ classified entries */
/* "Top secret" is the danger-tone stamp (theme tokens, so it follows light/dark) set in mono caps. */
.x-topsecret { font-family: var(--ds-font-mono); font-weight: var(--ds-weight-bold); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.x-resolve__who .x-topsecret, .x-hps__res .x-topsecret { margin-block-start: var(--ds-space-2); }
.x-redacted { font-family: var(--ds-font-mono); font-size: .95em; letter-spacing: .04em; color: var(--ds-ink-2); border-block-end: 3px solid var(--ds-ink); padding-block-end: 1px; }
