/* Giftmas: "The Gift Pile". A wrapping-paper studio at night: deep berry/plum backdrop, kraft paper, coral, pistachio mint, pearl
   ribbon, and a little foil gold for the biggest gifts. Layout language: gift-tag cards (punched hole, string, a slight tilt), ribbon
   and scalloped dividers, paper textures drawn in CSS, rounded soft shadows. No navy/amber, no black-green terminal, no classic red-green.
   Type: Young Serif (display), Nunito (body), Sono (numbers and small labels).
   Served first; story.css, shell.css (the shell and panels), home.css and the page sheets are appended after it (server/index.ts). */
@font-face { font-family: "Young Serif"; src: url("/fonts/young-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Sono"; src: url("/fonts/sono.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  color-scheme: dark;
  --sec: 56px; --sec-in: 28px; --head-h: 56px; --bar-h: 56px; --mkt-h: 28px; --rail-w: 96px;
  /* the studio: plum and berry, pearl ink */
  --plum: #2a0f2e; --plum-0: #1f0a22; --berry: #3d1640; --berry-2: #4a1c4e; --berry-3: #5a2560;
  --kraft: #c9a27a; --kraft-lt: #dcbb95; --kraft-dk: #a57c55; --on-kraft: #3b2414;
  --coral: #ff6f61; --coral-hi: #ff8f84; --coral-dk: #d9503f; --coral-soft: rgba(255, 111, 97, .14); --on-coral: #2a0f2e;
  --mint: #9fe2bf; --mint-hi: #c3f0d7; --mint-dk: #6cc79c; --mint-soft: rgba(159, 226, 191, .13); --on-mint: #1d3a2c;
  --pearl: #fbf3ea; --foil: #e9c46a; --foil-hi: #f6dc94; --foil-soft: rgba(233, 196, 106, .14);
  --deck: var(--plum); --deck-2: #331236; --panel: var(--berry); --card: var(--berry); --card-solid: #44194a; --well: #250c29; --track: #4a1c4e;
  --ink: var(--pearl); --ink-2: #e8d5df; --ink-3: #c2a3bd;
  --rule: rgba(251, 243, 234, .1); --rule-2: rgba(251, 243, 234, .2);
  /* older names used by the page sheets, mapped onto the studio palette */
  --green: var(--mint); --green-hi: var(--mint-hi); --green-deep: var(--mint-dk); --green-soft: var(--mint-soft); --on-green: var(--on-mint);
  --red: var(--coral); --red-hi: var(--coral-hi); --red-soft: var(--coral-soft);
  --gold: var(--foil); --gold-hi: var(--foil-hi); --gold-soft: var(--foil-soft);
  --cream: var(--pearl); --snow: var(--pearl);
  --candle: var(--foil); --candle-hi: var(--foil-hi); --candle-deep: #c9a24a; --candle-soft: var(--foil-soft); --on-candle: #2a1a00;
  --ember: var(--coral); --ember-soft: var(--coral-soft); --amber: var(--kraft);
  --frost: var(--mint); --frost-hi: var(--mint-hi); --frost-soft: var(--mint-soft);
  --blue: var(--coral); --blue-hi: var(--coral-hi); --blue-deep: var(--coral); --blue-soft: var(--coral-soft); --on-blue: var(--on-coral);
  --pink: var(--coral); --cyan: var(--mint); --violet: var(--kraft); --flare: var(--foil); --sun: var(--foil); --trace: var(--kraft);
  --scope: var(--berry); --scope-ink-2: var(--ink-2); --scope-ink-3: var(--ink-3); --core-hi: var(--mint);
  --line: var(--rule); --line-2: var(--rule-2);
  --ok: var(--mint); --warn: var(--foil); --bad: var(--coral-hi); --focus: var(--pearl);
  /* fee lanes: holders mint, the burn coral, the house kraft */
  --lane-house: var(--kraft); --lane-holders: var(--mint); --lane-buyback: var(--coral); --unalloc: #5a3a5c; --venue: var(--kraft);
  --r: 18px; --r-s: 12px;
  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Sono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bounce: cubic-bezier(.3, 1.4, .5, 1);
  --shadow: 0 14px 34px -18px rgba(12, 0, 14, .85), 0 2px 0 rgba(255, 255, 255, .03) inset;
  --t1: 11.5px; --t2: 13px; --t3: 16px;
  /* a wrapping-paper texture: tiny pearl dots and crosses */
  --paper: radial-gradient(circle at 25% 25%, rgba(251, 243, 234, .05) 1.2px, transparent 1.6px) 0 0 / 22px 22px,
    radial-gradient(circle at 75% 75%, rgba(251, 243, 234, .035) 1.2px, transparent 1.6px) 0 0 / 22px 22px;
}
* { box-sizing: border-box; }
@media (min-width: 880px) { :root { --sec: 88px; --sec-in: 40px; } }
html, body, button, input, textarea, select { font-synthesis: none; }
[hidden] { display: none !important; }
html { background: var(--plum); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 16px/1.6 var(--sans); background: var(--plum);
  display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* the studio wall behind everything: warm light from above, a pattern like the back of wrapping paper. Static. */
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(80vmax 46vmax at 50% -12%, rgba(255, 111, 97, .1), transparent 62%),
    radial-gradient(60vmax 40vmax at 100% 110%, rgba(159, 226, 191, .06), transparent 60%),
    var(--paper),
    linear-gradient(180deg, #2d1031 0%, #2a0f2e 50%, #250c29 100%); }
header, main, footer { position: relative; z-index: 1; }
.skip { position: absolute; left: -999px; top: 0; background: var(--coral); color: var(--on-coral); padding: 8px 12px; z-index: 80; font-weight: 800; border-radius: 0 0 10px 0; }
.skip:focus { left: 0; }
a { color: var(--mint); text-underline-offset: 3px; text-decoration-thickness: 1.5px; transition: color .2s; }
a:hover { color: var(--mint-hi); }
::selection { background: rgba(255, 111, 97, .4); color: #fff; }
img { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 1000px) { .wrap { padding: 0 24px; } }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* ---------- type ---------- */
main { flex: 1; padding: 18px 0 48px; view-transition-name: page; overflow-x: clip; }
main > * { animation: enter .4s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
::view-transition-old(page), ::view-transition-new(page) { animation: none; mix-blend-mode: normal; }
h1, h2, .display { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; overflow-wrap: break-word; text-wrap: balance; }
h1 { font-size: clamp(32px, 8vw, 54px); line-height: 1.04; margin: 4px 0 12px; }
h2 { font-size: clamp(22px, 4.6vw, 30px); line-height: 1.12; margin: 32px 0 12px; }
h1 em, h2 em { font-style: normal; color: var(--coral); }
h3 { font-size: var(--t3); margin: 0 0 4px; font-weight: 800; letter-spacing: -.005em; }
.lead { color: var(--ink-2); font-size: 16.5px; line-height: 1.6; margin: 0 0 18px; max-width: 64ch; }
.mute { color: var(--ink-2); } .faint { color: var(--ink-3); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }
.mono, code { font-family: var(--mono); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- buttons: coral, soft and pressable like a paper tag; ghost buttons are pearl outlines ---------- */
.btn { position: relative; background: var(--coral); color: var(--on-coral); border: 0; border-radius: 14px; padding: 11px 18px; font: 800 15px/1.2 var(--sans); letter-spacing: .005em; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  box-shadow: 0 3px 0 var(--coral-dk), 0 10px 22px -12px rgba(255, 111, 97, .8);
  transition: transform .15s var(--ease), background-color .2s, box-shadow .2s, color .2s; touch-action: manipulation; }
.btn:hover { color: var(--on-coral); background: var(--coral-hi); transform: translateY(-1px); box-shadow: 0 4px 0 var(--coral-dk), 0 14px 26px -12px rgba(255, 111, 97, .9); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--coral-dk); transition-duration: .08s; }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn .ic { transition: transform .25s var(--ease); }
.btn:hover .ic-go { transform: translateX(3px); }
.btn.sm { padding: 7px 14px; font-size: 14px; min-height: 40px; border-radius: 12px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule-2); }
.btn.ghost:hover { background: rgba(251, 243, 234, .07); color: #fff; box-shadow: inset 0 0 0 1.5px var(--pearl); }
.btn.ghost:active { background: rgba(251, 243, 234, .12); }
.btn.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1.5px rgba(255, 111, 97, .55); }
.btn.danger:hover { background: var(--coral-soft); color: var(--coral-hi); }
.btn svg, .ic { width: 18px; height: 18px; flex: none; }
.linkbtn { background: none; border: 0; color: var(--mint); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.actions > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
@media (min-width: 640px) { .actions { display: flex; flex-wrap: wrap; } }
.more { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font: 800 14.5px/1.2 var(--sans); }
.more .ic { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.more:hover .ic { transform: translateX(4px); }

/* ---------- surfaces: soft berry cards ---------- */
.card { background: var(--card) var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); transition: border-color .25s; }
.card:hover { border-color: var(--rule-2); }
.card + .card, .card + .tablewrap { margin-top: 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrapx { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

/* figures */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 16px; min-width: 0; }
.stat b { display: block; font: 500 clamp(19px, 5vw, 26px)/1.15 var(--mono); letter-spacing: -.02em; overflow-wrap: anywhere; color: var(--ink); }
.stat span { color: var(--ink-2); font-size: 14px; display: block; margin-top: 6px; line-height: 1.35; }
/* where a number comes from: a small dot and a label */
.src { display: inline-flex !important; align-items: center; gap: 7px; font: 500 11px/1.3 var(--sans); letter-spacing: .02em; color: var(--ink-3) !important; margin-top: 8px !important; max-width: 100%; white-space: normal; }
.src::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.src.chain::before { background: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
.src.market::before { background: var(--foil); }
.src.ledger::before { background: var(--kraft); }
.src.pile::before { background: var(--coral); }
@keyframes beat { 50% { opacity: .35; } }

/* ---------- coin rows ---------- */
.coin { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; text-decoration: none; color: inherit; padding: 14px 16px; position: relative; transition: background-color .2s; }
.coin:hover { background: rgba(251, 243, 234, .05); color: inherit; }
.coin img, .art { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: var(--track); display: block; }
.coin .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin .tk { color: var(--ink-3); font-size: 12.5px; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin .mc { text-align: right; white-space: nowrap; font-weight: 800; }
.pill { display: inline-flex; align-items: center; gap: 5px; font: 700 12px/1.4 var(--sans); padding: 3px 10px; border-radius: 999px; color: var(--ink-2); white-space: nowrap; background: rgba(251, 243, 234, .08); }
.pill .ic { width: 14px; height: 14px; }
.pill.ok { color: var(--on-mint); background: var(--mint); }
.pill.warn { color: var(--on-kraft); background: var(--kraft); }
.up { color: var(--mint); } .down { color: var(--coral-hi); } .flat { color: var(--ink-3); }
/* a coin's paper colour: a small square swatch with a ribbon */
.sw { display: inline-block; width: 11px; height: 11px; flex: none; border-radius: 3px; background: linear-gradient(90deg, transparent 40%, rgba(251, 243, 234, .9) 40% 60%, transparent 60%), var(--c, var(--ink-3)); }
.addr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
code { background: var(--well); padding: 2px 7px; border-radius: 6px; word-break: break-all; font-size: .8em; }

/* ---------- forms ---------- */
form label, .lbl, .card > label { display: block; margin: 16px 0 6px; font: 800 13.5px/1.3 var(--sans); color: var(--ink-2); }
.hint { color: var(--ink-3); font-size: 13px; margin: 6px 0 0; }
input, textarea, select { width: 100%; background: var(--well); border: 1.5px solid var(--rule-2); color: var(--ink); border-radius: var(--r-s); padding: 12px 14px; font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: .85; }
input:hover, textarea:hover, select:hover { border-color: rgba(251, 243, 234, .34); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 4px var(--mint-soft); }
input[aria-invalid="true"] { border-color: var(--bad); }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--coral); flex: none; margin: 2px 0 0; }
input[type="search"] { -webkit-appearance: none; appearance: none; }
input[type="range"] { accent-color: var(--coral); padding: 0; border: 0; background: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font: 400 15px/1.5 var(--sans) !important; color: var(--ink-2); margin: 12px 0 !important; }
.drop { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; border: 2px dashed var(--rule-2); border-radius: var(--r-s); padding: 12px; cursor: pointer; background: var(--well); position: relative; transition: border-color .2s, background-color .2s; margin: 0 !important; font: 400 15px/1.4 var(--sans) !important; }
.drop:hover { border-color: var(--mint); background: var(--mint-soft); }
.drop:focus-within { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.drop img, .drop .art { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop p { margin: 2px 0 0; }
.err { color: var(--bad); } .okmsg { color: var(--ok); }
.fielderr { color: var(--bad); font-size: 14px; margin: 5px 0 0; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
option { background: var(--berry); color: var(--ink); }

/* ---------- review, splits, progress ---------- */
.review h2 { font-size: 28px; }
.split { display: flex; height: 14px; overflow: hidden; gap: 3px; margin: 10px 0; border-radius: 999px; transform-origin: left; animation: wipe .9s var(--ease) both; }
.split i { display: block; height: 100%; border-radius: 999px; }
@keyframes wipe { from { transform: scaleX(0); } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 600 13px/1.5 var(--sans); color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.progress { display: grid; gap: 10px; margin: 14px 0; padding: 0; list-style: none; }
.progress li { display: flex; gap: 10px; align-items: center; color: var(--ink-3); font-size: 15.5px; }
.progress li.on { color: var(--ink); } .progress li.done { color: var(--ok); } .progress li.fail { color: var(--bad); }
.progress li::before { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 4px; flex: none; }
.progress li.on::before { border-color: var(--coral); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.progress li.done::before { background: var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }
.summary { white-space: pre-wrap; font: 400 11.5px/1.7 var(--mono); background: var(--well); border-radius: 12px; padding: 12px 14px; color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------- notices, empty states ---------- */
.notice { border: 1.5px dashed rgba(201, 162, 122, .6); background: rgba(201, 162, 122, .1); color: #f6e3cd; border-radius: 14px; padding: 12px 16px; margin: 14px 0; }
.notice.info { border-color: rgba(159, 226, 191, .5); background: var(--mint-soft); color: #dcf6e8; }
.notice.bad { border-color: rgba(255, 111, 97, .6); background: var(--coral-soft); color: #ffd9d4; }
.empty { text-align: center; padding: 18px 14px 20px; color: var(--ink-2); background: rgba(251, 243, 234, .03); border: 2px dashed var(--rule-2); border-radius: var(--r); box-shadow: none; }
.empty > svg:not(.empty-art) { width: 40px; height: 40px; margin: 0 auto 10px; display: block; color: var(--kraft); }
.empty .empty-art { width: 120px; height: auto; margin: 0 auto 6px; display: block; overflow: visible; }
.empty p { max-width: 44ch; margin: 0 auto 12px; }
.empty-line { color: var(--ink-2); margin: 10px 0 0; }

/* ---------- tables, details, segmented control ---------- */
.tablewrap { overflow-x: auto; background: var(--card); border-radius: var(--r-s); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule); font-size: 14.5px; white-space: nowrap; }
th { color: var(--ink-3); font: 700 12px var(--sans); background: var(--well); }
tbody tr { transition: background-color .15s; } tbody tr:hover { background: rgba(251, 243, 234, .04); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); }
details { background: var(--card); border-radius: 14px; padding: 0 16px; margin: 8px 0; }
details[open] { padding-bottom: 4px; }
summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; min-height: 44px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(251, 243, 234, .08); color: var(--coral); font: 800 16px/1 var(--sans); transition: transform .3s var(--ease), background-color .2s; }
summary:hover::after { background: var(--coral-soft); }
details[open] > summary::after { transform: rotate(45deg); }
.seg { display: inline-flex; background: var(--well); border-radius: 14px; padding: 3px; justify-self: start; max-width: 100%; overflow-x: auto; scrollbar-width: none; gap: 2px; }
.seg button { background: none; border: 0; color: var(--ink-2); font: 800 14px/1.2 var(--sans); padding: 8px 14px; border-radius: 11px; cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s; min-height: 40px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--pearl); color: var(--plum); }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .plot { fill: var(--well); stroke: none; }
.chart .grid-l { stroke: var(--rule-2); stroke-dasharray: 2 5; }
.chart .axis { fill: var(--ink-3); font: 400 10px var(--mono); }
.chart .line { fill: none; stroke: var(--coral); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#ledgerfill); }
.chart .dot { fill: var(--c, var(--coral)); stroke: var(--plum); stroke-width: 2; }
.chart .hair { stroke: var(--rule-2); stroke-dasharray: 3 4; }
.chartbox { position: relative; }
.tip { position: absolute; pointer-events: none; background: var(--card-solid); color: var(--ink); padding: 6px 10px; border-radius: 10px; font: 400 12px/1.4 var(--mono); white-space: nowrap; transform: translate(-50%, -115%); z-index: 2; box-shadow: var(--shadow); }

/* ---------- skeletons: a soft pulse (opacity only) ---------- */
.sk { background: rgba(251, 243, 234, .07); border-radius: 12px; animation: pulse 1.4s ease-in-out infinite; }
.sk-h1 { height: 46px; width: min(420px, 80%); margin: 10px 0 16px; }
.sk-line { height: 16px; width: min(640px, 95%); margin: 8px 0; }
.sk-line.short { width: min(360px, 60%); }
.sk-card { height: 80px; }
.sk-stat { height: 86px; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- dialogs, toasts ---------- */
dialog { background: var(--card-solid) var(--paper); color: var(--ink); border: 0; border-radius: 22px; padding: 22px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 30px 70px -20px #0a000c, 0 0 0 1px var(--rule-2); }
dialog[open] { animation: pop .3s var(--bounce) both; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
dialog::backdrop { background: rgba(20, 4, 22, .72); }
dialog h2 { margin: 0 0 6px; font-size: 26px; }
.wlist { display: grid; gap: 8px; margin: 14px 0; }
.wlist button, .wlist a { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--berry); border: 1.5px solid var(--rule-2); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; min-height: 52px; transition: border-color .2s, background-color .2s; }
.wlist button:hover, .wlist a:hover { border-color: var(--mint); background: var(--mint-soft); color: var(--ink); }
.wlist img { width: 28px; height: 28px; border-radius: 8px; }
.toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; width: min(440px, calc(100vw - 28px)); pointer-events: none; }
.toast { background: var(--card-solid); color: var(--ink); border-radius: 14px; padding: 12px 16px; font-size: 15px; box-shadow: 0 16px 36px -10px #0a000c, 0 0 0 1px var(--rule-2); animation: rise .3s var(--ease) both; pointer-events: auto; display: flex; gap: 12px; align-items: center; }
.toast::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--kraft); flex: none; }
.toast.err::before { background: var(--coral); }
.toast.ok::before { background: var(--mint); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- drawn art (client/art.ts): the empty box, the page-head pile outline, a single gift ---------- */
.ea-shadow { fill: rgba(12, 0, 14, .35); }
.ea-flap { fill: var(--kraft-lt); stroke: rgba(40, 8, 40, .4); }
.ea-in { fill: #6e4a2e; }
.ea-box { fill: var(--kraft); stroke: rgba(40, 8, 40, .4); }
.ea-dash { fill: none; stroke: var(--pearl); stroke-opacity: .7; stroke-dasharray: 3 3; }
.ea-lid { fill: var(--coral); stroke: rgba(40, 8, 40, .4); }
.ea-num { font: 400 18px var(--display); fill: #4a2f1d; }
@media (prefers-reduced-motion: no-preference) { .empty-art .ea-lid { transform-box: fill-box; transform-origin: 0 100%; animation: lidnod 3.2s var(--ease) 1 both; } }
@keyframes lidnod { 0% { transform: translateY(-10px) rotate(-10deg); opacity: 0; } 60% { opacity: 1; } }
.pa-tree { fill: rgba(63, 138, 112, .2); }
.pa-star { fill: rgba(233, 196, 106, .55); }
.pa-box { fill: none; stroke: rgba(251, 243, 234, .22); stroke-width: 1.3; stroke-dasharray: 4 3; }
.orn-art { display: block; width: 100%; height: auto; overflow: visible; }
.ga-shadow { fill: rgba(12, 0, 14, .35); }
.ga-edge { fill: none; stroke: rgba(40, 8, 40, .4); }
.ga-spark { fill: #fff; }
.ga-star { fill: var(--foil); stroke: #8a6a1d; stroke-width: .8; }
.ga-n { font: 700 11px var(--mono); fill: #2a0f2e; paint-order: stroke; stroke: rgba(251, 243, 234, .8); stroke-width: 3px; }

/* ---------- reveals: content is hidden only once the user scrolls and only while it is still below the screen (app.ts reveal()) ---------- */
.rv-hide { opacity: 0; transform: translateY(16px); }
.rv-on { transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(min(var(--i, 0), 8) * 70ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .sk, .progress li.on::before { animation: none !important; }
  .rv-hide { opacity: 1; transform: none; }
}

/* Story drawings (client/story.ts): the fee-split explorer and the burn orbits, laid out as console panels (see docs.css for the page).
   Tokens come from style.css. The base state of every drawing is its finished state; motion is added on top, only under no-preference. */
.ep-dot { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--c, currentColor); }

/* shared drawing parts */
.pm-r { fill: var(--ink); } .pm-p { fill: var(--blue); } .pm-s { fill: var(--flare); }
.sat-b { fill: var(--blue); } .sat-p { fill: var(--ink); opacity: .85; } .sat-w { stroke: var(--ink); stroke-width: 1; fill: none; }
.ep-orbits text, .ep-curve text { font-family: var(--mono); }

/* ---------- follow one trade ---------- */
.ep-tf { display: grid; gap: 14px; align-items: start; }
.ep-tf > .pnl + .pnl { margin-top: 0; }
@media (min-width: 880px) { .ep-tf { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.ep-intro { margin: 0 0 14px; }
.ep-ctl { display: block; margin: 0 0 14px; }
.ep-ctl > span { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 6px; font: 700 12.5px/1.3 var(--sans); letter-spacing: .01em;  color: var(--ink-2); }
.ep-ctl output { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 13px; }
.ep-ctl input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; margin: 0; padding: 0; background: transparent; border: 0; cursor: pointer; }
.ep-ctl input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 10px; background: var(--line-2); }
.ep-ctl input[type=range]::-moz-range-track { height: 4px; border-radius: 10px; background: var(--line-2); }
.ep-ctl input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; border: 5px solid var(--blue); background: var(--panel); }
.ep-ctl input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; border: 5px solid var(--blue); background: var(--panel); }
.ep-ctl input[type=range]:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 10px; }
.ep-curve { display: block; width: 100%; max-width: 440px; height: auto; margin-top: 4px; }
.ep-curve .ax { stroke: var(--line-2); fill: none; }
.ep-curve .ln { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ep-curve .ar { fill: var(--blue); opacity: .1; stroke: none; }
.ep-curve .dot { transition: transform .25s var(--ease); }
.ep-curve .dot-halo { fill: var(--flare); opacity: .2; } .ep-curve .dot-c { fill: var(--flare); }
.ep-curve .tk { font-size: 12px; fill: var(--ink-2); }
.ep-fee { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ep-fk { grid-column: 1 / -1; font: 700 12.5px/1 var(--sans); letter-spacing: .01em;  color: var(--ink-2); }
.ep-big b { font: 400 clamp(36px, 10vw, 48px)/1 var(--mono); color: var(--blue-hi); letter-spacing: -.04em; }
.ep-fs { font-size: 14px; color: var(--ink-2); line-height: 1.4; } .ep-fs b { color: var(--ink); font-weight: 400; font-family: var(--mono); font-size: 13px; }
.ep-h { margin: 16px 0 6px; font: 700 12.5px/1.2 var(--sans); letter-spacing: .01em;  color: var(--ink-2); }
.ep-split { display: block; width: 100%; height: auto; max-height: 84px; }
.ep-split .trunk { fill: none; stroke: var(--ink-2); stroke-width: 6; stroke-linecap: round; opacity: .35; }
.ep-split .br { fill: none; stroke: var(--c); stroke-linecap: round; opacity: .85; }
.ep-split .end { fill: var(--c); }
.ep-split .src { fill: var(--ink); }
.ep-split .flow { fill: none; stroke: var(--deck); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1 11; opacity: .9; }
.ep-split .cre, .ep-leg .cre { --c: var(--gold); } .ep-split .tre, .ep-leg .tre { --c: var(--candle); }
.ep-split .hol, .ep-leg .hol { --c: var(--lane-holders); } .ep-split .buy, .ep-leg .buy { --c: var(--lane-buyback); } .ep-split .hou, .ep-leg .hou { --c: var(--lane-house); }
.ep-leg { list-style: none; margin: 4px 0 0; padding: 0; }
.ep-leg li { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.ep-leg li:last-child { border-bottom: 0; }
.ep-leg b { font: 400 13px var(--mono); color: var(--ink); text-align: right; }
.ep-note { margin: 14px 0 0; color: var(--ink-2); font-size: 13.5px; }
@media (prefers-reduced-motion: no-preference) {
  .ep-split .flow { animation: ep-flow 2.4s linear infinite; animation-delay: var(--d, 0s); }
  @keyframes ep-flow { to { stroke-dashoffset: -24; } }
}

/* ---------- where a burn goes: three orbits ---------- */
.ep-lanes { display: grid; gap: 14px; align-items: start; }
.ep-lanes > .pnl + .pnl { margin-top: 0; }
@media (min-width: 880px) { .ep-lanes { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.ep-orbits-w { margin: 4px auto 0; max-width: 440px; }
.ep-orbits { display: block; width: 100%; height: auto; overflow: visible; }
.ep-orbits .lane-orb { fill: none; stroke: var(--c); opacity: .75; }
.ep-lane.core, .ep-orbits .core { --c: var(--lane-core); } .ep-lane.summit, .ep-orbits .summit { --c: var(--lane-summit); } .ep-lane.rising, .ep-orbits .rising { --c: var(--lane-rising); }
.ep-orbits .lane-sat .sat-b { fill: var(--c); } .ep-orbits .lane-sat .sat-p { fill: var(--ink); opacity: .8; }
.ep-orbits .trail { fill: none; stroke: var(--flare); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1 6; opacity: .85; }
.ep-orbits .lane-tag rect { fill: var(--panel); stroke: var(--c); stroke-width: 1.2; }
.ep-orbits .lane-tag text { font-size: 13px; fill: var(--ink); }
.ep-lane-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ep-lane { padding: 14px; border-left: 3px solid var(--c); margin: 0; }
.ep-lane + .ep-lane { margin-top: 0; }
.ep-lane h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 10px; font: 650 19px/1.15 var(--display); font-stretch: 108%; color: var(--ink); }
.ep-lane h3 .ep-dot { background: var(--c); }
.ep-lane h3 b { margin-left: auto; font: 400 13px var(--mono); color: var(--ink); padding: 3px 9px; border-radius: 10px; border: 1px solid var(--c); background: var(--panel); }
.ep-lane p { margin: 0; max-width: 54ch; color: var(--ink-2); }
.ep-ranks { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ep-ranks li { display: flex; gap: 8px; align-items: baseline; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); font: 400 12.5px var(--mono); color: var(--ink-2); }
.ep-ranks b { color: var(--ink); font-weight: 400; }
@media (prefers-reduced-motion: no-preference) {
  .ep-orbits .trail { animation: ep-dash 2s linear infinite; }
  @keyframes ep-dash { to { stroke-dashoffset: -14; } }
  .ep-orbits .lane-sat { transform-box: fill-box; transform-origin: center; animation: ep-bob 6s ease-in-out infinite; }
  .ep-orbits .lane-sat.summit { animation-delay: -2s; } .ep-orbits .lane-sat.rising { animation-delay: -4s; }
  @keyframes ep-bob { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(3px, -2px); } }
}

/* the light dial: one house that grows and brightens with the share the reader dials in */
.lr-house { max-width: 220px; margin: 6px auto 4px; padding: 10px 10px 2px; border-radius: 10px; background: linear-gradient(180deg, var(--well), var(--berry-2)); border: 1px solid var(--line); }
.lr-house .ha-win, .lr-house .ha-spill { transition: opacity .25s; }

/* ---------- Giftmas: the wrapping dial and the pile's rules ---------- */
.lr-house { max-width: 220px; background: radial-gradient(60% 50% at 50% 70%, rgba(255, 111, 97, .12), transparent 70%), var(--well); border: 0; border-radius: 16px; padding: 12px 12px 6px; }
.ep-big, .ep-big b { font: 500 clamp(34px, 9vw, 46px)/1 var(--mono); color: var(--coral-hi); letter-spacing: -.03em; }
.ep-fk { font: 800 13px/1 var(--sans); color: var(--kraft-lt); }
.ep-ctl > span { font: 800 13.5px/1.3 var(--sans); color: var(--ink-2); }
.ep-ctl input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: var(--rule-2); }
.ep-ctl input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: var(--rule-2); }
.ep-ctl input[type=range]::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -9px; border: 4px solid var(--pearl); background: var(--coral); }
.ep-ctl input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 4px solid var(--pearl); background: var(--coral); }
.ep-fee { border-bottom: 1px dashed var(--rule-2); }
.ep-leg li { border-bottom: 1px dashed var(--rule-2); }
.ep-split .flow { stroke: var(--plum); }
.tr-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tr-rules li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; }
.tr-n { display: grid; place-items: center; height: 26px; margin-top: 2px; font: 400 15px/1 var(--display); color: var(--on-kraft); background: var(--kraft); border-radius: 5px; clip-path: polygon(7px 0, 100% 0, 100% 100%, 7px 100%, 0 50%); padding-left: 4px; transform: rotate(-4deg); }
.tr-rules h3 { margin: 0 0 3px; font: 400 17px/1.25 var(--display); }
.tr-rules p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }

/* The shell: a slim ribbon strip on top (the real state: $GIFTMAS, launching, the pile), a berry header with the mark, a rail of tag
   buttons on the left (desktop) and a deck where every page is laid out as gift-tag cards: soft berry paper, a small kraft tag with a
   punched hole marks each card's title, ribbon dividers between parts. Phones: the rail folds into the menu sheet; cards stack.
   Served after style.css and story.css. */
:root { --t1: 11.5px; --t2: 13px; --t3: 16px; --t4: 19px; --t5: 26px; --t6: clamp(32px, 4vw, 52px); }

/* ---------- the ribbon strip ---------- */
.mkt { position: relative; z-index: 31; display: flex; align-items: center; justify-content: center; gap: 6px; height: var(--mkt-h); overflow: hidden; white-space: nowrap; padding: 0 8px;
  background: linear-gradient(180deg, var(--coral) 0 2px, transparent 2px), linear-gradient(0deg, var(--coral-dk) 0 2px, transparent 2px), #4e1a4c;
  font: 700 12px/1 var(--sans); }
.mkt-c { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; flex: none; color: #ffe9e4; }
.mkt-c + .mkt-c::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: rgba(251, 243, 234, .55); margin-right: 8px; }
.mkt-c i { font-style: normal; font-weight: 600; opacity: .8; }
.mkt-c b { font-weight: 800; color: #fff; }
.mkt-c.no b { color: #ffe4a0; } .mkt-c.go b { color: var(--mint-hi); } .mkt-c.hold b { color: #ffe4a0; }
@media (max-width: 389px) { .mkt-c.wide { display: none; } .mkt { font-size: 11.5px; } }

/* ---------- header ---------- */
.sbar { position: sticky; top: 0; z-index: 30; background: rgba(42, 15, 46, .94); color: var(--ink); box-shadow: 0 1px 0 var(--rule), 0 12px 24px -20px #0a000c; }
@supports (backdrop-filter: blur(1px)) { .sbar { background: rgba(42, 15, 46, .82); backdrop-filter: blur(14px) saturate(1.2); } }
.sbar-in { display: flex; align-items: center; gap: 8px; height: var(--bar-h); padding: 0 10px 0 12px; max-width: 1400px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font: 400 24px/1 var(--display); letter-spacing: -.01em; flex: none; margin-right: auto; }
.logo b { color: var(--coral); font-weight: 400; }
.logo:hover { color: #fff; }
.logo .mark svg { display: block; width: 34px; height: 34px; transition: transform .6s var(--bounce); }
.logo:hover .mark svg { transform: rotate(-8deg) translateY(-2px); }
.readouts { display: none; }
.head-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.head-actions .btn, .menu-btn { height: 42px; min-height: 0; position: relative; }
.head-actions .btn::after, .menu-btn::after { content: ""; position: absolute; inset: -3px; }
.head-actions .head-x { width: 42px; padding: 0; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule-2); }
.head-actions .head-x:hover { background: rgba(251, 243, 234, .08); color: #fff; transform: none; }
.head-x svg { width: 15px; height: 15px; }
#wallet { max-width: 150px; overflow: hidden; white-space: nowrap; padding: 0 14px; font-size: 14px; box-shadow: 0 2px 0 var(--coral-dk); }
.menu-btn { transition: background-color .2s, transform .15s var(--ease); display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; box-shadow: inset 0 0 0 1.5px var(--rule-2); border-radius: 14px; color: var(--ink); cursor: pointer; touch-action: manipulation; width: 42px; }
.menu-btn:hover { background: rgba(251, 243, 234, .08); }
.menu-btn:active, .head-actions .head-x:active { transform: scale(.94); }
.menu-btn i, .menu-btn i::before, .menu-btn i::after { display: block; width: 17px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease); }
.menu-btn i { position: relative; background: transparent; }
.menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; top: 0; }
.menu-btn i::before { transform: translateY(-3.5px); } .menu-btn i::after { transform: translateY(3.5px); }
.menu-btn[aria-expanded="true"] { background: var(--pearl); color: var(--plum); box-shadow: none; }
.menu-btn[aria-expanded="true"] i::before { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] i::after { transform: rotate(-45deg); }
@media (max-width: 379px) { .head-actions .head-x { display: none; } .logo { font-size: 20px; gap: 7px; } .logo .mark svg { width: 28px; height: 28px; } #wallet { max-width: 120px; padding: 0 11px; } #wallet .ic { display: none; } }
@media (max-width: 419px) { #wallet:not([title^="Connect"]) .ic { display: none; } }

/* ---------- phone menu: a sheet of gift tags that drops from the header ---------- */
.scrim { display: none; position: fixed; inset: 0; z-index: 24; background: rgba(20, 4, 22, .66); animation: fade .25s var(--ease) both; }
.sheet { position: fixed; left: 0; right: 0; top: calc(var(--bar-h) + var(--mkt-h)); z-index: 26; padding: 12px 12px 16px; border-radius: 0 0 22px 22px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--berry) var(--paper); box-shadow: 0 24px 40px -20px #0a000c; max-height: calc(100dvh - var(--bar-h) - var(--mkt-h)); overflow-y: auto; animation: drop .3s var(--ease) both; }
.sheet:not([hidden]) + .scrim { display: block; }
.sheet a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border-radius: 14px; background: rgba(251, 243, 234, .05); color: var(--ink); text-decoration: none; font: 800 16px/1.15 var(--sans); }
.sheet a i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(251, 243, 234, .08); color: var(--kraft-lt); flex: none; }
.sheet a i svg, .rail a i svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.sheet a[aria-current="page"] { background: var(--pearl); color: var(--plum); }
.sheet a[aria-current="page"] i { background: var(--coral); color: var(--on-coral); }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }

/* ---------- frame: rail + deck ---------- */
.frame { flex: 1; display: flex; min-height: 0; position: relative; z-index: 1; }
.rail { display: none; }
.deck { flex: 1; min-width: 0; display: flex; flex-direction: column; background: none; }
@media (min-width: 1000px) {
  .menu-btn, .sheet, .scrim { display: none !important; }
  .rail { display: flex; flex-direction: column; gap: 4px; flex: none; width: var(--rail-w); position: sticky; align-self: flex-start; top: var(--bar-h); height: calc(100dvh - var(--bar-h)); padding: 14px 8px; overflow-y: auto; }
  .rail a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 4px; border-radius: 14px; color: var(--ink-2); text-decoration: none; text-align: center; font: 700 12px/1.2 var(--sans); transition: color .2s, background-color .2s; }
  .rail a i { color: var(--kraft-lt); width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(251, 243, 234, .06); transition: background-color .2s, color .2s, transform .3s var(--bounce); }
  .rail a:hover { color: #fff; }
  .rail a:hover i { transform: rotate(-6deg) scale(1.06); background: rgba(251, 243, 234, .12); }
  .rail a[aria-current="page"] { color: #fff; }
  .rail a[aria-current="page"] i { background: var(--coral); color: var(--on-coral); box-shadow: 0 3px 0 var(--coral-dk); }
}

/* ---------- main + footer ---------- */
main { flex: 1; padding: 18px 0 40px; view-transition-name: page; overflow-x: clip; }
.wrap { max-width: 1200px; padding: 0 16px; }
@media (min-width: 1000px) { main { padding: 24px 8px 48px; } .wrap { padding: 0 24px; } }
.foot { position: relative; z-index: 1; margin-top: 12px; background: var(--plum-0); color: var(--ink-2); font-size: 14px; }
/* a scalloped edge, like the trim of a tree skirt */
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; background: radial-gradient(circle at 10px 10px, var(--plum-0) 9.5px, transparent 10px) 0 0 / 20px 20px repeat-x; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 16px; max-width: 1200px; margin: 0 auto; }
@media (min-width: 1000px) { .foot-in { padding: 14px 30px; } }
.foot-copy { margin: 0; font: 700 13px/1.4 var(--sans); color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.foot-mark svg { display: block; width: 24px; height: 24px; }
.foot-note { margin: 0; flex: 1 1 260px; }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.foot-links a, #foot-ext a { color: var(--ink); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; gap: 7px; font-weight: 800; }
.foot-links a:hover { color: var(--coral-hi); }
#foot-ext { display: inline-flex; gap: 14px; }
.foot-x svg { width: 13px; height: 13px; }
.foot-note a { color: var(--mint); font-weight: 800; }

/* ---------- primitives ---------- */
h1 { font-size: var(--t6); line-height: 1.05; margin: 4px 0 10px; }
h2 { font-size: clamp(21px, 2.4vw, 27px); line-height: 1.15; margin: 28px 0 10px; }
.lead { font-size: 16.5px; line-height: 1.6; }

/* page head: the title over a faint drawing of an empty pile under a tree, a ribbon divider below */
.phead { position: relative; display: grid; gap: 12px 24px; align-items: end; margin: -18px -16px 22px; padding: 22px 16px 26px; color: var(--ink); overflow: hidden; }
.phead::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 8px; border-radius: 8px;
  background: radial-gradient(circle at 50% 50%, var(--pearl) 2.2px, transparent 2.6px) 0 0 / 14px 8px repeat-x, var(--coral); opacity: .9; }
.phead > * { position: relative; z-index: 1; }
.phead > .ph-art { position: absolute; z-index: 0; right: -30px; top: 50%; width: 360px; height: auto; transform: translateY(-50%); pointer-events: none; }
@media (max-width: 759px) { .phead > .ph-art { width: 230px; right: -60px; top: -18px; transform: none; opacity: .6; } }
.tk-head::after { display: block; }
@media (min-width: 760px) { .phead { grid-template-columns: minmax(0, 1fr) auto; } }
@media (min-width: 1000px) { .phead { margin: -24px -30px 26px; padding: 30px 30px 30px; } .phead::after { left: 30px; right: 30px; } }
.ph-path { display: flex; flex-wrap: wrap; gap: 0; margin: 0; font: 800 13px/1.2 var(--sans); color: var(--ink-3); }
.ph-path span + span::before { content: "›"; margin: 0 8px; color: var(--kraft); }
.ph-path span:last-child { color: var(--kraft-lt); }
.phead h1 { margin: 10px 0 8px; color: #fff; }
.phead h1 em { color: var(--coral); }
.phead .lead { margin: 0; max-width: 66ch; font-size: 16px; color: var(--ink-2); }
.phead a:not(.btn) { color: var(--mint); }
.ph-act { display: flex; gap: 8px; flex-wrap: wrap; }

/* panel = a gift-tag card: soft berry paper; its title wears a small kraft tag with a punched hole, slightly tilted */
.pnl { position: relative; background: var(--berry) var(--paper); border: 1px solid var(--rule); border-radius: var(--r); min-width: 0; box-shadow: var(--shadow); transition: border-color .25s, transform .3s var(--ease); }
.pnl:hover { border-color: var(--rule-2); }
.pnl + .pnl { margin-top: 16px; }
.pnl-h { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 14px 16px 4px; font: 800 15px/1.25 var(--sans); color: var(--ink); }
.pnl-h::before { content: ""; flex: none; width: 26px; height: 16px; margin-right: 2px; transform: rotate(-9deg); border-radius: 3px;
  background: radial-gradient(circle at 8px 50%, var(--berry) 2.6px, transparent 3px), var(--kraft);
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 6px 100%, 0 50%); box-shadow: 0 2px 0 var(--kraft-dk); }
.pnl-h > .spacer { flex: 1; }
.pnl-h > span:not(.spacer):not(.dot):not(.sw), .pnl-h > b { font: 600 13px/1.2 var(--sans); color: var(--ink-3); }
.pnl-h a { font: 800 13.5px/1 var(--sans); text-decoration: none; }
.pnl-h .dot { display: none; }
.pnl-h .sw { margin-right: -4px; }
.pnl-b { padding: 12px 16px 16px; }
.pnl-b > :first-child { margin-top: 0; }
.pnl-b > :last-child { margin-bottom: 0; }

/* layout: a work area and a sticky inspector on the right (wide screens) */
.cgrid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1100px) { .cgrid { grid-template-columns: minmax(0, 1fr) 360px; } .cgrid > .insp { position: sticky; top: calc(var(--bar-h) + 16px); } }

/* readouts: little price tags (label, figure, source) */
.ro-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .ro-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ro { position: relative; background: var(--berry) var(--paper); border-radius: 16px; padding: 14px 14px 12px; min-width: 0; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); border: 1px solid var(--rule); }
.ro-k { font: 700 12.5px/1.3 var(--sans); color: var(--ink-3); }
.ro-v { font: 500 clamp(19px, 2.2vw, 25px)/1.1 var(--mono); letter-spacing: -.02em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro .src { margin-top: 2px; }

/* tabs: a row of pearl tags */
.tabbar { display: flex; gap: 4px; background: var(--well); padding: 4px; border-radius: 16px; }
.tabbar [role="tab"] { flex: 1 1 0; min-width: 0; min-height: 42px; padding: 6px 8px; background: transparent; border: 0; border-radius: 12px; color: var(--ink-2); font: 800 14.5px/1.1 var(--sans); cursor: pointer; white-space: nowrap; transition: color .2s, background-color .2s; }
.tabbar [role="tab"]:hover { color: var(--ink); background: rgba(251, 243, 234, .05); }
.tabbar [role="tab"][aria-selected="true"] { background: var(--pearl); color: var(--plum); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }

/* event log: time, body, value */
.log { list-style: none; margin: 0; padding: 0 4px; }
.log > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 11px 12px; border-top: 1px dashed var(--rule-2); }
.log > li:first-child { border-top: 0; }
.log .t { font: 600 12px/1.4 var(--sans); color: var(--ink-3); white-space: nowrap; }
.log .v { font: 400 13px/1.4 var(--mono); white-space: nowrap; text-align: right; }

/* content swapped into a card unfolds in */
.acq { animation: acquire .32s var(--ease) both; }
@keyframes acquire { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.empty { padding: 16px 14px 18px; }
.empty .empty-art { width: 104px; }
.empty p { margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) {
  main > *, .acq, .sheet { animation: none !important; }
}

/* Home: the Gift Pile hero (client/pile.ts draws the pile on a canvas; this sheet lays out the stage, the focusable box buttons over it,
   the "wrap the next gift" tag, the unwrap card and the ribbon of real listings) and the sections below it. Phones: status chips, the
   pile, the ribbon, then the copy, so the whole pile fits above the fold at 360x640. Wide screens: copy on the left, pile on the right. */
.home { overflow-x: clip; margin-top: -18px; }
@media (min-width: 1000px) { .home { margin: -24px -8px 0; } }

/* ---------- hero layout ---------- */
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "drop" "bar" "pile" "ribbon" "copy"; }
.hero-bar { grid-area: bar; display: flex; align-items: center; gap: 6px; padding: 10px 12px 2px; overflow: hidden; white-space: nowrap; font: 700 12.5px/1 var(--sans); }
.hb-t { font: 400 15px/1 var(--display); color: var(--kraft-lt); margin-right: auto; }
.hb-c { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; background: rgba(251, 243, 234, .07); flex: none; }
.hb-c i { font-style: normal; color: var(--ink-3); } .hb-c b { font: 600 12.5px/1 var(--mono); color: var(--ink); }
@media (max-width: 389px) { .hb-c:last-child { display: none; } }
.hero-pile { grid-area: pile; position: relative; min-width: 0; }
.hero-copy { grid-area: copy; position: relative; z-index: 2; padding: 22px 16px 30px; min-width: 0; }
.hero-kick { margin: 0 0 10px; font: 800 13px/1.2 var(--sans); color: var(--kraft-lt); }
.hero-title { margin: 0; font: 400 clamp(2.1rem, 10vw, 3.2rem)/1.02 var(--display); letter-spacing: -.015em; color: #fff; }
.hero-title em { font-style: normal; color: var(--coral); }
.hero-line { margin: 14px 0 0; color: var(--ink-2); font-size: 1.02rem; line-height: 1.6; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
@media (max-width: 599px) { .hero-cta .btn { flex: 1 1 auto; padding-inline: 12px; } }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-rows: auto auto 1fr auto; grid-template-areas: "bar bar" "drop pile" "copy pile" "ribbon ribbon"; }
  .hero-drop { align-self: end; padding: 28px 28px 0 max(24px, calc((100vw - 1200px) / 2)); }
  .hero-bar { padding: 12px max(24px, calc((100vw - 1200px) / 2)) 0; }
  .hero-copy { align-self: start; padding: 22px 28px 40px max(24px, calc((100vw - 1200px) / 2)); }
  .hero-title { font-size: clamp(3rem, 4.8vw, 4.6rem); }
  .hero-line { font-size: 1.08rem; }
}

/* ---------- the pile stage ---------- */
.gp { position: relative; }
.gp-stage { position: relative; height: clamp(400px, 118vw, 560px); overflow: hidden;
  background: radial-gradient(55% 40% at 50% 30%, rgba(255, 111, 97, .1), transparent 70%), radial-gradient(70% 30% at 50% 96%, rgba(159, 226, 191, .08), transparent 70%); }
@media (min-width: 900px) { .gp-stage { height: clamp(520px, calc(100vh - 150px), 660px); } }
.gp-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
/* one real button over every box: invisible, but focusable with a visible ring (pointer input goes to the canvas) */
.gp-keys { position: absolute; inset: 0; pointer-events: none; }
.gp-k { position: absolute; padding: 0; margin: 0; border: 0; background: none; border-radius: 10px; opacity: 1; pointer-events: none; }
.gp-k:focus { outline: none; }
.gp-k:focus-visible { outline: 2.5px solid var(--pearl); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(42, 15, 46, .6); }
.gp-hint { position: absolute; z-index: 2; right: 10px; top: 10px; margin: 0; max-width: min(36%, 170px); text-align: right; font: 600 12px/1.4 var(--sans); color: var(--ink-3); pointer-events: none; }
@media (min-width: 900px) { .gp-hint { right: 18px; top: 16px; max-width: 200px; } }
.gp-tabs { display: flex; gap: 6px; padding: 8px 12px 0; overflow-x: auto; scrollbar-width: none; }
.gp-tabs button { flex: 0 0 auto; min-height: 38px; padding: 4px 14px; border: 0; border-radius: 999px; background: rgba(251, 243, 234, .07); color: var(--ink-2); font: 700 13px/1.2 var(--sans); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.gp-tabs button span { font: 500 12px/1 var(--mono); color: var(--ink-3); }
.gp-tabs button[aria-selected="true"] { background: var(--pearl); color: var(--plum); }
.gp-tabs button[aria-selected="true"] span { color: #6a4a66; }

/* the tag on its string (the string is drawn on the canvas): a kraft gift tag with a punched hole, slightly tilted */
.gp-tag { position: absolute; z-index: 3; left: 10px; top: 14px; display: grid; gap: 2px; max-width: min(44%, 190px); padding: 9px 12px 10px 26px; color: var(--on-kraft); text-decoration: none;
  background: radial-gradient(circle at 12px 50%, var(--plum) 4px, rgba(59, 36, 20, .35) 4.6px, transparent 5.2px), linear-gradient(160deg, var(--kraft-lt), var(--kraft));
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); border-radius: 4px; transform: rotate(-4deg); transform-origin: 0 50%;
  filter: drop-shadow(0 6px 8px rgba(12, 0, 14, .45)); transition: transform .35s var(--bounce); touch-action: manipulation; }
.gp-tag b { font: 400 15px/1.15 var(--display); color: #3b2414; }
.gp-tag span { font: 700 11.5px/1.25 var(--sans); color: #5e3f26; }
.gp-tag:hover, .gp-tag:focus-visible { transform: rotate(0deg) translateY(-2px); color: var(--on-kraft); }
.gp-tag:focus-visible { outline: none; filter: drop-shadow(0 0 0 var(--pearl)) drop-shadow(0 0 3px var(--pearl)); }
@media (min-width: 900px) { .gp-tag { left: 18px; top: 22px; padding: 12px 16px 13px 30px; } .gp-tag b { font-size: 18px; } .gp-tag span { font-size: 12.5px; } }
@media (prefers-reduced-motion: no-preference) { .gp-tag { animation: tagsway 1.1s var(--bounce) .4s 1 both; } }
@keyframes tagsway { 0% { transform: rotate(-14deg); opacity: 0; } 100% { transform: rotate(-4deg); opacity: 1; } }

/* the unwrap card: what is inside the box. Phones: docked to the top or bottom edge (away from the box); wide: beside the box */
.gp-card { position: absolute; z-index: 4; left: 8px; right: 8px; padding: 12px 14px 12px; border-radius: 18px; background: var(--pearl); color: var(--plum);
  box-shadow: 0 22px 40px -16px rgba(12, 0, 14, .8), inset 0 0 0 1px rgba(42, 15, 46, .08); animation: gcin .32s var(--bounce) both; }
.gp-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 18px 18px 0 0; background: var(--c, var(--kraft)); }
@keyframes gcin { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.gp-card.gc-free { --c: var(--mint); } .gp-card.gc-shut { --c: #6b5a6e; }
.gp-card.gc-pool { box-shadow: 0 22px 40px -16px rgba(12, 0, 14, .8), 0 0 0 2px var(--foil); }
@media (min-width: 620px) { .gp-card { right: auto; width: 260px; } }
.gc-x { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; color: #6a4a66; cursor: pointer; font: 400 26px/1 var(--sans); }
.gc-x:hover { color: var(--plum); background: rgba(42, 15, 46, .07); }
.gc-kick { margin: 2px 40px 8px 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font: 700 12px/1.3 var(--sans); color: #7a5a76; }
.gc-kick span:first-child { color: var(--plum); font-weight: 800; }
.gc-badge { color: #4a3304 !important; background: var(--foil); padding: 2px 8px; border-radius: 999px; font-weight: 800; }
.gc-title { margin: 0 0 4px; font: 400 1.25rem/1.1 var(--display); color: var(--plum); }
.gc-text { margin: 4px 0 10px; font-size: .92rem; line-height: 1.45; color: #5a3a56; }
.gc-head { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.gc-img { width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover; box-shadow: 0 0 0 3px var(--c), 0 0 0 5px var(--foil); background: var(--berry); }
.gc-names { display: grid; min-width: 0; }
.gc-names b { font: 400 1.25rem/1.1 var(--display); color: var(--plum); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-names span { font-size: .88rem; color: #6a4a66; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0 6px; }
.gc-stats div { min-width: 0; background: rgba(42, 15, 46, .06); border-radius: 10px; padding: 6px 8px; }
.gc-stats dt { font: 700 11px/1.3 var(--sans); color: #7a5a76; }
.gc-stats dd { margin: 1px 0 0; font: 600 13.5px/1.3 var(--mono); color: var(--plum); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-pool-t { margin: 6px 0 2px; font: 700 12.5px/1.35 var(--sans); color: #6b4d0a; }
.gc-open { display: inline-flex; align-items: center; min-height: 38px; margin-top: 2px; font: 800 14.5px/1 var(--sans); color: var(--coral-dk); text-decoration: none; }
.gc-open:hover { color: #b13a2c; text-decoration: underline; }
.gp-card .btn.sm { margin-top: 2px; }

/* ---------- the ribbon of real listings (hidden while there are none) ---------- */
.rb { grid-area: ribbon; position: relative; margin: 4px 0 0; padding: 0; background: var(--coral); box-shadow: inset 0 3px 0 var(--coral-hi), inset 0 -3px 0 var(--coral-dk); overflow: hidden; }
.rb-win { overflow: hidden; }
.rb-track { display: flex; width: max-content; }
.rb-run { display: flex; flex: none; }
.rb-i { display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; height: 38px; font: 700 13px/1 var(--sans); color: var(--on-coral); text-decoration: none; white-space: nowrap; }
.rb-i i { width: 11px; height: 11px; border-radius: 3px; background: linear-gradient(90deg, transparent 40%, var(--pearl) 40% 60%, transparent 60%), var(--c); box-shadow: 0 0 0 1.5px rgba(42, 15, 46, .4); }
.rb-i b { font: 400 14px/1 var(--display); }
.rb-i span { font: 600 12.5px/1 var(--mono); }
.rb-i .rb-sh { opacity: .7; }
.rb-i + .rb-i::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--pearl); margin-right: 8px; opacity: .8; }
.rb-run + .rb-run .rb-i:first-child::before, .rb-run > .rb-i:first-child::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--pearl); margin-right: 8px; opacity: .8; }
.rb-i:hover { color: var(--plum); text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) {
  .rb-track { animation: crawl var(--dur, 30s) linear infinite; }
  .rb:hover .rb-track, .rb:focus-within .rb-track { animation-play-state: paused; }
}
@keyframes crawl { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .rb-win { overflow-x: auto; scrollbar-width: none; } .rb-run[aria-hidden="true"] { display: none; } }

/* ---------- below the hero ---------- */
.home > .wrap { padding-top: var(--sec, 56px); padding-bottom: var(--sec, 56px); display: grid; gap: var(--sec, 56px); }
.home-sec { min-width: 0; position: relative; }
/* a ribbon with a bow between the sections */
.home-sec + .home-sec::before { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--sec, 56px) / -2 - 11px); height: 22px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 22'%3E%3Cpath d='M30 11c-8-12-22-11-18-1 3 6 12 3 18 1zm0 0c8-12 22-11 18-1-3 6-12 3-18 1z' fill='%23ff6f61' stroke='%23d9503f'/%3E%3Cpath d='M30 11l-9 10M30 11l9 10' stroke='%23ff6f61' stroke-width='4' stroke-linecap='round'/%3E%3Cellipse cx='30' cy='11' rx='4.5' ry='3.6' fill='%23ff8f84'/%3E%3C/svg%3E") 50% 50% / 60px 22px no-repeat,
    linear-gradient(transparent 9px, rgba(255, 111, 97, .55) 9px 13px, transparent 13px); }
.sec-kick { margin: 0 0 10px; font: 800 13.5px/1 var(--sans); color: var(--kraft-lt); display: flex; align-items: center; gap: 10px; }
.sec-kick::before { content: ""; width: 22px; height: 13px; border-radius: 2px; transform: rotate(-8deg); background: radial-gradient(circle at 6px 50%, var(--plum) 2.2px, transparent 2.6px), var(--kraft); clip-path: polygon(5px 0, 100% 0, 100% 100%, 5px 100%, 0 50%); }
.sec-title { margin: 0 0 16px; font: 400 clamp(1.75rem, 6.4vw, 2.7rem)/1.08 var(--display); letter-spacing: -.012em; color: #fff; }
.sec-lede { margin: 0 0 20px; max-width: 62ch; color: var(--ink-2); line-height: 1.6; }
.sec-more { margin: 20px 0 0; }
.sec-more a { color: var(--mint); font: 800 15px/1 var(--sans); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.sec-more a:hover { color: var(--mint-hi); text-decoration: underline; text-underline-offset: 4px; }

/* how a launch works: four gift tags, alternately tilted, each with a punched hole and string */
.hsteps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 18px; }
.hsteps li { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 16px 16px 16px 18px; border-radius: 16px;
  background: var(--berry) var(--paper); box-shadow: var(--shadow); border: 1px solid var(--rule); transform: rotate(-.6deg); transition: transform .35s var(--bounce); }
.hsteps li:nth-child(even) { transform: rotate(.6deg); }
.hsteps li:hover { transform: rotate(0) translateY(-2px); }
.hsteps li::before { content: ""; position: absolute; right: 16px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--plum); box-shadow: inset 0 0 0 2px rgba(201, 162, 122, .7); }
.hs-n { margin: 0; grid-column: 2; font: 800 12.5px/1.2 var(--sans); color: var(--coral-hi) !important; }
.hsteps h3 { margin: 6px 0 0; grid-column: 2; font: 400 1.18rem/1.2 var(--display); color: #fff; padding-right: 14px; }
.hsteps li > p:last-child { margin: 6px 0 0; grid-column: 2; color: var(--ink-2); line-height: 1.55; font-size: .95rem; }
.vg { grid-row: span 3; width: 92px; height: auto; background: var(--well); border-radius: 12px; }
.vg-body { fill: var(--coral); stroke: rgba(40, 8, 40, .4); }
.vg-lid { fill: var(--coral-hi); stroke: rgba(40, 8, 40, .4); }
.vg-rib { fill: var(--pearl); }
.vg-bow { fill: var(--pearl); stroke: rgba(40, 8, 40, .35); }
.vg-mute { fill: rgba(201, 162, 122, .35); stroke: none; }
.vg-sheet { fill: var(--mint); opacity: .85; }
.vg-box { fill: var(--kraft); stroke: rgba(40, 8, 40, .4); }
.vg-dash { stroke: var(--pearl); stroke-width: 1.5; stroke-dasharray: 3 3; opacity: .6; }
.vg-kraft .vg-body, .vg-kraft .vg-lid { fill: var(--kraft); } .vg-kraft .vg-rib { fill: #8a5a3a; }
.vg-foil .vg-body { fill: var(--foil); } .vg-foil .vg-lid { fill: var(--foil-hi); }
.vg-spark { fill: #fff; }
.vg-s1 { fill: var(--lane-holders); } .vg-s2 { fill: var(--lane-buyback); } .vg-s3 { fill: var(--lane-house); }
.vg-lbl { font: 600 10px var(--mono); fill: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) {
  .vg.play .vg-fold { animation: vg-fold .8s var(--bounce) both; transform-origin: 60px 58px; transform-box: view-box; }
  .vg.play .vg-drop { animation: vg-drop .9s var(--bounce) both; }
  .vg.play .vg-big { animation: vg-grow 1.2s var(--bounce) .2s both; transform-origin: 77px 84px; transform-box: view-box; }
  .vg.play .vg-spark { animation: vg-spark 1.2s var(--ease) .9s both; transform-origin: 92px 37px; transform-box: view-box; }
  .vg.play .vg-s { animation: vg-fill .6s var(--ease) both; transform-box: fill-box; transform-origin: left; }
  .vg.play .vg-s2 { animation-delay: .2s; } .vg.play .vg-s3 { animation-delay: .4s; }
  .hsteps li:hover .vg-drop { animation: vg-hop .7s var(--bounce); }
}
@keyframes vg-fold { from { transform: scaleY(.1); opacity: 0; } }
@keyframes vg-drop { from { transform: translateY(-40px); opacity: 0; } }
@keyframes vg-grow { from { transform: scale(.55); } }
@keyframes vg-spark { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
@keyframes vg-fill { from { transform: scaleX(0); } }
@keyframes vg-hop { 40% { transform: translateY(-8px); } }
@media (min-width: 760px) { .hsteps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .hsteps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .hsteps li { grid-template-columns: minmax(0, 1fr); row-gap: 4px; padding: 18px; }
  .hs-n, .hsteps h3, .hsteps li > p:last-child { grid-column: 1; }
  .vg { grid-row: auto; width: 100%; max-width: 170px; margin-bottom: 10px; }
}

/* fees: three ribbons */
.fsplit { display: flex; gap: 4px; height: 30px; margin: 4px 0 20px; max-width: 760px; }
.fsplit i { display: flex; align-items: center; justify-content: center; height: 100%; background: var(--c); overflow: hidden; border-radius: 8px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.fsplit i span { font: 700 12px/1 var(--mono); color: var(--plum); }
.c-house { --c: var(--lane-house); } .c-holders { --c: var(--lane-holders); } .c-burn { --c: var(--lane-buyback); }
.fparts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 760px; }
.fparts li { position: relative; display: grid; grid-template-columns: 4.4em minmax(0, 1fr); column-gap: 14px; padding: 14px 16px 14px 20px; border-radius: 14px; background: var(--berry) var(--paper); box-shadow: var(--shadow); border: 1px solid var(--rule); overflow: hidden; }
.fparts li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c); }
.fparts b { grid-row: span 2; font: 500 1.4rem/1.1 var(--mono); letter-spacing: -.03em; color: var(--c); }
.fp-l { font-weight: 800; color: var(--ink); }
.fp-t { color: var(--ink-2); font-size: .93rem; line-height: 1.45; }
@media (min-width: 900px) {
  .fparts { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }
  .fparts li { grid-template-columns: minmax(0, 1fr); padding: 18px 18px 18px 22px; }
  .fparts b { grid-row: auto; font-size: 2.1rem; }
  .fsplit { max-width: none; }
}
.deal { list-style: none; margin: 24px 0 0; padding: 18px 0 0; border-top: 2px dashed var(--rule-2); display: grid; gap: 12px; }
.deal li { display: grid; grid-template-columns: 7.4em minmax(0, 1fr); gap: 12px; align-items: baseline; }
.deal b { font: 800 .92rem/1.3 var(--sans); color: var(--kraft-lt); }
.deal span { color: var(--ink-2); font-size: .95rem; line-height: 1.45; }
@media (min-width: 900px) { .deal { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } .deal li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.note-tag { margin: 20px 0 0; padding: 12px 16px; border-radius: 14px; border: 1.5px dashed rgba(233, 196, 106, .6); color: #f8e7bd; font-size: .95rem; line-height: 1.45; max-width: 62ch; background: var(--foil-soft); }
.ca-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 20px 0 0; font-size: .9rem; color: var(--ink-3); }
.ca-line code { font-size: .78rem; overflow-wrap: anywhere; color: var(--ink-2); }

/* the biggest gifts: a short list of tags */
.qboard { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qboard a { display: grid; grid-template-columns: 1.6em 36px minmax(0, 1fr) 5.8em 3.8em; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; color: inherit; text-decoration: none; background: var(--berry) var(--paper); border: 1px solid var(--rule); box-shadow: inset 5px 0 0 var(--c); transition: transform .3s var(--bounce), border-color .2s; }
.qboard a:hover { transform: translateX(3px); border-color: var(--rule-2); }
.qb-r { font: 400 1.2rem/1 var(--display); color: var(--foil); text-align: center; }
.qb-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.qb-n { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.qb-n b { font: 400 1.05rem/1.2 var(--display); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-n small { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.qb-m, .qb-s { text-align: right; white-space: nowrap; font: 500 13px/1.2 var(--mono); }
.qb-s { color: var(--mint); }
@media (max-width: 419px) { .qboard a { grid-template-columns: 1.4em 32px minmax(0, 1fr) 5.2em 3.4em; gap: 8px; padding: 9px 10px; } .qb-img { width: 32px; height: 32px; } .qb-n small { display: none; } }
.qboard-empty, .newest-empty { position: relative; padding: 18px 18px 18px 20px; border-radius: 16px; border: 2px dashed var(--rule-2); background: rgba(251, 243, 234, .03); }
.qboard-empty p, .newest-empty p { margin: 0 0 12px; color: var(--ink-2); line-height: 1.5; }

/* under the tree today and the newest gifts */
.live { display: grid; gap: 32px; }
@media (min-width: 900px) { .live { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; } }
.lv-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lv { min-width: 0; padding: 14px 12px; border-radius: 14px; background: var(--berry) var(--paper); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.lv b { display: block; font: 500 clamp(1.1rem, 5vw, 1.7rem)/1.1 var(--mono); letter-spacing: -.03em; color: #fff; overflow-wrap: anywhere; }
.lv span { display: block; margin-top: 6px; font: 700 12px/1.3 var(--sans); color: var(--ink-3); }
.live-new h3 { margin: 0 0 12px; font: 400 1.3rem/1.1 var(--display); color: #fff; }
.newest { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.newest a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px; min-height: 56px; border-radius: 14px; color: inherit; text-decoration: none; background: rgba(251, 243, 234, .04); transition: background-color .2s; }
.newest a:hover { background: rgba(251, 243, 234, .08); }
.newest img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.nw-n { display: grid; min-width: 0; }
.nw-n b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-n > span { display: flex; gap: 10px; font-size: .84rem; color: var(--ink-3); }
.nw-tk { color: var(--mint); font-family: var(--mono); font-size: .8rem; }
.nw-m { font: 500 .86rem/1 var(--mono); color: var(--ink-2); }

@media (max-width: 359px) {
  .hero-copy { padding: 18px 12px 22px; }
  .lv-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .deal li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hsteps li { grid-template-columns: 72px minmax(0, 1fr); }
  .vg { width: 72px; }
}
@media (prefers-reduced-motion: reduce) { .gp-card, .gp-tag { animation: none; } .hsteps li, .hsteps li:nth-child(even) { transition: none; } }
/* phones: a compact card so the pile stays in view while a gift is open */
@media (max-width: 619px) {
  .gp-card { padding: 9px 12px 8px; border-radius: 16px; }
  .gc-kick { margin-bottom: 6px; font-size: 11.5px; }
  .gc-x { width: 36px; height: 36px; top: 4px; right: 4px; }
  .gc-img { width: 34px; height: 34px; box-shadow: 0 0 0 2px var(--c), 0 0 0 4px var(--foil); }
  .gc-names { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 8px; }
  .gc-names b { font-size: 1.1rem; }
  .gc-stats { margin: 8px 0 4px; gap: 4px; }
  .gc-stats div { padding: 4px 7px; }
  .gc-stats dd { font-size: 12.5px; }
  .gc-pool-t { margin: 4px 0 0; font-size: 12px; }
  .gc-open { min-height: 32px; margin-top: 0; font-size: 14px; }
  .gc-text { margin: 2px 0 6px; font-size: .88rem; }
}

/* ---------- the airdrop clock (hero centerpiece) and the airdrop log ---------- */
.hero-drop { grid-area: drop; position: relative; z-index: 2; padding: 12px 12px 0; min-width: 0; }
.drop-clock { position: relative; padding: 14px 16px 14px; border-radius: 18px; background: linear-gradient(160deg, rgba(233, 196, 106, .16), rgba(255, 111, 97, .1) 60%, rgba(159, 226, 191, .08)); border: 1.5px solid rgba(233, 196, 106, .4); box-shadow: var(--shadow); overflow: hidden; }
.drop-clock::before { content: ""; position: absolute; top: 0; bottom: 0; right: 22px; width: 12px; background: rgba(233, 196, 106, .28); pointer-events: none; }
.dc-k { position: relative; margin: 0; font: 800 13px/1.2 var(--sans); color: var(--foil-hi); }
.dc-row { position: relative; display: flex; align-items: baseline; gap: 10px; margin: 4px 0 8px; }
.dc-t { font: 600 clamp(2.6rem, 15vw, 3.6rem)/1 var(--mono); letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.drop-clock[data-state="waiting"] .dc-t, .drop-clock[data-state="error"] .dc-t { color: var(--ink-3); opacity: .55; }
.dc-bar { position: relative; height: 8px; border-radius: 99px; background: rgba(251, 243, 234, .1); overflow: hidden; }
.dc-fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--foil) 70%, var(--coral)); transform-origin: left; transform: scaleX(0); transition: transform 1s linear; }
.dc-s { position: relative; margin: 10px 0 0; color: var(--ink-2); font-size: .92rem; line-height: 1.45; }
.dc-w { display: inline; padding: 1px 7px; border-radius: 99px; background: rgba(251, 243, 234, .1); color: var(--ink); white-space: nowrap; }
.dc-n { position: relative; margin: 8px 0 0; font: 600 .85rem/1.4 var(--mono); color: var(--mint-hi); min-height: 1.4em; overflow-wrap: anywhere; }
.drop-clock[data-state="waiting"] .dc-n { color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .dc-fill { transition: none; } }
@media (min-width: 900px) { .dc-t { font-size: 4rem; } .drop-clock { padding: 18px 22px; } }

.ad-tot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.ad-tot[hidden] { display: none; }
.ad-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 760px; }
.ad-list:empty { display: none; }
.ad-row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--rule-2); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ad-row:hover { border-color: rgba(233, 196, 106, .5); }
.ad-row[aria-expanded="true"] { border-color: var(--foil); }
.ad-id { font: 600 13px/1 var(--mono); color: var(--kraft-lt); }
.ad-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ad-main b { font: 600 15px/1.2 var(--mono); overflow-wrap: anywhere; }
.ad-main small { color: var(--ink-3); font-size: .82rem; }
.ad-st { font: 800 12px/1 var(--sans); padding: 6px 9px; border-radius: 99px; white-space: nowrap; background: var(--foil-soft); color: var(--foil-hi); }
.ad-st.sent { background: var(--mint-soft); color: var(--mint-hi); }
.ad-st.partial { background: var(--coral-soft); color: var(--coral-hi); }
.ad-tx { margin: 4px 14px 0; font-size: .85rem; }
.ad-det { margin: 6px 4px 4px; padding: 10px 12px; border-radius: 12px; background: var(--well); }
.ad-pay { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.ad-pay li { display: flex; justify-content: space-between; gap: 10px; font: 500 13px/1.35 var(--mono); }
.ad-pay code { color: var(--ink-2); }
.ad-empty:empty { display: none; }
.ad-empty p { margin: 0; max-width: 62ch; padding: 14px 16px; border-radius: 14px; border: 1.5px dashed var(--rule-2); color: var(--ink-2); line-height: 1.5; }
.ad-check { margin-top: 24px; max-width: 560px; }
.ad-check h3 { margin: 0 0 8px; font: 400 1.2rem/1.2 var(--display); }
.ad-form { display: flex; gap: 8px; margin-bottom: 8px; }
.ad-in { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--rule-2); background: var(--well); color: var(--ink); font: 500 14px/1.2 var(--mono); }
.ad-out { margin: 8px 0 0; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.ad-out:empty { display: none; }

/* Explore, leaderboard, coin page: console data grid, lane tracks, instrument layout (docs/DESIGN-CONSOLE.md). */

/* ---------- shared coin rows ---------- */
.xr-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--well); }
.xr-n { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.xr-n b { font: 650 15px/1.25 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xr-n small { font: 400 11.5px/1.3 var(--mono); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chg { font: 400 13px/1.2 var(--mono); }
.pnl-b .empty { border: 0; margin: 0; background: none; box-shadow: none; backdrop-filter: none; }

/* ---------- explore ---------- */
.xmain { display: grid; gap: 14px; min-width: 0; }
.xmain .pnl + .pnl { margin: 0; }
.xbar-b { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center; }
.xbar-b input { width: 100%; min-height: 44px; margin: 0; }
.xbar-b .seg { display: flex; width: 100%; }
.xbar-b .seg button { flex: 1 1 0; min-height: 44px; padding: 0 6px; font-size: 13.5px; }
.xcount { font: 700 12.5px/1 var(--sans); letter-spacing: .01em;  color: var(--ink-3); }
@media (min-width: 760px) {
  .xbar-b { grid-template-columns: minmax(200px, 1fr) auto auto; }
  .xbar-b .seg { width: auto; }
  .xbar-b .seg button { padding: 0 14px; }
  .xcount { min-width: 80px; text-align: right; }
}
.xtable { overflow: hidden; }
.xr { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "img n m" "img n c"; align-items: center; column-gap: 12px; row-gap: 0; padding: 9px 14px; min-height: 60px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; position: relative; }
.xr:first-child { border-top: 0; }
a.xr:hover { background: rgba(159, 226, 191, .07); }
a.xr .xr-img, .tr-row .xr-img { transition: transform .3s var(--ease); }
a.xr:hover .xr-img, .tr-row:hover .xr-img { transform: scale(1.06); }
a.xr:focus-visible { outline-offset: -3px; }
.xr-i, .xr-v { display: none; }
.xr-img { grid-area: img; }
.xr-n { grid-area: n; }
.xr-m { grid-area: m; font: 400 14px/1.2 var(--mono); text-align: right; white-space: nowrap; }
.xr-c { grid-area: c; text-align: right; }
.xr-i, .xr-v { font: 400 12.5px/1.2 var(--mono); }
.xr-i { color: var(--ink-3); }
.xr-h { display: none; }
.xr-sk { height: 60px; margin: 0; border-radius: 0; }
@media (min-width: 640px) {
  .xr { grid-template-columns: 28px 40px minmax(0, 1fr) 96px 72px 96px; grid-template-areas: "i img n m c v"; }
  .xr-i, .xr-v { display: block; }
  .xr-v { text-align: right; grid-area: v; }
  .xr-i { grid-area: i; }
  .xr-h { display: grid; min-height: 36px; background: var(--well); font: 700 12.5px/1 var(--sans); letter-spacing: .01em;  color: var(--ink-3); }
  .xr-h span { font: inherit; }
  .xr-h .xr-img { background: none; height: auto; }
}
@media (min-width: 1100px) {
  .xr { grid-template-columns: 28px 40px minmax(0, 1fr) 90px 66px 90px; column-gap: 10px; }
}
@media (min-width: 1240px) { .xr { grid-template-columns: 30px 40px minmax(0, 1fr) 110px 80px 110px; column-gap: 14px; } }
a.xr[aria-current="true"] { background: rgba(159, 226, 191, .11); box-shadow: inset 3px 0 0 var(--blue); }
.xinsp { display: none; }
@media (min-width: 1100px) { .xinsp { display: block; } }
.xi-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.xi-head img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.xi-name { margin: 0; font-size: 22px; line-height: 1.1; overflow-wrap: anywhere; }
.xi-sub { margin: 4px 0 0; font: 400 12px/1.3 var(--mono); }
.xi-ro { grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
.xi-ro .ro-v { font-size: 20px; }
.xi-ch { margin: 0 0 14px; }
.xinsp .btn { width: 100%; justify-content: center; }

/* ---------- leaderboard tracks ---------- */
.lbmain { display: grid; gap: 14px; min-width: 0; align-content: start; }
.lbmain .pnl + .pnl, .tk > .pnl { margin: 0; }
.track .pnl-h { border-left: 3px solid var(--c); }
.tr-share { font: 700 12.5px/1 var(--sans); letter-spacing: .01em; color: var(--ink-2); }
.tr-text { margin: 0; padding: 10px 14px; font-size: 14px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.tr-list { list-style: none; margin: 0; padding: 0; }
.tr-list li + li { border-top: 1px solid var(--line); }
.tr-row { display: grid; grid-template-columns: 34px 40px minmax(0, 1fr) auto; grid-template-areas: "r img n mc" "r img n sh"; align-items: center; column-gap: 10px; padding: 9px 14px; min-height: 60px; color: var(--ink); text-decoration: none; }
.tr-row:hover { background: rgba(159, 226, 191, .07); }
.tr-row { transition: background-color .2s; }
.tr-row:focus-visible { outline-offset: -3px; }
.tr-rank { grid-area: r; font: 400 15px/1 var(--mono); color: var(--c); }
.tr-row .xr-img { grid-area: img; } .tr-row .xr-n { grid-area: n; }
.tr-mc { grid-area: mc; font: 400 14px/1.2 var(--mono); text-align: right; white-space: nowrap; }
.tr-sh { grid-area: sh; font: 400 11.5px/1.3 var(--mono); color: var(--ink-3); text-align: right; white-space: nowrap; }
@media (min-width: 640px) { .tr-row { grid-template-columns: 44px 40px minmax(0, 1fr) 110px 150px; grid-template-areas: "r img n mc sh"; column-gap: 14px; } }
.rules p { margin: 0 0 10px; font-size: 14.5px; }
.rules .btn { margin-top: 4px; }
.insp .pnl + .pnl { margin-top: 14px; }

/* ---------- coin page ---------- */
.tk { grid-template-columns: minmax(0, 1fr); }
.tk > * { min-width: 0; }
.tk-id { display: flex; align-items: center; gap: 14px; }
.tk-img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.tk-head .tk-id { margin-top: 12px; }
.tk-id h1 { margin: 0 0 6px; overflow-wrap: anywhere; }
.tk-meta { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; font: 400 12.5px/1.5 var(--mono); color: var(--scope-ink-2); }
.tk-meta span { display: inline-flex; align-items: center; gap: 5px; }
.tk-meta { gap: 2px 14px; }
.tk-meta span { white-space: nowrap; }
.tk-meta span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--scope-ink-3); margin-right: 2px; }
.tk-meta .ok { color: var(--ok); } .tk-meta .ic { width: 13px; height: 13px; }
.tk-head .tk-img { box-shadow: 0 0 0 2px var(--scope), 0 0 0 3px var(--core-hi); }
.tk-head p.row .mute { color: var(--scope-ink-3); }
.tk-desc { margin: 14px 0 0; font-size: 15.5px; max-width: 70ch; overflow-wrap: anywhere; }
.gauge { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; height: 26px; }
.gauge i { background: var(--well); border: 1px solid var(--line-2); border-radius: 10px; transform-origin: bottom; }
.gauge i.on { background: var(--blue); border-color: var(--blue); }
.gz-pc { font: 400 15px/1 var(--mono); color: var(--ink); letter-spacing: 0; }
.tk-actions { display: grid; gap: 8px; }
.tk-actions .btn { width: 100%; justify-content: center; min-height: 44px; }
.tk-addr { display: grid; gap: 12px; }
.tk-addr .addr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; }
.tk-addr .addr .ro-k { flex: 0 0 100%; }
.tk-addr .addr code { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; font: 400 12.5px/1.4 var(--mono); }
.tk-report details { margin: 0; border: 0; background: none; padding: 0; }
.tk-report summary.pnl-h { text-transform: none; letter-spacing: .02em; font-size: 13.5px; cursor: pointer; border-bottom: 0; min-height: 44px; }
.tk-report details[open] summary.pnl-h { border-bottom: 1px solid var(--line); }
.tk-report .btn { min-height: 40px; }
.tk-report select, .tk-report textarea { width: 100%; }
@media (min-width: 1100px) {
  .tk { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: repeat(var(--m, 1), min-content) 1fr; }
  .tk > * { grid-column: 1; }
  .tk > .tk-insp { grid-column: 2; grid-row: 1 / span var(--n); }
  .tk-insp .pnl + .pnl { margin-top: 14px; }
}
@media (max-width: 400px) { .tk-img { width: 56px; height: 56px; } }

@media (prefers-reduced-motion: reduce) { .gauge i { transition: none; } }

/* empty lanes: one compact row, no drawing */
.lbmain .empty { border: 0; padding: 6px 0; text-align: left; background: none; box-shadow: none; backdrop-filter: none; }
.lbmain .empty .empty-art { display: none; }
.lbmain .empty p { margin: 0; max-width: none; }

/* ---------- brightest houses: one row per lit house, a warm bar for its share ---------- */
.tb-list { list-style: none; margin: 0; padding: 0; }
.tb-list > li { position: relative; border-top: 1px solid var(--line); }
.tb-list > li:first-child { border-top: 0; }
.tb-row { display: grid; grid-template-columns: 2em 40px minmax(0, 1fr) auto; grid-template-areas: "r i n s"; gap: 2px 12px; align-items: center; padding: 12px 14px 14px; min-height: 64px; color: inherit; text-decoration: none; transition: background-color .2s; }
a.tb-row:hover { background: rgba(233, 196, 106, .05); color: inherit; }
.tb-row .tb-rank { grid-area: r; font: 500 .85rem/1 var(--mono); color: var(--ink-3); }
.tb-row .tb-img { grid-area: i; }
.tb-row .tb-img img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(233, 196, 106, var(--l, .4)), 0 0 16px -4px rgba(233, 196, 106, var(--l, .4)); }
.tb-row .xr-n { grid-area: n; }
.tb-blocks { grid-area: s; text-align: right; display: grid; }
.tb-blocks b { font: 600 1.05rem/1.1 var(--display); color: var(--snow); }
.tb-blocks small { font-size: .72rem; color: var(--ink-3); }
.tb-mc { display: none; font: 400 .85rem/1 var(--mono); color: var(--ink-2); text-align: right; }
.tb-bar { position: absolute; left: 14px; bottom: 6px; height: 2px; width: calc((100% - 28px) * var(--w, 0)); border-radius: 1px; background: linear-gradient(90deg, var(--candle-deep), var(--candle)); box-shadow: 0 0 8px rgba(233, 196, 106, .6); pointer-events: none; }
.tb-h { display: none !important; }
@media (min-width: 760px) {
  .tb-row { grid-template-columns: 2em 40px minmax(0, 1.4fr) 7em 7em; grid-template-areas: "r i n s m"; }
  .tb-mc { display: block; grid-area: m; }
  .tb-h { display: grid !important; min-height: 0; padding-block: 8px; font: 700 12px/1 var(--sans); letter-spacing: .01em;  color: var(--ink-3); }
  .tb-h .tb-blocks, .tb-h .tb-mc { text-align: right; }
}

/* the lane from above: one square per plot */
.lanestrip { display: block; width: 100%; height: auto; }
.ls-off { fill: var(--well); stroke: rgba(251, 243, 234, .18); stroke-width: .03; }
.ls-lit { fill: var(--candle); }
.ls-shut { fill: #6b5a6e; }
.ls-next { fill: rgba(233, 196, 106, .12); stroke: var(--candle); stroke-width: .07; }

/* the coin page: its house */
.tt-grid { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 16px; align-items: center; }
.tt-map { border-radius: 10px; background: linear-gradient(180deg, var(--well), var(--berry-2)); border: 1px solid var(--line); padding: 8px 6px 4px; }
.tt-facts { display: grid; gap: 10px; margin: 0; }
.tt-facts div { min-width: 0; }
.tt-facts dt { font: 700 12px/1.3 var(--sans); letter-spacing: .1em;  color: var(--ink-3); }
.tt-facts dd { margin: 2px 0 0; font-weight: 650; color: var(--ink); }
.tt-facts dd.in { color: var(--gold-hi); }
@media (max-width: 379px) { .tt-grid { grid-template-columns: minmax(0, 1fr); } .tt-map { max-width: 180px; } }

/* Treasury and Launch consoles (docs/DESIGN-CONSOLE.md). Panels, readouts and event logs from shell.css; this file only adds the
   treasury dashboard grid, the burn log, and the launch pre-flight layout (step rail, review checklist, launch sequence, pad). */

/* ---------- treasury ---------- */
.tr-addr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 10px 0 14px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card); font-size: 13.5px; color: var(--ink-2); min-height: 44px; }
.tr-addr .ro-k { margin-right: 4px; }
.ro-row + .tr-addr { margin-top: 10px; }
.tr-grid { display: grid; gap: 14px; margin: 14px 0; align-items: start; }
.tr-grid > .pnl + .pnl, .tr-grid > .pnl { margin-top: 0; }
@media (min-width: 1000px) { .tr-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.tr-h { font-size: 19px; margin: 0 0 10px; }
.tr-grid .chartbox { min-width: 0; }
.tr-grid .small { margin: 8px 0 0; }
.tr-plan { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.tr-plan li { display: grid; grid-template-columns: minmax(78px, auto) minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 9px 0 9px 12px; border-bottom: 1px solid var(--line); position: relative; }
.tr-plan li::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--c); border-radius: 10px; }
.tr-plan .ln { font: 700 12.5px/1.4 var(--sans); letter-spacing: .1em;  color: var(--ink-3); }
.tr-plan .cn { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-plan .am { font: 400 13px/1.4 var(--mono); white-space: nowrap; }
.tr-log > li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "bd v" "t tx"; padding: 11px 14px 11px 17px; position: relative; }
.tr-log > li::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--c); border-radius: 10px; }
.tr-log .bd { grid-area: bd; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tr-log .bd .ln { font: 700 12.5px/1.4 var(--sans); letter-spacing: .1em;  color: var(--ink-3); }
.tr-log .t { grid-area: t; }
.tr-log .v { grid-area: v; }
.tr-log .tx { grid-area: tx; text-align: right; font: 400 12.5px/1.4 var(--mono); min-width: 0; }
.tr-log .tx a { display: inline-flex; align-items: center; min-height: 32px; }
.tr-note { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); }
@media (min-width: 700px) {
  .tr-log > li { grid-template-columns: 96px minmax(0, 1fr) auto 150px; grid-template-areas: "t bd v tx"; align-items: center; }
}

/* ---------- launch: pre-flight ---------- */
.lc { display: grid; gap: 14px; align-items: start; grid-template-columns: minmax(0, 1fr); grid-template-areas: "rail" "insp" "stage"; }
.lc-rail { grid-area: rail; }
.lc-stage { grid-area: stage; min-width: 0; }
.lc-insp { grid-area: insp; min-width: 0; }
.lc-rail { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card); overflow: hidden; }
.lc-rail li { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 6px 8px; color: var(--ink-3); font: 600 13.5px/1.1 var(--sans); position: relative; }
.lc-rail li + li { border-left: 1px solid var(--line); }
.lc-rail i { font: 700 12.5px/1 var(--sans); font-style: normal; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; flex: none; }
.lc-rail li.on { color: var(--ink); background: var(--blue-soft); box-shadow: inset 0 -3px 0 var(--blue); }
.lc-rail li.on i { background: var(--blue); border-color: var(--blue); color: var(--on-blue); box-shadow: 0 0 14px -2px rgba(159, 226, 191, .6); }
.lc-rail li.done { color: var(--ink-2); }
.lc-rail li.done i { background: var(--ok); border-color: var(--ok); color: #1d3a2c; }
@media (min-width: 1000px) {
  .lc { grid-template-columns: 168px minmax(0, 1fr) 340px; grid-template-areas: "rail stage insp"; }
  .lc-rail { grid-template-columns: 1fr; position: sticky; top: calc(var(--bar-h) + 16px); }
  .lc-rail li { justify-content: flex-start; padding: 12px 14px; min-height: 52px; }
  .lc-rail li + li { border-left: 0; border-top: 1px solid var(--line); }
  .lc-rail li.on { box-shadow: inset 3px 0 0 var(--blue); }
  .lc-insp { position: sticky; top: calc(var(--bar-h) + 16px); }
}
.lc .pnl + .pnl { margin-top: 12px; }
.lform .pnl-b > label:first-child { margin-top: 0; }
.lform input, .lform textarea { border-radius: var(--r) !important; }
.lform .btn[type=submit] { min-height: 48px; }
.lform summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }

/* on the pad: the coin as a moon about to enter orbit around $ORBIT, lit by the same sun (upper left) */
.pad { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 14px; border-radius: 0 0 var(--r) var(--r);
  background: radial-gradient(120% 90% at 0% 0%, rgba(233, 196, 106, .09), transparent 55%), var(--well); }
.pad .ring { position: relative; width: 112px; height: 112px; }
.pad .ring::before, .pad .ring::after { content: ""; position: absolute; border-radius: 50%; border: 1px dashed var(--line-2); }
.pad .ring::before { inset: 0; }
.pad .ring::after { inset: 30px; border-style: solid; border-color: var(--line); }
.pad .core { position: absolute; inset: 40px; border-radius: 50%; display: block;
  background: radial-gradient(circle at 34% 30%, #fbf3ea 0, #ff6f61 30%, #a8463b 62%, #2a0f2e 100%);
  box-shadow: 0 0 0 5px rgba(159, 226, 191, .09), 0 0 22px -2px rgba(159, 226, 191, .45); }
.pad .orbit { position: absolute; inset: 0; animation: padspin 40s linear infinite; }
.pad .sat { position: absolute; left: 50%; top: -2px; width: 36px; height: 36px; margin-left: -18px; border-radius: 50%; animation: padspin 40s linear infinite reverse; box-shadow: 0 0 0 2px var(--blue), 0 0 14px 2px rgba(159, 226, 191, .35); }
.pad .sat img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; box-shadow: none; background: var(--track); }
.pad .sat::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .28) 0, transparent 38%, rgba(20, 4, 22, .62) 100%); }
@keyframes padspin { to { transform: rotate(360deg); } }
.pad-t { min-width: 0; }
.pad .nm { font: 700 19px/1.2 var(--display); font-stretch: 108%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.pad .tk { font: 400 13px/1.4 var(--mono); color: var(--blue-hi); letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; }
.pad dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 10px 0 0; font: 400 11.5px/1.4 var(--mono); }
.pad dt { color: var(--ink-3);  letter-spacing: .1em; }
.pad dd { margin: 0; color: var(--ink); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 999px) { .pad { grid-template-columns: 76px minmax(0, 1fr); padding: 10px 12px; } .pad .ring { width: 76px; height: 76px; } .pad .ring::after { inset: 20px; } .pad .core { inset: 27px; } .pad .sat { width: 28px; height: 28px; margin-left: -14px; } .pad .sat img { width: 28px; height: 28px; } .pad dl { margin-top: 6px; } }
.lc-insp .pnl-h { border-bottom-color: var(--line); }
.perks > summary { cursor: pointer; list-style: none; }
.perks > summary::-webkit-details-marker { display: none; }
.perks > summary::after { content: "+"; margin-left: auto; font-size: 16px; }
.perks[open] > summary::after { content: "\2212"; }
@media (min-width: 1000px) { .perks > summary { cursor: default; } .perks > summary::after { content: none !important; } }
.perks .facts.mini { margin: 0; padding-top: 4px; padding-bottom: 4px; }

/* review: a pre-flight checklist */
.pf-list { list-style: none; margin: 14px 0; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r); }
.pf { display: grid; grid-template-columns: 10px 92px minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 14.5px; }
.pf:first-child { border-top: 0; }
.pf .lt, .lc-check .lt { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); align-self: center; box-shadow: 0 0 0 3px rgba(159, 226, 191, .16), 0 0 10px rgba(159, 226, 191, .45); }
.pf .k { color: var(--ink-3); font-size: 13px; }
.pf .v { min-width: 0; overflow-wrap: anywhere; }
.pf .err { color: var(--bad); font-weight: 700; }
@media (max-width: 519px) { .pf { grid-template-columns: 10px minmax(0, 1fr); } .pf .v { grid-column: 2; } }
.pf-h { margin: 18px 0 2px; }
.review details { margin-top: 12px; }
.review summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }

/* sign: the launch sequence */
.progress.seq { gap: 0; margin: 14px 0; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.progress.seq li { gap: 12px; padding: 14px; border-top: 1px solid var(--line); }
.progress.seq li:first-child { border-top: 0; }
.progress.seq li i { font: 400 11.5px/1 var(--mono); font-style: normal; letter-spacing: .01em; color: var(--ink-3); width: 26px; flex: none; }
.progress.seq li.on { background: var(--blue-soft); }
.progress.seq li.fail { background: rgba(255, 111, 97, .12); }

/* closed: standby */
.lc-check { list-style: none; margin: 0; padding: 0; }
.lc-check li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px; border-top: 1px solid var(--line); color: var(--ink-2); }
.lc-check li:first-child { border-top: 0; }
.lc-check li.ok { color: var(--ink); }
.lc-check .lt { background: var(--trace); box-shadow: 0 0 0 3px rgba(233, 196, 106, .16); }
.lc-check li.ok .lt { background: var(--ok); box-shadow: 0 0 0 3px rgba(159, 226, 191, .16), 0 0 10px rgba(159, 226, 191, .45); }
.lc-check .st { font: 700 12.5px/1 var(--sans); letter-spacing: .01em;  color: var(--ink-3); }
.lc-check li.ok .st { color: var(--ok); }
.lc-news { display: grid; gap: 12px; justify-items: start; }
.lc-news .mark svg { width: 56px; height: 56px; display: block; }
.lc-news p { margin: 0; }

@media (prefers-reduced-motion: reduce) { .pad .orbit, .pad .sat { animation: none !important; } }
.perks:not([open]) > summary { border-bottom: 0; }
.perks { overflow: hidden; }

/* what every launch gets: icon + text rows, no browser bullets */
.perks ul { list-style: none; margin: 0; padding: 0 14px 12px; }
.perks li { display: flex; align-items: center; gap: 9px; padding: 5px 0; }
.perks li .ic { width: 17px; height: 17px; flex: none; color: var(--blue); }

/* ---------- deep-space overrides: charts, tooltips, micro-interactions ---------- */
.chartbox { position: relative; }
.chartbox .chart .plot { fill: var(--well); stroke: var(--line); }
.chartbox .chart .grid-l { stroke: var(--line-2); stroke-dasharray: 2 5; }
.chartbox .chart .axis { fill: var(--ink-3); }
.chartbox .chart .line { stroke: var(--flare); stroke-width: 2; }
.chartbox .chart .dot { fill: var(--sun); stroke: var(--flare); stroke-width: 2; }
.chartbox .chart .hair { stroke: var(--line-2); stroke-dasharray: 3 4; }
.chartbox .tip { background: var(--card-solid); color: var(--ink); border: 1px solid var(--line-2); box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .85); z-index: 2; }
.tr-plan li, .tr-log > li { transition: background-color .2s; }
.tr-plan li:hover, .tr-log > li:hover { background: rgba(159, 226, 191, .06); }
.tr-addr .btn, .tr-addr button { border-color: var(--line-2); }
.lc-rail li { transition: color .25s, background-color .25s, box-shadow .25s; }
.lc-rail i { transition: background-color .25s, border-color .25s, box-shadow .25s, transform .3s var(--ease); }
.lc-rail li.on i { transform: scale(1.1); }
.lform .drop { transition: border-color .2s, background-color .2s; }
.lform .drop:hover { border-color: var(--blue); background: var(--blue-soft); }
.pf { transition: background-color .2s; }
.pf:hover { background: rgba(159, 226, 191, .05); }
.progress.seq li.on i { color: var(--blue-hi); }
.pf-list, .progress.seq { background: var(--well); }
.perks li .ic { color: var(--blue-hi); }
.lc-news .mark { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, var(--berry-3) 0, var(--well) 70%); box-shadow: 0 0 0 1px var(--line-2), 0 0 24px -6px rgba(159, 226, 191, .5); }
.lc-news .mark svg { width: 44px; height: 44px; }
@media (max-width: 380px) { .tr-plan li { grid-template-columns: minmax(0, 1fr) auto; } .tr-plan .ln { grid-column: 1 / -1; } }

/* the split's three lanes, each with its colour bar */
.tr-lanes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.tr-lanes li { display: grid; gap: 3px; padding: 10px 12px; background: var(--deck); box-shadow: inset 3px 0 0 var(--c); }
.tr-lanes b { font: 600 11.5px/1.3 var(--mono);  letter-spacing: .01em; color: var(--c); }
.tr-lanes span { color: var(--ink-2); font-size: 14px; line-height: 1.45; }

/* ---------- Giftmas: your gift, previewed as you type (the box at a middling size, the coin's picture on its tag) ---------- */
.pad { background: radial-gradient(90% 80% at 20% 30%, rgba(255, 111, 97, .1), transparent 60%), var(--well); border-radius: 14px; margin: 4px 12px 12px; }
.lot { position: relative; width: 112px; }
.lot .orn-art { width: 112px; }
.lot-home { position: absolute; right: -4px; bottom: 6px; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2.5px var(--pearl), 0 6px 12px -4px rgba(12, 0, 14, .7); background: var(--berry); }
.lot-home img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
@media (max-width: 999px) { .lot, .lot .orn-art { width: 76px; } .lot-home { width: 26px; height: 26px; } }
.pad .nm { font: 400 19px/1.2 var(--display); }
.pad .tk { color: var(--coral-hi); letter-spacing: .01em; }
.pad dt { font-family: var(--sans); font-weight: 700; letter-spacing: 0; }
.lc-rail { background: var(--berry); border: 0; box-shadow: var(--shadow); }
.lc-rail li + li { border-color: var(--rule); }
.lc-rail i { font: 700 12px/1 var(--sans); }
.lc-check li, .pf, .progress.seq li { border-top-style: dashed; border-top-color: var(--rule-2); }
.pf-list, .progress.seq { border: 0; border-radius: 14px; }
.lc-news .mark { background: radial-gradient(circle at 34% 30%, var(--berry-3) 0, var(--well) 70%); box-shadow: 0 0 0 1px var(--rule-2), 0 10px 24px -10px rgba(12, 0, 14, .7); }
.tr-lanes { gap: 8px; background: none; border: 0; }
.tr-lanes li { border-radius: 12px; background: var(--well); box-shadow: inset 5px 0 0 var(--c); padding: 11px 14px 11px 18px; }
.tr-lanes b { font: 800 13px/1.3 var(--sans); }
.tr-addr { border: 1.5px dashed var(--rule-2); border-radius: 14px; background: rgba(251, 243, 234, .03); }
.tr-plan, .tr-plan li { border-color: var(--rule); }

/* Docs pages (client/pages/docs.ts): How it works (tabbed manual), FAQ (master-detail / accordion), Rules (manual with a sticky index).
   Served after style.css, story.css and shell.css; uses the console primitives (.phead, .pnl, .tabbar, .acq). */

/* ---------- shared ---------- */
.doc-h h2 { text-transform: none; margin: 0; font: 650 17px/1.2 var(--display); font-stretch: 108%; letter-spacing: 0; color: var(--ink); }
.doc.pnl + .doc.pnl { margin-top: 0; }
.spec { margin: 0; display: grid; }
.spec-r { display: grid; gap: 4px 24px; padding: 12px 0; border-top: 1px solid var(--line); }
.spec-r:first-child { border-top: 0; padding-top: 0; }
.spec-r:last-child { padding-bottom: 0; }
.spec dt { font: 700 12.5px/1.4 var(--sans); letter-spacing: .01em;  color: var(--ink-3); }
.spec dd { margin: 0; display: grid; gap: 4px; }
.spec dd b { font: 400 15px/1.35 var(--mono); color: var(--ink); letter-spacing: -.02em; }
.spec dd span { color: var(--ink-2); font-size: 14.5px; max-width: 70ch; }
@media (min-width: 760px) { .spec-r { grid-template-columns: 200px minmax(0, 1fr); } .spec dt { padding-top: 4px; } }

/* ---------- how it works ---------- */
.how-page > .tabbar { margin-bottom: 14px; }
.how-panel { min-width: 0; }
.how-panel:focus { outline: none; }
.how-2, .how-1 { display: grid; gap: 14px; align-items: start; }
@media (min-width: 1000px) { .how-2 { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.fw-wrap { max-width: 460px; margin: 0 auto; }
.fw { display: block; width: 100%; height: auto; overflow: visible; }
.fw-orbit { fill: none; stroke: var(--line-2); stroke-width: 1.4; stroke-dasharray: 3 6; }
.fw-lane { fill: none; stroke-width: 1.4; opacity: .55; }
.fw-arrow { stroke: var(--blue); }
.fw-node circle { fill: var(--panel); stroke: var(--blue); stroke-width: 1.6; }
.fw-node { color: var(--blue-deep); }
.fw-node .ic { stroke: var(--blue-deep); color: var(--blue-deep); }
.fw-node text { font: 600 13px var(--sans); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; }
.fw-node text.sub { font: 400 11px var(--mono); fill: var(--ink-2); }
.fw-core path { stroke: none; }
@media (prefers-reduced-motion: no-preference) {
  .fw-spin { transform-origin: 200px 200px; animation: fw-turn 60s linear infinite; }
  .fw-spin-1 { animation-duration: 90s; animation-direction: reverse; }
  .fw-spin-2 { animation-duration: 120s; }
  @keyframes fw-turn { to { transform: rotate(360deg); } }
}
.proc { counter-reset: p; list-style: none; margin: 0; padding: 0; }
.proc li { counter-increment: p; position: relative; padding: 14px 0 14px 46px; border-top: 1px solid var(--line); }
.proc li:first-child { border-top: 0; padding-top: 0; }
.proc li:last-child { padding-bottom: 0; }
.proc li::before { content: counter(p, decimal-leading-zero); position: absolute; left: 0; top: 14px; width: 34px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: var(--well); font: 400 12px/1 var(--mono); color: var(--blue-deep); }
.proc li:first-child::before { top: 0; }
.proc h3 { margin: 0 0 4px; font: 650 17px/1.25 var(--display); font-stretch: 106%; }
.proc p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

/* ---------- FAQ: accordion on phones, master-detail on desktop ---------- */
.faq-md { display: none; }
.faq-acc details { background: var(--card); border: 1px solid var(--line-2); margin: 0 0 8px; padding: 0 14px; }
.faq-acc summary { font: 600 15.5px/1.35 var(--sans); min-height: 48px; padding: 10px 0; }
.faq-acc details p { margin: 0 0 14px; color: var(--ink-2); }
@media (min-width: 1000px) {
  .faq-acc { display: none; }
  .faq-md { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 14px; align-items: start; }
  .faq-md > .pnl + .pnl { margin-top: 0; }
  .faq-list { position: sticky; top: calc(var(--bar-h) + 16px); }
  .faq-list .tabbar { flex-direction: column; border: 0; background: none; padding: 6px; gap: 2px; border-radius: 0; }
  .faq-list [role="tab"] { flex: none; text-align: left; white-space: normal; min-height: 44px; padding: 9px 12px; font: 500 14px/1.3 var(--sans); border-radius: 10px; white-space: pre-wrap; }
  .faq-list [role="tab"][aria-selected="true"] { box-shadow: inset 3px 0 0 var(--core-hi); }
  .faq-a { padding: 22px 24px 22px; }
  .faq-a:focus { outline: none; }
  .faq-n { margin: 0 0 10px; font: 700 12.5px/1 var(--sans); letter-spacing: .01em;  color: var(--ink-3); }
  .faq-a h2 { margin: 0 0 12px; font-size: clamp(22px, 2.4vw, 28px); }
  .faq-t { margin: 0; font-size: 16.5px; line-height: 1.65; color: var(--ink-2); max-width: 62ch; }
}

/* ---------- rules: a manual ---------- */
.rl-grid { display: grid; gap: 14px; align-items: start; }
.rl-body { display: grid; gap: 14px; min-width: 0; }
.rl-body > .pnl { scroll-margin-top: calc(var(--bar-h) + 14px); }
.rl-index { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 12px 12px; }
.rl-k { margin: 0 0 6px; font: 700 12.5px/1.2 var(--sans); letter-spacing: .01em;  color: var(--ink-3); }
.rl-index ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rl-index a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--well); color: var(--ink); text-decoration: none; font: 600 13.5px/1 var(--sans); }
.rl-index a i { font: 700 12.5px/1 var(--sans); font-style: normal; color: var(--blue-deep); }
.rl-index a:hover { border-color: var(--blue); color: var(--blue-deep); }
@media (min-width: 1000px) {
  .rl-grid { grid-template-columns: 220px minmax(0, 1fr); }
  .rl-index { position: sticky; top: calc(var(--bar-h) + 16px); padding: 12px 8px; }
  .rl-k { padding: 0 8px; }
  .rl-index ol { flex-direction: column; gap: 2px; }
  .rl-index a { border: 0; background: none; min-height: 40px; border-radius: 10px; padding: 0 8px; }
  .rl-index a:hover { background: var(--well); }
}
.rl-list { list-style: none; margin: 0; padding: 0; }
.rl-list li { position: relative; margin: 0; padding: 9px 0 9px 24px; border-top: 1px solid var(--line); color: var(--ink-2); }
.rl-list li:first-child { border-top: 0; padding-top: 2px; }
.rl-list li::before { content: ""; position: absolute; left: 3px; top: 1.05em; width: 8px; height: 8px; border: 1.5px solid var(--blue); border-radius: 50%; }
.rl-list li:first-child::before { top: .6em; }
.rl-body .doc .pnl-b > p { margin: 10px 0 0; max-width: 72ch; }
.rl-body .doc .pnl-b > p:first-child { margin-top: 0; }
.rl-body .doc .rl-list { margin: 10px 0 0; }
.rl-body .doc .pnl-b > .rl-list:first-child { margin-top: 0; }
.rl-body .doc .pnl-b > p.mute + .rl-list { margin-top: 8px; }

/* loop labels get a halo in the panel colour so ring strokes never cut through them */
.fw-node text { paint-order: stroke; stroke: var(--card); stroke-width: 5px; stroke-linejoin: round; }

.faq-next { margin-top: 16px; background: none; border: 0; padding: 8px 0; cursor: pointer; font: 700 14px/1 var(--sans); color: var(--blue); min-height: 40px; }

/* ---------- deep-space: lit spheres, tabs, accordions ---------- */
.fw-orbit { stroke: var(--line-2); }
.fw-node .fw-disc { fill: url(#fw-st); stroke: var(--blue); stroke-width: 1.4; }
.fw-node .fw-lit { stroke: var(--sun); stroke-width: 1.6; stroke-linecap: round; opacity: .55; }
.fw-node circle { fill: none; }
.fw-node circle.fw-disc { fill: url(#fw-st); }
.fw-node text { fill: var(--ink); stroke: var(--card-solid); }
.fw-node text.sub { fill: var(--ink-2); }
.fw-node .ic { stroke: var(--blue-hi); color: var(--blue-hi); }
.fw-st { transition: transform .35s var(--ease); transform-box: fill-box; transform-origin: center; }
.fw-node:hover .fw-st { transform: scale(1.12); }
.fw-node:hover .fw-disc { stroke: var(--blue-hi); }
.fw-lane { opacity: .7; }
.proc li::before { color: var(--blue-hi); background: var(--well); border-radius: 10px; transition: border-color .2s, color .2s; }
.proc li:hover::before { border-color: var(--blue); }
.tabbar [role="tab"] { transition: color .2s, background-color .2s, box-shadow .2s, transform .15s var(--ease); }
.tabbar [role="tab"]:active { transform: scale(.97); }
.how-page .tabbar, .faq-list .tabbar { background: var(--well); }
.faq-acc details { border-radius: var(--r); transition: border-color .2s, background-color .2s; }
.faq-acc details[open] { border-color: var(--blue); background: rgba(159, 226, 191, .05); }
.faq-acc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.faq-acc summary::-webkit-details-marker { display: none; }
.faq-acc summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(45deg) translateY(-2px); transition: transform .25s var(--ease), border-color .2s; }
.faq-acc details[open] summary::after { transform: rotate(-135deg) translateY(-2px); border-color: var(--blue-hi); }
.faq-acc details[open] > p { animation: fade .3s var(--ease) both; }
.faq-list [role="tab"] { border-radius: 10px; }
.faq-list [role="tab"][aria-selected="true"] { box-shadow: inset 3px 0 0 var(--blue); }
.rl-index a { border-radius: 10px; transition: border-color .2s, color .2s, background-color .2s; }
.rl-index a i { color: var(--blue-hi); }
.rl-index a:hover { color: var(--ink); background: var(--blue-soft); }
.rl-list li::before { border-color: var(--blue-hi); background: radial-gradient(circle at 35% 30%, #fff, var(--blue) 60%, transparent 62%); }
.spec dd b { color: var(--ink); }
.faq-next { color: var(--blue-hi); }

/* ---------- Giftmas: the loop as a ribbon tied round the mark, the rules as numbered tags ---------- */
.fw-road { fill: none; stroke: var(--coral); stroke-width: 16; stroke-linejoin: round; opacity: .9; }
.fw-lane { fill: none; stroke: var(--pearl); stroke-width: 1.6; stroke-dasharray: 2 8; stroke-linecap: round; opacity: .8; }
.fw-glow { fill: rgba(233, 196, 106, .1); }
.fw-arrow { stroke: var(--pearl); }
.fw-node .fw-disc, .fw-node circle.fw-disc { fill: var(--kraft); stroke: var(--kraft-dk); stroke-width: 1.4; }
.fw-node .ic { stroke: var(--on-kraft); color: var(--on-kraft); }
.fw-node text { font: 800 14px var(--sans); fill: var(--ink); stroke: var(--berry); }
.fw-node text.sub { font: 600 11.5px var(--sans); fill: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) { .fw-lane { animation: fw-flow 3s linear infinite; } @keyframes fw-flow { to { stroke-dashoffset: -40; } } }
.proc li { border-top: 1px dashed var(--rule-2); }
.proc li::before { font: 400 14px/1 var(--display); color: var(--on-kraft) !important; background: var(--kraft) !important; border: 0; border-radius: 6px; clip-path: polygon(6px 0, 100% 0, 100% 100%, 6px 100%, 0 50%); }
.proc h3 { font: 400 18px/1.25 var(--display); }
.doc-h h2 { font: 400 19px/1.2 var(--display); }
.spec-r { border-top: 1px dashed var(--rule-2); }
.spec dt { font: 800 13px/1.4 var(--sans); color: var(--kraft-lt); }
.rl-list li { border-top: 1px dashed var(--rule-2); }
.rl-list li::before { border: 0; border-radius: 2px; width: 9px; height: 9px; background: var(--coral) !important; transform: rotate(45deg); }
.rl-index { box-shadow: var(--shadow); }
.rl-index a { font: 800 14px/1 var(--sans); }
.faq-acc details { background: var(--berry) var(--paper); border: 1px solid var(--rule); box-shadow: var(--shadow); border-radius: 16px; }
.faq-acc details[open] { border-color: rgba(255, 111, 97, .5); background: var(--berry) var(--paper); }
.faq-acc summary { font: 800 16px/1.35 var(--sans); }
.faq-acc summary::after { background: none; border-radius: 0; }
.faq-list [role="tab"] { font: 700 14.5px/1.3 var(--sans); }
.faq-list [role="tab"][aria-selected="true"] { background: var(--pearl); color: var(--plum); box-shadow: none; }
.faq-n { font: 800 12.5px/1 var(--sans); color: var(--kraft-lt); }
.faq-next { color: var(--mint); }
