/* =====================================================================
   IDK — brand guidelines site styles
   Contract: SITE.md (single-page scroll, sidebar nav, print-ready).
   Taste: CRAFT.md. Every brand value comes from tokens.css.
   ===================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--lobby);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--dur-normal) var(--ease-surface),
              color var(--dur-normal) var(--ease-surface);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 var(--sp-3);
  max-width: 65ch;
}

a {
  color: var(--verdigris-deep);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--verdigris) 40%, transparent);
  transition: border-color var(--dur-fast) var(--ease-surface);
}
a:hover { border-bottom-color: var(--verdigris-deep); }

:focus-visible {
  outline: 2px solid var(--biolume);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--gold);
  color: var(--abyss);
}

.skip-link {
  position: absolute;
  left: var(--sp-3);
  top: -48px;
  z-index: 20;
  background: var(--abyss);
  color: var(--foam);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  border: none;
}
.skip-link:focus { top: var(--sp-3); }

/* ===== Shell: fixed sidebar + main =================================== */
.shell {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-4);
  border-right: var(--border);
  background: var(--lobby);
  overflow-y: auto;
}

.sidebar__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
  border: none;
}
.sidebar__mark .dot { color: var(--gold); }

.toc {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc a {
  display: flex;
  gap: var(--sp-2);
  align-items: baseline;
  padding: 6px var(--sp-2);
  border: none;
  border-radius: var(--r-sm);
  color: var(--ink-soft);
  font-size: var(--text-body-sm);
  line-height: 1.3;
  transition: background-color var(--dur-fast) var(--ease-surface),
              color var(--dur-fast) var(--ease-surface);
}
.toc a:hover { background: var(--surface); color: var(--ink); }
.toc a.active { background: var(--surface); color: var(--ink); }
.toc a.active .toc__num { color: var(--gold-deep); }
.toc__num {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--muted);
  min-width: 1.6em;
}

/* Dial + actions */
.dial {
  border-top: var(--border);
  padding-top: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.dial__label {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.dial input[type="range"] {
  width: 100%;
  accent-color: var(--verdigris);
  cursor: pointer;
}
.dial__stop {
  font-size: var(--text-caption);
  color: var(--ink-soft);
  min-height: 2.4em;
}
.dial__stop strong {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.06em;
  color: var(--ink);
}

.btn-pdf {
  font: inherit;
  font-size: var(--text-body-sm);
  font-family: var(--font-mono);
  padding: var(--sp-2) var(--sp-3);
  background: var(--abyss);
  color: var(--foam);
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-surface);
}
.btn-pdf:hover { background: var(--verdigris-deep); }

/* Mobile nav */
.nav-toggle {
  display: none;
  position: fixed;
  top: var(--sp-3);
  right: var(--sp-3);
  z-index: 15;
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  padding: var(--sp-2) var(--sp-3);
  background: var(--abyss);
  color: var(--foam);
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0;
    z-index: 14;
    height: 100dvh;
    width: min(320px, 85vw);
    transform: translateX(-100%);
    transition: transform var(--dur-normal) var(--ease-tide);
    box-shadow: var(--sh-3);
  }
  .sidebar.open { transform: translateX(0); }
  .nav-toggle { display: block; }
}

/* ===== Sections ====================================================== */
.sec {
  padding: var(--section-pad) clamp(var(--sp-4), 5vw, var(--sp-7));
}
.sec__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.sec--warm { background: var(--surface); }
.sec--dark {
  background: var(--abyss);
  color: var(--foam);
}
.sec--dark p { color: var(--foam-soft); }
.sec--dark a { color: var(--biolume); border-bottom-color: color-mix(in srgb, var(--biolume) 40%, transparent); }

/* Divider: hairline with the gold period — the mark's punctuation
   carried into the document's rhythm. */
.pdiv {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(var(--sp-4), 5vw, var(--sp-7));
}
.pdiv::before,
.pdiv::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.pdiv span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

/* Section header pattern */
.sec-head { margin-bottom: var(--sp-6); max-width: var(--max-w-narrow); }
.sec-head__num {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.1em;
  color: var(--gold-deep);
}
.sec--dark .sec-head__num { color: var(--gold); }
.sec-head h2 {
  font-size: var(--text-h1);
  font-weight: 600;
  margin: var(--sp-2) 0 var(--sp-3);
}
.sec-head__sub {
  font-size: var(--text-body-lg);
  color: var(--ink-soft);
}
.sec--dark .sec-head__sub { color: var(--foam-soft); }
.sec-head__meta {
  margin-top: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.06em;
  color: var(--muted);
}
.sec--dark .sec-head__meta { color: var(--foam-soft); opacity: 0.75; }
.sec-head__meta .status { color: var(--gold-deep); }
.sec--dark .sec-head__meta .status { color: var(--gold); }

h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  margin: var(--sp-6) 0 var(--sp-3);
}
h4 {
  font-size: var(--text-h4);
  font-weight: 600;
  margin: var(--sp-4) 0 var(--sp-2);
}

.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-5) var(--sp-6);
  align-items: start;
}
@media (max-width: 900px) { .duo { grid-template-columns: 1fr; } }

/* ===== Cover ========================================================= */
.cover {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--gradient-descent);
  color: var(--foam);
}
.cover .sec__inner { width: 100%; }
.cover__mark {
  font-family: var(--font-display);
  font-size: clamp(5rem, 16vw, 12rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.cover__mark .dot { color: var(--gold); }
.cover__title {
  margin-top: var(--sp-4);
  font-size: var(--text-body-lg);
  color: var(--foam-soft);
  font-family: var(--font-mono);
}
.cover__meta {
  margin-top: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--foam-soft);
  opacity: 0.7;
}
.cover__toc {
  margin-top: var(--sp-6);
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: var(--sp-6);
  max-width: 760px;
}
.cover__toc li { break-inside: avoid; }
.cover__toc a {
  display: flex;
  gap: var(--sp-3);
  align-items: baseline;
  padding: 7px 0;
  border: none;
  border-bottom: 1px solid var(--rule-dark);
  color: var(--foam);
  font-size: var(--text-body-sm);
}
.cover__toc a:hover { color: var(--biolume); }
.cover__toc .toc__num { color: var(--foam-soft); opacity: 0.7; }
@media (max-width: 720px) { .cover__toc { columns: 1; } }

/* ===== Overview ====================================================== */
.adjectives {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--sp-6);
}
.adjectives > div {
  padding: var(--sp-3) 0;
  border-bottom: var(--border);
}
.adjectives dt {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: 600;
}
.adjectives dd {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-body-sm);
}
@media (max-width: 720px) { .adjectives { grid-template-columns: 1fr; } }

.principles {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: pr;
  max-width: var(--max-w-narrow);
}
.principles li {
  counter-increment: pr;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  border-bottom: var(--border);
}
.principles li::before {
  content: counter(pr, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--gold-deep);
  padding-top: 5px;
}
.principles span { grid-column: 2; }
.principles strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: 600;
  margin-bottom: 2px;
}
.principles span { color: var(--ink-soft); font-size: var(--text-body-sm); }

/* ===== Logo ========================================================== */
.mark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1;
}
.mark .dot { color: var(--gold); }

.mark-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-3);
}
@media (max-width: 900px) { .mark-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mark-tile {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-lg);
  border: var(--border);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.mark-tile--lobby { background: var(--lobby); color: var(--ink); }
.mark-tile--abyss { background: var(--abyss); color: var(--foam); border-color: var(--abyss); }
.mark-tile--verdigris { background: var(--verdigris-deep); color: var(--foam); border-color: var(--verdigris-deep); }
.mark-tile--mono .dot { color: currentColor; }
.mark-figure { margin: 0; }
.mark-figure figcaption {
  margin-top: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Clear space diagram */
.clearspace {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2.2rem;
  border: 1px dashed var(--verdigris);
  border-radius: var(--r-sm);
  background: var(--surface);
  position: relative;
}
.clearspace .mark { font-size: 2.6rem; outline: 1px dotted var(--rule); }
.clearspace__unit {
  position: absolute;
  top: 6px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--verdigris-deep);
}

.minsize-row {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-6);
}
.minsize-row .mark { display: block; }

/* Do / don't grid */
.dd {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}
@media (max-width: 720px) { .dd { grid-template-columns: 1fr; } }
.dd ul {
  margin: 0;
  padding: var(--sp-4);
  list-style: none;
  border: var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.sec--dark .dd ul { background: var(--deep-surface); border-color: var(--rule-dark); }
.dd li {
  display: grid;
  grid-template-columns: 1.4em minmax(0, 1fr);
  gap: var(--sp-2);
  font-size: var(--text-body-sm);
  color: var(--ink-soft);
}
.sec--dark .dd li { color: var(--foam-soft); }
.dd li::before {
  font-family: var(--font-mono);
  font-weight: 500;
}
.dd .dd__head { display: block; }
.dd .dd__head::before { content: none; }
.dd--do li::before { content: "✓"; color: var(--verdigris-deep); }
.dd--dont li::before { content: "✕"; color: var(--gold-deep); }
.sec--dark .dd--do li::before { color: var(--biolume); }
.sec--dark .dd--dont li::before { color: var(--gold); }
.dd h4 { margin: 0 0 var(--sp-2); }

/* ===== Color ========================================================= */
.swatch-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
}
.swatch-row--structural { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .swatch-row, .swatch-row--structural { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.swatch {
  border: var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.swatch__chip { height: 108px; }
.swatch--primary .swatch__chip { height: 168px; }
.swatch__info {
  padding: var(--sp-3);
  background: var(--lobby);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.swatch__name { font-family: var(--font-display); font-weight: 600; }
.swatch__hex {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--muted);
}
.swatch__role { font-size: var(--text-caption); color: var(--ink-soft); }

.gradient-strip {
  height: 88px;
  border-radius: var(--r-lg);
  background: var(--gradient-descent);
  border: var(--border);
}

/* Spec tables (color pairs, hierarchy, durations, shadows) */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-body-sm);
}
.spec-table caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: var(--sp-2);
}
.spec-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: var(--sp-2) var(--sp-3) var(--sp-2) 0;
  border-bottom: var(--border);
}
.spec-table td {
  padding: var(--sp-2) var(--sp-3) var(--sp-2) 0;
  border-bottom: var(--border);
  vertical-align: middle;
  color: var(--ink-soft);
}
.sec--dark .spec-table td { color: var(--foam-soft); border-color: var(--rule-dark); }
.sec--dark .spec-table th { border-color: var(--rule-dark); }
.spec-table .pass { color: var(--verdigris-deep); font-family: var(--font-mono); font-size: var(--text-caption); }
.spec-table .fail { color: var(--gold-deep); font-family: var(--font-mono); font-size: var(--text-caption); }

.pair-demo {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--r-sm);
  font-size: var(--text-body-sm);
}

/* ===== Typography ==================================================== */
.type-toggle {
  display: inline-flex;
  gap: 0;
  border: var(--border);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-bottom: var(--sp-4);
}
.type-toggle button {
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  padding: 7px var(--sp-3);
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.type-toggle button[aria-pressed="true"] {
  background: var(--abyss);
  color: var(--foam);
}

.pairing-specimen {
  border: var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  background: var(--surface);
}
.pairing-specimen .spec-display {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 600;
  margin-bottom: var(--sp-3);
}
.pairing-specimen .spec-body { color: var(--ink-soft); }
.pairing-specimen .spec-mono {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--verdigris-deep);
}

.hier-hero { font-family: var(--font-display); font-size: var(--text-hero); font-weight: 700; line-height: 1.02; }
.hier-h1 { font-family: var(--font-display); font-size: var(--text-h1); font-weight: 600; }
.hier-h2 { font-family: var(--font-display); font-size: var(--text-h2); font-weight: 600; }
.hier-h3 { font-family: var(--font-display); font-size: var(--text-h3); font-weight: 600; }
.hier-h4 { font-family: var(--font-display); font-size: var(--text-h4); font-weight: 600; }
.hier-body-lg { font-size: var(--text-body-lg); }
.hier-body { font-size: var(--text-body); }
.hier-body-sm { font-size: var(--text-body-sm); }
.hier-caption { font-size: var(--text-caption); color: var(--muted); }
.hier-label {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ===== Iconography =================================================== */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--sp-3);
}
@media (max-width: 900px) { .icon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.icon-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  border: var(--border);
  border-radius: var(--r-md);
  background: var(--lobby);
  color: var(--ink);
}
.icon-cell svg { width: 24px; height: 24px; }
.icon-cell figcaption {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--muted);
}

/* ===== Abstract art studies (section 06, dark) ======================= */
.plates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
}
@media (max-width: 900px) { .plates { grid-template-columns: 1fr; } }
.plate {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--rule-dark);
}
.plate__canvas { height: 260px; }
.plate figcaption {
  padding: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--foam-soft);
  background: var(--deep-surface);
  letter-spacing: 0.04em;
}

.plate--spiral .plate__canvas {
  background:
    repeating-conic-gradient(from 0deg at 30% 70%,
      transparent 0deg 9deg,
      color-mix(in srgb, var(--biolume) 14%, transparent) 9deg 10deg),
    radial-gradient(circle at 30% 70%, color-mix(in srgb, var(--verdigris) 18%, var(--abyss)) 0%, var(--abyss) 70%);
}
.plate--strata .plate__canvas {
  background: linear-gradient(178deg,
    var(--abyss) 0%, var(--abyss) 22%,
    color-mix(in srgb, var(--verdigris) 12%, var(--abyss)) 22%, color-mix(in srgb, var(--verdigris) 12%, var(--abyss)) 23%,
    var(--abyss) 23%, var(--abyss) 41%,
    color-mix(in srgb, var(--verdigris) 28%, var(--abyss)) 41%, color-mix(in srgb, var(--verdigris) 28%, var(--abyss)) 42.5%,
    var(--abyss) 42.5%, var(--abyss) 58%,
    color-mix(in srgb, var(--verdigris) 42%, var(--abyss)) 58%, color-mix(in srgb, var(--verdigris) 42%, var(--abyss)) 60%,
    var(--abyss) 60%, var(--abyss) 74%,
    color-mix(in srgb, var(--gold) 55%, var(--abyss)) 74%, color-mix(in srgb, var(--gold) 55%, var(--abyss)) 77%,
    var(--abyss) 77%);
}
.plate--scale .plate__canvas {
  background-color: var(--abyss);
  background-image:
    radial-gradient(color-mix(in srgb, var(--foam) 30%, transparent) 1px, transparent 1.5px),
    radial-gradient(color-mix(in srgb, var(--verdigris) 45%, transparent) 1.5px, transparent 2.5px),
    radial-gradient(color-mix(in srgb, var(--gold) 45%, transparent) 2.5px, transparent 4px);
  background-size: 22px 22px, 44px 44px, 88px 88px;
  background-position: 0 0, 11px 11px, 22px 22px;
}

/* ===== UI Components ================================================= */
.comp-block { margin-top: var(--sp-5); }
.comp-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

.btn {
  font: inherit;
  font-size: var(--text-body-sm);
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--r-pill);
  border: var(--border-w) solid transparent;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-surface),
              color var(--dur-fast) var(--ease-surface),
              border-color var(--dur-fast) var(--ease-surface);
  min-height: 44px;
}
.btn--primary { background: var(--abyss); color: var(--foam); }
.btn--primary:hover { background: var(--verdigris-deep); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.btn--secondary:hover { border-color: var(--verdigris-deep); color: var(--verdigris-deep); }
.btn--gauntlet { background: var(--gold); color: var(--abyss); font-weight: 600; }
.btn--gauntlet:hover { background: var(--gold-deep); color: var(--lobby); }
.btn--quiet {
  background: none;
  border: none;
  color: var(--verdigris-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 10px var(--sp-2);
}
.btn:disabled {
  background: var(--surface-2);
  color: var(--muted);
  border-color: transparent;
  cursor: not-allowed;
}

/* Room card */
.room-card {
  max-width: 380px;
  border: var(--border);
  border-radius: var(--r-lg);
  background: var(--lobby);
  padding: var(--sp-4);
  transition: box-shadow var(--dur-normal) var(--ease-surface),
              border-color var(--dur-normal) var(--ease-surface),
              transform var(--dur-normal) var(--ease-surface);
}
.room-card:hover {
  box-shadow: var(--sh-2);
  border-color: var(--verdigris);
  transform: translateY(-2px);
}
.room-card__date {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.08em;
  color: var(--gold-deep);
}
.room-card__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  margin: var(--sp-2) 0;
}
.room-card__meta { font-size: var(--text-caption); color: var(--muted); margin: 0; }

/* Gauntlet (quiz) rows */
.gauntlet { max-width: 520px; display: flex; flex-direction: column; gap: var(--sp-2); }
.gauntlet__opt {
  font: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: 1.8em minmax(0, 1fr);
  gap: var(--sp-2);
  align-items: baseline;
  padding: var(--sp-3);
  border: var(--border);
  border-radius: var(--r-md);
  background: var(--lobby);
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-surface),
              background-color var(--dur-fast) var(--ease-surface);
}
.gauntlet__opt:hover { border-color: var(--verdigris); }
.gauntlet__key {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--muted);
}
.gauntlet__opt--correct {
  border-color: var(--verdigris-deep);
  background: color-mix(in srgb, var(--verdigris) 12%, var(--lobby));
}
.gauntlet__opt--correct::after {
  content: "held.";
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--verdigris-deep);
}
.gauntlet__opt--wrong {
  border-color: var(--rule);
  color: var(--muted);
}
.gauntlet__opt--wrong::after {
  content: "not quite — the answer explains why.";
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--gold-deep);
}

/* Inputs */
.field { display: flex; flex-direction: column; gap: var(--sp-1); max-width: 380px; }
.field label { font-size: var(--text-body-sm); font-weight: 500; }
.field input,
.field select {
  font: inherit;
  padding: 10px var(--sp-3);
  border: var(--border-w) solid var(--ink-soft);
  border-radius: var(--r-md);
  background: var(--lobby);
  color: var(--ink);
  min-height: 44px;
}
.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--biolume);
  outline-offset: 2px;
  border-color: var(--verdigris-deep);
}
.field__hint { font-size: var(--text-caption); color: var(--muted); }

/* ===== Shadows & Borders ============================================= */
.shadow-demos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}
@media (max-width: 720px) { .shadow-demos { grid-template-columns: 1fr; } }
.shadow-demo {
  height: 120px;
  border-radius: var(--r-lg);
  border: var(--border);
  background: var(--lobby);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--muted);
}
.shadow-demo--1 { box-shadow: var(--sh-1); }
.shadow-demo--2 { box-shadow: var(--sh-2); }
.shadow-demo--3 { box-shadow: var(--sh-3); }

.radius-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: flex-end;
}
.radius-demo {
  width: 108px;
  height: 84px;
  background: var(--surface-2);
  border: var(--border-w) solid var(--ink-soft);
  display: flex;
  align-items: flex-end;
  padding: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--ink-soft);
}

/* ===== Motion ======================================================== */
.ease-demos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
}
@media (max-width: 720px) { .ease-demos { grid-template-columns: 1fr; } }
.ease-demo {
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-lg);
  background: var(--deep-surface);
  padding: var(--sp-4);
  overflow: hidden;
}
.ease-demo__track { height: 40px; position: relative; margin: var(--sp-3) 0; }
.ease-demo__ball {
  position: absolute;
  top: 4px;
  left: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
}
.ease-demo.play .ease-demo__ball { animation: slide var(--dur-slow) forwards; }
.ease-demo--drift.play .ease-demo__ball { animation-timing-function: var(--ease-drift); }
.ease-demo--surface.play .ease-demo__ball { animation-timing-function: var(--ease-surface); animation-duration: var(--dur-normal); }
.ease-demo--tide.play .ease-demo__ball { animation-timing-function: var(--ease-tide); animation-duration: var(--dur-normal); }
@keyframes slide { to { left: calc(100% - 32px); } }
.ease-demo h4 { margin-top: 0; color: var(--foam); }
.ease-demo code {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--biolume);
}
.btn-replay {
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--rule-dark);
  background: transparent;
  color: var(--foam-soft);
  cursor: pointer;
}
.btn-replay:hover { border-color: var(--biolume); color: var(--biolume); }

/* ===== Layout ======================================================== */
.container-diagram { display: flex; flex-direction: column; gap: var(--sp-2); }
.container-diagram div {
  height: 44px;
  border: 1px dashed var(--verdigris);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--verdigris) 7%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--verdigris-deep);
}
.container-diagram .cd-narrow { width: 50%; }
.container-diagram .cd-default { width: 82%; }
.container-diagram .cd-wide { width: 100%; }

.space-ruler { display: flex; align-items: flex-end; gap: var(--sp-3); flex-wrap: wrap; }
.space-ruler div {
  background: var(--verdigris);
  width: 30px;
  border-radius: 2px 2px 0 0;
}
.space-ruler span {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--muted);
  text-align: center;
  margin-top: var(--sp-1);
}

/* ===== Voice ========================================================= */
.voice-statement {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: 1.3;
  max-width: 22ch;
  margin-bottom: var(--sp-5);
}
.voice-statement em { color: var(--verdigris-deep); font-style: italic; }

.vocab { margin: 0; }
.vocab dt {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-2);
}
.vocab dd { margin: 0 0 var(--sp-4); font-size: var(--text-body-sm); color: var(--ink-soft); }

.copy-sample {
  border-left: 2px solid var(--gold);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-4);
  margin: 0 0 var(--sp-4);
}
.copy-sample p { margin: 0; font-size: var(--text-body-lg); }
.copy-sample footer {
  margin-top: var(--sp-1);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--muted);
}

/* ===== Governance ==================================================== */
.naming-example {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  background: var(--abyss);
  color: var(--foam);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  overflow-x: auto;
}
.naming-example .tok { color: var(--biolume); }
.naming-example .lit { color: var(--gold); }

/* ===== Placeholders & invitation zones =============================== */
.placeholder {
  border: 2px dashed var(--gold-deep);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--gold-deep);
  background: color-mix(in srgb, var(--gold) 7%, transparent);
}

.invite {
  border: 1px dashed var(--muted);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  line-height: 1.6;
  color: var(--muted);
  opacity: 0;
  animation: invite-in var(--dur-slow) var(--ease-drift) 2s forwards;
}
.sec--dark .invite { border-color: var(--foam-soft); color: var(--foam-soft); }
@keyframes invite-in { to { opacity: 1; } }

/* ===== Scroll reveal ================================================= */
/* Reveals only ever hide content when JS is running (.js on <html>);
   with scripts blocked or disabled the document reads in full. */
.js .rv {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease-drift),
              transform var(--dur-slow) var(--ease-drift);
}
.js .rv.vis { opacity: 1; transform: none; }
.rv-d1 { transition-delay: calc(var(--stagger) * 1); }
.rv-d2 { transition-delay: calc(var(--stagger) * 2); }
.rv-d3 { transition-delay: calc(var(--stagger) * 3); }
.rv-d4 { transition-delay: calc(var(--stagger) * 4); }
.rv-d5 { transition-delay: calc(var(--stagger) * 5); }
.rv-d6 { transition-delay: calc(var(--stagger) * 6); }

/* ===== Reduced motion ================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .invite { animation: none; opacity: 1; }
  .ease-demo.play .ease-demo__ball { animation: none; left: calc(100% - 32px); }
  .room-card, .btn, .sidebar { transition: none; }
}

/* ===== Print ========================================================= */
@media print {
  .sidebar, .nav-toggle, .skip-link, .invite, .type-toggle, .btn-replay { display: none; }
  .shell { display: block; }
  .sec { break-before: page; padding: 24px 0; }
  .cover { min-height: auto; break-before: auto; }
  .js .rv { opacity: 1; transform: none; }
  body { background: #fff; }
  .sec--dark, .cover {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  a { border-bottom: none; }
}
