/* ==========================================================================
   Traceige — one-page site
   Palette: night navy (the shift), ice cyan (the data), amber (the beacon).
   ========================================================================== */

:root {
  --night:      #0A1826;
  --night-2:    #0E2135;
  --night-3:    #15314B;
  --night-line: rgba(127, 212, 232, 0.16);

  --ice:        #7FD4E8;
  --ice-deep:   #2C87A6;
  --ice-wash:   #E8F4F8;

  --beacon:     #FFA92B;
  --beacon-2:   #E0870A;
  --beacon-wash:#FFF3E0;

  --snow:       #F4F8FB;
  --paper:      #FFFFFF;
  --ink:        #0B1B29;
  --slate:      #55708A;
  --slate-2:    #7A93A8;
  --line:       #DDE7EE;

  --danger:     #E2604A;
  --danger-wash:#FBEAE6;

  --wrap: 1180px;
  --gap: clamp(1rem, 2.4vw, 2rem);
  --pad-y: clamp(4.5rem, 9vw, 8rem);
  --radius: 14px;
  --radius-sm: 8px;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--snow);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 640;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gap); }
.section { padding-block: var(--pad-y); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.dark { background: var(--night); color: #DCE8F0; }
.dark h1, .dark h2, .dark h3 { color: #F2F8FC; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 50%; translate: -50% -140%;
  z-index: 100; padding: 0.7rem 1.2rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--beacon); color: var(--night); font-weight: 600; text-decoration: none;
  transition: translate 0.18s ease;
}
.skip-link:focus-visible { translate: -50% 0; }

:where(a, button, summary, input, [tabindex]):focus-visible {
  outline: 2px solid var(--beacon);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- shared type ------------------------------------------------------- */

.kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ice-deep);
}
.kicker::before { content: ''; width: 26px; height: 1px; background: currentColor; opacity: 0.65; }
.dark .kicker { color: var(--beacon); }

.h2 { font-size: clamp(1.85rem, 1.2rem + 2.3vw, 3rem); }
.h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); }

.lead {
  max-width: 62ch;
  margin-top: 1.1rem;
  font-size: clamp(1.06rem, 1rem + 0.35vw, 1.22rem);
  color: var(--slate);
}
.dark .lead { color: #A9C2D4; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.82rem 1.35rem;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 560; font-size: 0.97rem;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, translate 0.16s ease;
}
.btn:hover { translate: 0 -1px; }
.btn--primary { background: var(--beacon); color: #201200; }
.btn--primary:hover { background: #FFB94E; }
.btn--ghost { border-color: rgba(127, 212, 232, 0.35); color: #DCE8F0; }
.btn--ghost:hover { border-color: var(--ice); background: rgba(127, 212, 232, 0.08); }
.btn--line { border-color: var(--line); background: var(--paper); color: var(--ink); }
.btn--line:hover { border-color: var(--ice-deep); color: var(--ice-deep); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #16324D; }
.btn--sm { padding: 0.55rem 1rem; font-size: 0.88rem; }
.btn .arw { transition: translate 0.16s ease; }
.btn:hover .arw { translate: 3px 0; }

/* --- header ------------------------------------------------------------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 24, 38, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.site-head.is-stuck { background: rgba(10, 24, 38, 0.95); border-bottom-color: var(--night-line); }
.site-head__inner { display: flex; align-items: center; gap: var(--gap); min-height: 66px; }

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 650; letter-spacing: -0.02em; font-size: 1.08rem;
  color: #F2F8FC; text-decoration: none; margin-right: auto;
}
.brand__mark { width: 24px; height: 24px; flex: none; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a {
  font-size: 0.9rem; color: #A9C2D4; text-decoration: none;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--ice); }

.lang-switch {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.32rem 0.7rem; border: 1px solid var(--night-line); border-radius: 999px;
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.08em;
  color: #A9C2D4; text-decoration: none;
}
.lang-switch:hover { color: var(--ice); border-color: rgba(127, 212, 232, 0.4); }

@media (max-width: 940px) {
  .site-nav { display: none; }
}

/* --- hero --------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 80% at 78% -10%, rgba(127, 212, 232, 0.16), transparent 60%),
    radial-gradient(80% 60% at 8% 105%, rgba(255, 169, 43, 0.12), transparent 62%),
    var(--night);
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(4rem, 8vw, 7rem);
}
.hero__snow {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0.5;
}
.hero__snow::before {
  content: ''; position: absolute; left: 0; right: 0; top: -520px; height: calc(100% + 520px);
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.3px 1.3px at 34% 62%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.8px 1.8px at 58% 28%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.2px 1.2px at 77% 74%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 89% 38%, rgba(255,255,255,0.75), transparent),
    radial-gradient(1.1px 1.1px at 22% 88%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.4px 1.4px at 66% 92%, rgba(255,255,255,0.6), transparent);
  background-size: 520px 520px;
  animation: snowfall 26s linear infinite;
}
@keyframes snowfall { to { transform: translate3d(40px, 520px, 0); } }

.hero__grid {
  position: relative;
  display: grid; gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.4rem 0.9rem 0.4rem 0.6rem;
  border: 1px solid var(--night-line); border-radius: 999px;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ice);
}
.hero__eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--beacon);
  box-shadow: 0 0 0 0 rgba(255, 169, 43, 0.55); animation: beacon 2.4s ease-out infinite;
}
@keyframes beacon {
  0%   { box-shadow: 0 0 0 0 rgba(255, 169, 43, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(255, 169, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 169, 43, 0); }
}

.hero h1 {
  margin: 1.4rem 0 0;
  font-size: clamp(2.5rem, 1.4rem + 4.4vw, 4.25rem);
  letter-spacing: -0.035em;
  color: #FFFFFF;
}
.hero__sub {
  margin-top: 0.9rem;
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
  font-weight: 480; color: var(--ice);
}
.hero__lead { margin-top: 1.4rem; max-width: 54ch; color: #A9C2D4; font-size: 1.08rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.1rem; }

.hero__stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 2rem; border-top: 1px solid var(--night-line);
}
@media (max-width: 700px) { .hero__stats { grid-template-columns: 1fr; gap: 1.4rem; } }
.hero__stat .v {
  display: block; font-family: var(--mono); font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem);
  font-weight: 500; line-height: 1; color: var(--beacon); letter-spacing: -0.02em;
}
.hero__stat .l { display: block; margin-top: 0.7rem; font-size: 0.9rem; color: #91AEC4; max-width: 30ch; }

/* --- hero scene (static SVG teaser) ------------------------------------- */

.scene {
  position: relative;
  border: 1px solid var(--night-line); border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(21, 49, 75, 0.7), rgba(10, 24, 38, 0.55));
  padding: 0.9rem;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}
.scene__label {
  display: block; padding: 0.8rem 0.4rem 0.2rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; color: #7E9BB3;
}
.scene svg { display: block; width: 100%; height: auto; }

/* --- problem ------------------------------------------------------------ */

.problem__quote {
  font-size: clamp(1.9rem, 1.1rem + 3vw, 3.4rem);
  letter-spacing: -0.03em; line-height: 1.08;
  max-width: 16ch;
}
.problem__grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
}
@media (max-width: 860px) { .problem__grid { grid-template-columns: 1fr; } }
.problem__body p + p { margin-top: 1.1rem; }
.problem__body p:last-child {
  font-weight: 600; color: var(--ink); font-size: 1.2rem;
  padding-left: 1rem; border-left: 3px solid var(--beacon);
}
.problem__body { color: var(--slate); font-size: 1.06rem; }

/* --- replay ------------------------------------------------------------- */

.replay {
  margin-top: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--night-line); border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(21, 49, 75, 0.55), rgba(10, 24, 38, 0.4));
  overflow: hidden;
}

.replay__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem;
  padding: 1rem clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--night-line);
  background: rgba(10, 24, 38, 0.5);
}
.replay__clock { display: flex; align-items: baseline; gap: 0.7rem; margin-right: auto; }
.replay__clock .v {
  font-family: var(--mono); font-size: 1.65rem; font-weight: 500;
  color: var(--beacon); letter-spacing: 0.01em;
}
.stat-lbl {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.11em;
  text-transform: uppercase; color: #7E9BB3;
}
.replay__counters { display: flex; flex-wrap: wrap; gap: 1rem 1.9rem; }
.replay__counters li { display: flex; flex-direction: column; gap: 0.15rem; }
.replay__counters .v {
  font-family: var(--mono); font-size: 1.05rem; font-weight: 500; color: #EAF4F9;
  font-variant-numeric: tabular-nums;
}
.replay__counters li[data-tone='reject'] .v { color: var(--danger); }
.replay__counters .v.is-bumped { animation: bump 0.45s ease; }
@keyframes bump { 0% { scale: 1; } 35% { scale: 1.22; } 100% { scale: 1; } }

.replay__body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
}
@media (max-width: 940px) { .replay__body { grid-template-columns: 1fr; } }

.replay__map { position: relative; padding: 0.5rem; }
.replay__map svg { display: block; width: 100%; height: auto; }

.replay__legend {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem;
  padding: 0.4rem 0.8rem 0.8rem;
}
.replay__legend li {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; color: #8FAAC0;
}
.replay__legend .sw { width: 18px; height: 3px; border-radius: 2px; flex: none; }
.sw--transit { background: var(--ice); }
.sw--work { background: var(--beacon); }
.sw--buffered { background: repeating-linear-gradient(90deg, #7E9BB3 0 4px, transparent 4px 7px); }
.sw--rejected { background: var(--danger); height: 8px; width: 8px; border-radius: 50%; }

.replay__narration {
  border-left: 1px solid var(--night-line);
  display: flex; flex-direction: column;
  max-height: 520px;
}
@media (max-width: 940px) {
  .replay__narration { border-left: 0; border-top: 1px solid var(--night-line); max-height: 340px; }
}
.replay__cards { position: relative; overflow-y: auto; padding: 0.5rem; scroll-behavior: smooth; overscroll-behavior: contain; }
.replay__cards li {
  padding: 0.85rem 0.95rem; border-radius: var(--radius-sm);
  opacity: 0.32; transition: opacity 0.3s ease, background-color 0.3s ease;
  border-left: 2px solid transparent;
}
.replay__cards li.is-seen { opacity: 0.55; }
.replay__cards li.is-active {
  opacity: 1; background: rgba(127, 212, 232, 0.07); border-left-color: var(--beacon);
}
.replay__cards .t {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--beacon);
}
.replay__cards h3 { margin: 0.2rem 0 0.35rem; font-size: 0.98rem; color: #EAF4F9; }
.replay__cards p { font-size: 0.87rem; line-height: 1.55; color: #9DB8CC; }

.replay__foot {
  display: grid; gap: 1rem;
  padding: 1rem clamp(1rem, 2vw, 1.5rem) 1.2rem;
  border-top: 1px solid var(--night-line);
  background: rgba(10, 24, 38, 0.5);
}

.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; }
.chain__node {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.75rem; border: 1px solid var(--night-line); border-radius: 999px;
  font-size: 0.8rem; color: #A9C2D4;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.chain__node .led {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ice); flex: none;
  transition: background-color 0.25s ease;
}
.chain__node[data-state='warn'] { border-color: rgba(255,169,43,0.45); color: var(--beacon); }
.chain__node[data-state='warn'] .led { background: var(--beacon); }
.chain__node[data-state='down'] { border-color: rgba(226,96,74,0.5); color: var(--danger); background: rgba(226,96,74,0.07); }
.chain__node[data-state='down'] .led { background: var(--danger); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.chain__arrow { color: #44637C; font-size: 0.8rem; }

.spool {
  display: flex; align-items: center; gap: 0.6rem; margin-left: auto;
  font-family: var(--mono); font-size: 0.74rem; color: #7E9BB3;
}
.spool__bar { width: 96px; height: 6px; border-radius: 3px; background: rgba(127,212,232,0.14); overflow: hidden; }
.spool__fill { height: 100%; width: 0%; background: var(--beacon); transition: width 0.4s ease; }

.replay__controls { display: flex; align-items: center; gap: 0.7rem; }
.ctrl {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-width: 40px; height: 40px; padding: 0 0.9rem;
  border: 1px solid var(--night-line); border-radius: 999px;
  background: transparent; color: #DCE8F0; font: inherit; font-size: 0.85rem; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.ctrl:hover { border-color: var(--ice); background: rgba(127,212,232,0.08); }
.ctrl--play { background: var(--beacon); border-color: var(--beacon); color: #201200; font-weight: 560; }
.ctrl--play:hover { background: #FFB94E; border-color: #FFB94E; }

.scrub { position: relative; flex: 1; height: 40px; display: flex; align-items: center; }
.scrub input[type='range'] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px;
  background: rgba(127,212,232,0.18); cursor: pointer; margin: 0;
}
.scrub input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--beacon); border: 2px solid var(--night); cursor: pointer;
}
.scrub input[type='range']::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--beacon); border: 2px solid var(--night); cursor: pointer;
}
.scrub__ticks { position: absolute; inset: 0; pointer-events: none; }
.scrub__tick {
  position: absolute; top: 50%; width: 2px; height: 10px; translate: -50% -50%;
  background: rgba(127,212,232,0.4); border-radius: 1px; pointer-events: auto; cursor: pointer;
  border: 0; padding: 0;
}
.scrub__tick:hover, .scrub__tick.is-active { background: var(--ice); height: 14px; }

.replay__note {
  display: none; margin-top: 0.8rem; font-size: 0.82rem; color: #7E9BB3;
}
.is-reduced .replay__note { display: block; }

/* --- replay svg internals ----------------------------------------------- */

.map-bg { fill: none; stroke: rgba(127,212,232,0.07); stroke-width: 1; }
.map-village { fill: rgba(127,212,232,0.05); stroke: rgba(127,212,232,0.3); stroke-width: 1.5; transition: fill 0.4s ease, stroke 0.4s ease; }
.map-village.is-inside { fill: rgba(255,169,43,0.14); stroke: var(--beacon); }
.map-village.is-skirt { stroke: rgba(255,169,43,0.55); stroke-dasharray: 5 4; }
.map-village-label { fill: #8FAAC0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; }
.map-route-base { fill: none; stroke: rgba(127,212,232,0.19); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.map-leg { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.map-leg--transit { stroke: var(--ice); }
.map-leg--work { stroke: var(--beacon); }
.map-buffered { fill: none; stroke: #8FAAC0; stroke-width: 4; stroke-dasharray: 6 6; stroke-linecap: round; opacity: 0; transition: opacity 0.3s ease; }
.map-buffered.is-on { opacity: 0.85; }
.map-depot { fill: #16324D; stroke: var(--ice); stroke-width: 2; }
.map-depot-label { fill: #8FAAC0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; }
.map-jitter circle { fill: rgba(127,212,232,0.55); opacity: 0; transition: opacity 0.4s ease; }
.map-jitter.is-on circle { opacity: 1; }
.map-truck-halo { fill: rgba(255,169,43,0.22); }
.map-truck { fill: var(--beacon); stroke: #201200; stroke-width: 1.5; }
.map-reject { opacity: 0; transition: opacity 0.35s ease; }
.map-reject.is-on { opacity: 1; }
.map-reject.is-struck { opacity: 0.4; }
.map-reject line { stroke: var(--danger); stroke-width: 1.5; stroke-dasharray: 4 4; }
.map-reject circle { fill: rgba(226,96,74,0.18); stroke: var(--danger); stroke-width: 1.5; }
.map-reject path { stroke: var(--danger); stroke-width: 2; stroke-linecap: round; }
.map-reject text { fill: var(--danger); font-family: var(--mono); font-size: 11px; }
.map-cross { opacity: 0; transition: opacity 0.35s ease; }
.map-cross.is-on { opacity: 1; }
.map-cross circle { fill: var(--night); stroke: var(--beacon); stroke-width: 2; }
.map-cross text { fill: var(--beacon); font-family: var(--mono); font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  .hero__snow, .hero__eyebrow .dot { animation: none; }
  .chain__node[data-state='down'] .led { animation: none; }
  .replay__counters .v.is-bumped { animation: none; }
}

/* --- artifact / report card --------------------------------------------- */

.artifact__grid {
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}
@media (max-width: 940px) { .artifact__grid { grid-template-columns: 1fr; } }

.doc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -40px rgba(11, 27, 41, 0.45), 0 1px 2px rgba(11, 27, 41, 0.05);
  overflow: hidden;
}
.doc__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem;
  padding: 1.15rem 1.4rem;
  border-bottom: 2px solid var(--ink);
}
.doc__head h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
.doc__gloss {
  display: block; margin-top: 0.2rem;
  font-size: 0.76rem; font-weight: 400; letter-spacing: 0; color: var(--slate-2);
}
.doc__head .ref { margin-left: auto; font-family: var(--mono); font-size: 0.78rem; color: var(--slate-2); }

.doc__meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  background: var(--paper);
}
.doc__meta div { padding: 0.85rem 1.4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.doc__meta dt { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate-2); }
.doc__meta dd { margin: 0.3rem 0 0; font-family: var(--mono); font-size: 0.95rem; color: var(--ink); }

.doc__figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  background: var(--paper);
}
.doc__fig {
  padding: 1rem 1.1rem;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.doc__fig .v { white-space: nowrap; }

.doc__quality {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem;
  padding: 0.75rem 1.4rem; border-bottom: 1px solid var(--line);
  background: var(--snow);
  font-size: 0.84rem; color: var(--slate);
}
.doc__quality strong { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.doc__quality .rej strong { color: var(--danger); }
.doc__fig .l { display: block; font-size: 0.76rem; color: var(--slate); }
.doc__fig .v {
  display: block; margin-top: 0.25rem;
  font-family: var(--mono); font-size: 1.4rem; font-weight: 500; letter-spacing: -0.02em; color: var(--ink);
}
.doc__fig .v small { font-size: 0.62em; font-weight: 400; color: var(--slate-2); margin-left: 0.15em; }
.doc__fig--accent { background: var(--beacon-wash); }
.doc__fig--accent .v { color: #7A4B00; }
.doc__fig--reject .v { color: var(--danger); }

.doc__table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.doc__table caption {
  text-align: left; padding: 1rem 1.4rem 0.5rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--slate-2);
}
.doc__table th, .doc__table td { padding: 0.55rem 1.4rem; text-align: left; }
.doc__table th { font-weight: 500; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate-2); }
.doc__table tbody tr { border-top: 1px solid var(--line); }
.doc__table td { font-family: var(--mono); color: var(--ink); }
.doc__table td:first-child { font-family: var(--sans); }
.doc__table .num { text-align: right; }
.doc__table + .doc__table { border-top: 1px solid var(--line); }

.tag {
  display: inline-block; white-space: nowrap; padding: 0.12rem 0.5rem; border-radius: 4px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em;
}
.tag--work { background: var(--beacon-wash); color: #7A4B00; }
.tag--transit { background: var(--ice-wash); color: #16556B; }

.doc__foot {
  padding: 0.9rem 1.4rem; border-top: 1px solid var(--line);
  font-size: 0.78rem; color: var(--slate-2);
}
.doc-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }

/* --- proof table --------------------------------------------------------- */

.proof__table { margin-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--night-line); }
.proof__row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1rem clamp(1.5rem, 4vw, 3.5rem);
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--night-line);
}
@media (max-width: 800px) { .proof__row { grid-template-columns: 1fr; gap: 0.4rem; padding: 1.1rem 0; } }
.proof__flaw { color: #8FAAC0; display: flex; gap: 0.85rem; }
.proof__flaw .n { font-family: var(--mono); font-size: 0.78rem; color: #4E6E88; flex: none; padding-top: 0.18rem; }
.proof__fix { color: #EAF4F9; display: flex; gap: 0.85rem; }
.proof__fix .ck { color: var(--beacon); flex: none; }
.proof__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); padding-bottom: 0.8rem;
}
@media (max-width: 800px) { .proof__head { display: none; } }
.proof__head span {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #4E6E88;
}
.proof__note {
  margin-top: 2rem; max-width: 62ch; font-size: 0.95rem; color: #8FAAC0;
  padding-left: 1rem; border-left: 2px solid var(--beacon);
}

/* --- how it works -------------------------------------------------------- */

.steps { display: grid; gap: 1px; margin-top: clamp(2rem, 4vw, 3rem); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.steps { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.step { background: var(--paper); padding: 1.6rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; }
.step__n { font-family: var(--mono); font-size: 0.78rem; color: var(--beacon-2); letter-spacing: 0.08em; }
.step__name { font-size: 1.05rem; font-weight: 620; letter-spacing: -0.015em; }
.step p { font-size: 0.9rem; color: var(--slate); }

.tech { margin-top: 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.tech > summary {
  display: flex; align-items: center; gap: 0.7rem; padding: 1.1rem 1.4rem;
  cursor: pointer; font-weight: 560; list-style: none;
}
.tech > summary::-webkit-details-marker { display: none; }
.tech > summary .chev { transition: rotate 0.2s ease; color: var(--ice-deep); }
.tech[open] > summary .chev { rotate: 90deg; }
.tech__body { padding: 0 1.4rem 1.4rem; display: grid; gap: 1.1rem; }
.tech__body { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tech__item dt { font-family: var(--mono); font-size: 0.84rem; color: var(--ink); margin-bottom: 0.3rem; }
.tech__item dd { margin: 0; font-size: 0.88rem; color: var(--slate); }

/* --- audiences ----------------------------------------------------------- */

.audiences { background: linear-gradient(180deg, var(--ice-wash), var(--snow) 70%); }
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: clamp(1.8rem, 3vw, 2.5rem); }
.tab {
  padding: 0.7rem 1.2rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--slate); font: inherit; font-size: 0.94rem; font-weight: 520;
  cursor: pointer; transition: all 0.16s ease;
}
.tab:hover { border-color: var(--ice-deep); color: var(--ink); }
.tab[aria-selected='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }

.panel { display: none; margin-top: 1.5rem; }
.panel.is-active { display: block; animation: fade 0.3s ease; }
@keyframes fade { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .panel.is-active { animation: none; } }

.panel__grid {
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
@media (max-width: 860px) { .panel__grid { grid-template-columns: 1fr; } }
.panel__short { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.75rem); letter-spacing: -0.025em; }
.panel__pain { margin-top: 1rem; color: var(--slate); }
.panel__promise {
  margin-top: 1.2rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm);
  background: var(--night); color: #DCE8F0; font-size: 0.95rem;
}
.panel__bullets li { display: flex; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-size: 0.94rem; color: var(--slate); }
.panel__bullets li:last-child { border-bottom: 0; }
.panel__bullets .ck { color: var(--beacon-2); flex: none; }
.panel__cta { margin-top: 1.4rem; }

/* --- standards ----------------------------------------------------------- */

.stack { display: grid; gap: 1.2rem; margin-top: clamp(2rem, 4vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.stack__item { padding-top: 1.1rem; border-top: 2px solid var(--ink); }
.stack__item h3 { font-size: 1rem; font-family: var(--mono); font-weight: 500; letter-spacing: -0.01em; }
.stack__item p { margin-top: 0.5rem; font-size: 0.9rem; color: var(--slate); }

/* --- status -------------------------------------------------------------- */

.status { background: var(--paper); border-top: 1px solid var(--line); }
.status__grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: clamp(2rem, 4vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.status__col h3 {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500;
}
.status__col ul { margin-top: 1rem; display: grid; gap: 0.6rem; }
.status__col li { display: flex; gap: 0.6rem; font-size: 0.92rem; color: var(--slate); }
.status__col--live h3 { color: var(--ice-deep); }
.status__col--live .mk { color: var(--ice-deep); }
.status__col--next h3 { color: var(--beacon-2); }
.status__col--next .mk { color: var(--beacon-2); }
.status__col--not { padding: 1.2rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--snow); }
.status__col--not h3 { color: var(--slate-2); }
.status__col--not li { color: var(--slate-2); }
.status__col--not .mk { color: var(--slate-2); }
.status__note { margin-top: 1rem; font-size: 0.84rem; color: var(--slate-2); }

/* --- contact + footer ---------------------------------------------------- */

.contact { background: radial-gradient(90% 120% at 15% 0%, rgba(255,169,43,0.1), transparent 60%), var(--night); }
.contact__inner { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; }
@media (max-width: 860px) { .contact__inner { grid-template-columns: 1fr; } }
.contact__mail {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.6rem;
  font-family: var(--mono); font-size: clamp(1rem, 0.9rem + 0.5vw, 1.3rem);
  color: var(--beacon); text-decoration: none; border-bottom: 1px solid rgba(255,169,43,0.35);
  padding-bottom: 0.2rem;
}
.contact__mail:hover { border-bottom-color: var(--beacon); }
.contact__aside { padding: 1.4rem; border: 1px solid var(--night-line); border-radius: var(--radius); font-size: 0.92rem; color: #A9C2D4; }

.site-foot { background: var(--night); border-top: 1px solid var(--night-line); padding-block: 2.5rem 3rem; color: #7E9BB3; font-size: 0.85rem; }
.site-foot__top { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.site-foot__tag { color: var(--ice); font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em; }
.site-foot__note { margin-top: 1.4rem; max-width: 70ch; line-height: 1.6; }
.site-foot__meta { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--night-line); display: flex; flex-wrap: wrap; gap: 1rem; }

.notfound { display: flex; align-items: center; min-height: 62vh; padding-block: var(--pad-y); }
.notfound .kicker { color: var(--danger); }

/* --- standalone report page ---------------------------------------------- */

.report-page { background: var(--snow); padding-block: clamp(2rem, 5vw, 4rem); }
.report-page .doc { max-width: 780px; margin-inline: auto; }
.report-bar {
  max-width: 780px; margin: 0 auto 1.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem;
}
.report-bar .back { margin-right: auto; font-size: 0.9rem; color: var(--slate); text-decoration: none; }
.report-bar .back:hover { color: var(--ink); }
.report-hint { max-width: 780px; margin: 1.2rem auto 0; font-size: 0.82rem; color: var(--slate-2); }

@media print {
  .report-bar, .report-hint, .site-head, .site-foot { display: none !important; }
  body { background: #fff; }
  .report-page { padding: 0; }
  .doc { box-shadow: none; border-color: #999; }
  .doc__fig--accent { background: #f5f5f5 !important; -webkit-print-color-adjust: exact; }
}
