/* Stampz
   Office rubber stamps on a manila folder. Yes is the blue-violet stamp, No the red one; the side that is ahead has
   the fresh impression on the slip, and the self-inking number stamp prints the price of Yes. The page is a light
   manila desk with paper panels and ink lines; the folder with the slip appears once, under the two sides. Controls
   are cut like stamp blocks: a hard ink edge and a firm bottom lip, and the main button is the black felt of the ink
   pad with paper lettering. Stamped words and the big figures are set in a stencil face; everything you read or
   press is a plain grotesque. Loaded after /styles.css, which gives the layout; this file only gives the look. The
   token names below are also read by app.js for the charts, so they stay six-digit hex colours. */
:root {
  --ink-0: #f2e9d3; --ink-1: #ebdfc2; --ink-2: #dccca6; --ink-3: #b9a782;
  --paper: #fbf8f1;
  --line: #1a1a1f; --line-soft: #ddd1b5; --ink: #1a1a1f;
  --fg: #1a1a1f; --muted: #5d5646; --dim: #8f8770;
  --a: #3b3fb6; --a-soft: rgba(59, 63, 182, .1);
  --b: #d2232a; --b-soft: rgba(210, 35, 42, .1);
  --lev: #1a1a1f; --lev-soft: rgba(26, 26, 31, .08);
  --up: #1e7a45; --down: #d2232a; --down-soft: rgba(210, 35, 42, .09);
  --manila: #e8d3a6; --manila-dk: #cdb07a; --wood: #a8713e; --felt: #26262b;
  --display: "Saira Stencil One", "Arial Black", Impact, sans-serif;
  --sans: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Work Sans", "Helvetica Neue", Arial, sans-serif; /* the base layout sets small labels in --mono; Stampz uses its grotesque */
  --addr: "Overpass Mono", ui-monospace, Menlo, monospace; /* only wallet and contract addresses */
  --edge: 2px solid var(--line);
  --hair: 1px solid var(--line-soft);
  --shadow: 0 1px 0 rgba(26, 26, 31, .05), 0 16px 30px -22px rgba(70, 50, 15, .6);
  --r: 5px;
  color-scheme: light;
}
body { background: var(--ink-0); color: var(--fg); font: 500 15px/1.45 var(--sans); }
::selection { background: var(--manila); color: var(--fg); }

/* type: the stencil face for headlines and big figures; small figures stay in the grotesque, tabular and lining */
h2, h3, .h { font: 650 13px/1.2 var(--sans); letter-spacing: .01em; color: var(--fg); text-transform: none; }
h1 { font: 700 clamp(24px, 2.3vw, 34px)/1.12 var(--sans); letter-spacing: -.015em; text-transform: none; }
.num, .sum-stats dd, .pos-grid dd, .tbl td.r, .kv dd { font-family: var(--sans); font-weight: 650; font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0; }
.hint, .empty, .stage-empty, .empty-state p { font-family: var(--sans); color: var(--muted); }

/* the split-flap tiles become stamped figures that land with a little press */
.flaps { gap: 0; }
.flaps > b { width: auto; height: auto; min-width: 0; background: none; border-radius: 0; color: inherit; font: 400 var(--ff, 22px)/1 var(--display); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .01em; }
.flaps > b.sp { width: .24em; } .flaps > b.pt { width: auto; }
.flaps > b.flip { animation: press .42s cubic-bezier(.2, .9, .3, 1); }
@keyframes press { 0% { transform: scale(1.18); opacity: 0; } 55% { transform: scale(.97); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .flaps > b.flip { animation: none; } }

/* top bar: paper over the manila tab of a folder */
.top { background: var(--paper); border-bottom: var(--edge); box-shadow: inset 0 -6px 0 var(--manila-dk); }
.logo { gap: 10px; padding-right: 24px; font: 400 30px/1 var(--display); letter-spacing: .02em; color: var(--fg); }
.logo .mark { width: 38px; height: 38px; }
.tabs { gap: 2px; }
.tabs a { border-radius: 0; padding: 0 14px; font: 650 14.5px var(--sans); color: var(--muted); }
.tabs a:hover { background: var(--ink-1); color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--fg); background: transparent; box-shadow: inset 0 -6px 0 var(--fg); }
.tabs b { font-family: var(--sans); font-weight: 750; color: var(--b); }
.bal { border-left: var(--hair); }
.bal span { font: 600 12px var(--sans); color: var(--muted); }
.bal strong { font: 400 23px var(--display); font-variant-numeric: lining-nums tabular-nums; }
.net { color: var(--muted); }

/* controls: stamp blocks with an ink edge; the main button is the ink pad's black felt with paper lettering */
.btn { border: var(--edge); border-radius: var(--r); font: 650 14px var(--sans); background: var(--paper); color: var(--fg); box-shadow: inset 0 -3px 0 var(--ink-2); transition: transform .08s, box-shadow .08s, background-color .15s; }
.btn:hover:not(:disabled) { background: var(--ink-1); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 -1px 0 var(--ink-2); }
.btn.primary { background: var(--felt); color: var(--paper); box-shadow: inset 0 1px 0 #4a4a52, inset 0 -3px 0 #000; }
.btn.primary:hover:not(:disabled) { background: #34343a; }
.btn.cta { border: var(--edge); border-radius: var(--r); min-height: 60px; font: 400 23px/1 var(--display); letter-spacing: .04em; background: var(--felt); color: var(--paper);
  box-shadow: inset 0 1px 0 #4d4d55, inset 0 -5px 0 #000, 0 4px 0 var(--wood); }
.btn.cta:hover:not(:disabled) { background: #34343a; filter: none; }
.btn.cta:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 1px 0 #4d4d55, inset 0 -2px 0 #000, 0 1px 0 var(--wood); }
.btn.cta:disabled { background: var(--ink-2); color: var(--dim); border-color: var(--ink-3); box-shadow: none; }
.btn.ghost { background: var(--paper); box-shadow: none; border-color: var(--ink-3); }
.btn.ghost:active:not(:disabled) { transform: none; }
.btn.small { box-shadow: none; border-width: 1.5px; }
.seg { border: var(--edge); border-radius: var(--r); padding: 2px; background: var(--paper); }
.seg button { border-radius: 3px; font: 650 13px var(--sans); }
.seg button[aria-pressed="true"] { background: var(--felt); color: var(--paper); box-shadow: none; }
input:not([type="range"]), select { background: var(--paper); border: 1.5px solid var(--ink-3); border-radius: var(--r); font-family: var(--sans); font-weight: 600; }
input:not([type="range"]):hover, select:hover { border-color: var(--fg); }
input:not([type="range"]):focus-visible, select:focus-visible { outline: 3px solid var(--a); outline-offset: 0; border-color: var(--fg); box-shadow: none; }
:focus-visible { outline-color: var(--a); }
.chips button { font: 650 13px var(--sans); border-radius: var(--r); border: 1.5px solid var(--ink-3); background: var(--paper); }
.chips button[aria-pressed="true"] { background: var(--felt); border-color: var(--felt); color: var(--paper); }

/* market list */
.mk { border-right: var(--edge); background: var(--paper); }
.mk-head { border-bottom: var(--hair); }
.mk-row { border-bottom: var(--hair); }
.mk-row:hover { background: var(--ink-0); }
.mk-row[aria-current="true"] { background: #f6edd6; box-shadow: inset 6px 0 0 var(--manila-dk), inset 8px 0 0 var(--fg); }
.mk-q { font: 600 15px/1.3 var(--sans); letter-spacing: -.005em; }
.mk-meta { font: 550 12.5px var(--sans); color: var(--muted); }
.mk-px { font: 400 19px/1.1 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.mk-px .pa { color: var(--a); } .mk-px .pb { color: var(--b); }
/* the split bar under each market: two strips of ink, one per side */
.mk-split { height: 6px; border-radius: 1px; background: var(--b); } .mk-split i { background: var(--a); border-radius: 1px 0 0 1px; box-shadow: 1.5px 0 0 var(--paper); }
.thumb { border-radius: 4px; }
.thumb.tile { font-family: var(--display); font-weight: 400; border: var(--edge); }
.legal { color: var(--muted); font: 500 12.5px/1.5 var(--sans); }

/* the two sides: two stamp blocks; the one you picked is inked in its colour */
.duel { gap: 12px; border: 0; background: transparent; box-shadow: none; }
.duel-side { border: var(--edge); border-radius: var(--r); background: var(--paper); padding: 16px 20px 18px; box-shadow: inset 0 -4px 0 var(--ink-2); transition: background-color .18s, color .18s, transform .08s; }
.duel-side:hover { background: var(--ink-0); }
.duel-side:active { transform: translateY(1px); }
.duel-name { font: 400 17px var(--display); letter-spacing: .04em; }
.duel-side.a .duel-name { color: var(--a); } .duel-side.b .duel-name { color: var(--b); }
.duel-side.a[aria-pressed="true"] { background: var(--a); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .28); }
.duel-side.b[aria-pressed="true"] { background: var(--b); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .28); }
.duel-side[aria-pressed="true"], .duel-side[aria-pressed="true"] .duel-name, .duel-side[aria-pressed="true"] .lev,
.duel-side[aria-pressed="true"] .duel-price.flaps > b { color: #fff; }
.duel-price.flaps { --ff: 54px; }
.duel-side .lev { font: 600 12.5px var(--sans); color: var(--muted); }
#st-cat { font: 700 12.5px var(--sans); color: var(--fg); box-shadow: inset 0 -5px 0 var(--manila); }

/* the folder with the slip and the number stamp, under the two sides */
.stampz { margin-top: 14px; border: var(--edge); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: var(--manila); }
.stampz svg { display: block; width: 100%; height: auto; }
.sz-tens, .sz-units { transition: transform .62s cubic-bezier(.3, 1.25, .5, 1); }
.sz-in { animation: ink-in .45s ease-out; }
.sz-num.sz-in > g { animation: ink-land .45s cubic-bezier(.2, .9, .3, 1); transform-box: fill-box; transform-origin: center; }
@keyframes ink-in { from { opacity: 0; } }
@keyframes ink-land { from { transform: scale(1.07); } }
.sz-press.sz-down { animation: sz-down .42s cubic-bezier(.3, .7, .4, 1); }
@keyframes sz-down { 40% { transform: translateY(9px); } }
@media (prefers-reduced-motion: reduce) { .sz-tens, .sz-units { transition: none; } .sz-in, .sz-num.sz-in > g, .sz-press.sz-down { animation: none; } }
.stampz.wait { width: min(520px, 84vw); margin: 0 0 18px; }
.stampz.wait .sz-tens, .stampz.wait .sz-units { transition-duration: .35s; }

.chart-panel, .stage-row, .more { border-top: var(--hair); }
.panel { border-radius: var(--r); }
.room-num strong { font: 400 34px var(--display); font-variant-numeric: lining-nums tabular-nums; }
.meter { height: 7px; border-radius: 1px; background: var(--ink-2); } .meter i { background: var(--fg); border-radius: 1px; }

/* the ticket */
.ticket { background: var(--paper); border-left: var(--edge); }
.cta-bar { background: linear-gradient(rgba(251, 248, 241, 0), var(--paper) 24%); }
.side-pick { gap: 8px; border: 0; }
.side-pick button { border: var(--edge); border-radius: var(--r); padding: 10px 12px; background: var(--paper); }
.side-pick button span { font: 400 15px var(--display); letter-spacing: .03em; }
.side-pick button small { font: 400 21px var(--display); font-variant-numeric: lining-nums tabular-nums; }
.side-pick .a[aria-pressed="true"] { background: var(--a); color: #fff; }
.side-pick .b[aria-pressed="true"] { background: var(--b); color: #fff; }
.tboard { gap: 10px; padding: 16px 18px; border: var(--edge); border-radius: var(--r); background: var(--ink-0); }
.tboard span { font: 600 13px var(--sans); color: var(--muted); }
.tboard .flaps { --ff: 30px; }
.tboard .flaps.am > b, .flaps.am > b { color: var(--fg); }
#tk-margin { font: 400 30px var(--display); font-variant-numeric: lining-nums tabular-nums; }
.quick { gap: 6px; border: 0; }
.quick button { border: 1.5px solid var(--ink-3); border-radius: var(--r); font: 650 15px var(--sans); font-variant-numeric: lining-nums tabular-nums; background: var(--paper); }
.quick button:hover { border-color: var(--fg); background: var(--ink-1); }
.lev-head output { font: 400 40px/1 var(--display); letter-spacing: 0; color: var(--fg); font-variant-numeric: lining-nums tabular-nums; }
/* the leverage slider is a strip of the printed scale: inked up to your leverage, the thumb a small wooden stamp head */
#tk-lev::-webkit-slider-runnable-track { height: 12px; border-radius: 2px; border: 2px solid var(--line); background: linear-gradient(var(--felt), var(--felt)) 0 0 / calc(var(--v) * 100%) 100% no-repeat, linear-gradient(var(--ink-3), var(--ink-3)) 0 0 / calc(var(--m) * 100%) 100% no-repeat, var(--paper); }
#tk-lev::-moz-range-track { height: 12px; border-radius: 2px; border: 2px solid var(--line); background: linear-gradient(var(--felt), var(--felt)) 0 0 / calc(var(--v) * 100%) 100% no-repeat, linear-gradient(var(--ink-3), var(--ink-3)) 0 0 / calc(var(--m) * 100%) 100% no-repeat, var(--paper); }
#tk-lev::-webkit-slider-thumb { width: 24px; height: 28px; margin-top: -10px; background: radial-gradient(circle at 40% 30%, #e5b17a, #a8713e 60%, #6f421d); border: 2px solid var(--line); border-radius: 50% 50% 4px 4px; box-shadow: 0 2px 0 var(--line); clip-path: none; }
#tk-lev::-moz-range-thumb { width: 22px; height: 26px; background: radial-gradient(circle at 40% 30%, #e5b17a, #a8713e 60%, #6f421d); border: 2px solid var(--line); border-radius: 50% 50% 4px 4px; box-shadow: 0 2px 0 var(--line); clip-path: none; }
.lev-ticks { font: 650 13px var(--sans); font-variant-numeric: lining-nums tabular-nums; } .lev-ticks span.off { color: var(--ink-3); }
.rw-track { height: 7px; border-radius: 1px; } .rw-fill { background: var(--ink-3); } .rw-now { background: var(--fg); }
.kv { border-top: var(--hair); } .kv > div { border-bottom: var(--hair); }
.err { border-left: 4px solid var(--down); background: var(--down-soft); border-radius: 3px; }

/* account pages */
.summary { border-bottom: var(--edge); }
.sum-main span { font: 650 13px var(--sans); color: var(--muted); }
.sum-main strong { font: 400 clamp(50px, 7.5vw, 100px)/.95 var(--display); letter-spacing: 0; font-variant-numeric: lining-nums tabular-nums; }
.pos { background: var(--paper); border: var(--edge); border-radius: var(--r); box-shadow: inset 0 -4px 0 var(--ink-2); }
.pos-out { font: 700 12.5px var(--sans); }
.empty-state { border: 2px dashed var(--ink-3); border-radius: var(--r); background: var(--paper); }
.empty-state .flaps { --ff: 26px; margin-bottom: 10px; }
.empty-state .flaps > b { color: var(--dim); }
.empty-state b { font: 700 22px var(--sans); }
.tbl th { border-bottom: var(--edge); font: 650 12.5px var(--sans); color: var(--fg); }
.tbl td { border-bottom: var(--hair); }
.mid-num { font: 400 46px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.addr { border: 1.5px solid var(--ink-3); border-radius: var(--r); background: var(--paper); font-family: var(--addr); font-size: 12px; }
.pick { border: var(--edge); border-radius: 6px; box-shadow: 0 0 0 6px var(--manila), 0 0 0 8px var(--line); background: var(--paper); }
.pick::backdrop { background: rgba(26, 26, 31, .4); }
.pick-item { font: 650 18px/1.2 var(--sans); border-radius: var(--r); }
.pick-item:hover, .pick-item:focus-visible { background: var(--manila); color: var(--fg); }
.toast { background: var(--felt); color: var(--paper); border-left: 6px solid var(--a); border-radius: var(--r); font: 600 15px var(--sans); }

/* loading: the number stamp's bands roll on as the books come in */
.stage-empty .flaps { display: none; }
.stage-empty p:first-of-type { font: 400 23px var(--display); letter-spacing: .03em; color: var(--fg); }
.ld-track { display: none; }
.sk { background: linear-gradient(90deg, var(--ink-1), var(--ink-2), var(--ink-1)); background-size: 200% 100%; border-radius: 3px; }

/* the pointer */
.cur-dot { background: var(--fg); }
.cur-box { border: 2px solid var(--fg); border-radius: var(--r); }
#cur.go .cur-box { border-color: var(--a); }

/* the coin in the top bar */
.coin > * { border-left: var(--hair); padding: 0 12px; }
.coin-tk { font: 400 19px var(--display); color: var(--fg); box-shadow: inset 0 -5px 0 var(--manila); }
.coin-ca { font: 500 12px var(--addr); color: var(--muted); }
.coin-ca:hover, .coin-pump:hover { background: var(--ink-1); color: var(--fg); }
.coin-pump { font: 650 13px var(--sans); color: var(--muted); }

@media (max-width: 760px) {
  .coin { border-top: var(--hair); }
  .top { box-shadow: none; border-bottom: 6px solid var(--manila-dk); }
  .tabs a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--fg); }
  .logo { font-size: 25px; } .logo .mark { width: 30px; height: 30px; }
  .duel-price.flaps { --ff: 28px; }
  .duel-side .lev { font-size: 11px; }
  .bal strong { font-size: 17px; } .bal span { font-size: 10.5px; }
  .acct .btn, .seg button { padding-left: 10px; padding-right: 10px; }
  .duel-side { padding: 13px 14px; }
  .stampz { margin-top: 10px; }
  h1 { font-size: 23px; }
}

/* the base layout sets labels in spaced capitals; Stampz writes them as words */
h2, h3, .h, .tabs a, .net, .bal span, .seg button, .field label, .chips button, .stage-empty, .stage-empty p, #st-cat,
.side-pick button span, .sum-main span, .pos-out, .tbl th, .eyebrow, .pick-go, h1, .btn, .mk-meta, .duel-side .lev,
.tboard span, .empty-state b, .coin-pump {
  text-transform: none; letter-spacing: 0; }
.duel-name { text-transform: uppercase; letter-spacing: .04em; }
.btn.cta { letter-spacing: .04em; }
.stage-empty p:first-of-type { letter-spacing: .03em; }
.net, .stage-empty { font-family: var(--sans); font-weight: 600; }
.field label, .eyebrow, .pick-go { font: 650 13px var(--sans); }
@media (max-width: 760px) { .tabs a[aria-current="page"] { background: transparent; } }

/* Live mode: before a wallet is connected the main button reads "Connect a wallet to trade". In a wide display face
   that line is wider than a phone, so the button may wrap and the bar never grows past the screen. */
.cta-bar { grid-template-columns: minmax(0, 1fr); }
.cta-bar > * { min-width: 0; }
@media (max-width: 760px) { .cta-bar .btn { white-space: normal; text-wrap: balance; line-height: 1.15; } }
