/* Calls
   The corner of a clay court where the call is made: a dark green windscreen, terracotta clay, the white line, a tall
   umpire's chair, a hand-hung scoreboard and an optic yellow ball. The page sits on the warm white of fresh line paint;
   the top bar is the windscreen with the clay and the white line along its foot; the ticket's board is the scoreboard.
   Everything you press to act (the main buttons, connect) is the felt of a tennis ball with its white seam; your
   leverage and the active marks are clay. Headlines, prices and big figures are set in Patua One (the painted plates),
   everything you read or press in Anek Latin, addresses in B612 Mono. Yes is IN (green), No is OUT (red).
   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: #f3efe6; --ink-1: #e9e3d7; --ink-2: #d9d1c1; --ink-3: #aba392;
  --paper: #fdfbf6;
  --line: #13261d; --line-soft: #e2dccf; --ink: #13261d;
  --fg: #13261d; --muted: #56605a; --dim: #8a908a;
  --a: #1f7a4a; --a-soft: rgba(31, 122, 74, .1);
  --b: #c8322f; --b-soft: rgba(200, 50, 47, .1);
  --lev: #b8552d; --lev-soft: rgba(184, 85, 45, .1);
  --up: #1f7a4a; --down: #c8322f; --down-soft: rgba(200, 50, 47, .08);
  --wind: #1d4232; --wind-dk: #122d21; --clay: #c8663d; --clay-dk: #9e4723; --chalk: #fbf8ef; --cream: #efe9d6;
  --felt: #d4e636; --felt-lt: #f2ff9a; --felt-dk: #a6b51b; --felt-edge: #4d5708;
  --display: "Patua One", Rockwell, Georgia, serif;
  --sans: "Anek Latin", "Helvetica Neue", Arial, sans-serif;
  --mono: "Anek Latin", "Helvetica Neue", Arial, sans-serif; /* the base layout sets small labels in --mono; Calls uses its sans */
  --addr: "B612 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(19, 38, 29, .05), 0 18px 30px -22px rgba(19, 38, 29, .55);
  --r: 4px;
  --seam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 80'%3E%3Cpath d='M8 -6C44 16 44 64 8 86' fill='none' stroke='%23fbfdf0' stroke-width='5' stroke-linecap='round' opacity='.9'/%3E%3C/svg%3E");
  --felt-face: radial-gradient(130% 170% at 28% 0, var(--felt-lt) 0%, #dcee48 38%, var(--felt) 58%, var(--felt-dk) 100%);
  color-scheme: light;
}
/* fresh line paint: a warm white with a fine grain and a breath of clay dust at the foot */
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='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .09 0 0 0 0 .07 .5 0 0 0 -.3'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)' opacity='.45'/%3E%3C/svg%3E"), radial-gradient(140% 70% at 10% 100%, #f1e3d3, #f3efe6 55%, #f6f3ec); 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: #e8f08e; color: var(--fg); }

/* type: Patua One has one weight, so nothing set in it is made bolder */
h2, h3, .h { font: 700 15px/1.2 var(--sans); letter-spacing: 0; color: var(--fg); text-transform: none; }
h1 { font: 400 clamp(27px, 2.5vw, 38px)/1.12 var(--display); letter-spacing: -.005em; text-transform: none; }
.num, .sum-stats dd, .pos-grid dd, .tbl td.r, .kv dd { font-family: var(--sans); font-weight: 700; 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 hung number plates: a short drop on the nail and a settle */
.flaps { gap: 0; }
.flaps > b { width: auto; height: auto; min-width: 0; background: none; border-radius: 0; color: inherit; font: 400 var(--ff, 22px)/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.flaps > b.sp { width: .26em; } .flaps > b.pt { width: auto; }
.flaps > b.flip { animation: hung .4s cubic-bezier(.3, 1.5, .5, 1); transform-origin: 50% 0; }
@keyframes hung { 0% { opacity: .15; transform: translateY(-.12em) rotate(4deg); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .flaps > b.flip { animation: none; } }

/* top bar: the windscreen (dark green canvas with its weave) with the clay and the white line along its foot */
.top { background: repeating-linear-gradient(0deg, rgba(10, 30, 21, .22) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, rgba(10, 30, 21, .18) 0 1px, transparent 1px 4px), linear-gradient(#24503c, var(--wind) 55%, #183929); border-bottom: 0; box-shadow: none; color: var(--chalk); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; pointer-events: none; background: linear-gradient(transparent 0 2px, var(--chalk) 2px 5px, transparent 5px), linear-gradient(#cf7046, var(--clay) 50%, #ad4f29); box-shadow: 0 6px 10px -6px rgba(60, 26, 10, .5); }
main { padding-top: 8px; }
.logo { gap: 11px; padding-right: 24px; font: 400 31px/1 var(--display); letter-spacing: 0; color: var(--chalk); }
.logo .mark { width: 40px; height: 40px; border-radius: 9px; box-shadow: 0 0 0 1.5px rgba(251, 248, 239, .22); }
.tabs { gap: 2px; border-left: 1px solid rgba(239, 233, 214, .16); }
.tabs a { border-radius: 0; padding: 0 15px; font: 700 15.5px var(--sans); color: rgba(239, 233, 214, .72); border-right: 1px solid rgba(239, 233, 214, .1); }
.tabs a:hover { background: rgba(239, 233, 214, .08); color: var(--chalk); }
.tabs a[aria-current="page"] { color: var(--chalk); background: transparent; box-shadow: inset 0 -4px 0 var(--felt); }
.tabs b { font: 700 13px var(--sans); color: var(--felt); }
.bal { border-left: 1px solid rgba(239, 233, 214, .2); }
.bal span { font: 700 12px var(--sans); color: rgba(239, 233, 214, .7); }
.bal strong { font: 400 23px var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0; color: var(--chalk); }
.net { color: rgba(239, 233, 214, .7); }
.top .seg { background: rgba(8, 24, 17, .35); border: 1px solid rgba(239, 233, 214, .35); }
.top .seg button { color: rgba(239, 233, 214, .8); }
.top .seg button[aria-pressed="true"] { background: var(--chalk); color: var(--fg); box-shadow: none; }
.top .btn.ghost { background: transparent; color: var(--chalk); border-color: rgba(239, 233, 214, .45); }
.top .btn.ghost:hover:not(:disabled) { background: rgba(239, 233, 214, .1); color: var(--chalk); }

/* controls: line-white paper with an ink edge; the main buttons are the felt of a tennis ball with its seam */
.btn { border: var(--edge); border-radius: var(--r); font: 700 15px 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: #fffefa; color: var(--fg); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 -1px 0 var(--ink-2); }
.btn.primary { background: var(--seam) right -14px center / auto 150% no-repeat, var(--felt-face); color: var(--fg); border-color: var(--felt-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 230, .9), inset 0 -2px 0 rgba(77, 87, 8, .4); }
.btn.primary:hover:not(:disabled) { background: var(--seam) right -14px center / auto 150% no-repeat, radial-gradient(130% 170% at 28% 0, #f8ffb4 0%, #e3f455 40%, #d8ea3c 60%, #adbc20 100%); color: var(--fg); }
.btn.cta { border: 1.5px solid var(--felt-edge); border-radius: var(--r); min-height: 60px; font: 400 25px/1 var(--display); letter-spacing: 0; color: var(--fg);
  background: var(--seam) right -26px center / auto 190% no-repeat, var(--seam) left -26px center / auto 190% no-repeat, var(--felt-face);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 230, .95), inset 0 -4px 0 rgba(77, 87, 8, .38), 0 3px 0 var(--felt-edge), 0 10px 18px -10px rgba(40, 46, 4, .7); }
.btn.cta:hover:not(:disabled) { background: var(--seam) right -26px center / auto 190% no-repeat, var(--seam) left -26px center / auto 190% no-repeat, radial-gradient(130% 170% at 28% 0, #f8ffb4 0%, #e3f455 40%, #d8ea3c 60%, #adbc20 100%); color: var(--fg); }
.btn.cta:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1.5px 0 rgba(255, 255, 230, .95), inset 0 -2px 0 rgba(77, 87, 8, .38), 0 1px 0 var(--felt-edge); }
.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: 1px; }
.seg { border: var(--edge); border-radius: var(--r); padding: 2px; background: var(--paper); }
.seg button { border-radius: 2px; font: 700 13.5px var(--sans); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--chalk); box-shadow: inset 0 1px 0 #2f4a3d; }
input:not([type="range"]), select { background: #fffefa; 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(--clay); outline-offset: 1px; border-color: var(--fg); box-shadow: none; }
:focus-visible { outline-color: var(--clay); }
.chips button { font: 700 13.5px 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: var(--chalk); }

/* market list: the order of play */
.mk { border-right: var(--edge); background: var(--paper); }
.mk-head { border-bottom: var(--hair); }
.mk-row { border-bottom: var(--hair); }
.mk-row:hover { background: #f6f2ea; }
.mk-row[aria-current="true"] { background: #f0eadf; box-shadow: inset 4px 0 0 var(--clay); }
.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: 400 19px/1.15 var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.mk-px .pa { color: var(--a); } .mk-px .pb { color: var(--b); }
/* the bar under each market: IN green from the left, OUT red after it, split by a white line */
.mk-split { height: 4px; border-radius: 2px; background: var(--b); } .mk-split i { background: var(--a); border-radius: 2px 0 0 2px; box-shadow: 2px 0 0 var(--chalk); }
.thumb { border-radius: 3px; }
.thumb.tile { font-family: var(--display); font-weight: 400; border: var(--edge); }
.legal { color: var(--muted); font: 500 12.5px/1.55 var(--sans); }

/* the two sides: IN and OUT; the one you called 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: #fffefa; }
.duel-side:active { transform: translateY(1px); }
.duel-name { font: 700 16px 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: #0f3d24; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.duel-side.b[aria-pressed="true"] { background: var(--b); border-color: #6a1412; 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: var(--chalk); }
.duel-price.flaps { --ff: 54px; }
.duel-side .lev { font: 600 13px var(--sans); color: var(--muted); }
#st-cat { font: 700 13.5px var(--sans); color: var(--clay-dk); box-shadow: none; }

/* the court under the two sides */
.clz { margin-top: 14px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--wind-dk), var(--shadow); background: var(--wind); }
.clz svg { display: block; width: 100%; height: auto; }
.clz.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: 400 34px var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.meter { height: 6px; border-radius: 3px; background: var(--ink-2); } .meter i { background: var(--clay); border-radius: 3px; }

/* the ticket */
.ticket { background: var(--paper); border-left: var(--edge); }
.cta-bar { background: linear-gradient(rgba(253, 251, 246, 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 14.5px var(--sans); }
.side-pick button small { font: 400 23px var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.side-pick .a[aria-pressed="true"] { background: var(--a); border-color: #0f3d24; color: var(--chalk); }
.side-pick .b[aria-pressed="true"] { background: var(--b); border-color: #6a1412; color: var(--chalk); }
/* the ticket's board: a small scoreboard, dark green with a cream line inset, hung on two brackets */
.tboard { position: relative; gap: 10px; padding: 20px 18px 14px; border: 1.5px solid #07160f; border-radius: 3px;
  background: linear-gradient(#143628, #0d251b); box-shadow: inset 0 0 0 5px transparent, inset 0 0 0 6.3px rgba(239, 233, 214, .7), 0 10px 16px -10px rgba(7, 22, 15, .7); color: var(--cream); }
.tboard::before, .tboard::after { content: ""; position: absolute; top: -8px; width: 8px; height: 11px; background: #3b3f3a; }
.tboard::before { left: 18%; } .tboard::after { right: 18%; }
.tboard span { font: 700 13px var(--sans); color: rgba(239, 233, 214, .78); }
.tboard .flaps { --ff: 31px; }
.tboard .flaps > b { color: var(--chalk); }
.tboard .flaps.am > b { color: var(--felt); }
.flaps.am > b { color: var(--fg); }
#tk-margin { font: 400 29px var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.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: #fffefa; }
.lev-head output { font: 400 42px/1 var(--display); letter-spacing: 0; color: var(--lev); font-variant-numeric: tabular-nums; }
/* the leverage slider: clay up to your leverage; the thumb is a tennis ball */
#tk-lev::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; border: 1px solid var(--line); background: linear-gradient(#d47a4f, var(--clay) 55%, var(--clay-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, #fffefa; }
#tk-lev::-moz-range-track { height: 8px; border-radius: 4px; border: 1px solid var(--line); background: linear-gradient(#d47a4f, var(--clay) 55%, var(--clay-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, #fffefa; }
#tk-lev::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -10px; background: var(--seam) right -7px center / auto 120% no-repeat, radial-gradient(circle at 36% 30%, var(--felt-lt) 0, #dcee48 30%, var(--felt) 55%, #8f9c12 100%); border: 1.5px solid var(--felt-edge); border-radius: 50%; box-shadow: 2px 3px 3px rgba(19, 38, 29, .3); clip-path: none; }
#tk-lev::-moz-range-thumb { width: 22px; height: 22px; background: var(--seam) right -6px center / auto 120% no-repeat, radial-gradient(circle at 36% 30%, var(--felt-lt) 0, #dcee48 30%, var(--felt) 55%, #8f9c12 100%); border: 1.5px solid var(--felt-edge); border-radius: 50%; box-shadow: 2px 3px 3px rgba(19, 38, 29, .3); 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: 2px; }

/* account pages */
.summary { border-bottom: var(--edge); }
.sum-main span { font: 700 13px var(--sans); color: var(--muted); }
.sum-main strong { font: 400 clamp(50px, 7.4vw, 100px)/.95 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: 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; border-radius: 14px; }
.empty-state b { font: 400 28px var(--display); letter-spacing: 0; }
.tbl th { border-bottom: var(--edge); font: 700 12.5px var(--sans); color: var(--fg); }
.tbl td { border-bottom: var(--hair); }
.mid-num { font: 400 48px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.big-num { font-family: var(--display); font-weight: 400; font-variant-numeric: tabular-nums; }
.addr { border: 1px solid var(--ink-3); border-radius: var(--r); background: #fffefa; font-family: var(--addr); font-size: 12px; }
.pick { border: var(--edge); border-radius: 5px; box-shadow: 0 30px 60px -20px rgba(19, 38, 29, .55); background: var(--paper); }
.pick::backdrop { background: rgba(19, 38, 29, .45); }
.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(--clay); }
.toast { background: var(--wind); color: var(--chalk); border-left: 5px solid var(--felt); border-radius: var(--r); font: 600 15.5px var(--sans); }

/* loading: the ball rolls along the line as the books come in */
.stage-empty .flaps { display: none; }
.stage-empty p:first-of-type { font: 400 26px var(--display); color: var(--fg); letter-spacing: 0; }
.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(--clay); }

/* the coin in the top bar */
.coin > * { border-left: 1px solid rgba(239, 233, 214, .2); padding: 0 12px; }
.coin-tk { font: 400 21px var(--display); color: var(--chalk); letter-spacing: 0; box-shadow: inset 0 -4px 0 rgba(212, 230, 54, .55); }
.coin-ca { font: 400 12px var(--addr); color: rgba(239, 233, 214, .75); }
.coin-ca:hover, .coin-pump:hover { background: rgba(239, 233, 214, .1); color: var(--chalk); }
.coin-pump { font: 700 13px var(--sans); color: rgba(239, 233, 214, .75); }

@media (max-width: 760px) {
  .coin { border-top: 1px solid rgba(239, 233, 214, .16); }
  .tabs a[aria-current="page"] { box-shadow: inset 0 -4px 0 var(--felt); }
  .logo { font-size: 27px; } .logo .mark { width: 34px; height: 34px; border-radius: 8px; }
  .duel-price.flaps { --ff: 28px; }
  .tabs a { padding: 12px 14px; }
  .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; }
  .clz { margin-top: 10px; }
  .clz.wait { width: 260px; }
  h1 { font-size: 25px; }
}

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