/* Bets
   The counter of a betting shop: a graphite ticket printer on a speckled terrazzo counter pushes out thermal slips with
   the two prices printed in dots, torn slips end up as pink carbon stubs on the spike beside it. The page takes its
   materials from that counter: a pale shop-wall grey for the ground, white thermal paper for every panel, carbon black
   for every edge, the pink carbon copy (red printed form lines, carbon-blue figures) for the ticket's board, the
   dialogs and the empty states, and a black printed ticket (punched notches on both sides, a perforated stub) for every
   button you press. Green is Yes, red is No. The wordmark and big figures in Sansita (black italic, like a racing-form
   masthead), prices and slips in Doto (the printer's dots), everything you read in Chivo, Chivo Mono only for
   addresses. 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 hex. */
/* Doto's full stop is a small cross of dots that reads like a plus, so "Bets Dot" is Doto with Chivo's plain full stop */
@font-face { font-family: "Bets Dot"; font-style: normal; font-weight: 500 900; font-display: swap; src: url(https://fonts.gstatic.com/s/doto/v3/t5t6IRMbNJ6TQG7Il_EKPqP9zTnvqouBWhoxrW5O.woff2) format("woff2"); unicode-range: U+0000-002D, U+002F-00FF, U+2000-206F, U+20AC, U+2212; }
@font-face { font-family: "Bets Dot"; font-style: normal; font-weight: 500 900; font-display: swap; src: url(https://fonts.gstatic.com/s/chivo/v21/va9I4kzIxd1KFrBoQeNVkqDO.woff2) format("woff2"); unicode-range: U+002E; }
:root {
  --ink-0: #ecebe7; --ink-1: #e2e0da; --ink-2: #d3d0c8; --ink-3: #a19d94;
  --paper: #fdfdf9;
  --line: #17181c; --line-soft: #dcd9d1; --ink: #17181c;
  --fg: #17181c; --muted: #5d5e66; --dim: #8f9098;
  --a: #0e7c55; --a-soft: rgba(14, 124, 85, .1);
  --b: #d4372c; --b-soft: rgba(212, 55, 44, .1);
  --lev: #17181c; --lev-soft: rgba(23, 24, 28, .08);
  --up: #0e7c55; --down: #d4372c; --down-soft: rgba(212, 55, 44, .08);
  --pink: #f5cfd4; --pink-2: #efc0c7; --form: #c63d55; --carbon: #39407a; --graphite: #2a2d34;
  --display: "Sansita", Georgia, serif;
  --dot: "Bets Dot", "Doto", "Courier New", monospace;
  --sans: "Chivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Chivo", "Helvetica Neue", Arial, sans-serif; /* the base layout sets small labels in --mono; Bets uses its sans */
  --addr: "Chivo Mono", ui-monospace, Menlo, monospace;
  --edge: 1.5px solid var(--line);
  --hair: 1px solid var(--line-soft);
  /* torn paper: a row of small teeth along the top edge */
  --torn: linear-gradient(#000 0 0) 0 7px / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at 50% 100%, #000 90deg, #0000 0) 0 0 / 12px 7px repeat-x;
  --shadow: 0 1px 0 rgba(23, 24, 28, .05), 0 18px 30px -24px rgba(30, 30, 40, .5);
  --r: 3px;
  color-scheme: light;
}
body { background: radial-gradient(110% 70% at 15% 0%, #f5f4f0 0%, rgba(245, 244, 240, 0) 60%), var(--ink-0); color: var(--fg); font: 400 15px/1.5 var(--sans); }
::selection { background: var(--pink); color: var(--fg); box-shadow: none; }

/* type */
h2, h3, .h { font: 750 14px/1.2 var(--sans); letter-spacing: 0; color: var(--fg); text-transform: none; }
h1 { font: 800 clamp(25px, 2.3vw, 34px)/1.14 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: tabular-nums; letter-spacing: 0; }
.hint, .empty, .stage-empty, .empty-state p { font-family: var(--sans); color: var(--muted); }

/* the split-flap tiles become the printer's dots, printed line by line when they change */
.flaps { gap: 0; }
.flaps > b { width: auto; height: auto; min-width: 0; background: none; border-radius: 0; color: inherit; font: 900 var(--ff, 22px)/1 var(--dot); letter-spacing: 0; }
.flaps > b.sp { width: .3em; }
.flaps > b.pt { width: auto; }
.flaps > b.flip { animation: printin .36s steps(4, end); }
@keyframes printin { 0% { clip-path: inset(0 0 100% 0); } 100% { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .flaps > b.flip { animation: none; } }

/* top bar: a strip of thermal paper with a perforated tear line along its foot */
.top { background: var(--paper) radial-gradient(circle, var(--ink-3) 1.2px, transparent 1.6px) 0 calc(100% - 3px) / 8px 6px repeat-x; border-bottom: 2px solid var(--line); }
.logo { gap: 9px; padding-right: 26px; font: italic 900 31px/1 var(--display); letter-spacing: -.01em; color: var(--fg); }
.logo span { padding-top: 2px; }
.logo .mark { width: 38px; height: 38px; }
.tabs { gap: 0; }
.tabs a { border-radius: 0; border-right: var(--hair); padding: 0 18px; font: 650 15px var(--sans); color: var(--muted); }
.tabs a:hover { background: var(--ink-0); color: var(--fg); }
/* the open tab is a pink carbon copy with its red printed rule */
.tabs a[aria-current="page"] { color: var(--fg); background: linear-gradient(var(--form), var(--form)) 0 calc(100% - 8px) / 100% 1px no-repeat, var(--pink); }
.tabs b { font-family: var(--sans); font-weight: 800; color: var(--form); }
.bal { border-left: var(--hair); }
.bal span { font: 600 12px var(--sans); color: var(--muted); }
.bal strong { font: italic 900 23px var(--display); }
.net { color: var(--muted); }

/* controls. The buttons you press are a printed black ticket: punched notches on both sides (drawn in the colour of
   what is behind them, --notch) and a perforated stub on the left; pressing pushes it down. */
.btn { border: var(--edge); border-radius: var(--r); font: 650 14.5px var(--sans); background: var(--paper); color: var(--fg); box-shadow: inset 0 -2px 0 var(--ink-2); transition: transform .08s, box-shadow .08s, background-color .15s; }
.btn:hover:not(:disabled) { background: var(--ink-0); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 -1px 0 var(--ink-2); }
.btn.primary, .btn.cta { --notch: var(--ink-0); --stub: 22px; position: relative; color: #fdfdf9; border: 0; border-radius: 4px; padding-left: calc(var(--stub) + 12px); padding-right: 18px; font-weight: 800;
  background:
    radial-gradient(circle at 0 50%, var(--notch) 6px, transparent 6.5px),
    radial-gradient(circle at 100% 50%, var(--notch) 6px, transparent 6.5px),
    repeating-linear-gradient(to bottom, rgba(253, 253, 249, .55) 0 3px, transparent 3px 6px) var(--stub) 4px / 1.5px calc(100% - 8px) no-repeat,
    linear-gradient(180deg, #3a3d45 0%, #1d1f24 55%, #121316 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -3px 0 rgba(0, 0, 0, .55), 0 3px 0 -1px #0b0c0e, 0 6px 10px -6px rgba(0, 0, 0, .5); }
.top .btn.primary, .ticket .btn, .mk .btn { --notch: var(--paper); }
.btn.primary:hover:not(:disabled), .btn.cta:hover:not(:disabled) { filter: none; background:
    radial-gradient(circle at 0 50%, var(--notch) 6px, transparent 6.5px), radial-gradient(circle at 100% 50%, var(--notch) 6px, transparent 6.5px),
    repeating-linear-gradient(to bottom, rgba(253, 253, 249, .6) 0 3px, transparent 3px 6px) var(--stub) 4px / 1.5px calc(100% - 8px) no-repeat,
    linear-gradient(180deg, #474a53 0%, #26282e 55%, #16171a 100%); }
.btn.primary:active:not(:disabled), .btn.cta:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(0, 0, 0, .55), 0 1px 0 -1px #0b0c0e; }
.btn.cta { --stub: 46px; min-height: 62px; font: italic 900 27px/1 var(--display); letter-spacing: 0; padding-left: calc(var(--stub) + 14px); padding-right: 24px; border-radius: 5px; }
.btn.cta::before { content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; translate: 0 -50%; border-radius: 50%; background: var(--pink); box-shadow: inset 0 0 0 4px #121316, inset 0 0 0 5px var(--pink); opacity: .95; }
.btn.cta:disabled { background: radial-gradient(circle at 0 50%, var(--notch) 6px, transparent 6.5px), radial-gradient(circle at 100% 50%, var(--notch) 6px, transparent 6.5px), var(--ink-1); color: var(--muted); box-shadow: inset 0 0 0 1px var(--ink-3); }
.btn.cta:disabled::before { background: var(--ink-2); box-shadow: inset 0 0 0 4px var(--ink-3); }
.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: 1px; }
.seg { border: var(--edge); border-radius: var(--r); padding: 2px; background: var(--paper); }
.seg button { border-radius: 2px; font: 650 13px var(--sans); }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--paper); box-shadow: none; }
input:not([type="range"]), select { background: var(--paper); border: 1px solid var(--ink-3); border-radius: var(--r); font-family: var(--sans); font-weight: 500; }
input:not([type="range"]):hover, select:hover { border-color: var(--fg); }
input:not([type="range"]):focus-visible, select:focus-visible { outline: 2px solid var(--form); outline-offset: 1px; border-color: var(--fg); box-shadow: none; }
:focus-visible { outline-color: var(--form); }
.chips button { font: 650 13px var(--sans); border-radius: var(--r); border: 1px solid var(--ink-3); background: var(--paper); }
.chips button[aria-pressed="true"] { background: var(--pink); border-color: var(--form); color: var(--fg); box-shadow: inset 0 -2px 0 var(--form); }

/* market list */
.mk { border-right: var(--edge); background: var(--paper); }
.mk-head { border-bottom: var(--hair); }
.mk-row { border-bottom: 1px dashed var(--line-soft); }
.mk-row:hover { background: #f6f5f0; }
.mk-row[aria-current="true"] { background: #fbf0f1; box-shadow: inset 4px 0 0 var(--fg), inset 6px 0 0 var(--pink); }
.mk-q { font: 650 15px/1.3 var(--sans); letter-spacing: -.005em; }
.mk-meta { font: 500 12.5px var(--sans); color: var(--muted); }
.mk-px { font: 900 16px/1.15 var(--dot); }
.mk-px .pa { color: var(--a); } .mk-px .pb { color: var(--b); }
/* the split bar under each market: printed cells, green for Yes and red for No */
.mk-split { height: 6px; border-radius: 0; background: repeating-linear-gradient(90deg, transparent 0 3px, var(--paper) 3px 4px), var(--b); box-shadow: none; }
.mk-split i { background: repeating-linear-gradient(90deg, transparent 0 3px, var(--paper) 3px 4px), var(--a); border-radius: 0; box-shadow: none; }
.thumb { border-radius: 2px; }
.thumb.tile { font-family: var(--display); font-style: italic; font-weight: 900; border: var(--edge); }
.legal { color: var(--muted); font: 400 12.5px/1.55 var(--sans); }

/* the two sides: thermal slips; the one you picked is printed in reverse, 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 -3px 0 var(--ink-2); transition: background-color .18s, color .18s, transform .08s; }
.duel-side:hover { background: #fffffb; }
.duel-side:active { transform: translateY(1px); }
.duel-name { font: 800 15px var(--sans); }
.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); border-color: #07462f; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), inset 0 0 0 3px var(--a), inset 0 0 0 4px rgba(253, 253, 249, .35); }
.duel-side.b[aria-pressed="true"] { background: var(--b); border-color: #7c1a13; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), inset 0 0 0 3px var(--b), inset 0 0 0 4px rgba(253, 253, 249, .35); }
.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: var(--paper); }
.duel-price.flaps { --ff: 50px; }
.duel-side .lev { font: 600 12.5px var(--sans); color: var(--muted); }
#st-cat { font: 750 12.5px var(--sans); color: var(--muted); box-shadow: none; }

/* the counter with the printer and the spike under the two sides */
.btz { margin-top: 14px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--line), var(--shadow); background: #dedbd4; }
.btz svg { display: block; width: 100%; height: auto; }
.btz.wait { width: min(460px, 86vw); margin: 0 0 22px; }

.chart-panel, .stage-row, .more { border-top: var(--hair); }
.panel { border-radius: var(--r); }
.room-num strong { font: 900 32px var(--dot); }
.meter { height: 7px; border-radius: 0; background: repeating-linear-gradient(90deg, transparent 0 4px, var(--paper) 4px 5px), var(--ink-2); box-shadow: none; }
.meter i { background: repeating-linear-gradient(90deg, transparent 0 4px, var(--paper) 4px 5px), var(--fg); border-radius: 0; }

/* the ticket */
.ticket { background: var(--paper); border-left: var(--edge); }
.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: 800 14px var(--sans); }
.side-pick button small { font: 900 21px var(--dot); }
.side-pick .a[aria-pressed="true"] { background: var(--a); border-color: #07462f; color: var(--paper); }
.side-pick .b[aria-pressed="true"] { background: var(--b); border-color: #7c1a13; color: var(--paper); }
/* the ticket's board: the customer's pink carbon copy, torn off along the top, red printed rules between the lines,
   the figures in carbon blue */
.tboard { gap: 0; padding: 20px 20px 10px; border-radius: 0 0 3px 3px; background: linear-gradient(180deg, #fadde1, var(--pink-2)); -webkit-mask: var(--torn); mask: var(--torn); }
.tboard > div { padding: 9px 0; border-bottom: 1px solid rgba(198, 61, 85, .55); }
.tboard > div:last-child { border-bottom: 0; }
.tboard .flaps > b { color: var(--carbon); text-shadow: 0 0 .5px rgba(57, 64, 122, .55); }
.tboard span { font: 700 12.5px var(--sans); color: var(--form); }
.tboard .flaps { --ff: 27px; }
.tboard .flaps.am > b, .flaps.am > b { color: var(--carbon); }
#tk-margin { font: 900 28px var(--dot); }
.quick { gap: 6px; border: 0; }
.quick button { border: 1px solid var(--ink-3); border-radius: var(--r); font: 700 15px var(--sans); font-variant-numeric: tabular-nums; background: var(--paper); }
.quick button:hover { border-color: var(--fg); background: var(--ink-0); }
.lev-head output { font: italic 900 42px/1 var(--display); letter-spacing: -.01em; color: var(--fg); }
/* the leverage slider: a row of printed cells filled up to your leverage; the thumb is a punched pink disc */
#tk-lev::-webkit-slider-runnable-track { height: 10px; border-radius: 0; border: 1px solid var(--line); background: repeating-linear-gradient(90deg, transparent 0 5px, var(--paper) 5px 6px), linear-gradient(var(--fg), var(--fg)) 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(--ink-1); }
#tk-lev::-moz-range-track { height: 10px; border-radius: 0; border: 1px solid var(--line); background: repeating-linear-gradient(90deg, transparent 0 5px, var(--paper) 5px 6px), linear-gradient(var(--fg), var(--fg)) 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(--ink-1); }
#tk-lev::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -9px; border: 0; border-radius: 50%; background: radial-gradient(circle, var(--pink) 0 5px, #121316 5.5px 9px, var(--pink) 9.5px 100%); box-shadow: 0 0 0 1.5px var(--line), 0 2px 3px rgba(23, 24, 28, .4); }
#tk-lev::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: radial-gradient(circle, var(--pink) 0 5px, #121316 5.5px 8.5px, var(--pink) 9px 100%); box-shadow: 0 0 0 1.5px var(--line), 0 2px 3px rgba(23, 24, 28, .4); }
.lev-ticks { font: 700 13px var(--sans); } .lev-ticks span.off { color: var(--ink-3); }
.rw-track { height: 6px; border-radius: 0; } .rw-fill { background: var(--ink-3); } .rw-now { background: var(--fg); }
.kv { border-top: var(--hair); } .kv > div { border-bottom: 1px dashed var(--line-soft); }
.err { border-left: 3px solid var(--down); background: var(--down-soft); border-radius: 2px; }

/* account pages */
.summary { border-bottom: 1.5px solid var(--line); }
.sum-main span { font: 650 13px var(--sans); color: var(--muted); }
.sum-main strong { font: italic 900 clamp(50px, 7vw, 100px)/1 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pos { background: var(--paper); border: var(--edge); border-radius: var(--r); box-shadow: inset 0 -3px 0 var(--ink-2); }
.pos-out { font: 750 12.5px var(--sans); }
.empty-state { border-radius: 0 0 3px 3px; background: linear-gradient(180deg, #fadde1, var(--pink-2)); -webkit-mask: var(--torn); mask: var(--torn); padding-top: 34px; }
.empty-state .es-mark { width: 64px; height: 64px; margin-bottom: 6px; }
.empty-state b { font: italic 900 28px var(--display); }
.empty-state .hint { color: #5a4048; }
.empty-state .btn { --notch: var(--pink); }
.pos .btn { --notch: var(--paper); }
.tbl th { border-bottom: var(--edge); font: 700 12.5px var(--sans); color: var(--fg); }
.tbl td { border-bottom: 1px dashed var(--line-soft); }
.mid-num { font: italic 900 48px/1 var(--display); font-variant-numeric: tabular-nums; }
.big-num { font-family: var(--display); font-style: italic; font-weight: 900; font-variant-numeric: tabular-nums; }
.addr { border: 1px solid var(--ink-3); border-radius: var(--r); background: var(--paper); font-family: var(--addr); font-size: 13px; }
.pick { border: 0; border-radius: 0 0 4px 4px; padding-top: 30px; box-shadow: 0 30px 60px -20px rgba(23, 24, 28, .55); background: linear-gradient(180deg, #fadde1, var(--pink-2)); -webkit-mask: var(--torn); mask: var(--torn); }
.pick::backdrop { background: rgba(23, 24, 28, .44); }
.pick .btn.primary { --notch: #f8d6db; }
.pick-item { font: 700 18px/1.2 var(--sans); border-radius: var(--r); }
.pick-item:hover, .pick-item:focus-visible { background: rgba(253, 253, 249, .6); color: var(--fg); }
.toast { background: var(--fg); color: var(--paper); border-left: 6px solid var(--pink); border-radius: var(--r); font: 500 15px var(--sans); }

/* loading: the printer feeds a slip that counts the order books in */
.stage-empty .flaps { display: none; }
.stage-empty p:first-of-type { font: italic 900 26px var(--display); color: var(--fg); }
.stage-empty #load-count { font-family: var(--sans); font-weight: 700; font-variant-numeric: tabular-nums; }
.ld-track { display: none; }
.sk { background: linear-gradient(90deg, var(--ink-1), var(--ink-2), var(--ink-1)); background-size: 200% 100%; border-radius: 2px; }

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

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

@media (max-width: 760px) {
  .coin { border-top: var(--hair); }
  .logo { font-size: 25px; padding-right: 12px; } .logo .mark { width: 30px; height: 30px; }
  .duel-price.flaps { --ff: 27px; }
  .duel-side .lev { font-size: 11.5px; }
  .tabs a { padding: 12px 14px; }
  .tabs a[aria-current="page"] { background-position: 0 calc(100% - 4px), 0 0; }
  .bal strong { font-size: 18px; } .bal span { font-size: 10.5px; }
  .acct .btn, .seg button { padding-left: 10px; padding-right: 10px; }
  .acct .btn.primary { padding-left: calc(var(--stub) + 10px); }
  .duel-side { padding: 13px 14px; }
  .btz { margin-top: 10px; }
  h1 { font-size: 23px; }
}

/* the base layout sets labels in spaced capitals; Bets 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, .duel-name,
.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; }
.net, .stage-empty { font-family: var(--sans); font-weight: 600; }
.field label, .eyebrow, .pick-go { font: 700 13px var(--sans); }

/* Live mode: before a wallet is connected the main button reads "Connect a wallet to trade". In the display face
   that line is wider than a phone, so the button may wrap and the bar never grows past the screen. The bar behind it
   is solid, so a message above the button never sits on the figures scrolling under it. */
.cta-bar { grid-template-columns: minmax(0, 1fr); background: var(--paper); box-shadow: 0 -1px 0 var(--line-soft); }
.cta-bar > * { min-width: 0; }
.btn.cta, .btn.cta:disabled { text-transform: none; letter-spacing: 0; white-space: normal; text-wrap: balance; line-height: 1.12; padding-top: 11px; padding-bottom: 14px; }
.btn.cta:disabled { color: var(--muted); }
@media (max-width: 420px) { .duel-price.flaps { --ff: 23px; } }
