@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Azeret Mono";
  src: url("assets/fonts/azeret-mono-var.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --paper: #f2ede3;
  --paper-2: #e8e0d1;
  --paper-3: #fbf7ee;
  --ink: #1b1a17;
  --ink-soft: #655f54;
  --line: rgba(27, 26, 23, 0.16);
  --line-strong: rgba(27, 26, 23, 0.42);
  --brass: #a56b2a;
  --brass-deep: #7c4e1d;
  --brass-light: #d8a76a;
  --night: #171a18;
  --night-2: #202421;
  --night-3: #2a2f2b;
  --night-line: rgba(246, 241, 231, 0.16);
  --cream: #f6f1e7;
  --cream-soft: #b9b3a5;
  --pass: #2f6b4f;
  --partial: #a56b2a;
  --fail: #a33a2e;
  --steel: #5c6d73;
  --sage: #5d7058;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1440px;
  --sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "Azeret Mono", ui-monospace, "SFMono-Regular", monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  scrollbar-color: var(--brass) var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brass); color: var(--paper-3); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
img, svg { max-width: 100%; }
a { color: inherit; }

.mono {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brass);
  color: var(--paper-3);
  padding: 0.85rem 1.1rem;
}
.skip:focus { left: 1rem; top: 1rem; }
.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;
}

/* ---------- top bar ---------- */

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem var(--pad);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variation-settings: "wdth" 112;
}
.brand-a { font-size: 1.35rem; }
.brand-b {
  font-size: 1.35rem;
  color: var(--brass);
  font-weight: 600;
}
.tool-no {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.reset {
  margin-left: auto;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.reset:hover { background: var(--ink); color: var(--paper-3); }

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

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(165, 107, 42, 0.05), transparent 42%),
    var(--paper);
}
.hero-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--pad) clamp(1.5rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  grid-template-areas:
    "copy figure"
    "ticket ticket";
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.hero-copy { grid-area: copy; max-width: 44rem; }
.eyebrow {
  margin: 0 0 0.9rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-deep);
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.45rem, 5.6vw, 5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-variation-settings: "wdth" 110;
  max-width: 15ch;
  text-wrap: balance;
}
.standfirst {
  margin: 1.35rem 0 0;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 52ch;
}
.hero-note {
  margin: 1.15rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
}

.door-figure {
  grid-area: figure;
  margin: 0;
  align-self: stretch;
}
.door-frame {
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(27, 26, 23, 0.06) 50%, transparent 50.2%),
    var(--paper-3);
  padding: 0.5rem;
}
#doorSvg { display: block; width: 100%; height: auto; }
.door-figure figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.door-figure figcaption .mono { color: var(--ink); }

.frame rect { fill: var(--paper-2); stroke: var(--line-strong); stroke-width: 1.2; }
.frame line { stroke: var(--line-strong); stroke-width: 1; }
.slab rect { fill: var(--paper-3); stroke: var(--ink); stroke-width: 1.4; }
#doorSvg[data-door="steel"] .slab rect { fill: #e2e6e4; }
#doorSvg[data-door="steel"] .slab line { stroke: #5c6d73; }
.slab line { stroke: var(--ink); stroke-width: 0.8; opacity: 0.55; }
.hw-bolt { fill: var(--ink); }
.hw-rose { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.4; }
.hw-thumb { fill: var(--brass); stroke: var(--brass-deep); stroke-width: 1; }
.hw-key { fill: var(--paper-3); stroke: var(--ink); stroke-width: 1.2; }
.hw-keyhole { fill: var(--ink); }
.hw-mortise { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.2; }
.hw-lever { fill: var(--brass); stroke: var(--brass-deep); stroke-width: 1; }
.hw-latch { fill: var(--ink); }
.dims line { stroke: var(--brass); stroke-width: 1; }
.dim-text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  fill: var(--brass-deep);
  text-anchor: start;
}
.labels .label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  fill: var(--ink-soft);
  text-anchor: middle;
}
.labels .label.strong {
  font-size: 10px;
  fill: var(--ink);
  letter-spacing: 0.12em;
}
.door-wall rect:first-child {
  fill: var(--paper-2);
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.door-wall .frame-inner {
  fill: var(--paper-3);
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.front-door .door-slab {
  fill: var(--paper-3);
  stroke: var(--ink);
  stroke-width: 1.4;
}
.front-door .door-panel {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
}
.front-door .hinge {
  fill: var(--brass);
  opacity: 0.75;
}
.front-hw-plate {
  fill: var(--paper-2);
  stroke: var(--ink);
  stroke-width: 1.2;
}
.front-hw-dot { fill: var(--ink); }
.front-hw-finger {
  fill: none;
  stroke: var(--brass-deep);
  stroke-width: 1.5;
}
.front-hw-key {
  fill: var(--paper-3);
  stroke: var(--ink);
  stroke-width: 1.2;
}
.front-hw-keyhole { fill: var(--ink); }
.front-hw-lever {
  fill: var(--brass);
  stroke: var(--brass-deep);
  stroke-width: 1;
}
.leader-line {
  stroke: var(--brass-deep);
  stroke-width: 0.8;
}
.leader-text {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--ink-soft);
}
.edge-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--ink);
}
#doorSvg[data-door="steel"] .front-door .door-slab { fill: #e2e6e4; }
#doorSvg[data-door="steel"] .front-door .door-panel { stroke: #5c6d73; }
#doorSvg[data-door="latch"] .leader-smart,
#doorSvg[data-door="latch"] .leader-deadbolt { display: none; }

.ticket {
  grid-area: ticket;
  margin: 0;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "top top"
    "body body"
    "foot foot";
}
.ticket-top {
  grid-area: top;
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(246, 241, 231, 0.2);
}
.ticket-top .mono { color: var(--cream-soft); }
.ticket-body {
  grid-area: body;
  padding: 1rem 1rem 0.85rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: 1rem;
  align-items: end;
}
.ticket-big {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.ticket-sub {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--cream-soft);
}
.ticket-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}
.ticket-grid dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-soft);
}
.ticket-grid dd {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.ticket-foot {
  grid-area: foot;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid rgba(246, 241, 231, 0.2);
  font-size: 0.9rem;
}
.ticket-foot .stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 2.35rem;
  padding: 0 0.5rem;
  background: var(--brass-deep);
  color: var(--paper-3);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
}
.ticket-foot a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--brass);
}
.ticket-foot a:hover { border-bottom-color: var(--cream); }
.ticket-stock {
  display: inline-block;
  margin-left: 0.35rem;
  color: #df8a7c;
  font-size: 0.75rem;
}

/* ---------- build ---------- */

.build { border-bottom: 1px solid var(--line); }
.build-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--pad);
}
.build-head, .access-head, .sec-head, .week-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
}
.build-head h2, .access-head h2, .sec-head h2, .week-head h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variation-settings: "wdth" 108;
}
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}
.preset {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}
.preset:hover { border-color: var(--ink); color: var(--ink); }
.preset[aria-checked="true"] {
  background: var(--brass-deep);
  border-color: var(--brass-deep);
  color: var(--paper-3);
}

.controls {
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.5rem;
}
.control {
  border-top: 1px solid var(--line-strong);
  padding-top: 0.75rem;
}
.control-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}
.control-label h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.control-label .mono { font-size: 0.6875rem; }
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.seg button {
  flex: 1 1 auto;
  min-width: 7.5rem;
  min-height: 56px;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--paper-3);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.seg button b { display: block; font-size: 0.875rem; font-weight: 600; }
.seg button span { display: block; margin-top: 0.15rem; font-size: 0.75rem; line-height: 1.35; color: var(--ink-soft); }
.seg button:hover { border-color: var(--ink); }
.seg button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-3);
}
.seg button[aria-pressed="true"] span { color: var(--cream-soft); }
.control-wide { grid-column: 1 / -1; }

.budget-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}
input[type="range"] {
  width: 100%;
  height: 2px;
  appearance: none;
  background: linear-gradient(90deg, var(--brass) var(--fill, 40%), var(--line) var(--fill, 40%));
  border: 0;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 1px var(--brass-deep);
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--brass);
}
.budget-out {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-width: 5rem;
  text-align: right;
}

.access-head { margin-top: clamp(2.2rem, 4vw, 3.4rem); }
.access-count {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.chips {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  min-height: 52px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.chip b { display: block; font-size: 0.9rem; font-weight: 600; }
.chip span { display: block; font-size: 0.75rem; color: var(--ink-soft); }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper-3); border-color: var(--ink); }
.chip[aria-pressed="true"] span { color: var(--cream-soft); }
.access-note {
  margin: 0.8rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

/* ---------- week ---------- */

.week {
  background: var(--night);
  color: var(--cream);
  border-bottom: 1px solid var(--ink);
}
.week-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--pad);
}
.week .mono { color: var(--cream-soft); }
.week-head h2 { color: var(--cream); }
.week-clock {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  white-space: nowrap;
}
.week-clock strong {
  font-family: var(--mono);
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.week-clock .mono:last-child { color: var(--brass-light); }

.timeline {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}
.tl-dot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 2.2rem;
  padding: 0.35rem 0.2rem;
  border: 0;
  background: transparent;
  color: var(--cream-soft);
  font: inherit;
  cursor: pointer;
}
.tl-dot i {
  display: block;
  width: 100%;
  height: 5px;
  background: var(--night-3);
  border: 1px solid var(--night-line);
}
.tl-dot span {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
}
.tl-dot:hover i { border-color: var(--brass); }
.tl-dot[data-done="1"] i { background: var(--brass); border-color: var(--brass); }
.tl-dot[data-current="1"] i { background: var(--cream); border-color: var(--cream); }
.tl-dot[data-current="1"] { color: var(--cream); }
.tl-dot[aria-label]:focus-visible { outline-color: var(--cream); }

.event {
  margin-top: 1rem;
  border: 1px solid var(--night-line);
  background: var(--night-2);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 2fr);
  gap: 1rem 1.5rem;
}
.event-time {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-light);
}
.event h3 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.event-brief {
  margin: 0.5rem 0 0;
  color: var(--cream-soft);
  font-size: 0.9rem;
  max-width: 46ch;
}
.event-test {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--cream);
}
.event-test b { color: var(--brass-light); font-weight: 600; }
.event-side {
  border-left: 1px solid var(--night-line);
  padding-left: 1.2rem;
}
.event-side .event-brief { margin-top: 0.35rem; }

.stations {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.station {
  border: 1px solid var(--night-line);
  background: var(--night-2);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 13rem;
}
.station-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.6rem;
}
.station-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}
.station-name a { color: var(--cream); text-decoration: none; border-bottom: 1px solid transparent; }
.station-name a:hover { border-bottom-color: var(--brass); }
.station-tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-soft);
}
.station-stamp {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 1.7rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-soft);
}
.station-stamp.cleared { color: #8fc7a7; }
.station-stamp.compromised { color: #d8a76a; }
.station-stamp.failed { color: #df8a7c; }
.station-response {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--cream);
  flex: 1;
}
.station-bar {
  display: flex;
  gap: 0.25rem;
}
.station-bar i {
  flex: 1;
  height: 5px;
  background: var(--night-3);
  border: 1px solid var(--night-line);
}
.station-bar i.on { background: var(--brass); border-color: var(--brass); }
.station-bar i.half { background: var(--brass-deep); border-color: var(--brass-deep); }
.station-round {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-soft);
}
.station-total {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-soft);
}
.station-total b { color: var(--cream); font-size: 0.8rem; }

.scoreboard {
  margin-top: 1rem;
  border-top: 1px solid var(--night-line);
  padding-top: 0.9rem;
  display: grid;
  gap: 0.55rem;
}
.score-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 3fr) auto;
  gap: 0.8rem;
  align-items: center;
}
.score-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.score-name a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.score-name a:hover { border-bottom-color: var(--brass-light); }
.score-track {
  height: 10px;
  background: var(--night-3);
  border: 1px solid var(--night-line);
  position: relative;
}
.score-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brass);
  transition: width 420ms ease;
}
.score-row:nth-child(2) .score-fill { background: var(--steel); }
.score-row:nth-child(3) .score-fill { background: var(--sage); }
.score-value {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--cream);
  white-space: nowrap;
}

.week-foot {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.play, .step {
  min-height: 48px;
  padding: 0.7rem 1.05rem;
  border: 1px solid var(--brass-deep);
  background: var(--brass-deep);
  color: var(--paper-3);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.play:hover, .step:hover { background: var(--brass-deep); border-color: var(--brass-deep); }
.play:hover { background: var(--ink); border-color: var(--ink); }
.step {
  background: transparent;
  color: var(--cream);
  border-color: var(--night-line);
}
.step:hover { background: var(--night-3); border-color: var(--cream); }
.play:disabled, .step:disabled { opacity: 0.45; cursor: not-allowed; }
.run-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--cream-soft);
  max-width: 46ch;
}
.empty {
  border: 1px dashed var(--night-line);
  background: var(--night-2);
  padding: 1.2rem;
  color: var(--cream-soft);
  font-size: 0.9rem;
}
.empty b { color: var(--cream); }

/* ---------- verdict ---------- */

.verdict {
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.verdict-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--pad);
}
.cards {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.card {
  border: 1px solid var(--line-strong);
  background: var(--paper-3);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.card.is-top {
  border-top: 4px solid var(--brass);
  padding-top: 0.85rem;
}
.card-rank {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.card.is-top .card-rank { color: var(--brass-deep); }
.card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
}
.card-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.card-name a { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.card-name a:hover { border-bottom-color: var(--brass); }
.card-price {
  margin: 0.25rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.card-note {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.card-stock {
  margin: 0.2rem 0 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fail);
}
.card-warning {
  margin: 0.3rem 0 0;
  padding: 0.4rem 0.5rem;
  border-left: 2px solid var(--brass-deep);
  background: rgba(165, 107, 42, 0.08);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.card-warning b { color: var(--brass-deep); }
.card-score {
  text-align: right;
  flex: 0 0 auto;
}
.card-score strong {
  display: block;
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1;
}
.card-score span {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.card-over {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--fail);
  color: var(--fail);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.card-body {
  display: grid;
  gap: 0.55rem;
  font-size: 0.84rem;
  line-height: 1.5;
}
.card-row {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.5rem;
}
.card-row dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.12rem;
}
.card-row dd { margin: 0; }
.card-row dd b { font-weight: 600; }
.card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brass-deep);
}
.card-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.card-link:hover { color: var(--ink); }

.not-buy {
  margin: 1.2rem 0 0;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--fail);
  background: var(--paper-3);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.not-buy b { color: var(--ink); }

.levers { margin-top: 2rem; }
.lever-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}
.lever {
  min-height: 44px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}
.lever:hover { background: var(--ink); color: var(--paper-3); }
.lever-note {
  margin: 0.7rem 0 0;
  font-size: 0.84rem;
  color: var(--ink-soft);
  min-height: 1.3rem;
}

/* ---------- catalogue ---------- */

.catalogue {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--pad);
}
.table-wrap {
  margin-top: 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
}
table {
  width: 100%;
  min-width: 62rem;
  border-collapse: collapse;
  background: var(--paper-3);
}
.catalogue-static { min-width: 44rem; }
.catalogue-static caption {
  caption-side: top;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
th {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink-soft);
  white-space: nowrap;
}
td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(165, 107, 42, 0.06); }
td.lock-cell a {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}
td.lock-cell a:hover { border-bottom-color: var(--brass); }
td .sub {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
td .sub.warn, td .sub.reason {
  margin-top: 0.35rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0;
  line-height: 1.4;
  white-space: normal;
}
td .sub.warn { color: var(--brass-deep); }
td .sub.reason { color: var(--fail); }
td .table-link {
  font-weight: 600;
  color: var(--brass-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--brass);
  white-space: nowrap;
}
td .table-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.fit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.fit-pill.high { color: var(--pass); }
.fit-pill.mid { color: var(--brass-deep); }
.fit-pill.low { color: var(--fail); }
.fit-pill.none { color: var(--ink-soft); }
tr.is-out td { color: var(--ink-soft); }
tr.is-out td.lock-cell a { color: var(--ink-soft); }
.table-note {
  margin: 0.8rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  max-width: 70ch;
}

/* ---------- method ---------- */

.method {
  border-top: 1px solid var(--line-strong);
  background: var(--paper-2);
}
.method details {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.method summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  cursor: pointer;
  list-style: none;
}
.method summary::-webkit-details-marker { display: none; }
.method summary .mono:first-child { color: var(--ink); }
.method summary .mono:last-child { color: var(--brass-deep); }
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding: 0 0 2.5rem;
}
.method h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.method p {
  margin: 0 0 0.8rem;
  font-size: 0.84rem;
  line-height: 1.62;
  color: var(--ink-soft);
}
.weights {
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
}
.weights li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--line-strong);
  font-size: 0.82rem;
}
.weights li span:first-child { flex: 1; }
.weights li span:last-child {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink);
}
.conflicts, .sources {
  margin: 0;
  padding: 0;
  list-style: none;
}
.conflicts li, .sources li {
  padding: 0.45rem 0;
  border-bottom: 1px dotted var(--line-strong);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.conflicts a, .sources a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}
.conflicts a:hover, .sources a:hover { border-bottom-color: var(--brass); }
.fine {
  font-size: 0.75rem !important;
  color: var(--ink-soft) !important;
}

/* ---------- footer ---------- */

.foot {
  background: var(--ink);
  color: var(--cream);
  border-top: 4px solid var(--brass);
}
.foot-disclosure {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.3rem var(--pad) 1rem;
  border-bottom: 1px solid rgba(246, 241, 231, 0.16);
}
.foot-disclosure p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--cream-soft);
  max-width: 90ch;
}
.foot-disclosure b { color: var(--cream); }
.foot-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--pad) 1.4rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.foot-mark {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.foot-in .mono { color: var(--cream-soft); }

/* ---------- motion ---------- */

@keyframes stamp-in {
  0% { transform: scale(0.82); opacity: 0; }
  60% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.station-stamp { animation: stamp-in 260ms ease-out both; }
.score-fill { transition: width 420ms ease; }

@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;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero-in {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.72fr);
  }
  .ticket-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card:first-child { grid-column: 1 / -1; }
  .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero-in {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "figure"
      "ticket";
  }
  .hero h1 { max-width: 18ch; }
  .door-figure { max-width: 34rem; }
  .build-head, .access-head, .sec-head, .week-head {
    flex-direction: column;
    align-items: start;
  }
  .presets { justify-content: flex-start; }
  .controls { grid-template-columns: 1fr; }
  .control-wide { grid-column: auto; }
  .stations { grid-template-columns: 1fr; }
  .station { min-height: 0; }
  .event { grid-template-columns: 1fr; }
  .event-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--night-line); padding-top: 0.8rem; }
  .cards { grid-template-columns: 1fr; }
  .card:first-child { grid-column: auto; }
  .method-grid { grid-template-columns: 1fr; gap: 1.4rem; }
}

@media (max-width: 640px) {
  .topbar-in { gap: 1rem; }
  .tool-no { display: none; }
  .hero-in { padding-top: 2rem; }
  .hero h1 { font-size: clamp(2.3rem, 11vw, 3.4rem); }
  .ticket-body { grid-template-columns: 1fr; }
  .ticket-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg button { min-width: 100%; }
  .score-row { grid-template-columns: 1fr auto; }
  .score-track { grid-column: 1 / -1; grid-row: 2; }
  .score-name { white-space: normal; }
  .week-clock strong { font-size: 1.1rem; }
  .card-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .foot-in { flex-direction: column; gap: 0.3rem; }
}
/* Related decisions, last-checked line and touch targets (added 2026-11-06) */
.related-tools { padding-top: 1.6rem; }
.related-title { margin: 0 0 0.5rem; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.65; }
.related-tools ul { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.related-tools a { color: inherit; opacity: 0.9; }
.related-tools a:hover { opacity: 1; text-decoration: underline; }
.last-checked { margin: 0.55rem 0 0; font-size: 0.72rem; letter-spacing: 0.02em; opacity: 0.7; }

/* The quotable answer under the h1. */
.lede-answer { max-width: 62ch; margin: 0 0 0.9rem; font-size: 1.06em; line-height: 1.6; }
