/* Vane
   A copper weather vane on the ridge of a slate roof, under an open sky. The arrow swings in a copper compass ring;
   where it points on the ring's front half is the price of Yes. The page is that sky on a clear day: a cool, pale
   blue-grey that warms toward the bottom, with panels of clean white like cloud, edged in slate ink. Headlines and big
   figures are set in a Clarendon (Besley), the face of old weather boards and almanacs; everything you read or press is
   a plain grotesque (Rethink Sans). Yes is pasture green, No is roof-brick red, copper is the only warm metal: it is
   the main button, the active tab and the leverage. The ticket's board is a slate tile with chalk-white figures.
   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: #e9eef0; --ink-1: #dfe6ea; --ink-2: #cdd7dd; --ink-3: #a7b4bd;
  --paper: #fafbfc;
  --line: #18222e; --line-soft: #d5dde2; --ink: #18222e;
  --fg: #18222e; --muted: #536170; --dim: #8a97a3;
  --a: #24703f; --a-soft: rgba(36, 112, 63, .1);
  --b: #c4472b; --b-soft: rgba(196, 71, 43, .1);
  --lev: #18222e; --lev-soft: rgba(24, 34, 46, .08);
  --up: #24703f; --down: #c4472b; --down-soft: rgba(196, 71, 43, .08);
  --copper: #b5602c; --copper-lt: #f2b47f; --copper-dk: #7a3c18; --cream: #fff4e6; --slate: #2b3440; --slate-lt: #46525f; --patina: #5fa494;
  --display: "Besley", "Clarendon", Georgia, serif;
  --sans: "Rethink Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Rethink Sans", "Helvetica Neue", Arial, sans-serif; /* the base layout sets small labels in --mono; Vane uses its grotesque */
  --addr: "Cousine", 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(24, 34, 46, .06), 0 18px 32px -22px rgba(24, 40, 60, .55);
  --r: 7px;
  color-scheme: light;
}
/* the page is the sky: cooler at the top, a fine grain over it */
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='.8' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .28 0 0 0 0 .34 0 0 0 .45 0'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23p)' opacity='.2'/%3E%3C/svg%3E"), linear-gradient(180deg, #dbe6ec 0, var(--ink-0) 520px); background-color: var(--ink-0); color: var(--fg); font: 450 15.5px/1.5 var(--sans); }
::selection { background: #f6d2b3; color: var(--fg); }

/* type: a Clarendon for headlines and big figures, the grotesque with even figures for everything else */
h2, h3, .h { font: 700 13.5px/1.2 var(--sans); letter-spacing: 0; color: var(--fg); text-transform: none; }
h1 { font: 700 clamp(28px, 2.6vw, 40px)/1.08 var(--display); letter-spacing: -.012em; text-transform: none; font-variant-numeric: lining-nums; }
.num, .sum-stats dd, .pos-grid dd, .tbl td.r, .kv dd { font-family: var(--sans); font-weight: 700; 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 figures that swing into place */
.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: lining-nums tabular-nums; letter-spacing: -.01em; }
.flaps > b.sp { width: .28em; } .flaps > b.pt { width: auto; }
.flaps > b.flip { animation: swing .55s cubic-bezier(.3, 1.5, .5, 1); transform-origin: 50% 0; }
@keyframes swing { 0% { transform: rotate(-7deg); opacity: .3; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .flaps > b.flip { animation: none; } }

/* top bar: cloud white over a single slate rule */
.top { background: var(--paper); border-bottom: var(--edge); box-shadow: none; }
.logo { gap: 10px; padding-right: 24px; font: 800 31px/1 var(--display); letter-spacing: -.02em; color: var(--fg); }
.logo .mark { width: 40px; height: 40px; }
.tabs { gap: 2px; }
.tabs a { border-radius: 0; padding: 0 14px; font: 650 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 -3px 0 var(--copper); }
.tabs b { font-family: var(--sans); font-weight: 700; color: var(--copper); }
.bal { border-left: var(--hair); }
.bal span { font: 600 12px var(--sans); color: var(--muted); }
.bal strong { font: 700 23px var(--display); font-variant-numeric: lining-nums tabular-nums; }
.net { color: var(--muted); }

/* controls: white plates with a slate edge; the main button is copper with cream lettering */
.btn { border: var(--edge); border-radius: var(--r); font: 650 14px 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: #fff; }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 -1px 0 var(--ink-2); }
.btn.primary { background: var(--slate); color: var(--cream); border-color: #0f151c; box-shadow: inset 0 1px 0 #5a6776, inset 0 -2px 0 #0f151c; }
.btn.primary:hover:not(:disabled) { background: #36414f; }
.btn.cta { border: 1.5px solid #5c2a0f; border-radius: var(--r); min-height: 60px; font: 700 24px/1 var(--display); letter-spacing: -.005em; color: var(--cream);
  background: linear-gradient(180deg, #dc8a50 0%, #c06a32 42%, #a2522a 100%); text-shadow: 0 1px 0 rgba(70, 30, 8, .45);
  box-shadow: inset 0 1px 0 rgba(255, 224, 192, .55), inset 0 -4px 0 rgba(60, 22, 4, .32), 0 2px 0 #5c2a0f; }
.btn.cta:hover:not(:disabled) { filter: none; background: linear-gradient(180deg, #e4955b 0%, #c97239 42%, #ab5a2f 100%); }
.btn.cta:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 224, 192, .45), inset 0 -2px 0 rgba(60, 22, 4, .32), 0 0 0 #5c2a0f; }
.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: 5px; font: 650 13px var(--sans); }
.seg button[aria-pressed="true"] { background: var(--slate); color: var(--cream); box-shadow: none; }
input:not([type="range"]), select { background: #fff; border: 1px solid var(--ink-3); border-radius: var(--r); font-family: var(--sans); font-weight: 550; }
input:not([type="range"]):hover, select:hover { border-color: var(--fg); }
input:not([type="range"]):focus-visible, select:focus-visible { outline: 2px solid var(--copper); outline-offset: 1px; border-color: var(--fg); box-shadow: none; }
:focus-visible { outline-color: var(--copper); }
.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(--slate); border-color: var(--slate); color: var(--cream); }

/* 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: #f1f5f7; }
.mk-row[aria-current="true"] { background: #fbf0e6; box-shadow: inset 4px 0 0 var(--copper); }
.mk-q { font: 600 15.5px/1.3 var(--sans); letter-spacing: -.005em; }
.mk-meta { font: 550 12.5px var(--sans); color: var(--muted); }
.mk-px { font: 700 18px/1.15 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.mk-px .pa { color: var(--a); } .mk-px .pb { color: var(--b); }
/* the bar under each market: Yes in green from the left, No in brick */
.mk-split { height: 5px; border-radius: 3px; background: var(--b); } .mk-split i { background: var(--a); border-radius: 3px 0 0 3px; box-shadow: 1.5px 0 0 var(--paper); }
.thumb { border-radius: 5px; }
.thumb.tile { font-family: var(--display); font-weight: 700; border: var(--edge); }
.legal { color: var(--muted); font: 450 12.5px/1.55 var(--sans); }

/* the two sides: two white 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 -3px 0 var(--ink-2); transition: background-color .18s, color .18s, transform .08s; }
.duel-side:hover { background: #fff; }
.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: #123d21; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.duel-side.b[aria-pressed="true"] { background: var(--b); border-color: #7a2814; 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: #fffaf4; }
.duel-price.flaps { --ff: 52px; }
.duel-side .lev { font: 600 12.5px var(--sans); color: var(--muted); }
#st-cat { font: 700 12.5px var(--sans); color: var(--copper-dk); box-shadow: none; }

/* the weather vane on its roof under the two sides */
.vnz { margin-top: 14px; border-radius: var(--r); overflow: hidden; box-shadow: 0 0 0 1px #b9c7d0, var(--shadow); background: #dfe8ec; }
.vnz svg { display: block; width: 100%; height: auto; }
.vnz.wait { width: 260px; 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: lining-nums tabular-nums; }
.meter { height: 6px; border-radius: 3px; background: var(--ink-2); } .meter i { background: var(--copper); border-radius: 3px; }

/* the ticket */
.ticket { background: var(--paper); border-left: var(--edge); }
.cta-bar { background: linear-gradient(rgba(250, 251, 252, 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: lining-nums tabular-nums; }
.side-pick .a[aria-pressed="true"] { background: var(--a); border-color: #123d21; color: #fffaf4; }
.side-pick .b[aria-pressed="true"] { background: var(--b); border-color: #7a2814; color: #fffaf4; }
/* the ticket's board is a slate tile, its figures chalk white */
.tboard { gap: 10px; padding: 14px 18px; border: 1px solid #0f151c; border-radius: 6px; background: linear-gradient(180deg, #4e5a68, var(--slate) 60%, #222a34); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 6px 12px -10px rgba(10, 16, 24, .8); }
.tboard span { font: 650 13px var(--sans); color: #c7d0d8; }
.tboard .flaps { --ff: 31px; }
.tboard .flaps > b, .tboard .flaps.am > b { color: #f6f2ea; }
.flaps.am > b { color: var(--fg); }
#tk-margin { font: 700 29px var(--display); font-variant-numeric: lining-nums tabular-nums; }
.quick { gap: 6px; border: 0; }
.quick button { border: 1px solid var(--ink-3); border-radius: var(--r); font: 700 16px var(--sans); font-variant-numeric: tabular-nums; background: var(--paper); }
.quick button:hover { border-color: var(--fg); background: #fff; }
.lev-head output { font: 800 42px/1 var(--display); letter-spacing: -.015em; color: var(--fg); font-variant-numeric: lining-nums; }
/* the leverage slider: a copper rod up to your leverage; the thumb is the vane's copper ball */
#tk-lev::-webkit-slider-runnable-track { height: 9px; border-radius: 5px; border: 1px solid var(--line); background: linear-gradient(#e39a62, var(--copper) 55%, var(--copper-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, #fff; }
#tk-lev::-moz-range-track { height: 9px; border-radius: 5px; border: 1px solid var(--line); background: linear-gradient(#e39a62, var(--copper) 55%, var(--copper-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, #fff; }
#tk-lev::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -8.5px; background: radial-gradient(circle at 36% 30%, #ffe0c0, #d98446 40%, #7a3c18 85%); border: 1.5px solid var(--line); border-radius: 50%; box-shadow: 0 2px 3px rgba(24, 34, 46, .35); clip-path: none; }
#tk-lev::-moz-range-thumb { width: 22px; height: 22px; background: radial-gradient(circle at 36% 30%, #ffe0c0, #d98446 40%, #7a3c18 85%); border: 1.5px solid var(--line); border-radius: 50%; box-shadow: 0 2px 3px rgba(24, 34, 46, .35); clip-path: none; }
.lev-ticks { font: 700 13.5px var(--sans); } .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: 3px; }

/* account pages */
.summary { border-bottom: var(--edge); }
.sum-main span { font: 650 13px var(--sans); color: var(--muted); }
.sum-main strong { font: 800 clamp(52px, 7.6vw, 104px)/.95 var(--display); letter-spacing: -.03em; font-variant-numeric: lining-nums 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); }
.tbl th { border-bottom: var(--edge); font: 650 12.5px var(--sans); color: var(--fg); }
.tbl td { border-bottom: var(--hair); }
.mid-num { font: 700 50px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.big-num { font-family: var(--display); font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.addr { border: 1px solid var(--ink-3); border-radius: var(--r); background: #fff; font-family: var(--addr); font-size: 12.5px; }
.pick { border: var(--edge); border-radius: 9px; box-shadow: 0 30px 60px -20px rgba(24, 40, 60, .55); background: var(--paper); }
.pick::backdrop { background: rgba(24, 34, 46, .42); }
.pick-item { font: 650 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(--copper); }
.toast { background: var(--slate); color: var(--cream); border-left: 5px solid var(--copper); border-radius: var(--r); font: 550 15.5px var(--sans); }

/* loading: the arrow swings over as the books come in */
.stage-empty .flaps { display: none; }
.stage-empty p:first-of-type { font: 700 25px 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: 3px; }

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

/* 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 -4px 0 var(--copper-lt); }
.coin-ca { font: 400 12.5px 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); }
  .tabs a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--copper); }
  .logo { font-size: 27px; } .logo .mark { width: 34px; height: 34px; }
  .duel-price.flaps { --ff: 30px; }
  .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; }
  .vnz { margin-top: 10px; }
  h1 { font-size: 26px; }
}

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

/* the main button reads as a sentence in the Clarendon, 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); }
