/* =====================================================================================
   Sweat design system
   Dark-first. Color is reserved for meaning: hit / live / miss (validated for CVD
   separation against both surfaces), probability in blue, everything else neutral.
   One sans (Geist) for UI and numbers; Geist Mono only for codes and timestamps.
   ===================================================================================== */

:root {
  color-scheme: dark;
  --bg: #08090b;
  --bg-elev: #0c0e11;
  --surface: #111318;
  --surface-2: #171a20;
  --surface-3: #1f232b;
  --surface-4: #2a2f39;
  --hairline: rgba(255, 255, 255, 0.07);
  --hairline-2: rgba(255, 255, 255, 0.115);
  --text: #f3f5f8;
  --text-2: #a8b0bd;
  --text-3: #8a93a1;
  --primary: #f3f5f8;
  --on-primary: #08090b;
  --prob: #7aa5ff;
  --prob-wash: rgba(122, 165, 255, 0.13);
  --accent: #7aa5ff;
  /* status: validated all-pairs CVD dE >= 10.3 on #111318 */
  --hit: #3ddc97;
  --hit-ink: #4be3a2;
  --hit-wash: rgba(61, 220, 151, 0.12);
  --live: #ffb020;
  --live-ink: #ffc24d;
  --live-wash: rgba(255, 176, 32, 0.13);
  --miss: #ff5a5f;
  --miss-ink: #ff7b7f;
  --miss-wash: rgba(255, 90, 95, 0.12);
  --miss-solid: #cf3a40;
  --pending: #343a45;
  --grid: #1d2128;
  --axis: #323843;
  --brand-a: #36dcff;
  --brand-b: #7a5cff;
  --brand-ink: #ffffff;
  --glow: 0 0 0 1px var(--hairline-2), 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--hairline-2);
  --r-xs: 8px;
  --r-sm: 11px;
  --r: 16px;
  --r-lg: 22px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sidebar: 252px;
  --tabbar: 66px;

  /* legacy aliases (calculators + docs pages) */
  --card: var(--surface);
  --card2: var(--surface-2);
  --line: var(--hairline-2);
  --tx: var(--text);
  --mut: var(--text-3);
  --hit-bg: var(--hit-wash);
  --miss-bg: var(--miss-wash);
  --live-bg: var(--live-wash);
  --info: var(--accent);
  --accent-ink: var(--on-primary);
  --info-bg: var(--prob-wash);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f5f7; --bg-elev: #fbfbfc; --surface: #ffffff; --surface-2: #f2f4f7; --surface-3: #e9ecf1; --surface-4: #dde1e8;
    --hairline: rgba(15, 20, 30, 0.075); --hairline-2: rgba(15, 20, 30, 0.12);
    --text: #0c0f14; --text-2: #4a5261; --text-3: #646b78; --primary: #0c0f14; --on-primary: #ffffff;
    --prob: #2f6bea; --prob-wash: rgba(47, 107, 234, 0.1); --accent: #2f6bea;
    --brand-a: #0aa8e6; --brand-b: #6a45ff;
    --hit: #006e46; --hit-ink: #006e46; --hit-wash: rgba(0, 110, 70, 0.09);
    --live: #d99700; --live-ink: #8c5d00; --live-wash: rgba(217, 151, 0, 0.13);
    --miss: #f26065; --miss-ink: #c42f37; --miss-wash: rgba(242, 96, 101, 0.11);
    --pending: #d6dae1; --grid: #eef0f3; --axis: #d4d8df;
    --glow: 0 0 0 1px var(--hairline), 0 18px 50px -20px rgba(15, 20, 30, 0.22);
    --shadow-card: 0 1px 2px rgba(15, 20, 30, 0.04), 0 0 0 1px var(--hairline);
    --shadow-pop: 0 18px 50px rgba(15, 20, 30, 0.16), 0 0 0 1px var(--hairline-2);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7; --bg-elev: #fbfbfc; --surface: #ffffff; --surface-2: #f2f4f7; --surface-3: #e9ecf1; --surface-4: #dde1e8;
  --hairline: rgba(15, 20, 30, 0.075); --hairline-2: rgba(15, 20, 30, 0.12);
  --text: #0c0f14; --text-2: #4a5261; --text-3: #646b78; --primary: #0c0f14; --on-primary: #ffffff;
  --prob: #2f6bea; --prob-wash: rgba(47, 107, 234, 0.1); --accent: #2f6bea;
  --brand-a: #0aa8e6; --brand-b: #6a45ff;
  --hit: #006e46; --hit-ink: #006e46; --hit-wash: rgba(0, 110, 70, 0.09);
  --live: #d99700; --live-ink: #8c5d00; --live-wash: rgba(217, 151, 0, 0.13);
  --miss: #f26065; --miss-ink: #c42f37; --miss-wash: rgba(242, 96, 101, 0.11);
  --pending: #d6dae1; --grid: #eef0f3; --axis: #d4d8df;
  --glow: 0 0 0 1px var(--hairline), 0 18px 50px -20px rgba(15, 20, 30, 0.22);
  --shadow-card: 0 1px 2px rgba(15, 20, 30, 0.04), 0 0 0 1px var(--hairline);
  --shadow-pop: 0 18px 50px rgba(15, 20, 30, 0.16), 0 0 0 1px var(--hairline-2);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { background: var(--bg); }
body {
  margin: 0; color: var(--text); font: 15px/1.5 var(--font); letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  min-height: 100vh; min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
p a, .link { color: var(--accent); }
p a:hover, .link:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.022em; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.03em; }
h2 { font-size: 19px; line-height: 1.25; }
h3 { font-size: 16px; line-height: 1.3; }
small { font-size: 12.5px; }
::selection { background: var(--prob-wash); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num, .tab { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; }
.muted, .t2 { color: var(--text-2); }
.t3 { color: var(--text-3); }
.pos, .up { color: var(--hit-ink); }
.neg, .down { color: var(--miss-ink); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }

/* ---------- app shell ---------- */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  height: calc(58px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--hairline);
}
.topbar .title { font-weight: 650; font-size: 17px; letter-spacing: -0.02em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { width: 100%; max-width: 1240px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right)) calc(var(--tabbar) + 40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 0 max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent); backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px);
  border-top: 1px solid var(--hairline);
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; color: var(--text-3); font-size: 11px; font-weight: 550; }
.tabbar a.on { color: var(--text); }
.tabbar a .badge { position: absolute; top: 4px; left: calc(50% + 6px); }
.tabbar .fab { justify-self: center; width: 52px; height: 52px; border-radius: 18px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; padding: 0; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6); transform: translateY(-6px); }
.tabbar .fab span { display: none; }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .topbar, .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 22px 14px 16px;
    background: var(--bg-elev); border-right: 1px solid var(--hairline); overflow-y: auto;
  }
  .content { padding: 34px max(40px, env(safe-area-inset-right)) 80px max(40px, env(safe-area-inset-left)); }
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 12px 22px; }
.side-new { margin: 0 4px 18px; }
.side-new:has(+ .side-ask:not(.hide)) { margin-bottom: 8px; }
.side-ask { margin: 0 4px 18px; justify-content: center; }
.side-ask svg, .topbar [data-ask] svg { color: var(--brand-b); }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 520; font-size: 14.5px; transition: background 0.15s, color 0.15s; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--hairline); }
.side-nav a .badge { margin-left: auto; }
.side-sec { margin: 22px 12px 6px; color: var(--text-3); font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 16px; }
.side-status { display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--text-3); font-size: 12.5px; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); }
.me-chip:hover { background: var(--surface-2); }
.me-chip .who { min-width: 0; line-height: 1.25; }
.me-chip .who b { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-chip .who span { color: var(--text-3); font-size: 12px; }

/* brand mark */
.logo { width: 28px; height: 28px; flex: none; }
.logo-word { font-weight: 720; letter-spacing: -0.04em; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 22px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(24px, 3.4vw, 32px); overflow-wrap: anywhere; }
.page-head > div:first-child { min-width: 0; max-width: 100%; }
.page-head .lede { color: var(--text-2); margin: 6px 0 0; max-width: 620px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section { margin-top: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { white-space: nowrap; }
.section-head h2 { font-size: 18px; }
.section-head .hint { color: var(--text-3); font-size: 13px; }
.eyebrow { color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-card); border: 1px solid var(--hairline); padding: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card.tight { padding: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); }
.card-head h3 { font-size: 15px; }
.card-body { padding: 16px; }
.divide > * + * { border-top: 1px solid var(--hairline); }
.inset { background: var(--surface-2); border-radius: var(--r-sm); padding: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--hairline-2); background: var(--surface-2); color: var(--text); font-weight: 580; font-size: 14.5px; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, opacity 0.15s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.btn.primary:hover { opacity: 0.9; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--miss-ink); }
.btn.danger.solid { background: var(--miss-solid); color: #fff; border-color: transparent; }
.btn.small, .btn.sm { height: 32px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; gap: 6px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 13px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); padding: 0; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }

/* ---------- forms ---------- */
label, .label { display: block; font-size: 13px; font-weight: 560; color: var(--text-2); margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; height: 42px; padding: 0 13px; border-radius: var(--r-sm); border: 1px solid var(--hairline-2); background: var(--surface-2);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; font-size: 15px;
}
textarea { height: auto; min-height: 120px; padding: 11px 13px; line-height: 1.5; resize: vertical; }
textarea.code { font-family: var(--mono); font-size: 12.5px; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); background: var(--surface); }
input[aria-invalid="true"] { border-color: var(--miss); }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23848d9b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.field-row { display: flex; gap: 8px; align-items: center; }
.field-row > input, .field-row > select { flex: 1; }
/* a link to copy (sign-in links): on a phone the link gets its own line and its buttons sit under it */
@media (max-width: 560px) { .field-row.link-row { flex-wrap: wrap; } .field-row.link-row > input { flex: 1 1 100%; min-width: 0; } }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon input { padding-left: 40px; }
.prefix { position: relative; }
.prefix > span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-weight: 560; pointer-events: none; }
.prefix > input { padding-left: 28px; }
.help { color: var(--text-3); font-size: 12.5px; margin-top: 6px; }
/* what's wrong with a field in a dialog (core.js fieldError) */
.field-err { color: var(--miss-ink); font-size: 13px; margin: 6px 0 0; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--hairline); }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-weight: 560; font-size: 13.5px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--hairline-2); }
.seg.full { display: flex; width: 100%; }
.seg.full button { flex: 1; justify-content: center; }
.seg.sm button { height: 28px; padding: 0 10px; font-size: 12.5px; }

.switch { position: relative; width: 42px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; height: auto; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-4); transition: background 0.2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.switch input:checked + span { background: var(--hit); }
.switch input:checked + span::after { transform: translateX(16px); }

/* ---------- chips, pills, badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 580; white-space: nowrap; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--hairline); }
.chip.hit { background: var(--hit-wash); color: var(--hit-ink); border-color: transparent; }
.chip.miss { background: var(--miss-wash); color: var(--miss-ink); border-color: transparent; }
.chip.live, .chip.window { background: var(--live-wash); color: var(--live-ink); border-color: transparent; }
.chip.prob { background: var(--prob-wash); color: var(--prob); border-color: transparent; }
.chip.btnlike { cursor: pointer; }
.chip.btnlike:hover { color: var(--text); border-color: var(--hairline-2); }
.chip.on { background: var(--text); color: var(--bg); border-color: transparent; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; font-weight: 650; letter-spacing: 0.01em; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.pill.hit { background: var(--hit-wash); color: var(--hit-ink); }
.pill.miss { background: var(--miss-wash); color: var(--miss-ink); }
.pill.live { background: var(--live-wash); color: var(--live-ink); }
.pill.prob { background: var(--prob-wash); color: var(--prob); }
.pill.pro { background: linear-gradient(135deg, var(--brand-a), var(--brand-b)); color: #fff; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--miss-solid); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }

/* live dot */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--pending); }
.dot.hit { background: var(--hit); } .dot.miss { background: var(--miss); } .dot.live { background: var(--live); }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--miss); flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--miss); opacity: 0; animation: ping 1.8s var(--ease) infinite; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px 0 9px; border-radius: 999px; background: var(--miss-wash); color: var(--miss-ink); font-size: 11.5px; font-weight: 750; letter-spacing: 0.08em; }
.idle-badge { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.9; } 80%, 100% { transform: scale(1.9); opacity: 0; } }

/* ---------- avatars & team marks ---------- */
.av { --c: var(--surface-3); --ink: var(--text-2); display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--c); color: var(--ink); font-weight: 700; font-size: 13.5px; letter-spacing: -0.02em; flex: none; position: relative; }
.av.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 11.5px; }
.av.xs { width: 24px; height: 24px; border-radius: 7px; font-size: 10px; }
.av.round { border-radius: 50%; }
.av.lg { width: 56px; height: 56px; border-radius: 18px; font-size: 19px; }
.av-team { position: absolute; right: -4px; bottom: -4px; height: 16px; padding: 0 4px; border-radius: 5px; font-size: 9px; font-weight: 800; letter-spacing: 0.02em; line-height: 16px; background: var(--surface); color: var(--text); box-shadow: 0 0 0 2px var(--surface); }
.stack { display: flex; }
.stack .av { box-shadow: 0 0 0 2px var(--surface); }
.stack .av + .av { margin-left: -8px; }

/* ---------- hero ---------- */
.board-grid { display: grid; gap: 28px; }
@media (min-width: 1280px) { .board-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .rail { position: sticky; top: 24px; } }
.hero { position: relative; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; color: var(--text-2); font-weight: 560; font-size: 14px; min-width: 0; }
.hero-label .lbl { white-space: nowrap; }
.live-badge, .idle-badge { white-space: nowrap; }
.hero-value { font-size: clamp(46px, 8.5vw, 68px); font-weight: 680; letter-spacing: -0.045em; line-height: 1.02; margin: 8px 0 6px; font-variant-numeric: proportional-nums; }
.hero-value .cents { font-size: 0.5em; letter-spacing: -0.02em; color: var(--text-2); vertical-align: 0.62em; margin-left: 2px; }
.hero-delta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 15px; min-height: 22px; }
.hero-delta .vs { color: var(--text-3); font-weight: 500; }
.hero-chart { margin: 18px -4px 6px; }
.range { display: flex; gap: 4px; margin-top: 8px; }
.range button { height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text-3); font-weight: 650; font-size: 12.5px; letter-spacing: 0.02em; }
.range button:hover { color: var(--text); background: var(--surface-2); }
.range button.on { color: var(--text); background: var(--surface-2); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 18px; border-radius: var(--r); overflow: hidden; background: var(--hairline); border: 1px solid var(--hairline); }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--surface); padding: 14px 16px; min-width: 0; }
.stat .k { color: var(--text-3); font-size: 12.5px; font-weight: 560; display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 22px; font-weight: 650; letter-spacing: -0.03em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s { color: var(--text-3); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* progress across the whole card */
.progress { margin-top: 18px; }
.progress-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; flex-wrap: wrap; }
.progress-head b { color: var(--text); font-weight: 650; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-2); font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* segmented track: one segment per leg */
.track { display: flex; gap: 2px; height: 8px; }
.track.thin { height: 6px; }
.track i { flex: 1 1 0; min-width: 3px; background: var(--pending); }
.track i:first-child { border-radius: 999px 0 0 999px; }
.track i:last-child { border-radius: 0 999px 999px 0; }
.track i:only-child { border-radius: 999px; }
.track i.scalar { background: var(--text-3); opacity: 0.5; } /* settled at a price: done, neither hit nor missed */
.track i.hit { background: var(--hit); }
.track i.miss { background: var(--miss); }
.track i.live { background: var(--live); animation: breathe 1.6s ease-in-out infinite; }
.track i.pending { background: var(--pending); }
@keyframes breathe { 50% { opacity: 0.45; } }

/* ---------- callouts ---------- */
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: var(--r); background: var(--live-wash); color: var(--text); font-size: 14px; line-height: 1.45; }
.callout .ic { color: var(--live-ink); margin-top: 1px; flex: none; }
.callout.info { background: var(--prob-wash); } .callout.info .ic { color: var(--prob); }
.callout.good { background: var(--hit-wash); } .callout.good .ic { color: var(--hit-ink); }
.callout.bad { background: var(--miss-wash); } .callout.bad .ic { color: var(--miss-ink); }
.callout b { font-weight: 650; }
.callout > div { min-width: 0; overflow-wrap: anywhere; }

/* ---------- game bugs ---------- */
.games-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.games-strip::-webkit-scrollbar { display: none; }
.games-strip .bug { flex: 0 0 220px; scroll-snap-align: start; }
.games-list { display: grid; gap: 8px; }
.bug { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; padding: 11px 13px 10px; transition: border-color 0.15s, background 0.15s; color: inherit; box-shadow: var(--shadow-card); }
.bug:hover { border-color: var(--hairline-2); }
.bug.on { border-color: var(--text-2); }
.bug.in { border-color: color-mix(in srgb, var(--live) 38%, transparent); }
.bug-team { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; align-items: center; gap: 9px; height: 26px; }
.bug-team .bar { width: 4px; height: 18px; border-radius: 3px; background: var(--tc, var(--pending)); }
.bug-team .ab { font-weight: 700; font-size: 14.5px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; min-width: 0; }
.bug-team .ab small { color: var(--text-3); font-weight: 500; font-size: 12px; }
.bug-team .pos-mark { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid var(--live); transform: rotate(90deg); }
.bug-team .sc { font-size: 20px; font-weight: 680; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bug-team.lead .sc { color: var(--text); }
.bug-team.trail .sc { color: var(--text-3); }
.bug-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 7px; border-top: 1px solid var(--hairline); font-size: 12px; color: var(--text-3); }
.bug-foot .when { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bug.in .bug-foot .when { color: var(--live-ink); }
.bug-down { font-size: 11.5px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- need list ---------- */
.need { list-style: none; margin: 0; padding: 0; }
.need-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 46px; gap: 14px; align-items: center; padding: 13px 16px; cursor: pointer; transition: background 0.15s; position: relative; }
.need-row:hover { background: var(--surface-2); }
.need-row .who { min-width: 0; }
.need-row .name { font-weight: 620; font-size: 15px; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.need-row .prop { display: inline-flex; margin-left: 6px; color: var(--text-2); font-weight: 560; }
.need-row .meta { color: var(--text-3); font-size: 12.5px; margin-top: 2px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.need-row .meta .live { color: var(--live-ink); font-weight: 600; }
.need-row .money { text-align: right; }
.need-row .money b { display: block; font-size: 15.5px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.need-row .money small { color: var(--text-3); white-space: nowrap; }
.need-row .rank { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--text-3); font-weight: 700; display: none; }
.need-more { padding: 4px 16px 14px 70px; color: var(--text-2); font-size: 13.5px; }
.need-more .tickets { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.need-foot { display: flex; justify-content: center; padding: 10px; border-top: 1px solid var(--hairline); }
.need-done { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 14px; border-top: 1px solid var(--hairline); }
@media (max-width: 520px) { .need-row { grid-template-columns: 36px minmax(0, 1fr) auto 40px; gap: 11px; padding: 12px 14px; } .need-row .av { width: 36px; height: 36px; } .need-more { padding-left: 14px; } }

/* chance ring */
.ring { position: relative; width: 46px; height: 46px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .trk { stroke: var(--surface-3); }
.ring .arc { stroke: var(--prob); transition: stroke-dashoffset 0.6s var(--ease); }
.ring.hit .arc { stroke: var(--hit); } .ring.miss .arc { stroke: var(--miss); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ring.sm { width: 38px; height: 38px; } .ring.sm b { font-size: 10.5px; }

/* ---------- tickets ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tickets { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
@media (max-width: 720px) { .tickets { grid-template-columns: minmax(0, 1fr); } }
/* the group board: each person's tickets under their name */
.owner-group + .owner-group { margin-top: 28px; }
.owner-head { display: flex; align-items: center; gap: 12px; padding: 0 2px 12px; margin-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.owner-head .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.owner-head b { font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.owner-head .t3 { font-size: 12.5px; }
.owner-name { color: inherit; text-decoration: none; min-width: 0; }
.owner-name:hover b { text-decoration: underline; text-underline-offset: 3px; }
/* a crew-mate's profile */
.member-page .crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); text-decoration: none; }
.member-page .crumb:hover { color: var(--text); }
.member-page h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; overflow-wrap: anywhere; }
.member-page .kpis { margin-top: 18px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.hist-row + .hist-row { border-top: 1px solid var(--hairline); }
.hist-row summary { list-style: none; }
.hist-row summary::-webkit-details-marker { display: none; }
.hist-row summary .val { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; }
.hist-row summary .val small { font-size: 12px; }
.hist-legs { list-style: none; margin: 0; padding: 4px 16px 14px 16px; display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.hist-legs li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lg-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); color: var(--text-3); flex: none; }
.lg-dot.hit { background: var(--hit-wash); color: var(--hit-ink); }
.lg-dot.miss { background: var(--miss-wash); color: var(--miss-ink); }
@media (max-width: 720px) { .hist-row summary .val small { display: none; } }
/* leaderboard rows open a profile: the whole row is the link */
.lb-row.has-link { position: relative; cursor: pointer; transition: background 0.15s; }
.lb-row.has-link:hover { background: var(--surface-2); }
.lb-link { position: absolute; inset: 0; z-index: 1; }
.lb-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 0; }
.ticket { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; box-shadow: var(--shadow-card); transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s; }
.ticket:hover { border-color: var(--hairline-2); }
.ticket.dead { opacity: 0.6; }
.ticket.dead:hover { opacity: 0.85; }
.ticket.won { border-color: color-mix(in srgb, var(--hit) 45%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--hit) 25%, transparent), 0 18px 50px -28px var(--hit); }
.ticket.window { border-color: color-mix(in srgb, var(--live) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--live) 22%, transparent), 0 18px 50px -30px var(--live); }
.t-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.t-head .t-title { flex: 1; min-width: 0; }
.t-head .t-title b { display: block; font-weight: 640; font-size: 15px; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-head .t-title span { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12.5px; }
.vdot { width: 7px; height: 7px; border-radius: 2px; background: var(--v, var(--text-3)); flex: none; }
.t-nums { display: grid; grid-template-columns: auto minmax(0, auto) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 400px) { .t-nums { gap: 14px; } .t-nums .spark { display: none; } .t-nums .big, .t-nums .mid { font-size: 23px; } }
.t-nums .k { color: var(--text-3); font-size: 12px; font-weight: 560; }
.t-nums .big { font-size: 26px; font-weight: 680; letter-spacing: -0.04em; line-height: 1.1; margin-top: 2px; }
.t-nums .mid { font-size: 26px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; margin-top: 2px; color: var(--text-2); }
.t-nums .sub { color: var(--text-3); font-size: 12px; margin-top: 2px; white-space: nowrap; }
.t-nums .spark { align-self: center; justify-self: end; width: 100%; max-width: 120px; }
.t-legs { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.t-leg { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.t-leg .st { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; }
.t-leg .st.hit { background: var(--hit); color: var(--surface); }
.t-leg .st.miss { background: var(--miss); color: #fff; }
.t-leg .st.live { box-shadow: inset 0 0 0 2px var(--live); }
.t-leg .st.live::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); animation: breathe 1.6s ease-in-out infinite; }
.t-leg .st.pending, .t-leg .st.unknown { box-shadow: inset 0 0 0 2px var(--pending); }
.t-leg .lbl { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-leg .lbl b { font-weight: 600; }
.t-leg .lbl span { color: var(--text-2); }
.t-leg.miss .lbl { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--miss); }
.t-leg .rt { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-leg .rt.live { color: var(--live-ink); font-weight: 600; }
.t-more { border: 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13px; padding: 4px 0; text-align: left; }
.t-more:hover { color: var(--text); }
.t-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-3); font-size: 12.5px; }

/* hedge callout inside a ticket */
.hedge { border-radius: 14px; background: var(--surface-2); padding: 12px; }
.hedge.hot { background: var(--live-wash); }
.hedge-head { display: flex; align-items: center; gap: 8px; font-weight: 640; font-size: 14px; margin-bottom: 10px; }
.hedge-head .ic { color: var(--live-ink); }
.hedge-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hedge-opt { background: var(--surface); border-radius: 11px; padding: 9px 10px; border: 1px solid var(--hairline); min-width: 0; }
.hedge-opt.best { border-color: color-mix(in srgb, var(--hit) 55%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hit) 30%, transparent); }
.hedge-opt .k { color: var(--text-3); font-size: 11.5px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.hedge-opt b { display: block; font-size: 16px; font-weight: 680; letter-spacing: -0.03em; margin-top: 2px; white-space: nowrap; }
/* wraps rather than running under the next option on a phone ("either way · +$1,234" is wider than a third of 375px) */
.hedge-opt small { display: block; color: var(--text-3); font-size: 11.5px; overflow-wrap: anywhere; }
.hedge-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; color: var(--text-3); font-size: 12px; }
.hedge-actions > span { min-width: 0; overflow-wrap: anywhere; }
.hedge-actions .btn { flex: none; }

/* comparison bars in the hedge sheet */
.cmp { display: grid; gap: 10px; }
.cmp-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; font-size: 13.5px; }
.cmp-row .nm { font-weight: 600; }
.cmp-row .nm small { display: block; color: var(--text-3); font-weight: 500; font-size: 11.5px; }
.cmp-bars { display: grid; gap: 4px; }
.cmp-bar { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 8px; align-items: center; font-size: 12px; color: var(--text-3); }
.cmp-bar .b { height: 10px; border-radius: 0 4px 4px 0; background: var(--surface-3); overflow: hidden; }
.cmp-bar .b i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.cmp-bar .v { text-align: right; color: var(--text); font-weight: 620; font-variant-numeric: tabular-nums; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; background: var(--surface); border-radius: var(--r); border: 1px solid var(--hairline); box-shadow: var(--shadow-card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--text-3); font-size: 12px; font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--hairline); vertical-align: middle; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 58px; }
.list-row + .list-row { border-top: 1px solid var(--hairline); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow > b { display: block; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.list-row .grow > span { display: block; color: var(--text-3); font-size: 13px; overflow-wrap: anywhere; }
.list-row.clickable { cursor: pointer; transition: background 0.15s; }
.list-row.clickable:hover { background: var(--surface-2); }
.ic-tile { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--surface-2); color: var(--text-2); flex: none; }
.ic-tile.hit { background: var(--hit-wash); color: var(--hit-ink); }
.ic-tile.miss { background: var(--miss-wash); color: var(--miss-ink); }
.ic-tile.live { background: var(--live-wash); color: var(--live-ink); }
.ic-tile.prob { background: var(--prob-wash); color: var(--prob); }

/* ---------- dialogs, menus, toasts ---------- */
dialog.dlg { border: 0; padding: 0; margin: auto; width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); overflow: auto; }
dialog.dlg.wide { width: min(620px, calc(100vw - 32px)); }
dialog.dlg::backdrop { background: rgba(4, 6, 10, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.dlg[open] { animation: pop 0.22s var(--ease); }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 4px; }
.dlg-head > div { min-width: 0; }
.dlg-head h3 { font-size: 18px; overflow-wrap: anywhere; }
.dlg-head p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.dlg-body { padding: 12px 20px 4px; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 16px 20px 20px; }
.dlg-actions.stack { flex-direction: column; }
.dlg-actions.stack .btn { width: 100%; height: 46px; }
@media (max-width: 640px) {
  dialog.dlg, dialog.dlg.wide { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom); max-height: 92dvh; }
  dialog.dlg[open] { animation: sheet 0.28s var(--ease); }
  .dlg-actions { flex-direction: column-reverse; }
  .dlg-actions .btn { width: 100%; height: 46px; }
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes sheet { from { transform: translateY(100%); } }

.toasts { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
@media (min-width: 1024px) { .toasts { bottom: 28px; left: calc(50% + var(--sidebar) / 2); } }
.toast { display: flex; align-items: center; gap: 11px; padding: 12px 16px 12px 13px; border-radius: 15px; background: var(--text); color: var(--bg); font-weight: 580; font-size: 14.5px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); animation: toast-in 0.3s var(--ease); pointer-events: auto; }
.toast .ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--bg) 12%, transparent); }
.toast.hit .ic { background: var(--hit); color: #04150d; }
.toast.miss .ic { background: var(--miss); color: #fff; }
.toast.live .ic { background: var(--live); color: #1d1300; }
.toast small { display: block; font-weight: 500; opacity: 0.7; font-size: 13px; }
.toast > div { min-width: 0; overflow-wrap: anywhere; }
.toast.out { animation: toast-out 0.25s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(0.97); } }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { overflow: visible; }
.chart .tip { position: absolute; top: 0; pointer-events: none; transform: translateX(-50%); background: var(--surface-3); color: var(--text); border-radius: 10px; padding: 7px 10px; font-size: 12.5px; white-space: nowrap; box-shadow: var(--shadow-pop); opacity: 0; transition: opacity 0.12s; z-index: 5; }
.chart .tip b { display: block; font-size: 14px; font-weight: 680; font-variant-numeric: tabular-nums; }
.chart .tip span { color: var(--text-2); }
.chart.hovering .tip { opacity: 1; }
.chart-empty { display: grid; place-items: center; color: var(--text-3); font-size: 13px; border-radius: var(--r); background: repeating-linear-gradient(90deg, transparent 0 18px, var(--grid) 18px 19px); }
.chart-cap { color: var(--text-3); font-size: 12.5px; margin-top: 8px; }
.viewtable { margin-top: 10px; }
.viewtable summary { color: var(--text-3); font-size: 12.5px; cursor: pointer; }

/* ---------- skeletons & empty states ---------- */
.skel { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 44px 20px; border-radius: var(--r-lg); border: 1px dashed var(--hairline-2); color: var(--text-2); }
.empty .ic-tile { width: 48px; height: 48px; border-radius: 15px; }
.empty h3 { color: var(--text); font-size: 17px; overflow-wrap: anywhere; }
.empty p { margin: 0; max-width: 380px; font-size: 14.5px; overflow-wrap: anywhere; }
.empty .row { margin-top: 6px; justify-content: center; }

/* ---------- motion ---------- */
.view { animation: view-in 0.32s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.flash-hit { animation: flash-hit 1.6s var(--ease); }
.flash-miss { animation: flash-miss 1.6s var(--ease); }
@keyframes flash-hit { 0% { background: color-mix(in srgb, var(--hit) 30%, transparent); } 100% { background: transparent; } }
@keyframes flash-miss { 0% { background: color-mix(in srgb, var(--miss) 26%, transparent); } 100% { background: transparent; } }
.refreshing { opacity: 0.7; transition: opacity 0.2s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- brand ---------- */
/* Signature "aurora" gradient (cyan to violet). Used for the mark and a few brand moments only; data colors never use it. */
.wm { display: inline-flex; align-items: baseline; gap: 0.02em; font-weight: 780; letter-spacing: -0.06em; line-height: 1; color: var(--text); }
/* the ring is the "o": x-height plus a little overshoot, sitting on the baseline, spaced like a letter */
.wm-o { display: inline-block; align-self: baseline; line-height: 0; margin-right: 0.035em; transform: translateY(0.015em); }
.wm-o .logo { width: 0.6em; height: 0.6em; display: inline-block; }
.btn.brand { background: linear-gradient(100deg, var(--brand-a), var(--brand-b)); color: var(--brand-ink); border-color: transparent; box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--brand-b) 70%, transparent); }
.btn.brand:hover { filter: brightness(1.08); }
.ic-tile.brand-tile { background: linear-gradient(135deg, color-mix(in srgb, var(--brand-a) 18%, transparent), color-mix(in srgb, var(--brand-b) 22%, transparent)); color: var(--text); }
.display-2 { font-size: clamp(26px, 3.4vw, 38px); margin-top: 8px; letter-spacing: -0.04em; }
@media (max-width: 520px) { .hide-xs { display: none !important; } }

/* ---------- landing ---------- */
.landing { position: relative; overflow: hidden; }
.landing-nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1180px; margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 22px max(20px, env(safe-area-inset-left)); }
.landing-nav.bare-nav { max-width: 1240px; padding-top: max(22px, calc(env(safe-area-inset-top) + 12px)); }
.landing-nav .brandrow { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.landing-nav nav { display: flex; gap: 4px; align-items: center; }
.glow { position: absolute; inset: -30% -10% auto; height: 820px; pointer-events: none; z-index: 0;
  background: radial-gradient(40% 50% at 30% 30%, color-mix(in srgb, var(--brand-a) 20%, transparent), transparent 70%), radial-gradient(35% 45% at 72% 22%, color-mix(in srgb, var(--brand-b) 22%, transparent), transparent 70%); filter: blur(10px); }
.hero-l { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 36px 20px 40px; display: grid; gap: 44px; align-items: center; }
@media (min-width: 1024px) { .hero-l { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); padding-top: 48px; align-items: start; } .hero-l > div:first-child { padding-top: 70px; } }
.hero-l h1 { font-size: clamp(42px, 6.6vw, 76px); line-height: 0.98; letter-spacing: -0.055em; font-weight: 720; }
.hero-l h1 em { font-style: normal; background: linear-gradient(100deg, var(--brand-a), var(--brand-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-l .lede { color: var(--text-2); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; margin: 22px 0 0; max-width: 540px; }
.hero-l .ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero-l .fine { color: var(--text-3); font-size: 13px; margin-top: 16px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero-l .fine span { display: inline-flex; align-items: center; gap: 6px; }
.preview { position: relative; border-radius: 26px; padding: 14px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--hairline-2); box-shadow: var(--glow); backdrop-filter: blur(10px); }
.preview .bar3 { display: flex; gap: 6px; padding: 2px 4px 12px; }
.preview .bar3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-4); }
.preview-inner { display: grid; gap: 12px; }
/* sections below the hero, in the order a visitor's questions come: what it tracks, why, how, four features in depth,
   the rest, the rules, questions, then one last ask */
.landing { overflow: hidden; overflow: clip; } /* clip, not hidden: hidden would stop the header from pinning */
.sec { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 56px 20px; }
@media (min-width: 900px) { .sec { padding-top: 84px; padding-bottom: 84px; } }
.landing .display-2 { margin: 8px 0 0; } /* the standalone pages' h2 margin doesn't apply here */
.sec-head { max-width: 700px; margin: 0 auto 32px; text-align: center; }
.sec-head p { color: var(--text-2); font-size: clamp(15.5px, 1.5vw, 18px); line-height: 1.55; margin: 12px auto 0; max-width: 600px; }
.mk { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none; margin-top: 0; }
.mk.yes { background: linear-gradient(135deg, color-mix(in srgb, var(--brand-a) 26%, transparent), color-mix(in srgb, var(--brand-b) 30%, transparent)); color: var(--text); }
.mk.no { background: var(--surface-2); color: var(--text-3); }
/* what it tracks */
.works { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 4px 20px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; }
.works-k { color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.works ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.works li { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--hairline); color: var(--text-2); font-size: 13.5px; font-weight: 580; white-space: nowrap; }
/* why: without and with */
.ps-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); max-width: 980px; margin: 0 auto; }
@media (min-width: 760px) { .ps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ps-col { border-radius: var(--r-lg); padding: 22px; border: 1px solid var(--hairline); background: var(--surface); }
.ps-col.after { border-color: color-mix(in srgb, var(--brand-b) 38%, var(--hairline)); box-shadow: var(--glow); background: linear-gradient(160deg, color-mix(in srgb, var(--brand-a) 7%, var(--surface)), color-mix(in srgb, var(--brand-b) 10%, var(--surface))); }
.ps-k { font-weight: 680; font-size: 15px; margin-bottom: 14px; }
.ps-col.before .ps-k { color: var(--text-2); }
.ps-col ul, .dd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ps-col li, .dd-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 11px; align-items: start; font-size: 15px; line-height: 1.45; }
.ps-col.before li { color: var(--text-2); }
/* how it works */
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 20px 20px 20px 64px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); }
.steps li::before { content: counter(s); position: absolute; left: 20px; top: 20px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--text); color: var(--bg); font-weight: 750; }
.steps li b { display: block; font-size: 16px; margin-bottom: 4px; }
.steps li span { color: var(--text-2); font-size: 14.5px; }
.steps .ctas, .cta-card .ctas { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }
.steps .wl-cta, .cta-card .wl-cta { text-align: center; }
/* a feature in depth: words and the part of the app, side by side, alternating */
.dd { display: grid; gap: 30px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .dd { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; } .dd.flip .dd-copy { order: 2; } }
.dd-copy { max-width: 520px; }
.dd-copy > p { color: var(--text-2); font-size: clamp(15.5px, 1.5vw, 17.5px); line-height: 1.6; margin: 14px 0 0; }
.dd-list { margin-top: 22px; }
.dd-art { position: relative; isolation: isolate; min-width: 0; }
.dd-art::before { content: ""; position: absolute; inset: 6% 2%; z-index: -1; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-b) 20%, transparent), transparent); filter: blur(28px); pointer-events: none; }
.dd-art .card { box-shadow: var(--glow); }
/* the options table */
.opt-card { padding: 18px; }
.opt-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.opt-head b { display: block; font-size: 16px; font-weight: 680; letter-spacing: -0.02em; }
.opt-head div > span { display: block; color: var(--text-3); font-size: 13px; }
.opt-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-variant-numeric: tabular-nums; }
.opt-table th, .opt-table td { text-align: right; padding: 11px 12px; font-size: 14.5px; white-space: nowrap; border: 0; color: var(--text); }
.opt-table thead th { color: var(--text-3); font-size: 12px; font-weight: 600; padding-top: 0; padding-bottom: 0; white-space: normal; }
.opt-table tbody th { text-align: left; font-weight: 640; }
.opt-table tbody tr > *, .opt-table tbody tr:hover > * { background: var(--surface-2); }
.opt-table tbody tr > :first-child { border-radius: 11px 0 0 11px; }
.opt-table tbody tr > :last-child { border-radius: 0 11px 11px 0; }
.opt-table td { font-weight: 660; }
.opt-table td.z { color: var(--text-3); }
@media (max-width: 520px) { .opt-table th, .opt-table td { padding: 10px 7px; font-size: 13.5px; } .opt-table tbody th { padding-left: 10px; } .opt-table tbody td:last-child { padding-right: 10px; } }
.opt-foot { color: var(--text-3); font-size: 12.5px; margin: 6px 0 0; line-height: 1.5; }
/* example alerts */
.notif { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--hairline); box-shadow: 0 12px 32px -20px rgba(0, 0, 0, 0.55); text-align: left; }
.notif + .notif { margin-top: 8px; }
.notif .n-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--hairline); }
.notif .n-txt { min-width: 0; }
.notif .n-top { display: flex; justify-content: space-between; gap: 8px; color: var(--text-3); font-size: 12px; font-weight: 600; }
.notif .n-title { display: block; font-size: 14px; font-weight: 660; margin-top: 1px; }
.notif .n-body { display: block; color: var(--text-2); font-size: 13px; line-height: 1.4; margin-top: 1px; }
.float-note { position: relative; max-width: 360px; margin: -30px 14px 0 auto; }
.card.flush.crew-card { padding-bottom: 34px; } /* room for the alert to overlap without covering a row */
.lock { position: relative; border-radius: 34px; padding: 28px 14px 16px; max-width: 400px; margin: 0 auto; overflow: hidden; border: 1px solid var(--hairline-2); box-shadow: var(--glow);
  background: linear-gradient(165deg, color-mix(in srgb, var(--brand-a) 26%, var(--surface-2)), color-mix(in srgb, var(--brand-b) 32%, var(--surface-2))); }
.lock-time { text-align: center; font-size: 58px; font-weight: 640; letter-spacing: -0.045em; line-height: 1; }
.lock-date { text-align: center; color: var(--text-2); font-size: 14px; font-weight: 600; margin: 6px 0 22px; }
/* the rest: a grid of short cards */
.feat { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .feat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .feat { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.feat .card { padding: 20px; }
.feat h3 { margin: 14px 0 6px; font-size: 17px; }
.feat p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.more-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-weight: 620; font-size: 14px; }
/* phones: the short cards go icon-beside-text, and the page's buttons fill the width */
@media (max-width: 619px) {
  .feat .card { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 16px; }
  .feat .card > .ic-tile { grid-row: span 3; }
  .feat h3 { margin: 1px 0 4px; font-size: 16px; }
  .feat .more-link { margin-top: 8px; }
}
@media (max-width: 520px) {
  .landing .ctas .btn { flex: 1 1 auto; }
  .preview { padding: 8px; border-radius: 22px; }
  .preview .bar3 { display: none; }
}
/* the last ask */
.cta-card { position: relative; overflow: hidden; text-align: center; border-radius: 28px; padding: 52px 22px 40px; border: 1px solid var(--hairline-2); box-shadow: var(--glow);
  background: linear-gradient(150deg, color-mix(in srgb, var(--brand-a) 15%, var(--surface)), color-mix(in srgb, var(--brand-b) 20%, var(--surface))); }
.landing .cta-card h2 { margin: 0 auto; max-width: 660px; font-size: clamp(30px, 4.6vw, 50px); line-height: 1.05; letter-spacing: -0.045em; }
.cta-card .cta-lead { color: var(--text-2); margin: 14px auto 0; max-width: 520px; font-size: 16.5px; line-height: 1.55; }
.cta-card .rg { color: var(--text-3); font-size: 13px; margin-top: 20px; }
/* header pinned on wider screens; on phones the buttons come up from the bottom instead */
.lnav-wrap { position: relative; z-index: 30; }
.lnav-wrap .landing-nav { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: 16px; }
@media (min-width: 721px) {
  .lnav-wrap { position: sticky; top: 0; border-bottom: 1px solid transparent; transition: background 0.2s, border-color 0.2s; }
  .lnav-wrap.stuck { background: color-mix(in srgb, var(--bg) 80%, transparent); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-bottom-color: var(--hairline); }
}
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-top: 1px solid var(--hairline);
  transform: translateY(110%); visibility: hidden; transition: transform 0.25s var(--ease), visibility 0s linear 0.25s; }
.sticky-cta.on { transform: none; visibility: visible; transition: transform 0.25s var(--ease), visibility 0s; }
.sticky-cta > div { display: flex; gap: 8px; }
.sticky-cta .btn, .sticky-cta .btn.lg { flex: 1 1 0; min-width: 0; height: 46px; padding: 0 10px; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.sticky-cta .btn svg { display: none; }
@media (min-width: 721px) { .sticky-cta { display: none; } }
.foot { max-width: 1180px; margin: 0 auto; padding: 30px 20px 60px; color: var(--text-3); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--hairline); }

/* ---------- misc layout helpers ---------- */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 12px; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.two { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.three { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .two, .three { grid-template-columns: 1fr; } }
.stack-sm > * + * { margin-top: 8px; }
.stack-md > * + * { margin-top: 14px; }
.mt0 { margin-top: 0 !important; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.w100 { width: 100%; }
hr.sep { border: 0; border-top: 1px solid var(--hairline); margin: 16px 0; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 6px; padding: 1px 6px; word-break: break-all; }
pre { font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }

/* ---------- add ticket ---------- */
.builder { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); } /* one column on phones that can shrink: a long market name truncates instead of widening the page */
@media (min-width: 1100px) { .builder { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .slip { position: sticky; top: 24px; } }
.venues { display: flex; flex-wrap: wrap; gap: 6px; }
.venues .chip { height: 32px; padding: 0 12px; cursor: pointer; }
.leg-card { position: relative; background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; padding: 12px; box-shadow: var(--shadow-card); }
.leg-card + .leg-card { margin-top: 8px; }
.leg-card .lc-top { display: flex; align-items: center; gap: 10px; }
.leg-card .lc-n { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); font-size: 12px; font-weight: 700; flex: none; }
.leg-card .lc-main { flex: 1; min-width: 0; }
.leg-card .lc-main b { display: block; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leg-card .lc-main > span { display: block; color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* phones: the market's name gets the whole first line (remove button at its end); chance and Yes/No go under it */
@media (max-width: 520px) {
  .leg-card .lc-top { flex-wrap: wrap; row-gap: 8px; }
  .leg-card .lc-top > .lc-main { flex: 1 1 calc(100% - 74px); }
  .leg-card .lc-top > .icon-btn { order: 2; }
  .leg-card .lc-top > .chip, .leg-card .lc-top > .seg { order: 3; }
  .leg-card .lc-top > .chip { margin-left: 34px; }
}
.results { margin-top: 8px; max-height: 320px; overflow: auto; border-radius: 13px; border: 1px solid var(--hairline-2); background: var(--surface); box-shadow: var(--shadow-pop); }
.results button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--hairline); background: transparent; padding: 10px 12px; }
.results button:last-child { border-bottom: 0; }
.results button:hover, .results button:focus-visible { background: var(--surface-2); outline: none; }
.results button b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results button span { display: block; color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop { display: grid; justify-items: center; gap: 10px; padding: 40px 20px; border-radius: var(--r-lg); border: 1.5px dashed var(--hairline-2); background: var(--surface); text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--prob-wash); }
.drop b { font-size: 16px; }
.drop span { color: var(--text-3); font-size: 13.5px; }
.slip .card { padding: 18px; }
.slip-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.slip-row span { color: var(--text-2); }
.slip-row b { font-weight: 640; font-variant-numeric: tabular-nums; }
.verdict { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.verdict.good { background: var(--hit-wash); }
.verdict.bad { background: var(--live-wash); }
.verdict .big { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.verdict p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; }
/* Build check (add.js checkHTML): the ticket against the card it would join */
.bcheck { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.bcheck h3 { margin: 0; font-size: 15px; }
.bcheck h4 { margin: 0; font-size: 13px; font-weight: 650; }
.bcheck p { margin: 4px 0 0; font-size: 12.5px; }
.bc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.bc-stat { padding: 10px; border-radius: 10px; background: var(--surface); min-width: 0; }
.bc-stat span { display: block; font-size: 11.5px; color: var(--text-2); }
.bc-stat b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.bc-stat small { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; overflow-wrap: anywhere; }
.bc-sec { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.bc-leg { padding: 6px 0; }
.bc-leg-name { font-size: 13px; font-weight: 600; }
.bc-leg-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.bc-leg-nums b, .bc-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.bc-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13px; }
.bc-row span { color: var(--text-2); }
.bc-notes { margin: 10px 0 0; padding: 10px 0 0 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.bc-notes li + li { margin-top: 4px; }
.bc-foot { margin-top: 10px !important; font-size: 11.5px !important; }
.bc-caveat { margin: 8px 0 0 !important; padding: 8px 10px; border-radius: 10px; background: var(--surface); border-left: 3px solid var(--text-3); font-size: 12px !important; color: var(--text-2); }

/* ---------- stats pages ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-card); min-width: 0; }
.kpi .k { color: var(--text-3); font-size: 12.5px; font-weight: 560; }
.kpi .v { font-size: 28px; font-weight: 680; letter-spacing: -0.04em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--hit); transition: width 0.6s var(--ease); }
.datechips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.datechips::-webkit-scrollbar { display: none; }
.datechips .chip { height: 34px; padding: 0 13px; cursor: pointer; }
.nearmiss { display: grid; gap: 10px; }
.nm-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; }
.nm-card .nm-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.nm-card .nm-top { flex-wrap: wrap; }
.nm-card .nm-top b { font-weight: 640; overflow-wrap: anywhere; min-width: 0; }
.nm-card .killer { display: flex; align-items: center; gap: 8px; color: var(--miss-ink); font-weight: 600; font-size: 14px; }
.hbar-list { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) 70px; gap: 12px; align-items: center; font-size: 13.5px; }
.hbar .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.hbar .val { text-align: right; font-weight: 640; font-variant-numeric: tabular-nums; }
.hbar .axis { position: relative; height: 14px; }
.hbar .axis::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--axis); }
.hbar .axis i { position: absolute; top: 2px; height: 10px; }
.hbar .axis i.p { left: 50%; background: var(--hit); border-radius: 0 4px 4px 0; }
.hbar .axis i.n { right: 50%; background: var(--miss); border-radius: 4px 0 0 4px; }

/* ---------- groups ---------- */
.lb { list-style: none; margin: 0; padding: 0; }
.lb-row { display: grid; grid-template-columns: 28px 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; }
.lb-row + .lb-row { border-top: 1px solid var(--hairline); }
.lb-pos { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-weight: 750; font-size: 12.5px; background: var(--surface-2); color: var(--text-2); }
.lb-pos.p1 { background: linear-gradient(135deg, #f7d774, #d9a520); color: #2b1d00; }
.lb-pos.p2 { background: linear-gradient(135deg, #e5e9f0, #a9b2c0); color: #1a1f27; }
.lb-pos.p3 { background: linear-gradient(135deg, #f0b48a, #b8693a); color: #2a1305; }
.lb-row .grow { min-width: 0; }
.lb-row .grow b { display: block; font-weight: 620; overflow-wrap: anywhere; }
.lb-row .grow .meter { margin-top: 6px; height: 5px; }
.lb-row .grow .meter i { background: var(--prob); }
.lb-row .val { text-align: right; }
.lb-row .val b { display: block; font-weight: 680; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lb-row .val small { color: var(--text-3); }

/* ---------- settings ---------- */
.set-group { margin-top: 26px; }
.set-group > h2 { font-size: 14px; color: var(--text-3); font-weight: 600; letter-spacing: 0.02em; margin: 0 4px 10px; }
.set-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 15px 16px; }
.set-row + .set-row { border-top: 1px solid var(--hairline); }
.set-row .grow { flex: 1 1 150px; min-width: 0; }
.set-row .grow > b { display: block; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.set-row .grow > span { display: block; color: var(--text-3); font-size: 13px; margin-top: 1px; overflow-wrap: anywhere; }
.set-act { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-left: auto; max-width: 100%; }
.set-panel { padding: 0 16px 16px; }
.profile { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.profile h1 { font-size: 26px; overflow-wrap: anywhere; }

/* ---------- standalone pages (calculators, docs) ---------- */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 12px 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 720; font-size: 18px; letter-spacing: -0.04em; }
#nav { display: flex; gap: 2px; flex: 1; justify-content: flex-end; }
#nav a { color: var(--text-2); padding: 7px 12px; border-radius: 10px; font-weight: 560; font-size: 14px; }
#nav a:hover { color: var(--text); background: var(--surface-2); }
#nav a.on { color: var(--text); background: var(--surface-2); }
body:not(.app) main { max-width: 1080px; margin: 0 auto; padding: 28px 20px 80px; }
body:not(.app) main > h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.04em; margin: 8px 0 8px; }
.sub { color: var(--text-2); margin: 0 0 16px; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r); padding: 13px 15px; box-shadow: var(--shadow-card); min-width: 0; }
.tile .k { color: var(--text-3); font-size: 12.5px; font-weight: 560; }
.tile .v { font-size: 22px; font-weight: 680; letter-spacing: -0.03em; margin-top: 3px; }
.tile .s { color: var(--text-3); font-size: 12px; margin-top: 2px; }
body:not(.app) h2 { margin: 26px 0 10px; }
body:not(.app) .card h2 { margin-top: 0; }

/* embed mode */
body.embed .sidebar, body.embed .topbar, body.embed .tabbar { display: none !important; }
body.embed .shell { display: block; }
body.embed .content { padding: 12px 12px 24px; }

/* responsive placement helpers for the board rail */
@media (min-width: 1280px) { .only-narrow { display: none !important; } }
@media (max-width: 1279.98px) { .only-wide { display: none !important; } }
.rail:empty { display: none; }
.main { min-width: 0; }

/* ---------- re-renders, busy actions, keyboard ---------- */
/* the entry animation plays on a view's first paint only; live re-renders don't fade the page in again */
.settled .view { animation: none; }
/* busy(): the control stays focusable (aria-disabled) but reads as working */
.btn[aria-busy="true"], .icon-btn[aria-busy="true"], .chip[aria-busy="true"], .list-row[aria-busy="true"], .seg button[aria-busy="true"], .range button[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.drop[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.btn-text { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; }
/* rows that are links or buttons (group list, lock-in chances) */
.list > .lr + .lr { border-top: 1px solid var(--hairline); }
a.list-row, button.list-row { width: 100%; color: inherit; text-decoration: none; }
button.list-row { border: 0; background: none; font: inherit; text-align: left; }
.list-row.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 0; }
.ticket:focus { outline: none; }
.ticket:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
/* photo drop zone: the file input lives inside it, so it shows focus when you tab to the input */
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop:focus-within:not(:has(:focus-visible)) { outline: none; }
/* market search combobox */
.results [role="option"][aria-selected="true"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.results-msg { padding: 12px; font-size: 13.5px; }
.results-msg:empty { display: none; }

/* charts: drag to scrub on phones (vertical swipes still scroll the page) */
.chart.scrub svg { touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }

/* ---------- small screens ---------- */
.landing .hero-l, .landing .sec, .landing .works, .landing .foot { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.hero-label, .hero-top > :first-child { min-width: 0; }
.seg.modes { max-width: 100%; }
.seg.modes button { min-width: 0; }
@media (max-width: 420px) {
  .landing-nav nav .btn.sm { padding: 0 10px; }
  .toolbar .row { width: 100%; }
  .seg.modes { display: flex; }
  .seg.modes button { flex: 1 1 auto; justify-content: center; padding: 0 8px; }
  .seg.modes button svg { display: none; }
}

/* invite-only landing: the waitlist line under the sign-up buttons (shown by account.js when no invite came in) */
.wl-cta { margin: 14px 0 0; font-size: 14px; }
.wl-cta[hidden] { display: none; }
/* admin waitlist: plain checkboxes in the list (the global input style is for text fields) */
#invites input[type="checkbox"] { width: 18px; height: 18px; flex: none; margin: 0; padding: 0; accent-color: var(--brand, var(--prob)); }
#invites .list-row label > .grow { min-width: 0; }

/* board: tickets by when they finish, today's settled ones, typed-in legs that need a result, yesterday's line */
.tgroup + .tgroup { margin-top: 22px; }
.tgroup-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 4px 2px 10px; }
.tgroup-head h3 { font-size: 15px; font-weight: 650; }
.tgroup-n { color: var(--text-3); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tgroup-head .hint { color: var(--text-3); font-size: 12.5px; }
.tgroup-toggle { width: 100%; border: 0; background: none; padding: 8px 2px; text-align: left; color: inherit; border-top: 1px solid var(--hairline); align-items: center; }
.tgroup-toggle .chev { display: inline-grid; color: var(--text-3); transition: transform 0.2s var(--ease); transform: rotate(-90deg); }
.tgroup-toggle[aria-expanded="true"] .chev { transform: none; }
.tgroup.settled .more-link { margin-top: 12px; }
.nr .list-row { flex-wrap: wrap; row-gap: 10px; }
.nr-row .grow b { display: block; font-weight: 620; overflow-wrap: anywhere; }
.nr-row .grow span { display: block; font-size: 12.5px; margin-top: 2px; }
.nr-acts { display: flex; gap: 6px; align-items: center; margin-left: auto; }
@media (max-width: 520px) { .nr-acts { width: 100%; padding-left: 48px; } .nr-acts .btn { flex: 1; } }
.dayline { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow-card); }
.dayline .grow { flex: 1; min-width: 0; }
.dayline .grow b { display: block; font-weight: 640; }
.dayline .grow span { display: block; font-size: 12.5px; }
.dayline .dl-link { display: none; margin-left: 10px; font-weight: 600; }
@media (max-width: 520px) { .dayline .dl-btn { display: none; } .dayline .dl-link { display: inline; } }
/* stats: results by period */
.periods { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 16px; }
.periods .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.periods > span { font-size: 13px; }
.rday { margin-top: 24px; }
.rday .list-row { gap: 12px; }
.rday .rname { display: block; font-weight: 620; overflow-wrap: anywhere; }
.rday .list-row .grow > span { display: block; font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.rres { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.rres b { font-variant-numeric: tabular-nums; font-weight: 660; }
/* add: a typed-in leg's game day */
.cl-when { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-top: 8px; }
.cl-when label { margin: 0; font-size: 13px; color: var(--text-2); font-weight: 560; }
.cl-when input { width: auto; height: 36px; }
.cl-when span { font-size: 12px; }

/* landing: the rules and the questions (copy: outs-launch/marketing/landing-copy.md) */
.trust { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.trust .card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; }
.trust b { font-size: 15px; }
.trust p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.faq-wrap { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr); max-width: 1060px; margin: 0 auto; }
@media (min-width: 900px) { .faq-wrap { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; } .faq-side { position: sticky; top: 96px; } }
.faq-side > p { color: var(--text-2); font-size: 15.5px; line-height: 1.55; margin: 12px 0 18px; max-width: 380px; }
.faq details { padding: 0; }
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 620; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-weight: 500; font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
/* the admins' message to everyone, above every screen (app.js renderChrome) */
#banner:empty { display: none; }
#banner .app-banner { margin-bottom: 16px; }

/* Year-end summary (stats.js yearView) and its print view: just the numbers, black on white */
.yr-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.yr-t th, .yr-t td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.yr-t th[scope="row"], .yr-t thead th:first-child { text-align: left; white-space: normal; }
.yr-t th[scope="row"] { color: var(--text); font-weight: 600; }
.yr-t thead th { font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.yr-t tbody tr:last-child th, .yr-t tbody tr:last-child td { border-bottom: 0; }
.yr-note { font-size: 12.5px; max-width: 70ch; }
@media (max-width: 480px) { .yr-t .yr-ret { display: none; } .yr-t th, .yr-t td { padding: 9px 10px; } }
@media print {
  body { background: #fff !important; color: #000 !important; }
  .side, .side-nav, .tabbar, .topbar, .page-head .actions, .seg, .yr-actions, .fab, nav { display: none !important; }
  .card, .kpi { background: #fff !important; border: 1px solid #ccc !important; box-shadow: none !important; }
  .yr-t th, .yr-t td, .kpi .v, .kpi .k, .kpi .s, .t3, h1, h3, b, span { color: #000 !important; }
}
/* ---- player card (Stats, Insights; a crew-mate's profile): units, form, betting style ---- */
.player-card .pc-kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.form-dots { display: flex; gap: 5px; align-items: center; min-height: 34px; flex-wrap: wrap; }
.form-dots .fd { width: 11px; height: 11px; border-radius: 50%; display: inline-block; background: var(--text-3); }
.form-dots .fd.hit { background: var(--hit); }
.form-dots .fd.miss { background: var(--miss); }
.form-dots .fd.live { background: var(--live, var(--text-3)); }
.pc-persona { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.pc-persona h3 { margin: 2px 0 6px; font-size: 20px; }
.pc-persona ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.pc-persona.pending { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.pc-extra { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--hairline); display: grid; gap: 8px; }
.pc-extra li { display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.player-card { margin-bottom: 20px; }

/* ---- Crew Seasons: the crew's standings (units, never dollars) ---- */
.season-card { margin-bottom: 20px; }
.season-card .card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.standings { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings th { text-align: left; font-weight: 600; color: var(--text-3); font-size: 12px; padding: 4px 6px 6px; }
.standings td { padding: 9px 6px; border-top: 1px solid var(--hairline); vertical-align: middle; }
.standings td.rk { width: 44px; font-weight: 650; white-space: nowrap; }
.standings td.u { font-weight: 700; white-space: nowrap; }
.standings td.rec { white-space: nowrap; }
.standings td.nm a { color: var(--text); font-weight: 600; text-decoration: none; }
.standings tr.me td { background: var(--hairline); }
.standings .mv { font-size: 11px; margin-left: 4px; font-weight: 600; }
.standings .mv.up { color: var(--hit); }
.standings .mv.down { color: var(--miss); }
.standings .fm { white-space: nowrap; }
.standings td.fm .fd { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 3px; background: var(--text-3); }
.standings td.fm .fd.hit { background: var(--hit); }
.standings td.fm .fd.miss { background: var(--miss); }
.standings td.fm .fd.live { background: var(--live); }
@media (max-width: 420px) { .standings .fm { display: none; } .standings td, .standings th { padding-left: 4px; padding-right: 4px; } }

.pc-form { display: flex; align-items: center; gap: 10px; }
.season-card > .card-body { padding-top: 4px; }
@media (max-width: 360px) { .standings td.rec small { display: none; } .standings { font-size: 13px; } }

/* crew chat: the latest on the crew page, the conversation in a sheet */
.chat-card { margin-bottom: 24px; }
.ch-peek { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.ch-peek li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-peek b { color: var(--text); font-weight: 600; }
.ch-list { list-style: none; margin: 0; padding: 4px 2px 8px; display: flex; flex-direction: column; gap: 10px; height: min(56vh, 520px); min-height: 220px; overflow-y: auto; overscroll-behavior: contain; }
.ch-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 86%; }
.ch-msg.mine { align-self: flex-end; align-items: flex-end; }
.ch-who { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 0 0 3px 10px; text-decoration: none; }
.ch-bubble { background: var(--surface-3); border: 1px solid var(--hairline); border-radius: 16px; padding: 8px 12px; font-size: 14.5px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.ch-msg.mine .ch-bubble { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.ch-bubble p { margin: 0; }
.ch-bubble.gone { background: transparent; color: var(--text-3); font-style: italic; }
.ch-bubble[data-rm] { cursor: pointer; }
.ch-at { font-size: 11px; color: var(--text-3); margin: 3px 10px 0; }
.ch-card { margin-top: 6px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--hairline-2); color: var(--text); }
.ch-msg.mine .ch-card { background: rgba(0, 0, 0, 0.16); border-color: transparent; color: inherit; }
.ch-card b { display: block; font-size: 13.5px; }
.ch-card-sub { display: block; font-size: 12px; opacity: 0.8; }
.ch-card ul { margin: 6px 0 0; padding-left: 16px; font-size: 13px; }
.ch-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.ch-form textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; }
.ch-foot { font-size: 12px; margin: 10px 0 0; }
.ch-empty { align-self: center; margin: auto 0; }
.ch-err { margin: 8px 0 0; font-size: 13px; color: var(--miss-ink); }
