/* O-Results — Mobile-first, light, snappy */

:root {
  --bg: #fafafa;
  --card: #fff;
  --border: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --success: #059669;
  --danger: #dc2626;
  --podium: #d97706;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --shadow: 0 1px 3px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Nav ── */
.nav {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text) !important;
  text-decoration: none !important;
  margin-right: auto;
}

.nav-links {
  display: flex;
  gap: .25rem;
}

.nav-links a {
  padding: .35rem .7rem;
  border-radius: 6px;
  font-size: .9rem;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  transition: all .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent);
  background: #eff6ff;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  margin-left: .5rem;
}
.nav-name { color: var(--muted); display: none; }
.nav-logout { color: var(--muted); font-size: .8rem; }
.nav-signin { color: var(--muted); font-size: .8rem; text-decoration: none; }
.nav-signin:hover { color: var(--accent); }

@media (min-width: 640px) {
  .nav { padding: .6rem 1.5rem; }
  .nav-name { display: inline; }
}

/* ── Page containers ── */
main { min-height: 80vh; }

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem;
}

.page-narrow {
  max-width: 400px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.page-header h1 { font-size: 1.4rem; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.card h2 { font-size: 1.1rem; margin-bottom: .75rem; }

/* ── Forms ── */
label {
  display: block;
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: .75rem;
}

input[type="text"],
input[type="password"] {
  display: block;
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font);
  background: var(--bg);
  margin-top: .25rem;
  transition: border-color .15s;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none !important;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
}
.btn-outline:hover { background: #f1f5f9; color: var(--accent); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--border);
}
.btn-danger:hover { background: #fef2f2; }

.btn-small {
  padding: .3rem .65rem;
  font-size: .8rem;
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: .15rem .6rem;
  background: #eff6ff;
  color: var(--accent);
  border-radius: 12px;
  font-size: .8rem;
  font-weight: 600;
}

/* ── Text utilities ── */
.text-muted { color: var(--muted); }
.text-small { font-size: .85rem; }

/* ── Alerts ── */
.alert {
  padding: .75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: .9rem;
}
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.empty-state .btn { margin-top: 1rem; }

/* ── Landing page ── */
.landing { padding: 1rem; }

.landing-hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.landing-hero h1 { font-size: 2rem; }
.landing-sub { color: var(--muted); margin-top: .5rem; font-size: 1.05rem; }

.landing-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.stat {
  font-size: .9rem;
  color: var(--muted);
  font-weight: 500;
}

.auth-forms {
  max-width: 400px;
  margin: 0 auto;
}

/* ── Results feed ── */
.date-group { margin-bottom: 1rem; }

.date-header {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  padding-bottom: .3rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: .4rem;
}

.feed-event-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: .5rem;
  overflow: hidden;
}

.feed-event-header {
  font-size: .8rem;
  font-weight: 700;
  padding: .35rem .6rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.feed-podium {
  color: var(--accent) !important;
  font-weight: 800;
}

/* ── Runner row (compact single-line) ── */
.runner-row {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .5rem;
  font-size: .85rem;
  border-bottom: 1px solid var(--border);
  -webkit-tap-highlight-color: transparent;
}
.runner-row:last-child { border-bottom: none; }
.runner-row[onclick] { cursor: pointer; }
.runner-row:active { background: #f8fafc; }

.rr-status { font-size: .7rem; flex-shrink: 0; width: 1rem; text-align: center; }
.rr-place { font-weight: 700; min-width: 1.4rem; text-align: right; flex-shrink: 0; font-size: .8rem; }
.rr-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rr-club { color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.rr-start { color: var(--muted); font-size: .75rem; flex-shrink: 0; }
.rr-result { font-variant-numeric: tabular-nums; font-weight: 500; flex-shrink: 0; margin-left: auto; width: 3.8rem; text-align: right; }
.rr-diff { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; flex-shrink: 0; width: 3.5rem; text-align: right; }
.rr-expand { color: var(--muted); font-size: .7rem; flex-shrink: 0; transition: transform .2s; }

.status-running .rr-name { color: var(--primary); }

/* ── Friends list ── */
.friends-list { margin-top: 1rem; }
.friends-list h2 { font-size: 1rem; margin-bottom: .5rem; color: var(--muted); }

.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: .35rem;
  box-shadow: var(--shadow);
}

.friend-info { display: flex; flex-direction: column; min-width: 0; }
.friend-name { font-weight: 600; font-size: .95rem; }
.friend-info .text-muted { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.club-row { border-left: 3px solid var(--accent); }

.inline-form { display: inline; }

/* ── Person search ── */
#search-input {
  margin-top: 0;
  font-size: 1rem;
}

.search-results { margin-top: .5rem; }

.search-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: .3rem;
  background: var(--bg);
}

.search-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.search-item-name { font-weight: 600; font-size: .9rem; }
.search-item-info .text-muted { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-events { font-size: .75rem; white-space: nowrap; }
.search-empty { color: var(--muted); padding: .5rem; font-size: .9rem; }

/* ── Live ── */
.live-bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem 0;
}
.pinned-chips-inline {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pinned-chips-inline::-webkit-scrollbar { display: none; }
.live-controls { display: flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.live-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}
.live-icon-btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.live-icon-btn-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.live-ticker-mini { font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.conn-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.conn-on { background: var(--success); box-shadow: 0 0 4px var(--success); }
.conn-off { background: var(--muted); }

.conn-pulse {
  animation: dot-pulse .6s ease-out;
}

.conn-flash {
  animation: dot-flash 1s ease-out;
  background: var(--podium) !important;
}

@keyframes dot-pulse {
  0% { transform: scale(1); box-shadow: 0 0 4px var(--success); }
  30% { transform: scale(1.8); box-shadow: 0 0 12px var(--success); }
  100% { transform: scale(1); box-shadow: 0 0 4px var(--success); }
}

@keyframes dot-flash {
  0% { transform: scale(1); box-shadow: 0 0 4px var(--podium); }
  20% { transform: scale(2); box-shadow: 0 0 16px var(--podium); }
  100% { transform: scale(1); box-shadow: 0 0 4px var(--success); background: var(--success); }
}

.btn-active { background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; }
.btn-disabled-hint { opacity: .5; }

.live-status { font-size: .85rem; margin-left: .25rem; }
.status-done { color: var(--success); }
.status-running { color: var(--podium); }

.start-time { font-size: .8rem; color: var(--muted); }

/* ── Changes feed ── */
.changes-feed {
  margin: .75rem 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fffbeb;
}

.change-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .6rem;
  font-size: .82rem;
  border-bottom: 1px solid #fde68a;
  animation: flash-in .5s ease-out;
}
.change-item:last-child { border-bottom: none; }
.change-finish { background: #ecfdf5; border-color: #a7f3d0; }

.change-icon { font-size: .9rem; flex-shrink: 0; }
.change-name { font-weight: 600; white-space: nowrap; }
.change-detail { color: var(--text); flex: 1; }
.change-time { color: var(--muted); font-size: .75rem; white-space: nowrap; margin-left: auto; }

@keyframes flash-in {
  from { background: #fef08a; }
  to { background: transparent; }
}

.section-header {
  font-size: .95rem;
  color: var(--muted);
  margin: 1.5rem 0 .5rem;
}

/* ── Follow sheet (slide-up modal) ── */
.follow-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,.4);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.follow-sheet.open { display: flex; align-items: flex-end; justify-content: center; }

.follow-sheet-inner {
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: sheet-up .25s ease-out;
}
@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.follow-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.follow-sheet-header h2 { font-size: 1.05rem; margin: 0; }
.follow-sheet-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: .25rem .5rem;
  color: var(--muted);
}

.follow-sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: .5rem;
  flex: 1;
}

.follow-empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }

.follow-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .4rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s;
}
.follow-card:active { border-color: var(--primary); }
.follow-card-open { border-color: var(--primary); background: #f8fafc; }

.follow-card-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .75rem;
}
.follow-card-info { flex: 1; min-width: 0; }
.follow-card-name {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.follow-card-org {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.follow-card-badge {
  flex-shrink: 0;
  font-size: .75rem;
  background: #eff6ff;
  color: var(--primary);
  padding: .1rem .4rem;
  border-radius: 1rem;
  font-weight: 600;
}
.follow-card-arrow { color: var(--muted); font-size: .7rem; flex-shrink: 0; }

.follow-classes {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .25rem .75rem .65rem;
}

/* ── Pinned chips (below header) ── */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .4rem 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 2rem;
  padding: .2rem .15rem .2rem .55rem;
  font-size: .78rem;
  animation: chip-in .2s ease-out;
}
.chip-label { font-weight: 600; color: var(--primary); white-space: nowrap; }
.chip-comp { color: var(--muted); font-size: .7rem; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.chip-x {
  background: none;
  border: none;
  font-size: .8rem;
  cursor: pointer;
  color: var(--muted);
  padding: .15rem .35rem;
  border-radius: 50%;
  line-height: 1;
}
.chip-x:active { background: #dbeafe; }

@keyframes chip-in {
  from { opacity: 0; transform: scale(.8); }
  to { opacity: 1; transform: scale(1); }
}

/* ── Class buttons (shared between sheet and inline) ── */

.class-btn {
  display: inline-block;
  padding: .25rem .55rem;
  font-size: .78rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: all .15s;
}
.class-btn:active { transform: scale(.95); }
.class-btn.class-pinned {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}

/* Pinned class sections */
.pinned-section {
  margin: 1rem 0;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  overflow: hidden;
}
.pinned-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .75rem;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
}
.pinned-title { display: flex; flex-direction: column; gap: .1rem; }
.pinned-class { font-weight: 700; font-size: .95rem; }
.pinned-comp { font-size: .78rem; color: var(--muted); }
.pinned-meta { display: flex; align-items: center; gap: .5rem; font-size: .8rem; }
.pinned-unpin { padding: .15rem .4rem; font-size: .75rem; }

.pinned-results { padding: .25rem; }
.pinned-card { border: none; border-bottom: 1px solid #f1f5f9; border-radius: 0; }
.pinned-card:last-child { border-bottom: none; }

/* ── Today's competitions list ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 1.5rem 0 .5rem;
  padding: 0 .1rem;
}
.section-header h2 { font-size: 1rem; margin: 0; }

.comp-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.comp-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.comp-item:last-child { border-bottom: none; }
.comp-item:active { background: #f1f5f9; }
.comp-item-info { flex: 1; min-width: 0; }
.comp-item-name {
  display: block;
  font-weight: 500;
  font-size: .88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comp-item-org {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comp-item-arrow { color: var(--muted); font-size: .7rem; flex-shrink: 0; }

/* ── Runner detail panel ── */
.runner-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.runner-detail-overlay.open { display: flex; }
.runner-detail-panel {
  background: var(--bg);
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  border-radius: 12px 12px 0 0;
  overflow-y: auto;
  box-shadow: 0 -4px 20px rgba(0,0,0,.15);
  animation: sheet-up .2s ease;
}
.runner-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}
.rd-name { font-weight: 700; font-size: 1rem; }
.rd-club { color: var(--muted); font-size: .85rem; margin-left: .4rem; }
.rd-summary { padding: .4rem .75rem; font-size: .9rem; }

.rd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.rd-table th {
  text-align: left;
  padding: .3rem .5rem;
  font-size: .75rem;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
}
.rd-table td {
  padding: .3rem .5rem;
  border-bottom: 1px solid #f1f5f9;
  font-variant-numeric: tabular-nums;
}
.rd-ctrl-name { font-weight: 500; }
.rd-cum { }
.rd-leg { color: var(--muted); }
.rd-ctrl-place { text-align: center; font-weight: 600; min-width: 1.5rem; }
tr.rd-start td, tr.rd-finish td { font-weight: 600; }
tr.rd-finish td { border-top: 2px solid var(--border); }

/* ── Feed tabs ── */
.feed-tabs {
  display: flex;
  gap: .25rem;
  margin: .25rem 0 .25rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.feed-tab {
  background: none;
  border: none;
  padding: .4rem .75rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  -webkit-tap-highlight-color: transparent;
}
.feed-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ── Unified feed ── */
.feed-event {
  margin: 1rem 0;
}
.feed-event-header {
  font-weight: 600;
  font-size: .9rem;
  padding: .4rem .2rem;
  color: #334155;
  border-bottom: 1px solid var(--border);
  margin-bottom: .25rem;
}
.feed-class-block {
  margin: .5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.feed-class-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .35rem .5rem;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}
.class-label {
  font-size: .8rem;
  font-weight: 600;
  color: #475569;
}
.pinned-label { color: var(--primary); }
.friend-class-link {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}
.friend-class-link:hover { text-decoration: underline; }
.pinned-block {
  border-left: 3px solid var(--primary);
  padding-left: .4rem;
  margin-left: .1rem;
}

/* ── Results table ── */
.results-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.results-table th {
  text-align: left;
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  padding: .4rem .5rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.results-table td {
  padding: .4rem .5rem;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
.results-table .num { text-align: right; }
.results-table .podium { color: var(--podium); font-weight: 700; }
.results-table .diff { color: var(--muted); }
.results-table .date-col { font-size: .8rem; color: var(--muted); }

.friend-highlight { background: #eff6ff; }
.friend-highlight td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* ── Event classes (collapsible) ── */
.class-group { margin-bottom: .75rem; }

.class-header {
  font-weight: 600;
  font-size: 1rem;
  padding: .6rem .75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
}
.class-header::-webkit-details-marker { display: none; }
.class-header::before {
  content: '▸';
  display: inline-block;
  margin-right: .4rem;
  transition: transform .15s;
}
details[open] .class-header::before { transform: rotate(90deg); }
details[open] .class-header {
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
}
details[open] .results-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
}

/* ── Responsive tweaks ── */
@media (max-width: 480px) {
  .rr-club { display: none; }  /* hide club on very narrow screens to save space */
  .nav-links a { padding: .35rem .5rem; font-size: .85rem; }
}
@media (min-width: 600px) {
  /* Landscape / wider: show more detail */
  .runner-row { font-size: .88rem; gap: .5rem; }
  .rr-club { max-width: 12rem; }
}
