/* Heatz
   An old enamel tin thermometer screwed to a plaster wall. The red spirit stands at the price of Yes in cents: how hot
   is Yes. No reads the same column from the other side. The page is the wall: warm plaster, with cream enamel panels
   edged in ink like the printed border of a tin sign. Controls are enamel too: rounded plates with a hard ink edge,
   and the main button is the dark ink enamel of the sign's lettering with cream letters on it. Figures are printed in
   a tall condensed face, like the numbers on a thermometer scale. Yes is heat red, No is cold blue.
   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: #efe9df; --ink-1: #e6dfd1; --ink-2: #d8cfbf; --ink-3: #b7ad9c;
  --paper: #f7f3e8; --wall: #efe9df;
  --line: #13202b; --line-soft: #d9d1c1; --ink: #13202b;
  --fg: #13202b; --muted: #53595f; --dim: #8b8f92;
  --a: #d9342b; --a-soft: rgba(217, 52, 43, .1);
  --b: #2f6fb2; --b-soft: rgba(47, 111, 178, .1);
  --lev: #13202b; --lev-soft: rgba(19, 32, 43, .08);
  --up: #1f7a4a; --down: #d9342b; --down-soft: rgba(217, 52, 43, .09);
  --steel: #8a929a; --steel-dk: #565d64; --amber: #e9c46a;
  --ramp: linear-gradient(90deg, #2f6fb2, #a9bccb 26%, #e9c46a 52%, #e5833f 76%, #d9342b);
  --display: "Sofia Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --sans: "Sofia Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Sofia Sans", "Helvetica Neue", Arial, sans-serif; /* the base layout sets small labels in --mono; Heatz uses its text face */
  --addr: "Azeret 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(59, 47, 34, .06), 0 18px 30px -22px rgba(59, 47, 34, .6);
  --r: 8px;
  color-scheme: light;
}
/* the page is the plaster wall the thermometer is screwed to: a warm off-white with a fine grain */
body { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .27 0 0 0 0 .2 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23p)' opacity='.28'/%3E%3C/svg%3E"), var(--wall); color: var(--fg); font: 500 15.5px/1.45 var(--sans); font-variant-numeric: lining-nums; }
::selection { background: var(--amber); color: var(--fg); }

/* type: a tall condensed face for headlines and every figure, a plain humanist sans for everything you read or press */
h2, h3, .h { font: 700 13.5px/1.2 var(--sans); letter-spacing: .005em; color: var(--fg); text-transform: none; }
h1 { font: 800 clamp(30px, 2.9vw, 46px)/1 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; }
.kv dd { font-size: 1.12em; }
.hint, .empty, .stage-empty, .empty-state p { font-family: var(--sans); color: var(--muted); }

/* the split-flap tiles become printed figures that rise into place like spirit in a tube */
.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: rise .55s cubic-bezier(.2, .9, .3, 1); }
@keyframes rise { 0% { transform: translateY(.18em); opacity: .2; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .flaps > b.flip { animation: none; } }

/* top bar: a strip of cream enamel with the printed cold-to-hot band along its foot */
.top { background: var(--ramp) left bottom / 100% 5px no-repeat, var(--paper); border-bottom: 0; box-shadow: 0 2px 0 var(--line); }
.logo { gap: 9px; padding-right: 24px; font: 900 36px/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 15px 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 -9px 0 -4px var(--fg); }
.tabs b { font-family: var(--display); font-weight: 800; color: var(--a); }
.bal { border-left: var(--hair); }
.bal span { font: 600 12px var(--sans); color: var(--muted); }
.bal strong { font: 800 26px var(--display); }
.net { color: var(--muted); }

/* controls: enamel plates with a hard ink edge; the main button is dark ink enamel with cream letters */
.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: #fffdf6; }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 -1px 0 var(--ink-2); }
.btn.primary { background: var(--ink); color: var(--paper); box-shadow: inset 0 1px 0 #3c4d5c, inset 0 -3px 0 #060b10; }
.btn.primary:hover:not(:disabled) { background: #1f3243; }
.btn.cta { border: var(--edge); border-radius: var(--r); min-height: 60px; font: 900 25px/1 var(--display); letter-spacing: .02em; background: var(--ink); color: var(--paper);
  box-shadow: inset 0 1px 0 #3c4d5c, inset 0 -5px 0 #060b10, 0 3px 0 var(--steel); }
.btn.cta:hover:not(:disabled) { background: #1f3243; filter: none; }
.btn.cta:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 #3c4d5c, inset 0 -2px 0 #060b10, 0 1px 0 var(--steel); }
.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: 5px; font: 700 13px var(--sans); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
input:not([type="range"]), select { background: #fbf9f2; 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(--amber); 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(--ink); border-color: var(--ink); 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: #fbf8f0; }
.mk-row[aria-current="true"] { background: #fbf1e4; box-shadow: inset 5px 0 0 var(--a), inset 7px 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 21px/1.05 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 bar under each market is a short red column in a pale tube: how hot Yes is */
.mk-split { height: 6px; border-radius: 3px; background: #e4ddd0; box-shadow: inset 0 0 0 1px rgba(19, 32, 43, .18); }
.mk-split i { background: var(--a); border-radius: 3px; }
.thumb { border-radius: 5px; }
.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 enamel plates; the one you picked is filled in its colour, Yes red, No blue */
.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: #fbf8f0; }
.duel-side:active { transform: translateY(1px); }
.duel-name { font: 800 15.5px 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: #fffaf0; }
.duel-price.flaps { --ff: 62px; }
.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(--amber); }

/* the thermometer on the wall under the two sides */
.heat { margin-top: 10px; }
.heat svg { display: block; width: 100%; height: auto; }
.th-col { transition: transform 1.4s cubic-bezier(.25, .9, .3, 1); }
.th-clip { transition: transform .6s cubic-bezier(.25, .9, .3, 1); }
@media (prefers-reduced-motion: reduce) { .th-col, .th-clip { transition: none; } }
.heat.wait { width: min(460px, 82vw); margin: 0 0 18px; }
.heat.wait .th-col { 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 40px var(--display); }
.meter { height: 7px; border-radius: 4px; background: var(--ink-2); } .meter i { background: var(--fg); border-radius: 4px; }

/* the ticket */
.ticket { background: var(--paper); border-left: var(--edge); }
.cta-bar { background: linear-gradient(rgba(247, 243, 232, 0), var(--paper) 24%); }
.side-pick { gap: 8px; border: 0; }
.side-pick button { border: var(--edge); border-radius: var(--r); padding: 10px 12px; background: #fbf9f2; }
.side-pick button span { font: 800 14px var(--sans); }
.side-pick button small { font: 800 23px var(--display); font-variant-numeric: lining-nums tabular-nums; }
.side-pick .a[aria-pressed="true"] { background: var(--a); color: #fffaf0; }
.side-pick .b[aria-pressed="true"] { background: var(--b); color: #fffaf0; }
.tboard { gap: 10px; padding: 16px 18px; border: var(--edge); border-radius: var(--r); background: var(--wall); }
.tboard span { font: 600 13px var(--sans); color: var(--muted); }
.tboard .flaps { --ff: 34px; }
.tboard .flaps.am > b, .flaps.am > b { color: var(--fg); }
#tk-margin { font: 800 32px 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 18px var(--display); background: #fbf9f2; }
.quick button:hover { border-color: var(--fg); background: var(--paper); }
.lev-head output { font: 900 46px/1 var(--display); letter-spacing: 0; color: var(--fg); }
/* the leverage slider is a small thermometer: red spirit up to your leverage, the thumb is its bulb */
#tk-lev::-webkit-slider-runnable-track { height: 12px; border-radius: 6px; border: 2px solid var(--line); background: linear-gradient(#e2443a, #b8251d) 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, #fbf9f2; }
#tk-lev::-moz-range-track { height: 12px; border-radius: 6px; border: 2px solid var(--line); background: linear-gradient(#e2443a, #b8251d) 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, #fbf9f2; }
#tk-lev::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -9px; background: radial-gradient(circle at 38% 32%, #ffb3aa 0, #e5463b 32%, #b8251d 72%, #7e1712); border: 2px solid var(--line); border-radius: 50%; box-shadow: 0 2px 0 var(--line), inset 0 0 0 2px #fbf9f2; clip-path: none; }
#tk-lev::-moz-range-thumb { width: 22px; height: 22px; background: radial-gradient(circle at 38% 32%, #ffb3aa 0, #e5463b 32%, #b8251d 72%, #7e1712); border: 2px solid var(--line); border-radius: 50%; box-shadow: 0 2px 0 var(--line), inset 0 0 0 2px #fbf9f2; clip-path: none; }
.lev-ticks { font: 800 15px var(--display); } .lev-ticks span.off { color: var(--ink-3); }
.rw-track { height: 7px; border-radius: 4px; } .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(58px, 8.5vw, 120px)/.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: 28px; margin-bottom: 10px; }
.empty-state .flaps > b { color: var(--dim); }
.empty-state b { font: 800 28px 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 54px/1 var(--display); }
.addr { border: 1.5px solid var(--ink-3); border-radius: var(--r); background: #fbf9f2; font-family: var(--addr); font-size: 12px; }
.pick { border: var(--edge); border-radius: 10px; box-shadow: 0 0 0 6px var(--steel), 0 0 0 8px var(--line), 0 24px 40px -18px rgba(59, 47, 34, .6); background: var(--paper); }
.pick::backdrop { background: rgba(19, 32, 43, .42); }
.pick-item { font: 700 18px/1.2 var(--sans); border-radius: var(--r); }
.pick-item:hover, .pick-item:focus-visible { background: var(--wall); color: var(--fg); box-shadow: inset 4px 0 0 var(--a); }
.toast { background: var(--ink); color: var(--paper); border-left: 6px solid var(--a); border-radius: var(--r); font: 600 15.5px var(--sans); }

/* loading: the spirit rises as the books come in */
.stage-empty .flaps { display: none; }
.stage-empty p:first-of-type { font: 800 27px 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: 4px; }

/* 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: 800 22px var(--display); color: var(--fg); box-shadow: inset 0 -5px 0 var(--amber); }
.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 { background: var(--paper); box-shadow: none; border-bottom: 5px solid; border-image: var(--ramp) 1; }
  .tabs a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--fg); }
  .logo { font-size: 30px; } .logo .mark { width: 30px; height: 30px; }
  .duel-price.flaps { --ff: 36px; }
  .bal strong { font-size: 19px; } .bal span { font-size: 10.5px; }
  .acct .btn, .seg button { padding-left: 10px; padding-right: 10px; }
  .duel-side { padding: 13px 14px; }
  .heat { margin-top: 6px; margin-left: -6px; margin-right: -6px; }
  h1 { font-size: 30px; }
}

/* the base layout sets labels in spaced capitals; Heatz 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; } }

/* 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; } }
