/* =============================================================================
   NANA'S NUMBERS — FREE SITE THEME
   One stylesheet for every page and tool. Black & blue, dark + light.
   Fonts: Atkinson Hyperlegible Next (text) + Atkinson Hyperlegible Mono
   (numbers) — designed so 0/O, 1/l/I, 5/S, 8/B never look alike.
   ============================================================================= */

:root {
  --bg: #05070c;
  --surface: #0d1322;
  --surface-2: #141c31;
  --line: #24314f;
  --text: #f3f6fc;
  --muted: #aab5cd;
  --blue: #5b8cff;
  --blue-strong: #2f5bea;
  --blue-soft: rgba(91, 140, 255, .14);
  --on-blue: #ffffff;
  /* Platinum = cyan · Highlights & Fireball = violet (no gold anywhere) */
  --plat: #38d9f5;
  --plat-soft: rgba(56, 217, 245, .13);
  --hl: #a78bfa;
  --hl-soft: rgba(167, 139, 250, .15);
  --ok: #4fd39b;
  --warn: #ff8f70;
  --extreme: #ff6b6b;
  --long: #6fa2ff;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 14px;
  --radius-sm: 9px;
  --tap: 48px;
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", "Atkinson Hyperlegible Next", ui-monospace, "SF Mono", Consolas, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f2f5fb;
  --surface-2: #e7edf8;
  --line: #cdd7ea;
  --text: #0a0e17;
  --muted: #4a5571;
  --blue: #1f4fd6;
  --blue-strong: #173fb0;
  --blue-soft: rgba(31, 79, 214, .10);
  --on-blue: #ffffff;
  --plat: #00708a;
  --plat-soft: rgba(0, 112, 138, .10);
  --hl: #5b3fd1;
  --hl-soft: rgba(91, 63, 209, .10);
  --ok: #0f7a4d;
  --warn: #b33b17;
  --extreme: #c62828;
  --long: #1f4fd6;
  --shadow: 0 8px 24px rgba(15, 30, 70, .10);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
a { color: var(--blue); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
main:focus, main:focus-visible { outline: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Numbers: open, spaced, never blocky ─────────────────────────────────── */
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums slashed-zero;
  font-feature-settings: "zero" 1, "tnum" 1;
  letter-spacing: .08em;
  font-weight: 600;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px calc(10px);
  padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); margin-right: auto; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: var(--blue-strong); color: #fff;
  font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: 0;
}
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
.icon-btn {
  min-width: var(--tap); height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; font-size: 15px; font-weight: 600;
}
.icon-btn svg { width: 19px; height: 19px; }
.plat-chip {
  height: 40px; padding: 0 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--plat-soft); color: var(--plat);
  border: 1px solid color-mix(in srgb, var(--plat) 45%, transparent);
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.desk-nav { display: none; }

/* ── Bottom tab bar (phones) ─────────────────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--blue); }
.tabbar a[aria-current="page"] svg { stroke-width: 2.4; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
main { max-width: 760px; margin: 0 auto; padding: 18px 16px 30px; }
h1 { font-size: 30px; line-height: 1.15; margin: 6px 0 6px; letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: 22px; line-height: 1.25; margin: 26px 0 10px; letter-spacing: -.01em; }
h3 { font-size: 18px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.lede { color: var(--muted); font-size: 17px; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }

/* ── Lists of destinations ───────────────────────────────────────────────── */
.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.list li + li { border-top: 1px solid var(--line); }
.list a {
  display: flex; align-items: center; gap: 14px;
  min-height: 68px; padding: 12px 16px; text-decoration: none; color: var(--text);
}
.list a:active { background: var(--surface-2); }
.list .li-text { flex: 1; min-width: 0; }
.list .li-title { display: block; font-weight: 700; font-size: 17px; }
.list .li-sub { display: block; color: var(--muted); font-size: 15px; line-height: 1.4; }
.list .li-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.list .li-icon svg { width: 22px; height: 22px; }
.list .chev { color: var(--muted); flex: none; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--plat-soft); color: var(--plat); margin-left: 6px; vertical-align: 1px; }
.tag.soon { background: var(--surface-2); color: var(--muted); }

/* ── Panels, forms, buttons ──────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.field { display: block; margin: 0 0 14px; }
.field > span, .field-label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 14px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--bg); color: var(--text); font-size: 18px;
}
input.num-input, textarea.num-input { font-family: var(--mono); letter-spacing: .12em; font-variant-numeric: slashed-zero; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.btn {
  min-height: var(--tap); padding: 10px 20px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: 17px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.primary { background: var(--blue-strong); border-color: var(--blue-strong); color: var(--on-blue); }
.btn.plat { background: var(--plat-soft); border-color: color-mix(in srgb, var(--plat) 50%, transparent); color: var(--plat); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button, .chip {
  min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; font-weight: 700; font-size: 16px;
}
.seg button[aria-pressed="true"], .chip[aria-pressed="true"] { background: var(--blue-strong); border-color: var(--blue-strong); color: #fff; }
.digit-pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.digit-pad button { min-height: 54px; font-family: var(--mono); font-size: 22px; font-weight: 700; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; }
.digit-pad button[aria-pressed="true"] { background: var(--blue-strong); border-color: var(--blue-strong); color: #fff; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--blue-strong); }
.state-picker { display: flex; flex-wrap: wrap; gap: 8px; max-height: 260px; overflow-y: auto; padding: 2px; }
.state-picker .chip { min-width: 64px; font-family: var(--mono); letter-spacing: .04em; }

/* ── Results ─────────────────────────────────────────────────────────────── */
.results { margin-top: 18px; scroll-margin-top: 76px; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.result-head h2 { margin: 0; font-size: 20px; }
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.result-card h3 { display: flex; justify-content: space-between; gap: 8px; }
.count { color: var(--muted); font-weight: 600; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .num { padding: 6px 11px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 19px; }
.chips .num.dollar { border-color: var(--hl); background: var(--hl-soft); }
.big-num { font-family: var(--mono); font-size: 34px; font-weight: 700; letter-spacing: .12em; font-variant-numeric: slashed-zero; }
.pick-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pick-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.pick-card .label { color: var(--muted); font-weight: 700; font-size: 15px; }
.grid-set { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
table.ngrid { border-collapse: separate; border-spacing: 5px; }
table.ngrid td, table.ngrid th { min-width: 42px; height: 42px; text-align: center; border-radius: 8px; }
table.ngrid td { background: var(--surface-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 20px; font-weight: 700; font-variant-numeric: slashed-zero; }
table.ngrid th { color: var(--muted); font-size: 14px; font-weight: 700; text-align: left; padding-right: 6px; }
.locked { border-style: dashed; }
/* rundown digit colors (each digit always the same color, text stays high-contrast) */
table.ngrid.colored td { color: var(--text); }
.d0 { background: color-mix(in srgb, #ff5733 30%, var(--surface)) !important; }
.d1 { background: color-mix(in srgb, #3498db 30%, var(--surface)) !important; }
.d2 { background: color-mix(in srgb, #2ecc71 30%, var(--surface)) !important; }
.d3 { background: color-mix(in srgb, #f1c40f 30%, var(--surface)) !important; }
.d4 { background: color-mix(in srgb, #e67e22 30%, var(--surface)) !important; }
.d5 { background: color-mix(in srgb, #f25ca2 30%, var(--surface)) !important; }
.d6 { background: color-mix(in srgb, #99ccff 34%, var(--surface)) !important; }
.d7 { background: color-mix(in srgb, #7be07b 30%, var(--surface)) !important; }
.d8 { background: color-mix(in srgb, #fff176 30%, var(--surface)) !important; }
.d9 { background: color-mix(in srgb, #ffb877 32%, var(--surface)) !important; }
.locked p { color: var(--muted); margin: 0; }
.workout-row { display: flex; justify-content: space-between; align-items: center; min-height: 46px; border-bottom: 1px solid var(--line); }
.workout-row:last-child { border-bottom: 0; }
.workout-row .num { font-size: 22px; }
.sentence { margin: 0 0 8px; padding-left: 12px; border-left: 3px solid var(--line); }
.sentence.hit { border-color: var(--ok); }
.sentence.fb { border-color: var(--hl); }
.sentence.miss { border-color: var(--line); color: var(--muted); }
.error { padding: 14px 16px; border-radius: var(--radius); border: 1.5px solid var(--warn); color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); font-weight: 600; }
.note { color: var(--muted); font-size: 15px; }
.loading { color: var(--muted); font-weight: 600; }

/* data tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 16px; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { background: var(--surface-2); font-size: 14px; color: var(--muted); position: sticky; top: 0; }
table.data th button { all: unset; cursor: pointer; font-weight: 700; }
table.data td.num { font-size: 18px; }
table.data tr.extreme td:first-child { box-shadow: inset 4px 0 0 var(--extreme); }
table.data tr.long td:first-child { box-shadow: inset 4px 0 0 var(--long); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin: 8px 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* results board */
.board-row { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.board-row:first-child { border-top: 0; }
.board-state { font-family: var(--mono); font-weight: 700; font-size: 17px; letter-spacing: .04em; }
.board-state small { display: block; font-family: var(--font); color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: 0; line-height: 1.2; }
.board-draws { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.board-draw { display: flex; flex-direction: column; }
.board-draw { min-width: 96px; }
.board-draw .when { color: var(--muted); font-size: 13px; font-weight: 700; }
.board-draw .date { color: var(--muted); font-size: 12px; }
.board-draw .num { font-size: 24px; letter-spacing: .14em; }
.board-draw .fb { color: var(--hl); font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

/* cash pop */
.pop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.pop { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.pop .num { font-size: 28px; display: block; }
.pop small { display: block; color: var(--muted); font-size: 14px; line-height: 1.35; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); }

/* next step + platinum match cards */
.followups { display: grid; gap: 12px; margin-top: 22px; }
.follow { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius); text-decoration: none; color: var(--text); border: 1px solid var(--line); background: var(--surface); }
.follow .k { display: block; font-size: 14px; font-weight: 700; color: var(--muted); }
.follow .t { display: block; font-weight: 700; font-size: 17px; }
.follow .li-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.follow .li-icon svg { width: 22px; height: 22px; }
.follow.platinum { border-color: color-mix(in srgb, var(--plat) 45%, transparent); background: var(--plat-soft); }
.follow.platinum .k { color: var(--plat); }

/* landing */
.hero { padding: 18px 0 6px; }
.hero h1 { font-size: 36px; }
.hero-board { margin: 18px 0; }
.feature-list { display: grid; gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.feature-list li { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.feature-list strong { display: block; }
.auth-box { max-width: 440px; margin: 0 auto; }

/* compare table */
.compare th, .compare td { white-space: normal !important; }
.compare td:nth-child(2), .compare td:nth-child(3) { width: 30%; }

footer.site-foot { max-width: 760px; margin: 0 auto; padding: 10px 16px 30px; color: var(--muted); font-size: 14px; line-height: 1.5; }
footer.site-foot a { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 50; }

/* ── Larger screens: nav moves into the header ───────────────────────────── */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .desk-nav { display: flex; gap: 4px; margin-right: 8px; }
  .desk-nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 700; }
  .desk-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
  .brand { margin-right: 24px; }
  .desk-nav { margin-right: auto; }
  main { padding-top: 28px; }
  .toast { bottom: 30px; }
}
@media (max-width: 480px) {
  .plat-chip { padding: 0 12px; }
  .plat-chip span { display: none; }
}
@media (max-width: 360px) {
  .brand-name { font-size: 17px; }
  .row-2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
