@font-face {
  font-family: Inter;
  src: url('/static/fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bar-height: calc(53px + env(safe-area-inset-top));
  scroll-padding-top: var(--bar-height);
  color-scheme: light;
  --bg: #F5F3EF;
  --surface: #FFFFFF;
  --surface-2: #F1EFEB;
  --ink: #23272C;
  --muted: #5E6670;
  --line: #E2DED6;
  --accent: #FF5A1F;
  --accent-text: #A4330A;
  --on-accent: #181B1E;
  --boulder: #FF5A1F;
  --lead: #2F6FDE;
  --top_rope: var(--lead);
  --speed: #D7263D;
  --gold: #C9A227;
  --silver: #9AA0A6;
  --bronze: #B0743C;
  --holes: rgb(35 39 44 / 6%);
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #16191D;
  --surface: #1E2228;
  --surface-2: #262B31;
  --ink: #E9EAEC;
  --muted: #AEB5BF;
  --line: #373D44;
  --accent-text: #FF9065;
  --lead: #70A3FF;
  --speed: #FF657B;
  --holes: rgb(255 255 255 / 6%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #16191D; --surface: #1E2228; --surface-2: #262B31; --ink: #E9EAEC;
    --muted: #AEB5BF; --line: #373D44; --accent-text: #FF9065;
    --lead: #70A3FF; --speed: #FF657B; --holes: rgb(255 255 255 / 6%);
  }
}
* { box-sizing: border-box; }
[hidden], html:not(.js) .js-only, html:not(.js) [data-follow-id] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; }
button, .button, select, input:not([type=checkbox]) { min-height: 40px; border-radius: 6px; border: 1px solid var(--line); }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; font-weight: 600; cursor: pointer; color: var(--on-accent); background: var(--accent); border-color: transparent; text-decoration: none; }
.button-light, .icon-button { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
input:not([type=checkbox]), select { min-width: 0; max-width: 100%; padding: 7px 10px; background: var(--surface); color: var(--ink); }
input[type=checkbox] { accent-color: var(--accent-text); }
input::placeholder { color: var(--muted); opacity: 1; }
a { color: inherit; text-underline-offset: .18em; text-decoration-color: var(--muted); }
a:hover { color: var(--accent-text); }
button:hover, .button:hover { border-color: var(--accent-text); }
a.button:hover { color: var(--on-accent); }
a.button-light:hover { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
summary { cursor: pointer; }
h1, h2, h3, p { margin: 0 0 .55em; }
h1, h2, h3 { line-height: 1.2; text-wrap: pretty; }
h1 { font-size: 24px; letter-spacing: -.035em; }
h2 { font-size: 20px; letter-spacing: -.025em; }
h3 { font-size: 16px; }
small, .small, .cell-detail { font-size: 12px; }
.muted, .cell-detail, .out-of-competition { color: var(--muted); }
.cell-detail { display: block; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 20; top: 4px; left: 4px; background: var(--surface); padding: 10px; }
.topbar, .empty, .follow-grid:empty + .follow-picker { background-image: radial-gradient(circle, var(--holes) 1px, transparent 1.4px); background-size: 10px 10px; }
.topbar { position: sticky; top: 0; z-index: 10; background-color: var(--surface); border-bottom: 1px solid var(--line); }
.bar-inner, .app-shell { width: min(100%, 1100px); margin-inline: auto; padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); }
.bar-inner { display: flex; align-items: center; gap: 5px; min-height: 52px; padding-block: env(safe-area-inset-top) 0; }
.brand { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; min-height: 40px; color: var(--ink); font-size: 16px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; text-decoration: none; }
.brand img { flex: none; }
.header-tools { display: flex; gap: 2px; }
.icon-button { display: inline-grid; place-items: center; padding: 0; width: 40px; height: 40px; min-width: 40px; border-radius: 6px; text-decoration: none; }
.theme-toggle { border-color: transparent; background: transparent; }
.profile-button { font-size: 13px; font-weight: 700; }
.theme-toggle svg:first-child, [data-theme=dark] .theme-toggle svg:last-child { display: none; }
[data-theme=dark] .theme-toggle svg:first-child { display: block; }
.season-control { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); flex: none; }
.season-control a, .older-seasons summary { display: flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding-inline: 7px; line-height: 1; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.season-control [aria-current], .older-seasons .selected { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px var(--accent); }
.older-seasons { position: relative; }
.older-seasons summary { list-style: none; }
.older-seasons summary::-webkit-details-marker { display: none; }
.older-seasons > div { position: absolute; z-index: 12; top: calc(100% + 3px); right: 0; width: 120px; max-height: min(55vh, 420px); overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 3px; }
.bottom-nav { position: fixed; z-index: 8; inset: auto 0 0; display: flex; align-items: stretch; justify-content: space-around; padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); }
.bottom-nav a { flex: 1; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; }
.bottom-nav a[aria-current] { color: var(--accent-text); box-shadow: inset 0 2px var(--accent); }
.app-shell { padding-top: 20px; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
main, .card, .table-wrap { min-width: 0; }
.page-heading { margin-bottom: 16px; }
.page-heading h1 { margin-bottom: 3px; }
.page-heading p { color: var(--muted); font-size: 13px; margin: 0; }
.card, .prose, .search-group { padding: 12px; border: 1px solid var(--line); background-color: var(--surface); border-radius: 8px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; margin: 16px 0 8px; }
.section-heading h2, .section-heading h3 { margin: 0; }
.empty { padding: 12px; color: var(--muted); }
.notice { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; font-size: 13px; }
.notice div { margin-right: auto; }
footer { margin-top: 28px; padding-block: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer p { margin: 0 0 5px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 8px; padding: 0; color: var(--muted); font-size: 12px; }
.breadcrumbs li + li::before { content: '/ '; }
.table-wrap { position: relative; max-width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; line-height: 1.25; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
.number { text-align: right; }
.cup { width: 15px; height: 15px; flex: none; vertical-align: -.18em; }
.medal-1 { color: var(--gold); }
.medal-2 { color: var(--silver); }
.medal-3 { color: var(--bronze); }
.place-value { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.plain-list, .people-list, .choice-list, .personal-results, .personal-ranks, .search-group ul { list-style: none; margin: 0; padding: 0; }
.people-list li, .choice-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); }
.search-bar, .search-input-row { display: flex; gap: 6px; }
.search-bar input { flex: 1; width: 100%; }
.search-columns { display: grid; gap: 10px; }
.search-group li + li { border-top: 1px solid var(--line); }
.search-group a, .choice-list a { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.htmx-indicator:not(.htmx-request) { display: none; }
#search-results, .choice-list { margin-top: 12px; }
.stat-strip { display: flex; margin: 12px 0; padding-block: 8px; border-block: 1px solid var(--line); }
.stat-strip > div { min-width: 0; flex: 1; padding-inline: 8px; }
.stat-strip > div + div { border-left: 1px solid var(--line); }
.stat-strip dt { color: var(--muted); font-size: 12px; }
.stat-strip dd { font-weight: 700; font-size: 16px; margin: 4px 0 0; }
@media (max-width: 479px) {
  .bar-inner { gap: 1px; padding-inline: max(2px, env(safe-area-inset-left)) max(2px, env(safe-area-inset-right)); }
  .header-tools { gap: 0; }
  .brand { font-size: 13px; max-width: 100%; gap: 3px; }
  .brand img { width: 20px; height: 20px; }
  .brand span { max-width: 65px; }
  .season-control a, .older-seasons summary { font-size: 12px; padding-inline: 4px; }
  .breadcrumbs li:last-child { display: none; }
}
@media (min-width: 700px) {
  .bar-inner, .app-shell { padding-inline: 20px; }
  .card, .search-group, .prose { padding: 16px; }
  .search-columns { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (min-width: 880px) {
  .bar-inner { gap: 14px; }
  .brand { flex: none; margin-right: 10px; }
  .bottom-nav { position: static; border: 0; margin-right: auto; background: transparent; padding: 0; gap: 3px; }
  .bottom-nav a { min-height: 52px; flex-direction: row; padding: 0 11px; gap: 6px; font-size: 13px; }
  .bottom-nav a[aria-current] { box-shadow: inset 0 -3px var(--accent); }
  .bottom-nav .icon { width: 16px; height: 16px; }
  .app-shell { padding-top: 24px; padding-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (max-width: 349px) {
  .bar-inner { flex-wrap: wrap; padding: 3px 8px; }
  .season-control { order: 3; margin: 0 0 3px; }
  .bar-inner:has(.season-control) .brand { flex-basis: calc(100% - 88px); }
  .brand span { max-width: none; }
}
.icon { flex: none; vertical-align: middle; }
.season-control .season-mobile, .short-season-list { display: none; }
.older-seasons summary { gap: 2px; }
.feedback-button { background: transparent; border-color: transparent; }
[data-install-nudge] { gap: 4px; padding: 0 4px 0 10px; font-size: 12px; }
[data-install-nudge] button { background: transparent; border: 0; color: var(--accent-text); }
[data-follow-id][aria-pressed=true] .icon { fill: currentColor; }

@media (max-width: 699px) {
  .bar-inner, .app-shell { padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
  .bar-inner { gap: 4px; }
  .brand { font-size: 15px; gap: 5px; min-width: 0; }
  .brand span { max-width: none; }
  .brand img { width: 23px; height: 23px; }
  .app-shell { padding-top: 12px; }
  .page-heading { margin-bottom: 10px; }
}

@media (max-width: 999px) {
  .season-control > a, .season-desktop { display: none; }
  .season-control .season-mobile, .short-season-list { display: flex; }
}
