:root {
  --ground: #0B162A;
  --panel: #16243F;
  --slate: #233350;
  --orange: #C83803;   /* Bears orange: fills */
  --orange-2: #FF6A2B; /* bright orange: accent text on navy */
  --white: #FFFFFF;
  --muted: #A9B4C7;
  --pill: #3B4C6B;
  --line: #22314C;
  --line-2: #2A3A57;
  --blue-l: #8DB3E8;   /* Games only */
  --blue-d: #1F4E9C;   /* Games only */
  --brand: var(--orange);
  --accent: var(--orange-2);
  --active-bg: var(--orange);
  --active-fg: var(--white);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--white); }
body {
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.35; -webkit-text-size-adjust: 100%;
}
a:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

/* Shell: mobile-first column, centered at ~480px on desktop */
.page {
  max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; gap: 16px;
  padding: max(22px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.top { display: flex; justify-content: space-between; align-items: flex-start; }
.brand { display: inline-flex; flex-direction: column; gap: 6px; font-size: 20px; font-weight: 900; letter-spacing: .14em; line-height: 1; color: var(--brand); }
/* Fletchers made arrows: the wordmark rides on one — fletching (>>>) at the tail, shaft, then the head past the S. */
.brand-word { margin-right: -.14em; }
.brand-arrow { display: flex; align-items: center; height: 10px; color: var(--brand); }
.brand-arrow .fletch { flex: none; width: 17px; height: 10px; fill: none; stroke: var(--orange-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; position: relative; z-index: 1; }
.brand-arrow .shaft { flex: 1; height: 2px; margin-left: -15px; border-radius: 1px; background: currentColor; }
.brand-arrow .head { flex: none; width: 10px; height: 10px; margin-left: -1px; fill: currentColor; }
.est { font-size: 13px; font-weight: 700; letter-spacing: .08em; line-height: 20px; color: var(--muted); }

.tabs { display: flex; gap: 6px; }
.tabs a {
  flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 2px solid var(--pill); color: var(--white); text-decoration: none;
  font-size: 13px; font-weight: 800; letter-spacing: .04em;
}
/* Rounded squares: outline when inactive, solid fill when current (shadows don't read on navy). */
.tabs a[aria-current="page"] { background: var(--active-bg); border-color: var(--active-bg); color: var(--active-fg); }
.tabs a:not([aria-current]):hover { border-color: var(--muted); }
.tabs a.tab-out { gap: 3px; flex-grow: 1.35; } /* longest label + arrow */
.tabs a.tab-out svg { flex: none; }
@media (max-width: 379px) { .tabs a.tab-out svg { display: none; } }
@media (max-width: 379px) { .tabs { gap: 4px; } .tabs a { font-size: 11px; letter-spacing: .02em; } }
@media (max-width: 439px) { .tabs:has(> :nth-child(6)) { gap: 3px; } .tabs:has(> :nth-child(6)) a { font-size: 10px; letter-spacing: 0; } }

/* Status */
.status { flex: 1 1 auto; display: flex; flex-direction: column; gap: 18px; }
.status-card {
  flex: 1 1 auto; min-height: 380px; position: relative; overflow: hidden; container-type: inline-size;
  border-radius: 28px; background: var(--slate); padding: 26px 24px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
}
.status-card.is-open { background: var(--orange); }
.status-card > :not(.art) { position: relative; }
.art {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center;
  opacity: .45; mix-blend-mode: luminosity; pointer-events: none;
}
.now { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: .16em; }
.word {
  margin: 0; font-weight: 900; line-height: .88; letter-spacing: -.035em; white-space: nowrap;
  text-shadow: 0 2px 16px rgba(11, 22, 42, .45);
  font-size: clamp(40px, 15.9vw, 70px); font-size: min(70px, 23cqi);
}
.is-open .word { font-size: clamp(48px, 24.8vw, 104px); font-size: min(104px, 32cqi); }
.times { display: flex; flex-direction: column; gap: 6px; text-shadow: 0 1px 8px rgba(11, 22, 42, .6); }
.times p { margin: 0; }
.since { font-size: 22px; font-weight: 800; }
.updated { font-size: 14px; font-weight: 600; }

.temps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 20px; background: var(--panel); }
.tlabel { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
.tval { font-size: 40px; font-weight: 900; line-height: 1; }
.tval.out { color: var(--orange-2); }

/* Darts / Golf / Games */
.wrap { display: flex; flex-direction: column; gap: 16px; }
h1 { margin: 4px 0 0; font-size: 64px; font-weight: 900; line-height: .9; letter-spacing: -.03em; }
/* Section pages: the highlighted tab already names the page, so the big heading is kept for screen
   readers only (Status's OPEN/CLOSED word is content, not this heading). */
.wrap h1 { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.meta { color: var(--muted); font-size: 13px; font-weight: 600; margin: 0; }
.banner { margin: 0; border: 2px solid var(--pill); border-radius: 16px; padding: 10px 14px; font-weight: 600; }
.empty { color: var(--muted); margin: 0; padding: 8px 0; }
.btn {
  display: flex; align-items: center; justify-content: center; height: 56px; border-radius: 999px;
  background: var(--orange); color: var(--white); text-decoration: none;
  font-size: 16px; font-weight: 900; letter-spacing: .08em;
}
.btn:hover { background: var(--orange-2); }
.loading { display: grid; }
.loading > span { grid-area: 1 / 1; }
.loading .fail { visibility: hidden; animation: reveal 0s 8s forwards; }
.loading .wait { animation: conceal 0s 8s forwards; }
@keyframes reveal { to { visibility: visible; } }
@keyframes conceal { to { visibility: hidden; } }

.kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.hero {
  border-radius: 24px; background: var(--orange); padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
}
.hero .kicker { letter-spacing: .16em; }
.hero-name { display: block; font-size: 26px; font-weight: 900; overflow-wrap: anywhere; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-num { font-size: 34px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-who { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.darts-stat { background: var(--slate); }
.golf-stat { background: var(--panel); }
.golf-stat .kicker { color: var(--muted); }
.golf-stat .stat-num { font-size: 30px; color: var(--orange-2); }

.panel { border-radius: 24px; background: var(--panel); padding: 16px 18px; }
.panel-title { color: var(--muted); padding-bottom: 6px; }

/* Darts standings */
.standings { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.standings caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.standings th, .standings td { padding: 11px 0; text-align: right; }
.standings thead th {
  padding: 0 0 10px; border-bottom: 2px solid var(--line-2);
  font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--muted);
}
.standings tbody td, .standings tbody th { border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 700; }
.standings tbody tr:last-child td, .standings tbody tr:last-child th { border-bottom: 0; }
.standings .rank { width: 36px; text-align: left; font-weight: 900; }
.standings .player { text-align: left; overflow-wrap: anywhere; }
.standings .n { width: 52px; }
.standings tbody tr:first-child .rank { color: var(--orange-2); }

/* Golf */
.round {
  min-height: 300px; border-radius: 28px; background: var(--orange); padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
}
.round-head { display: flex; flex-direction: column; gap: 4px; }
.round-head .kicker { font-size: 13px; letter-spacing: .16em; }
.round-course { font-size: 24px; font-weight: 800; overflow-wrap: anywhere; }
.round-who { font-size: 15px; font-weight: 600; }
.round-score { font-size: 120px; font-weight: 900; line-height: .85; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
/* Golf: Dan vs Tobby head-to-head */
.h2h { display: flex; flex-direction: column; gap: 12px; }
.h2h .panel-title { padding-bottom: 0; }
.h2h-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.h2h-rec { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.h2h-rec .kicker { color: var(--muted); }
.h2h-num { font-size: 34px; font-weight: 900; line-height: 1; color: var(--orange-2); font-variant-numeric: tabular-nums; }
.h2h-sub { font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
ol.h2h-list { list-style: none; margin: 0; padding: 0; }
.h2h-list li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.h2h-when { flex: none; width: 52px; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.h2h-course { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2h-scores { flex: none; font-variant-numeric: tabular-nums; color: var(--muted); }
.h2h-win { color: var(--orange-2); }
.cta {
  height: 60px; border-radius: 999px; background: var(--white); color: var(--ground); text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 17px; font-weight: 900; letter-spacing: .06em;
}

/* Games */
.onnow { border-radius: 24px; background: var(--white); color: var(--ground); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.onnow-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.onnow .kicker { display: flex; align-items: center; gap: 8px; letter-spacing: .16em; flex: none; }
.onnow-meta { min-width: 0; font-size: 13px; font-weight: 700; color: var(--pill); text-align: right; }
.onnow-teams { display: flex; flex-direction: column; gap: 6px; font-size: 22px; font-weight: 900; line-height: 1.1; }
.onnow-teams .tline { gap: 12px; }
.onnow-teams .tscore { font-size: 26px; }
.onnow-teams .fav .tname { color: var(--blue-d); }
.onnow-score { font-size: 15px; font-weight: 700; color: var(--blue-d); }
ol.games { list-style: none; margin: 0; padding: 0; }
.game { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.game:last-child { border-bottom: 0; }
.when { width: 84px; flex: 0 0 84px; display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.when-a { font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--blue-l); }
.when-b:empty { display: none; }
.when-b { font-size: 15px; font-weight: 800; }
.what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.matchup { display: flex; flex-direction: column; gap: 4px; font-size: 17px; font-weight: 800; }
.tline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tlogo { flex: none; object-fit: contain; }
span.tlogo { width: 28px; height: 28px; }
.tname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tscore { flex: none; font-weight: 900; font-variant-numeric: tabular-nums; }
.matchup .fav .tname { color: var(--blue-l); }
.tline.lost { opacity: .6; }
.gsub { font-size: 13px; font-weight: 600; color: var(--muted); }
.gseries { font-size: 13px; font-weight: 700; color: var(--blue-l); }

/* Sports tabs: segmented Games/Standings/News, then league buttons (same rounded squares as the top chips) */
.seg { display: flex; gap: 6px; padding: 4px; border-radius: 16px; background: var(--panel); }
.seg button {
  flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 800; letter-spacing: .1em; cursor: pointer;
}
.seg button[aria-selected="true"] { background: var(--white); color: var(--ground); }
.seg button:not([aria-selected="true"]):hover { color: var(--white); }
.seg button:focus-visible { outline: 2px solid var(--blue-l); outline-offset: 2px; }
.seg-league { background: transparent; padding: 0; gap: 8px; }
.seg-league button { border: 2px solid var(--pill); color: var(--white); }
.seg-league button[aria-selected="true"] { background: var(--blue-l); border-color: var(--blue-l); color: var(--ground); }
.tabpanel { display: flex; flex-direction: column; gap: 16px; }
.tabpanel[hidden] { display: none; }

/* Standings tables */
.standings.sports { table-layout: fixed; }
.standings.sports thead th.player { color: var(--blue-l); }
.standings.sports tbody th, .standings.sports tbody td { font-size: 15px; padding: 9px 0; }
.standings.sports .n { width: 42px; }
.standings.sports .tline { gap: 8px; }
.standings.sports tr.fav .tname { color: var(--blue-l); }

/* Birds */
.hero-sub { display: block; font-size: 14px; font-weight: 700; margin-top: 2px; }
ol.birds { list-style: none; margin: 0; padding: 0; }
.bird { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.bird:last-child { border-bottom: 0; }
/* Illustration on a cream "paper" tile, matching the HA TV dashboard's Bird Card panel */
.bird-art {
  flex: none; width: 80px; height: 80px; border-radius: 16px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #f6efdc 0%, #f3ead3 50%, #e9ddbb 100%);
  box-shadow: inset 0 0 44px rgba(120,90,40,0.16), 0 0 0 1px rgba(26,22,18,0.14);
}
.bird-art[hidden] { display: none; }
.bird-art img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 6px; box-sizing: border-box; }
.bird-credit { margin: 12px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.bird-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bird-name { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.bird-sci { font-size: 13px; font-style: italic; color: var(--muted); }
.bird-sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.bird-count { flex: none; font-size: 26px; font-weight: 900; color: var(--orange-2); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Sports: News tab — stacked full-headline cards, newest first */
.news { display: flex; flex-direction: column; gap: 12px; }
.news[hidden] { display: none; }
.news-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nc { display: flex; }
.nc a, .nc-body {
  flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px;
  border-radius: 20px; background: var(--panel); color: var(--white); text-decoration: none;
}
.nc a:hover { background: var(--slate); }
.nc a:focus-visible { outline: 2px solid var(--blue-l); outline-offset: 2px; }
.nc-top { display: flex; align-items: center; gap: 8px; }
.nc-team { flex: 1; min-width: 0; font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--blue-l); }
.nc-time { flex: none; font-size: 13px; font-weight: 600; color: var(--muted); }
.nc-head { font-size: 17px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.nc-src { font-size: 13px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-paused { margin: 0; }
