/* BUCKS layout. Colours come from brand.css only. */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.num, td, .tnum { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.on-green :focus-visible { outline-color: var(--cream); }

/* live strip (the marquee) */
.strip { background: var(--green-deep); color: var(--cream); font-size: 13px; height: 34px; overflow: hidden; position: relative; border-bottom: 1px solid var(--rule-cream); }
.strip-track { display: flex; gap: 48px; white-space: nowrap; height: 34px; align-items: center; width: max-content; animation: tape 60s linear infinite; padding-left: 16px; }
.strip:hover .strip-track { animation-play-state: paused; }
.strip-item b { font-weight: 650; }
.strip-item .down { color: var(--rust-soft); }
.strip-item .quiet { opacity: 0.7; }
@keyframes tape { to { transform: translateX(-50%); } }

/* header on the field */
.top { background: var(--green); color: var(--cream); display: flex; align-items: center; gap: 24px; padding: 14px 16px; border-bottom: 1px solid var(--rule-cream); position: relative; z-index: 3; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 19px; letter-spacing: -0.01em; }
.brand-mark { width: 34px; height: 34px; border-radius: 4px; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { opacity: 0.82; transition: opacity 0.25s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.top-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-link { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--rule-cream); border-radius: 2px; transition: background 0.25s var(--ease); }
.icon-link:hover { background: var(--green-deep); }
.icon-link svg { width: 17px; height: 17px; fill: currentColor; }
.chip { display: none; align-items: center; gap: 8px; border: 1px solid var(--rule-cream); padding: 7px 10px; font-size: 13px; border-radius: 2px; background: none; }
.chip.on, .buy.on { display: inline-flex; }
.buy { display: none; background: var(--cream); color: var(--ink); padding: 8px 14px; font-weight: 650; font-size: 14px; border-radius: 2px; }

/* hero: the green field, the halftone exit curve, the docked panel */
.hero { position: relative; background: var(--green); color: var(--cream); min-height: max(640px, calc(100svh - 98px)); display: flex; overflow: hidden; }
.field { position: relative; flex: 1; min-width: 0; }
.field canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.field-key { position: absolute; left: 16px; top: 16px; font-size: 14px; max-width: 420px; opacity: 0.85; z-index: 1; }
.field-key b { font-weight: 650; }
.field-tip { position: absolute; pointer-events: none; background: var(--cream); color: var(--ink); font-size: 13px; padding: 6px 9px; border-radius: 2px; transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity 0.2s; white-space: nowrap; z-index: 2; }
.field-tip.on { opacity: 1; }
.headline { position: absolute; left: 16px; right: 16px; bottom: 22px; z-index: 1; margin: 0; font-size: clamp(40px, 5.1vw, 136px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 300; }
.headline .line { display: block; white-space: nowrap; overflow: hidden; padding-bottom: 0.06em; }
.headline .line > span { display: inline-block; transform: translateY(105%); transition: transform 0.8s var(--ease); }
.headline.in .line > span { transform: none; }
.headline.in .line:nth-child(2) > span { transition-delay: 0.08s; }
.headline strong { font-weight: 650; }
.headline-age { position: absolute; left: 18px; bottom: 6px; font-size: 12px; opacity: 0.7; z-index: 1; }

.panel { width: clamp(360px, 30vw, 520px); flex: none; background: var(--paper); color: var(--ink); margin: 16px 16px 16px 0; padding: 24px; display: flex; flex-direction: column; gap: 22px; transform: translateY(24px); opacity: 0; transition: transform 0.6s var(--ease) 0.35s, opacity 0.6s var(--ease) 0.35s; position: relative; z-index: 2; }
.panel.in { transform: none; opacity: 1; }
.pitch { font-size: clamp(19px, 1.45vw, 26px); line-height: 1.22; margin: 0; letter-spacing: -0.01em; }
.size-label { font-size: 14px; margin: 0 0 8px; }
.sizes { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.size-btn { background: none; border: 0; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 11px 6px; font-size: 15px; transition: background 0.2s var(--ease), color 0.2s; }
.size-btn:hover { background: var(--cream); }
.size-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.size-custom { display: flex; align-items: center; gap: 6px; padding: 0 8px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); grid-column: span 4; }
.size-custom input { border: 0; background: none; width: 100%; padding: 10px 0; outline: none; }
.cta { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: var(--paper); border: 0; padding: 16px 18px; font-size: 17px; font-weight: 600; border-radius: 2px; transition: background 0.25s var(--ease); }
.cta:hover { background: var(--green-deep); }
.cta .arrow, .links .arrow { transition: transform 0.25s var(--ease); display: inline-block; }
.cta:hover .arrow, .links a:hover .arrow, .row:hover .arrow { transform: translate(3px, -3px); }
.links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.links a { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 16px; color: rgba(15, 29, 22, 0.75); transition: color 0.25s var(--ease); }
.links a:hover { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: auto; }
.stat b { display: block; font-size: clamp(22px, 1.9vw, 32px); font-weight: 400; letter-spacing: -0.02em; }
.stat > span { font-size: 12px; color: rgba(15, 29, 22, 0.65); }

/* the note's double rule */
.rule2 { height: 6px; border-top: 1px solid var(--ink); border-bottom: 3px solid var(--ink); margin: 0 16px; }

/* sections */
.sect { padding: 72px 16px; }
.sect-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.sect-title { font-size: clamp(34px, 3.6vw, 68px); font-weight: 300; letter-spacing: -0.035em; line-height: 1; margin: 0; }
.sect-title strong { font-weight: 650; }
.sect-lede { max-width: 560px; margin: 10px 0 0; color: rgba(15, 29, 22, 0.75); }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { position: relative; }
.search input { width: min(360px, 80vw); border: 1px solid var(--rule); background: transparent; padding: 11px 12px; border-radius: 2px; outline: none; }
.search input:focus { border-color: var(--ink); }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--paper); border: 1px solid var(--ink); z-index: 10; display: none; max-height: 360px; overflow: auto; }
.results.on { display: block; }
.result { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--rule); cursor: pointer; font-size: 14px; }
.result:hover, .result.active { background: var(--cream); }
.result small { margin-left: auto; color: rgba(15, 29, 22, 0.6); }
.sort { border: 1px solid var(--rule); background: transparent; padding: 11px 10px; border-radius: 2px; }

/* the ledger */
.ledger { width: 100%; border-collapse: collapse; font-size: 15px; }
.ledger th { text-align: right; font-weight: 400; font-size: 13px; color: rgba(15, 29, 22, 0.65); padding: 0 12px 10px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.ledger th:first-child, .ledger td:first-child, .ledger th.l, .ledger td.l { text-align: left; }
.ledger td { padding: 13px 12px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; vertical-align: middle; }
.row { cursor: pointer; transition: background 0.25s var(--ease), opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.row:hover { background: var(--cream); }
.coin { display: flex; align-items: center; gap: 10px; min-width: 0; }
.coin img, .coin .ph { width: 28px; height: 28px; border-radius: 50%; background: var(--cream); flex: none; object-fit: cover; }
.coin b { font-weight: 650; }
.coin small { color: rgba(15, 29, 22, 0.6); max-width: 160px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: bottom; }
.loss { color: var(--rust); }
.gain { color: var(--green); }
.muted { color: rgba(15, 29, 22, 0.55); }
.age { font-size: 12px; color: rgba(15, 29, 22, 0.55); }
.doorcell { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.doorbar { width: 84px; height: 10px; display: inline-flex; gap: 2px; align-items: center; }
.doorbar i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); opacity: 0.18; }
.doorbar i.f { opacity: 1; }
.shift { font-size: 12px; }
.mini-btn { background: none; border: 1px solid var(--rule); padding: 5px 9px; font-size: 13px; border-radius: 2px; transition: background 0.2s var(--ease); }
.mini-btn:hover { background: var(--paper); border-color: var(--ink); }
.mini-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.scroll-x { overflow-x: auto; }
.empty { padding: 26px 0; color: rgba(15, 29, 22, 0.7); }

/* doors that just shrank */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); border-top: 1px solid var(--ink); }
.feed-item { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.feed-item b { font-weight: 650; }
.feed-item .drop { font-size: 28px; letter-spacing: -0.02em; color: var(--rust); font-weight: 400; }

/* my bags: green field again */
.bags { background: var(--green); color: var(--cream); }
.bags .sect-lede, .bags .muted, .bags .age { color: rgba(238, 227, 208, 0.75); }
.bags-grid { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; gap: 40px; align-items: start; }
.totals { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 18px; }
.total-line { margin: 0; font-size: clamp(30px, 3vw, 58px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 300; }
.total-line strong { font-weight: 650; }
.gapline { font-size: 17px; }
.gapline .loss { color: var(--rust-soft); }
.connect { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.connect-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-cream { background: var(--cream); color: var(--ink); border: 0; padding: 13px 16px; font-weight: 600; border-radius: 2px; transition: background 0.25s var(--ease); }
.btn-cream:hover { background: var(--paper); }
.btn-line { background: none; color: var(--cream); border: 1px solid var(--rule-cream); padding: 12px 14px; border-radius: 2px; }
.btn-line:hover { background: var(--green-deep); }
.addr { flex: 1; min-width: 220px; background: transparent; border: 1px solid var(--rule-cream); color: var(--cream); padding: 12px; border-radius: 2px; outline: none; }
.addr::placeholder { color: rgba(238, 227, 208, 0.55); }
.addr:focus { border-color: var(--cream); }
.fine { font-size: 13px; opacity: 0.8; margin: 0; max-width: 560px; }
.holdings { border-top: 1px solid var(--cream); }
.hold { display: grid; grid-template-columns: minmax(0, 2.2fr) 1fr 1fr 1fr 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule-cream); align-items: center; font-size: 15px; opacity: 0.55; transition: opacity 0.4s var(--ease); }
.hold.done { opacity: 1; }
.hold.head { opacity: 0.7; font-size: 12px; padding: 0 0 8px; border-bottom: 1px solid var(--cream); }
.hold > :not(:first-child) { text-align: right; }
.hold .coin small { color: rgba(238, 227, 208, 0.6); }
.hold .coin img, .hold .coin .ph { background: var(--green-deep); }
.hold .loss { color: var(--rust-soft); }
.hold-foot { padding: 12px 0; font-size: 13px; opacity: 0.8; }
.share { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.share label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.share-prev { width: 100%; max-width: 600px; border: 1px solid var(--rule-cream); display: none; }
.share-prev.on { display: block; }

/* door watch */
.watch-list { border-top: 1px solid var(--ink); }
.wrow { display: grid; grid-template-columns: minmax(0, 2fr) 1fr 1fr 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.wrow > :not(:first-child) { text-align: right; }
.wrow.alarm { background: rgba(168, 67, 30, 0.08); }
.watch-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: 380px; }
.toast { background: var(--ink); color: var(--paper); padding: 14px 16px; border-left: 4px solid var(--rust); font-size: 14px; animation: rise 0.5s var(--ease); }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }

/* footer */
.foot { background: var(--green-deep); color: var(--cream); padding: 40px 16px; display: flex; gap: 32px; flex-wrap: wrap; justify-content: space-between; font-size: 14px; }
.foot p { margin: 0; max-width: 640px; opacity: 0.85; }
.foot nav { display: flex; gap: 18px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.seen { opacity: 1; transform: none; }

/* coin page */
.coin-hero { background: var(--green); color: var(--cream); padding: 36px 16px 28px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; }
.coin-id { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.coin-id img, .coin-id .ph { width: 44px; height: 44px; border-radius: 50%; background: var(--green-deep); }
.door-big { font-size: clamp(64px, 8vw, 168px); font-weight: 650; letter-spacing: -0.05em; line-height: 0.95; margin: 22px 0 8px; white-space: nowrap; }
.door-say { font-size: clamp(18px, 1.5vw, 26px); font-weight: 300; max-width: 560px; margin: 0; line-height: 1.3; }
.curve-wrap { position: relative; min-height: 360px; }
.curve-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.fact { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); }
.fact b { display: block; font-size: 26px; font-weight: 400; letter-spacing: -0.02em; }
.fact span { font-size: 13px; color: rgba(15, 29, 22, 0.65); }
.hist { width: 100%; height: 260px; display: block; }
.mint-line { font-size: 13px; opacity: 0.8; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

/* docs and status */
.doc { max-width: 820px; padding: 56px 16px 80px; }
.doc h1 { font-size: clamp(40px, 4.4vw, 76px); font-weight: 300; letter-spacing: -0.04em; line-height: 1; margin: 0 0 24px; }
.doc h1 strong { font-weight: 650; }
.doc h2 { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; margin: 44px 0 10px; padding-top: 16px; border-top: 1px solid var(--ink); }
.doc code, .doc pre { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; background: var(--cream); }
.doc code { padding: 1px 5px; }
.doc pre { padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
.doc li { margin: 6px 0; }
.checks { border-top: 1px solid var(--ink); }
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); display: inline-block; }
.dot.bad { background: var(--rust); }

@media (max-width: 1100px) {
  .nav { display: none; }
  .bags-grid { grid-template-columns: 1fr; }
  .totals { position: static; }
  .coin-hero { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .hero { flex-direction: column; min-height: 0; }
  .field { min-height: 62svh; }
  .panel { width: auto; margin: 0 12px 12px; }
  .headline { font-size: clamp(30px, 8.4vw, 60px); bottom: 26px; left: 12px; }
  .headline .line { white-space: normal; }
  .field-key { left: 12px; right: 12px; font-size: 13px; }
  .sect { padding: 52px 12px; }
  .hold { grid-template-columns: minmax(0, 1.6fr) 1fr 1fr; }
  .hold .q, .hold .g { display: none; }
  .wrow { grid-template-columns: minmax(0, 1.4fr) 1fr auto; }
  .wrow .wb, .wrow .wt { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .ledger .hide-s { display: none; }
  .top { gap: 10px; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .strip-track { animation: none; }
  .reveal, .panel, .headline .line > span { transition: none; transform: none; opacity: 1; }
}
