/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #003366;
  --blue:   #005baa;
  --sky:    #3399cc;
  --accent: #00aaff;
  --gold:   #f5a623;
  --green:  #27ae60;
  --red:    #e74c3c;
  --bg:     #f0f4f8;
  --card:   #ffffff;
  --border: #d0dbe8;
  --text:   #1a2a3a;
  --muted:  #6b7f94;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,51,102,0.10);
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: #fff;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
  flex: 1;
}

header h1 span {
  color: var(--accent);
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
nav {
  display: flex;
  gap: 4px;
}

nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

nav a:hover   { background: rgba(255,255,255,0.15); color: #fff; }
nav a.active  { background: rgba(255,255,255,0.2);  color: #fff; }

/* ── Main ─────────────────────────────────────────────────────────────────── */
main {
  flex: 1;
  padding: 24px 20px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ── Page sections ────────────────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

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

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  background: var(--navy);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

thead th:hover { background: var(--blue); }
thead th.sorted-asc::after  { content: ' ▲'; font-size: 0.7em; }
thead th.sorted-desc::after { content: ' ▼'; font-size: 0.7em; }

tbody tr:nth-child(even) { background: #f5f9ff; }
tbody tr:hover { background: #dceeff; }

tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: none; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn:hover  { opacity: 0.88; }
.btn:active { transform: scale(0.97); }

.btn-primary   { background: var(--blue);  color: #fff; }
.btn-success   { background: var(--green); color: #fff; }
.btn-danger    { background: var(--red);   color: #fff; }
.btn-secondary { background: #e2ecf5;      color: var(--navy); }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s;
  min-width: 120px;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(51,153,204,0.15);
}

input[readonly] { background: #f0f4f8; color: var(--muted); cursor: default; }

/* ── Entry Form specific ──────────────────────────────────────────────────── */
.race-section {
  margin-bottom: 24px;
}

.race-header {
  background: var(--navy);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.race-table-wrap { border-radius: 0 0 var(--radius) var(--radius); }

.race-table input[type=number] { width: 80px; min-width: unset; }
.race-table input[type=text]   { width: 160px; min-width: unset; }
.race-table select             { width: 160px; min-width: unset; }

.race-table .auto-cell {
  background: #f0f6ff;
  color: var(--blue);
  font-weight: 600;
  min-width: 60px;
}

.placing-1 { color: #c8a000; font-weight: 800; }
.placing-2 { color: #7b8d9e; font-weight: 700; }
.placing-3 { color: #c47b2b; font-weight: 700; }

/* ── Scoreboard ───────────────────────────────────────────────────────────── */
.rank-1 td:first-child { color: #c8a000; font-weight: 800; font-size: 1.1em; }
.rank-2 td:first-child { color: #7b8d9e; font-weight: 700; }
.rank-3 td:first-child { color: #c47b2b; font-weight: 700; }

/* ── Toolbar ──────────────────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar input[type=search] {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}

.modal h2 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 20px;
}

.modal .form-group { margin-bottom: 14px; }
.modal .form-group input,
.modal .form-group select { width: 100%; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 8px 20px;
  border: none;
  background: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Stats strip ──────────────────────────────────────────────────────────── */
.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  min-width: 130px;
  flex: 1;
  box-shadow: var(--shadow);
}

.stat-box .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.stat-box .stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}

/* ── Toast notification ───────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  z-index: 300;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}

#toast.success { background: var(--green); }
#toast.error   { background: var(--red); }

/* ── Profile Modal (large variant) ───────────────────────────────────────── */
.modal-large {
  width: 92vw;
  max-width: 1000px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
}

.modal-large h2 {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.profile-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Profile summary stat strip */
.profile-stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.profile-stat-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  min-width: 110px;
  flex: 1;
  text-align: center;
}

.profile-stat-box .stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.profile-stat-box .stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
}

.profile-stat-box .stat-value.good { color: var(--green); }
.profile-stat-box .stat-value.warn { color: var(--gold); }

/* Chart containers — Chart.js requires a sized parent */
.chart-container {
  position: relative;
  width: 100%;
  height: 240px;
  margin-bottom: 4px;
}

/* HC breakdown */
.hc-breakdown-section {
  margin-bottom: 24px;
}

.hc-breakdown-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}

.hc-formula-box {
  background: #f0f6ff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--blue);
  font-weight: 600;
  margin-top: 12px;
  font-family: 'Courier New', monospace;
  line-height: 1.6;
}

.hc-formula-box .formula-result {
  color: var(--navy);
  font-weight: 800;
  font-size: 1rem;
}

/* Trend indicators */
.trend-improving { color: var(--green); font-weight: 700; }
.trend-declining { color: var(--red);   font-weight: 700; }
.trend-steady    { color: var(--muted); font-weight: 600; }

/* ── Status badges (DNF/DQ/DNS) ───────────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .5px;
}
.status-dnf { background: #fff3cd; color: #856404; }
.status-dq  { background: #f8d7da; color: #842029; }
.status-dns { background: #e2ecf5; color: var(--muted); }
.status-text-dnf { color: #856404; font-weight: 700; }
.status-text-dq  { color: #842029; font-weight: 700; }
.status-text-dns { color: var(--muted); font-style: italic; }

/* ── Invalid Actual Swim Time (negative / clock < handicap) ──────────────── */
.ast-invalid {
  color: var(--red) !important;
  font-weight: 700;
  background: #fff0f0;
  border-radius: 4px;
  padding: 2px 4px;
  cursor: help;
}
[data-theme="dark"] .ast-invalid { background: #2e1a1a; }

/* ── PB badge ─────────────────────────────────────────────────────────────── */
.pb-badge {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  vertical-align: middle;
}

/* ── Division badges ──────────────────────────────────────────────────────── */
.division-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .4px;
  vertical-align: middle;
}
.division-senior { background: #dce8ff; color: var(--blue); }
.division-junior { background: #d4f5e9; color: var(--green); }

/* ── Achievement badges ───────────────────────────────────────────────────── */
.achievement-badge {
  font-size: 1rem;
  cursor: default;
}

/* ── HC Fairness indicator ────────────────────────────────────────────────── */
.hc-fairness {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}
.hc-over  { background: #f8d7da; color: #842029; }
.hc-under { background: #fff3cd; color: #856404; }
.hc-fair  { background: #d4f5e9; color: var(--green); }
.hc-new   { background: #e2ecf5; color: var(--muted); }

/* ── Fuzzy suggestions dropdown ───────────────────────────────────────────── */
.fuzzy-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 4px 16px rgba(0,51,102,0.15);
  z-index: 150;
  max-height: 200px;
  overflow-y: auto;
}
.fuzzy-item {
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.fuzzy-item:last-child { border-bottom: none; }
.fuzzy-item:hover { background: #dceeff; }
.fuzzy-add { background: #f0f6ff; }
.fuzzy-add:hover { background: #d8ecff; }

/* ── Calendar ─────────────────────────────────────────────────────────────── */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 20px;
}
.cal-day-header {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.cal-cell {
  min-height: 80px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.78rem;
}
.cal-cell:hover { background: #dceeff; }
.cal-empty { background: transparent; border-color: transparent; cursor: default; }
.cal-today { border-color: var(--blue); border-width: 2px; }
.cal-today .cal-day-num { color: var(--blue); font-weight: 800; }
.cal-has-result { background: #f0f6ff; }
.cal-day-num { font-weight: 600; color: var(--text); margin-bottom: 3px; }
.cal-dot { font-size: 0.7rem; color: var(--blue); font-weight: 600; }
.cal-event {
  background: var(--navy);
  color: #fff;
  border-radius: 3px;
  padding: 2px 5px;
  margin-top: 3px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.cal-event-del {
  cursor: pointer;
  opacity: 0.7;
  font-size: 0.65rem;
}
.cal-event-del:hover { opacity: 1; }
.cal-upcoming-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.cal-upcoming-item:last-child { border-bottom: none; }

/* ── Settings toggle switch ───────────────────────────────────────────────── */
.toggle-switch {
  width: 46px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-switch.active { background: var(--blue); }
.toggle-knob {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: left 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch.active .toggle-knob { left: 25px; }

/* ── Dark Mode ────────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --navy:   #4a90d9;
  --blue:   #5ba8ff;
  --sky:    #66ccee;
  --accent: #33bbff;
  --gold:   #f5a623;
  --green:  #2ecc71;
  --red:    #e74c3c;
  --bg:     #0d1117;
  --card:   #161b22;
  --border: #30363d;
  --text:   #e6edf3;
  --muted:  #8b949e;
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
}
[data-theme="dark"] header {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
[data-theme="dark"] tbody tr:nth-child(even) { background: #1c2128; }
[data-theme="dark"] tbody tr:hover { background: #21262d; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
  background: #21262d;
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] input[readonly] { background: #161b22; }
[data-theme="dark"] .fuzzy-suggestions { background: #161b22; }
[data-theme="dark"] .fuzzy-item:hover { background: #21262d; }
[data-theme="dark"] .cal-cell { background: #161b22; }
[data-theme="dark"] .cal-cell:hover { background: #21262d; }
[data-theme="dark"] .cal-has-result { background: #1c2535; }
[data-theme="dark"] .division-senior { background: #1c2535; color: var(--blue); }
[data-theme="dark"] .division-junior { background: #1a2e25; color: var(--green); }
[data-theme="dark"] .hc-fair  { background: #1a2e25; }
[data-theme="dark"] .hc-over  { background: #2e1a1a; }
[data-theme="dark"] .hc-under { background: #2e2a1a; }

/* ── Guide / Glossary page ────────────────────────────────────────────────── */
.guide-jumpto { margin-bottom: 0; }
.guide-section { scroll-margin-top: 76px; }

.guide-intro {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 18px;
  line-height: 1.7;
}

.guide-h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin: 20px 0 8px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--border);
}

.guide-step-grid { display: flex; flex-direction: column; gap: 18px; }

.guide-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.65;
}

.guide-step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-formula-box {
  background: #f0f6ff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 16px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--blue);
  font-weight: 600;
  margin: 10px 0;
}

.guide-example {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 14px 0;
}

.guide-example-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}

.guide-tip {
  background: #fffbea;
  border: 1px solid #f5d76e;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #856404;
  margin: 14px 0;
  line-height: 1.6;
}

.guide-def-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.guide-def-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.guide-def-abbr {
  font-size: 1.4rem;
  font-weight: 900;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.guide-def-meaning {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.guide-def-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
}

.guide-glossary { display: flex; flex-direction: column; }

.guide-gloss-entry {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.6;
}
.guide-gloss-entry:last-child { border-bottom: none; }

.guide-gloss-term { font-weight: 700; color: var(--navy); padding-top: 1px; }
.guide-gloss-def  { color: var(--text); }

.guide-gloss-formula {
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--blue);
  background: #f0f6ff;
  border-radius: 4px;
  padding: 4px 8px;
  margin: 6px 0;
}

[data-theme="dark"] .guide-formula-box  { background: #1c2535; color: var(--blue); }
[data-theme="dark"] .guide-example      { background: #0d1117; }
[data-theme="dark"] .guide-def-card     { background: #0d1117; }
[data-theme="dark"] .guide-tip          { background: #2a2310; border-color: #6a4e10; color: #d4a843; }
[data-theme="dark"] .guide-gloss-formula { background: #1c2535; }

@media (max-width: 700px) {
  .guide-def-grid          { grid-template-columns: 1fr; }
  .guide-gloss-entry       { grid-template-columns: 1fr; gap: 2px; }
  .guide-gloss-term        { border-bottom: 1px dashed var(--border); padding-bottom: 4px; margin-bottom: 4px; }
}

/* ── Print stylesheet (Feature 13) ───────────────────────────────────────── */
@media print {
  header, nav, .toolbar, #toast,
  .btn, button, .modal-backdrop,
  #page-entry, #page-members,
  [data-page="entry"], [data-page="members"],
  .no-print { display: none !important; }

  body { background: #fff; color: #000; font-size: 11pt; }
  main { padding: 0; max-width: 100%; }
  .page { display: block !important; }
  .page:not(.active) { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  table { font-size: 10pt; }
  thead th { background: #003366 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rank-1 td:first-child, .placing-1 { color: #c8a000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Print header */
  body::before {
    content: 'Mudcrabs Swimming Club';
    display: block;
    font-size: 18pt;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8pt;
    color: #003366;
  }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  header { flex-wrap: wrap; height: auto; padding: 10px; }
  nav a  { padding: 5px 8px; font-size: 0.75rem; }
  main   { padding: 14px 10px; }
  .stat-box .stat-value { font-size: 1.2rem; }
  .modal-large {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    padding: 16px;
  }
  .chart-container { height: 180px; }
  .cal-cell { min-height: 56px; font-size: 0.68rem; }
  .cal-grid { gap: 1px; }
  .cal-layout { grid-template-columns: 1fr !important; }
}
