/* Blackbench: a pit ledger on a night table.
   Two materials (felt, ledger paper), three faces (condensed display, news serif, plex mono),
   four inks (bone, ink, vermilion, brass). Everything else derives from these. */

@font-face { font-family: "Big Shoulders Display"; src: url("fonts/big-shoulders-display-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-var.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plex-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* materials */
  --felt: #0E241D;
  --felt-deep: #091813;
  --felt-raised: #143328;
  --felt-line: rgba(239, 232, 216, 0.14);
  --felt-line-strong: rgba(239, 232, 216, 0.28);
  --paper: #EFE8D8;
  --paper-shade: #E5DCC6;
  --paper-rule: #CDBF9F;
  --paper-rule-faint: rgba(120, 100, 60, 0.13);

  /* inks */
  --ink: #141614;
  --ink-2: #3A3C36;
  --ink-3: #66655A;
  --bone: #EFE8D8;
  --bone-2: #B9C0B1;
  --bone-3: #8C9A8D;
  --chip: #D2452C;
  --chip-ink: #A8341F;     /* vermilion dark enough for text on paper */
  --brass: #E2A93B;
  --brass-dim: #9C7A33;

  /* faces */
  --display: "Big Shoulders Display", "Oswald", "Arial Narrow", sans-serif-condensed, Impact, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", "Charter", Georgia, serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(20px, 3.2vw, 48px);
  --margin-rule: clamp(56px, 8vw, 132px);
  --max: 1320px;

  /* fractal noise; the felt nap and the paper tooth */
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --fibers: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.012 .35' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .36  0 0 0 0 .2  0 0 0 .16 0'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--felt-deep);
  color: var(--ink);
  font: 400 18px/1.5 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--brass); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- materials ---------- */

.felt {
  position: relative;
  color: var(--bone);
  background-color: var(--felt);
  background-image:
    var(--noise),
    radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, 0.05), transparent 60%),
    radial-gradient(140% 100% at 50% 120%, rgba(0, 0, 0, 0.45), transparent 60%);
  background-blend-mode: soft-light, normal, normal;
}
.felt--deep { background-color: var(--felt-deep); }

.paper {
  position: relative;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--fibers), var(--noise);
  background-blend-mode: multiply, soft-light;
}
/* the ledger: ruled paper with a left margin for section labels */
.ledger { position: relative; overflow-x: clip; }

.ledger--ruled {
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--paper-rule-faint) 31px 32px), var(--fibers), var(--noise);
  background-blend-mode: normal, multiply, soft-light;
}
.ledger-body { padding-left: calc(var(--margin-rule) + var(--gutter)); padding-right: var(--gutter); max-width: calc(var(--max) + var(--margin-rule)); }
.marginal {
  position: absolute;
  left: 0; width: var(--margin-rule);
  padding-right: 14px;
  text-align: right;
  font: 500 11px/1.35 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chip-ink);
}

/* ---------- type ---------- */

.kicker {
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.felt .kicker { color: var(--brass); }
.paper .kicker { color: var(--chip-ink); }
.display {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: 0.005em;
  margin: 0;
}
.h-section {
  font: 800 clamp(40px, 5.2vw, 76px)/0.9 var(--display);
  text-transform: uppercase;
  margin: 0;
}
.h-sub {
  font: 800 26px/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}
.lede { font-size: clamp(20px, 1.7vw, 24px); line-height: 1.38; max-width: 34em; }
.mono { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.felt .muted { color: var(--bone-3); }
em { font-style: italic; }
.prose p { margin: 0 0 1em; max-width: 38em; }
.prose code, code { font: 500 0.82em var(--mono); background: rgba(20, 22, 20, 0.06); padding: 0.05em 0.3em; }
.felt code { background: rgba(239, 232, 216, 0.08); }

/* ---------- chrome: tote ticker, header, footer ---------- */

.ticker {
  background: var(--ink);
  color: var(--bone-2);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--felt-line);
  overflow: hidden;
}
.ticker .wrap { display: flex; gap: 28px; align-items: center; height: 30px; white-space: nowrap; }
.ticker b { color: var(--brass); font-weight: 600; }
.ticker .tag-sample { color: var(--ink); background: var(--brass); padding: 4px 6px 3px; font-weight: 600; }

.site-header { border-bottom: 1px solid var(--felt-line); }
.site-header .wrap { display: flex; align-items: center; gap: 36px; height: 76px; }
.brand { display: flex; align-items: center; text-decoration: none; flex: none; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-2);
  text-decoration: none;
  padding: 10px 12px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--bone); }
.nav a[aria-current="page"] { color: var(--bone); border-bottom-color: var(--brass); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 13px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 16px 12px;
  border: 1.5px solid currentColor;
  color: var(--bone);
  background: transparent;
  cursor: pointer;
  transition: background-color 120ms, color 120ms;
}
.btn:hover { background: var(--bone); color: var(--ink); }
.btn--solid { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.btn--solid:hover { background: var(--bone); border-color: var(--bone); }
.paper .btn { color: var(--ink); }
.paper .btn:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { font-family: var(--mono); }

.btn-sponsor {
  background: var(--chip);
  border-color: var(--chip);
  color: var(--bone);
  position: relative;
}
.btn-sponsor::after { /* the chip's inlay: a dashed inner edge */
  content: ""; position: absolute; inset: 3px;
  border: 1px dashed rgba(239, 232, 216, 0.55);
  pointer-events: none;
}
.btn-sponsor svg { width: 13px; height: 13px; fill: currentColor; }
.btn-sponsor:hover { background: var(--bone); border-color: var(--bone); color: var(--chip-ink); }
.btn-sponsor:hover::after { border-color: rgba(168, 52, 31, 0.5); }

.site-footer { border-top: 1px solid var(--felt-line); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(260px, 1.3fr) 1fr 1fr auto; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.site-footer h2 { font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 16px; }
.site-footer a { color: var(--bone); text-decoration-color: var(--felt-line-strong); text-underline-offset: 3px; }
.site-footer a:hover { text-decoration-color: var(--brass); }
.site-footer p { margin: 14px 0 0; color: var(--bone-2); font-size: 16px; max-width: 24em; }
.footer-base { border-top: 1px solid var(--felt-line); }
.footer-base .wrap { display: flex; justify-content: space-between; gap: 24px; padding-top: 16px; padding-bottom: 20px; font: 500 11px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone-3); }

/* ---------- sample stamp ---------- */

.stamp {
  display: inline-block;
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chip-ink);
  border: 2px solid currentColor;
  outline: 1px solid currentColor;
  outline-offset: 2px;
  padding: 8px 10px 7px;
  transform: rotate(-4deg);
  mix-blend-mode: multiply;
  opacity: 0.9;
}
.felt .stamp { color: var(--brass); mix-blend-mode: normal; }

/* ---------- cards (the playing kind) ---------- */

.pc {
  --w: 44px;
  width: var(--w); height: calc(var(--w) * 1.4);
  background: var(--bone);
  border-radius: calc(var(--w) * 0.08);
  box-shadow: 0 1px 0 rgba(0,0,0,.25), 0 6px 14px -6px rgba(0,0,0,.6);
  color: var(--ink);
  position: relative;
  flex: none;
  display: inline-grid;
  font-family: var(--display);
  font-weight: 800;
}
.pc.red { color: var(--chip-ink); }
.pc .r { position: absolute; left: 9%; top: 3%; font-size: calc(var(--w) * 0.42); line-height: 1; }
.pc .s { position: absolute; left: 10%; top: 35%; width: calc(var(--w) * 0.22); height: calc(var(--w) * 0.22); fill: currentColor; }
.pc .pip { position: absolute; right: 9%; bottom: 8%; width: calc(var(--w) * 0.42); height: calc(var(--w) * 0.42); fill: currentColor; }
.pc.down {
  background-color: var(--chip);
  background-image: repeating-linear-gradient(45deg, rgba(239,232,216,.22) 0 2px, transparent 2px 7px), repeating-linear-gradient(-45deg, rgba(239,232,216,.22) 0 2px, transparent 2px 7px);
  box-shadow: inset 0 0 0 3px var(--bone), 0 6px 14px -6px rgba(0,0,0,.6);
}
.pc--xs { --w: 24px; box-shadow: 0 0 0 1px var(--paper-rule); }
.pc--xs .s { display: none; }
.pc--xs .pip { width: 9px; height: 9px; right: 3px; bottom: 3px; }
.pc--xs .r { font-size: 13px; left: 4px; top: 2px; }
.hand { display: flex; gap: 4px; }
.hand--fan .pc + .pc { margin-left: calc(var(--w, 44px) * -0.45); }

/* ---------- leaderboard (home) ---------- */

.page-head--compact { padding: 40px 0 28px; }
.page-head--compact .run-meta { margin-top: 28px; }
.h-page { font: 800 clamp(36px, 3.6vw, 52px)/0.95 var(--display); text-transform: uppercase; letter-spacing: 0.01em; margin: 14px 0 0; }
.head-desc { margin: 14px 0 0; font-size: 19px; line-height: 1.45; color: var(--bone-2); max-width: 44em; }
.section--board { padding-top: 44px; }

.board tr.grp th { border-bottom: 0; padding-bottom: 6px; color: var(--ink-3); }
.board tr.grp th span { display: inline-block; padding-bottom: 6px; }
.board tr.grp .sec-grp span { border-bottom: 1px solid var(--paper-rule); padding-left: 24px; }
.board td.sec { font: 400 13px/1 var(--mono); color: var(--ink-3); white-space: nowrap; }
.board th.sec { color: var(--ink-3); }
.board td.sec .meter { width: 72px; height: 4px; }
.board .score { font-size: 28px; }
.board .mid .tiny { display: block; }
.method-link { margin: 22px 0 0; font-size: 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: baseline; }
.method-link a { font: 600 13px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--chip-ink); text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 3px; white-space: nowrap; }

/* run: money by hand type, diverging from a centre zero */
.pnl-row { display: grid; grid-template-columns: minmax(0, 1fr) 240px 84px; gap: 18px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--paper-rule); }
.pnl-row .lab { font: 500 17px/1.2 var(--serif); }
.pnl-row .lab small { display: block; font: 400 11.5px/1.4 var(--mono); color: var(--ink-3); margin-top: 3px; letter-spacing: .03em; }
.pnl-row .v { font: 600 17px/1 var(--mono); text-align: right; }
.pnl-track { height: 14px; position: relative; }
.pnl-track::after { content: ""; position: absolute; left: 50%; top: -6px; bottom: -6px; width: 1.5px; background: var(--ink); }
.pnl-track i { position: absolute; top: 1px; bottom: 1px; }
.pnl-track i.pos { left: calc(50% + 2px); background: var(--ink-2); border-radius: 0 4px 4px 0; }
.pnl-track i.neg { right: calc(50% + 2px); background: var(--chip); border-radius: 4px 0 0 4px; }
.leak-total { grid-template-columns: minmax(0, 1fr) 84px; }
.figures .f.sec b { font-weight: 500; color: var(--ink-2); }
.figures .f.sec .v { font-size: 20px; color: var(--ink-2); }
.conv .refline { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 5 4; }


.page-head { padding: 56px 0 48px; }

.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board caption { text-align: left; padding: 0 0 18px; }
.board th { font: 500 11px/1.25 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 0 14px 12px; vertical-align: bottom; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.board th.r, .board td.r { text-align: right; }
.board th button { all: unset; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.board th button:hover { color: var(--ink); }
.board th button:focus-visible { outline: 2px solid var(--chip); outline-offset: 2px; }
.board th[aria-sort] button { color: var(--ink); }
.board th[aria-sort="descending"] button::after { content: "\2193"; }
.board th[aria-sort="ascending"] button::after { content: "\2191"; }
.board td { padding: 18px 14px; border-bottom: 1px solid var(--paper-rule); vertical-align: middle; }
.board tbody tr:not(.ref):not(.halted):hover { background: rgba(20,22,20,.035); }
.board .rk { font: 800 46px/0.8 var(--display); width: 1%; padding-right: 6px; }
.board tr:first-child .rk, .board .rk.lead { color: var(--chip-ink); }
.board .model a { font: 600 22px/1.1 var(--serif); text-decoration: none; }
.board .model a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.board .model small { display: block; font: 500 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.board .score { font: 600 26px/1 var(--mono); white-space: nowrap; }
.board .score small { font: 400 12px var(--mono); color: var(--ink-3); margin-left: 4px; }
.board .mid { font: 500 16px/1 var(--mono); white-space: nowrap; }
.board .tiny { font: 400 11px/1.4 var(--mono); color: var(--ink-3); display: block; margin-top: 6px; letter-spacing: .04em; }
.board tr.ref td { padding-top: 10px; padding-bottom: 10px; background: repeating-linear-gradient(-45deg, rgba(20,22,20,.035) 0 6px, transparent 6px 12px); }
.board tr.ref .model { font: italic 400 18px/1.2 var(--serif); }
.board tr.ref .model small { font-style: normal; }
.board tr.ref .rk { font: 500 11px/1 var(--mono); letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; }
.board tr.ref .score { font-size: 18px; color: var(--ink-2); }
.board tr.halted td { color: var(--ink-3); }
.board tr.halted .model a { text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: var(--chip-ink); color: var(--ink-3); }
.board .halt-note { font: 500 12px/1.35 var(--mono); color: var(--chip-ink); }

/* distance-from-book bar: zero at the right, loss grows left */
.gap { width: 170px; height: 18px; position: relative; }
.gap::after { content: ""; position: absolute; right: 0; top: -4px; bottom: -4px; width: 1.5px; background: var(--ink); }
.gap i { position: absolute; right: 2px; top: 5px; height: 8px; background: var(--chip); border-radius: 4px 0 0 4px; }
.gap .ci { position: absolute; top: 3px; height: 12px; border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); }
.gap .ci::before { content: ""; position: absolute; left: 0; right: 0; top: 5.5px; border-top: 1px solid var(--ink); }

.meter { width: 96px; height: 6px; background: rgba(20,22,20,.1); position: relative; margin-top: 8px; margin-left: auto; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 0 3px 3px 0; }
.meter--ceiling::after { content: ""; position: absolute; top: -3px; bottom: -3px; width: 1.5px; background: var(--chip); right: 0; }

.legend-row { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 20px; font: 400 12px/1.4 var(--mono); color: var(--ink-3); }
.legend-row span { display: inline-flex; align-items: center; gap: 8px; }
.sw { display: inline-block; width: 22px; height: 8px; background: var(--chip); border-radius: 4px 0 0 4px; }
.sw-ref { width: 22px; height: 12px; background: repeating-linear-gradient(-45deg, rgba(20,22,20,.22) 0 2px, transparent 2px 5px); border: 1px solid var(--paper-rule); }
.sw-ci { width: 16px; height: 10px; border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); position: relative; }
.sw-ci::before { content: ""; position: absolute; left: 0; right: 0; top: 4.5px; border-top: 1px solid var(--ink); }

.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.note { padding: 22px 26px 6px 0; border-right: 1px solid var(--paper-rule); }
.note + .note { padding-left: 26px; }
.note:last-child { border-right: 0; }
.note h3 { font: 600 20px/1.2 var(--serif); margin: 10px 0 8px; }
.note p { margin: 0 0 1em; color: var(--ink-2); font-size: 17px; }

/* ---------- run page ---------- */

.crumbs { font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--bone-3); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.crumbs a { color: var(--bone-2); text-decoration: none; border-bottom: 1px solid var(--felt-line-strong); }
.crumbs a:hover { color: var(--bone); }
.run-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; }
.run-head h1 { font-size: clamp(44px, 5vw, 76px); }
.run-head .vendor { font: 400 italic 22px/1.3 var(--serif); color: var(--bone-2); margin-top: 14px; }
.tote-score { border: 1px solid var(--felt-line-strong); background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 4px rgba(0,0,0,.25); padding: 18px 24px 20px; min-width: 330px; }
.tote-score .lbl { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--bone-3); display: flex; justify-content: space-between; }
.tote-score .val { font: 600 56px/1 var(--mono); color: var(--brass); letter-spacing: -0.04em; margin: 12px 0 6px; text-shadow: 0 0 24px rgba(226,169,59,.25); font-variant-numeric: tabular-nums; }
.tote-score .val small { font-size: 16px; letter-spacing: 0; color: var(--bone-2); text-shadow: none; margin-left: 8px; }
.tote-score .sub { font: 400 13px/1.4 var(--mono); color: var(--bone-2); }
.run-meta { display: grid; grid-template-columns: repeat(6, auto); justify-content: start; gap: 0; margin-top: 36px; border-top: 1px solid var(--felt-line-strong); }
.run-meta div { padding: 14px 32px 0 0; margin-right: 32px; border-right: 1px solid var(--felt-line); }
.run-meta div:last-child { border-right: 0; }
.run-meta dt { font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--bone-3); }
.run-meta dd { margin: 8px 0 0; font: 500 15px/1.2 var(--mono); }

.split2 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; }
.figures { border-top: 2px solid var(--ink); }
.figures .f { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--paper-rule); }
.figures .f b { font: 600 15px/1.3 var(--serif); }
.figures .f span.d { display: block; font: 400 14px/1.4 var(--serif); color: var(--ink-3); margin-top: 2px; }
.figures .f .v { font: 600 30px/1 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.figures .f .v small { font: 400 13px var(--mono); color: var(--ink-3); margin-left: 4px; }

.leak { border-top: 2px solid var(--ink); }
.leak-row { display: grid; grid-template-columns: minmax(0, 1fr) 240px 70px; gap: 18px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--paper-rule); position: relative; }
.leak-row .lab { font: 500 17px/1.2 var(--serif); }
.leak-row .lab small { display: block; font: 400 11.5px/1.4 var(--mono); color: var(--ink-3); margin-top: 3px; letter-spacing: .03em; }
.leak-row .track { height: 14px; position: relative; }
.leak-row .track::after { content: ""; position: absolute; right: 0; top: -6px; bottom: -6px; width: 1.5px; background: var(--ink); }
.leak-row .track i { position: absolute; right: 2px; top: 1px; bottom: 1px; background: var(--chip); border-radius: 4px 0 0 4px; }
.leak-row .v { font: 600 17px/1 var(--mono); text-align: right; }
.leak-total { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 18px; padding: 14px 0; border-bottom: 3px double var(--ink); font: 600 17px/1 var(--mono); }
.leak-total span:first-child { font: 600 17px var(--serif); }
.leak-total span:last-child { text-align: right; }

.chart-box { margin-top: 56px; }
.chart-title { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 14px; }
.chart-title p { margin: 0; font: 400 13px/1.4 var(--mono); color: var(--ink-3); }
.conv svg { width: 100%; height: auto; overflow: visible; }
.conv .grid line { stroke: var(--paper-rule); stroke-width: 1; }
.conv .zero { stroke: var(--ink); stroke-width: 1.5; }
.conv .band { fill: var(--chip); opacity: .16; }
.conv .line { fill: none; stroke: var(--chip-ink); stroke-width: 2; stroke-linejoin: round; }
.conv .pt { fill: var(--chip-ink); stroke: var(--paper); stroke-width: 2; }
.conv text { font: 400 11px var(--mono); fill: var(--ink-3); }
.conv .lbl-strong { fill: var(--ink); font-weight: 600; font-size: 12px; }
.conv .hit { fill: transparent; cursor: crosshair; }
.conv .cross { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }

/* strategy chart */
.strat-wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; align-items: start; }
.strat h3 { font: 800 22px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: baseline; }
.strat h3 small { font: 400 11px var(--mono); letter-spacing: .06em; color: var(--ink-3); text-transform: none; }
.strat table { border-collapse: separate; border-spacing: 2px; width: 100%; table-layout: fixed; }
.strat th { font: 600 11px/1 var(--mono); color: var(--ink-3); padding: 4px 0; text-align: center; }
.strat th.rh { text-align: right; padding-right: 6px; width: 38px; color: var(--ink); }
.strat td { height: 28px; text-align: center; font: 600 11px/1 var(--mono); color: var(--ink-2); background: color-mix(in oklab, var(--chip-ink) calc(var(--t) * 100%), #F6F1E6); border-radius: 1px; cursor: default; position: relative; }
.strat td.dark { color: var(--bone); }
.strat td:hover, .strat td:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; z-index: 1; }
.strat-legend { display: flex; align-items: center; gap: 14px; margin-top: 22px; font: 400 12px/1.4 var(--mono); color: var(--ink-3); flex-wrap: wrap; }
.strat-legend .ramp { display: flex; gap: 2px; }
.strat-legend .ramp i { width: 30px; height: 12px; display: block; background: color-mix(in oklab, var(--chip-ink) calc(var(--t) * 100%), #F6F1E6); }
.strat-legend .ticks { display: flex; gap: 2px; }
.strat-legend .ticks span { width: 30px; text-align: center; font-size: 10.5px; }
.keys { display: flex; gap: 16px; flex-wrap: wrap; }
.keys b { color: var(--ink); }

.tip {
  position: fixed; z-index: 50; pointer-events: none;
  background: var(--ink); color: var(--bone);
  font: 400 12px/1.5 var(--mono);
  padding: 10px 12px; min-width: 180px;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(4px); transition: opacity 80ms, transform 80ms;
}
.tip.on { opacity: 1; transform: none; }
.tip b { color: var(--brass); font-weight: 600; }
.tip .row { display: flex; justify-content: space-between; gap: 16px; }

/* hand log */
.log-tools { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); }
.seg button { all: unset; cursor: pointer; font: 600 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 10px 14px 9px; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg button:focus-visible { outline: 2px solid var(--chip); outline-offset: 2px; }
.seg .c { opacity: .6; margin-left: 6px; }
.log { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.log th { font: 500 10.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 0 10px 10px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.log th.r, .log td.r { text-align: right; }
.log td { padding: 12px 10px; border-bottom: 1px solid var(--paper-rule); vertical-align: top; font: 400 13px/1.45 var(--mono); }
.log td.rnd { color: var(--ink-3); white-space: nowrap; }
.log td.rnd b { color: var(--ink); font-weight: 600; display: block; }
.log .hand { gap: 3px; }
.log .dec { display: grid; gap: 6px; }
.log .dec + .dec { margin-top: 8px; padding-top: 8px; border-top: 1px dotted var(--paper-rule); }
.log .spot { position: static; display: block; font-weight: 600; color: var(--ink); }
.log .dist { color: var(--ink-3); }
.log .dist b { color: var(--ink); font-weight: 600; }
.log .act { display: inline-block; padding: 2px 6px 1px; border: 1px solid var(--ink); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.log .act.miss { border-color: var(--chip-ink); color: var(--chip-ink); background: rgba(210,69,44,.08); }
.log .act.bad { border-style: dashed; border-color: var(--chip-ink); color: var(--chip-ink); }
.log .vs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.log .vs .eq { color: var(--ink-3); font-size: 11px; }
.log .why { color: var(--chip-ink); font-size: 12px; }
.log .note-i { font: italic 400 14px/1.35 var(--serif); color: var(--ink-3); display: block; margin-top: 6px; }
.log td.net { font-weight: 600; font-size: 15px; white-space: nowrap; }
.log td.net.neg { color: var(--chip-ink); }
.log td.out { text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; white-space: nowrap; }
.log tr[hidden] { display: none; }
.log .flagcell { width: 4px; padding: 0; }
.log tr.flag-deviation .flagcell, .log tr.flag-invalid .flagcell { background: var(--chip); }
.log tr.flag-invalid .flagcell { background: repeating-linear-gradient(0deg, var(--chip) 0 4px, transparent 4px 7px); }
.log .subhands { display: grid; gap: 4px; margin-top: 6px; color: var(--ink-3); font-size: 12px; }
.log .subhands div { display: flex; gap: 8px; align-items: center; }

.invalid-table { width: 100%; border-collapse: collapse; font: 400 14px/1.4 var(--mono); }
.invalid-table th { font: 500 10.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 0 10px 10px 0; border-bottom: 2px solid var(--ink); }
.invalid-table td { padding: 11px 10px 11px 0; border-bottom: 1px solid var(--paper-rule); }
.invalid-table td.r, .invalid-table th.r { text-align: right; }
.invalid-table tfoot td { border-bottom: 3px double var(--ink); font-weight: 600; }

.method { columns: 2 340px; column-gap: 56px; }
.method section { break-inside: avoid; margin-bottom: 26px; position: relative; }
.method h3 { font: 600 20px/1.2 var(--serif); margin: 0 0 6px; }
.method h3 .sec { font: 600 12px var(--mono); color: var(--chip-ink); margin-right: 10px; letter-spacing: .06em; }
.method p { margin: 0 0 .7em; color: var(--ink-2); font-size: 17px; }
.placeholder-note { border: 1.5px dashed var(--paper-rule); padding: 16px 18px; font: 400 13px/1.5 var(--mono); color: var(--ink-3); margin-top: 8px; }

.subsection { position: relative; padding-top: 72px; }
.subsection .marginal { top: 82px; left: calc(-1 * (var(--margin-rule) + var(--gutter))); }
.subsection > .h-sub, .subsection > header { margin-bottom: 22px; }
.subsection > header { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.subsection > header p { margin: 8px 0 0; color: var(--ink-3); font-size: 17px; max-width: 40em; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.section { padding-bottom: clamp(64px, 8vw, 104px); }
.m-only, .board .m-only { display: none; }
/* line breaks: keep short groups whole, balance headings and names */
.nw { white-space: nowrap; }
.h-page, .h-sub, .display, .method h3, .board .model a, .note h3 { text-wrap: balance; }
.board .model a { display: block; }
p { text-wrap: pretty; }
.crumbs > * { white-space: nowrap; }
.pnl-row .v, .leak-total .num { white-space: nowrap; }
.paper .leak-total { grid-template-columns: minmax(0, 1fr) auto; }
.invalid-none { margin: 0; padding: 14px 0; border-top: 2px solid var(--ink); border-bottom: 3px double var(--ink); font: 400 14px/1.5 var(--mono); color: var(--ink-2); }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .strat-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .run-meta { grid-template-columns: repeat(3, auto); row-gap: 14px; }
}
@media (max-width: 900px) {
  :root { --margin-rule: 0px; }
  .marginal { display: none; }
  .split2, .run-head { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr 1fr; }
  .note:nth-child(2) { border-right: 0; }
  .note:nth-child(3) { padding-left: 0; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .site-header .btn-sponsor { margin-left: auto; }
  .strat-wrap { grid-template-columns: 1fr; }
  .tote-score { min-width: 0; }
}
@media (max-width: 760px) {
  /* leaderboard: rank · model (+ diagnostics) · money (+ EV); nothing scrolls sideways */
  .board tr.grp, .board th:nth-child(4), .board th:nth-child(5), .board th.sec,
  .board td:nth-child(4), .board td:nth-child(5), .board td.sec { display: none; }
  .board .m-only { display: block; }
  .board th { padding: 0 8px 10px; }
  .board td { padding: 14px 8px; }
  .board th:first-child, .board td:first-child { padding-left: 0; }
  .board th:last-child, .board td:nth-child(3) { padding-right: 0; }
  .board .rk { font-size: 34px; }
  .board .model a { font-size: 19px; }
  .board .model small { display: none; }
  .board .m-diag { font: 400 11.5px/1.4 var(--mono); color: var(--ink-3); margin-top: 6px; }
  .board .score { font-size: 20px; }
  .board tr.ref .score { font-size: 16px; }
  .board .m-only.tiny { margin-top: 5px; }
  .legend-row { display: none; }

  /* hand log: one card per round */
  .log, .log tbody { display: block; }
  .log thead { display: none; }
  .log tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "rnd out net" "dealer dealer dealer" "hand hand hand" "dec dec dec"; column-gap: 14px; position: relative; padding: 12px 0 14px 14px; border-bottom: 1px solid var(--paper-rule); }
  .log td { border: 0; padding: 4px 0; }
  .log td.flagcell { position: absolute; left: 0; top: 12px; bottom: 14px; width: 4px; padding: 0; }
  .log td.rnd { grid-area: rnd; }
  .log td:nth-child(3) { grid-area: dealer; }
  .log td:nth-child(4) { grid-area: hand; }
  .log td:nth-child(5) { grid-area: dec; padding-top: 8px; }
  .log td.out { grid-area: out; align-self: center; }
  .log td.net { grid-area: net; align-self: center; }
  .log td:nth-child(3)::before, .log td:nth-child(4)::before { display: inline-block; width: 62px; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); vertical-align: middle; }
  .log td:nth-child(3)::before { content: "Dealer"; }
  .log td:nth-child(4)::before { content: "Model"; }
  .log .subhands { margin-left: 62px; }
  .log td:nth-child(3) > .hand, .log td:nth-child(4) > .hand { display: inline-flex; vertical-align: middle; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .stack .sep { display: none; }
  .stack .nw { display: block; }
  .tote-score .sub .sep { display: none; }
  .tote-score .sub .nw { display: block; }
  .chart-title { flex-direction: column; align-items: flex-start; gap: 6px; }
  .run-meta { grid-auto-flow: row dense; }
  .run-meta .wide { grid-column: span 2; }
  .tote-score .val { font-size: clamp(38px, 12vw, 56px); }
  .notes-grid { grid-template-columns: 1fr; }
  .note, .note + .note { padding-left: 0; border-right: 0; border-bottom: 1px solid var(--paper-rule); }
  .pnl-row { grid-template-columns: minmax(0, 1fr) 64px auto; gap: 14px; }
  .run-meta { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .run-meta div { padding: 10px 0 0; margin-right: 0; border-right: 0; }
  .run-meta dd { font-size: 14px; }
  .kicker .stamp { display: table; margin: 12px 0 4px !important; }
  .page-head--compact { padding-top: 28px; }
  .head-desc { font-size: 17px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .footer-base .wrap { flex-direction: column; }
  .leak-row { grid-template-columns: minmax(0, 1fr) 110px 56px; }
  .brand img { height: 32px; }
}

@media (max-width: 400px) {
  .board td { padding-left: 6px; padding-right: 6px; }
  .board .rk { font-size: 30px; }
  .board .model a { font-size: 17px; }
  .board .score { font-size: 17px; }
  .board tr.ref .score { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .ticker, .site-header nav, .btn-sponsor, .seg { display: none; }
  .felt { background: #fff; color: #000; }
}
