:root {
  --ink: #0A1622;
  --panel: #101E2C;
  --foam: #E9EFF4;
  --slate: #8CA0B3;
  --brass: #C7A54A;
  --gain: #2F9E68;
  --loss: #D25B4E;
  --gutter: 16px;
  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--foam);
  font-family: var(--font-body);
  line-height: 1.5;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--foam);
}

a { color: var(--brass); }
a:visited { color: var(--brass); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brass);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus {
  left: var(--gutter);
  top: var(--gutter);
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--panel);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brass);
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--slate);
  border: 1px solid var(--slate);
  border-radius: 4px;
  padding: 2px 6px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

nav button,
.subnav button {
  background: var(--panel);
  color: var(--foam);
  border: 1px solid var(--panel);
  border-radius: 4px;
  padding: 6px 10px;
  font-family: var(--font-body);
  cursor: pointer;
}

nav button[aria-current="page"],
.subnav button[aria-current="page"] {
  border-color: var(--brass);
  color: var(--brass);
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

main#view {
  padding: 16px 0 48px;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

button {
  background: var(--panel);
  color: var(--foam);
  border: 1px solid var(--slate);
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
}

button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 480px;
  margin: 12px 0 24px;
  padding: 12px;
  background: var(--panel);
  border-radius: 6px;
}

label {
  font-size: 0.9rem;
  color: var(--slate);
}

input, select, textarea {
  background: var(--ink);
  color: var(--foam);
  border: 1px solid var(--slate);
  border-radius: 4px;
  padding: 6px 8px;
  max-width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 8px;
}

fieldset {
  border: 1px solid var(--slate);
  border-radius: 6px;
  margin: 8px 0;
  padding: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  margin: 12px 0;
}

caption {
  text-align: left;
  font-family: var(--font-display);
  text-transform: uppercase;
  margin-bottom: 6px;
}

th, td {
  border-bottom: 1px solid var(--panel);
  padding: 6px 8px;
  text-align: left;
}

dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
}

dt { color: var(--slate); }
dd { margin: 0; font-family: var(--font-mono); }

.sample-banner {
  background: var(--brass);
  color: var(--ink);
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 4px;
  display: inline-block;
}

.practice-banner {
  background: var(--panel);
  border: 1px solid var(--brass);
  color: var(--brass);
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 4px;
  display: inline-block;
}

.lapsed-notice, .error-notice {
  color: var(--loss);
  border: 1px solid var(--loss);
  border-radius: 4px;
  padding: 8px;
}

.no-lean {
  color: var(--slate);
  font-style: italic;
}

.outcome-win { color: var(--gain); }
.outcome-loss { color: var(--loss); }
.outcome-neutral { color: var(--slate); }

.bet-card, .venue-card, .lesson-card {
  border: 1px solid var(--panel);
  border-radius: 6px;
  padding: 10px;
  margin: 10px 0;
  background: var(--panel);
}

#status {
  font-family: var(--font-mono);
  color: var(--slate);
  padding: 8px 0 24px;
  min-height: 1.2em;
}

:focus {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: 2px solid var(--brass);
}

@media (max-width: 400px) {
  table { font-size: 0.85rem; }
  .site-header { flex-direction: column; align-items: flex-start; }
  nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- HX: Command Board direction B (owner-selected 2026-09-24) ---------------- */
:root { --panel2: #15273A; --line: #22384D; --brass-hi: #E3C878; --sel: #2a2412; }
[tabindex="-1"]:focus { outline: none; box-shadow: none; }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted, .meta { color: var(--slate); }
.meta { font-family: var(--font-mono); font-size: 0.78rem; }
.sample-tag { font: 600 0.62rem var(--font-mono); color: var(--ink); background: var(--brass); border-radius: 3px; padding: 1px 5px; letter-spacing: 0.04em; }
.sample-banner { display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--ink); background: var(--brass); border-radius: 4px; padding: 4px 10px; margin: 0 0 10px; }
.empty { color: var(--slate); border: 1px dashed var(--line); border-radius: 6px; padding: 10px 12px; margin: 6px 0; }
.warn { font-size: 0.82rem; color: #E6C98A; background: #2a2110; border-radius: 4px; padding: 6px 8px; margin: 6px 0; }
.warn.over { border-left: 3px solid var(--brass); }
.invalid { font-size: 0.85rem; font-weight: 600; color: var(--foam); background: #3a1c18; border: 1px solid var(--loss); border-radius: 4px; padding: 8px 10px; margin: 6px 0; }
.flag, .flag-inline { color: #E6C98A; }
.flag { background: #2a2110; border-radius: 4px; padding: 6px 10px; }
.flag-inline { display: block; font-size: 0.78rem; margin-top: 2px; }
.no-lean { font-style: italic; color: var(--slate); }
.prompts { font-size: 0.85rem; color: var(--slate); }
.section { font-size: 1.1rem; margin: 18px 0 8px; }
a.more { font-weight: 600; }
button.link { background: none; border: 0; color: var(--brass); text-decoration: underline; padding: 4px 0; cursor: pointer; min-height: 32px; }
button.link.strong { font-weight: 700; }
button.primary { background: var(--brass); color: var(--ink); border: 1px solid var(--brass); font-weight: 700; border-radius: 6px; padding: 8px 12px; min-height: 40px; cursor: pointer; }
button.secondary { background: var(--panel2); color: var(--foam); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; min-height: 40px; cursor: pointer; }
button:disabled { opacity: 0.55; cursor: not-allowed; }

/* shell: board + persistent planning card */
.shell { display: block; }
.shell.with-planner { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
#view { padding-bottom: 72px; }

/* board layout */
.board-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; align-items: start; }
nav.board-side { display: block; margin: 0; position: sticky; top: 8px; border-right: 1px solid var(--line); padding-right: 8px; }
.side-h { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--slate); margin: 12px 0 4px; }
.side-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; color: var(--foam); text-decoration: none; min-height: 34px; font-size: 0.9rem; }
.side-item:visited { color: var(--foam); }
.side-item:hover { background: var(--panel); }
.side-item.pinned { border-left: 3px solid var(--brass); background: var(--panel); }
.side-item .n { margin-left: auto; font: 0.72rem var(--font-mono); color: var(--slate); }
.side-item.edit { color: var(--brass); margin-top: 8px; }
.glyph { color: var(--brass); flex: none; }
.board-main { min-width: 0; }
.real-spotlight { border: 2px solid var(--foam); border-radius: 8px; background: var(--panel); padding: 14px; margin: 0 0 22px; }
.real-spotlight h2 { margin: 0 0 4px; }
.real-spotlight > .meta { margin: 0 0 12px; }
.real-spotlight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.real-spotlight-card { min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: var(--panel2); }
.real-spotlight-card h3 { margin: 0 0 8px; font: 700 0.9rem var(--font-body); }
.real-spotlight-card p { margin: 0 0 7px; overflow-wrap: anywhere; }
.real-spotlight-card a { display: inline-block; padding: 8px 0; min-height: 44px; }
@media (max-width: 700px) { .real-spotlight-grid { grid-template-columns: minmax(0, 1fr); } }
.ticker { display: flex; list-style: none; padding: 0; margin: 0 0 10px; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); scrollbar-width: thin; }
.ticker li { flex: none; }
.tick { display: flex; gap: 6px; align-items: baseline; padding: 6px 12px; border-right: 1px solid var(--line); color: var(--foam); text-decoration: none; font-size: 0.8rem; white-space: nowrap; }
.tick:visited { color: var(--foam); }
.tick-sport { font: 600 0.68rem var(--font-mono); color: var(--brass-hi); text-transform: uppercase; }
.story-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st { display: flex; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-width: 0; }
.st-art { flex: none; width: 56px; height: 56px; display: grid; place-items: center; background: var(--panel2); border-radius: 6px; }
.st-copy { min-width: 0; }
.st h3 { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 0.92rem; margin: 0 0 4px; line-height: 1.3; }
.st h3 a, .st h3 a:visited { color: var(--foam); text-decoration: none; }
.st h3 a:hover { text-decoration: underline; }
.st p { margin: 0; }
.news-note { margin: 6px 0 10px; }
.news-list { display: grid; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.chip { background: var(--panel); color: var(--foam); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; min-height: 34px; font-size: 0.85rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.chip[aria-pressed="true"] { background: var(--brass); color: var(--ink); border-color: var(--brass); font-weight: 700; }
a.chip.edit, a.chip.edit:visited { color: var(--brass); }
.in-season { font-size: 0.82rem; margin: 0 0 8px; }
.board-group { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); margin: 0 0 12px; overflow: hidden; }
.board-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.board-title { margin: 0; font-size: 1rem; }
.board-title a, .board-title a:visited { color: var(--foam); text-decoration: none; }
.board-head .meta { margin-left: auto; }
.board-group > .empty { margin: 10px 12px; }
table.board { width: 100%; border-collapse: collapse; }
table.board th, table.board td { border: 0; border-top: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
table.board thead th { border-top: 0; font: 600 0.66rem var(--font-mono); letter-spacing: 0.08em; color: var(--slate); text-transform: uppercase; padding-top: 6px; padding-bottom: 6px; }
table.board th.ev { font-weight: 400; width: 34%; }
.ev-name, .ev-name2 { display: block; font-family: var(--font-body); font-weight: 700; color: var(--foam); text-decoration: none; }
a.ev-name:visited { color: var(--foam); }
a.ev-name:hover { text-decoration: underline; }
.rec { display: block; font: 0.72rem var(--font-mono); color: var(--slate); }
.picks { display: flex; flex-wrap: wrap; gap: 4px; }
.pick { display: inline-flex; justify-content: space-between; align-items: baseline; gap: 8px; background: var(--panel2); color: var(--foam); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; min-height: 36px; min-width: 88px; cursor: pointer; text-align: left; }
.pick.compact { flex-direction: column; align-items: flex-start; gap: 0; font-size: 0.8rem; padding: 4px 8px; min-width: 76px; }
.pick:hover { border-color: var(--slate); }
.pick[aria-pressed="true"] { border-color: var(--brass); background: var(--sel); box-shadow: inset 0 0 0 1px var(--brass); }
.pick b, .price { font-family: var(--font-mono); color: var(--brass-hi); font-weight: 600; }
td.mkts { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.mkt-name { display: block; font: 0.7rem var(--font-mono); color: var(--slate); margin-bottom: 2px; }
td.nomkt { color: var(--slate); font-size: 0.85rem; }
.more-tools { margin-top: 16px; }

/* sport and event detail: comparisons, facts, markets */
.sport-head { display: flex; align-items: center; gap: 10px; }
table.compare { width: 100%; max-width: 640px; border-collapse: collapse; margin: 8px 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
table.compare caption { text-align: left; font: 0.72rem var(--font-mono); color: var(--slate); padding: 4px 0; }
table.compare th, table.compare td { border: 0; border-top: 1px solid var(--line); padding: 6px 10px; text-align: center; }
table.compare thead th { border-top: 0; font-family: var(--font-display); text-transform: uppercase; font-size: 1rem; }
table.compare .k { font: 0.7rem var(--font-mono); color: var(--slate); text-transform: uppercase; }
.facts { margin: 0 0 12px; padding-left: 18px; font-size: 0.9rem; }
.tape-box { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; margin: 0 0 10px; background: var(--panel); }
.tape-box summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.market { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.market-name { font: 600 0.8rem var(--font-mono); text-transform: none; letter-spacing: 0; color: var(--slate); margin: 0 0 6px; }
.market .pick { flex: 1 1 120px; }
.rules { font-size: 0.75rem; color: var(--slate); margin: 6px 0 0; }
.coverage { margin: 14px 0; }
.coverage summary { cursor: pointer; min-height: 32px; }
.story-detail { max-width: 70ch; }
.kicker { font: 600 0.72rem var(--font-mono); color: var(--brass-hi); letter-spacing: 0.06em; }

/* customize */
.custom-list { padding-left: 22px; max-width: 640px; }
.custom-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.custom-name { flex: 1 1 160px; }
.custom-row button { min-width: 40px; min-height: 36px; }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 12px 0; max-width: 640px; }
fieldset label { display: block; padding: 4px 0; }

/* planning card */
/* The card starts below the ~70px site header; its height leaves room for that so the
   actions are visible at the first scroll position as well as once it sticks (N16). */
.planner { position: sticky; top: 8px; background: var(--panel); border: 1px solid var(--brass); border-radius: 10px; padding: 12px; margin-top: 12px;
  max-height: calc(100vh - 96px); display: flex; flex-direction: column; }
.planner[hidden] { display: none; }
.planner-head h2 { margin: 0; font-size: 1.25rem; }
.planning-only { margin: 2px 0 8px; font: 0.7rem var(--font-mono); color: var(--brass-hi); letter-spacing: 0.04em; }
.mode { display: flex; gap: 6px; margin-bottom: 8px; }
.mode button { flex: 1; background: var(--panel2); color: var(--foam); border: 1px solid var(--line); border-radius: 4px; min-height: 36px; cursor: pointer; }
.mode button[aria-pressed="true"] { border-color: var(--brass); background: var(--sel); }
.planner-scroll { overflow-y: auto; flex: 1 1 auto; min-height: 60px; padding-right: 4px; }
.planner-foot { flex: none; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; background: var(--panel); }
.leg { border-top: 1px solid var(--line); padding: 8px 0; }
.leg:first-child { border-top: 0; }
.leg.stale { opacity: 0.6; }
.leg.conflict { border-left: 3px solid var(--loss); padding-left: 8px; }
.leg p { margin: 2px 0; }
.leg-top { display: flex; justify-content: space-between; gap: 8px; }
.leg-line { display: flex; align-items: flex-end; gap: 10px; }
.leg-line .field { flex: 0 1 120px; margin: 4px 0; }
.warn-inline { color: #E6C98A; }
.field { margin: 6px 0; }
.field label { display: block; font-size: 0.8rem; color: var(--slate); }
.field input { width: 100%; background: var(--ink); color: var(--foam); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; min-height: 36px; }
.field .hint { display: block; font-size: 0.72rem; color: var(--slate); margin-top: 2px; }
.limits-box { margin: 8px 0; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.limits-box summary { cursor: pointer; font-size: 0.85rem; min-height: 32px; display: flex; align-items: center; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font: 0.8rem var(--font-mono); margin: 0 0 6px; }
.totals dd { margin: 0; text-align: right; }
.planner-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.planner-actions > button.primary { flex: 1 1 100%; }
.copy-controls { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.copy-controls > button.secondary { flex: 1 1 100%; }
.copied { margin: 0; font-size: 0.8rem; color: var(--foam); background: var(--panel2); border-radius: 4px; padding: 6px 8px; flex: 1 1 100%; }
.checklist li { margin: 4px 0; }
.plan-table { width: 100%; max-width: 900px; border-collapse: collapse; }
.plan-table th, .plan-table td { border-top: 1px solid var(--line); padding: 6px 8px; text-align: left; }

/* assistant dock */
.dock-toggle { position: fixed; left: 16px; bottom: 16px; z-index: 30; background: #1B4D6B; color: var(--foam); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font-weight: 700; min-height: 44px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); cursor: pointer; }
.dock-toggle[hidden] { display: none; }
.dock { position: fixed; left: 16px; bottom: 72px; width: 400px; max-width: calc(100vw - 32px); max-height: 70vh; overflow-y: auto; z-index: 31; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5); }
.dock[hidden] { display: none; }
.dock-head { display: flex; align-items: center; gap: 8px; }
.dock-head h2 { margin: 0; font-size: 1.1rem; margin-right: auto; }
.shares { font-size: 0.85rem; }
.dock-log { display: grid; gap: 8px; margin: 8px 0; }
.msg { border-radius: 8px; padding: 6px 10px; background: var(--panel2); }
.msg.me { justify-self: end; background: #1B4D6B; max-width: 85%; }
.msg p { margin: 2px 0; }
.dock-form { display: flex; gap: 6px; }
.dock-form input { flex: 1; min-height: 40px; background: var(--ink); color: var(--foam); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; }

.planner-bar { display: none; }

/* narrower desktops: planner stays, side list becomes a row */
@media (max-width: 1180px) {
  .board-layout { grid-template-columns: minmax(0, 1fr); }
  nav.board-side { position: static; display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 8px; scrollbar-width: thin; }
  .side-h { display: none; }
  .side-item { flex: none; background: var(--panel); border: 1px solid var(--line); }
  .side-item.pinned { border-left-width: 3px; }
  .story-strip { grid-template-columns: minmax(0, 1fr); }
}

/* phone: stacked board rows, planner as a bottom sheet */
@media (max-width: 760px) {
  .shell.with-planner { display: block; }
  /* SA-05: every tab stays visible on a phone. The old single scrolling row hid the last tabs past the edge with
     no scroll bar; a wrapping grid shows all eight (3 columns at 320 px, 4 at 390 px) as 44 px touch targets. */
  .site-header nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; width: 100%; margin-left: 0; }
  .site-header nav button { min-height: 44px; min-width: 0; padding: 6px 4px; font-size: 0.85rem; white-space: normal; overflow-wrap: anywhere; }
  .subnav button { min-height: 44px; }
  table.board thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.board, table.board tbody { display: block; width: 100%; }
  table.board tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 6px; border-top: 1px solid var(--line); padding: 6px 8px; }
  table.board th.ev { grid-column: 1 / -1; width: auto; border-top: 0; padding: 0 0 4px; }
  table.board td { display: block; border-top: 0; padding: 0; min-width: 0; }
  table.board td.nomkt { grid-column: 1 / -1; }
  table.board .picks { flex-direction: column; }
  table.board.bouts tr { grid-template-columns: minmax(0, 1fr); }
  table.board.bouts .picks { flex-direction: row; }
  table.board td[data-label]::before { content: attr(data-label); display: block; font: 0.66rem var(--font-mono); color: var(--slate); text-transform: uppercase; letter-spacing: 0.06em; }
  table.board.bouts td.mkts::before { display: none; }
  .pick.compact { min-width: 0; width: 100%; }
  table.board.bouts .pick.compact { width: auto; flex: 1 1 42%; }
  td.mkts { gap: 6px 10px; }
  .board-head .meta { display: none; }
  .planner { position: fixed; left: 0; right: 0; bottom: 48px; top: auto; margin: 0; border-radius: 16px 16px 0 0; max-height: 72vh; z-index: 25; display: none; }
  .shell.sheet-open .planner:not([hidden]) { display: flex; }
  .planner-bar:not([hidden]) { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 26; width: 100%; background: #2a2412; color: var(--brass-hi); border: 0; border-top: 2px solid var(--brass); border-radius: 0; padding: 12px 16px; font: 600 0.85rem var(--font-mono); text-align: left; min-height: 48px; cursor: pointer; }
  /* SPS-05C: a floating button covered the first Real odds game. On a phone the Assistant button sits in the
     header's top-right corner and scrolls with the page, so it never lies over content; its panel opens below it. */
  .dock-toggle { position: absolute; top: 12px; right: var(--gutter); bottom: auto; left: auto; box-shadow: none; }
  .dock { position: absolute; top: 64px; left: 8px; right: 8px; width: auto; bottom: auto; max-height: 70vh; }
  body { padding-bottom: 120px; }
  .plan-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .plan-table, .plan-table tbody, .plan-table tr, .plan-table td { display: block; width: 100%; }
  .plan-table tr { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 10px; padding: 6px 10px; }
  .plan-table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 0; text-align: right; }
  .plan-table td::before { content: attr(data-label); color: var(--slate); text-align: left; flex: none; }
  table.compare thead th { font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* SCB-N23: product choice on the signed-out page */
.product-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 16px 0 24px; }
.product-choice > h2 { grid-column: 1 / -1; margin: 0; }
.product-choice article { background: var(--panel); border: 1px solid var(--panel); border-radius: 8px; padding: 16px; }
.product-choice article h3 { margin-top: 0; }

/* SCB-N18: the data legend on every page */
.data-legend { border-top: 1px solid var(--panel); margin: 32px 16px 16px; padding-top: 12px; font-size: 13px; color: var(--slate, #8CA0B3); }

/* SCB-N28: real facts use their own foam-on-slate label, distinct from the brass SAMPLE banner */
.real-banner { border: 2px solid var(--foam, #E9EFF4); padding: 10px 12px; border-radius: 6px; font-weight: 600; }
.real-tag { display: inline-block; border: 1px solid var(--foam, #E9EFF4); padding: 1px 6px; border-radius: 4px; font-size: 12px; letter-spacing: 1px; }
.fact-card { background: var(--panel); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
.fact-card h3 { margin: 0 0 6px; }
.fact { margin: 4px 0; }
.fact-label { color: var(--slate, #8CA0B3); }
.table-scroll { overflow-x: auto; max-width: 100%; }
.coverage-table { border-collapse: collapse; font-size: 13px; }
.coverage-table th, .coverage-table td { border-bottom: 1px solid var(--panel); padding: 4px 8px; text-align: left; vertical-align: top; }

/* SCB-N38: last season's facts are labeled historical, apart from current real facts */
.odds-banner { border: 2px solid var(--brass, #C7A54A); padding: 10px 12px; border-radius: 6px; font-weight: 600; }
.contract-banner { border: 2px solid var(--slate, #8CA0B3); padding: 10px 12px; border-radius: 6px; font-weight: 600; }
.odds-card, .contract-card { border-top: 1px solid var(--line, rgba(140, 160, 179, 0.35)); padding: 8px 0; overflow-wrap: anywhere; }
.historical-banner { border: 2px dashed var(--slate, #8CA0B3); padding: 8px 12px; border-radius: 6px; font-weight: 600; }

/* ---- AUTH-01: sign-in first (brand palette; no external fonts or scripts) ---- */
#view:has(> .auth-card) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  max-width: 1040px;
}
#view > .auth-card:first-child { grid-row: span 2; }
#view > .product-choice { grid-column: 2; }
.auth-card {
  background: var(--panel);
  border: 1px solid rgba(140, 160, 179, 0.25);
  border-top: 3px solid var(--brass);
  border-radius: 10px;
  padding: 20px 22px 22px;
}
.auth-card h1 { margin: 0 0 6px; font-size: 1.9rem; }
.auth-card h2 { margin: 18px 0 10px; font-size: 1.25rem; color: var(--brass); }
.auth-lede { color: var(--slate); margin: 0 0 8px; }
.auth-notice {
  border-left: 3px solid var(--brass);
  background: rgba(199, 165, 74, 0.10);
  padding: 8px 12px;
  margin: 10px 0;
  border-radius: 4px;
}
.auth-form { display: grid; gap: 6px; max-width: 420px; }
.auth-form label { color: var(--slate); font-size: 0.92rem; margin-top: 6px; }
.auth-form input[type="email"], .auth-form input[type="password"], .auth-form input[type="text"] {
  background: var(--ink);
  color: var(--foam);
  border: 1px solid rgba(140, 160, 179, 0.45);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  min-height: 44px;
}
.auth-form input:focus-visible, .auth-card button:focus-visible, .auth-card summary:focus-visible {
  outline: 2px solid #E3C878;
  outline-offset: 2px;
}
.auth-form .check { display: flex; gap: 8px; align-items: center; margin: 6px 0 0; }
.auth-form .check label { margin: 0; color: var(--foam); }
.auth-form .hint { color: var(--slate); font-size: 0.85rem; margin: 0; }
.auth-card button.primary {
  background: var(--brass);
  color: var(--ink);
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 700;
  min-height: 44px;
  margin-top: 10px;
  cursor: pointer;
}
.auth-card button.primary:hover { background: #E3C878; }
.auth-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0; }
.link-btn {
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 3px;
  font: inherit;
  cursor: pointer;
  min-height: 32px;
}
.auth-code { margin: 8px 0 4px; }
.auth-code summary { cursor: pointer; color: var(--slate); padding: 6px 0; }
.social-row { display: grid; gap: 8px; max-width: 420px; margin-top: 8px; }
.social-row .auth-or { color: var(--slate); margin: 6px 0 0; }
.social-btn {
  background: var(--foam);
  color: var(--ink);
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
}
@media (max-width: 760px) {
  #view:has(> .auth-card) { grid-template-columns: minmax(0, 1fr); }
  #view > .auth-card:first-child { grid-row: auto; }
  #view > .product-choice { grid-column: auto; }
  .auth-card { padding: 16px; }
  .auth-card h1 { font-size: 1.55rem; }
  .auth-form, .social-row { max-width: none; }
}

/* SPS-09: a sign-up problem sits beside the sign-up buttons (brass, not the red reserved for market losses). */
.form-error { margin: 12px 0 0; padding: 8px 12px; border-left: 3px solid var(--brass); background: var(--panel2); color: var(--foam); border-radius: 4px; }
.form-error[hidden] { display: none; }
input[aria-invalid="true"] { outline: 2px solid var(--brass); outline-offset: 2px; }
