/* Mintworks: a small mint. Cream paper, graphite iron, struck copper.
   The coin press is the only motif: the hero strikes blanks and stacks them, the dollar story
   rolls a coin along its track, the split is counted in coins, empty states are unstruck blanks.
   Every colour is a token below. Fonts are self-hosted so the CSP stays self-only. */

@font-face { font-family: "Bricolage Grotesque"; src: url(/fonts/bricolage-grotesque.woff2) format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/fonts/plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* paper */
  --bg: #f3ece0;
  --surface: #ebe2d3;
  --surface-2: #e2d6c3;
  --surface-3: #d5c7b0;
  --line: #ddd1bd;
  --line-2: #c9b99f;
  /* ink */
  --text: #1d1a17;
  --body: #3e3831;
  --muted: #6c6257;
  /* struck copper */
  --accent: #b4532a;
  --accent-2: #c4612f;
  --accent-hi: #e8935a;
  --accent-side: #86391a;
  --accent-ink: #fff6ec;
  --ember: #f2a467;
  --raw: #9a8f83;
  /* iron and patina */
  --graphite: #221f1c;
  --graphite-2: #302c28;
  --graphite-3: #403a35;
  --on-dark: #f3ece0;
  --on-dark-muted: #b4a796;
  --patina: #3d7365;
  --danger: #b3261e;
  --focus-ring: rgba(180, 83, 42, .24);
  --shadow: rgba(34, 31, 28, .18);

  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(72px, 10vw, 144px);
  --radius: 14px;
  --radius-sm: 9px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-reveal: 800ms;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; color: var(--text); font-weight: 600; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- type ---------- */
.display, .display-2, .fig-big { font-family: var(--display); font-optical-sizing: auto; }
.display { font-size: clamp(46px, 8.4vw, 112px); font-weight: 700; letter-spacing: -.045em; line-height: .94; }
.display-2 { font-size: clamp(32px, 4.6vw, 60px); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.kicker { font-size: 14px; font-weight: 600; margin: 0 0 12px; color: var(--accent); }
.lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; max-width: 34em; color: var(--body); }
.small { font-size: 13px; line-height: 1.55; color: var(--muted); }
.fig, .e-amt, .e-date, td.num, .rail b, .g-figs dd, .tally dd, .split-out dd, output { font-variant-numeric: tabular-nums; }
.e-date, .e-ref, .e-amt, td.num, .holder-addr, .lookup input { font-family: var(--mono); }
.plate {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--body);
  white-space: nowrap;
}
.plate::first-letter { text-transform: uppercase; }
.link { font-weight: 600; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; }
.link::after { content: ""; width: 16px; height: 2px; background: currentColor; transition: width var(--t-hover) var(--ease-out); }
.link:hover { color: var(--accent); }
.link:active { transform: translateY(1px); }
.link:hover::after { width: 26px; }
.error { color: var(--danger); font-weight: 600; }

/* ---------- layout ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.band { padding: var(--section) 0; position: relative; overflow-x: clip; }
.band-alt { background: var(--surface); }
.page-top { padding-top: clamp(48px, 7vw, 96px); min-height: 70vh; }
.page-head { max-width: 820px; margin-bottom: clamp(36px, 5vw, 64px); }
.page-head .display { margin-bottom: 24px; font-size: clamp(44px, 7vw, 96px); }
.split { display: grid; gap: 36px var(--gutter); }
.split-side .display-2 { margin-bottom: 20px; }
.split-side p { max-width: 28em; font-size: 17px; }
@media (min-width: 900px) {
  .split { grid-template-columns: repeat(12, 1fr); align-items: start; }
  .split-side { grid-column: 1 / 5; position: sticky; top: 112px; }
  .split-main { grid-column: 6 / 13; }
  .split-flip .split-side { grid-column: 9 / 13; grid-row: 1; }
  .split-flip .split-main { grid-column: 1 / 8; grid-row: 1; }
}

/* ---------- masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  padding: 0 var(--gutter);
  background: var(--bg);
  transition: background-color var(--t-hover);
}
.scrolled .masthead { background: var(--surface); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 21px/1 var(--display); letter-spacing: -.03em; color: var(--text); }
.wordmark img { border-radius: 7px; transition: transform var(--t-hover) var(--ease-out); }
.wordmark:hover img { transform: rotate(-6deg) scale(1.06); }
.plate-status { color: var(--accent); margin-left: auto; }
.x-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  transition: background-color var(--t-hover), color var(--t-hover), transform var(--t-press) var(--ease-out);
}
.x-btn:hover { background: var(--surface-3); color: var(--accent); }
.x-btn:active { transform: scale(.94); }
.x-btn svg { transition: transform var(--t-hover) var(--ease-out); }
.x-btn:hover svg { transform: rotate(-8deg) scale(1.1); }
.wordmark:active img { transform: rotate(-14deg) scale(.94); }
.menu-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  background: var(--surface-2);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font: 600 15px/1 var(--sans);
  cursor: pointer;
  transition: background-color var(--t-hover), transform var(--t-press) var(--ease-out);
}
.menu-btn:active { transform: scale(.96); }
.bars, .bars::before { display: block; width: 16px; height: 2px; border-radius: 1px; background: currentColor; transition: transform .25s var(--ease-out); }
.bars { position: relative; transform: translateY(-3px); }
.bars::before { content: ""; position: absolute; top: 6px; }
.menu-open .bars { transform: translateY(0) rotate(45deg); }
.menu-open .bars::before { transform: translateY(-6px) rotate(-90deg); }
#nav { display: none; }
.menu-open #nav {
  display: flex; flex-direction: column;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--surface);
  padding: 8px var(--gutter) 24px;
  box-shadow: 0 24px 48px var(--shadow);
}
#nav a { text-decoration: none; font: 700 30px/1 var(--display); letter-spacing: -.03em; color: var(--muted); padding: 14px 0; transition: color var(--t-hover), transform var(--t-hover) var(--ease-out); }
#nav a:hover, #nav a[aria-current] { color: var(--text); }
#nav a:hover { transform: translateX(4px); }
#nav a[aria-current]::after { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-left: 12px; vertical-align: .12em; }
@media (prefers-reduced-motion: no-preference) {
  .menu-open #nav a { animation: nav-in .42s var(--ease-out) both; }
  .menu-open #nav a:nth-child(2) { animation-delay: 40ms; }
  .menu-open #nav a:nth-child(3) { animation-delay: 80ms; }
  .menu-open #nav a:nth-child(4) { animation-delay: 120ms; }
  .menu-open #nav a:nth-child(5) { animation-delay: 160ms; }
}
@keyframes nav-in { from { opacity: 0; transform: translateY(-10px); } }
@media (min-width: 900px) {
  .menu-btn { display: none; }
  #nav { display: flex; margin-left: auto; gap: 2px; }
  #nav a { font: 600 15px/1 var(--sans); letter-spacing: 0; padding: 12px 14px; border-radius: var(--radius-sm); }
  #nav a { position: relative; }
  #nav a:hover { background: var(--surface-2); }
  #nav a::before { content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 1px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .28s var(--ease-out); }
  #nav a:hover::before { transform: scaleX(1); }
  #nav a[aria-current] { color: var(--text); }
  #nav a[aria-current]::after { width: 6px; height: 6px; border-radius: 2px; margin-left: 8px; vertical-align: .15em; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 24px;
  border-radius: var(--radius-sm);
  font: 600 16px/1 var(--sans);
  text-decoration: none; cursor: pointer;
  border: 0;
  transition: background-color var(--t-hover), color var(--t-hover), transform var(--t-press) var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn, .tab, .x-btn, .menu-btn, .sound { position: relative; overflow: hidden; isolation: isolate; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(105deg, transparent 30%, rgba(255, 246, 236, .32) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease-out); }
.btn:hover::before { transform: translateX(120%); }
.ping::after { content: ""; position: absolute; left: var(--px, 50%); top: var(--py, 50%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; pointer-events: none; }
.btn-pour:active, .btn-ink:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--accent-side); }
.btn-pour { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 -4px 0 var(--accent-side); }
.btn-pour:hover { background: var(--accent-2); }
.btn-line { background: var(--surface-2); color: var(--text); }
.btn-line:hover { background: var(--surface-3); }
.btn-ink { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 -4px 0 var(--accent-side); }
.btn-ink:hover { background: var(--accent-2); }
.btn-ghost { background: var(--graphite-2); color: var(--on-dark); }
.btn-ghost:hover { background: var(--graphite-3); }
.arr { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--t-hover) var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- hero ---------- */
.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(56px, 8vw, 112px); position: relative; overflow: clip; }
.hero-grid { display: grid; gap: 40px var(--gutter); align-items: center; }
.hero-title { margin-bottom: 28px; }
.lines .line { display: block; }
.mask { display: inline-block; overflow: clip; padding-bottom: .1em; margin-bottom: -.1em; vertical-align: top; }
.mask [data-line] { display: inline-block; }
.hero .actions { margin-top: 36px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; justify-self: center; width: min(100%, 320px); will-change: transform; }
.press-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: var(--radius); }
.press-btn:active .press { transform: scale(.985); }
.press { width: 100%; height: auto; overflow: visible; transition: transform var(--t-press) var(--ease-out); }
.hero-art::before { content: ""; position: absolute; inset: -14% -18%; background: url(/engrave.svg) center / contain no-repeat; opacity: .2; pointer-events: none; }
.press-btn { position: relative; }
.press-foot { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 10px; }
.sound { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface-2); font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; transition: background-color var(--t-hover), color var(--t-hover), transform var(--t-press) var(--ease-out); }
.sound:hover { background: var(--surface-3); color: var(--text); }
.sound:active { transform: scale(.95); }
.sound path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sound .spk { fill: currentColor; }
.sound .wave, .sound[aria-pressed="true"] .mute { display: none; }
.sound[aria-pressed="true"] .wave { display: inline; }
.sound[aria-pressed="true"] { color: var(--accent); }
.press-hint { margin: 0; text-align: center; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.p-shadow { fill: var(--shadow); }
.p-base, .p-anvil, .p-bar { fill: var(--graphite-2); }
.p-frame, .p-die, .p-hub, .p-weight { fill: var(--graphite); }
.p-beam, .p-rivet, .p-screw, .p-shaft { fill: var(--graphite-3); }
.p-thread { stroke: var(--graphite); stroke-width: 3; }
.p-dieface { fill: var(--accent-side); }
.p-shine { fill: var(--graphite-3); }
.p-boss { fill: var(--accent); }
.p-glow { opacity: 0; }
.c-edge { fill: var(--accent); }
.c-top { fill: var(--accent-hi); }
.c-raw { fill: var(--raw); }
.sparks line { stroke: var(--ember); stroke-width: 4; stroke-linecap: round; }
.sparks, .sc { opacity: 0; }
.sc.on { opacity: 1; }
.ram, .blank, .stack, .sparks { will-change: transform; }
.arm { transform-origin: 170px 19px; }
.blank { transform-box: fill-box; transform-origin: 50% 100%; }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: 28px var(--gutter); margin: clamp(56px, 8vw, 96px) auto 0; }
.figs > div { min-width: 0; }
.figs dt { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.figs dd { margin: 0; font: 700 clamp(34px, 5vw, 64px)/1 var(--display); letter-spacing: -.035em; color: var(--text); overflow-wrap: anywhere; }
@media (min-width: 560px) { .hero-art { width: min(100%, 380px); } }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: repeat(12, 1fr); }
  .hero-copy { grid-column: 1 / 8; }
  .hero-art { grid-column: 8 / 13; width: min(100%, 460px); }
  .figs { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- story: how a dollar moves ---------- */
.story-grid { display: grid; gap: 0 var(--gutter); }
.story-side { display: contents; }
.story-head { margin-bottom: 32px; }
.story-head .display-2 { margin-bottom: 16px; }
.story-head p { color: var(--muted); max-width: 30em; font-size: 17px; margin: 0; }
.story-rail { position: sticky; top: 64px; z-index: 5; background: var(--bg); padding: 14px 0; margin: 0 calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.track { position: relative; display: flex; justify-content: space-between; align-items: center; height: 36px; }
.track::before { content: ""; position: absolute; left: 18px; right: 18px; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--surface-2); }
.track i { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); transition: background-color .4s var(--ease-out), transform .4s var(--ease-out); }
.track i::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface-3); transition: background-color .4s; }
.track i.done { background: var(--surface-3); }
.track i.done::after { background: var(--accent); opacity: .7; }
.runner { position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 3px var(--accent-side), 0 6px 14px var(--shadow); will-change: transform; }
.runner::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 2px solid var(--accent-hi); }
ol.line { list-style: none; margin: 0; padding: 0; }
ol.line li { padding: 36px 0; transition: opacity .5s var(--ease-out); }
ol.line h3 { font: 700 clamp(28px, 3.4vw, 44px)/1.02 var(--display); letter-spacing: -.03em; margin-bottom: 12px; }
ol.line p { font-size: 17px; max-width: 30em; margin-bottom: 18px; }
ol.line .fig { display: inline-block; font: 700 clamp(22px, 2.4vw, 30px)/1 var(--display); letter-spacing: -.02em; color: var(--accent); }
.js-motion ol.line li { opacity: .35; }
.js-motion ol.line li.on { opacity: 1; }
@media (min-width: 900px) {
  .story-grid { grid-template-columns: repeat(12, 1fr); }
  .story-side { display: block; grid-column: 1 / 6; position: sticky; top: 104px; align-self: start; }
  .story-rail { position: static; margin: 0; padding: 0; background: none; }
  .track { flex-direction: column; align-items: flex-start; height: min(400px, calc(100vh - 380px)); min-height: 300px; width: 56px; margin-top: 40px; }
  .track i::before { content: attr(data-l); position: absolute; left: 80px; top: 50%; transform: translateY(-50%); white-space: nowrap; font: 700 24px/1 var(--display); letter-spacing: -.02em; color: var(--muted); transition: color .4s; }
  .track i.done::before { color: var(--body); }
  .track i.here::before { color: var(--text); }
  .track::before { left: 50%; right: auto; top: 28px; bottom: 28px; width: 4px; height: auto; margin: 0 0 0 -2px; }
  .track i, .runner { width: 56px; height: 56px; border-radius: 50%; }
  .track i::after, .runner::after { inset: 14px; }
  ol.line { grid-column: 7 / 13; padding: 4vh 0 8vh; }
  ol.line li { padding: 13vh 0; }
  ol.line li:first-child { padding-top: 0; }
}

/* ---------- the split ---------- */
.split-grid { display: grid; gap: 40px var(--gutter); align-items: center; }
.split-copy .display-2 { margin-bottom: 20px; }
.split-copy p { font-size: 17px; max-width: 26em; }
.flow { width: 100%; height: auto; margin: -8px 0 16px; overflow: visible; }
.fl-band { fill: none; stroke-linecap: round; transition: opacity .25s var(--ease-out); }
.fl-h { stroke: var(--accent); opacity: .8; }
.fl-s { stroke: var(--surface-3); }
.fl-hit { fill: none; stroke: transparent; stroke-width: 36; pointer-events: stroke; }
.flow[data-hl="h"] .fl-s, .flow[data-hl="s"] .fl-h { opacity: .3; }
.flow[data-hl="h"] .fl-h { opacity: 1; }
.fl-cu { fill: var(--accent); }
.fl-iron { fill: var(--graphite-3); }
.fl-ring { fill: none; stroke: var(--accent-hi); stroke-width: 2.5; }
.fl-ring-d { fill: none; stroke: var(--on-dark-muted); stroke-width: 2.5; }
.fl-src { cursor: pointer; transform-box: fill-box; transform-origin: center; transition: transform var(--t-hover) var(--ease-out); }
.fl-src:hover { transform: scale(1.08); }
.fl-src:active { transform: scale(.94); }
.fl-coin { fill: var(--accent-hi); stroke: var(--accent-side); stroke-width: 1.5; }
.fl-coin.s { fill: var(--graphite-3); stroke: var(--graphite); }
.fl-t { font: 600 13px var(--sans); fill: var(--muted); }
.fl-th { fill: var(--accent); }
.slide-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 600; color: var(--text); margin-bottom: 8px; flex-wrap: wrap; }
.slide-label output { font: 700 28px/1 var(--display); letter-spacing: -.02em; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; margin: 0 0 20px; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: var(--surface-3); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--surface-3); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -12px; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 3px var(--accent-side), 0 3px 8px var(--shadow); transition: transform var(--t-press) var(--ease-out); }
input[type="range"]::-moz-range-thumb { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 3px var(--accent-side); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
input[type="range"]:focus-visible { outline-offset: 0; }
.split-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.split-out > div { background: var(--bg); border-radius: var(--radius); padding: 16px; min-width: 0; transition: box-shadow .25s var(--ease-out), transform .25s var(--ease-out); }
.split-out > div.hl { box-shadow: inset 0 0 0 2px var(--accent); transform: translateY(-2px); }
.split-out > div:last-child { grid-column: 1 / -1; }
.split-out dt { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.split-out dd { margin: 0; font: 700 clamp(24px, 3vw, 32px)/1.05 var(--display); letter-spacing: -.02em; color: var(--text); overflow-wrap: anywhere; }
.split-out .to-holders dd { color: var(--accent); }
@media (min-width: 900px) {
  .split-grid { grid-template-columns: repeat(12, 1fr); }
  .split-copy { grid-column: 1 / 6; }
  .splitter { grid-column: 7 / 13; }
  .split-out { grid-template-columns: repeat(3, 1fr); }
  .split-out > div:last-child { grid-column: auto; }
}

/* ---------- closer ---------- */
.closer { background: var(--graphite); color: var(--on-dark); overflow: clip; }
.closer::before { content: ""; position: absolute; right: -180px; top: 50%; width: 640px; height: 640px; margin-top: -320px; background: url(/engrave.svg) center / contain no-repeat; opacity: .22; pointer-events: none; }
.closer-grid { position: relative; }
.closer-grid { display: grid; gap: 32px; }
.closer-line { font: 700 clamp(40px, 7vw, 96px)/.96 var(--display); letter-spacing: -.045em; color: var(--on-dark); margin: 0; max-width: 12em; }
.closer :focus-visible { outline-color: var(--accent-hi); }

/* ---------- the strike: brief to coin, pinned and driven by scroll ---------- */
.strike-band { position: relative; background: var(--surface); }
.strike-stage { padding: var(--section) 0; }
.strike-grid { display: grid; gap: 28px var(--gutter); align-items: center; }
.strike-copy .display-2 { margin-bottom: 28px; }
.strike-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.step-n { display: block; margin-bottom: 8px; font: 500 12px/1 var(--mono); letter-spacing: .08em; color: var(--accent); }
.strike-steps h3 { font: 700 clamp(24px, 3vw, 36px)/1.05 var(--display); letter-spacing: -.03em; margin-bottom: 8px; }
.strike-steps p { margin: 0; max-width: 26em; font-size: 17px; }
.strike-art-wrap { position: relative; justify-self: center; width: min(100%, 420px); }
.strike-art-wrap::before { content: ""; position: absolute; inset: -6%; background: url(/engrave.svg) center / contain no-repeat; opacity: .28; pointer-events: none; }
.strike-art { position: relative; width: 100%; height: auto; overflow: visible; }
.strike-meter { display: none; }
.sk-paper { fill: #fbf6ee; stroke: var(--line-2); stroke-width: 1.5; }
.sk-label { font: 500 7px var(--mono); letter-spacing: .1em; fill: var(--muted); }
.sk-plan { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 3; opacity: .45; }
.sk-blk { fill: var(--accent); }
.sk-blk.b2 { fill: var(--graphite-3); }
.sk-path { fill: none; stroke: var(--patina); stroke-width: 2.5; stroke-dasharray: 5 4; stroke-linecap: round; }
.sk-orb { fill: var(--ember); stroke: var(--accent-side); stroke-width: 1.5; }
.sk-reed { fill: none; stroke: var(--accent-side); stroke-width: 6; stroke-dasharray: 2.5 3.3; opacity: .8; }
.sk-field { fill: var(--accent-2); }
.sk-eng { fill: var(--accent-side); }
.sk-eng-hi { fill: var(--accent-hi); opacity: .8; }
.sk-beads { fill: none; stroke: var(--accent-hi); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0 7.59; }
.sk-sheen { fill: none; stroke: #fff3e6; stroke-width: 4; stroke-linecap: round; opacity: .55; }
.sk-glow, .sk-sparks, .sk-side, .sk-face, .sk-slot { opacity: 0; }
.sk-sparks line { stroke: var(--ember); stroke-width: 4; stroke-linecap: round; }
.js-motion .strike-band { height: 320vh; }
.js-motion .strike-stage { position: sticky; top: 64px; height: calc(100vh - 64px); height: calc(100svh - 64px); padding: 0; display: flex; align-items: center; overflow: hidden; }
.js-motion .strike-grid { width: 100%; }
.js-motion .strike-steps { gap: 0; }
.js-motion .strike-steps li { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); transition: opacity .4s var(--ease-out), transform .5s var(--ease-out); }
.js-motion .strike-steps li.on { opacity: 1; transform: none; }
.js-motion .strike-meter { display: block; max-width: 320px; height: 3px; margin-top: 24px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.strike-meter i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
@media (max-width: 899px) {
  .js-motion .strike-grid { gap: 12px; align-content: center; }
  .js-motion .strike-art-wrap { order: -1; width: min(100%, 46vh, 380px); width: min(100%, 46svh, 380px); }
  .js-motion .strike-copy .display-2 { font-size: clamp(26px, 7.4vw, 34px); margin-bottom: 14px; }
  .js-motion .strike-steps h3 { font-size: 24px; }
  .js-motion .strike-steps p { font-size: 16px; }
  .js-motion .strike-meter { margin-top: 16px; }
}
@media (min-width: 900px) {
  .strike-grid { grid-template-columns: repeat(12, 1fr); }
  .strike-copy { grid-column: 1 / 6; }
  .strike-art-wrap { grid-column: 7 / 13; width: min(100%, 460px); }
}

/* ---------- the mint floor ---------- */
.floor-band { background: var(--graphite); color: var(--on-dark-muted); }
.floor-head { margin-bottom: 32px; }
.floor-head .display-2 { color: var(--on-dark); margin-bottom: 16px; }
.floor-head p { max-width: 34em; font-size: 17px; margin: 0; }
.floor-frame { border-radius: var(--radius); background: var(--graphite-2); box-shadow: inset 0 0 0 1px var(--graphite-3); overflow: hidden; }
#floor { display: block; width: 100%; height: 350px; }
.floor-key { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.floor-key li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--graphite-2); font-size: 14px; font-weight: 600; }
.floor-key b { font: 700 24px/1 var(--display); color: var(--on-dark); }
.floor-key .has b { color: var(--accent-hi); }
.floor-band :focus-visible { outline-color: var(--accent-hi); }
@media (min-width: 640px) { #floor { height: 286px; } }
@media (min-width: 1000px) { #floor { height: 352px; } }
@media (min-width: 700px) { .floor-key { grid-template-columns: repeat(4, 1fr); } }

/* ---------- account book ---------- */
.book { position: relative; background: var(--surface); border-radius: var(--radius); padding: 4px 20px 8px; }
.band-alt .book { background: var(--bg); }
.book-head, .entry { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; }
.book-head { font-size: 13px; font-weight: 600; color: var(--muted); padding: 18px 0 12px; border-bottom: 1px solid var(--line-2); }
.book-head span:nth-child(2) { display: none; }
.num { text-align: right; }
.book-line { height: 52px; border-bottom: 1px solid var(--line); transform-origin: 0 50%; }
.book-empty { padding-bottom: 24px; }
.book-note { padding: 24px 0 0; max-width: 32em; }
.book-note h3 { font: 700 26px/1.1 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.book-note p { color: var(--muted); margin: 0; }
.stamp { position: absolute; right: 20px; top: 64px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--bg); box-shadow: inset 0 0 0 2px var(--accent); border-radius: 999px; padding: 9px 13px; transform: rotate(-4deg); }
.entries { list-style: none; margin: 0; padding: 0; }
.entry { padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.entry:last-child { border-bottom: 0; }
.e-date { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.e-what { min-width: 0; color: var(--text); font-size: 15px; }
.e-kind { display: inline-block; font-size: 13px; font-weight: 600; margin-right: 10px; padding-left: 16px; position: relative; color: var(--muted); }
.e-kind::before { content: ""; position: absolute; left: 0; top: .35em; width: 9px; height: 9px; border-radius: 3px; background: var(--text); }
.k-fee_in .e-kind::before { background: var(--accent); }
.k-credit_spend .e-kind::before { background: var(--patina); }
.k-revenue .e-kind::before { background: var(--text); }
.k-payout .e-kind::before { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }
.k-ops .e-kind::before { background: var(--line-2); }
.e-game { font-weight: 600; }
.e-ref { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; margin-top: 2px; }
.e-amt { font-size: 15px; line-height: 1.3; text-align: right; white-space: nowrap; color: var(--text); }
.entry-none { color: var(--muted); display: block; }
@media (min-width: 700px) {
  .book { padding: 4px 28px 8px; }
  .book-head, .entry { grid-template-columns: 9em 1fr auto; }
  .book-head span:nth-child(2) { display: block; }
  .e-date { grid-column: auto; font-size: 13px; }
}

/* totals */
.tally { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 36px; }
.tally > div { background: var(--surface); border-radius: var(--radius); padding: 18px; min-width: 0; }
.tally dt { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.tally dd { margin: 0; font: 700 clamp(22px, 2.6vw, 30px)/1.05 var(--display); letter-spacing: -.02em; color: var(--text); overflow-wrap: anywhere; }
.tally .tally-fund { background: var(--graphite); }
.tally .tally-fund dt { color: var(--accent-hi); }
.tally .tally-fund dd { color: var(--on-dark); }
@media (min-width: 900px) { .tally { grid-template-columns: repeat(6, 1fr); } .holder-grid { grid-template-columns: repeat(4, 1fr); } }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  min-height: 44px; padding: 0 16px;
  background: var(--surface); border: 0; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: color var(--t-hover), background-color var(--t-hover), transform var(--t-press) var(--ease-out);
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab:active { transform: scale(.96); }
.tab[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--accent-side); }
.tab[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); }

/* chart */
.chart-fig { margin: 0 0 16px; position: relative; background: var(--surface); border-radius: var(--radius); padding: 20px; }
figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 16px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; }
.legend i, .tooltip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.s-fee { fill: var(--accent); background: var(--accent); }
.s-credit { fill: var(--patina); background: var(--patina); }
.s-revenue { fill: var(--text); background: var(--text); }
.chart svg { width: 100%; height: auto; }
.chart .grid { stroke: var(--line); }
.chart .axis { font: 500 12px var(--sans); fill: var(--muted); }
.chart .bar { transform-box: fill-box; transform-origin: 50% 100%; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit.on { fill: rgba(34, 31, 28, .05); }
.tooltip { position: absolute; left: 0; top: 0; z-index: 2; min-width: 200px; background: var(--graphite); color: var(--on-dark); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; pointer-events: none; box-shadow: 0 12px 32px var(--shadow); }
.tooltip b { display: block; margin-bottom: 6px; }
.tooltip .row { display: flex; justify-content: space-between; gap: 16px; }

/* ---------- games ---------- */
.rack { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.game {
  display: grid; grid-template-columns: 72px 1fr; gap: 16px;
  position: relative; overflow: hidden;
  padding: 20px; background: var(--surface); border-radius: var(--radius);
  transition: background-color var(--t-hover), transform var(--t-hover) var(--ease-out);
}
.shine { position: absolute; inset: 0 -40%; pointer-events: none; opacity: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 246, 236, .5) 48%, rgba(232, 147, 90, .18) 52%, transparent 62%); transition: opacity .3s; }
.band-alt .game { background: var(--bg); }
.game:hover { background: var(--surface-2); transform: translateY(-2px); }
.cover { width: 72px; height: auto; filter: drop-shadow(0 3px 4px var(--shadow)); }
.cv-rim { fill: var(--accent-side); }
.cv-reed { fill: var(--accent); stroke: var(--accent-side); stroke-width: 3; stroke-dasharray: 2 2.6; }
.cv-field { fill: var(--accent-2); }
.cv-on { fill: var(--accent-ink); }
.cv-off { fill: var(--accent-side); opacity: .45; }
.cv-sheen { fill: none; stroke: #fff3e6; stroke-width: 3; stroke-linecap: round; opacity: .5; }
.cv-raw .cv-rim { fill: var(--surface-3); }
.cv-raw .cv-reed { fill: var(--line-2); stroke: var(--surface-3); }
.cv-raw .cv-field { fill: var(--raw); }
.cv-raw .cv-on { fill: var(--surface); opacity: .8; }
.cv-raw .cv-off { fill: var(--graphite-3); opacity: .2; }
.cv-old .cv-rim { fill: #5b4a3d; }
.cv-old .cv-reed { fill: #7a6352; stroke: #5b4a3d; }
.cv-old .cv-field { fill: #8a6f5b; }
.cv-old .cv-on { fill: var(--surface-2); }
.st-proof .plate { color: var(--accent); background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--accent); }
.empty-pair { display: grid; gap: 12px; }
.g-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 4px; }
.g-title h3 { font: 700 24px/1.1 var(--display); letter-spacing: -.02em; }
.st-live .plate { color: var(--accent-ink); background: var(--accent); }
.st-retired .plate { color: var(--muted); }
.st-retired h3 { color: var(--muted); }
.g-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.g-main p:last-child { color: var(--body); font-size: 15px; margin: 0; }
.g-figs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.g-figs dt { font-size: 13px; color: var(--muted); }
.g-figs dd { margin: 4px 0 0; font: 700 20px var(--display); color: var(--text); }
@media (min-width: 900px) {
  .game { grid-template-columns: 96px 1fr 280px; gap: 24px; align-items: start; }
  .cover { width: 96px; }
  .g-figs { grid-column: auto; padding: 0 0 0 24px; border-top: 0; border-left: 1px solid var(--line); }
  .split-main .game { grid-template-columns: 72px 1fr; }
  .split-main .cover { width: 72px; }
  .split-main .g-figs { grid-column: 1 / -1; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
.rail { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rail li { padding: 14px 8px 14px 12px; background: var(--surface); border-radius: var(--radius-sm); min-width: 0; }
.rail b { display: block; font: 700 clamp(26px, 5vw, 40px)/1.05 var(--display); color: var(--muted); }
.rail .has { background: var(--surface-2); }
.rail .has b { color: var(--accent); }
.rail span { font-size: 13px; font-weight: 600; text-transform: capitalize; color: var(--muted); }
@media (max-width: 420px) { .rail li { padding: 12px 4px 12px 8px; } .rail span { font-size: 11.5px; } }
@media (max-width: 345px) { .rail { grid-template-columns: repeat(3, 1fr); } }

.mold-empty { display: grid; gap: 24px; align-items: center; padding: 24px; background: var(--surface); border-radius: var(--radius); }
.mold-empty svg { width: min(220px, 70%); }
.m-slot { fill: none; stroke: var(--line-2); stroke-width: 3; stroke-dasharray: 10 8; }
.m-ghost { fill: var(--surface-2); }
.m-next { fill: var(--accent); }
.m-stud { fill: none; stroke: var(--accent-hi); stroke-width: 3; }
.mold-empty h3 { font: 700 26px/1.1 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.mold-empty p { color: var(--muted); max-width: 30em; margin: 0; }
@media (min-width: 700px) { .mold-empty { grid-template-columns: minmax(160px, 220px) 1fr; gap: 36px; padding: 32px; } .mold-empty svg { width: 100%; } }

/* ---------- holders ---------- */
.lookup { max-width: 720px; margin-bottom: 40px; }
.lookup label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.lookup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lookup input, .admin-login input {
  flex: 1 1 260px; min-width: 0; min-height: 56px; padding: 0 16px;
  font-size: 15px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  transition: border-color var(--t-hover), box-shadow var(--t-hover);
}
.lookup input::placeholder { color: var(--muted); }
.lookup input:focus, .admin-login input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus-ring); }
.lookup .btn { min-height: 56px; }
.holder { max-width: 960px; background: var(--surface); border-radius: var(--radius); padding: 24px; position: relative; }
.holder-addr { font-size: 13px; overflow-wrap: anywhere; color: var(--muted); margin-bottom: 8px; }
.holder-status { font-weight: 600; color: var(--text); margin-bottom: 20px; }
.holder-status.ok::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); margin-right: 8px; vertical-align: .08em; }
.holder h3 { font: 700 24px/1.1 var(--display); letter-spacing: -.02em; margin: 28px 0 12px; max-width: 24em; }
.holder .tally { margin-bottom: 16px; }
.holder .tally > div { background: var(--bg); }
.holder .tally .tally-fund { background: var(--graphite); }
.holder-wait h3 { margin-top: 16px; }
.holder-wait p { max-width: 34em; color: var(--muted); }
.holder-wait .stamp { position: static; display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .holder { animation: rise .5s var(--ease-out) both; } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { font-size: 13px; font-weight: 600; text-align: left; color: var(--muted); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); color: var(--text); white-space: nowrap; }
th.num, td.num { text-align: right; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rules li { padding: 20px 22px; background: var(--bg); border-radius: var(--radius); color: var(--body); }
.rules b { display: block; font: 700 22px/1.15 var(--display); letter-spacing: -.02em; color: var(--text); margin-bottom: 4px; }

/* ---------- roadmap ---------- */
.timeline { list-style: none; margin: 0; padding: 0; max-width: 820px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 4px; border-radius: 2px; background: var(--surface-2); }
.timeline li { position: relative; padding: 0 0 44px 48px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); }
.timeline .now::before { background: var(--accent); box-shadow: inset 0 0 0 3px var(--accent-side); }
.timeline .plate { margin-bottom: 12px; }
.timeline .now .plate { color: var(--accent-ink); background: var(--accent); }
.timeline h3 { font: 700 clamp(26px, 3vw, 36px)/1.05 var(--display); letter-spacing: -.03em; }
.timeline p { margin: 8px 0 0; color: var(--body); max-width: 36em; }

/* ---------- footer: the district ---------- */
.footer { padding: 0 0 calc(28px + env(safe-area-inset-bottom)); background: var(--graphite); color: var(--on-dark-muted); }
.district { display: block; width: 100%; height: clamp(110px, 15vw, 180px); }
.d-far { fill: #29251f; }
.d-bld { fill: var(--graphite-2); }
.d-col { fill: var(--graphite-3); }
.d-door { fill: none; stroke: var(--accent); stroke-width: 4; }
.d-dial { fill: var(--accent-side); }
.d-coin { fill: var(--accent); }
.d-m { fill: var(--accent-ink); }
.d-win rect { fill: var(--ember); opacity: .55; }
.d-smoke circle { fill: var(--graphite-3); opacity: 0; transform-box: fill-box; transform-origin: center; }
.d-ground { fill: var(--graphite-3); }
.footer-grid { display: grid; gap: 32px; padding-top: 36px; }
.foot-brand .wordmark { color: var(--on-dark); font-size: 20px; }
.foot-brand p { margin: 12px 0 0; color: var(--on-dark-muted); font-size: 15px; max-width: 22em; }
.streets { display: grid; grid-template-columns: 1fr 1fr; gap: 24px var(--gutter); }
.streets h2 { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-hi); margin-bottom: 6px; }
.streets a { display: block; width: fit-content; position: relative; padding: 9px 0; text-decoration: none; color: var(--on-dark-muted); font-size: 15px; transition: color var(--t-hover), transform var(--t-hover) var(--ease-out); }
.streets a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 5px; height: 1.5px; background: var(--accent-hi); transform: scaleX(0); transform-origin: 0 50%; transition: transform .28s var(--ease-out); }
.streets a:hover { color: var(--on-dark); transform: translateX(3px); }
.streets a:hover::after { transform: scaleX(1); }
.footer :focus-visible { outline-color: var(--accent-hi); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--graphite-3); font: 500 12px/1.4 var(--mono); letter-spacing: .04em; color: var(--on-dark-muted); }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 2fr; gap: 48px; }
  .streets { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- motion ----------
   Hidden start states apply only under html.js (set by boot.js) and without reduced motion,
   so the page reads in full without script. Transform and opacity only. */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes line-up { from { transform: translateY(108%); } }
/* one strike, 1.5s: the ram drops, the blank squashes and takes its colour, sparks, the arm swings,
   then the new coin hops onto the stack (--ty is set per strike by app.js) */
@keyframes ram { 0% { transform: none; animation-timing-function: cubic-bezier(.6, 0, .9, .4); } 26% { transform: translateY(108px); } 34% { transform: translateY(108px); animation-timing-function: cubic-bezier(.22, 1, .36, 1); } 62%, 100% { transform: none; } }
@keyframes arm { 0% { transform: none; } 26% { transform: scaleX(.28); } 70%, 100% { transform: none; } }
@keyframes glow { 0%, 25% { opacity: 0; } 28% { opacity: 1; } 70%, 100% { opacity: 0; } }
@keyframes sparks { 0%, 25% { opacity: 0; transform: scale(.3); } 28% { opacity: 1; transform: scale(.7); } 55%, 100% { opacity: 0; transform: scale(1.5); } }
@keyframes struck { 0%, 26% { opacity: 1; } 30%, 100% { opacity: 0; } }
@keyframes coin-off {
  0%, 26% { transform: none; }
  30% { transform: scale(1.05, .78); }
  38%, 60% { transform: none; }
  80% { transform: translate(110px, calc(var(--ty) - 70px)) rotate(-8deg); }
  100% { transform: translate(190px, var(--ty)); }
}
@keyframes feed { from { opacity: 0; transform: translateX(-70px); } }
@keyframes ship { to { opacity: 0; transform: translateX(40px); } }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-12deg) scale(1.8); } 70% { opacity: 1; transform: rotate(-3deg) scale(.96); } 100% { opacity: 1; transform: rotate(-4deg) scale(1); } }
@keyframes rule { from { transform: scaleX(0); } }
@keyframes march { to { stroke-dashoffset: -36; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes pulse { 0%, 100% { transform: none; } 50% { transform: scale(1.06); } }
@keyframes glint { from { opacity: 1; transform: translateX(-70%); } to { opacity: 1; transform: translateX(70%); } }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes ping { from { opacity: .55; transform: scale(1); } to { opacity: 0; transform: scale(9); } }
@keyframes blink { 0%, 100% { opacity: .55; } 40% { opacity: .15; } 46% { opacity: .55; } }
@keyframes smoke { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: .9; } 100% { opacity: 0; transform: translate(30px, -44px) scale(1.7); } }

@media (prefers-reduced-motion: no-preference) {
  .js .mask [data-line] { animation: line-up 1s var(--ease-out) both; }
  .js .hero .line:nth-child(1) .mask:nth-child(2) [data-line] { animation-delay: 90ms; }
  .js .hero .line:nth-child(2) .mask:nth-child(1) [data-line] { animation-delay: 180ms; }
  .js .hero .line:nth-child(2) .mask:nth-child(2) [data-line] { animation-delay: 270ms; }
  .js [data-rise] { animation: rise var(--t-reveal) var(--ease-out) both; animation-delay: 420ms; }
  .js .actions[data-rise] { animation-delay: 520ms; }
  .js .figs [data-rise]:nth-child(1) { animation-delay: 700ms; }
  .js .figs [data-rise]:nth-child(2) { animation-delay: 780ms; }
  .js .figs [data-rise]:nth-child(3) { animation-delay: 860ms; }
  .js .figs [data-rise]:nth-child(4) { animation-delay: 940ms; }
  .js .page-head [data-rise] { animation-delay: 160ms; }

  /* the press: the art rises in, then app.js strikes on a timer and on tap */
  .js .press-btn { animation: rise 1s var(--ease-out) .3s both; }
  .striking .ram { animation: ram 1.5s both; }
  .striking .arm { animation: arm 1.5s var(--ease-out) both; }
  .striking .p-glow { animation: glow 1.5s linear both; }
  .striking .sparks { animation: sparks 1.5s var(--ease-out) both; }
  .striking .c-raw { animation: struck 1.5s linear both; }
  .striking .blank { animation: coin-off 1.5s var(--ease-out) both; }
  .feeding .blank { animation: feed .45s var(--ease-out) both; }
  .js .sc { transition: opacity .2s; }
  .stack.ship { animation: ship .6s var(--ease-in-out) both; }

  /* scroll entrances: the parts of a section arrive in reading order */
  .js [data-reveal] [data-r], .js [data-reveal].solo { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].in [data-r], .js [data-reveal].solo.in { opacity: 1; transform: none; }
  .js [data-reveal].in .fl-src { animation: pulse 2.4s var(--ease-in-out) 1s infinite; }
  .js [data-reveal].in .tilt .shine { animation: glint 1.3s var(--ease-out) .9s both; }
  .glint .shine { animation: glint .9s var(--ease-out) both !important; }
  .rack .game.tilting, .tilt.tilting { transition: transform .12s linear, background-color var(--t-hover) !important; }
  .js .hero-art::before { animation: turn 140s linear infinite; }
  .ping::after { animation: ping .55s var(--ease-out) both; }
  .d-win .b1 { animation: blink 7s steps(1) infinite; }
  .d-win .b2 { animation: blink 9s steps(1) 2s infinite; }
  .d-win .b3 { animation: blink 11s steps(1) 5s infinite; }
  .d-smoke circle { animation: smoke 6s linear infinite; }
  .d-smoke .s2 { animation-delay: 2s; }
  .d-smoke .s3 { animation-delay: 4s; }
  .js [data-reveal] .book-line { transform: scaleX(0); transition: transform .8s var(--ease-out); transition-delay: calc(var(--b, 0) * 70ms + 200ms); }
  .js [data-reveal].in .book-line { transform: none; }
  .js [data-reveal] .stamp { opacity: 0; }
  .js [data-reveal].in .stamp { animation: stamp .55s var(--ease-out) .75s both; }
  .js [data-reveal].in .m-slot { animation: march 1.6s linear infinite; }
  .js [data-reveal] .m-ghost, .js [data-reveal] .m-next, .js [data-reveal] .m-stud { opacity: 0; transform-box: fill-box; transform-origin: center; }
  .js [data-reveal].in .m-ghost, .js [data-reveal].in .m-next, .js [data-reveal].in .m-stud { opacity: 1; animation: pop .5s var(--ease-out) both; animation-delay: calc(var(--b, 0) * 90ms + 300ms); }
  .js [data-reveal] .rack .game { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease-out), transform .7s var(--ease-out), background-color var(--t-hover); transition-delay: calc(var(--b, 0) * 90ms + 200ms); }
  .js [data-reveal].in .rack .game { opacity: 1; transform: none; }
  .js .chart .bar { animation: grow .8s var(--ease-out) both; animation-delay: calc(var(--b, 0) * 25ms + 150ms); }
  .js .timeline li { opacity: 0; transform: translateX(-16px); transition: opacity .6s var(--ease-out), transform .7s var(--ease-out); }
  .js .timeline li.in { opacity: 1; transform: none; }
  .js .rules li, .js .rail li { animation: rise .6s var(--ease-out) both; animation-delay: calc(var(--b, 0) * 70ms + 200ms); }
}
@media (prefers-reduced-motion: reduce) {
  .js-motion ol.line li { opacity: 1; }
}

/* ---------- admin ---------- */
.admin-main { padding: 40px 0 80px; }
.admin-login { max-width: 520px; }
.admin-login .display-2 { margin-bottom: 16px; }
.admin-bar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.admin-bar .actions { margin: 0; }
.admin-grid { display: grid; gap: 16px; margin-bottom: 32px; }
@media (min-width: 900px) { .admin-grid { grid-template-columns: 1fr 1fr; } }
.sheet { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.sheet h2 { font: 700 24px/1.1 var(--display); letter-spacing: -.02em; margin-bottom: 20px; }
.stack { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.stack input, .stack select, .stack textarea {
  font: 400 16px var(--sans);
  color: var(--text); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 10px 12px; min-height: 44px; width: 100%;
}
.stack input:focus, .stack select:focus, .stack textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.msg { min-height: 1.4em; margin: 0; font: 500 13px var(--mono); }
.msg.ok { color: var(--accent); }
.msg.error { color: var(--danger); }
.danger { background: none; border: 1px solid var(--danger); color: var(--danger); border-radius: var(--radius-sm); padding: 6px 10px; cursor: pointer; font: 500 12px var(--mono); }
.danger:hover { background: var(--danger); color: var(--accent-ink); }
.admin-login .lookup-row { margin: 20px 0 8px; }
