/* Fonts: self-hosted, SIL Open Font License 1.1 (licence texts in /fonts/) */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap; src: url("/fonts/instrument-sans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/geist-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Only the three letters of the name */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700; font-stretch: 100%; font-display: swap; src: url("/fonts/bricolage-n2h.woff2") format("woff2"); unicode-range: U+32, U+48, U+4E; }
:root { padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }

/* N2H site. Paper-light by default, flat dark by system setting. Purple marks only what is selected, amber marks one thing per view.
   Suit, won/lost, brand and position values follow app/src/app.css. */
:root {
  --bg: #faf9f7; --surface: #ffffff; --surface-2: #f4f2ef; --line: #e6e3de; --line-2: #d3cfc8;
  --text: #17151a; --muted: #5f5b66; --faint: #8b8792;
  --accent: #6c4c8f; --accent-wash: rgba(108, 76, 143, .10);
  --amber: #9c6300; --mark: #e08a00;
  --pos: #196d3b; --neg: #b42020;
  --p-ep: #b80012; --p-mp: #954b00; --p-co: #725f00; --p-btn: #006f1a; --p-sb: #006a73; --p-bb: #0050e1; --fold-a: .66;
  --btn: #17151a; --btn-t: #ffffff; --btn-h: #3a3541;
  --suit-s: #555555; --suit-h: #8e1717; --suit-d: #1453cf; --suit-c: #238b3f; --card-ink: #ffffff; --card-edge: rgba(0, 0, 0, .08);
  --shadow: 0 1px 2px rgba(23, 21, 26, .04), 0 28px 56px -28px rgba(23, 21, 26, .18);
  --tile: #2e1c41;
  --font-ui: "Instrument Sans", "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
  --font-head: var(--font-ui);
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --font-brand: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --h-weight: 600; --h-track: -.03em; --h-size: clamp(38px, 5.2vw, 64px); --h-lh: 1.02;
  --maxw: 1264px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111014; --surface: #18171c; --surface-2: #1f1e24; --line: #2a2830; --line-2: #3a3841;
    --text: #f1eff4; --muted: #a5a1ad; --faint: #75717e;
    --accent: #c3a6ea; --accent-wash: rgba(195, 166, 234, .14);
    --amber: #f2a33a; --mark: #f2a33a;
    --pos: #71d2a1; --neg: #f4a89f;
    --p-ep: #fab4b0; --p-mp: #fab87e; --p-co: #d9c839; --p-btn: #40e155; --p-sb: #3fd9e0; --p-bb: #abc7fa; --fold-a: .5;
    --btn: #f1eff4; --btn-t: #111014; --btn-h: #d6d2dd;
    --card-edge: rgba(255, 255, 255, .14);
    --shadow: none;
    --tile: #3a2554;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111014; --surface: #18171c; --surface-2: #1f1e24; --line: #2a2830; --line-2: #3a3841;
  --text: #f1eff4; --muted: #a5a1ad; --faint: #75717e;
  --accent: #c3a6ea; --accent-wash: rgba(195, 166, 234, .14);
  --amber: #f2a33a; --mark: #f2a33a;
  --pos: #71d2a1; --neg: #f4a89f;
  --p-ep: #fab4b0; --p-mp: #fab87e; --p-co: #d9c839; --p-btn: #40e155; --p-sb: #3fd9e0; --p-bb: #abc7fa; --fold-a: .5;
  --btn: #f1eff4; --btn-t: #111014; --btn-h: #d6d2dd;
  --card-edge: rgba(255, 255, 255, .14);
  --shadow: none;
  --tile: #3a2554;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 16px; line-height: 1.5; overflow-x: clip; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 760px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lab { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .01em; }
/* Positions: a position name and its step marks wear the same colour, as in the app */
.p-ep { --pc: var(--p-ep); } .p-mp { --pc: var(--p-mp); } .p-co { --pc: var(--p-co); } .p-btn { --pc: var(--p-btn); } .p-sb { --pc: var(--p-sb); } .p-bb { --pc: var(--p-bb); }
.pn { color: var(--pc, inherit); font-weight: 600; }


/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--btn); color: var(--btn-t); font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .14s; }
.btn:hover { background: var(--btn-h); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 14px; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; border-bottom: 1px solid transparent; background: var(--bg); transition: border-color .14s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.brand b { font-family: var(--font-brand); font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.brand span { color: var(--muted); font-size: 13px; }
.top nav { display: flex; align-items: center; gap: 20px; }
.top nav a.link { color: var(--muted); font-size: 14px; }
.top nav a.link:hover { color: var(--text); }
/* One black button at a time: the header's appears once the first one has scrolled away */
.top .btn-sm { opacity: 0; visibility: hidden; transition: opacity .14s, visibility 0s .14s, background .14s; }
.top.cta-out .btn-sm { opacity: 1; visibility: visible; transition: opacity .14s, background .14s; }

/* Hero */
.hero { padding-block: clamp(36px, 6vw, 76px) clamp(28px, 4vw, 48px); }
.hero-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 24px 64px; align-items: end; }
h1, h2 { font-family: var(--font-head); font-weight: var(--h-weight); letter-spacing: var(--h-track); text-wrap: balance; }
h1 { font-size: var(--h-size); line-height: var(--h-lh); }
.sub { max-width: 27em; color: var(--muted); font-size: clamp(16px, 1.4vw, 18px); line-height: 1.45; }
.sub b { color: var(--text); font-weight: 500; }
.cta { margin-top: 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cta small { color: var(--muted); }
/* Works now (text colour), then a hairline, then what is not there yet (muted). Screen readers get the one sentence in .sr */
.os { display: inline-flex; align-items: center; flex-wrap: wrap; row-gap: 2px; }
.os-now, .os-next { display: inline-flex; align-items: center; white-space: nowrap; }
.os-now { color: var(--text); }
.os-now::after { content: ""; flex: none; width: 1px; height: 11px; margin-inline: 10px; background: var(--line-2); }

/* Live demo */
.demo { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.demo:focus { outline: none; }
.demo-bar { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; overflow: hidden; font-size: 14px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--faint); white-space: nowrap; }
button.crumb { cursor: pointer; color: var(--muted); transition: background .14s, color .14s; }
button.crumb:hover { background: var(--surface-2); color: var(--text); }
.crumb.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.crumb .cds { --cw: 15px; --ch: 20px; }
.crumbs .sep { color: var(--faint); font-size: 12px; }
.demo-tag { flex: none; color: var(--muted); }
.demo-cap { display: none; margin: 8px 2px 0; text-align: right; color: var(--muted); font-size: 10.5px; }
.demo-body { padding: 24px; }
.view { min-height: 468px; }
.view[data-view="0"] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.view[data-view="2"] { display: grid; }
.view.enter { animation: enter .16s ease-out; }
@keyframes enter { from { opacity: 0; } }

/* Level 0: numbers. The clickable tiles come first; the totals are a caption over the graph. */
.l0-top { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 12px; min-height: 0; }
.figs { display: flex; align-items: baseline; gap: 6px 32px; flex-wrap: wrap; }
.fig { display: flex; align-items: baseline; gap: 8px; }
.fig b { font-size: 20px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fig.pos b { color: var(--pos); }
.fig span { color: var(--muted); }
.graph { position: relative; min-height: 220px; cursor: crosshair; touch-action: pan-y; }
.graph svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.graph .ln { fill: none; stroke: var(--text); stroke-width: 1.75; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.graph .zero { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 4; }
.g-x { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); pointer-events: none; }
.g-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); pointer-events: none; }
.g-tip { position: absolute; top: 2px; padding: 4px 8px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); font-size: 12px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.g-tip b { color: var(--pos); font-weight: 600; }
.g-tip b.neg { color: var(--neg); }
.tiles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin: 0 0 24px; }
.tile { position: relative; display: grid; gap: 3px; justify-items: start; align-content: start; min-height: 90px; padding: 13px 13px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); text-align: left; cursor: pointer; transition: border-color .14s, background .14s; }
.tile b { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); white-space: nowrap; }
.tile i { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; transition: color .14s; }
.tile::after { content: ""; position: absolute; top: 14px; right: 13px; width: 6px; height: 6px; border-top: 1.5px solid var(--faint); border-right: 1.5px solid var(--faint); transform: rotate(45deg); transition: border-color .14s; }
.tile:hover, .tile:focus-visible { border-color: var(--text); background: var(--surface); }
.tile:hover i, .tile:focus-visible i { color: var(--text); }
.tile:hover::after, .tile:focus-visible::after { border-color: var(--text); }
/* The one marked number: an amber dot and an amber hand count, until the first click */
.tile.hint i { color: var(--amber); }
.tile.hint::after { top: 13px; right: 12px; width: 7px; height: 7px; border: 0; border-radius: 50%; background: var(--mark); transform: none; animation: ping 2.4s ease-out .9s 3; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mark) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }

/* Cards: the app's four-colour tiles, rank only */
.cds { display: inline-flex; gap: 3px; vertical-align: middle; }
.cd { display: inline-grid; place-items: center; flex: none; width: var(--cw, 24px); height: var(--ch, 32px); border-radius: 5px; color: var(--card-ink); font-weight: 700; font-size: calc(var(--ch, 32px) * .46); line-height: 1; box-shadow: 0 0 0 1px var(--card-edge); }
.cd.s { background: var(--suit-s); } .cd.h { background: var(--suit-h); } .cd.d { background: var(--suit-d); } .cd.c { background: var(--suit-c); }
.cd.back { background: repeating-linear-gradient(45deg, var(--line-2) 0 3px, var(--surface-2) 3px 6px); }
.cd.slot { box-shadow: none; border: 1px dashed var(--line-2); }

/* Level 1: hands */
.l1-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 5px 0 12px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent-wash); font-size: 14px; font-variant-numeric: tabular-nums; }
.chip b { font-weight: 600; }
.chip button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
.chip button:hover { background: var(--surface); color: var(--text); }
.l1-head .count { color: var(--muted); font-size: 12px; }
.rows { margin-top: 14px; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 44px 54px 132px minmax(0, 1fr) 72px 10px; align-items: center; gap: 16px; width: 100%; min-height: 64px; padding: 6px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; transition: background .14s; animation: enter .18s ease-out backwards; animation-delay: calc(var(--i, 0) * 30ms); }
.row:hover, .row:focus-visible { background: var(--surface-2); }
.row .p { color: var(--muted); font-size: 12px; font-weight: 500; }
.row .cds { --cw: 22px; --ch: 30px; }
.row .bd, .row .line { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .net { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.row .net.pos { color: var(--pos); } .row .net.neg { color: var(--neg); }
.row .go { width: 6px; height: 6px; border-top: 1.5px solid var(--faint); border-right: 1.5px solid var(--faint); transform: rotate(45deg); transition: border-color .14s; }
.row:hover .go { border-color: var(--text); }
.more { padding: 14px 12px 0; color: var(--muted); font-size: 12px; }

/* Level 2: replay */
.rp { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 24px; }
/* One column that never grows with its content: a long row of step marks scrolls inside it instead */
.rp > div:first-child { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; min-width: 0; container: rp / inline-size; }
.tbl { position: relative; align-self: center; width: 100%; max-width: 800px; margin-inline: auto; aspect-ratio: 2.1 / 1; container-type: inline-size; }
.felt { position: absolute; inset: 21% 18% 24.5%; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); }
.seat { position: absolute; translate: -50% -50%; display: grid; justify-items: center; gap: 4px; }
.seat .cds { --cw: clamp(16px, 3.8cqw, 30px); --ch: clamp(22px, 5.1cqw, 40px); transition: opacity .16s; }
.seat .who { display: flex; gap: 6px; align-items: baseline; font-size: clamp(10px, 1.75cqw, 13px); white-space: nowrap; }
.seat .who b { font-family: var(--font-mono); font-size: .92em; font-weight: 600; color: var(--pc, var(--muted)); }
/* Hero: bold position and the app's short accent line under the seat */
.seat.me .who { position: relative; }
.seat.me .who b { font-weight: 700; }
.seat.me .who::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 22px; height: 2px; translate: -50%; border-radius: 1px; background: var(--accent); }
.seat .stk { color: var(--muted); font-variant-numeric: tabular-nums; }
/* Folded: the cards and the position colour fade, the stack stays readable */
.seat.fold .cds { opacity: .4; }
.seat.fold .who b { opacity: var(--fold-a); }
.seat.fold .stk { color: var(--faint); }
.seat.act .stk { color: var(--text); font-weight: 600; }
.seat.win .cds { border-radius: 7px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--mark); }
.seat.win .stk { color: var(--amber); font-weight: 600; }
.bet { position: absolute; translate: -50% -50%; display: flex; align-items: center; gap: 5px; font-size: clamp(10px, 1.7cqw, 12.5px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bet::before { content: ""; width: .7em; height: .7em; border-radius: 50%; background: var(--faint); }
.bet:empty { display: none; }
.board { position: absolute; left: 50%; top: 47%; translate: -50% -50%; display: flex; gap: clamp(3px, .6cqw, 5px); --cw: clamp(20px, 5cqw, 40px); --ch: clamp(27px, 6.8cqw, 54px); }
.board .cd.in { animation: deal .16s ease-out; }
@keyframes deal { from { opacity: 0; transform: translateY(-4px); } }
.pot { position: absolute; left: 50%; top: 61.5%; translate: -50% -50%; font-size: clamp(10px, 1.75cqw, 13px); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pot span { margin-right: 6px; color: var(--muted); font-family: var(--font-mono); font-size: .82em; letter-spacing: .06em; text-transform: uppercase; }
.now { margin-top: 8px; min-height: 24px; text-align: center; font-size: 15px; white-space: nowrap; }
.now em { font-style: normal; color: var(--muted); margin-right: 8px; }
.now b { font-weight: 600; font-variant-numeric: tabular-nums; }
.now b.pos { color: var(--pos); } .now b.neg { color: var(--neg); }
.now .cds { --cw: 16px; --ch: 22px; margin-left: 4px; }
.ctl { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ic { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); cursor: pointer; transition: border-color .14s; }
.ic:hover { border-color: var(--text); }
.ic.play { background: var(--btn); color: var(--btn-t); border-color: var(--btn); }
/* Step marks, as in the app's replayer: one mark per step, coloured by the seat that acted, shaped by the action.
   A hand that does not fit scrolls sideways and follows the current step, as in the app; --ml and --mr fade the side that has more. */
.tl { --ml: 0px; --mr: 0px; position: relative; flex: 1; display: flex; align-items: center; min-width: 0; margin-left: 8px; padding: 0 3px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--ml), #000 calc(100% - var(--mr)), transparent); mask-image: linear-gradient(to right, transparent, #000 var(--ml), #000 calc(100% - var(--mr)), transparent); }
.tl::-webkit-scrollbar { display: none; }
.st { position: relative; display: grid; gap: 3px; justify-items: start; flex: none; margin-right: 2px; padding: 3px 6px; border: 0; border-radius: 5px; background: none; color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; line-height: 1.1; text-align: left; cursor: pointer; }
.st:not(:first-child) { margin-left: 13px; }
.st:not(:first-child)::before { content: ""; position: absolute; left: -7px; top: 50%; height: 24px; translate: 0 -50%; border-left: 1px solid var(--line); }
.st:hover { background: var(--surface-2); }
.st.on { color: var(--text); box-shadow: inset 0 0 0 2px var(--accent); }
.st .sm { display: none; }
.mb { display: flex; gap: 2px; }
.mb i { width: 7px; height: 9px; border-radius: 1.5px; }
.mb .s { background: var(--suit-s); } .mb .h { background: var(--suit-h); } .mb .d { background: var(--suit-d); } .mb .c { background: var(--suit-c); }
.mk { --c: var(--pc, var(--muted)); position: relative; flex: none; display: grid; place-items: center; width: 20px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; }
.mk i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.mk.future, .st.future { opacity: .45; }
.mk-fold i { width: 8px; height: 8px; border: 1.5px solid var(--c); background: none; }
.mk-check i { width: 6px; height: 6px; }
.mk-bet i { width: 13px; height: 13px; }
.mk-raise i { width: 10px; height: 10px; box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--c); }
.mk-showdown i, .mk-collect i { width: 10px; height: 10px; border-radius: 2px; rotate: 45deg; background: var(--muted); }
.mk-collect i { background: var(--pos); }
.mk.hero::after { content: ""; position: absolute; left: 5px; right: 5px; bottom: 0; border-bottom: 2px dotted var(--text); }
.mk::before { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; translate: -50% -50%; border-radius: 50%; }
.mk:hover::before { box-shadow: 0 0 0 1px var(--muted); }
.mk.on::before { box-shadow: 0 0 0 2px var(--accent); }
/* Narrow player: the marks get their own row above the buttons, as in the app */
@container rp (max-width: 720px) {
  .ctl { flex-wrap: wrap; justify-content: center; gap: 4px 8px; margin-top: 8px; }
  .tl { order: -1; flex: 0 0 100%; margin-left: 0; }
  /* auto margins centre a short hand and give way when a long one overflows */
  .tl > :first-child { margin-left: auto; }
  .tl > :last-child { margin-right: auto; }
  .st { padding-block: 2px; }
}
/* Phones: a street name shrinks to its first letter so more of the hand shows at once */
@container rp (max-width: 560px) {
  .st { justify-items: center; min-width: 18px; margin-right: 1px; padding-inline: 3px; }
  .st:not(:first-child) { margin-left: 7px; }
  .st:not(:first-child)::before { left: -4px; }
  .st .lg { display: none; }
  .st .sm { display: block; }
  .mb { gap: 1.5px; }
  .mb i { width: 5px; height: 7px; border-radius: 1px; }
}
/* Narrowest phones: the last step drops its street word so the result stays on one line */
@container rp (max-width: 300px) {
  .now em.e { display: none; }
}
.log-wrap { position: relative; border-left: 1px solid var(--line); }
.log { position: absolute; inset: 0; overflow-y: auto; padding: 0 0 0 12px; font-size: 13px; scrollbar-width: thin; }
.log button { display: block; width: 100%; padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--muted); text-align: left; cursor: pointer; white-space: nowrap; }
.log button:hover { color: var(--text); }
.log button.h { margin-top: 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.log li:first-child button.h { margin-top: 0; }
.log button.cur { background: var(--accent-wash); color: var(--text); }
.log .cds { --cw: 14px; --ch: 19px; margin-left: 3px; }
.log .pn { color: inherit; font-weight: inherit; }
.log button.cur .pn { color: var(--pc); font-weight: 600; }

/* Strengths: cropped pieces of two screens and one plain statement. Not full screenshots */
.why { margin-top: clamp(64px, 8vw, 112px); }
.why > h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.08; }
.bento { margin-top: 28px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.c-ins { grid-column: span 7; }
.c-pool { grid-column: span 5; }
.c-fast { grid-column: 1 / -1; }
.card-t { padding: 20px 24px 24px; }
.card h3 { font-family: var(--font-head); font-weight: var(--h-weight); font-size: clamp(20px, 2vw, 26px); letter-spacing: -.02em; line-height: 1.12; text-wrap: balance; }
.card-t p { margin-top: 6px; max-width: 34em; color: var(--muted); font-size: 15px; line-height: 1.45; }
.frag { position: relative; flex: 1 1 auto; min-height: 216px; padding: 44px 24px 22px; display: flex; flex-direction: column; justify-content: center; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.smp { position: absolute; top: 14px; left: 24px; color: var(--muted); }
.frag-in { min-width: 0; }
.frag-ins, .frag-pool { padding-right: 0; --fade: 96px; }
.frag-ins .frag-in, .frag-pool .frag-in { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--fade)), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - var(--fade)), transparent); }
.wk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.wk-col { min-width: 0; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); white-space: nowrap; }
.wk-h { display: block; color: var(--muted); }
.wk-spot { margin-top: 10px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.wk-num { margin-top: 4px; display: flex; align-items: baseline; gap: 7px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wk-num span { color: var(--muted); font-size: 13px; }
.wk-num b { font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.wk-num .up { color: var(--text); font-size: 11px; transform: translateY(-3px); }
.wk-meta { margin-top: 10px; display: flex; align-items: center; gap: 10px; color: var(--muted); }
.lv { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.lv-clear { border-color: var(--text); color: var(--text); font-weight: 600; }
.lv-go { border-color: transparent; background: color-mix(in srgb, var(--pos) 13%, transparent); color: var(--pos); font-weight: 600; }
.wk-thin { margin-top: 12px; padding: 0 17px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.wk-thin .lv { color: var(--muted); border-color: var(--line-2); }

.sheet { display: grid; grid-template-columns: minmax(96px, 176px) 158px 76px 76px; gap: 4px 6px; align-items: center; font-variant-numeric: tabular-nums; }
.sh-h { padding: 0 10px 2px; color: var(--muted); text-align: right; white-space: nowrap; }
.sh-l { min-width: 0; color: var(--muted); font-size: 14px; line-height: 1.25; }
.sh-l.on { color: var(--text); font-weight: 500; }
.sh-c { padding: 0 10px; color: var(--muted); font-family: var(--font-mono); font-size: 15px; text-align: right; }
.sh-c.dim, .sh-l.dim { color: var(--faint); }
.sh-pick { position: relative; display: block; width: 100%; padding: 9px 10px 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; text-align: right; }
.sh-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sh-pick b { display: block; font-family: var(--font-mono); font-size: 24px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.sh-pick small { display: block; margin-top: 2px; color: var(--muted); font-family: var(--font-mono); font-size: 11.5px; white-space: nowrap; }
.sh-vd { font-family: var(--font-ui); opacity: 0; visibility: hidden; transform: translateX(-4px); transition: opacity .18s, transform .18s, visibility 0s .18s; }
.sh-pick.shown .sh-vd { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s; }

.fast { padding: clamp(24px, 3vw, 36px) 24px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 48px; align-items: center; }
.fast p { margin-top: 6px; max-width: 34em; color: var(--muted); font-size: 15px; line-height: 1.45; }
.fast-n { order: -1; text-align: left; }
.fast-n b { display: block; font-size: clamp(30px, 4vw, 52px); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.fast-n .lab { display: block; margin-top: 8px; color: var(--muted); }
.wk-num b, .sh-pick b, .sh-c, .fast-n b { font-family: var(--font-ui); letter-spacing: -.02em; }
.card-t p, .fast p { text-wrap: balance; }
@media (min-width: 901px) {
  .c-fast { display: grid; grid-template-columns: subgrid; align-items: center; }
  .fast { display: contents; }
  .fast-n { grid-column: span 7; padding: 32px 24px; }
  .fast > div:first-child { grid-column: span 5; padding: 32px 24px 32px 25px; }
}
.reads { margin-top: 36px; color: var(--muted); font-size: 15px; }
.beta-note { margin-top: 10px; color: var(--muted); }
.reads b { color: var(--text); font-weight: 500; }
.reads b, .reads .nb { white-space: nowrap; }
.reads-2 { margin-top: 4px; text-wrap: balance; }

/* Beta and footer */
.beta { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 24px 64px; align-items: end; scroll-margin-top: 96px; }
.beta-l { display: flex; align-items: center; gap: 20px; }
.app-ic { display: grid; place-items: center; flex: none; width: 84px; height: 84px; border-radius: 22%; background: var(--tile); }
.app-ic img { display: block; width: 76%; height: auto; }
.beta h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.05; }
.beta-l p { margin-top: 8px; color: var(--muted); }
.beta-l p + p { margin-top: 4px; }
.beta-l .beta-fact { color: var(--text); font-weight: 500; }
.beta form { display: flex; gap: 8px; }
.beta input { flex: 1; min-width: 0; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; transition: border-color .14s; }
.beta input::placeholder { color: var(--faint); }
.beta input:focus-visible { outline: none; border-color: var(--text); }
.beta .btn { min-height: 44px; padding: 0 20px; flex: none; }
.beta .done { min-height: 44px; display: flex; align-items: center; color: var(--pos); font-weight: 500; }
.foot { margin-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot .wrap { display: grid; gap: 14px; padding-block: 28px 40px; }
.foot-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.foot .brand { color: var(--text); white-space: normal; flex-wrap: wrap; }
.foot .brand b { font-size: 17px; }
.foot nav { display: flex; gap: 20px; }
.foot nav a:hover { color: var(--text); }

@media (max-width: 900px) {
  .hero-g, .beta { grid-template-columns: minmax(0, 1fr); }
  .c-ins, .c-pool { grid-column: 1 / -1; }
  .frag { min-height: 0; }
  .rp { grid-template-columns: minmax(0, 1fr); }
  .log-wrap { display: none; }
  .row { grid-template-columns: 40px 54px 132px minmax(0, 1fr) 64px; gap: 12px; }
  .row .go { display: none; }
}
@media (max-width: 720px) {
  .demo-body { padding: 12px; }
  .view { min-height: 372px; }
  .demo-bar { padding: 8px 10px; }
  .demo-tag { display: none; }
  .demo-cap { display: block; }
  .crumb { padding: 0 8px; }
  .figs { gap: 6px 24px; }
  .fig { display: block; }
  .fig b { display: block; font-size: 18px; }
  .fig span { display: block; margin-top: 2px; font-size: 10.5px; }
  .graph { min-height: 120px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 16px; }
  .tile { min-height: 0; padding: 10px 7px 9px; border-radius: 9px; }
  .tile b { font-size: 19px; }
  .tile span, .tile i { font-size: 10px; letter-spacing: 0; }
  .tile::after { top: 10px; right: 8px; width: 5px; height: 5px; }
  .tile.hint::after { top: 9px; right: 8px; width: 6px; height: 6px; }
  .row { grid-template-columns: 34px 46px 110px minmax(0, 1fr); gap: 10px; min-height: 48px; padding: 5px 6px; }
  .row .cds { --cw: 19px; --ch: 26px; }
  .row .line { display: none; }
  /* 254 table + 32 sentence + 42 marks + 44 buttons = the 372 the other two views have */
  .tbl { aspect-ratio: 5 / 4; max-height: 254px; }
  .ic { width: 44px; height: 44px; }
  .top nav a.link { display: none; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 520px) {
  .top .brand span { display: none; }
  .frag { padding: 40px 16px 18px; }
  .smp { left: 16px; }
  .card-t { padding: 16px 16px 20px; }
  .wk { grid-template-columns: max-content minmax(0, 1fr); gap: 8px; }
  .frag-ins, .frag-pool { padding-right: 0; --fade: 64px; }
  .wk-col { padding: 12px 12px 14px; }
  .wk-thin { padding: 0 13px; }
  .sheet { grid-template-columns: 158px 108px 60px; gap: 4px; }
  .sheet > .sh-0 { display: none; }
  .sh-l { grid-column: 1 / -1; margin-top: 8px; font-size: 13px; }
  .sh-h { padding-bottom: 0; padding-left: 0; }
  .fast { grid-template-columns: minmax(0, 1fr); padding: 20px 16px; }
  .fast-n { text-align: left; }
  .reads-2 { margin-top: 10px; }
  /* Phones: the header keeps the one button; the full-width 48px button is the form at the bottom */
  .top .btn-sm { opacity: 1; visibility: visible; }
  .cta { margin-top: 12px; }
  .cta .btn { display: none; }
  .beta-l { align-items: flex-start; }
  .app-ic { width: 64px; height: 64px; }
  .beta form { flex-direction: column; }
  .beta input, .beta .btn { min-height: 48px; }
  .beta .btn { font-size: 16px; }
}
@media (max-width: 420px) {
  /* Four tiles across leave no room for "8,530 hands": the marked tile gets an amber edge instead */
  .tile i { display: none; }
  .tile.hint { border-color: var(--mark); }
}
@media (max-width: 384px) {
  /* 360px phones: "C-Bet Flop" is 60px wide and the tile's inner width was 55px */
  .tile { padding-left: 4px; padding-right: 4px; }
  .tile::after, .tile.hint::after { right: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Beta form states ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.beta form { flex-wrap: wrap; }
.beta .err { order: 1; flex: 0 0 100%; padding-left: 19px; color: var(--neg); font-size: 14px; }
.beta input[aria-invalid="true"] { border-color: var(--neg); }
.beta .btn[disabled] { opacity: .6; cursor: default; }
.beta .done { flex-wrap: wrap; gap: 6px 18px; color: inherit; font-weight: 400; }
.beta .done:focus { outline: none; }
.done-t { color: var(--pos); font-weight: 500; }
.done-os { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.done-os button { min-height: 32px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; transition: background .14s, border-color .14s; }
.done-os button:hover { border-color: var(--text); }
.done-os button[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent); color: var(--text); }
.beta-priv { margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.beta .nb { white-space: nowrap; }
.beta-priv a { color: var(--text); }
.beta-r .beta-note { margin-top: 6px; letter-spacing: 0; }
.beta-priv a, .page a, .foot p a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--faint); }
.beta-priv a:hover, .page a:hover, .foot p a:hover { color: var(--text); text-decoration-color: currentColor; }
.ts { margin-top: 8px; }
.ts:empty { display: none; }

/* ---------- Questions after signing up (qs.js): one at a time, on the home page and on /q/ ---------- */
/* Heights are reserved (three rows of answers, the foot row), so nothing below moves from one question to the next. */
.done-mac, .qs, .qs-end { flex: 0 0 100%; min-width: 0; }
.done-mac { color: var(--muted); font-size: 15px; }
.done-t:focus, .done-mac:focus, .qs-q:focus, .page .lede:focus { outline: none; }
.qs { --qs-rows: 3; --qs-h: 40px; --qs-foot: 32px; margin-top: 8px; }
.qs-title { margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.qs-prog { display: flex; align-items: center; gap: 10px; height: 16px; }
.qs-bar { flex: 1; display: flex; gap: 4px; }
.qs-bar i { flex: 1; height: 3px; border-radius: 2px; background: var(--line-2); transition: background .14s; }
.qs-bar i.ok { background: var(--text); }
.qs-bar i.on { background: var(--accent); }
.qs-prog .lab { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qs .qs-q { margin: 14px 0 12px; min-height: 2.6em; font-family: var(--font-head); font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: 0; word-spacing: .06em; text-wrap: balance; }
.qs-step.enter { animation: enter .16s ease-out; }
.qs-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: var(--qs-h); gap: 8px; align-content: start;
  min-height: calc(var(--qs-rows) * var(--qs-h) + (var(--qs-rows) - 1) * 8px); }
.qs-opts[data-cols="1"] { grid-template-columns: minmax(0, 1fr); }
.qs-opts button { min-width: 0; padding: 3px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--text);
  font: inherit; font-size: 15px; line-height: 1.15; text-wrap: balance; cursor: pointer; transition: background .14s, border-color .14s; }
/* Only where a pointer can hover: on a touch screen the hover would stay where the last tap was and mark an answer of the next question. */
@media (hover: hover) { .qs-opts button:hover { border-color: var(--text); } }
.qs-opts button[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent); }
.qs button:focus-visible, .qs-end button:focus-visible { border-radius: 999px; }
.qs-foot { display: flex; align-items: center; gap: 12px; min-height: var(--qs-foot); margin-top: 10px; }
.qs-link { flex: none; min-height: var(--qs-foot, 32px); margin-inline: -8px; padding: 0 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.qs-link:hover { color: var(--text); }
.qs .qs-msg { flex: 1; display: flex; align-items: center; justify-content: center; gap: 14px; min-width: 0; margin: 0; color: var(--neg); font-size: 14px; }
.qs-msg .qs-link { color: var(--text); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--faint); }
.qs-skip { margin-left: auto; }
.qs-end { display: flex; align-items: center; gap: 22px; }
.qs-end .qs-msg { display: flex; align-items: center; gap: 14px; margin: 0; color: var(--neg); font-size: 14px; }
.qs .qs-msg.wait, .qs-end .qs-msg.wait { color: var(--muted); }
.qs.hold .qs-step, .qs.hold .qs-foot { pointer-events: none; }   /* right after a tap that counted: a second tap shows nothing */
.page .qs-slot { min-height: 292px; }
.page .qs { max-width: 440px; margin-top: 28px; }
.page .qs-end { margin-top: 8px; }
@media (max-width: 520px) {
  .qs { --qs-h: 44px; --qs-foot: 44px; }
  .qs-end .qs-link { min-height: 44px; }
  .page .qs-slot { min-height: 316px; }
}
@media (min-width: 901px) { .beta { align-items: start; } .beta-r { padding-top: 6px; } }
@media (max-width: 520px) {
  .done-os span { flex-basis: 100%; }
  .done-os button { min-height: 44px; padding: 0 18px; }
  .top .btn-sm { min-height: 40px; }
  .beta form { flex-wrap: nowrap; }
  .beta .err { order: 0; flex: none; }
}
@media (scripting: none) { .sh-vd { opacity: 1; visibility: visible; transform: none; } }

/* ---------- Text pages: changelog, privacy, thanks, not found ---------- */
.top.still .btn-sm { opacity: 1; visibility: visible; }
.top nav a.link[aria-current="page"] { color: var(--text); }
body:has(> main.page) { min-height: 100dvh; display: flex; flex-direction: column; }
body:has(> main.page) > main { flex: 1 0 auto; }
.page { padding-block: clamp(36px, 6vw, 72px) 0; }
.page .col { max-width: 640px; }
.page h1 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.05; }
.page .lede { margin-top: 14px; color: var(--muted); font-size: clamp(16px, 1.4vw, 18px); line-height: 1.45; }
.page h2 { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.page h2 .lab { margin-left: 10px; color: var(--muted); font-weight: 400; letter-spacing: .01em; }
.page p, .page ul { margin-top: 12px; }
.page ul { padding-left: 1.15em; list-style: disc; }
.page li + li { margin-top: 8px; }
.page li b { font-weight: 600; }
.page li::marker { color: var(--faint); }
.page .small { color: var(--muted); font-size: 14px; }
.page .go { margin-top: 28px; }
.page h2[id], .page .iss { scroll-margin-top: 96px; }
/* Known issues. Tight tracking at 17px eats the word spaces, so the title gets them back. */
.page h3 { margin-top: 26px; font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: 0; word-spacing: .06em; text-wrap: balance; }
.page .iss { margin-top: 18px; }
.page .iss + .iss { margin-top: 32px; }
.page .iss h3 { margin-top: 0; }
.page .issue { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; align-items: baseline; margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.page .issue dt { color: var(--muted); font-size: 14px; }
.page .issue dd { margin: 0; }
.page .issue dd:last-of-type { color: var(--muted); font-size: 14px; }
/* Status mark: empty ring = open, half = fixed and waiting for a build, full = in a build. The shape and the words carry it. */
.page .ist { display: inline-flex; align-items: baseline; gap: 8px; font-weight: 600; }
.page .ist::before { content: ""; flex: none; width: 9px; height: 9px; border: 1.5px solid currentColor; border-radius: 50%; }
.page .ist-next, .page .ist-done { color: var(--pos); }
.page .ist-next::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.page .ist-done::before { background: currentColor; }
.page .meta { margin-top: 20px; font-variant-numeric: tabular-nums; }
.page .pre { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); }
.page .pre b { font-weight: 600; }
.page h2.hot { padding-top: 19px; border-top: 2px solid var(--neg); }
.page .stop .iss { padding: 16px 18px 18px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); }
@media (max-width: 520px) {
  /* The three text pairs stack; Status and First reported stay one-line rows. This leans on the fixed order of the five pairs. */
  .page .issue { gap: 0 12px; }
  .page .issue dt { margin-top: 10px; font-size: 13px; }
  .page .issue dt:nth-of-type(-n+3), .page .issue dd:nth-of-type(-n+3) { grid-column: 1 / -1; }
  .page .issue dd:nth-of-type(n+4) { margin-top: 10px; }
  .page .stop .iss { padding: 14px 14px 16px; }
}
