/* Stock Predictor — Sports Betting section. Uses the app's colour tokens, so light/dark just work. */
:root[data-section="sports"] .mode-switch, :root[data-section="sports"] #status-pill { display: none; }
.sec-switch { flex: none; }
.sec-switch button { padding: 5px 12px; }
:root[data-section="sports"] .sec-switch button[data-sec="sports"].on { color: var(--accent-ink); }

.spv { display: grid; gap: 12px; }
.spv-warn { padding: 8px 14px; border-radius: 10px; font-size: 12.5px; color: var(--text-2); border: 1px solid color-mix(in srgb, #fab219 45%, transparent); background: color-mix(in srgb, #fab219 10%, var(--surface)); }
.spv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.spv-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.spv-id h1 { font-size: 22px; }
.spv-lglogo { object-fit: contain; }
.spv-headside { display: flex; align-items: center; gap: 10px; }
.spv-tabs { margin-bottom: 0; align-items: flex-end; }
#spv-tools { margin-bottom: 0; }
.sp-ttab { display: inline-flex; align-items: center; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.sp-ttab.on { border-bottom-color: var(--accent); }
.sp-ttab .sp-ttab-main { display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px 8px 10px; border: 0; background: transparent; cursor: pointer; color: var(--text-2); font-weight: 600; }
.sp-ttab.on .sp-ttab-main, .sp-ttab .sp-ttab-main:hover { color: var(--text); }
.sp-ttab-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px 8px 4px 4px; font-size: 15px; line-height: 1; border-radius: 6px; }
.sp-ttab-x:hover { color: var(--down-text); }
.sp-ttab:first-of-type { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--border); }

.tm-logo { object-fit: contain; flex: none; }
.tm-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; background: var(--surface-3); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.02em; }

/* sidebar */
.sp-side-grp { padding: 10px 10px 2px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.sp-lg-btn, .sp-fav { grid-template-columns: minmax(0, 1fr) !important; }
.sp-fav { display: flex !important; gap: 8px; align-items: center; }
.sp-fav-head { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }

/* games */
.sp-slatenav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sp-slatenav .select { max-width: 320px; }
.sp-sum { margin: 0; }
.sp-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.gc { cursor: pointer; display: grid; gap: 6px; transition: border-color 0.15s, transform 0.15s; }
.gc:hover { border-color: var(--border-strong); }
.gc.is-live { border-color: color-mix(in srgb, var(--down) 50%, transparent); }
.gc-status { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; color: var(--text-2); font-weight: 600; }
.gc-live { color: #fff; background: var(--down); padding: 1px 7px; border-radius: 5px; font-size: 10.5px; letter-spacing: 0.08em; font-weight: 800; }
.gc-note { color: var(--muted); font-weight: 500; }
.gc-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 48px 34px; gap: 10px; align-items: center; }
.gc-row.focus .gc-name { color: var(--accent-ink); }
.gc-team { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.gc-team:hover .gc-name { text-decoration: underline; }
.gc-name { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.gc-rec { font-size: 11.5px; color: var(--muted); }
.gc-p { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600; }
.gc-p.fav { color: var(--text); font-weight: 750; }
.gc-score { text-align: right; font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--text-2); }
.gc-row.won .gc-score, .gc-row.won .gc-name { color: var(--text); }
.gc-bar { display: flex; height: 6px; border-radius: 6px; overflow: hidden; background: var(--surface-3); margin: 2px 0; }
.gc-bar span { display: block; height: 100%; }
.gc-bar .a { background: var(--series-2); }
.gc-bar .h { background: var(--accent); }
.gc-bar .dr { background: var(--neutral); }
.gc-draw { text-align: center; margin-top: -4px; }
.gc-lines { display: grid; gap: 3px; font-size: 12.5px; color: var(--text-2); border-top: 1px solid var(--border); padding-top: 8px; font-variant-numeric: tabular-nums; }
.gc-k { display: inline-block; min-width: 78px; color: var(--muted); font-size: 11.5px; }
.gc-pick strong { color: var(--text); }
.gc-edge { color: var(--text-2); }
.gc-edge.pos { color: var(--up-text); font-weight: 600; }
.gc-graded.ok { color: var(--up-text); }
.gc-graded.bad { color: var(--down-text); }

/* tables */
.sp-tlink { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--text); font-weight: 600; text-align: left; }
button.sp-tlink:hover span { text-decoration: underline; }
.sp-rk { color: var(--muted); }
.sp-form { display: inline-flex; gap: 2px; vertical-align: middle; }
.sp-form i { width: 7px; height: 14px; border-radius: 2px; background: var(--neutral); }
.sp-form i.w { background: var(--up); }
.sp-form i.l { background: var(--down); }
.sp-mv { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.sp-mv.up { color: var(--up-text); }
.sp-mv.down { color: var(--down-text); }
.sp-value { background: color-mix(in srgb, var(--up) 8%, transparent); }
.sp-heat { min-width: 26px; font-size: 11px; padding: 4px 3px !important; text-align: center !important; }
.sp-posgrid td, .sp-posgrid th { padding: 4px 4px; }
.sp-srow { cursor: pointer; }
.sp-srow:hover { background: var(--surface-2); }
.sp-res { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 5px; font-weight: 750; font-size: 11.5px; text-align: center; color: #fff; background: var(--muted); }
.sp-res.w { background: var(--up); }
.sp-res.l { background: var(--down); }
.sp-wp.fav { font-weight: 750; }
.sp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 13px; }
.sp-inj { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sp-inj-tag { color: var(--down-text); font-weight: 600; }

/* teams grid */
.sp-grp-title { margin: 10px 2px 8px; font-size: 13px; color: var(--text-2); }
.sp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.sp-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); border-top: 3px solid var(--accent); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; text-align: left; }
.sp-tile:hover { border-color: var(--border-strong); background: var(--surface-2); }
.sp-tile-name { font-weight: 700; }
.sp-tile-sub { font-size: 12px; color: var(--text-2); }

/* team page */
.sp-thead { --team: var(--accent); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(110deg, color-mix(in srgb, var(--team) 22%, var(--surface)), var(--surface) 65%); }
.sp-thead h1 { font-size: 26px; }
.sp-thead-side { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sp-thead-side a.btn-ghost { text-decoration: none; }
.sp-thead-side .btn-ghost.on { color: #9a6400; border-color: color-mix(in srgb, #fab219 55%, transparent); background: color-mix(in srgb, #fab219 14%, transparent); }
.sp-subtabs { margin: 12px 0; }
.sp-news { display: grid; gap: 12px; }
.sp-art { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; align-items: start; }
.sp-art img { width: 180px; height: 101px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.sp-art h3 a { color: var(--text); text-decoration: none; }
.sp-art h3 a:hover { text-decoration: underline; }
.sp-art p { margin: 6px 0 0; }

/* Polymarket tracker */
.pm-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: #2e5cff; color: #fff; font-weight: 800; font-size: 20px; }
.pm-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pm-input { flex: 1 1 320px; height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); }
.pm-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pm-found { display: grid; gap: 6px; margin-top: 10px; }
.pm-found-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 9px; background: var(--surface-2); }
.pm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.pm-stat { padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.pm-stat-k { font-size: 12px; color: var(--text-2); }
.pm-stat-v { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 2px; }
.pm-mkt { display: flex; gap: 8px; align-items: center; min-width: 220px; max-width: 420px; white-space: normal; }
.pm-mkt img { border-radius: 6px; object-fit: cover; flex: none; }
.pm-mkt a { color: var(--text); text-decoration: none; font-weight: 600; }
.pm-mkt a:hover { text-decoration: underline; }
.pm-status { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.pm-status.won { color: var(--up-text); background: color-mix(in srgb, var(--up) 14%, transparent); }
.pm-status.lost { color: var(--down-text); background: color-mix(in srgb, var(--down) 12%, transparent); }
.pm-avatar { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #2e5cff, #8a5cff); color: #fff; font-size: 28px; font-weight: 800; }
.pm-thead { --team: #2e5cff; grid-template-columns: auto minmax(0, 1fr); }
.pm-thead .sp-thead-side { grid-column: 1 / -1; justify-content: flex-start; align-items: center; }
.pm-thead .check { font-size: 13px; }
.pm-myfields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; }
.pm-myfields .select { max-width: none; width: 100%; }
.pm-betform { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.pm-betform > * { flex: 1 1 110px; min-width: 0; }
.pm-betform > input[type="text"]:first-of-type { flex: 3 1 200px; }
.pm-betform .select { max-width: none; width: 100%; }
.pm-betform .btn-primary { flex: 0 0 auto; }

@media (max-width: 1280px) { #spv-body .g-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .sec-switch { order: 2; }
  .sp-games { grid-template-columns: minmax(0, 1fr); }
  .sp-thead { grid-template-columns: auto minmax(0, 1fr); }
  .sp-thead-side { grid-column: 1 / -1; justify-content: flex-start; }
  .sp-art { grid-template-columns: minmax(0, 1fr); }
  .sp-art img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .sp-inj { grid-template-columns: minmax(0, 1fr); }
}
