/* Hunch
   A detective's cork board in an office with old cream walls: index cards with a red top rule and pale blue lines,
   green and red yarn, pushpins, manila tags and masking tape, an oak frame. The page is that office: a warm cream
   ground, panels of index card, typewriter black for the ink and the edges, and the blue of a pushpin for everything
   you press and set (the main buttons, the active tab, your leverage, the slider). Headlines and big figures are set
   in Geologica, everything you read or press in Inclusive Sans, typed notes in Special Elite, addresses in Nova Mono.
   Yes is the green yarn, No the red yarn.
   The top bar is an index card on an oak edge; the ticket's board is an index card.
   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: #f1ece3; --ink-1: #e7e1d5; --ink-2: #d8d0c1; --ink-3: #aea492;
  --paper: #fbf8ef;
  --line: #1b1815; --line-soft: #e0d8c8; --ink: #1b1815;
  --fg: #1b1815; --muted: #5d564c; --dim: #8f877b;
  --a: #24703f; --a-soft: rgba(36, 112, 63, .1);
  --b: #c3272f; --b-soft: rgba(195, 39, 47, .1);
  --lev: #2b50c8; --lev-soft: rgba(43, 80, 200, .1);
  --up: #24703f; --down: #c3272f; --down-soft: rgba(195, 39, 47, .08);
  --pin: #2b50c8; --pin-lt: #7f98ec; --pin-dk: #183593;
  --cork: #c0915f; --oak: #6d4626; --rule-red: #d9767a; --rule-blue: #a9c1dc;
  --display: "Geologica", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inclusive Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Inclusive Sans", "Helvetica Neue", Arial, sans-serif; /* the base layout sets small labels in --mono; Hunch uses its sans */
  --type: "Special Elite", "Courier New", monospace;
  --addr: "Nova Mono", ui-monospace, Menlo, monospace; /* only wallet and contract addresses */
  --edge: 1.5px solid var(--line);
  --hair: 1px solid var(--line-soft);
  --shadow: 0 1px 0 rgba(27, 24, 21, .05), 0 18px 30px -22px rgba(60, 36, 16, .5);
  --r: 4px;
  color-scheme: light;
}
/* the office wall: warm cream, a little lighter under the desk lamp, with a fine grain */
body { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .08 0 0 0 0 .06 .55 0 0 0 -.3'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)' opacity='.5'/%3E%3C/svg%3E"), radial-gradient(120% 70% at 85% 0, #f8f4ec, #f1ece3 60%, #ebe4d8); background-attachment: scroll, fixed; background-color: var(--ink-0); color: var(--fg); font: 500 15.5px/1.5 var(--sans); }
.num, .flaps > b, .kv dd, .tbl td.r, output { font-variant-numeric: tabular-nums; }
::selection { background: #c9d4fa; color: var(--fg); }

/* type */
h2, h3, .h { font: 700 14.5px/1.2 var(--sans); letter-spacing: 0; color: var(--fg); text-transform: none; }
h1 { font: 700 clamp(27px, 2.5vw, 38px)/1.12 var(--display); letter-spacing: -.02em; text-transform: none; }
.num, .sum-stats dd, .pos-grid dd, .tbl td.r, .kv dd { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hint, .empty, .stage-empty, .empty-state p { font-family: var(--sans); color: var(--muted); }

/* the split-flap tiles become figures that are pinned up: a short drop and a tiny settle */
.flaps { gap: 0; }
.flaps > b { width: auto; height: auto; min-width: 0; background: none; border-radius: 0; color: inherit; font: 700 var(--ff, 22px)/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.flaps > b.sp { width: .26em; } .flaps > b.pt { width: auto; }
.flaps > b.flip { animation: pinned .42s cubic-bezier(.2, .8, .2, 1); }
@keyframes pinned { 0% { opacity: .2; transform: translateY(-.14em) rotate(-2deg); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .flaps > b.flip { animation: none; } }

/* top bar: an index card (red rule near the top, pale blue line near the foot) on an oak edge */
.top { background: linear-gradient(transparent 0 6px, var(--rule-red) 6px 7px, transparent 7px calc(100% - 13px), rgba(169, 193, 220, .7) calc(100% - 13px) calc(100% - 12px), transparent calc(100% - 12px)), #fcf9f1; border-bottom: 0; box-shadow: none; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px; pointer-events: none; background: linear-gradient(#8a5f37, var(--oak) 45%, #4a2e17); box-shadow: 0 6px 10px -6px rgba(60, 36, 16, .5); }
main { padding-top: 5px; }
.logo { gap: 10px; padding-right: 24px; font: 800 30px/1 var(--display); letter-spacing: -.035em; color: var(--fg); }
.logo .mark { width: 40px; height: 40px; }
.tabs { gap: 2px; }
.tabs a { border-radius: 0; padding: 0 14px; font: 700 15px var(--sans); color: var(--muted); }
.tabs a:hover { background: rgba(169, 193, 220, .2); color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--fg); background: transparent; box-shadow: inset 0 -3px 0 var(--pin); }
.tabs b { font-family: var(--display); font-weight: 800; color: var(--pin); }
.bal { border-left: 1px solid var(--ink-3); }
.bal span { font: 700 12px var(--sans); color: var(--muted); }
.bal strong { font: 700 22px var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.net { color: var(--muted); }

/* controls: card paper with an ink edge; the main buttons are the glossy blue plastic of a pushpin's head */
.btn { border: var(--edge); border-radius: var(--r); font: 700 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: #fffdf6; color: var(--fg); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 -1px 0 var(--ink-2); }
.btn.primary { background: linear-gradient(#4d70e0, var(--pin) 45%, #1f3fa6); color: #fbfaff; border-color: #0e1d52; box-shadow: inset 0 1px 0 #a9bbf6, inset 0 -2px 0 rgba(14, 29, 82, .55); text-shadow: 0 1px 0 rgba(14, 29, 82, .45); }
.btn.primary:hover:not(:disabled) { background: linear-gradient(#5a7be6, #3359d2 45%, #2546b0); color: #fff; }
.btn.cta { border: 1.5px solid #0e1d52; border-radius: var(--r); min-height: 60px; font: 700 23px/1 var(--display); letter-spacing: -.02em; color: #fbfaff;
  background: radial-gradient(120% 140% at 30% 0, #8aa2f0 0%, #3d62d8 32%, var(--pin) 55%, #1a3796 100%);
  box-shadow: inset 0 1.5px 0 rgba(220, 228, 255, .9), inset 0 0 0 3px rgba(14, 29, 82, .2), inset 0 -4px 0 rgba(14, 29, 82, .45), 0 3px 0 #0e1d52, 0 10px 18px -10px rgba(14, 29, 82, .7); text-shadow: 0 1px 0 rgba(14, 29, 82, .55); }
.btn.cta:hover:not(:disabled) { background: radial-gradient(120% 140% at 30% 0, #9db1f4 0%, #4a6de0 32%, #3359d2 55%, #1f3fa6 100%); color: #fff; }
.btn.cta:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1.5px 0 rgba(220, 228, 255, .9), inset 0 0 0 3px rgba(14, 29, 82, .2), inset 0 -2px 0 rgba(14, 29, 82, .45), 0 1px 0 #0e1d52; }
.btn.cta:disabled { background: var(--ink-2); color: var(--dim); border-color: var(--ink-3); box-shadow: none; text-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: 1px; }
.seg { border: var(--edge); border-radius: var(--r); padding: 2px; background: var(--paper); }
.seg button { border-radius: 2px; font: 700 13px var(--sans); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fbf8ef; box-shadow: inset 0 1px 0 #4d463d; }
input:not([type="range"]), select { background: #fffdf6; border: 1px solid var(--ink-3); border-radius: var(--r); font-family: var(--sans); font-weight: 700; }
input:not([type="range"]):hover, select:hover { border-color: var(--fg); }
input:not([type="range"]):focus-visible, select:focus-visible { outline: 2px solid var(--pin); outline-offset: 1px; border-color: var(--fg); box-shadow: none; }
:focus-visible { outline-color: var(--pin); }
.chips button { font: 700 13px var(--sans); border-radius: var(--r); border: 1px solid var(--ink-3); background: var(--paper); }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fbf8ef; }

/* market list: the case files */
.mk { border-right: var(--edge); background: var(--paper); }
.mk-head { border-bottom: var(--hair); }
.mk-row { border-bottom: var(--hair); }
.mk-row:hover { background: #f5f0e5; }
.mk-row[aria-current="true"] { background: #efe9dc; box-shadow: inset 4px 0 0 var(--pin); }
.mk-q { font: 600 15.5px/1.3 var(--sans); letter-spacing: 0; }
.mk-meta { font: 600 12.5px var(--sans); color: var(--muted); }
.mk-px { font: 700 18px/1.15 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.mk-px .pa { color: var(--a); } .mk-px .pb { color: var(--b); }
/* the bar under each market: green yarn from the left, red yarn after it */
.mk-split { height: 4px; border-radius: 2px; background: var(--b); } .mk-split i { background: var(--a); border-radius: 2px 0 0 2px; box-shadow: 1.5px 0 0 var(--paper); }
.thumb { border-radius: 3px; }
.thumb.tile { font-family: var(--display); font-weight: 700; border: var(--edge); }
.legal { color: var(--muted); font: 500 12.5px/1.55 var(--sans); }

/* the two sides: two index cards; the one you picked is filled in its yarn 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: #fffdf6; }
.duel-side:active { transform: translateY(1px); }
.duel-name { font: 700 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: #123a20; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.duel-side.b[aria-pressed="true"] { background: var(--b); border-color: #6a1015; box-shadow: inset 0 -3px 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: #fbf8ef; }
.duel-price.flaps { --ff: 52px; }
.duel-side .lev { font: 600 12.5px var(--sans); color: var(--muted); }
#st-cat { font: 700 13.5px var(--sans); color: var(--pin); box-shadow: none; }

/* the cork board under the two sides */
.hnz { margin-top: 14px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1.5px #3a2410, var(--shadow); background: #b4844f; }
.hnz svg { display: block; width: 100%; height: auto; }
.hnz.wait { width: 300px; margin: 0 0 22px; }

.chart-panel, .stage-row, .more { border-top: var(--hair); }
.panel { border-radius: var(--r); }
.room-num strong { font: 700 34px var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.meter { height: 6px; border-radius: 3px; background: var(--ink-2); } .meter i { background: var(--pin); border-radius: 3px; }

/* the ticket */
.ticket { background: var(--paper); border-left: var(--edge); }
.cta-bar { background: linear-gradient(rgba(251, 248, 239, 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: 700 14px var(--sans); }
.side-pick button small { font: 700 22px var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.side-pick .a[aria-pressed="true"] { background: var(--a); border-color: #123a20; color: #fbf8ef; }
.side-pick .b[aria-pressed="true"] { background: var(--b); border-color: #6a1015; color: #fbf8ef; }
/* the ticket's board: an index card with its red top rule and pale blue lines, a blue pushpin in the corner */
.tboard { position: relative; gap: 10px; padding: 20px 18px 13px; border: 1.5px solid var(--ink); border-radius: 2px;
  background: linear-gradient(transparent 0 11px, var(--rule-red) 11px 12px, transparent 12px), repeating-linear-gradient(transparent 0 23px, rgba(169, 193, 220, .55) 23px 24px), #fffcf3;
  box-shadow: 2px 4px 0 -1px rgba(60, 36, 16, .18), 0 8px 14px -10px rgba(60, 36, 16, .6); transform: rotate(-.4deg); }
.tboard::before { content: ""; position: absolute; right: 12px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #b9c9ff 0, var(--pin) 45%, #132666 100%); box-shadow: 2px 3px 3px rgba(42, 23, 8, .35); }
.tboard span { font: 700 13px var(--sans); color: var(--muted); }
.tboard .flaps { --ff: 30px; }
.tboard .flaps > b, .tboard .flaps.am > b { color: var(--fg); }
.tboard .flaps.am > b { color: var(--pin); }
.flaps.am > b { color: var(--fg); }
#tk-margin { font: 700 28px var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.quick { gap: 6px; border: 0; }
.quick button { border: 1px solid var(--ink-3); border-radius: var(--r); font: 700 16px var(--display); font-variant-numeric: tabular-nums; background: var(--paper); }
.quick button:hover { border-color: var(--fg); background: #fffdf6; }
.lev-head output { font: 700 40px/1 var(--display); letter-spacing: -.03em; color: var(--pin); font-variant-numeric: tabular-nums; }
/* the leverage slider: blue up to your leverage; the thumb is a pushpin head */
#tk-lev::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; border: 1px solid var(--line); background: linear-gradient(#5a7be6, var(--pin) 55%, var(--pin-dk)) 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, #fffdf6; }
#tk-lev::-moz-range-track { height: 8px; border-radius: 4px; border: 1px solid var(--line); background: linear-gradient(#5a7be6, var(--pin) 55%, var(--pin-dk)) 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, #fffdf6; }
#tk-lev::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -10px; background: radial-gradient(circle at 36% 30%, #d4defe 0, #6f8de8 22%, var(--pin) 50%, #132666 100%); border: 1.5px solid #0e1d52; border-radius: 50%; box-shadow: 2px 3px 3px rgba(42, 23, 8, .35); clip-path: none; }
#tk-lev::-moz-range-thumb { width: 22px; height: 22px; background: radial-gradient(circle at 36% 30%, #d4defe 0, #6f8de8 22%, var(--pin) 50%, #132666 100%); border: 1.5px solid #0e1d52; border-radius: 50%; box-shadow: 2px 3px 3px rgba(42, 23, 8, .35); clip-path: none; }
.lev-ticks { font: 700 13.5px var(--display); } .lev-ticks span.off { color: var(--ink-3); }
.rw-track { height: 6px; border-radius: 3px; } .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: 3px solid var(--down); background: var(--down-soft); border-radius: 2px; }

/* account pages */
.summary { border-bottom: var(--edge); }
.sum-main span { font: 700 13px var(--sans); color: var(--muted); }
.sum-main strong { font: 700 clamp(50px, 7.4vw, 100px)/.95 var(--display); letter-spacing: -.04em; 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: 700 12.5px var(--sans); }
.empty-state { border: 1.5px dashed var(--ink-3); border-radius: var(--r); background: var(--paper); }
.empty-state .es-mark { width: 64px; height: 64px; margin-bottom: 6px; }
.empty-state b { font: 700 27px var(--display); letter-spacing: -.02em; }
.tbl th { border-bottom: var(--edge); font: 700 12.5px var(--sans); color: var(--fg); }
.tbl td { border-bottom: var(--hair); }
.mid-num { font: 700 48px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.big-num { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }
.addr { border: 1px solid var(--ink-3); border-radius: var(--r); background: #fffdf6; font-family: var(--addr); font-size: 12.5px; }
.pick { border: var(--edge); border-radius: 5px; box-shadow: 0 30px 60px -20px rgba(27, 24, 21, .55); background: var(--paper); }
.pick::backdrop { background: rgba(27, 24, 21, .42); }
.pick-item { font: 700 18px/1.2 var(--sans); border-radius: var(--r); }
.pick-item:hover, .pick-item:focus-visible { background: var(--ink-0); color: var(--fg); box-shadow: inset 4px 0 0 var(--pin); }
.toast { background: var(--ink); color: #fbf8ef; border-left: 5px solid var(--pin-lt); border-radius: var(--r); font: 600 15.5px var(--sans); }

/* loading: the clues are tied to the Yes card one by one as the books come in */
.stage-empty .flaps { display: none; }
.stage-empty p:first-of-type { font: 700 25px var(--display); color: var(--fg); letter-spacing: -.02em; }
.stage-empty #load-count { font-family: var(--display); 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(--pin); }

/* the coin in the top bar */
.coin > * { border-left: 1px solid var(--ink-3); padding: 0 12px; }
.coin-tk { font: 800 20px var(--display); color: var(--fg); letter-spacing: -.02em; box-shadow: inset 0 -4px 0 rgba(43, 80, 200, .35); }
.coin-ca { font: 400 12.5px var(--addr); color: var(--muted); }
.coin-ca:hover, .coin-pump:hover { background: rgba(169, 193, 220, .22); color: var(--fg); }
.coin-pump { font: 700 13px var(--sans); color: var(--muted); }

@media (max-width: 760px) {
  .coin { border-top: var(--hair); }
  .tabs a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--pin); }
  .logo { font-size: 26px; } .logo .mark { width: 34px; height: 34px; }
  .duel-price.flaps { --ff: 27px; }
  .tabs a { padding: 12px 14px; }
  .bal strong { font-size: 18px; } .bal span { font-size: 10.5px; }
  .acct .btn, .seg button { padding-left: 10px; padding-right: 10px; }
  .duel-side { padding: 13px 14px; }
  .hnz { margin-top: 10px; }
  .hnz.wait { width: 260px; }
  h1 { font-size: 25px; }
}

/* the base layout sets labels in spaced capitals; Hunch 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; }
h1, .empty-state b, .stage-empty p:first-of-type { letter-spacing: -.02em; }
.btn.cta { letter-spacing: -.02em; }
.net, .stage-empty { font-family: var(--sans); font-weight: 700; }
.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 the 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; } }

/* the main button reads as a sentence, not spaced capitals; an error sits on solid paper so the ticket scrolling
   under the bar never shows through it */
.btn.cta { text-transform: none; }
.cta-bar .err { background: linear-gradient(var(--down-soft), var(--down-soft)), var(--paper); }
