/* Mobile-first. Phones are the only real target — nothing here is a shrunk
   desktop layout.

   THE SYSTEM, and why each part is what it is:

   Surfaces are warm off-white paper in light and a deep forest ink in dark —
   the brand's green reads as the room the content sits in rather than as a
   colour applied on top of it.

   Colour does exactly one job per token:
     · accent (gold)  — brand and emphasis. Never carries data meaning.
     · conf-1/2/3     — SEQUENTIAL. Confidence is a magnitude, so it gets one
                        hue in three steps, light to dark. It deliberately does
                        NOT use green/red: a 91 is a strong read, not a win, and
                        colouring it green claims an outcome that hasn't
                        happened.
     · win / loss     — STATUS, reserved. Only ever a graded outcome.
     · gs             — one categorical marker, for scorer/shots markets.

   Every status and accent colour comes in two steps: the plain one is the MARK
   (fills, bars, swatches) and `-ink` is the TEXT step, which is darker or
   lighter as the mode needs to clear 4.5:1. Using a mark colour as text is what
   fails contrast, so the two are separated rather than compromised.

   Green and red cannot be told apart under deuteranopia — no hue choice fixes
   that. So W/L is NEVER colour alone: the badges carry the letter, the calendar
   carries the record, and the form strip encodes a win as a full-height bar and
   a loss as a half-height one. Colour is the fast channel; shape is the true one.

   All of this is checked by `web/theme.test.mjs`, which parses this file. If you
   change a value here and the suite goes red, the value is wrong, not the test. */

:root {
  color-scheme: light dark;

  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f2f0ea;
  --border: #e4e0d6;

  --text: #16211c;
  --dim: #5e6b64;

  --accent: #a8701a;
  --accent-ink: #7e5311;
  --accent-soft: #f6ead2;
  /* A filled control needs its own step: white on the mark-weight gold only
     reaches 4.2:1, so the fill goes a step darker and the label stays white.
     In dark mode the fill is light enough that the label flips to the page
     ink instead — the pair is chosen per mode, not inverted. */
  --accent-fill: #9a6616;
  --on-accent: #ffffff;

  --win: #1f8f5f;
  --win-ink: #187a4f;
  --loss: #c02a5c;
  --loss-ink: #b02652;
  --gs: #6b4fbf;

  /* Sequential, light → dark. Tier 1 is 70–79, tier 3 is 90+. */
  --conf-1-bg: #f8f0df;
  --conf-1-ink: #7e5311;
  --conf-2-bg: #f0dcb4;
  --conf-2-ink: #6b4510;
  --conf-3-bg: #e3c687;
  --conf-3-ink: #573708;

  --shadow-1: 0 1px 2px rgba(22, 33, 28, 0.05);
  --shadow-2: 0 1px 2px rgba(22, 33, 28, 0.05), 0 10px 28px -12px rgba(22, 33, 28, 0.18);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1512;
    --surface: #161d19;
    --surface-2: #1e2723;
    --border: #28332d;

    --text: #e8efea;
    --dim: #92a39a;

    --accent: #c08838;
    --accent-ink: #dca94f;
    --accent-soft: #2e2415;
    --accent-fill: #c08838;
    --on-accent: #0f1512;

    --win: #2e9e6a;
    --win-ink: #46b885;
    --loss: #c93c72;
    --loss-ink: #e06e98;
    --gs: #a78be0;

    --conf-1-bg: #241c0e;
    --conf-1-ink: #c08838;
    --conf-2-bg: #322613;
    --conf-2-ink: #d5a04a;
    --conf-3-bg: #43321a;
    --conf-3-ink: #e7bc6a;

    --shadow-1: none;
    --shadow-2: 0 10px 28px -14px rgba(0, 0, 0, 0.6);
  }
}

/* Teko is a DISPLAY face: the wordmark and section headings, where condensed
   caps do real work. It is deliberately kept off the figures — a display face
   on a number reads as decoration, and these numbers are the data. */
:root {
  --font-display: "Teko", "Public Sans", system-ui, sans-serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

/* Display face for figures and headings; the body face and the tabular one for
   anything that has to line up in a column. Each falls back to a system stack,
   so a blocked or slow font request costs polish, never legibility. */
:root {
  --font-display: "Teko", "Public Sans", system-ui, sans-serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* A display rule beats the hidden attribute, so anything shipping hidden would
   otherwise render. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.45;
}

body {
  min-height: 100dvh;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

/* --- chrome ------------------------------------------------------------- */

.app-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.app-bar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.app-bar h1 span { color: var(--text); font-weight: 600; }

.icon-btn {
  background: none;
  border: none;
  font-size: 1.15rem;
  padding: 6px;
  cursor: pointer;
  color: inherit;
}

/* Seven tabs don't fit a phone width, so the strip scrolls rather than
   cramming or wrapping. */
.tabs {
  position: sticky;
  top: 44px;
  z-index: 19;
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--dim);
  padding: 8px 14px;
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.tab.is-active {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--on-accent);
}

.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 16px 0;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.84rem;
}

.banner button:not(.banner-x) {
  background: var(--accent-fill);
  color: var(--on-accent);
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 600;
  cursor: pointer;
}

.banner-x {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  font-size: 0.95rem;
}

.status {
  margin: 14px 16px;
  color: var(--dim);
  font-size: 0.88rem;
}

main {
  padding: 14px 16px 0;
  max-width: 560px;
  margin: 0 auto;
}

/* --- scoreboard --------------------------------------------------------- */

.scoreboard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-1);
}

.sb-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.sb-figure { display: flex; flex-direction: column; }
/* The lead figures. Body sans and the font's own proportional digits: a
   display face here reads as decoration, and tabular digits give a number like
   121 a loose, gappy look at this size. Columns get tabular; headlines don't. */
.sb-figure strong {
  font-weight: 700;
  font-size: clamp(1.5rem, 1.15rem + 1.6vw, 1.95rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.sb-figure span { font-size: 0.72rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; }

/* A result sequence, newest last. Wins are full height, losses half — so the
   run reads as a shape before it reads as a colour, which is the only way this
   works for a red/green-blind reader. Bars sit on a shared baseline. */
.form-strip {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  margin-top: 12px;
  height: 14px;
}

.form-strip i {
  flex: 1 1 0;
  max-width: 16px;
  display: block;
  /* Square at the baseline, rounded at the data end. */
  border-radius: 3px 3px 0 0;
}

.form-w { height: 14px; background: var(--win); }
.form-l { height: 6px; background: var(--loss); }

.pill {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--dim);
}

.chip-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: 10px;
  padding-bottom: 2px;
}

.chip-row::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--dim);
  white-space: nowrap;
}

.chip b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; margin-left: 4px; }
.chip-good b { color: var(--win-ink); }
.chip-bad b { color: var(--loss-ink); }

.coverage { margin: 12px 2px 4px; font-size: 0.78rem; color: var(--dim); }

/* --- cards -------------------------------------------------------------- */

.day-head {
  margin: 20px 2px 8px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--dim);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-1);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}

.card-league {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.card-match { margin: 0 0 8px; font-size: 1rem; font-weight: 650; }

/* --- bets --------------------------------------------------------------- */

.bet {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}

.card > .bet:first-of-type { border-top: none; margin-top: 0; padding-top: 2px; }

/* An offset didn't clear the calibrated bar. De-emphasised, never hidden —
   it's a published, graded pick. */
.bet-offset { opacity: 0.72; }
.bet-offset .bet-line strong { color: var(--dim); }

.bet-pick { display: flex; align-items: center; padding-top: 3px; }
.bet-pick input { width: 20px; height: 20px; accent-color: var(--accent); }

/* Confidence is a magnitude, so the chip deepens with it: one hue, three
   steps. Body sans, not the display face — this is a value, not a headline. */
.conf {
  flex: 0 0 auto;
  min-width: 38px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.55;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--conf-1-bg);
  color: var(--conf-1-ink);
}

.conf-1 { background: var(--conf-1-bg); color: var(--conf-1-ink); }
.conf-2 { background: var(--conf-2-bg); color: var(--conf-2-ink); }
.conf-3 { background: var(--conf-3-bg); color: var(--conf-3-ink); }


/* Only an OFFSET gets the provisional treatment: muted fill and a dashed edge.
   Keying this off the confidence band instead would mark every sub-80 pick as
   below the bar, which is a different claim entirely — the bar is the board's
   calibration, not a fixed number. */
.bet-offset .conf {
  background: var(--surface-2);
  color: var(--dim);
  border: 1px dashed var(--loss);
}

.bet-body { flex: 1; min-width: 0; }
.bet-line { font-size: 0.88rem; }
.bet-line strong { color: var(--accent-ink); }
.bet-reason { margin: 4px 0 0; font-size: 0.8rem; color: var(--dim); }

.bet-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }

.tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--dim);
}

.tag-alt { color: var(--accent-ink); border-color: var(--accent-ink); }
.tag-offset { color: var(--loss-ink); border-color: var(--loss-ink); }
.tag-deep { color: var(--accent-ink); border-color: var(--accent-ink); }
.tag-win { color: var(--win-ink); border-color: var(--win-ink); }
.tag-loss { color: var(--loss-ink); border-color: var(--loss-ink); }

/* --- sharing ------------------------------------------------------------ */

.share-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 12px; }

.btn-share {
  background: var(--accent-fill);
  color: var(--on-accent);
  border: none;
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-share.small { padding: 6px 11px; font-size: 0.76rem; }

.btn-link {
  background: none;
  border: none;
  color: var(--accent-ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px;
}

/* --- results ------------------------------------------------------------ */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-1);
}

.panel-accent { border-color: var(--accent); }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.panel h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.panel-head h2 { margin: 0; }

.lines { list-style: none; margin: 12px 0 0; padding: 0; }

.line {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.line-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.line-match { font-size: 0.85rem; font-weight: 600; }
.line-bet { font-size: 0.76rem; color: var(--dim); }

.notice {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.83rem;
  margin-bottom: 12px;
}

.footnotes {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 0.79rem;
}

.footnotes h2 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 6px; }
.footnotes ul { margin: 0; padding-left: 18px; }

.empty { text-align: center; color: var(--dim); padding: 28px 12px; font-size: 0.88rem; }

/* Permanent and non-dismissable on every board and every result panel. */
.disclaimer {
  margin: 16px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--dim);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 40;
}

.digest-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: none;
}

.digest-link::after { content: " ↗"; font-size: 0.75rem; }

/* --- results calendar --------------------------------------------------- */

/* Results sub-tabs. Same scrolling-strip pattern as the main tab bar, one step
   down in weight so the two don't compete. */
.subtabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 0 14px;
  padding: 0 2px 2px;
}
.subtabs::-webkit-scrollbar { display: none; }

.subtab {
  flex: 0 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--dim);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.subtab.is-active {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--on-accent);
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}
.cal-head strong { font-size: 0.88rem; }

.cal-nav {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  /* 40px keeps both arrows at a comfortable tap target on a phone. */
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
}

.cal-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.cal-grid th {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dim);
  padding: 0 0 6px;
}
.cal-cell { padding: 2px; text-align: center; }

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 100%;
  min-height: 40px;
  padding: 4px 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: var(--dim);
  font: inherit;
  cursor: default;
}
.cal-num { font-family: var(--font-mono); font-size: 0.7rem; font-variant-numeric: tabular-nums; }
.cal-badge {
  font-size: 0.62rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cal-none { opacity: 0.35; }

button.cal-day { cursor: pointer; background: var(--surface-2); border-color: var(--border); }
button.cal-day .cal-num { color: var(--text); }

.cal-good .cal-badge { color: var(--win-ink); }
.cal-bad .cal-badge { color: var(--loss-ink); }
.cal-level .cal-badge { color: var(--dim); }
.cal-pending .cal-badge { color: var(--accent-ink); font-size: 0.9rem; }

.cal-day.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.cal-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 12px 2px 0;
  font-size: 0.68rem;
  color: var(--dim);
}
/* Each key item stays whole when the row wraps — a swatch stranded on the line
   above its label is worse than an extra line. */
.cal-keyitem { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

.cal-swatch {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: 0 0 auto;
}
.cal-swatch.cal-good { background: var(--win); }
.cal-swatch.cal-bad { background: var(--loss); }
.cal-swatch.cal-level { background: var(--dim); }
.cal-swatch.cal-pending { background: var(--accent); }

.tag-pending { color: var(--accent-ink); }


/* --- market track record ------------------------------------------------ */
/* A chip carries its hit rate as a bar as well as a number, so a glance across
   the row reads as a shape. A market the grading job has benched gets a red
   edge and says so — until now `deprioritized_markets` was fetched and never
   shown anywhere. */

.chip-card {
  flex: 0 0 auto;
  min-width: 148px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 11px;
}
.chip-card .name { font-size: 0.76rem; font-weight: 600; color: var(--text); }
.chip-card .rate {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--dim);
  margin-top: 2px;
}
/* A meter, so the track is a lighter step of the fill's OWN hue rather than a
   neutral: state reads across the whole bar, not only across the filled part.
   Square where it starts, rounded where the data ends. */
.chip-card .bar {
  height: 6px;
  border-radius: 0 3px 3px 0;
  background: var(--conf-1-bg);
  margin-top: 7px;
  overflow: hidden;
}
.chip-card .bar > span {
  display: block;
  height: 100%;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.chip-card.is-benched { border-color: var(--loss); }
.chip-card.is-benched .bar { background: color-mix(in oklab, var(--loss) 16%, var(--surface)); }
.chip-card.is-benched .bar > span { background: var(--loss); }
.chip-card .benched {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--loss-ink);
  margin-left: 4px;
}

/* Goalscorer and shots markets, marked on the board as well as on their tab. */
.tag-gs { color: var(--gs); border-color: var(--gs); }

/* --- selection bar ------------------------------------------------------ */
/* A live count beats a Select-all that gives no feedback: you can see what the
   share image is about to contain before you build it. */

.share-count {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  margin-right: auto;
}

/* --- empty states ------------------------------------------------------- */
/* A board with nothing on it is usually a board whose job hasn't run yet, not
   a broken one. Saying which, and that nothing is owed by the reader, is worth
   the three extra lines. */

.empty-state { text-align: center; padding: 44px 18px; }
.empty-state .glyph { font-size: 2rem; line-height: 1; margin-bottom: 10px; }
.empty-state h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--text);
}
.empty-state p {
  margin: 0 auto;
  max-width: 34ch;
  font-size: 0.84rem;
  color: var(--dim);
  line-height: 1.5;
}

/* --- interaction & motion ----------------------------------------------- */
/* Phone-first means touch-first: every control needs a pressed state, because
   there is no hover to tell you the tap registered. */

.tab,
.subtab,
.btn-share,
.btn-link,
.cal-nav,
button.cal-day {
  transition: background-color 140ms ease, border-color 140ms ease, transform 90ms ease;
  -webkit-tap-highlight-color: transparent;
}

.tab:active,
.subtab:active,
.btn-share:active,
.cal-nav:active,
button.cal-day:active {
  transform: scale(0.97);
}

/* Keyboard users get a ring; pointer users don't, so it never fires on tap. */
:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* The tab strips scroll; snapping stops a tab being left half off the edge. */
.tabs,
.subtabs,
.chip-row {
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}
.tab,
.subtab,
.chip-card { scroll-snap-align: start; }

/* Headings read better broken at sense boundaries than at the last word. */
h1, h2, h3, .empty-state h3 { text-wrap: balance; }
.bet-reason, .empty-state p { text-wrap: pretty; }

@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;
  }
}

/* Cards lift slightly off the page; the hairline does the real separating and
   the shadow only suggests depth. Dark mode drops the light shadow entirely,
   where a black blur just muddies the surface. */
.card, .panel { box-shadow: var(--shadow-2); }
