/* =====================================================================
   Adam's Sports Dashboard — modern dark sports app
   ===================================================================== */

:root {
  --bg: #0a0d18;
  --bg-2: #0e1322;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #eef1fb;
  --text-2: #c9cee0;
  --muted: #8089a8;

  --accent: #ffcb05;
  --accent-2: #ffe27a;

  --f1: #ff3b30;
  --f1-2: #ff7a6e;
  --rugby: #2dd078;
  --rugby-2: #6cf2a3;
  --club: #5fa8e6;
  --club-2: #8ec3ee;
  --news: #b07aff;

  --redbull: #1e41ff;
  --leinster: #003c71;

  --good: #2dd078;
  --bad: #ff4d6d;

  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1400px 700px at 8% -10%, rgba(30, 65, 255, 0.18) 0%, transparent 55%),
    radial-gradient(1100px 600px at 110% 5%,  rgba(176, 122, 255, 0.16) 0%, transparent 55%),
    radial-gradient(900px 500px at 50% 100%,  rgba(45, 208, 120, 0.10) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

a { color: inherit; }
img { max-width: 100%; }

/* Display font for headings + numbers */
h1, h2, h3, .display, .hero-title, .hero-countdown, .score, .stat-num {
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.01em;
}
.score, .hero-countdown, .feed-when, .stat-num {
  font-variant-numeric: tabular-nums;
}

/* =====================================================================
   Top bar + sticky tab nav
   ===================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px 24px;
  background: rgba(10, 13, 24, 0.72);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark {
  position: relative; width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; overflow: hidden; flex-shrink: 0;
}
.brand-mark-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--redbull) 0%, var(--leinster) 60%, var(--f1) 130%);
}
.brand-mark-emoji { position: relative; font-size: 22px; }

.brand-text h1 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.1; }
.brand-text .tagline { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.nav-tabs {
  position: relative;
  display: flex; gap: 4px; justify-content: center;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  position: relative; z-index: 1;
  padding: 8px 16px; font-size: 13.5px; font-weight: 500;
  color: var(--text-2); text-decoration: none; border-radius: 999px;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.nav-tab:hover { color: var(--text); }
.nav-tab.active { color: #0b0f1a; font-weight: 600; }

.nav-indicator {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(255, 203, 5, 0.35);
  transition: transform 0.32s cubic-bezier(.5, 1.5, .4, 1), width 0.32s cubic-bezier(.5, 1.5, .4, 1);
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.last-updated { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

/* Buttons */
.btn {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  min-height: 36px;
}
.btn:hover { background: var(--surface-strong); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; }
.btn-icon { width: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1300; border-color: transparent; font-weight: 700;
  box-shadow: 0 6px 18px rgba(255, 203, 5, 0.35);
}
.btn-primary:hover { filter: brightness(1.05); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* =====================================================================
   Section layout
   ===================================================================== */
main { padding: 24px 28px 80px; max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; }
.section { padding-top: 28px; }
.section + .section { margin-top: 12px; }

.live-now-chip {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 10px; padding: 3px 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,193,7,0.22), rgba(255,87,34,0.18));
  color: #ffd166;
  border: 1px solid rgba(255,193,7,0.35);
}

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.section-head--page { padding: 4px 4px 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title h2 { margin: 0; font-size: 20px; font-weight: 700; }
.section-sub { margin: 0; color: var(--muted); font-size: 12.5px; }

.accent-bar {
  display: inline-block;
  width: 5px; height: 22px; border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.accent-bar--f1     { background: linear-gradient(180deg, var(--f1), var(--f1-2)); box-shadow: 0 0 14px rgba(255,59,48,.4); }
.accent-bar--rugby  { background: linear-gradient(180deg, var(--rugby), var(--rugby-2)); box-shadow: 0 0 14px rgba(45,208,120,.35); }
.accent-bar--club   { background: linear-gradient(180deg, #1d8d4a, #6dd4a3); box-shadow: 0 0 14px rgba(45,208,120,.45); }
.accent-bar--news     { background: linear-gradient(180deg, var(--news), #d8b8ff); box-shadow: 0 0 14px rgba(176,122,255,.35); }
.accent-bar--mixed    { background: linear-gradient(180deg, var(--accent), var(--rugby)); box-shadow: 0 0 14px rgba(255,203,5,.3); }
.accent-bar--upcoming { background: linear-gradient(180deg, #4ea1ff, #4ade80); box-shadow: 0 0 14px rgba(74,222,128,.35); }

/* =====================================================================
   Hero
   ===================================================================== */
.hero { margin-bottom: 22px; }
.hero-card {
  position: relative; overflow: hidden;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(30, 65, 255, 0.95) 0%, rgba(0, 60, 113, 0.95) 55%, rgba(11, 15, 26, 0.95) 100%);
  box-shadow: var(--shadow-lg);
  transition: opacity 0.45s ease;
  border: 1px solid rgba(255,255,255,0.10);
}
.hero-card.fading { opacity: 0; }
.hero-card[data-sport="f1"]    { background: linear-gradient(135deg, #ff3b30 0%, #6f0a05 55%, #160404 100%); }
.hero-card[data-sport="rugby"] { background: linear-gradient(135deg, #003c71 0%, #02244a 55%, #0a1530 100%); }
.hero-card[data-sport="club"]  { background: linear-gradient(135deg, #15803d 0%, #053a1c 55%, #03220f 100%); }

.hero-glow {
  position: absolute; right: -120px; top: -120px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 65%);
  pointer-events: none;
  filter: blur(8px);
}

.hero-eyebrow { display: flex; align-items: center; gap: 8px; }
.hero-label {
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  background: rgba(255,255,255,0.14); padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  font-weight: 600;
}
.hero-title {
  font-size: 32px; font-weight: 700; margin-top: 12px; line-height: 1.15;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
.hero-meta { color: rgba(255,255,255,0.86); margin-top: 8px; font-size: 14px; }
.hero-countdown {
  margin-top: 18px; font-size: 22px; font-weight: 700;
  display: inline-block; padding: 9px 16px; border-radius: 12px;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.14);
}

.hero-dots { margin-top: 18px; display: flex; gap: 8px; }
.hero-dots .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.30); cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.hero-dots .dot:hover { background: rgba(255,255,255,0.55); }
.hero-dots .dot.active { background: #fff; transform: scale(1.25); }

@media (max-width: 640px) {
  .hero-title { font-size: 24px; }
  .hero-card { padding: 22px 20px; }
}

/* =====================================================================
   Cards / panels (glass)
   ===================================================================== */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  box-shadow: var(--shadow-sm);
}
.card:hover { border-color: var(--border-strong); }
.card-wide { grid-column: 1 / -1; }

.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-head h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px;
}
@media (max-width: 980px) {
  .main-grid { grid-template-columns: 1fr; }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

/* =====================================================================
   Latest feed (card-per-item)
   ===================================================================== */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feed-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px; align-items: flex-start;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.feed-item:hover { transform: translateY(-1px); border-color: var(--border-strong); background: var(--surface-strong); }
.feed-item.fav   { box-shadow: inset 3px 0 0 var(--accent); }
.feed-item.live  {
  box-shadow: inset 3px 0 0 var(--bad), 0 0 0 1px rgba(255,77,109,0.35), 0 6px 22px rgba(255,77,109,0.18);
  border-color: rgba(255,77,109,0.45);
  background: linear-gradient(135deg, rgba(255,77,109,0.08), rgba(255,77,109,0.01));
}
.live-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(255,77,109,0.18);
  border: 1px solid rgba(255,77,109,0.55);
  color: #ffd0d8; text-transform: uppercase;
  margin-right: 6px; vertical-align: middle;
  animation: pulse 1.6s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) { .live-pill { animation: none; } }

.feed-when {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-width: 60px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 10px; padding: 6px 4px;
  font-variant-numeric: tabular-nums;
}
.feed-when .feed-day   { font-size: 18px; font-weight: 700; line-height: 1; color: var(--text); }
.feed-when .feed-month { font-size: 10px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; margin-top: 3px; }
.feed-when .feed-time  { font-size: 11px; color: var(--text-2); margin-top: 4px; }
.feed-when.today { border-color: rgba(255,203,5,0.45); background: linear-gradient(180deg, rgba(255,203,5,0.18), rgba(255,203,5,0.02)); }
.feed-when.today .feed-day { color: var(--accent); }
.feed-when.live { border-color: rgba(255,77,109,0.6); background: linear-gradient(180deg, rgba(255,77,109,0.18), rgba(255,77,109,0.02)); }

.feed-body { min-width: 0; }
.feed-title { font-weight: 600; line-height: 1.3; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.feed-meta  { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.feed-rel   { color: var(--muted); font-size: 11px; margin-top: 2px; }

.feed-tag {
  font-size: 10.5px; padding: 4px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600;
  background: var(--surface-strong); color: var(--muted);
  border: 1px solid var(--border-strong);
  white-space: nowrap;
}
.feed-tag.f1      { background: rgba(255,59,48,0.16);   color: #ff8e85; border-color: rgba(255,59,48,0.40); }
.feed-tag.intl    { background: rgba(45,208,120,0.16);  color: var(--rugby-2); border-color: rgba(45,208,120,0.42); }
.feed-tag.urc     { background: rgba(95,168,230,0.18);  color: var(--club-2); border-color: rgba(95,168,230,0.45); }
.feed-tag.schools { background: rgba(176,122,255,0.18); color: #d6b8ff; border-color: rgba(176,122,255,0.45); }
.feed-tag.club    { background: rgba(29,141,74,0.20);   color: #6dd4a3; border-color: rgba(29,141,74,0.50); }

.feed .empty { text-align: center; color: var(--muted); padding: 20px; }

@media (max-width: 640px) {
  .feed-item { grid-template-columns: 56px 1fr; }
  .feed-item .feed-tag { grid-column: 2; justify-self: start; margin-top: 4px; }
}

/* =====================================================================
   News
   ===================================================================== */
.news { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.news li {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.news li:hover { transform: translateY(-1px); border-color: var(--border-strong); background: var(--surface-strong); }
.news li.empty { display: block; color: var(--muted); text-align: center; }
.news a { color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.35; }
.news a:hover { color: var(--accent-2); }
.news .news-meta { color: var(--muted); font-size: 12px; grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.cat-badge {
  font-size: 10.5px; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600;
  border: 1px solid var(--border-strong); background: var(--surface-strong); color: var(--muted);
  white-space: nowrap;
}
.cat-badge.f1          { background: rgba(255,59,48,0.16); color: #ff8e85; border-color: rgba(255,59,48,0.40); }
.cat-badge.rugby       { background: rgba(45,208,120,0.16); color: var(--rugby-2); border-color: rgba(45,208,120,0.42); }
.cat-badge.irish-rugby { background: rgba(95,168,230,0.18); color: var(--club-2); border-color: rgba(95,168,230,0.45); }

.filters { display: flex; gap: 6px; }
.chip {
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1300; border-color: transparent; font-weight: 700;
}

/* =====================================================================
   Tables (panels)
   ===================================================================== */
.panel-body table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.panel-body th, .panel-body td {
  text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.panel-body th { color: var(--muted); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; }
.panel-body tr { transition: background 0.15s ease; }
.panel-body tbody tr:hover, .panel-body tr:hover { background: var(--surface); }
.panel-body tr.fav-row td { color: var(--accent); font-weight: 600; background: rgba(255,203,5,0.05); }
.panel-body tr.fav-row td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.panel-body .sub { color: var(--muted); font-size: 11.5px; margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 1.4px; font-weight: 600; }
.panel-body .muted { color: var(--muted); }
.panel-body .small { font-size: 11.5px; }

.score { font-weight: 700; font-size: 15px; }
.score .vs { color: var(--muted); font-weight: 400; margin: 0 6px; font-size: 12px; }

.team-logo {
  width: 22px; height: 22px; object-fit: contain; vertical-align: middle;
  background: rgba(255,255,255,0.05); border-radius: 4px; padding: 1px;
}
.team-cell { display: inline-flex; align-items: center; gap: 8px; }

/* =====================================================================
   F1 weekend
   ===================================================================== */
.f1-weekend { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 22px; margin-bottom: 8px; }
.f1-tables { display: grid; gap: 14px; }
.standings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 880px) { .f1-weekend { grid-template-columns: 1fr; } .standings-grid { grid-template-columns: 1fr; } }

.timeline {
  position: relative; padding-left: 22px; margin: 6px 0 0;
  list-style: none;
}
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--f1), var(--accent));
  border-radius: 2px;
}
.timeline li {
  position: relative; padding: 9px 0 9px 14px;
}
.timeline li::before {
  content: ""; position: absolute; left: -19px; top: 14px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,203,5,0.18);
}
.timeline li.next::before {
  background: var(--bad);
  box-shadow: 0 0 0 4px rgba(255,77,109,0.20), 0 0 18px rgba(255,77,109,0.6);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,77,109,0.55), 0 0 18px rgba(255,77,109,0.6); }
  70%  { box-shadow: 0 0 0 14px rgba(255,77,109,0), 0 0 18px rgba(255,77,109,0.6); }
  100% { box-shadow: 0 0 0 0 rgba(255,77,109,0), 0 0 18px rgba(255,77,109,0.6); }
}
.timeline .sess-name { font-weight: 600; }
.timeline .sess-when { color: var(--muted); font-size: 12px; margin-top: 2px; }
.timeline .sess-cd   { font-size: 12px; color: var(--accent-2); margin-top: 3px; font-weight: 600; }
.timeline li.past .sess-name, .timeline li.past .sess-when { opacity: 0.5; }
.timeline li.past::before { background: var(--muted); box-shadow: none; }

/* F1 standings team-colour bar */
.panel-body table.standings tr td:first-child {
  position: relative;
  padding-left: 14px;
}
.panel-body table.standings tr td:first-child::before {
  content: ""; position: absolute; left: 4px; top: 30%; bottom: 30%; width: 3px; border-radius: 2px;
  background: var(--muted);
}
.panel-body tr[data-team="red bull"]   td:first-child::before,
.panel-body tr[data-team*="racing bull"] td:first-child::before { background: var(--redbull); }
.panel-body tr[data-team*="ferrari"]    td:first-child::before { background: #dc0000; }
.panel-body tr[data-team*="mclaren"]    td:first-child::before { background: #ff8000; }
.panel-body tr[data-team*="mercedes"]   td:first-child::before { background: #00d2be; }
.panel-body tr[data-team*="aston"]      td:first-child::before { background: #006f62; }
.panel-body tr[data-team*="alpine"]     td:first-child::before { background: #0090d0; }
.panel-body tr[data-team*="williams"]   td:first-child::before { background: #005aff; }
.panel-body tr[data-team*="haas"]       td:first-child::before { background: #b6babd; }
.panel-body tr[data-team*="kick"], 
.panel-body tr[data-team*="sauber"]     td:first-child::before { background: #00e676; }

/* =====================================================================
   Watch / highlights chips
   ===================================================================== */
.watch-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 6px;
}
.watch-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 203, 5, 0.10);
  color: #ffd84a;
  border: 1px solid rgba(255, 203, 5, 0.32);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.watch-chip.is-link:hover {
  background: rgba(255, 203, 5, 0.22);
  transform: translateY(-1px);
  border-color: rgba(255, 203, 5, 0.55);
}
.watch-chip.is-highlights {
  background: rgba(176, 122, 255, 0.16);
  border-color: rgba(176, 122, 255, 0.42);
  color: #d6b8ff;
}
.watch-chip.is-highlights:hover {
  background: rgba(176, 122, 255, 0.30);
  border-color: rgba(176, 122, 255, 0.60);
}
.watch-note { font-size: 11px; color: var(--muted); font-style: italic; }

.hero-watch { margin-top: 14px; }
.hero-watch .watch-chip {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.30);
  color: #fff;
}
.hero-watch .watch-chip.is-link:hover { background: rgba(255,255,255,0.30); }

.watch-sub td {
  border-bottom: 1px solid var(--border) !important;
  padding-top: 0 !important;
  padding-bottom: 10px !important;
  background: transparent !important;
}
.watch-sub .watch-row { margin-top: 0; }

/* =====================================================================
   Club panel quick-stats
   ===================================================================== */
.club-strip {
  display: grid;
  grid-template-columns: 1fr repeat(4, auto);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(45, 208, 120, 0.18) 0%, rgba(11, 15, 26, 0.4) 100%);
  border: 1px solid rgba(45, 208, 120, 0.32);
  border-radius: var(--radius-md);
}
.club-strip-title { font-weight: 600; font-size: 14px; }
.club-strip-title small { display: block; color: var(--muted); font-weight: 400; font-size: 11.5px; margin-top: 2px; }
.club-stat { text-align: center; min-width: 60px; }
.club-stat .stat-num { font-size: 22px; font-weight: 700; line-height: 1; }
.club-stat .stat-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin-top: 4px; }
.club-stat.win   .stat-num { color: var(--good); }
.club-stat.loss  .stat-num { color: var(--bad); }
.club-stat.draw  .stat-num { color: var(--accent); }

@media (max-width: 640px) {
  .club-strip { grid-template-columns: 1fr 1fr 1fr; }
  .club-strip-title { grid-column: 1 / -1; }
}

/* =====================================================================
   Settings drawer
   ===================================================================== */
.settings-panel { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; }
.settings-panel[hidden] { display: none; }
.settings-backdrop {
  position: absolute; inset: 0;
  background: rgba(5,8,18,0.6); backdrop-filter: blur(4px);
  z-index: 0;
}
.settings-card {
  position: relative; z-index: 1;
  width: min(420px, 100%); height: 100%;
  background: var(--bg-2); border-left: 1px solid var(--border);
  padding: 22px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  animation: slideIn 0.28s cubic-bezier(.4, 1.4, .4, 1);
  box-shadow: var(--shadow-lg);
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.settings-head { display: flex; justify-content: space-between; align-items: center; }
.settings-head h3 { margin: 0; font-size: 17px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field input[type=text] {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); padding: 10px 12px; font: inherit; font-size: 14px;
}
.field input[type=text]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,203,5,0.15); }
.add-row { display: flex; gap: 6px; }
.add-row input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; }
.chips .chip-x {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 4px 10px; font-size: 12px;
}
.chips .chip-x button {
  background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0; line-height: 1;
}
.chips .chip-x button:hover { color: var(--bad); }
.settings-foot { margin-top: auto; display: flex; justify-content: flex-end; gap: 8px; }

/* =====================================================================
   Footer
   ===================================================================== */
footer { padding: 24px 28px; color: var(--muted); font-size: 12px; text-align: center; border-top: 1px solid var(--border); margin-top: 40px; }

/* =====================================================================
   Stagger fade-in
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .fade-up { opacity: 0; transform: translateY(8px); animation: fadeUp .55s cubic-bezier(.2,.8,.2,1) forwards; }
  @keyframes fadeUp { to { opacity: 1; transform: none; } }
}

/* =====================================================================
   Mobile
   ===================================================================== */
@media (max-width: 880px) {
  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand actions" "nav nav";
    padding: 10px 14px;
  }
  .brand { grid-area: brand; }
  .topbar-actions { grid-area: actions; }
  .nav-tabs { grid-area: nav; justify-content: flex-start; }
  .last-updated { display: none; }
}
@media (max-width: 640px) {
  main { padding: 18px 14px 60px; }
  .section { padding-top: 22px; }
  .brand-text h1 { font-size: 16px; }
  .brand-text .tagline { display: none; }
  .grid { grid-template-columns: 1fr; }
  .card-wide { grid-column: auto; }
  .btn { min-height: 40px; }
}

/* ====== Detail layer: HT chip, scorers timeline, F1 race cards, tier tags ====== */

.ht-chip {
  display: inline-block; margin-left: 8px;
  padding: 2px 8px; font-size: 11px; font-weight: 700;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  border: 1px solid var(--border);
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.scorers {
  margin-top: 8px;
  font-size: 13px;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}
.scorers > summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  list-style: none;
  padding: 4px 0;
  user-select: none;
}
.scorers > summary::-webkit-details-marker { display: none; }
.scorers > summary::before { content: "▸ "; transition: transform 0.15s; display: inline-block; }
.scorers[open] > summary::before { content: "▾ "; }
.scorer-list { list-style: none; padding: 6px 0 0; margin: 0; display: grid; gap: 4px; }
.scorer-list li {
  display: grid;
  grid-template-columns: 38px 22px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 3px 6px;
  border-radius: 6px;
}
.scorer-list li:hover { background: rgba(255,255,255,0.03); }
.scorer-min { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.scorer-icon { text-align: center; }
.scorer-team { font-size: 12px; color: var(--muted); }
.scorer-name { font-weight: 600; }

/* F1 race-card list (recent races, with pole/fastest/podium) */
.f1-races {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.f1-race-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.f1-race-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  margin-bottom: 6px;
}
.f1-race-name { font-weight: 700; font-size: 14px; }
.f1-race-detail {
  font-size: 12px; color: var(--muted);
  margin-bottom: 8px; padding: 4px 0;
  border-bottom: 1px dashed var(--border);
}
.f1-podium { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; font-size: 13px; }
.f1-podium li {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  border-left: 3px solid var(--border);
}
.f1-podium li[data-team*="ferrari"]      { border-left-color: #ED1C24; }
.f1-podium li[data-team*="mclaren"]      { border-left-color: #FF8000; }
.f1-podium li[data-team*="mercedes"]     { border-left-color: #00D2BE; }
.f1-podium li[data-team*="red bull"]     { border-left-color: #1E41FF; }
.f1-podium li[data-team*="aston"]        { border-left-color: #006F62; }
.f1-podium li[data-team*="alpine"]       { border-left-color: #2293D1; }
.f1-podium li[data-team*="williams"]     { border-left-color: #37BEDD; }
.f1-podium li[data-team*="haas"]         { border-left-color: #B6BABD; }
.f1-podium li[data-team*="sauber"]       { border-left-color: #00E700; }
.f1-podium li[data-team*="rb"],
.f1-podium li[data-team*="racing bull"]  { border-left-color: #2B4562; }
.f1-podium .pos { font-weight: 700; color: var(--muted); font-size: 12px; }
.f1-podium .drv { font-weight: 600; }
.f1-podium .gap { color: var(--muted); font-size: 12px; }

/* Watch-chip tier tags */
.chip-tier {
  display: inline-block; margin-left: 4px;
  padding: 1px 6px; font-size: 10px; font-weight: 700;
  border-radius: 999px;
  vertical-align: middle;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.watch-chip.tier-free .chip-tier { background: rgba(76,175,80,0.18); color: #81c784; border: 1px solid rgba(76,175,80,0.35); }
.watch-chip.tier-sky  .chip-tier { background: rgba(255,193,7,0.16); color: #ffd166; border: 1px solid rgba(255,193,7,0.35); }
.watch-chip.tier-sub  .chip-tier { background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid var(--border); }
.watch-chip.tier-free { border-color: rgba(76,175,80,0.30); }
.watch-chip.tier-sky  { border-color: rgba(255,193,7,0.30); }

/* ====== Adam's U14 spotlight ====== */
.u14-card {
  background: linear-gradient(135deg, rgba(76,175,80,0.10), rgba(46,125,50,0.04));
  border: 1px solid rgba(76,175,80,0.30);
  border-radius: 14px;
  padding: 14px 16px 18px;
  margin-bottom: 18px;
  position: relative;
}
.u14-card::before {
  content: "";
  position: absolute; left: 0; top: 14px; bottom: 14px;
  width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, #4caf50, #2e7d32);
}
.u14-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 6px;
  padding-left: 8px; margin-bottom: 12px;
}
.u14-card-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.u14-strip {
  background: rgba(76,175,80,0.08);
  border-color: rgba(76,175,80,0.25);
}
.u14-pill {
  display: inline-block;
  margin-left: 6px; padding: 1px 6px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  background: rgba(76,175,80,0.18);
  color: #81c784;
  border: 1px solid rgba(76,175,80,0.35);
  border-radius: 999px;
  vertical-align: middle;
}
tr.u14-row td:first-child { box-shadow: inset 3px 0 0 rgba(76,175,80,0.55); }

/* ====== Match-outcome highlighting (St Mary's / Leinster wins) ====== */
.outcome-badge {
  display: inline-block; vertical-align: middle;
  padding: 2px 8px; margin-right: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  border-radius: 999px; line-height: 1.4;
  text-transform: uppercase;
}
.outcome-badge.win {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #051a0c;
  box-shadow: 0 0 0 1px rgba(34,197,94,0.35), 0 4px 14px rgba(34,197,94,0.45);
  animation: winPulse 2.4s ease-in-out infinite;
}
.outcome-badge.loss {
  background: rgba(239,68,68,0.15); color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.4);
}
.outcome-badge.draw {
  background: rgba(234,179,8,0.15); color: #fde68a;
  border: 1px solid rgba(234,179,8,0.4);
}
@keyframes winPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(34,197,94,0.35), 0 4px 14px rgba(34,197,94,0.45); }
  50%      { box-shadow: 0 0 0 1px rgba(34,197,94,0.55), 0 6px 20px rgba(34,197,94,0.65); }
}
@media (prefers-reduced-motion: reduce) {
  .outcome-badge.win { animation: none; }
}

/* Feed cards */
.feed-item.fav-win {
  background: linear-gradient(135deg, rgba(34,197,94,0.16), rgba(34,197,94,0.04));
  border-color: rgba(34,197,94,0.45);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.25), 0 8px 22px rgba(34,197,94,0.18);
}
.feed-item.fav-win::before {
  background: linear-gradient(180deg, #22c55e, #16a34a) !important;
}
.feed-item.fav-loss {
  background: linear-gradient(135deg, rgba(239,68,68,0.10), rgba(239,68,68,0.02));
  border-color: rgba(239,68,68,0.30);
}
.feed-item.fav-draw {
  background: linear-gradient(135deg, rgba(234,179,8,0.10), rgba(234,179,8,0.02));
  border-color: rgba(234,179,8,0.30);
}

/* Table rows */
tr.fav-win  td { background: rgba(34,197,94,0.10); }
tr.fav-win  td:first-child { box-shadow: inset 4px 0 0 #22c55e; }
tr.fav-loss td { background: rgba(239,68,68,0.05); }
tr.fav-loss td:first-child { box-shadow: inset 4px 0 0 rgba(239,68,68,0.6); }
tr.fav-draw td { background: rgba(234,179,8,0.05); }
tr.fav-draw td:first-child { box-shadow: inset 4px 0 0 rgba(234,179,8,0.6); }

/* If a U14 row is also a win, show both stripes */
tr.u14-row.fav-win td:first-child { box-shadow: inset 4px 0 0 #22c55e, inset 8px 0 0 rgba(76,175,80,0.55); }

/* ====== Adam's greeting (header) — easy to read ====== */
.adam-greet {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.01em;
}
.adam-greet strong {
  color: var(--text);
  font-weight: 700;
}

/* ====== Favourite-team highlighting (TODO 2) ====== */
.fav-star {
  display: inline-block;
  margin-right: 4px;
  color: var(--accent);
  filter: drop-shadow(0 0 4px rgba(255,203,5,0.55));
  font-size: 0.95em;
  vertical-align: middle;
}
tr.fav-team-row td {
  background: linear-gradient(90deg, rgba(0,60,113,0.32), rgba(0,60,113,0.10) 70%, transparent);
}
tr.fav-team-row td:first-child {
  box-shadow: inset 4px 0 0 var(--leinster);
}
.hero-card.is-favorite {
  border-color: rgba(255,203,5,0.55);
  animation: pulse 2.4s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hero-card.is-favorite { animation: none; }
}

/* Adam's team — strongest highlight on the hero so it can't be missed */
.hero-card.is-adams-team {
  border-color: rgba(34,197,94,0.75);
  box-shadow:
    0 0 0 2px rgba(34,197,94,0.45),
    0 12px 38px rgba(34,197,94,0.30),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  animation: pulseGreen 2.2s ease-out infinite;
}
.hero-card.is-adams-team .hero-label {
  background: rgba(34,197,94,0.22);
  border: 1px solid rgba(34,197,94,0.55);
  color: #d6ffe5;
}
@keyframes pulseGreen {
  0%   { box-shadow: 0 0 0 2px rgba(34,197,94,0.45), 0 12px 38px rgba(34,197,94,0.30), inset 0 0 0 1px rgba(255,255,255,0.04); }
  50%  { box-shadow: 0 0 0 3px rgba(34,197,94,0.65), 0 14px 46px rgba(34,197,94,0.45), inset 0 0 0 1px rgba(255,255,255,0.04); }
  100% { box-shadow: 0 0 0 2px rgba(34,197,94,0.45), 0 12px 38px rgba(34,197,94,0.30), inset 0 0 0 1px rgba(255,255,255,0.04); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-card.is-adams-team { animation: none; }
}

/* Adam's team — pronounced highlight in the upcoming feed */
.feed-item.adams-team {
  border-color: rgba(34,197,94,0.55);
  background: linear-gradient(135deg, rgba(34,197,94,0.10), rgba(34,197,94,0.02));
  box-shadow: inset 4px 0 0 #22c55e, 0 4px 16px rgba(34,197,94,0.12);
}
.feed-item.adams-team:hover {
  background: linear-gradient(135deg, rgba(34,197,94,0.16), rgba(34,197,94,0.04));
  border-color: rgba(34,197,94,0.75);
}
.feed-item.adams-team.u14 {
  border-color: rgba(34,197,94,0.85);
  box-shadow: inset 4px 0 0 #22c55e, inset 8px 0 0 rgba(255,255,255,0.10), 0 6px 22px rgba(34,197,94,0.20);
}
.adams-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.4px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(34,197,94,0.22);
  border: 1px solid rgba(34,197,94,0.65);
  color: #d6ffe5;
  margin-right: 6px; vertical-align: middle;
  white-space: nowrap;
}
/* When inside a feed-title, keep the existing .u14-pill from the club panel
   visually consistent (it's already defined). Just give it a touch of breathing
   room when adjacent to the adams-pill. */
.feed-title .u14-pill { margin-right: 6px; }

/* Second u14 stats strip variant */
.club-strip.u14-strip-pts {
  margin-top: 6px;
  background: linear-gradient(135deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
}
