/* Shared dark theme, typography and accessible controls. */
@font-face { font-family: "Big Shoulders Display"; src: url("/assets/fonts/BigShouldersDisplay-Latin-700-900.woff2") format("woff2"); font-style: normal; font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/assets/fonts/LibreFranklin-Latin-400-800.woff2") format("woff2"); font-style: normal; font-weight: 400 800; font-display: swap; }
:root {
  color-scheme: dark;
  --font: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --bg: #0b110e;
  --panel: #141d17;
  --panel2: #1b281e;
  --surface: var(--panel);
  --surface-2: var(--panel2);
  --surface-3: #25332a;
  --border: #2b3b30;
  --border-strong: #516556;
  --text: #f2f5ed;
  --text-2: #d0d9cf;
  --muted: #a7b3a8;
  --accent: #40d989;
  --brand: var(--accent);
  --brand-2: #78e8ac;
  --brand-ink: #081d11;
  --brand-soft: #40d98912;
  --focus: #a3f4c7;
  --g: #40d989;
  --y: #dbbe6a;
  --o: #ed9d6e;
  --r: #ee8585;
  --g-soft: #40d98912;
  --y-soft: #dbbe6a12;
  --o-soft: #ed9d6e12;
  --r-soft: #ee858512;
  --sb-bg: #111b15;
  --sb-bg-2: #15241b;
  --sb-line: #314838;
  --sb-text: var(--text);
  --sb-muted: var(--muted);
  --sb-live: var(--accent);
  --sb-warn: #dbbe6a;
  --pip: var(--accent);
  --turf-a: #164c30;
  --turf-b: #195235;
  --los: #78c9ef;
  --ltg: #e5c76b;
  --radius-s: 6px;
  --radius: 8px;
  --radius-l: 12px;
  --header-h: 64px;
  --gutter: 20px;
  --shadow-1: none;
  --shadow-2: 0 16px 48px #0005;
  --ease-out: cubic-bezier(.2,.8,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4,p { margin: 0; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 750; line-height: 1.1; }
small { font-size: 14px; }
button,input,select,textarea { color: inherit; font: inherit; }
button,a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button[disabled] { cursor: default; }
a { color: var(--accent); text-underline-offset: 3px; }
img,svg { display: block; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; top: -60px; left: 12px; z-index: 100; padding: 10px 16px; background: var(--accent); color: var(--brand-ink); border-radius: 6px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }
.brand-name { font-family: var(--font-display); }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px; color: var(--text-2); background: transparent; }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 10px 18px; border: 1px solid transparent; border-radius: var(--radius); font-size: 15px; font-weight: 650; text-decoration: none; transition: background .16s, border-color .16s, transform .12s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-2); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; }
.btn svg { width: 18px; height: 18px; flex: none; }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 9px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: 14px; line-height: 1.4; }
.chip svg { width: 16px; height: 16px; flex: none; }
button.chip:hover { color: var(--text); border-color: var(--border-strong); }
.kbd { display: none; flex: none; min-width: 22px; padding: 0 5px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font: 500 14px/22px var(--font-mono); text-align: center; }
@media (hover: hover) and (pointer: fine) { .kbd { display: inline-block; } }
.btn-primary .kbd { border-color: #081d1140; color: #143c24; }
.switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: transparent; text-align: left; }
.switch .track { flex: none; position: relative; width: 34px; height: 20px; border-radius: 20px; background: #46544a; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #edf5eb; transition: transform .16s; }
.switch[aria-checked="true"] .track { background: #247d50; }
.switch[aria-checked="true"] .track::after { transform: translateX(14px); }
.switch .txt { display: flex; flex-direction: column; min-width: 0; }
.switch .txt b { font-size: 14px; font-weight: 600; }
.switch .txt small { font-size: 14px; color: var(--muted); line-height: 1.4; }
.grade { display: inline-grid; place-items: center; flex: none; width: 25px; height: 25px; border-radius: 5px; font-size: 15px; font-weight: 700; line-height: 1; color: #09120c; }
.grade.g { background: var(--g); }
.grade.y { background: var(--y); }
.grade.o { background: var(--o); }
.grade.r { background: var(--r); }
.squares { display: flex; flex-wrap: wrap; gap: 5px; }
.squares .grade { width: 22px; height: 22px; font-size: 14px; }
.card { border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); }
.eyebrow { color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .025em; }
.muted { color: var(--muted); }
.small,.fine { font-size: 14px; }
.fine { color: var(--muted); line-height: 1.5; }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 14px; background: #050a08cc; }
.modal { position: relative; width: min(570px,100%); max-height: 88dvh; overflow: auto; padding: 25px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-2); animation: rise .2s var(--ease-out); }
.modal h2 { margin-bottom: 18px; padding-right: 35px; font-size: 30px; }
.modal-close { position: absolute; right: 12px; top: 12px; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 20px; transform: translate(-50%,12px); max-width: calc(100% - 24px); padding: 10px 16px; opacity: 0; background: #e4f0e6; color: #101b13; font-size: 14px; border-radius: 6px; transition: opacity .16s, transform .16s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.spinner { width: 32px; height: 32px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.noscript { padding: 30px 20px; text-align: center; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: scale(.95); } }
@media (max-width: 560px) { :root { --gutter: 12px; } .modal { padding: 22px 16px; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
