/* VOICE: cinematic and grave; the beast is calm, the rules are the drama
   IDEA: a labyrinth whose walls are the vault's rules, threaded by the agent's red path
   PICTURE: the turning gold labyrinth with the engraved bull at its heart
   COLOUR and TYPE: forest green, engraved gold, cloud cream, thread red; Marcellus over Manrope
   LAYOUT: full-bleed scenes; content flows over deep green with gold hairlines, never boxed */
@font-face { font-family: Marcellus; src: url(/fonts/marcellus-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Manrope; src: url(/fonts/manrope-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url(/fonts/manrope-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Manrope; src: url(/fonts/manrope-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Manrope; src: url(/fonts/manrope-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
:root { --g: #05270f; --g2: #0b3a1c; --g3: #0f4a25; --gold: #d9b46a; --gold2: #f0d79a; --cream: #efe3c4; --red: #e0553c; --line: rgba(217,180,106,.22); color-scheme: dark; }
* { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--g); color: var(--cream); font: 16px/1.6 Manrope, system-ui, sans-serif; overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, .mark { font-family: Marcellus, Georgia, serif; font-weight: 400; }
h1 { margin: 0; font-size: clamp(40px, 5.4vw, 76px); line-height: 1.03; color: var(--gold2); text-wrap: balance; }
h2 { margin: 0 0 14px; font-size: clamp(32px, 4vw, 50px); line-height: 1.05; color: var(--gold2); text-wrap: balance; }
h3 { margin: 0 0 6px; font-size: 24px; color: var(--gold2); }
p { margin: 0 0 14px; }
.lede { max-width: 40em; opacity: .86; }
:focus-visible { outline: 2px solid var(--gold2); outline-offset: 3px; border-radius: 6px; }

/* top */
.top { position: absolute; z-index: 10; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 22px; padding: 18px max(4vw, 16px); flex-wrap: wrap; }
.top.fixed { position: fixed; background: rgba(5,39,15,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 21px; color: var(--gold2); }
.mark img { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(217,180,106,.6); }
.links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.links a { text-decoration: none; opacity: .86; }
.links a:hover { opacity: 1; color: var(--gold2); }
.ca { display: flex; align-items: center; gap: 8px; border: 1px solid rgba(217,180,106,.45); border-radius: 999px; padding: 4px 4px 4px 14px; background: rgba(5,25,12,.5); backdrop-filter: blur(6px); font-size: 14px; }
.ca[hidden] { display: none; }
.ca b { color: var(--gold2); font-weight: 600; }
.ca code { opacity: .8; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; min-height: 46px; font-weight: 700; cursor: pointer; text-decoration: none; background: var(--gold); color: var(--g); transition: transform .2s, box-shadow .3s, background .2s; position: relative; overflow: hidden; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(217,180,106,.35); background: var(--gold2); }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s; }
.btn:hover::after { transform: translateX(120%); }
.btn.ghost { background: none; color: var(--cream); border: 1px solid rgba(239,227,196,.6); }
.btn.ghost:hover { border-color: var(--gold2); color: var(--gold2); box-shadow: none; }
.btn.small { min-height: 36px; padding: 8px 14px; font-size: 13px; }
.btn[disabled], .btn[aria-disabled=true] { opacity: .3; pointer-events: none; }

/* hero stage */
.stage { position: relative; height: 100vh; min-height: 680px; overflow: hidden; background: radial-gradient(ellipse at 70% 50%, #0f4a25, var(--g) 62%); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero { position: absolute; z-index: 4; left: max(5vw, 16px); bottom: clamp(28px, 7vh, 80px); width: min(620px, 90vw); display: grid; gap: 26px; pointer-events: none; }
.hero > * { pointer-events: auto; }
.hero p { font-size: 17px; opacity: .88; margin: 16px 0 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 18px; overflow: hidden; }
.stat { background: rgba(5,30,14,.8); padding: 16px; backdrop-filter: blur(8px); }
.stat b { display: block; font-weight: 500; font-size: clamp(20px, 2vw, 28px); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--cream); }
.stat span { font-size: 13px; opacity: .72; }
.preview { font-size: 13px; opacity: .7; margin: 0; }
.scrollcue { position: absolute; z-index: 4; right: max(4vw, 16px); bottom: 26px; font-size: 13px; opacity: .6; writing-mode: vertical-rl; letter-spacing: .04em; }
.scrollcue::after { content: ""; display: block; width: 1px; height: 46px; margin: 10px auto 0; background: linear-gradient(var(--gold), transparent); animation: drip 2.2s infinite; }
@keyframes drip { from { transform: scaleY(0); transform-origin: top; } 60% { transform: scaleY(1); transform-origin: top; } to { transform: scaleY(0); transform-origin: bottom; } }

/* bands */
.band { padding: clamp(56px, 8vw, 120px) max(5vw, 16px); position: relative; }
.wrap { max-width: 1240px; margin: 0 auto; }
.band.deep { background: #031a09; }

/* how: a thread through four stations */
.path { position: relative; margin-top: 46px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.path svg { position: absolute; left: 0; right: 0; top: 10px; width: 100%; height: 24px; overflow: visible; }
.path svg path { fill: none; stroke: var(--red); stroke-width: 2; stroke-dasharray: 2000; stroke-dashoffset: 2000; transition: stroke-dashoffset 2.6s cubic-bezier(.4,.1,.2,1); filter: drop-shadow(0 0 6px rgba(255,107,74,.6)); }
.path.seen svg path { stroke-dashoffset: 0; }
.station { position: relative; padding-top: 52px; opacity: 0; transform: translateY(14px); transition: opacity .8s, transform .8s; }
.path.seen .station { opacity: 1; transform: none; }
.path.seen .station:nth-child(3) { transition-delay: .5s; } .path.seen .station:nth-child(4) { transition-delay: 1s; } .path.seen .station:nth-child(5) { transition-delay: 1.5s; }
.station::before { content: ""; position: absolute; top: 12px; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--g); border: 2px solid var(--gold); box-shadow: 0 0 0 6px rgba(217,180,106,.12); }
.station p { opacity: .84; font-size: 15px; }

/* rules */
.rules { margin-top: 30px; }
.rule { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) 15em; gap: 22px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.rule:last-child { border-bottom: 1px solid var(--line); }
.rule small { display: block; opacity: .65; font-size: 13px; }
.meter { height: 10px; border-radius: 99px; background: rgba(217,180,106,.14); position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold2)); border-radius: 99px; transition: width 1.4s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 14px rgba(240,215,154,.35); }
.meter s { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--red); box-shadow: 0 0 8px var(--red); }
.rule em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.queued { margin-top: 18px; padding: 14px 18px; border-left: 2px solid var(--red); background: rgba(224,85,60,.08); }

/* venues */
.venues { margin-top: 30px; display: grid; gap: 0; }
.venue { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 7em 7em; gap: 18px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.venue .bar { height: 26px; border-radius: 4px; background: rgba(217,180,106,.08); position: relative; overflow: hidden; }
.venue .bar i { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(110deg, var(--gold) 0 6px, #c9a25a 6px 9px); transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.venue .bar s { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); }
.venue code { font-size: 13px; opacity: .65; }
.venue .n { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 26px 0; border-top: 1px solid var(--line); opacity: .8; }

/* the record */
.ticker { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); margin-top: 30px; }
.ticker > div { display: flex; gap: 16px; width: max-content; animation: tick 60s linear infinite; }
.ticker:hover > div { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }
.note { flex: none; width: 320px; padding: 20px; border-radius: 20px; background: linear-gradient(160deg, rgba(217,180,106,.1), rgba(217,180,106,.02)); border: 1px solid var(--line); cursor: pointer; text-align: left; transition: border-color .3s, transform .3s; }
.note:hover { border-color: var(--gold); transform: translateY(-3px); }
.note b { display: block; font-weight: 600; color: var(--gold2); }
.note code { font-size: 12px; opacity: .6; }
.note p { margin: 8px 0 0; font-size: 14px; opacity: .85; }
dialog { max-width: min(720px, 94vw); width: 100%; background: #04200c; color: var(--cream); border: 1px solid var(--gold); border-radius: 22px; padding: 28px; }
dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
dialog pre { max-height: 46vh; overflow: auto; font-size: 12px; background: rgba(0,0,0,.25); padding: 14px; border-radius: 12px; }
.verdict { padding: 10px 14px; border-radius: 12px; margin: 10px 0; }
.verdict.good { background: rgba(217,180,106,.14); color: var(--gold2); }
.verdict.bad { background: rgba(224,85,60,.15); color: #ffb4a3; }

footer { padding: 46px max(5vw, 16px) 60px; border-top: 1px solid var(--line); font-size: 14px; }
footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
footer p { max-width: 46em; opacity: .7; }

/* app */
.app { padding: 110px max(5vw, 16px) 60px; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); }
.app-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .3; pointer-events: none; }
.panel { padding: 26px 0; border-top: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; border: 1px solid var(--line); width: max-content; max-width: 100%; }
.tabs button { border: 0; background: none; border-radius: 999px; padding: 10px 18px; min-height: 42px; cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--gold); color: var(--g); font-weight: 700; }
.amount { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid rgba(217,180,106,.45); padding: 10px 0; margin: 22px 0 10px; }
.amount input { flex: 1; background: none; border: 0; font: 500 clamp(36px, 5vw, 56px) Manrope, sans-serif; letter-spacing: -.02em; color: var(--gold2); outline: none; width: 100%; }
.amount span { font-size: 18px; opacity: .7; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; font-size: 13px; }
.chips button:hover { border-color: var(--gold); }
.facts { display: grid; gap: 8px; margin: 18px 0 22px; font-size: 14px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; }
.facts span:first-child { opacity: .7; }
.facts span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.mine { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 18px; overflow: hidden; margin-top: 16px; }
.mine .stat b { font-size: clamp(24px, 2.6vw, 34px); }
.claims { display: grid; gap: 10px; margin-top: 14px; }
.claim { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; flex-wrap: wrap; }
.dial { position: relative; width: min(300px, 70vw); aspect-ratio: 1; margin: 0 auto; }
.dial svg { width: 100%; height: 100%; }
.dial div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dial b { font: 500 clamp(28px, 3.4vw, 40px) Manrope, sans-serif; letter-spacing: -.01em; color: var(--gold2); font-variant-numeric: tabular-nums; }
.dial small { opacity: .7; }

.toasts { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 10px; max-width: min(420px, 92vw); }
.toast { padding: 14px 18px; border-radius: 14px; background: #04200c; border: 1px solid var(--gold); box-shadow: 0 12px 40px rgba(0,0,0,.5); animation: in .35s; font-size: 15px; }
.toast.bad { border-color: var(--red); }
.toast.good { border-color: var(--gold2); }
.toast a { color: var(--gold2); }
@keyframes in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 900px) {
  .links { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); } .path svg { display: none; }
  .rule { grid-template-columns: minmax(0, 1fr) auto; } .rule .meter { grid-column: 1 / -1; grid-row: 2; }
  .venue { grid-template-columns: minmax(0, 1fr) auto auto; } .venue .bar { grid-column: 1 / -1; grid-row: 2; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .scrollcue { display: none; }
}
@media (max-width: 600px) {
  .top { gap: 10px; } .ca { order: 3; }
  .stage { min-height: 1060px; }
  .hero { bottom: 40px; }
  .path { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker > div, .scrollcue::after { animation: none; }
  .path svg path, .station, .meter i, .venue .bar i { transition: none; }
}
