/* ============================================================
   WEEKEND PLOT — Blueprint Technical direction
   paper + cyan ink · drawing-sheet layout · Oswald / Work Sans / Plex Mono
   ============================================================ */

@font-face {
  font-family: 'Oswald';
  src: url('../assets/oswald.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  src: url('../assets/work-sans.ttf') format('truetype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/ibm-plex-mono.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --bg: #ECF2F7;          /* drafting paper */
  --surface: #F7FAFC;
  --ink: #10315B;         /* blueprint navy */
  --muted: #46617B;
  --line: #2D7DD2;        /* survey cyan (rules, marks) */
  --soft: #BBD3E4;        /* soft internal rules */
  --accent: #1E6BB8;      /* action cyan */
  --accent-ink: #FFFFFF;
  --band-text: #EAF2F8;
  --band-sub: #C6D8E9;
  --label: #1E6BB8;        /* accent cyan, 4.9:1 on paper — for small text */
  --hot: #E1EDF7;         /* row hover tint */
  --shadow: 8px 8px 0 rgba(16, 49, 91, 0.10);
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
  --sans: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;
  --display: 'Oswald', 'Arial Narrow', 'Haettenschweiler', sans-serif;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  overflow-x: clip;
  margin: 0;
  padding: 34px;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(45, 125, 210, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 125, 210, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font: 400 16.5px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }

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

h1, h2, h3, p, ol, ul, dl, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- shared type voices ---------- */
.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker { color: var(--label); }
.kicker-cyan { color: var(--label); }
.kicker-light { color: #7FBEEF; }

/* ---------- focus ---------- */
a:focus, button:focus, input:focus, select:focus, summary:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.legend a:focus, .legend button:focus { outline-color: #7FBEEF; }

/* ============================================================
   SHEET FRAME + ZONE COORDINATES
   ============================================================ */
.sheet {
  position: relative;
  border: 2px solid var(--ink);
  min-height: calc(100dvh - 68px);
  background: transparent;
}
.zones { display: none; }
@media (min-width: 1100px) {
  .zones {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  .zones-top {
    position: absolute;
    top: -27px; left: 8px; right: 8px;
    display: flex; justify-content: space-between;
    font: 400 10px/1 var(--mono);
    color: rgba(70, 97, 123, 0.65);
    letter-spacing: 0.1em;
  }
  .zones-left {
    position: absolute;
    left: -27px; top: 12px; bottom: 12px;
    display: flex; flex-direction: column; justify-content: space-around;
    font: 400 10px/1 var(--mono);
    color: rgba(70, 97, 123, 0.65);
    letter-spacing: 0.1em;
  }
}

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 28px;
  border-bottom: 2px solid var(--ink);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  text-decoration: none;
  font: 600 19px/1 var(--display);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
}
.wordmark .mark { width: 17px; height: 17px; color: var(--line); }
.edition { margin-left: auto; }
.waycount { color: var(--ink); }
.waycount b {
  color: var(--label);
  font-weight: 400;
  transition: color 0.3s;
}
.waycount.flash b { color: var(--accent); transition: none; }

/* ============================================================
   SECTION 01 — HERO / THE PLAN
   ============================================================ */
.hero { padding: 56px 48px 40px; overflow: visible; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
  gap: 48px;
  align-items: start;
}
.hero-copy > * + * { margin-top: 18px; }

.display {
  font: 600 clamp(54px, 9.2vw, 134px) / 0.98 var(--display);
  letter-spacing: -0.012em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 14px;
}
.fullstop { color: var(--line); }

.hero-measure {
  position: relative;
  max-width: 430px;
  height: 12px;
  margin: 20px 0 4px !important;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.hero-measure::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--line);
}
.hero-measure span {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  padding: 0 12px;
  color: var(--muted);
  white-space: nowrap;
}

.lede {
  max-width: 56ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
}
.hero-note { letter-spacing: 0.14em; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px !important;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 24px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 400 12.5px/1 var(--mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--ink);
  color: var(--accent-ink);
}
.btn-ghost { background: var(--surface); }
.btn:active { transform: scale(0.97); }

/* ---------- site plan ---------- */
.siteplan { margin: 0; }
.plan-canvas {
  position: relative;
  border: 2px solid var(--ink);
  background: var(--surface);
  aspect-ratio: 640 / 480;
}
.plan { width: 100%; height: 100%; }
.plan text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  fill: var(--muted);
  text-anchor: middle;
}
.plan-north text { fill: var(--ink); }
.plan-center { animation: march 1.4s linear infinite; }
.plan-datum { animation: datumBlink 1.8s steps(2, jump-none) infinite; }
.siteplan figcaption {
  margin-top: 12px;
  letter-spacing: 0.13em;
}
.plan-key {
  display: block;
  margin-top: 8px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
}
.plan-key b { color: var(--label); font-weight: 400; }

/* ---------- stations (live index on the plan) ---------- */
.stations { position: absolute; inset: 0; }
.station {
  position: absolute;
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.04em;
  box-shadow: 3px 3px 0 rgba(16, 49, 91, 0.14);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.18s, color 0.18s, opacity 0.2s;
  animation: pop 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(0.28s + var(--i) * 70ms);
}
.station::before, .station::after {
  content: '';
  position: absolute;
  background: var(--ink);
  transition: background-color 0.18s;
}
.station::before { width: 2px; height: 7px; top: -9px; left: 50%; margin-left: -1px; }
.station::after  { width: 7px; height: 2px; top: 50%; left: -9px; margin-top: -1px; }
.station.is-saved { background: var(--accent); color: var(--accent-ink); }
.station.is-saved::before, .station.is-saved::after { background: var(--accent); }
.station.is-dim { opacity: 0.28; }
.station.is-hot { transform: scale(1.14); }
.station.is-active { background: var(--ink); color: var(--band-text); }
.station .tip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--band-text);
  font: 400 11px/1.5 var(--mono);
  letter-spacing: 0.05em;
  padding: 6px 10px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s;
  pointer-events: none;
  z-index: 20;
}
.station[data-side="left"] .tip { transform: translateX(-14%); }
.station[data-side="right"] .tip { transform: translateX(-86%); }
.station:focus .tip { opacity: 1; visibility: visible; }
.station:active { transform: scale(0.94); }
@media (max-width: 719px) {
  .station .tip { display: none; }
  .station { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
}

/* ---------- transect ---------- */
.transect {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.35s backwards;
}
.transect-caption { letter-spacing: 0.13em; margin-bottom: 18px; }
.lane { margin-bottom: 22px; }
.lane-label {
  color: var(--ink);
  margin-bottom: 4px;
}
.lane-label b { color: var(--label); font-weight: 400; }
.lane-axis {
  position: relative;
  height: 64px;
  border-left: 1px solid var(--soft);
  border-right: 1px solid var(--soft);
}
.lane-axis::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  background: var(--ink);
}
.axis-min, .axis-max {
  position: absolute;
  top: calc(50% + 12px);
  font-size: 10.5px;
}
.axis-min { left: 2px; }
.axis-max { right: 2px; }
.tick {
  position: absolute;
  top: 0; bottom: 0;
  width: 44px;
  margin-left: -22px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.tick-mark {
  position: absolute;
  left: 50%; top: 50%;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.18s;
}
.tick-mark::before, .tick-mark::after {
  content: '';
  position: absolute;
  background: var(--ink);
}
.tick-mark::before { width: 2px; height: 16px; left: 50%; top: -19px; margin-left: -1px; }
.tick-mark::after  { width: 2px; height: 16px; left: 50%; bottom: -19px; margin-left: -1px; }
.tick-time {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 0.18s;
}
.tick[data-side="up"] .tick-time { top: 0; }
.tick[data-side="down"] .tick-time { bottom: 0; }
.tick.duo-up .tick-mark { top: calc(50% - 11px); }
.tick.duo-down .tick-mark { top: calc(50% + 11px); }
.tick.is-saved .tick-mark { background: var(--accent); }
.tick.is-dim { opacity: 0.28; }
.tick:active .tick-mark { transform: scale(0.9); }
@media (max-width: 719px) {
  .tick { width: 34px; margin-left: -17px; }
  .tick-mark { width: 10px; height: 10px; margin: -5px 0 0 -5px; }
  .tick-time { font-size: 9.5px; }
}

/* ============================================================
   SECTION 02 — LEGEND (inverted band)
   ============================================================ */
.legend {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px;
  padding: 56px 48px;
  background: var(--ink);
  color: var(--band-text);
}
.legend .kicker { color: #7FBEEF; }
.legend h2 {
  font: 500 clamp(26px, 3vw, 38px) / 1.08 var(--display);
  letter-spacing: 0.01em;
  margin-top: 12px;
}
.legend-note {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--band-sub);
}
.legend-steps li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  padding: 16px 4px;
  border-top: 1px solid rgba(234, 242, 248, 0.28);
}
.legend-steps li:last-child { border-bottom: 1px solid rgba(234, 242, 248, 0.28); }
.step-no {
  font-size: 15px;
  color: #7FBEEF;
  letter-spacing: 0.1em;
  padding-top: 2px;
}
.legend-steps h3 {
  font: 600 17px/1.2 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--band-text);
}
.legend-steps p {
  margin-top: 4px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--band-sub);
}

/* ============================================================
   SECTION 03 — REGISTER
   ============================================================ */
.register { padding: 80px 48px 110px; }
.register-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.register-head h2 {
  font: 500 clamp(28px, 3.4vw, 42px) / 1.05 var(--display);
  letter-spacing: 0.01em;
  margin-top: 10px;
}
.records { color: var(--ink); letter-spacing: 0.13em; }

/* ---------- instrument strip (sticky) ---------- */
.instruments {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  padding: 16px 20px 18px;
  background: var(--bg);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  margin-bottom: 34px;
}
.field { display: grid; gap: 7px; }
.field-search { flex: 1 1 240px; }
.field-category { flex: 0 1 210px; }
.field-toggle { flex: 0 0 auto; margin-left: auto; }
.field .mono { font-size: 11px; }
.field input, .field select {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.3 var(--sans);
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.select-wrap { position: relative; display: block; }
.select-wrap::after {
  content: '';
  position: absolute;
  right: 15px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 20px;
  border: 2px solid var(--ink);
  background: var(--surface);
  cursor: pointer;
  font: 400 12.5px/1 var(--mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.toggle-dot {
  width: 9px; height: 9px;
  border: 2px solid var(--ink);
  background: transparent;
  transition: background-color 0.2s, border-color 0.2s;
}
.toggle[aria-pressed="true"] {
  background: var(--ink);
  color: var(--band-text);
}
.toggle[aria-pressed="true"] .toggle-dot {
  background: var(--line);
  border-color: var(--line);
}
.toggle:active { transform: scale(0.97); }

/* ---------- register body: ledger + waypoints ---------- */
.register-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 44px;
  align-items: start;
}

/* ledger rows */
.row-day {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 2px 10px;
  color: var(--ink);
  font: 400 11.5px/1 var(--mono);
  letter-spacing: 0.14em;
  border-top: 2px solid var(--ink);
}
.row-day::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--soft);
}
.row-item { position: relative; border-bottom: 1.5px solid var(--soft); }
.row-item.is-saved { border-bottom-color: var(--line); }
.row-btn {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 56px;
  gap: 20px;
  align-items: center;
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.18s;
}
.row-num {
  display: grid;
  gap: 3px;
  color: var(--muted);
}
.row-num em {
  font: 400 10px/1 var(--mono);
  font-style: normal;
  letter-spacing: 0.18em;
}
.row-num b {
  font: 600 27px/1 var(--display);
  color: var(--ink);
  transition: color 0.18s;
}
.row-main { display: grid; gap: 6px; min-width: 0; }
.row-title {
  font: 500 21px/1.2 var(--display);
  letter-spacing: 0.01em;
  color: var(--ink);
}
.row-summary {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 62ch;
}
.row-meta {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.row-arrow {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 2px solid var(--soft);
  color: var(--ink);
  font: 500 18px/1 var(--display);
  transition: border-color 0.18s, background-color 0.18s, color 0.18s, transform 0.2s;
}
.row-flag {
  position: absolute;
  top: -1px;
  right: 14px;
  padding: 4px 8px 5px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 400 10px/1 var(--mono);
  letter-spacing: 0.16em;
  display: none;
}
.row-item.is-saved .row-flag { display: block; }
.row-item.is-hot .row-btn { background: var(--hot); }
.row-btn:active { background: var(--hot); }
.row-btn:active .row-arrow { transform: translateX(4px); }

/* empty state */
.empty {
  margin-top: 20px;
  padding: 48px 28px;
  border: 2px dashed var(--ink);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.empty-code { color: var(--label); letter-spacing: 0.2em; }
.empty h3 { font: 500 24px/1.15 var(--display); }
.empty p { max-width: 46ch; color: var(--muted); font-size: 15px; }
.empty .btn { margin-top: 12px; }
.noscript-note { padding: 24px 4px; color: var(--ink); }

/* waypoint sidebar */
.waypoints {
  position: sticky;
  top: 132px;
  border: 2px solid var(--ink);
  background: var(--surface);
  padding: 24px 22px;
  box-shadow: var(--shadow);
}
.waypoints h2 {
  font: 500 27px/1.1 var(--display);
  margin-top: 12px;
}
.wp-count { margin-top: 6px; color: var(--label); letter-spacing: 0.15em; }
.wp-list { margin-top: 14px; }
.wp-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1.5px solid var(--soft);
}
.wp-num { font: 600 17px/1 var(--display); color: var(--label); }
.wp-open {
  background: none;
  border: none;
  padding: 6px 2px;
  text-align: left;
  cursor: pointer;
  font: 600 15px/1.35 var(--sans);
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--soft);
  transition: text-decoration-color 0.18s;
}
.wp-meta {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.wp-open:active { color: var(--label); }
.wp-remove {
  width: 40px; height: 40px;
  border: 2px solid var(--ink);
  background: var(--surface);
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
  transition: background-color 0.18s, color 0.18s, transform 0.2s;
}
.wp-remove:active { transform: scale(0.94); }
.wp-empty {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.wp-clear {
  margin-top: 14px;
  min-height: 44px;
  padding: 10px 4px;
  background: none;
  border: none;
  border-bottom: 2px solid var(--line);
  cursor: pointer;
  color: var(--ink);
  font-size: 11px;
  transition: color 0.18s, border-color 0.18s;
}
.wp-clear:active { color: var(--ink); border-color: var(--ink); }

/* ============================================================
   SECTION 05 — TITLE BLOCK
   ============================================================ */
.titleblock { padding: 52px 48px 64px; border-top: 2px solid var(--ink); }
.tb-grid {
  display: grid;
  grid-template-columns: 1.6fr 1.2fr 1.1fr 1.1fr;
  margin-top: 18px;
  border: 2px solid var(--ink);
}
.tb-cell {
  padding: 14px 16px 16px;
  border-right: 1.5px solid var(--soft);
}
.tb-cell:last-child { border-right: none; }
.tb-label { font-size: 10px; letter-spacing: 0.18em; color: var(--label); }
.tb-value { margin-top: 7px; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.revisions { margin-top: 22px; }
.revisions li {
  display: grid;
  grid-template-columns: 76px 64px 1fr;
  gap: 16px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--soft);
  font-size: 13.5px;
  color: var(--ink);
}
.rev-cell { font-size: 11px; letter-spacing: 0.12em; color: var(--muted); }
.fineprint {
  margin-top: 26px;
  max-width: 72ch;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

/* ============================================================
   SITE DOSSIER — detail dialog
   ============================================================ */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 49, 91, 0.42);
}
.dossier {
  position: fixed;
  top: 34px; bottom: 34px; right: 34px;
  z-index: 50;
  width: min(560px, 46vw);
  border: 2px solid var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(45, 125, 210, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 125, 210, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  box-shadow: -10px 10px 0 rgba(16, 49, 91, 0.16);
  overflow-y: auto;
  opacity: 0;
  transform: translateX(26px);
  transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.dossier.open { opacity: 1; transform: none; }
.dossier-inner { padding: 0 28px 34px; }
.dossier-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  margin: 0 -28px;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
}
.dossier-kicker { color: var(--label); letter-spacing: 0.16em; }
.dossier-close {
  width: 46px; height: 46px;
  border: 2px solid var(--ink);
  background: var(--surface);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background-color 0.18s, color 0.18s, transform 0.2s;
}
.dossier-close:active { transform: scale(0.94); }
.dossier-titlebar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-top: 26px;
}
.dossier-title {
  font: 600 clamp(28px, 3vw, 38px) / 1.08 var(--display);
  letter-spacing: 0.005em;
  max-width: 15em;
}
.dossier-station {
  font: 600 58px/1 var(--display);
  color: var(--line);
  flex: none;
}
.dossier-cat {
  margin-top: 10px;
  color: var(--muted);
  letter-spacing: 0.16em;
}
.spec { margin-top: 20px; border-top: 2px solid var(--ink); }
.spec-row {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--soft);
  align-items: baseline;
}
.spec dt {
  font: 400 10.5px/1.5 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.spec dd { font-size: 15px; line-height: 1.5; color: var(--ink); }
.dossier-notes { margin-top: 26px; }
.dossier-notes p {
  font-size: 16px;
  line-height: 1.66;
  color: var(--ink);
}
.dossier-notes p + p { margin-top: 14px; }
.note-label {
  margin: 22px 0 8px !important;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
  color: var(--label) !important;
  font: 400 10.5px/1 var(--mono) !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.dossier-foot {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
  display: grid;
  gap: 12px;
}
.btn-save { width: 100%; justify-content: center; }
.btn-save[aria-pressed="true"] {
  background: var(--ink);
  color: var(--band-text);
}
.dossier-hint { letter-spacing: 0.13em; text-align: center; }

/* ============================================================
   MOTION — entrances + ambient (concept-derived)
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes march { to { stroke-dashoffset: -24; } }
@keyframes datumBlink { 50% { opacity: 0.15; } }
@keyframes countFlash { 50% { color: var(--ink); } }

.hero-copy > * { animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.hero-copy .kicker { animation-delay: 0.05s; }
.hero-copy .display { animation-delay: 0.12s; }
.hero-copy .hero-measure { animation-delay: 0.2s; }
.hero-copy .lede { animation-delay: 0.26s; }
.hero-copy .hero-actions { animation-delay: 0.32s; }
.hero-copy .hero-note { animation-delay: 0.38s; }
.siteplan { animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.18s backwards; }
.waycount.flash b { animation: countFlash 0.4s 1; }

/* ============================================================
   HOVER STATES (fine pointers only)
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
  .wordmark:hover .mark { color: var(--accent); }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 4px 4px 0 rgba(16, 49, 91, 0.18); }
  .btn-ghost:hover { background: var(--ink); color: var(--band-text); }
  .station:hover { background: var(--line); color: var(--accent-ink); }
  .station:hover::before, .station:hover::after { background: var(--line); }
  .station:hover .tip, .station:focus-visible .tip { opacity: 1; visibility: visible; }
  .tick:hover .tick-mark { transform: scale(1.3); background: var(--line); }
  .tick:hover .tick-time { color: var(--ink); }
  .row-btn:hover { background: var(--hot); }
  .row-btn:hover .row-num b { color: var(--accent); }
  .row-btn:hover .row-arrow {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--band-text);
    transform: translateX(2px);
  }
  .toggle:hover { background: var(--ink); color: var(--band-text); }
  .toggle:hover .toggle-dot { border-color: var(--band-text); }
  .wp-open:hover { text-decoration-color: var(--ink); }
  .wp-remove:hover { background: var(--ink); color: var(--band-text); }
  .wp-clear:hover { color: var(--accent); border-color: var(--accent); }
  .dossier-close:hover { background: var(--ink); color: var(--band-text); }
  .legend-steps li:hover { background: rgba(234, 242, 248, 0.06); }
  .legend-steps li:hover .step-no { color: var(--band-text); }
}

/* keyboard-visible tooltip even on coarse pointers */
.station:focus-visible .tip { opacity: 1; visibility: visible; }
.row-btn:focus-visible, .tick:focus-visible { outline-offset: -4px; }
.station:focus-visible { outline-offset: 3px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  body { padding: 14px; }
  .sheet { min-height: calc(100dvh - 28px); }
  .hero { padding: 40px 24px 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .legend { grid-template-columns: 1fr; gap: 26px; padding: 48px 24px; }
  .register { padding: 56px 24px 80px; }
  .register-body { grid-template-columns: 1fr; gap: 40px; }
  .waypoints { position: static; }
  .titleblock { padding: 40px 24px 52px; }
  .tb-grid { grid-template-columns: 1fr 1fr; }
  .tb-cell { border-bottom: 1.5px solid var(--soft); }
  .dossier {
    top: 14px; bottom: 14px; right: 14px; left: 14px;
    width: auto;
  }
}
@media (max-width: 720px) {
  .edition { display: none; }
  .masthead { padding: 10px 16px; gap: 12px; }
  .hero { padding: 32px 18px 28px; }
  .display { font-size: clamp(50px, 14.5vw, 76px); }
  .lede { font-size: 16.5px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .register { padding: 44px 18px 72px; }
  .instruments { gap: 12px; padding: 14px 14px 16px; }
  .field-search, .field-category { flex: 1 1 100%; }
  .field-toggle { margin-left: 0; flex: 1 1 100%; }
  .toggle { width: 100%; justify-content: center; }
  .row-btn {
    grid-template-columns: 46px minmax(0, 1fr) 44px;
    gap: 12px;
    padding: 16px 12px;
  }
  .row-num b { font-size: 22px; }
  .row-title { font-size: 19px; }
  .row-summary { font-size: 14px; }
  .row-meta { font-size: 10.5px; letter-spacing: 0.07em; }
  .revisions li { grid-template-columns: 64px 52px 1fr; gap: 10px; }
  .dossier-inner { padding: 0 18px 28px; }
  .dossier-head { padding: 12px 18px; margin: 0 -18px; }
  .dossier-station { font-size: 44px; }
  .spec-row { grid-template-columns: 104px 1fr; }
  .legend-steps li { grid-template-columns: 40px 1fr; gap: 12px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .plan-center, .plan-datum, .waycount.flash b { animation: none !important; }
}
