:root {
  color-scheme: light only;

  --bg: #FAFAF8;
  --navy: #0B1D3A;
  --royal: #003893;
  --gold-bright: #F4B400;
  --gold-muted: #B8860B;
  --grey: #6B7280;
  --card-border: #E3E1DA;

  --tier-a: #003893;
  --tier-b: #1B5E62;
  --tier-c: #A68A5B;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--navy);
  margin: 0;
  font-family: var(--font-body);
}

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

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--card-border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.brand { display: flex; align-items: baseline; gap: 10px; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--navy);
}

.brand-tagline {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--grey);
}

.site-nav { display: flex; gap: 22px; }

.site-nav a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--grey);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { text-decoration: none; color: var(--navy); }

.site-nav a.active {
  color: var(--royal);
  border-bottom-color: var(--royal);
}

/* ---------- Layout ---------- */

.app-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  text-align: left;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--navy);
  margin: 0 0 20px;
  text-align: left;
}

.page-title.alumni-title { margin-top: 48px; }

.site-footer {
  text-align: center;
  padding: 28px 16px 40px;
  color: var(--grey);
  font-size: 0.85rem;
  font-family: var(--font-body);
}

.footer-dot { margin: 0 8px; }

/* ---------- Sections & Grid ---------- */

.tier-section { margin-bottom: 36px; }

.section-header {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--grey);
  text-align: left;
}

.tier-A .section-header, .section-header.tier-A { border-left-color: var(--tier-a); color: var(--tier-a); }
.tier-B .section-header, .section-header.tier-B { border-left-color: var(--tier-b); color: var(--tier-b); }
.tier-C .section-header, .section-header.tier-C { border-left-color: var(--tier-c); color: var(--tier-c); }

.issue-section .section-header { border-left-color: var(--gold-muted); color: var(--gold-muted); }

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Cards ---------- */

.card {
  display: block;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 18px 20px;
  text-align: left;
  color: inherit;
}

a.card:hover { text-decoration: none; border-color: var(--royal); }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--font-body);
}

.runner-name { font-weight: 600; color: var(--navy); }

.event-name { font-weight: 500; color: var(--grey); font-size: 0.88rem; }

.division-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hero-result {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.1;
  margin: 4px 0 10px;
}

.hero-gold { color: var(--gold-muted); }
.hero-navy { color: var(--navy); }

.badge-row { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }

.badge {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-block;
}

.badge-gold { background: rgba(244, 180, 0, 0.16); color: var(--gold-muted); }
.badge-navy { background: rgba(0, 56, 147, 0.1); color: var(--royal); }
.badge-alumni { background: rgba(107, 114, 128, 0.14); color: var(--grey); margin-left: 8px; }

.stat-row {
  display: flex;
  gap: 24px;
  padding-top: 10px;
  border-top: 1px solid var(--card-border);
  margin-bottom: 10px;
}

.stat { display: flex; flex-direction: column; gap: 2px; }

.stat-label {
  font-size: 0.72rem;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-value { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--navy); }

.stat-new .stat-value { color: var(--gold-muted); }

.card-date { font-size: 0.8rem; color: var(--grey); }

/* Runner directory cards */

.runner-meta { font-size: 0.85rem; color: var(--grey); margin-bottom: 6px; }
.runner-recent { font-size: 0.92rem; color: var(--navy); }

/* Records */

.records-grid { margin-bottom: 40px; }

.record-holders { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

.record-holder {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
}

.holder-name { font-weight: 600; color: var(--navy); }
.holder-detail { color: var(--grey); text-align: right; }

/* ---------- Profile ---------- */

.profile-header { margin-bottom: 28px; }

.back-link { font-size: 0.85rem; color: var(--grey); display: inline-block; margin-bottom: 10px; }

.profile-meta { color: var(--grey); font-size: 0.92rem; }

.profile-block { margin-bottom: 36px; }

.block-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--navy);
  margin: 0 0 14px;
  text-align: left;
}

.bests-table, .history-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
}

.bests-table th, .history-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--grey);
  padding: 10px 16px;
  border-bottom: 1px solid var(--card-border);
  font-weight: 600;
}

.bests-table td, .history-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.92rem;
}

.bests-table tr:last-child td, .history-table tr:last-child td { border-bottom: none; }

.best-value { font-family: var(--font-display); font-weight: 700; color: var(--navy); }

.delta { color: var(--gold-muted); font-weight: 600; }
.delta-none { color: var(--grey); font-size: 0.85rem; }

.meet-name-missing { color: var(--grey); }

.pr-flag { color: var(--gold-bright); font-weight: 700; text-align: center; width: 24px; }

.result-gold { color: var(--gold-muted); font-weight: 700; }
.result-navy { color: var(--royal); font-weight: 700; }

.season-select {
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  margin-bottom: 14px;
}

/* ---------- Leaderboard ---------- */

.filter-bar {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
}

.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.filter-bar select {
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 7px 10px;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--navy);
  text-transform: none;
}

.leaderboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

@media (min-width: 760px) {
  .leaderboard-grid { grid-template-columns: repeat(2, 1fr); }
}

.leaderboard-card .event-header {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 10px;
  color: var(--navy);
}

.relay-section-header { margin-top: 40px; }

/* ---------- States ---------- */

.loading-state, .error-state, .empty-state {
  text-align: left;
  color: var(--grey);
  font-size: 0.95rem;
  padding: 24px 0;
}

.error-state h2 { font-family: var(--font-display); color: var(--navy); }

.retry-btn {
  font-family: var(--font-body);
  font-weight: 600;
  background: var(--royal);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 0.9rem;
}

.retry-btn:hover { opacity: 0.9; }

/* ---------- Data issues panel ---------- */

.issues-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #fff;
  border: 1px solid var(--card-border);
  color: var(--gold-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(11, 29, 58, 0.08);
}

.issues-panel {
  position: fixed;
  right: 18px;
  bottom: 60px;
  max-width: 360px;
  max-height: 50vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 4px 16px rgba(11, 29, 58, 0.12);
  font-size: 0.82rem;
}

.issues-panel h4 { margin: 0 0 8px; font-family: var(--font-display); color: var(--navy); }
.issues-panel ul { margin: 0; padding-left: 18px; color: var(--grey); }
.issues-panel li { margin-bottom: 6px; }

/* ---------- Recent PRs: ticker + live feed ---------- */

.ticker-bar {
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  position: relative;
  margin: -32px -24px 24px;
  height: 40px;
  display: flex;
  align-items: center;
}

.ticker-bar::before, .ticker-bar::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 36px;
  z-index: 2;
  pointer-events: none;
}
.ticker-bar::before { left: 0; background: linear-gradient(90deg, var(--navy), transparent); }
.ticker-bar::after { right: 0; background: linear-gradient(270deg, var(--navy), transparent); }

.ticker-label {
  flex: none;
  background: var(--gold-bright);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 3;
}

.ticker-track-wrap { overflow: hidden; flex: 1; height: 100%; }
.ticker-track { display: flex; align-items: center; height: 100%; width: max-content; animation: ticker-scroll 30s linear infinite; animation-duration: var(--ticker-duration, 30s); }
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  font-size: 0.82rem;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  height: 100%;
}

.ticker-item .badge { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em; padding: 1px 6px; border-radius: 4px; }
.ticker-item .lt { background: rgba(244, 180, 0, 0.2); color: var(--gold-bright); }
.ticker-item .sn { background: rgba(255, 255, 255, 0.14); color: #cfd8ea; }
.ticker-item .name { font-weight: 700; }
.ticker-item .res { font-family: var(--font-display); font-weight: 700; color: var(--gold-bright); }

.page-sub { color: var(--grey); font-size: 0.9rem; margin: 0 0 18px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.pill {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--grey);
  background: #fff;
  border: 1px solid var(--card-border);
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
}
.pill.active { background: var(--royal); border-color: var(--royal); color: #fff; }

.feed { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }

.post {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 18px 14px;
  position: relative;
  overflow: hidden;
}
.post::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.post.tier-a::before { background: var(--tier-a); }
.post.tier-b::before { background: var(--tier-b); }
.post.tier-c::before { background: var(--tier-c); }

.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: #fff;
}
.post.tier-a .avatar { background: var(--tier-a); }
.post.tier-b .avatar { background: var(--tier-b); }
.post.tier-c .avatar { background: var(--tier-c); }

.post-head .who { line-height: 1.25; }
.post-head .runner-name { font-weight: 700; font-size: 0.94rem; }
.post-head .action { color: var(--grey); font-size: 0.82rem; }
.post-head .time { margin-left: auto; color: var(--grey); font-size: 0.78rem; white-space: nowrap; }

.post-body { padding-left: 48px; }
.event-line { font-size: 0.84rem; color: var(--grey); margin-bottom: 2px; }
.post-body .hero-result { font-size: 2rem; margin: 0 0 8px; }
.meet-line { font-size: 0.8rem; color: var(--grey); }
.meet-line b { color: var(--navy); font-weight: 600; }

@media (max-width: 480px) {
  .ticker-bar { margin: -20px -20px 20px; }
}

/* ---------- Wall of Fame (Records page) ---------- */

body.page-records {
  --fame-navy-deep: #081226;
  --fame-navy: #0F2246;
  --fame-navy-card: #12294F;
  --fame-gold-soft: #F6C645;
  --fame-parchment: #F3ECD9;
  --fame-grey: #8B99B5;
  --fame-hairline: rgba(244, 180, 0, 0.16);
  --fame-tier-a: #6FA1FF;
  --fame-tier-b: #4FC2B8;
  --fame-tier-c: #E3B673;
  background:
    radial-gradient(ellipse 900px 500px at 50% -10%, rgba(244, 180, 0, 0.10), transparent 60%),
    var(--fame-navy-deep);
}

.fame-hero { margin-bottom: 40px; }
.fame-hero .eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fame-gold-soft);
  margin-bottom: 10px;
}
.fame-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 12px;
  text-wrap: balance;
  background: linear-gradient(180deg, #FFE9A8, var(--gold-bright) 60%, var(--gold-muted));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.01em;
}
.fame-hero p { color: var(--fame-grey); font-size: 1rem; max-width: 58ch; margin: 0; }

.fame-subhead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--fame-parchment);
  margin: 48px 0 20px;
}

.tier-band { display: flex; align-items: center; gap: 12px; margin: 40px 0 18px; }
.tier-band:first-of-type { margin-top: 0; }
.tier-band .chip { font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; padding: 6px 14px; border-radius: 999px; letter-spacing: 0.02em; }
.tier-band .chip.tier-a { background: rgba(111, 161, 255, 0.16); color: var(--fame-tier-a); border: 1px solid rgba(111, 161, 255, 0.35); }
.tier-band .chip.tier-b { background: rgba(79, 194, 184, 0.16); color: var(--fame-tier-b); border: 1px solid rgba(79, 194, 184, 0.35); }
.tier-band .chip.tier-c { background: rgba(227, 182, 115, 0.16); color: var(--fame-tier-c); border: 1px solid rgba(227, 182, 115, 0.35); }
.tier-band .label { font-family: var(--font-body); color: var(--fame-grey); font-size: 0.85rem; }
.tier-band .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--fame-hairline), transparent); }

.plaque-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 8px; }
@media (max-width: 680px) { .plaque-grid { grid-template-columns: 1fr; } }

.plaque {
  position: relative;
  border-radius: 14px;
  padding: 22px 22px 20px;
  background: linear-gradient(155deg, var(--fame-navy-card), var(--fame-navy) 75%);
  border: 1px solid var(--fame-hairline);
  overflow: hidden;
}
.plaque-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.plaque .event-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--fame-parchment); }

.plaque .division-tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; color: var(--fame-grey);
}
.plaque .division-tag.tier-a { background: rgba(111, 161, 255, 0.18); color: var(--fame-tier-a); }
.plaque .division-tag.tier-b { background: rgba(79, 194, 184, 0.18); color: var(--fame-tier-b); }
.plaque .division-tag.tier-c { background: rgba(227, 182, 115, 0.18); color: var(--fame-tier-c); }

.plaque .hero-result {
  font-family: var(--font-display); font-weight: 700; font-size: 2.5rem; line-height: 1;
  color: var(--gold-bright); text-shadow: 0 0 24px rgba(244, 180, 0, 0.35);
  margin-bottom: 4px; font-variant-numeric: tabular-nums;
}

.co-held, .alumni-tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; margin: 8px 0 12px; letter-spacing: 0.02em;
}
.co-held { color: var(--fame-navy-deep); background: linear-gradient(180deg, #FFE9A8, var(--gold-bright)); }
.alumni-tag { color: var(--fame-grey); border: 1px solid var(--fame-hairline); }

.plaque .holders { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--fame-hairline); }
.plaque .holder { display: flex; justify-content: space-between; gap: 10px; font-size: 0.86rem; }
.plaque .holder .name { font-weight: 600; color: var(--fame-parchment); }
.plaque .holder .detail { color: var(--fame-grey); text-align: right; }

.fame-footnote { margin-top: 44px; color: var(--fame-grey); font-size: 0.82rem; text-align: center; }

/* ---------- Runner profile: Progress chart ---------- */

.progress-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px 20px 16px;
}

.event-select-wrap { margin-bottom: 12px; }
.event-select-wrap label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--grey);
  display: block; margin-bottom: 4px; font-weight: 600;
}
.event-select-wrap select {
  font-family: var(--font-body); font-size: 0.92rem; padding: 7px 10px;
  border: 1px solid var(--card-border); border-radius: 8px; background: var(--bg); color: var(--navy);
}

.progress-controls { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.headline-stat { text-align: right; }
.headline-stat .num {
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--gold-muted);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.headline-stat .cap { font-size: 0.72rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.03em; }

.chart-shell { position: relative; margin-top: 8px; }
.progress-svg { width: 100%; height: auto; display: block; overflow: visible; }
.progress-svg .gridline { stroke: var(--card-border); stroke-width: 1; }
.progress-svg .axis-label { font-family: var(--font-body); font-size: 11px; fill: var(--grey); }
.progress-svg .month-label { font-family: var(--font-body); font-size: 11px; fill: var(--grey); font-weight: 600; }
.progress-svg .line-seg { fill: none; stroke: var(--royal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.progress-svg .pt circle.ring { fill: #fff; stroke-width: 2; }
.progress-svg .pt circle.core { r: 3.4; }
.progress-svg .pt-gold circle.ring { stroke: var(--gold-bright); }
.progress-svg .pt-gold circle.core { fill: var(--gold-muted); }
.progress-svg .pt-navy circle.ring { stroke: var(--royal); }
.progress-svg .pt-navy circle.core { fill: var(--royal); }
.progress-svg .pt-plain circle.ring { stroke: var(--grey); }
.progress-svg .pt-plain circle.core { fill: var(--grey); }
.progress-svg .pt:hover circle.ring, .progress-svg .pt:focus circle.ring { r: 9; }
.progress-svg .pt { cursor: pointer; }

.progress-svg .dnf-x { stroke: var(--grey); stroke-width: 1.6; }
.progress-svg .dnf-mark { cursor: pointer; }

.chart-shell .tooltip {
  position: absolute; pointer-events: none; background: var(--navy); color: #fff;
  font-family: var(--font-body); font-size: 0.78rem; line-height: 1.4;
  padding: 8px 11px; border-radius: 8px; transform: translate(-50%, -115%);
  white-space: nowrap; opacity: 0; transition: opacity 0.1s ease; box-shadow: 0 6px 18px rgba(11, 29, 58, 0.25);
  z-index: 5;
}
.chart-shell .tooltip b { font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; }
.chart-shell .tooltip .meet { color: var(--gold-bright); font-weight: 600; }
.chart-shell .tooltip .tooltip-note { color: #C9CDD3; margin-top: 2px; }

.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--card-border); }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--grey); }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; box-sizing: content-box; border: 2px solid; }
.legend-dot.gold { background: var(--gold-muted); border-color: var(--gold-bright); }
.legend-dot.navy { background: var(--royal); border-color: var(--royal); }
.legend-dot.plain { background: var(--grey); border-color: var(--grey); }
.legend-x { width: 12px; height: 12px; position: relative; flex: none; }
.legend-x::before, .legend-x::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 1.6px; background: var(--grey); }
.legend-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.legend-x::after { transform: translate(-50%, -50%) rotate(-45deg); }

.table-toggle {
  margin-top: 12px; font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  color: var(--royal); background: none; border: none; cursor: pointer; padding: 0;
}
.table-toggle:hover { text-decoration: underline; }
.raw-table { margin-top: 12px; }
.raw-table[hidden] { display: none; }

.progress-empty { padding: 4px 0; }

@media (max-width: 480px) {
  .progress-controls { justify-content: flex-start; }
  .headline-stat { text-align: left; }
}
