:root {
  --purple-950: #27163f;
  --purple-900: #352052;
  --purple-800: #47286f;
  --purple-700: #57328a;
  --purple-600: #6b43a0;
  --purple-100: #eee7f7;
  --purple-050: #f8f5fc;
  --ink: #241f29;
  --muted: #68616f;
  --line: #d8d1df;
  --paper: #fff;
  --page: #fff;
  --success: #17623f;
  --warning: #775500;
  --danger: #922b2b;
  --radius: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; display: flex; flex-direction: column; background: var(--page); }
button, input, select { font: inherit; }
.skip-link { position: fixed; left: .75rem; top: -4rem; z-index: 100; padding: .65rem 1rem; color: #fff; background: var(--purple-950); border-radius: 0; }
.skip-link:focus { top: .75rem; }
.site-header { color: #fff; background: var(--purple-900); border-bottom: .18rem solid #8c6ab3; }
.site-header__inner { max-width: 94rem; margin: auto; padding: 1.5rem clamp(1rem, 3vw, 2.5rem); display: flex; gap: 2rem; justify-content: space-between; align-items: end; }
.eyebrow { margin: 0 0 .25rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; opacity: .82; }
h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1; }
.site-subtitle { margin: .6rem 0 0; opacity: .9; }
.header-actions { display: flex; gap: .7rem; align-items: end; flex-wrap: wrap; }
.page-shell { width: 100%; max-width: 94rem; margin: 0 auto; flex: 1; padding: 1.2rem clamp(.7rem, 2.5vw, 2rem) 3rem; }
.controls { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; overflow: hidden; }
.view-tabs { display: flex; background: white; border-bottom: 1px solid var(--line); }
.view-tab { border: 0; padding: .85rem 1.3rem; cursor: pointer; color: var(--purple-900); background: transparent; font-weight: bold; }
.view-tab[aria-selected="true"] { color: var(--purple-800); box-shadow: inset 0 -3px var(--purple-700); }
.control-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .8rem; padding: 1rem; }
.field { min-width: 0; display: grid; gap: .3rem; color: var(--muted); font-size: .78rem; font-weight: bold; }
.field select, .field input { width: 100%; min-height: 2.45rem; padding: .45rem .55rem; border: 1px solid #aca3b4; border-radius: 0; color: var(--ink); background: #fff; }
.field--compact { color: #fff; min-width: 10rem; }
.button { min-height: 2.45rem; padding: .45rem .8rem; border: 1px solid var(--purple-700); border-radius: 0; cursor: pointer; font-weight: bold; }
.button--light { color: var(--purple-950); background: #fff; }
.notice { margin: 1rem 0; padding: .8rem 1rem; border-left: .35rem solid var(--purple-700); border-radius: 0; background: var(--purple-050); }
.notice h2 { margin: 0 0 .3rem; font-size: 1rem; }
.notice p { margin: .2rem 0; }
.notice--complete { border-color: var(--success); background: #eef8f2; }
.notice--provisional { border-color: var(--warning); background: #fff8e2; }
.notice--waiting, .notice--error { border-color: var(--danger); background: #fff0f0; }
.result-section { margin: 1.25rem 0 1.8rem; background: var(--paper); border: 0; border-top: 2px solid var(--purple-700); border-radius: var(--radius); overflow: hidden; box-shadow: none; }
.result-heading { margin: 0; padding: .7rem .85rem; color: var(--purple-900); background: white; font-size: 1.3rem; }
.result-summary { margin: 0; padding: .55rem .85rem; color: var(--muted); background: var(--purple-050); border-bottom: 1px solid var(--line); font-size: .85rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .48rem .58rem; border-right: 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th:last-child, td:last-child { border-right: 0; }
thead th { position: sticky; top: 0; z-index: 1; color: var(--purple-950); background: var(--purple-100); text-align: left; white-space: nowrap; }
tbody tr:nth-child(even) { background: #fbfafc; }
tbody tr:hover { background: #f0e9f8; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.rank { width: 4.2rem; font-weight: bold; }
.total { font-weight: bold; }
.muted { color: var(--muted); }
.status-pill { display: inline-block; padding: .14rem .45rem; border-radius: 0; font-size: .72rem; font-weight: bold; text-transform: uppercase; letter-spacing: .04em; }
.status-pill--complete { color: #fff; background: var(--success); }
.status-pill--provisional { color: #3d2b00; background: #f1ca5b; }
.status-pill--waiting { color: #fff; background: var(--danger); }
.team-details { margin-top: .35rem; }
.team-details summary { color: var(--purple-700); cursor: pointer; font-weight: bold; }
.team-members { margin: .35rem 0 0; padding-left: 1.1rem; }
.team-members li { margin: .18rem 0; }
.empty-state { padding: 2rem; text-align: center; color: var(--muted); }
.published-meta { color: var(--muted); font-size: .78rem; text-align: right; }
.site-footer { padding: 1rem; color: #e8ddf4; background: var(--purple-950); text-align: center; font-size: .8rem; }
.noscript { margin: 1rem; padding: 1rem; background: #fff0f0; }
[hidden] { display: none !important; }
@media (max-width: 70rem) { .control-grid { grid-template-columns: repeat(3, minmax(10rem, 1fr)); } }
@media (max-width: 48rem) {
  .site-header__inner { align-items: start; flex-direction: column; }
  .control-grid { grid-template-columns: 1fr 1fr; }
  .header-actions { width: 100%; }
  .header-actions .field { flex: 1; }
  th, td { padding: .42rem; }
}
@media (max-width: 30rem) { .control-grid { grid-template-columns: 1fr; } .view-tab { flex: 1; } }
@media print {
  .site-header { color: #000; background: #fff; border-bottom: 2px solid #000; }
  .controls, .header-actions, .site-footer, .skip-link { display: none !important; }
  .page-shell { max-width: none; padding: 0; }
  .result-section { break-inside: avoid; box-shadow: none; }
  .result-heading { color: #000; background: #eee; }
  thead th { position: static; }
}

#league-progress { width: fit-content; max-width: 100%; margin-bottom: 1rem; }
#league-progress td { text-align: center; }
#league-progress a { color: inherit; }
#league-progress .received { background: #edf5ed; }
#league-progress .waiting { color: #585466; }

#league-progress { margin-inline:auto; text-align:center; }
#league-progress th, #league-progress td { text-align:center; }
.team-leg .team-total > * { font-weight:bold; border-top:1px solid var(--line); background:var(--purple-100); }
.team-leg .athlete td { padding-block:.22rem; }
