/* Tiltz
   A yellow spirit level on a green cutting mat. Yes is the left end, No the right end; the bubble in the vial stands
   at the chance of Yes and the level leans toward the side that is ahead. The page is a light workshop grey with
   white panels and ink lines; the mat appears once, under the two sides. Controls are machined: square-ish corners,
   a hard ink edge, and the main button is the black rubber of the end caps with yellow lettering. Figures are
   stamped in a condensed industrial face, like the scale on a tool.
   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: #ecedea; --ink-1: #e2e4df; --ink-2: #d3d6d0; --ink-3: #b4b8b1;
  --paper: #ffffff;
  --line: #16181b; --line-soft: #d6d8d3; --ink: #16181b;
  --fg: #16181b; --muted: #545861; --dim: #8a8e95;
  --a: #1b5fc4; --a-soft: rgba(27, 95, 196, .1);
  --b: #cf3a24; --b-soft: rgba(207, 58, 36, .1);
  --lev: #16181b; --lev-soft: rgba(22, 24, 27, .08);
  --up: #16824a; --down: #cf3a24; --down-soft: rgba(207, 58, 36, .09);
  --tool: #f3c01a; --tool-dk: #c99a06; --vial: #cfe65a; --mat: #2c5b4c; --rubber: #1c1d21;
  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; /* the base layout sets small labels in --mono; Tiltz uses its grotesque */
  --addr: "Red Hat 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(22, 24, 27, .05), 0 16px 30px -22px rgba(22, 24, 27, .55);
  --r: 6px;
  color-scheme: light;
}
body { background: var(--ink-0); color: var(--fg); font: 500 15.5px/1.45 var(--sans); }
::selection { background: var(--tool); color: var(--fg); }

/* type: a condensed stamped face for headlines and every figure, a plain grotesque for everything you read or press */
h2, h3, .h { font: 700 13px/1.2 var(--sans); letter-spacing: .01em; color: var(--fg); text-transform: none; }
h1 { font: 800 clamp(28px, 2.7vw, 42px)/1.02 var(--display); letter-spacing: 0; text-transform: none; }
.num, .sum-stats dd, .pos-grid dd, .tbl td.r, .kv dd { font-family: var(--display); font-weight: 800; font-variant-numeric: lining-nums tabular-nums; letter-spacing: .01em; }
.hint, .empty, .stage-empty, .empty-state p { font-family: var(--sans); color: var(--muted); }

/* the split-flap tiles become stamped figures that settle like a bubble coming to rest */
.flaps { gap: 0; }
.flaps > b { width: auto; height: auto; min-width: 0; background: none; border-radius: 0; color: inherit; font: 800 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: settle .6s cubic-bezier(.25, 1.5, .45, 1); }
@keyframes settle { 0% { transform: translateX(-.12em); opacity: .25; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .flaps > b.flip { animation: none; } }

/* top bar: a strip of tool yellow under white */
.top { background: var(--paper); border-bottom: var(--edge); box-shadow: inset 0 -5px 0 var(--tool); }
.logo { gap: 9px; padding-right: 24px; font: 900 31px/1 var(--display); letter-spacing: .01em; color: var(--fg); }
.logo .mark { width: 38px; height: 38px; }
.tabs { gap: 2px; }
.tabs a { border-radius: 0; padding: 0 14px; font: 700 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 -5px 0 var(--fg); }
.tabs b { font-family: var(--display); font-weight: 800; color: var(--b); }
.bal { border-left: var(--hair); }
.bal span { font: 600 12px var(--sans); color: var(--muted); }
.bal strong { font: 800 23px var(--display); }
.net { color: var(--muted); }

/* controls: machined edges; the main button is black rubber with yellow lettering */
.btn { border: var(--edge); border-radius: var(--r); font: 700 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(--rubber); color: var(--tool); box-shadow: inset 0 1px 0 #44474e, inset 0 -3px 0 #000; }
.btn.primary:hover:not(:disabled) { background: #2b2d33; }
.btn.cta { border: var(--edge); border-radius: var(--r); min-height: 60px; font: 900 22px/1 var(--display); letter-spacing: .02em; background: var(--rubber); color: var(--tool);
  box-shadow: inset 0 1px 0 #4a4d54, inset 0 -5px 0 #000, 0 3px 0 var(--tool-dk); }
.btn.cta:hover:not(:disabled) { background: #2b2d33; filter: none; }
.btn.cta:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 #4a4d54, inset 0 -2px 0 #000, 0 1px 0 var(--tool-dk); }
.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: 700 13px var(--sans); }
.seg button[aria-pressed="true"] { background: var(--rubber); color: var(--tool); 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(--tool); outline-offset: 0; border-color: var(--fg); box-shadow: none; }
:focus-visible { outline-color: var(--fg); }
.chips button { font: 700 13px var(--sans); border-radius: var(--r); border: 1.5px solid var(--ink-3); background: var(--paper); }
.chips button[aria-pressed="true"] { background: var(--rubber); border-color: var(--rubber); color: var(--tool); }

/* 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: #fff8dc; box-shadow: inset 6px 0 0 var(--tool), inset 8px 0 0 var(--fg); }
.mk-q { font: 650 15.5px/1.28 var(--sans); letter-spacing: -.005em; }
.mk-meta { font: 600 12.5px var(--sans); color: var(--muted); }
.mk-px { font: 800 19px/1.1 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.mk-px .pa { color: var(--a); } .mk-px .pb { color: var(--b); font-weight: 700; }
/* the split bar under each market is a strip of the cent scale in the two colours */
.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(--fg); }
.thumb { border-radius: 4px; }
.thumb.tile { font-family: var(--display); font-weight: 800; border: var(--edge); }
.legal { color: var(--muted); font: 500 12.5px/1.5 var(--sans); }

/* the two sides: two plates; the one you picked is filled 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: 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); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); }
.duel-side.b[aria-pressed="true"] { background: var(--b); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); }
.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: 56px; }
.duel-side .lev { font: 700 12.5px var(--sans); color: var(--muted); }
#st-cat { font: 800 12.5px var(--sans); color: var(--fg); box-shadow: inset 0 -4px 0 var(--tool); }

/* the mat under the two sides, with the level on it */
.tilt { margin-top: 14px; border: var(--edge); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: var(--mat); }
.tilt svg { display: block; width: 100%; height: auto; }
.tl-body, .tl-bubble { transition: transform 1.3s cubic-bezier(.3, 1.35, .45, 1); }
.tl-bubble { transition-duration: 1.6s; }
@media (prefers-reduced-motion: reduce) { .tl-body, .tl-bubble { transition: none; } }
.tilt.wait { width: min(440px, 80vw); margin: 0 0 20px; }
.tilt.wait .tl-bubble { transition: transform .5s cubic-bezier(.2, .8, .2, 1); }

.chart-panel, .stage-row, .more { border-top: var(--hair); }
.panel { border-radius: var(--r); }
.room-num strong { font: 800 36px var(--display); }
.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(255, 255, 255, 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: 800 14px var(--sans); }
.side-pick button small { font: 800 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: 32px; }
.tboard .flaps.am > b, .flaps.am > b { color: var(--fg); }
#tk-margin { font: 800 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: 800 16px var(--display); background: var(--paper); }
.quick button:hover { border-color: var(--fg); background: var(--ink-1); }
.lev-head output { font: 900 42px/1 var(--display); letter-spacing: 0; color: var(--fg); }
/* the leverage slider is a small vial: lime liquid up to your leverage, the thumb is its bubble */
#tk-lev::-webkit-slider-runnable-track { height: 14px; border-radius: 7px; border: 2px solid var(--line); background: linear-gradient(var(--vial), var(--vial)) 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: 14px; border-radius: 7px; border: 2px solid var(--line); background: linear-gradient(var(--vial), var(--vial)) 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: 36px; height: 20px; margin-top: -5px; background: radial-gradient(ellipse at 40% 30%, #fff, #eef6c8 60%, #c7dc6a); border: 2px solid var(--line); border-radius: 50%; box-shadow: 0 2px 0 var(--line); clip-path: none; }
#tk-lev::-moz-range-thumb { width: 32px; height: 18px; background: radial-gradient(ellipse at 40% 30%, #fff, #eef6c8 60%, #c7dc6a); border: 2px solid var(--line); border-radius: 50%; box-shadow: 0 2px 0 var(--line); clip-path: none; }
.lev-ticks { font: 800 14px var(--display); } .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: 700 13px var(--sans); color: var(--muted); }
.sum-main strong { font: 900 clamp(54px, 8vw, 110px)/.9 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: 800 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: 800 26px var(--display); }
.tbl th { border-bottom: var(--edge); font: 700 12.5px var(--sans); color: var(--fg); }
.tbl td { border-bottom: var(--hair); }
.mid-num { font: 900 50px/1 var(--display); }
.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: 8px; box-shadow: 0 0 0 6px var(--tool), 0 0 0 8px var(--line); background: var(--paper); }
.pick::backdrop { background: rgba(22, 24, 27, .4); }
.pick-item { font: 700 18px/1.2 var(--sans); border-radius: var(--r); }
.pick-item:hover, .pick-item:focus-visible { background: var(--tool); color: var(--fg); }
.toast { background: var(--rubber); color: #fff; border-left: 6px solid var(--tool); border-radius: var(--r); font: 600 15.5px var(--sans); }

/* loading: the bubble travels along the vial as the books come in */
.stage-empty .flaps { display: none; }
.stage-empty p:first-of-type { font: 800 24px var(--display); 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(--tool); }

/* the coin in the top bar */
.coin > * { border-left: var(--hair); padding: 0 12px; }
.coin-tk { font: 800 20px var(--display); color: var(--fg); box-shadow: inset 0 -5px 0 var(--tool); }
.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: 700 13px var(--sans); color: var(--muted); }

@media (max-width: 760px) {
  .coin { border-top: var(--hair); }
  .top { box-shadow: none; border-bottom: 5px solid var(--tool); }
  .tabs a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--fg); }
  .logo { font-size: 26px; } .logo .mark { width: 30px; height: 30px; }
  .duel-price.flaps { --ff: 32px; }
  .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; }
  .tilt { margin-top: 10px; }
  h1 { font-size: 27px; }
}

/* the base layout sets labels in spaced capitals; Tiltz 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; }
.btn.cta { letter-spacing: .02em; }
.net, .stage-empty { font-family: var(--sans); font-weight: 600; }
.field label, .eyebrow, .pick-go { font: 700 13px var(--sans); }
@media (max-width: 760px) { .tabs a[aria-current="page"] { background: transparent; } }
