/* Sharp — shared design system.
 *
 * Loaded by the tips page (index.html), Multi and Performance.
 * Tokens first, then base elements, then the shared components: the top bar,
 * day headers, chips, the match card and the tip.
 * Performance and Multi keep most of their styles inline for now. */

:root {
  color-scheme: light;

  --font: "Helvetica Neue", Arial, Helvetica, sans-serif;

  --ink:        #16202b;
  --ink-soft:   #48586a;
  --ink-faint:  #8593a4;
  --line:       #dde4ec;
  --line-soft:  #eef2f6;
  --bg:         #f4f6f9;
  --surface:    #ffffff;
  --surface-2:  #f9fbfc;

  --accent:      #0a6847;   /* brand green */
  --accent-ink:  #075f40;
  --accent-wash: #e5f4ec;

  --tip:        #b8860b;    /* the gold "model + tipster agree" flag */
  --tip-ink:    #7a5b00;
  --tip-wash:   #fbf3dd;

  --warn-ink:   #8a5015;
  --warn-wash:  #fbf0e1;

  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 2px rgba(20, 32, 45, 0.06), 0 4px 16px rgba(20, 32, 45, 0.05);
  --maxw:       960px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font: inherit; }

:focus-visible {
  outline: 3px solid #166fdb;
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: 12px; z-index: 20; padding: 9px 12px;
  background: #fff; color: var(--ink); border: 2px solid var(--accent); border-radius: 6px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

main { max-width: var(--maxw); margin: 0 auto; padding: 18px 16px 64px; }
.page-title { margin: 4px 0 18px; font-size: 26px; line-height: 1.15; letter-spacing: -0.5px; }

h2 {
  font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--ink-soft); margin: 30px 0 12px;
}
section:first-of-type h2 { margin-top: 8px; }
.sec-count {
  font-size: 11px; font-weight: 800; letter-spacing: 0.4px; color: var(--accent-ink);
  background: var(--accent-wash); border-radius: 999px; padding: 2px 8px; margin-left: 6px;
}
.section-intro { color: var(--ink-soft); font-size: 13px; margin: -7px 0 12px; }
.briefing-intro { margin: 4px 0 24px; }
#app .briefing-intro h2 {
  margin: 0; font-size: 26px; font-weight: 800; line-height: 1.15;
  letter-spacing: -0.5px; text-transform: none; color: var(--ink);
}
.briefing-intro p { max-width: 560px; color: var(--ink-soft); margin: 7px 0 0; }
.briefing-empty { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 18px; }
.briefing-selections, .briefing-experts { margin-top: 26px; }
.briefing-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 0; font-weight: 700; }
.expert-view { margin-bottom: 10px; }
.highlights { margin-bottom: 24px; }
.fixture-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin: 26px 0 12px; padding-top: 16px; border-top: 2px solid var(--line);
}
.fixture-toolbar-label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--ink-soft); }
.group-toggle-set { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.group-toggle {
  min-height: 38px; border: 0; border-left: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); padding: 6px 11px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.group-toggle:first-child { border-left: 0; }
.group-toggle[aria-pressed="true"] { background: var(--ink); color: #fff; }
.sport-section { margin: 0 0 20px; }
.sport-toggle {
  width: 100%; min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--ink); font-size: 13px; font-weight: 800; text-align: left; cursor: pointer;
}
.sport-toggle::after { content: "Show"; color: var(--accent-ink); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.sport-toggle[aria-expanded="true"]::after { content: "Hide"; }
.sport-summary { margin-left: auto; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.sport-fixtures { margin-top: 2px; }
.sport-fixtures.is-collapsed { display: none; }

/* ── Top bar ──────────────────────────────────────────────────────────── */

.topbar {
  background: var(--ink); color: #fff;
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 13px 16px;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.brand { font-size: 19px; font-weight: 800; letter-spacing: -0.2px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark { color: #7fe0b0; }
.topbar-tag { color: #9fb0c0; font-size: 12px; margin-left: 10px; font-weight: 400; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: #c7d3df; font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; padding: 4px 9px; border-radius: 999px;
}
.nav a:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, 0.08); }
.nav a[aria-current="page"] { color: var(--ink); background: #7fe0b0; }

/* ── Day headers ──────────────────────────────────────────────────────── */

.day-group { margin: 0 0 20px; }
.day {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 800; letter-spacing: 0.2px;
  padding: 8px 13px; border-radius: var(--radius-sm); margin: 0 0 10px;
}
.day-rel {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px;
  color: #8fd7b8; white-space: nowrap;
}
.week-sep {
  display: flex; align-items: center; text-align: center; color: var(--ink-faint);
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  margin: 26px 0 14px;
}
.week-sep::before, .week-sep::after { content: ""; flex: 1; border-top: 2px dashed var(--line); }
.week-sep span { padding: 0 12px; white-space: nowrap; }

/* ── Chips, flags, badges ─────────────────────────────────────────────── */

.chip {
  display: inline-block; border-radius: 999px; padding: 2px 8px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.chip-strong   { background: var(--accent-wash); color: var(--accent-ink); }
.chip-lean     { background: #fff3cd; color: #7a5500; }
.chip-marginal { background: var(--line-soft); color: #415064; }

/* Positive EV at the recorded price, on a strong bet. */
.ev-pos { color: var(--accent-ink); font-weight: 700; }

/* Team badges: real club crests under /logos (SVG-wrapped PNGs), with
 * generated colored-initial SVGs as the fallback for any team not yet covered. */
.badge-logo { object-fit: contain; vertical-align: middle; margin-right: 6px; flex-shrink: 0; }
.vs { color: var(--ink-faint); font-weight: 700; font-size: 11px; text-transform: uppercase; margin: 0 7px; }

/* ── Match card ───────────────────────────────────────────────────────── */

.match {
 background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
 margin: 10px 0; overflow: hidden;
  scroll-margin-top: 56px;
}

.match-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 11px 15px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2);
}
.match-teams { font-weight: 700; font-size: 15px; display: flex; align-items: center; flex-wrap: wrap; }
.match-when { color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; text-align: right; }
.match-sport { color: var(--accent-ink); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }

/* Agreement band — does the crowd back our read? */
.agree {
  display: flex; align-items: center; gap: 8px; margin: 9px 0 7px; padding: 7px 10px;
  border-radius: 7px; font-size: 13px; font-weight: 600;
}
.agree-icon { font-weight: 700; flex-shrink: 0; }
.agree-consensus { background: var(--accent-wash); color: #14713f; }
.agree-diverge   { background: var(--warn-wash); color: var(--warn-ink); }
.agree-neutral   { background: var(--line-soft); color: #46586e; font-weight: 500; }
.agree-none      { background: var(--surface-2); color: var(--ink-faint); font-weight: 500; }
/* Who said what under a tip: tipsters and models on their own lines. */
.who-said { margin-top: 6px; display: grid; gap: 4px; }
.who-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 12px; }
.who-kind { color: var(--ink-faint); font-size: 11px; font-weight: 800; text-transform: uppercase;
            letter-spacing: .5px; min-width: 62px; }
.who { border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line); background: var(--surface); }
.who-agree { color: var(--accent-ink); border-color: #bfe0cf; }
.who-against { color: var(--warn-ink); border-color: #ecd3b4; }
.who i { color: var(--ink-faint); font-style: normal; }

/* The model's tip: the headline of every game card (overhaul phase 3). */
.page-intro { max-width: 640px; margin: -8px 0 18px; }
.mtip { padding: 12px 15px 4px; }
.mtip-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mtip-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--accent-ink); background: var(--accent-wash); border-radius: 999px; padding: 2px 9px;
}
.mtip-side { font-weight: 700; font-size: 16px; line-height: 1.2; }
.mtip-prob { font-weight: 800; font-size: 16px; color: var(--accent-ink); margin-left: auto; }
.mtip-nums { font-size: 12.5px; color: #64748b; margin-top: 5px; }
.mtip-nums b { color: #2c3947; }
.mtip-gap-pos { color: var(--accent-ink); font-weight: 700; }
.mtip-gap-neg { color: var(--warn-ink); font-weight: 700; }
.mtip-none { color: var(--ink-faint); font-size: 13px; }
.mtip-when { color: var(--ink-faint); font-size: 11.5px; margin: 6px 0 4px; }
.mtip-mkt { padding: 6px 0; }
.mtip-mkt + .mtip-mkt { border-top: 1px solid var(--line-soft); }
.mtip-mkt-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.mtip-mkt-name { color: var(--ink-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; }
.mtip-caveat { color: var(--warn-ink); font-size: 12px; margin-top: 3px; }
.chip-unproven { background: var(--warn-wash); color: var(--warn-ink); }
.mtip-experts { padding: 0 15px 10px; }

/* Strong bets (docs/overhaul_2026_09.md, phase 4; PRD section STB). A strong
   bet leads its card in the brand green. */
.match--strong { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow); }
.sbet { padding: 11px 15px 6px; background: var(--accent-wash); border-bottom: 1px solid #bfe0d0; }
.sbet-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sbet-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.7px;
  color: #fff; background: var(--accent-ink); border-radius: 999px; padding: 2px 8px;
}
.sbet-sel { font-weight: 700; font-size: 15px; }
.sbet-book { color: var(--ink-faint); font-size: 12px; text-transform: capitalize; }
.sbet .mtip-when { margin-bottom: 2px; }
.sbet-verdict { font-size: 12.5px; color: #2c3947; margin-top: 7px; }
.sbet-sub { color: var(--ink-faint); font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; margin-top: 9px; }
.sbet .agree { margin-top: 4px; background: var(--surface); }
/* The highlight list: each strong bet in full, above the fixtures. */
.sbet-cards { display: grid; gap: 10px; margin: 0 0 10px; }
.sbet-card { background: var(--surface); border: 1px solid var(--accent); border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); overflow: hidden; scroll-margin-top: 56px; }
.sbet-card .sbet { border-bottom: 0; }
.sbet-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 10px;
  padding: 9px 15px; font-size: 14px; font-weight: 700; border-bottom: 1px solid var(--line-soft); }
.sbet-card-head a { color: var(--ink); }

/* Tipster breakdown, collapsed by default. */
.ed-details { margin-top: 9px; scroll-margin-top: 56px; }
.ed-details > summary {
 cursor: pointer; list-style: none; font-size: 11px; font-weight: 700;
 text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink-faint);
  min-height: 40px; display: flex; align-items: center; padding: 6px 0; user-select: none;
}
.ed-details > summary::-webkit-details-marker { display: none; }
.ed-details > summary::before { content: "▸ "; color: #b3bfcc; }
.ed-details[open] > summary::before { content: "▾ "; }
.ed-body { margin-top: 5px; padding-top: 7px; border-top: 1px dashed var(--line); }
.ed-group {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  color: #9aa7b5; margin: 9px 0 3px;
}
.ed-row { display: flex; gap: 7px; align-items: baseline; font-size: 13px; margin: 4px 0; flex-wrap: wrap; }
.ed-icon { font-weight: 700; width: 13px; text-align: center; flex-shrink: 0; }
.ed-other .ed-icon { color: var(--ink-faint); }
.ed-source { font-weight: 700; white-space: nowrap; }
.ed-text { color: #415064; }
.ed-text a { color: #415064; }
.ed-units { color: var(--ink-faint); font-size: 12px; }

/* ── Shared states ────────────────────────────────────────────────────── */

.empty {
  padding: 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--ink-soft);
}

.note { padding: 10px 14px; border-radius: 7px; font-size: 13.5px; margin: 10px 0; }
.note-info { background: var(--line-soft); color: #46586e; }

.tip-panel { margin-top: 6px; border-left: 2px solid var(--line); padding-left: 8px; }
.tip-row { margin: 6px 0; }
.tip-src { font-weight: 600; font-size: 12px; }
.tip-kind { color: var(--ink-faint); font-weight: 400; font-size: 10px; text-transform: uppercase; margin-left: 5px; letter-spacing: .5px; }
.tip-record { color: var(--ink-soft); font-weight: 400; font-size: 11px; margin-left: 6px; }
.tip-call { font-size: 12px; }
.tip-mkts { margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px; }
.tip-mkt { font-size: 11px; background: #eef2f6; border: 1px solid var(--line); border-radius: 9px; padding: 1px 6px; white-space: nowrap; }
.tip-inferred { border-style: dashed; color: var(--ink-soft); background: transparent; }

@media (max-width: 620px) {
 .topbar-inner { align-items: flex-start; }
 .topbar-tag { display: none; }
  .fixture-toolbar { align-items: flex-start; flex-direction: column; }
  .group-toggle { min-height: 42px; }
 .match-head { flex-direction: column; align-items: flex-start; gap: 3px; }
  .match-when { text-align: left; }
}

/* What tips at this gap have historically claimed and won: shown only where
   the model's number has a measured record of being optimistic. */
.mtip-claim {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
  border-left: 2px solid var(--line);
  padding-left: 8px;
}

/* Strong-bets header on the tips page: heading, unproven chip, record link;
   the rule itself sits behind a toggle under the cards. */
.sbet-list-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 12px; }
.sbet-list .sbet-list-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.2px; text-transform: none; color: var(--ink); }
.sbet-record { margin-left: auto; font-size: 13px; font-weight: 700; }
.sbet-rule, .page-notes { font-size: 12.5px; color: var(--ink-soft); }
.sbet-rule > summary, .page-notes > summary {
  cursor: pointer; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--ink-faint); padding: 6px 0;
}
.sbet-rule p, .page-notes p { max-width: 640px; margin: 4px 0 8px; }
.page-notes { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line); }

/* A changed verdict says so where the bet is shown (PRD REC-007). */
.corrected { color: var(--ink-soft); font-size: 11px; white-space: nowrap; }

/* A tip's price older than the odds cycle says so (PRD PAG-006). */
.mtip-stale { color: var(--ink-soft); font-size: 11px; white-space: nowrap; }
