/* world.lol · world.css
   One stylesheet, no build step. Order: fonts, tokens, base, chrome, pieces, pages, phone, motion.
   Two kinds of surface carry meaning:
     tinted blocks (--shelf)        = information
     ink-outlined paper ("slips")   = your money: a quote, a bill, a receipt
   Red does two jobs only: the ball (the brand) and the one primary action on a page. */

/* ---------- fonts (both OFL, served from this folder) ---------- */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-opsz-wght.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-wght.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --paper: #FFFFFF;        /* the page, and every slip */
  --shelf: #F5F3EE;        /* tinted blocks */
  --shelf-2: #E9E6DD;      /* tracks, wells */
  --line: #DDD9D0;         /* decorative rules */
  --edge: #8C8996;         /* control outlines, 3.4:1 on paper */
  --slip: #1B1A1F;         /* the outline of anything about money */
  --ink: #1B1A1F;          /* text, 17.3:1 */
  --muted: #5C5A66;        /* secondary text, 6.8:1 */
  --subtle: #6E6B78;       /* the smallest labels, 5.2:1 on paper, 4.7:1 on a shelf */
  --ball: #F4321A;         /* the brand ball. A graphic, never small text. */
  --action: #DB2A12;       /* the primary button, white text 4.8:1 */
  --action-press: #B01F0A;
  --up: #0E7A3F;  --up-wash: #E2F3E9;
  --down: #B3174B; --down-wash: #FBE6ED;   /* a berry, so a falling price never reads as the brand */
  --warn: #8A5A00; --warn-wash: #FFF1CC; --warn-edge: #D9A93A;
  --yellow: #FFC83D;       /* sample and pending markers, ink text 11.2:1 */
  --cream: #FFF4DF;        /* second stripe colour */
  --flip: #1B1A1F; --flip-ink: #FFFFFF; --flip-soft: #C9C6D1;   /* the one inverted block per page */
  --rail: #F4321A;         /* the bar. Text on it always sits on a chip. */
  --chip: #FFFFFF;
  --scrim: rgba(27, 26, 31, .28);
  --surface: var(--paper);
  --font-display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --rail-h: 60px;
  --pad: clamp(16px, 2.4vw, 40px);
  --gap: clamp(14px, 1.8vw, 26px);
  --r-card: 16px;
  --r-tile: 14px;
  --zig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='M-1 0 8 8.5 17 0' fill='%23FFFFFF' stroke='%231B1A1F' stroke-width='1.5'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #131118; --shelf: #1C1A22; --shelf-2: #2A2733; --line: #2E2B38; --edge: #6F6B7C; --slip: #8E8A9A;
    --ink: #F3F0EA; --muted: #A9A5B4; --subtle: #8E8A9A;
    --ball: #FF4B33; --action: #DB2A12; --action-press: #F0452C;
    --up: #3DDC84; --up-wash: #12301F; --down: #FF7AA2; --down-wash: #3A1524;
    --warn: #F5BE4A; --warn-wash: #2E2408; --warn-edge: #7A5A12;
    --cream: #262019; --rail: #D92A12; --chip: #131118; --scrim: rgba(0, 0, 0, .5); --flip: #2A2733; --flip-ink: #F3F0EA; --flip-soft: #B9B5C4;
    --zig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='M-1 0 8 8.5 17 0' fill='%23131118' stroke='%238E8A9A' stroke-width='1.5'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #131118; --shelf: #1C1A22; --shelf-2: #2A2733; --line: #2E2B38; --edge: #6F6B7C; --slip: #8E8A9A;
  --ink: #F3F0EA; --muted: #A9A5B4; --subtle: #8E8A9A;
  --ball: #FF4B33; --action: #DB2A12; --action-press: #F0452C;
  --up: #3DDC84; --up-wash: #12301F; --down: #FF7AA2; --down-wash: #3A1524;
  --warn: #F5BE4A; --warn-wash: #2E2408; --warn-edge: #7A5A12;
  --cream: #262019; --rail: #D92A12; --chip: #131118; --scrim: rgba(0, 0, 0, .5); --flip: #2A2733; --flip-ink: #F3F0EA; --flip-soft: #B9B5C4;
  --zig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='M-1 0 8 8.5 17 0' fill='%23131118' stroke='%238E8A9A' stroke-width='1.5'/%3E%3C/svg%3E");
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--rail-h) + 16px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 450 1rem/1.5 var(--font-text); font-variant-numeric: tabular-nums lining-nums; -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: -.022em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); font-weight: 800; line-height: 1.02; }
h2 { font-size: clamp(1.3rem, 1.12rem + .7vw, 1.7rem); font-weight: 760; line-height: 1.1; }
h3 { font-size: 1.12rem; font-weight: 740; line-height: 1.2; }
h4 { font-size: 1rem; font-weight: 720; }
p { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em; }
b, strong { font-weight: 700; }
small { font-size: .8125rem; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.sprite { position: absolute; }
.i { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.addr { font-family: var(--font-mono); font-size: .9em; }
main { display: block; padding: clamp(16px, 2vw, 26px) var(--pad) 72px; }

/* ---------- markers: sample, pending ---------- */
.sample, .pending { display: inline-flex; align-items: center; padding: .1em .6em; border-radius: 999px; background: var(--yellow); color: #1B1A1F; font: 700 .8125rem/1.5 var(--font-text); letter-spacing: 0; white-space: nowrap; vertical-align: .08em; }
.pending { background: transparent; box-shadow: inset 0 0 0 1.5px var(--warn-edge); color: var(--warn); }
.sampleline { margin: 0; padding: 7px var(--pad); background: var(--warn-wash); color: var(--ink); font-size: .84rem; line-height: 1.4; }

/* ---------- buttons, chips, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: 0 1.2em; border: 1.5px solid transparent; border-radius: 999px; background: none; font: 700 .95rem/1.1 var(--font-text); text-decoration: none; white-space: nowrap; }
.btn--primary { background: var(--action); color: #fff; }
.btn--primary:hover { background: var(--action-press); }
.btn--quiet { border-color: var(--edge); color: var(--ink); background: var(--surface); }
.btn--quiet:hover { border-color: var(--ink); }
.btn--sm { min-height: 36px; padding: 0 .9em; font-size: .875rem; }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.linkbtn { padding: 0; border: 0; background: none; text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .2em; font-weight: 600; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.iconbtn:hover { background: var(--shelf-2); color: var(--ink); }
.more { font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 60px; padding: 0 1em; border: 1.5px solid var(--edge); border-radius: 999px; background: var(--paper); font: 700 .95rem/1 var(--font-text); text-decoration: none; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip--input { gap: 2px; padding: 0 .8em; cursor: text; }
.chip--input input { width: 4.6em; border: 0; background: none; outline: 0; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.chip--input input::-webkit-outer-spin-button, .chip--input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.chip--input input::placeholder { color: var(--subtle); font-weight: 600; opacity: 1; }
.chip--input:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.chip--input.is-on input { color: var(--paper); }
.field { display: grid; align-content: start; gap: 4px; font-weight: 650; font-size: .9rem; }
.field > small { font-weight: 450; color: var(--muted); }
.field select, .field input[type="text"], .field textarea { min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--edge); border-radius: 12px; background: var(--paper); font-weight: 500; }
.field textarea { resize: vertical; line-height: 1.4; }
.field input[disabled], .field input[type="file"][disabled] { opacity: .6; }
.field select { padding-right: 34px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.upper { text-transform: uppercase; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: .92rem; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }
.notice { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--shelf); font-size: .94rem; }
.notice--amber { background: var(--warn-wash); box-shadow: inset 0 0 0 1.5px var(--warn-edge); }

/* ---------- the rail (header) ---------- */
.rail { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; height: var(--rail-h); padding: 0 var(--pad); background: var(--rail); color: var(--ink); }
.rail__logo { display: flex; align-items: center; flex: none; height: 44px; padding: 0 13px; border-radius: 10px; background: var(--chip); text-decoration: none; }
.wordmark { display: block; height: 22px; width: auto; }
.wordmark__ball { fill: var(--ball); }
.rail__search { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; max-width: 780px; height: 40px; margin-left: 6px; padding: 0 16px; border-radius: 999px; background: var(--chip); }
.rail__search .i { color: var(--muted); }
.rail__search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-weight: 500; }
.rail__search input::placeholder { color: var(--muted); opacity: 1; }
.rail__search:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.rail__sample { margin-left: auto; flex: none; padding: .3em .8em; border-radius: 999px; background: var(--yellow); color: #1B1A1F; font-weight: 750; font-size: .84rem; white-space: nowrap; }
.rail__btn { position: relative; display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px; background: var(--chip); color: var(--ink); text-decoration: none; }
.rail__btn--text { width: auto; padding: 0 16px; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.rail__count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 800 .75rem/20px var(--font-text); text-align: center; box-shadow: 0 0 0 2px var(--rail); }
.searchrow { display: none; }

.aisles { display: flex; justify-content: space-between; gap: 18px; padding: 0 var(--pad); border-bottom: 1px solid var(--line); }
.aisles__scroll, .aisles__pages { display: flex; gap: 2px; }
.aisles__scroll { min-width: 0; margin-left: -10px; overflow-x: auto; scrollbar-width: none; }
.aisles__scroll::-webkit-scrollbar { display: none; }
.aisles__pages { flex: none; margin-right: -10px; }
.aisles a { display: flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 10px; margin-bottom: -1px; border-bottom: 3px solid transparent; font-weight: 600; font-size: .94rem; text-decoration: none; white-space: nowrap; }
.aisles a:hover { border-bottom-color: var(--edge); }
.aisles a[aria-current] { border-bottom-color: var(--ink); font-weight: 750; }
@media (min-width: 720px) and (max-width: 1099px) {
  .aisles { gap: 8px; }
  .aisles a { padding: 0 7px; font-size: .9rem; }
  .aisles__scroll { padding-right: 20px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
}

.tabs { display: none; }

/* ---------- headings for a page, crumbs ---------- */
.pagehead { margin: 6px 0 20px; }
.pagehead__sub { max-width: 68ch; margin: 8px 0 0; color: var(--muted); font-size: 1.02rem; }
.pagehead--top { position: relative; min-height: 150px; margin: 0 0 var(--gap); padding: 46px clamp(18px, 3vw, 40px) 26px; border-radius: 18px; background: var(--cream); overflow: hidden; }
.pagehead--top::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 26px; background: repeating-linear-gradient(90deg, var(--ball) 0 26px, #FFF4DF 26px 52px); -webkit-mask: radial-gradient(circle at 13px 0, #000 12.5px, transparent 13px) 0 100% / 26px 13px repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 13px) no-repeat; mask: radial-gradient(circle at 13px 0, #000 12.5px, transparent 13px) 0 100% / 26px 13px repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 13px) no-repeat; }
.pagehead--top .pagehead__sub { max-width: 56ch; color: var(--ink); }
.pagehead--top h1, .pagehead--top .pagehead__sub { padding-right: min(170px, 26%); }
.pagehead__dot { position: absolute; right: clamp(8px, 3vw, 44px); bottom: -34px; width: clamp(96px, 13vw, 150px); height: auto; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.crumbs a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; margin: -12px 0; }
.crumbs [aria-current] { color: var(--ink); }

/* ---------- blocks and shelves ---------- */
.block { margin-top: clamp(30px, 3.6vw, 52px); }
.block--tight { margin-top: clamp(20px, 2.4vw, 30px); }
.block__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-bottom: 14px; }
.block__note { flex: 1 1 280px; max-width: 70ch; margin: 0; color: var(--muted); font-size: .95rem; }
.block__head .more { margin-left: auto; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); grid-template-rows: auto; grid-auto-rows: 0; column-gap: 12px; row-gap: 0; overflow: hidden; margin: -3px; padding: 3px; }
.shelf--wrap { grid-auto-rows: auto; row-gap: 12px; overflow: visible; }
.shelf--3 { grid-template-columns: repeat(auto-fill, minmax(176px, 240px)); }

/* ---------- the coin card ---------- */
.badge { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--c, var(--ink)); color: #fff; font: 800 .72rem/1 var(--font-text); letter-spacing: .01em; }
.badge--sm { width: 24px; height: 24px; font-size: .6rem; }
.badge--lg { width: 44px; height: 44px; font-size: .95rem; }
.badge--xl { width: 60px; height: 60px; font-size: 1.25rem; }
.coin { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 12px 12px 10px; border-radius: var(--r-tile); background: var(--shelf); --surface: var(--shelf); }
.coin:hover, .coin:focus-within { background: var(--paper); box-shadow: 0 0 0 1.5px var(--slip); --surface: var(--paper); }
.coin__link { display: grid; grid-template-columns: minmax(0, 1fr); text-decoration: none; }
.coin__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-tile); }
.coin__link:focus-visible { outline: 0; }
.coin__link:focus-visible::after { outline: 3px solid var(--ink); outline-offset: 2px; }
.coin__id { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 9px; }
.coin__id .badge { grid-row: span 2; }
.coin__sym { font: 760 1.02rem/1.15 var(--font-display); letter-spacing: -.01em; }
.coin__name { color: var(--muted); font-size: .8125rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin__tag { grid-column: 1 / -1; justify-self: start; margin-top: 8px; padding: .15em .6em; border-radius: 6px; background: var(--shelf-2); font-weight: 700; font-size: .8125rem; }
.coin__tag--locked { background: var(--ink); color: var(--paper); }
.coin__tag--releasing { background: var(--up-wash); color: var(--up); }
.coin__tag--off { background: var(--down-wash); color: var(--down); }
.spark { grid-column: 1 / -1; display: block; width: 100%; height: 50px; margin: 8px 0 6px; }
.spark__line { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.spark__area { fill: var(--ink); opacity: .06; }
.coin__nums { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.coin__price { font: 760 1.14rem/1.15 var(--font-display); letter-spacing: -.01em; white-space: normal; }
.spark--unread, .chart__unread { display: flex; align-items: center; color: var(--muted); font-size: .84rem; min-height: 2.5rem; }
.coin__foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; min-height: 36px; margin-top: 10px; pointer-events: none; }
.coin__foot > * { pointer-events: auto; }
.coin__pays, .coin__na { color: var(--muted); font-size: .8125rem; font-weight: 600; }
.coin__pays { margin-top: 2px; }
.coin--off .spark, .coin--off .coin__price { opacity: .6; }

.chg { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.chg .i { width: .62em; height: .62em; vertical-align: 0; }
.chg--up { color: var(--up); }
.chg--down { color: var(--down); }
.chg--flat { color: var(--muted); }
.chg__win { margin-left: 3px; color: var(--subtle); font-weight: 600; font-size: .8125rem; }
.nose { display: inline-flex; align-items: center; gap: 5px; font-size: .9rem; white-space: nowrap; }
.nose svg { width: 13px; height: 13px; fill: var(--ball); color: var(--ball); }
.nose--empty svg { color: var(--subtle); }
.nose b { font-weight: 760; }
.nose__word { color: var(--muted); font-weight: 600; }

/* ---------- facts and label/value pairs ---------- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; margin: 16px 0; }
.facts dt, .pairs dt { color: var(--muted); font-size: .8125rem; font-weight: 600; }
.facts dd { margin: 2px 0 0; font: 740 1.16rem/1.2 var(--font-display); letter-spacing: -.01em; }
.facts dd small, .pairs dd small { display: block; margin-top: 2px; color: var(--muted); font: 500 .8125rem/1.3 var(--font-text); letter-spacing: 0; }
.facts dd .nose { font-size: 1.16rem; }
.facts dd .nose__word { font: 600 .84rem var(--font-text); }
.facts--six { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px 18px; margin: 14px 0; }
.pairs dd { margin: 2px 0 0; font-weight: 700; }
.pairs--wide { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* ---------- slips: the buy box and the bill ---------- */
.buybox { padding: 16px; border: 1.5px solid var(--slip); border-radius: var(--r-card); background: var(--paper); --surface: var(--paper); }
.buybox__title { margin-bottom: 12px; font-size: 1.25rem; }
.buybox--off { border-style: dashed; border-color: var(--edge); color: var(--muted); }
.buybox--off .buybox__title { color: var(--ink); }
.quote { margin: 14px 0; }
.quote > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 7px 0; }
.quote dt { color: var(--muted); font-weight: 600; font-size: .92rem; }
.quote dd { margin: 0; text-align: right; font-weight: 700; }
.quote dd small { display: block; color: var(--subtle); font-weight: 500; }
.quote .quote__get { display: block; padding-top: 0; }
.quote__get dd { margin-top: 2px; text-align: left; font-weight: 650; }
.quote__get dd b { margin-right: .15em; font: 800 1.7rem/1.1 var(--font-display); letter-spacing: -.02em; }
.quote__pay { margin-top: 4px; padding-top: 10px !important; border-top: 2px solid var(--ink); }
.quote__pay dt { color: var(--ink); font: 760 1.05rem var(--font-display); }
.quote__pay dd { font: 800 1.35rem/1 var(--font-display); letter-spacing: -.02em; }
.buybox__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.buybox__actions .btn { flex: 1 1 auto; }
.buybox__fine, .buybox__pos { margin: 12px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.45; }

.bill { position: relative; margin-bottom: 12px; padding: 18px 18px 22px; border: 1.5px solid var(--slip); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--paper); --surface: var(--paper); }
.bill::after { content: ""; position: absolute; left: -1.5px; right: -1.5px; top: 100%; height: 10px; background: var(--zig) center top repeat-x; }
.bill__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.bill__head h2, .bill__head h3 { font-size: 1.3rem; }
.bill__lede { color: var(--muted); font-size: .94rem; }
.bill__lines { margin: 0; }
.bill__line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.bill__line dt { font-weight: 650; }
.bill__line dt small { display: block; margin-top: 2px; color: var(--muted); font-weight: 450; line-height: 1.4; }
.bill__line dd { margin: 0; text-align: right; font-weight: 700; white-space: nowrap; }
.bill__line--main dt { font: 760 1.08rem/1.25 var(--font-display); }
.bill__line--main dt small { font-family: var(--font-text); }
.bill__line--sub dt, .bill__line--sub dd { color: var(--muted); }
.bill__line--total { border-top: 2px solid var(--ink); border-bottom: 0; margin-top: -1px; padding: 12px 0 4px; align-items: baseline; }
.bill__line--total dt { font: 780 1.15rem var(--font-display); }
.bill__line--total dd { font: 800 1.6rem/1 var(--font-display); letter-spacing: -.02em; }
.math { display: block; color: var(--subtle); }
.bill__pending { margin: 10px 0 0; color: var(--muted); font-size: .875rem; }
.bill__notes { display: grid; gap: 12px; margin: 16px 0 0; }
.bill__note dt { color: var(--muted); font-size: .8125rem; font-weight: 700; }
.bill__note dd { margin: 2px 0 0; font-size: .95rem; line-height: 1.45; }
.bill__after { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.rehearsal { margin: 16px 0 0; padding: 14px; border-radius: 12px; background: var(--shelf); }
.rehearsal h4 { margin-bottom: 2px; }
.rehearsal__age { color: var(--muted); font-size: .875rem; }
.rehearsal dl { display: grid; gap: 8px; margin: 10px 0 0; }
.rehearsal dl > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; }
.rehearsal dt { color: var(--muted); font-size: .875rem; font-weight: 700; }
.rehearsal dd { margin: 0; font-size: .94rem; }
.holdwrap { margin-top: 18px; }
.hold { position: relative; overflow: hidden; display: block; width: 100%; min-height: 58px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--action); color: #fff; font: 800 1.1rem/1.1 var(--font-display); letter-spacing: -.01em; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.hold__fill { position: absolute; inset: 0; background: var(--action-press); transform: scaleX(0); transform-origin: 0 50%; }
.hold.is-holding .hold__fill { transform: scaleX(1); transition: transform var(--hold-ms, 1200ms) linear; }
.hold.is-armed { background: var(--ink); color: var(--paper); }
.hold__label { position: relative; }
.hold__help, .hold__sample { margin: 10px 0 0; color: var(--muted); font-size: .875rem; }
.hold__sample { margin-top: 6px; }
.bill--mini { max-width: 440px; }
.bill--receipt .bill__lede { margin-bottom: 8px; }

/* ---------- charts ---------- */
.chart { margin: 0; }
.chart__tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 10px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--shelf); }
.seg__b { min-width: 52px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: none; font-weight: 700; font-size: .875rem; color: var(--muted); }
.seg__b.is-on { background: var(--ink); color: var(--paper); }
.chart__plot, .stage__plot { position: relative; height: clamp(190px, 24vw, 320px); border-radius: var(--r-tile); background: var(--shelf); overflow: hidden; }
.chart__plot svg, .stage__plot svg { position: absolute; inset: 0 16px 0 0; width: calc(100% - 16px); height: 100%; }
.chart__line { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart__area { fill: var(--ink); opacity: .055; }
.chart__now { position: absolute; right: 16px; width: 14px; height: 14px; border-radius: 50%; background: var(--ball); transform: translate(50%, -50%); box-shadow: 0 0 0 3px var(--shelf); }
.chart__axis { position: absolute; inset: 10px auto 18px 10px; display: flex; flex-direction: column; justify-content: space-between; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .8125rem; font-weight: 600; pointer-events: none; }
.chart__axis li { padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, var(--shelf) 82%, transparent); width: fit-content; }
.chart__mark { position: absolute; left: 12px; bottom: 10px; padding: .1em .6em; border-radius: 999px; background: var(--yellow); color: #1B1A1F; font-weight: 700; font-size: .8125rem; }
.chart .chart__mark { left: auto; right: 40px; }
.chart .chart__plot svg { left: 76px; width: calc(100% - 92px); }

/* ---------- home: the stage ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.stage { padding: clamp(14px, 1.6vw, 22px); border-radius: 20px; background: var(--shelf); --surface: var(--shelf); min-width: 0; }
.stage__why { margin: 0 0 8px; color: var(--muted); font-size: .875rem; font-weight: 650; }
.coinhead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; }
.coinhead h1, .coinhead h2 { min-width: 0; }
.coinhead h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem); font-weight: 800; }
.coinhead h2 a { text-decoration: none; }
.coinhead h2 a:hover { text-decoration: underline; }
.coinhead__meta { display: block; margin-top: 4px; color: var(--muted); font: 500 .95rem/1.35 var(--font-text); letter-spacing: 0; text-wrap: pretty; }
.coinhead__price { margin: 0; text-align: right; }
.coinhead__price b { display: block; font: 800 clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem)/1 var(--font-display); letter-spacing: -.025em; white-space: nowrap; }
.coinhead__price .chg { margin-top: 6px; font-size: 1rem; }
.coinhead__lab { display: block; margin-top: 6px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.coinhead--page { margin-bottom: 4px; }
.stage__plot { height: clamp(150px, 15vw, 220px); margin-top: 14px; background: var(--paper); }
.stage__plot .chart__now { box-shadow: 0 0 0 3px var(--paper); }
.stage .buybox { margin-top: 4px; }
.stage .buybox .quote { display: grid; grid-template-columns: repeat(3, auto); align-items: end; justify-content: space-between; gap: 6px 22px; }
.stage .buybox .quote > div { display: block; padding: 0; border: 0 !important; margin: 0; }
.stage .buybox .quote dd { margin-top: 2px; text-align: left; }
.stage .buybox .quote .quote__get dd b { font-size: 1.35rem; }
.stage .buybox .quote__pay dd { font-size: 1.35rem; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; }
/* wide screens: the buy box sits beside the chart, so Buy is on a laptop's first screen and the first shelf shows under it */
@media (min-width: 1000px) {
  .stage { display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 23vw, 340px); grid-template-areas: "head head" "plot buy" "facts buy" "pager pager"; column-gap: clamp(14px, 1.6vw, 22px); align-items: start; }
  .stage__head { grid-area: head; }
  .stage__plot { grid-area: plot; height: clamp(200px, 16.5vw, 270px); }
  .stage .facts { grid-area: facts; }
  .stage .buybox { grid-area: buy; align-self: start; margin-top: 14px; }
  .stage .pager { grid-area: pager; margin-top: 4px; }
  .stage .buybox .quote { grid-template-columns: 1fr; gap: 0; margin: 12px 0; }
  .stage .buybox .quote > div { display: flex; padding: 5px 0; }
  .stage .buybox .quote .quote__get { display: block; }
  .stage .buybox .quote dd { margin-top: 0; text-align: right; }
  .stage .buybox .quote .quote__get dd { text-align: left; }
  .stage .buybox__actions { flex-wrap: nowrap; }
  .stage .buybox__actions .btn { flex: 1 1 0; padding: 0 .6em; }
  .stage .chips--amounts .chip { flex: 1 1 0; min-width: 0; padding: 0 .4em; }
}
@media (min-width: 1000px) and (max-width: 1239px) {
  .stage .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
}
.pager__b { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--edge); border-radius: 50%; background: var(--paper); }
.pager__b:hover { border-color: var(--ink); }
.pager__pos { min-width: 4.4em; color: var(--muted); font-weight: 650; font-size: .9rem; text-align: center; }

.fill { position: relative; height: 14px; margin: 12px 11px 16px 0; border-radius: 999px; background: var(--shelf-2); }
.fill__bar { position: absolute; inset: 0 auto 0 0; min-width: 14px; border-radius: 999px; background: var(--ink); }
.fill__ball { position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--ball); transform: translate(-50%, -50%); box-shadow: 0 0 0 3px var(--surface); }
.fill--closed .fill__bar, .fill--closed .fill__ball { background: var(--subtle); }

/* ---------- home: aisles, the bill explained, what we refuse ---------- */
.aislegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.aisle { display: grid; gap: 3px; padding: 16px; border-radius: var(--r-tile); background: var(--shelf); text-decoration: none; }
.aisle:hover { background: var(--paper); box-shadow: 0 0 0 1.5px var(--slip); }
.aisle__name { font: 780 1.3rem/1.1 var(--font-display); letter-spacing: -.02em; }
.aisle__rule { color: var(--muted); font-size: .875rem; font-weight: 550; }
.aisle__coins { display: flex; margin-top: 12px; }
.aisle__coins .badge { margin-right: -6px; box-shadow: 0 0 0 2px var(--shelf); }
.reads { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.steps3 { display: grid; gap: 18px; max-width: 54ch; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: s; }
.steps3 li { position: relative; padding-left: 3.1em; counter-increment: s; color: var(--muted); }
.steps3 li::before { content: counter(s); position: absolute; left: 0; top: -.12em; width: 1.5em; font: 800 2.1rem/1 var(--font-display); color: var(--ink); letter-spacing: -.03em; }
.steps3 li b { display: block; color: var(--ink); font: 740 1.1rem/1.3 var(--font-display); }
.refuses { padding: clamp(18px, 2.4vw, 32px); border-radius: 20px; background: var(--flip); color: var(--flip-ink); }
.refuses ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px 28px; margin: 18px 0 0; padding: 0; list-style: none; }
.refuses li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.refuses li .i { margin-top: .12em; color: var(--ball); }
.refuses li b { display: block; }
.refuses li span { color: var(--flip-soft); font-size: .94rem; }
.refuses li span b { color: var(--flip-ink); font-size: 1rem; }

/* ---------- cards (information) ---------- */
.card { margin-top: var(--gap); border-radius: var(--r-card); background: var(--shelf); --surface: var(--shelf); overflow: hidden; }
.card__body { padding: clamp(16px, 1.8vw, 24px); }
.card h2 { font-size: 1.3rem; }
.card__sub { max-width: 70ch; margin: 4px 0 14px; color: var(--muted); font-size: .94rem; }
.rulelist, .ksteps, .barlist { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.rulelist li, .barlist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.rulelist li:last-child, .barlist li:last-child, .ksteps li:last-child { border-bottom: 0; }
.rulelist .i, .ksteps .i, .barlist .i { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--up-wash); color: var(--up); }
.rulelist em, .ksteps em { font-style: normal; font-weight: 700; font-size: .875rem; color: var(--up); white-space: nowrap; }
.is-unread .i, .is-landing .i { background: var(--warn-wash); color: var(--warn); }
.is-unread em, .is-landing em { color: var(--warn); }
.is-queued .i { background: var(--shelf-2); color: var(--muted); }
.is-queued em { color: var(--muted); }
.is-failed .i, .is-stuck .i { background: var(--down-wash); color: var(--down); }
.is-failed em, .is-stuck em { color: var(--down); }
.ksteps li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.ksteps li b { display: block; }
.ksteps li span { display: block; color: var(--muted); font-size: .92rem; }
.ksteps__after { margin-top: 14px; max-width: 78ch; }
.status { margin: 16px 0 0; padding: 14px 16px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--edge); background: var(--shelf); }
.status b { font: 780 1.15rem var(--font-display); }
.status p { margin: 4px 0 0; max-width: 80ch; }
.status--stuck { background: var(--warn-wash); box-shadow: inset 0 0 0 1.5px var(--warn-edge); }
.status--stuck b { color: var(--warn); }
.status--filled { background: var(--up-wash); box-shadow: inset 0 0 0 1.5px var(--up); }
.status--filled b { color: var(--up); }
.statebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 18px; padding: 8px 10px; border: 1.5px dashed var(--warn-edge); border-radius: 12px; }
.statebar__lab { margin-right: 4px; }
.statebar a { display: inline-flex; align-items: center; flex: none; min-height: 44px; padding: 0 12px; border-radius: 999px; font-weight: 650; font-size: .875rem; text-decoration: none; }
.statebar a:hover { background: var(--shelf); }
.statebar a[aria-current] { background: var(--ink); color: var(--paper); }

/* ---------- coin page and round page ---------- */
.coinpage { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.coinpage__side { display: none; }
.coinpage__buy-inline { margin-top: 6px; }
.raised { margin-top: 16px; }
.curve { position: relative; height: 210px; margin: 6px 0 4px; }
.curve svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.curve__rest { fill: none; stroke: var(--edge); stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; }
.curve__done { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.curve__done.is-closed { stroke: var(--subtle); }
.curve__ball { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--ball); transform: translate(-50%, -50%); box-shadow: 0 0 0 4px var(--surface); }
.curve__ball.is-closed { background: var(--subtle); }
.curve__lab { position: absolute; color: var(--muted); font-size: .875rem; font-weight: 600; white-space: nowrap; }
.curve__lab b { color: var(--ink); font-weight: 760; }
.curve__lab--open { left: 8%; top: calc(82% + 12px); }
.curve__lab--fill { right: 8%; top: calc(22% - 30px); }
.curve__lab--now { transform: translateX(-10%); }
.quoteline { margin: 14px 0 0; font: 600 1.1rem/1.4 var(--font-display); }
.quoteline span { display: block; margin-top: 4px; color: var(--muted); font: 500 .9rem var(--font-text); }
.bubs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.bub { display: inline-block; flex: none; width: var(--d, 12px); height: var(--d, 12px); border-radius: 50%; background: #B9B5AA; }
.bub--cap { background: var(--ink); }
.bub--young { background: repeating-linear-gradient(45deg, var(--yellow) 0 3px, #8A5A00 3px 5px); }
.bub--bundle { background: none; box-shadow: inset 0 0 0 2.5px var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 14px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .9rem; }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend b { color: var(--ink); }
.rules { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rules li { position: relative; padding: 0 0 0 3em; margin-bottom: 14px; counter-increment: r; max-width: 78ch; break-inside: avoid; }
.rules li::before { content: counter(r); position: absolute; left: 0; top: -.1em; font: 800 1.55rem/1.1 var(--font-display); letter-spacing: -.03em; }
.pools { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.pools li { display: grid; gap: 1px; padding: 12px; border-radius: 12px; background: var(--paper); }
.pools span { color: var(--muted); font-size: .9rem; }
.ticks { display: grid; grid-template-columns: repeat(21, minmax(0, 1fr)); gap: 3px; margin: 14px 0; padding: 0; list-style: none; }
.ticks li { height: 12px; border-radius: 3px; background: var(--shelf-2); }
.ticks li.is-out { background: var(--up); }
.ticks li.is-today { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }

/* ---------- shop ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 16px; margin: 0 0 18px; }
.toolbar .field { min-width: 170px; }
.why { margin-top: 12px; max-width: 70ch; }
.why summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.why ol { margin: 6px 0 10px; padding-left: 1.4em; }
.why p { color: var(--muted); font-size: .94rem; }
.empty { display: grid; justify-items: center; gap: 6px; margin: 30px auto; padding: 28px 18px; max-width: 460px; text-align: center; }
.empty p { color: var(--muted); }

/* ---------- cart ---------- */
.cartpage { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.cartrows { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cartrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px 14px; padding: 14px; border-radius: var(--r-tile); background: var(--shelf); }
.cartrow__what { display: grid; gap: 1px; }
.cartrow__what a { display: inline-flex; align-items: center; gap: .35em; min-height: 44px; margin: -8px 0; text-decoration: none; }
.cartrow__what a b { font: 760 1.1rem var(--font-display); }
.cartrow__what span { color: var(--muted); font-size: .92rem; }
.field--amt select { min-width: 104px; font-weight: 750; }
.cartpage__more { margin-top: 16px; }
.cartpage__before { margin-top: 22px; }
.cartpage__before .rehearsal { margin-top: 0; padding: 18px; border-radius: var(--r-card); }
.pairs--notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 28px; margin: 18px 4px 0; }
.pairs--notes dd { margin: 2px 0 0; font-size: .94rem; }

/* ---------- shared pieces ---------- */
.queue p { display: flex; align-items: center; gap: 10px; }
.queue h2 { margin-bottom: 10px; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 12px 0 16px; }
.tier { display: block; padding: 16px; border-radius: var(--r-tile); background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.tier h3 { font-size: 1.25rem; }
.tier__sub { margin: 2px 0 10px; color: var(--muted); font-size: .92rem; }
.tier ul { margin: 0; padding-left: 1.15em; font-size: .94rem; }
.tier li { margin-bottom: 6px; }
label.tier { position: relative; cursor: pointer; }
label.tier input { position: absolute; top: 16px; right: 16px; width: 22px; height: 22px; accent-color: var(--ink); }
label.tier.is-on { box-shadow: inset 0 0 0 2.5px var(--ink); }
.pastround { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px 20px; padding: 16px; border-radius: var(--r-tile); background: var(--shelf); text-decoration: none; }
.pastround:hover { box-shadow: 0 0 0 1.5px var(--slip); background: var(--paper); }
.pastround__what { display: grid; gap: 2px; }
.pastround__what b { font: 760 1.15rem var(--font-display); }
.pastround__what span { color: var(--muted); font-size: .94rem; }
.pastround__num { font: 760 1.15rem var(--font-display); text-align: right; }
.pastround__num small { display: block; color: var(--muted); font: 600 .8125rem var(--font-text); }

/* ---------- launch yours ---------- */
.stepn { display: inline-grid; place-items: center; flex: none; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: .8em; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; gap: 14px 18px; }
.field--full { grid-column: 1 / -1; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: var(--r-tile); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; }
.choice:has(input:checked) { box-shadow: inset 0 0 0 2.5px var(--ink); }
.choice input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); }
.choice span { color: var(--muted); font-size: .94rem; }
.choice b { display: block; color: var(--ink); font-size: 1rem; }
.cannot { padding: 18px; border-radius: var(--r-tile); background: var(--warn-wash); box-shadow: inset 0 0 0 1.5px var(--warn-edge); }
.cannot h2 { margin-bottom: 6px; font-size: 1.25rem; }
.barlist li { grid-template-columns: auto minmax(0, 1fr); }
[data-sentence-flag] { color: var(--down); font-weight: 700; }

/* ---------- portfolio and orders ---------- */
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0; }
.totals > div { padding: 16px; border-radius: var(--r-tile); background: var(--shelf); }
.totals dt { color: var(--muted); font-size: .875rem; font-weight: 600; }
.totals dd { margin: 4px 0 0; font: 780 1.5rem/1.15 var(--font-display); letter-spacing: -.02em; }
.totals dd .chg { font-size: .95rem; font-family: var(--font-text); letter-spacing: 0; }
.totals__main dd { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); font-weight: 800; }
.split { display: flex; gap: 3px; height: 16px; border-radius: 999px; overflow: hidden; }
.split__part { min-width: 6px; }
.split__part--a { background: var(--ink); }
.split__part--b { background: var(--muted); }
.split__part--c { background: repeating-linear-gradient(45deg, var(--ink) 0 3px, var(--shelf-2) 3px 6px); }
.split__part--d { background: var(--edge); }
.split__part--e { background: repeating-linear-gradient(-45deg, var(--muted) 0 2px, var(--shelf-2) 2px 6px); }
.split__part--f { background: var(--line); }
.split__key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.tablewrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table thead th { padding-top: 0; color: var(--muted); font-size: .8125rem; font-weight: 650; }
.table .num { text-align: right; white-space: nowrap; }
.table td small { display: block; color: var(--muted); }
.table td { font-weight: 650; }
.table .act { width: 1%; text-align: right; }
.tcoin { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.tcoin b { display: block; font: 760 1.02rem var(--font-display); }
.tcoin small { color: var(--muted); font-weight: 500; }
.chips--filter { margin-bottom: 8px; }
.orders { margin: 0; padding: 0; list-style: none; }
.order { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(150px, auto) 7.5em; align-items: center; gap: 6px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.order__what { display: grid; gap: 1px; }
.order__what b { font-weight: 720; }
.order__what span { color: var(--muted); font-size: .92rem; }
.order__meta { font-size: .875rem !important; }
.order__state { display: grid; gap: 4px; justify-items: start; }
.order__where { font-size: .875rem; font-weight: 650; }
.order__amt { text-align: right; font: 780 1.15rem var(--font-display); }
.order__ways { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.order--warn { margin: 8px 0; padding: 16px; border: 0; border-radius: var(--r-tile); background: var(--warn-wash); box-shadow: inset 0 0 0 1.5px var(--warn-edge); --surface: var(--warn-wash); }
.state { display: inline-flex; padding: .2em .7em; border-radius: 999px; background: var(--shelf-2); font-weight: 700; font-size: .84rem; }
.state--ok { background: var(--up-wash); color: var(--up); }
.state--warn { background: var(--yellow); color: #1B1A1F; }
.state--off { color: var(--muted); }

/* ---------- sheets (the bill as a dialog), toast ---------- */
dialog.sheet { width: min(560px, calc(100vw - 32px)); max-height: min(88dvh, 920px); padding: 0; border: 0; border-radius: 18px; background: var(--paper); color: var(--ink); overflow: auto; overscroll-behavior: contain; box-shadow: 0 30px 90px -24px rgba(0, 0, 0, .5); }
dialog.sheet::backdrop { background: var(--scrim); }
.sheet__bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 6px 8px 6px 20px; background: var(--paper); }
.sheet__bar h2 { font-size: 1.3rem; }
.sheet__x { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border: 0; border-radius: 50%; background: var(--shelf); }
.sheet__grab { display: none; }
.sheet__body { padding: 0 20px 24px; }
.sheet .bill { margin: 0; padding: 0; border: 0; border-radius: 0; }
.sheet .bill::after { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 24px); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 650; font-size: .94rem; transform: translateX(-50%); box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .5); }
.toast a { color: inherit; font-weight: 750; white-space: nowrap; }
.buybar { display: none; }

/* ---------- footer ---------- */
.foot { margin-top: 24px; padding: clamp(24px, 3vw, 44px) var(--pad) 28px; background: var(--shelf); }
.foot__top { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px 32px; }
.foot__brand { grid-column: span 2; max-width: 44ch; }
.foot__logo { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 8px; }
.foot__logo .wordmark { height: 30px; }
.foot__plain { font-weight: 700; }
.foot h2 { margin-bottom: 8px; font: 700 .9rem var(--font-text); letter-spacing: 0; color: var(--muted); }
.foot ul { display: grid; margin: 0; padding: 0; list-style: none; }
.foot li a, .foot li .linkbtn { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; font-weight: 600; text-decoration: none; }
.foot li a:hover, .foot li .linkbtn:hover { text-decoration: underline; }
.foot__dot { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 10px; color: var(--muted); font-size: .9rem; }
.foot__dot img { width: 84px; height: auto; }
.foot__sample { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--line); max-width: none; color: var(--muted); font-size: .9rem; }

/* ---------- wider screens ---------- */
@media (min-width: 720px) {
  .reads { grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); }
}
@media (min-width: 1000px) {
  .coinpage { grid-template-columns: minmax(0, 1fr) clamp(330px, 27vw, 430px); }
  .coinpage__side { display: block; position: sticky; top: calc(var(--rail-h) + 16px); }
  .coinpage__buy-inline { display: none; }
  .cartpage { grid-template-columns: minmax(0, 1fr) clamp(380px, 34vw, 520px); }
  .cartpage__rows { position: sticky; top: calc(var(--rail-h) + 16px); }
  .rules { columns: 2; column-gap: 44px; }
}

/* ---------- the phone ---------- */
@media (max-width: 719px) {
  :root { --rail-h: 54px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .rail { gap: 8px; padding: 0 12px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .rail__logo { padding: 0 10px; border-radius: 9px; }
  .wordmark { height: 19px; }
  .rail__search, .rail__btn--text { display: none; }
  .rail__btn { width: 44px; height: 44px; }
  .rail__sample { font-size: .8125rem; padding: .25em .7em; }
  .searchrow { display: flex; align-items: center; gap: 8px; height: 46px; margin: 10px 12px 0; padding: 0 16px; border-radius: 999px; background: var(--shelf); }
  .searchrow .i { color: var(--muted); }
  .searchrow input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-weight: 500; font-size: 1rem; }
  .searchrow input::placeholder { color: var(--muted); opacity: 1; }
  .searchrow:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
  .aisles { padding: 0 12px; }
  .aisles__pages { display: none; }
  .aisles__scroll { margin-right: -12px; padding-right: 28px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  .sampleline { padding: 7px 12px; font-size: .8125rem; }
  main { padding: 14px 12px 40px; }
  .tabs { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: var(--paper); }
  .tabs a { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 60px; color: var(--muted); font-weight: 650; font-size: .8125rem; text-decoration: none; }
  .tabs a .i { width: 22px; height: 22px; }
  .tabs a[aria-current] { color: var(--ink); font-weight: 800; }
  .tabs a[aria-current] .i { color: var(--ball); }
  .shelf:not(.shelf--wrap) { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: -3px -12px; padding: 3px 12px; scroll-padding-left: 12px; }
  .shelf:not(.shelf--wrap)::-webkit-scrollbar { display: none; }
  .shelf:not(.shelf--wrap) > .coin { flex: 0 0 168px; scroll-snap-align: start; }
  .shelf--wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; row-gap: 10px; }
  .block__head .more { margin-left: 0; }
  .btn--sm { min-height: 44px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sampleline__long { display: none; }
  .statebar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
  .more, .block__head .more { display: inline-flex; align-items: center; min-height: 44px; }
  .stage { display: flex; flex-direction: column; }
  .stage .facts { order: 5; margin-bottom: 4px; }
  .stage .pager { order: 6; }
  .stage__plot { height: 112px; margin-top: 10px; margin-bottom: 12px; }
  .stage .chips--amounts .chip { flex: 1 1 0; min-width: 0; padding: 0 .4em; }
  .stage .buybox__actions { flex-wrap: nowrap; }
  .stage .buybox__actions .btn { flex: 1 1 0; padding: 0 .6em; }
  .aislegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .aisle { padding: 12px; }
  .aisle__name { font-size: 1.12rem; }
  .aisle__coins { display: none; }
  .foot__dot { grid-column: 1 / -1; }
  .coinhead { grid-template-columns: auto minmax(0, 1fr); }
  .coinhead__price { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; margin-top: 8px; text-align: left; }
  .coinhead__price .chg, .coinhead__lab { margin-top: 0; }
  .badge--xl { width: 48px; height: 48px; font-size: 1rem; }
  .stage .buybox .quote { grid-template-columns: 1fr; gap: 0; margin: 12px 0; }
  .stage .buybox .quote > div { display: flex; padding: 5px 0; }
  .stage .buybox .quote .quote__get { display: block; }
  .stage .buybox .quote dd { margin-top: 0; text-align: right; }
  .stage .buybox .quote .quote__get dd { text-align: left; }
  .stage .buybox .quote__pay { margin-top: 4px; padding-top: 8px !important; border-top: 2px solid var(--ink) !important; }
  .buybox__actions .btn { flex: 1 1 100%; }
  .pagehead--top { padding-top: 40px; }
  .pagehead--top h1, .pagehead--top .pagehead__sub { padding-right: 0; }
  .pagehead--top .pagehead__sub { padding-right: 96px; }
  .pagehead__dot { width: 92px; right: 4px; bottom: -22px; }
  .rehearsal dl > div { grid-template-columns: 1fr; gap: 0; }
  .cartrow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .cartrow .field--amt { grid-column: 2; justify-self: start; }
  .cartrow .iconbtn { grid-column: 3; grid-row: 1; }
  .pastround { grid-template-columns: auto minmax(0, 1fr); }
  .pastround__num { text-align: left; }
  .pastround__num:first-of-type { grid-column: 2; }
  .order { grid-template-columns: auto minmax(0, 1fr); }
  .order__state { grid-column: 2; }
  .order__amt { grid-column: 2; text-align: left; }
  .order__ways { grid-column: 1 / -1; }
  .order__ways .btn { flex: 1 1 auto; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table, .table tbody, .table tr, .table th, .table td { display: block; }
  .table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .table th, .table td { padding: 0; border: 0; }
  .table tbody th { grid-column: 1 / -1; }
  .table .num { text-align: left; }
  .table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .8125rem; font-weight: 600; }
  .table .act { width: auto; grid-column: 1 / -1; text-align: left; }
  .foot__brand { grid-column: 1 / -1; }
  .curve { height: 180px; }
  .curve__lab { font-size: .8125rem; }
  dialog.sheet { width: 100%; max-width: 100%; max-height: 94dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .sheet__grab { display: block; position: absolute; left: 50%; top: 8px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: var(--line); }
  .sheet__body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); border-radius: 16px; }
  .buybar.is-on { position: fixed; left: 10px; right: 10px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 39; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .55); }
  .stage .coinhead h2 a { display: inline-block; padding-block: 10px; margin-block: -10px; }
  .buybar span { min-width: 0; font-size: .95rem; line-height: 1.25; }
  .buybar small { display: block; opacity: .75; }
}
@media (min-width: 720px) and (max-width: 999px) {
  .coinpage .buybar.is-on { display: none; }
}

/* ---------- motion, print ---------- */
@media (prefers-reduced-motion: no-preference) {
  .coin, .aisle, .btn, .chip { transition: background-color .15s, box-shadow .15s, border-color .15s; }
  dialog.sheet[open] { animation: sheet-in .22s cubic-bezier(.2, .8, .2, 1); }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(18px); } }
}
@media print {
  .rail, .aisles, .tabs, .foot, .buybar, .statebar, .searchrow { display: none !important; }
}
