/* ── Sloe Sailing — shared stylesheet ───────────────────────────────────────
   Matches sloesailing.com (Astra theme). Light-mode default.
   Dark via prefers-color-scheme or [data-theme="dark"].
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Astra design tokens (from live site) ────────────────────────────────── */
:root {
  /* Astra global palette */
  --ast-0: #3d1e4a;              /* Deep Sloe — links, primary */
  --ast-1: #a8345c;              /* Heyday — hover/active */
  --ast-2: #6b4a78;              /* Sloe Bloom — secondary labels */
  --ast-3: #150818;              /* Near black — footer */
  --ast-4: #f6f6f6;              /* Subtle off-white bg */
  --ast-5: #ffffff;
  --ast-6: rgba(0,0,0,.14);
  --ast-8: #878787;              /* Gray */

  /* Brand accent colors (not in Astra system) */
  --aqua:   #0BE5EB;
  --yellow: #FFE600;
  --pink:   #FF2E93;
  --green:  #0BEB6B;

  /* Semantic tokens — light mode */
  --bone:        #f4ecdc;            /* Astra .ast-separate-container bg */
  --bg:          #f4ecdc;            /* Bone page background */
  --bg-up:       #ffffff;            /* Cards / elevated surfaces on Bone */
  --bg-in:       #f4f0f8;        /* slightly purple-tinted input bg */
  --surface:     #f6f6f6;
  --edge:        rgba(0,0,0,.12);
  --ink:         #1a0e22;
  --ink-1:       #1a0e22;
  --ink-2:       #6b4a78;        /* = --ast-2 */
  --ink-3:       #878787;        /* = --ast-8 */
  --link:        var(--ast-0);
  --link-hover:  var(--ast-1);
  --surface-hover: rgba(61,30,74,.04);
  --surface-th:    rgba(0,0,0,.04);

  /* Typography */
  --body: 'Source Serif 4', Georgia, serif;
  --h1:   'Fraunces', Georgia, serif;
  --ui:   'Inter Tight', system-ui, sans-serif;

  /* Layout */
  --r:    10px;
  --r-sm: 6px;
  --ease: 150ms ease;
  --header-h: 72px;
  --container: 1200px;

  color-scheme: light;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #1a0e22;
    --bg-up:       #251335;
    --bg-in:       #150818;
    --surface:     #251335;
    --edge:        rgba(255,255,255,.09);
    --ink:         #ede0f8;
    --ink-1:       #ede0f8;
    --ink-2:       #9080a8;
    --ink-3:       #604070;
    --link:        #c88ff0;
    --link-hover:  #e0aaff;
    --surface-hover: rgba(255,255,255,.03);
    --surface-th:    rgba(255,255,255,.04);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:          #1a0e22;
  --bg-up:       #251335;
  --bg-in:       #150818;
  --surface:     #251335;
  --edge:        rgba(255,255,255,.09);
  --ink:         #ede0f8;
  --ink-1:       #ede0f8;
  --ink-2:       #9080a8;
  --ink-3:       #604070;
  --link:        #c88ff0;
  --link-hover:  #e0aaff;
  --surface-hover: rgba(255,255,255,.03);
  --surface-th:    rgba(255,255,255,.04);
  color-scheme: dark;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  padding-top: var(--header-h);
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; }
::selection { background: #a8345c; color: #fff; }
/* Fraunces italic "wink" — WONK 1 matches sloesailing.com */
em, i { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-variation-settings: 'opsz' 36, 'SOFT' 50, 'WONK' 1; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding-left:  max(16px, env(safe-area-inset-left,  0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ── Site header (matches WordPress Astra header) ────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--ast-0);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.site-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-left:  max(16px, env(safe-area-inset-left,  0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-h);
  gap: 1rem;
}
.header-nav-left {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}
.header-nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.125rem;
}
.header-nav-left a,
.header-nav-right nav a {
  font-family: var(--ui);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  padding: 0.5rem 0.875rem;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
}
.header-nav-left a:hover,
.header-nav-right nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.12);
  text-decoration: none;
}
.header-nav-left a.active,
.header-nav-right nav a.active {
  color: #fff;
  font-weight: 600;
}
.header-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  padding: 0.5rem;
}
.header-logo img {
  display: block;
  width: 113px;
  height: auto;
  filter: brightness(0) invert(1);  /* white logo on dark header */
}
.header-logo:hover { opacity: 0.85; text-decoration: none; }

/* Mobile header: 2-col (logo + auth), nav row below */
.header-mobile-nav {
  display: none;
  overflow-x: auto;
  gap: 0;
  padding: 0 max(16px, env(safe-area-inset-left, 0px));
  padding-bottom: 0.5rem;
  border-top: 1px solid rgba(255,255,255,.12);
  scrollbar-width: none;
}
.header-mobile-nav::-webkit-scrollbar { display: none; }
.header-mobile-nav a {
  font-family: var(--ui);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  padding: 0.375rem 0.625rem;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.header-mobile-nav a:hover { color: #fff; text-decoration: none; }

@media (max-width: 768px) {
  :root { --header-h: 100px; }
  .site-header-inner {
    grid-template-columns: 1fr auto;
    min-height: 56px;
    gap: 0.5rem;
  }
  .header-nav-left { display: none; }
  .header-logo { justify-content: flex-start; }
  .header-logo img { width: 90px; }
  .header-mobile-nav { display: flex; }
}

/* ── Shared header auth (kept for nav-auth, user-menu) ───────────────────── */
.nav-auth { display: flex; align-items: center; margin-left: 0.5rem; }
.user-menu { position: relative; }
.user-menu-trigger {
  cursor: pointer;
  list-style: none;
  padding: 0.3rem 0.625rem;
  font-family: var(--ui);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 4px;
}
.user-menu-trigger::-webkit-details-marker { display: none; }
.user-menu-drop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 0.25rem;
  min-width: 170px;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.user-menu-drop a,
.user-menu-drop button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4375rem 0.75rem;
  font-family: var(--ui);
  font-size: 0.875rem;
  border: none;
  background: none;
  cursor: pointer;
  color: #1a0e22;
  border-radius: 4px;
  text-decoration: none;
}
.user-menu-drop a:hover,
.user-menu-drop button:hover {
  background: var(--ast-4);
  text-decoration: none;
  color: var(--ast-0);
}

/* Legacy .nav — kept for backward compat */
.nav {
  background: var(--ast-0);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 0.75rem;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; text-decoration: none; }
.brand:hover { text-decoration: none; opacity: 0.9; }
.brand-name {
  font-family: var(--h1);
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
}
.brand-sub { font-size: 0.6875rem; color: rgba(255,255,255,.4); }
.nav-links { margin-left: auto; display: flex; gap: 0.25rem; list-style: none; }
.nav-links a {
  display: block;
  padding: 0.375rem 0.625rem;
  border-radius: var(--r-sm);
  font-family: var(--ui);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,.65);
}
.nav-links a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.nav-links a.active { color: #fff; font-weight: 600; }

/* ── Main ───────────────────────────────────────────────────────────────── */
main { padding-block: 1.75rem 3rem; }

/* ── Type ───────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--h1);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  font-variation-settings: 'opsz' 36, 'SOFT' 50, 'WONK' 0;
}
h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); color: var(--ast-0); }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.1rem; }
h6 {
  font-family: var(--ui);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ast-2);
}
.page-h { margin-bottom: 1.5rem; }
.page-h p { color: var(--ink-2); margin-top: 0.375rem; font-size: 0.9375rem; font-family: var(--body); }

/* ── Section ────────────────────────────────────────────────────────────── */
.sec { margin-bottom: 2.25rem; }
.sec-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}
.sec-hd h2 {
  font-family: var(--ui);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ast-2);
}
.sec-hd h2 span { font-family: var(--body); font-size: 0.75rem; color: var(--ink-2); font-weight: 400; text-transform: none; letter-spacing: 0; }
.sec-hd-note { font-size: 0.8125rem; color: var(--ink-3); }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-up);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  padding: 1.125rem 1.25rem;
  margin-bottom: 0.75rem;
}
.card--accent { border-left: 3px solid var(--ast-0); }
.card--pink   { border-left: 3px solid var(--ast-1); }
.card--yellow { border-left: 3px solid var(--yellow); }
.card-title {
  font-family: var(--h1);
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--ast-0); text-decoration: none; }
.card-meta {
  font-family: var(--ui);
  font-size: 0.8125rem;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.card-foot {
  margin-top: 0.875rem;
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.card-body { font-size: 0.9375rem; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.b {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-family: var(--ui);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.b-regatta  { background: rgba(61,30,74,.1);  color: var(--ast-0); }
.b-race     { background: rgba(255,230,0,.2); color: #7a6500; }
.b-series   { background: rgba(168,52,92,.12); color: var(--ast-1); }
.b-social   { background: var(--surface);     color: var(--ink-3); }
.b-upcoming { background: rgba(11,229,235,.12); color: #007a7d; }
.b-active   { background: rgba(255,230,0,.2);  color: #7a6500; }
.b-finished { background: rgba(11,235,107,.12); color: #0a7a3f; }
.b-abandoned { background: rgba(168,52,92,.12); color: var(--ast-1); }
.b-scheduled { background: var(--surface);     color: var(--ink-3); }
.b-started  { background: rgba(255,230,0,.2);  color: #7a6500; }
.b-postponed { background: rgba(168,52,92,.12); color: var(--ast-1); }
.b-aqua     { background: rgba(11,229,235,.12); color: #007a7d; }
.b-yellow   { background: rgba(255,230,0,.2);  color: #7a6500; }
.b-pink     { background: rgba(168,52,92,.12); color: var(--ast-1); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.5rem 1.125rem;
  border-radius: 4px;
  font-family: var(--ui);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  line-height: 1.4;
  transition: opacity var(--ease), background var(--ease);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.btn:hover { opacity: 0.88; text-decoration: none; }
.btn-primary { background: var(--ast-0); color: #fff; }
.btn-primary:hover { background: var(--ast-1); opacity: 1; }
.btn-outline { background: transparent; color: var(--ast-0); border: 1.5px solid var(--ast-0); }
.btn-pink    { background: var(--ast-1); color: #fff; }
.btn-ghost   { background: transparent; color: var(--ink-2); border: 1px solid var(--edge); }
.btn-ghost:hover { background: var(--surface); opacity: 1; }
.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8125rem; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.75rem; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.field { margin-bottom: 0.875rem; }
.label {
  display: block;
  font-family: var(--ui);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ast-2);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.input, .select {
  width: 100%;
  background: var(--bg-in);
  border: 1px solid var(--edge);
  color: var(--ink);
  padding: 0.5625rem 0.75rem;
  border-radius: var(--r-sm);
  font-family: var(--body);
  font-size: 0.9375rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--ast-0);
  box-shadow: 0 0 0 3px rgba(61,30,74,.12);
}
.select option { background: var(--bg); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 480px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .form-row-3 { grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }
}
.form-actions { display: flex; gap: 0.625rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--r);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--ui);
}
.alert-ok   { background: rgba(11,235,107,.1); border: 1px solid rgba(11,235,107,.3); color: #0a7a3f; }
.alert-err  { background: rgba(168,52,92,.1); border: 1px solid rgba(168,52,92,.3); color: var(--ast-1); }
.alert-info { background: rgba(61,30,74,.07); border: 1px solid rgba(61,30,74,.18); color: var(--ast-0); }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); border: 1px solid var(--edge); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th {
  background: var(--surface-th);
  padding: 0.5625rem 0.875rem;
  text-align: left;
  font-family: var(--ui);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-2);
  white-space: nowrap;
}
tbody td {
  padding: 0.5625rem 0.875rem;
  border-top: 1px solid var(--edge);
  vertical-align: middle;
}
tbody tr:hover { background: var(--surface-hover); }
.td-r { text-align: right; }
.td-num { text-align: right; font-variant-numeric: tabular-nums; }
.td-muted { color: var(--ink-2); font-size: 0.8125rem; }
.discarded { color: var(--ink-3) !important; text-decoration: line-through; }
.td-total { font-weight: 700; color: var(--ast-0); font-variant-numeric: tabular-nums; }
.place-1 { color: #c8870a; font-weight: 700; }
.place-2 { color: #787878; font-weight: 600; }
.place-3 { color: #a06030; font-weight: 600; }

/* ── Results-specific ───────────────────────────────────────────────────── */
.class-block { margin-bottom: 2.5rem; }
.class-block h2 {
  font-family: var(--h1);
  font-size: 1.3125rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.class-block .scoring-sys {
  font-family: var(--ui);
  font-size: 0.75rem;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 0.875rem;
}

/* ── RC page ────────────────────────────────────────────────────────────── */
.race-blk {
  background: var(--bg-up);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  margin-bottom: 1rem;
  overflow: hidden;
}
.race-blk-hd {
  background: var(--surface-th);
  padding: 0.75rem 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--edge);
}
.race-blk-title {
  font-family: var(--h1);
  font-size: 1rem;
  font-weight: 600;
}
.race-blk-body { padding: 1rem 1.125rem; }
.finish-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-top: 1px solid var(--edge);
  font-size: 0.875rem;
}
.finish-row:first-child { border-top: none; }
.finish-place { min-width: 1.75rem; font-weight: 700; color: #c8870a; font-variant-numeric: tabular-nums; }
.finish-sail  { min-width: 5.5rem; font-weight: 600; }
.finish-time  { color: var(--ink-2); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-2); }
.empty-icon { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.5; }
.empty-page { text-align: center; padding: 4rem 1rem; }
.empty-state { color: var(--ink-3); font-style: italic; }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0.125rem; border-bottom: 2px solid var(--edge); margin-bottom: 1.5rem; overflow-x: auto; }
.tab {
  padding: 0.5625rem 1rem;
  font-family: var(--ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  margin-bottom: -2px;
}
.tab:hover { color: var(--ast-0); text-decoration: none; }
.tab.active { color: var(--ast-0); border-bottom-color: var(--ast-0); }
.tab-cta { background: var(--ast-0); color: #fff !important; border-radius: 4px; font-weight: 600; padding: 0.3rem 0.875rem; }

/* ── Event hero ──────────────────────────────────────────────────────────── */
.event-hero { margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--edge); }
.event-hero h1 { margin-bottom: 0.375rem; }
.event-hero-meta { font-family: var(--ui); font-size: 0.9rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; margin-top: 0.5rem; }

/* ── Stats strip ─────────────────────────────────────────────────────────── */
.stats { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }
.stat {
  background: var(--bg-up);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  padding: 0.875rem 1.25rem;
  flex: 1 1 7rem;
  min-width: 7rem;
}
.stat-num { font-family: var(--h1); font-size: 1.75rem; font-weight: 600; color: var(--ast-0); line-height: 1; }
.stat-label { font-family: var(--ui); font-size: 0.75rem; color: var(--ink-2); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }

/* ── Grid ────────────────────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .grid-col-main { grid-column: 1; }
  .grid-col-side { grid-column: 2; }
}
@media (min-width: 640px) {
  .event-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
}

/* ── WP chrome overrides ─────────────────────────────────────────────────── */
/*
 * When body.has-wp-chrome is set, the real WP header/footer are injected.
 * WP's custom CSS makes the header transparent with a gradient; override it
 * to solid Sloe purple for app pages (which have no hero background image).
 */
body.has-wp-chrome {
  padding-top: 80px;    /* WP fixed header is ~80px; avoids content going under it */
}
@media (max-width: 921px) {
  body.has-wp-chrome { padding-top: 70px; }
}
body.has-wp-chrome #masthead,
body.has-wp-chrome #masthead .ast-primary-header-bar {
  background: #3d1e4a !important;
  background-image: none !important;
}
/* Remove cart icon — not part of the Sailor app */
body.has-wp-chrome .ast-site-header-cart { display: none !important; }
/* WP footer uses its own background and colour tokens — don't override */
body.has-wp-chrome .site-footer { margin-top: 4rem; }

/* ── Site footer (matches WordPress footer) ──────────────────────────────── */
.site-footer {
  background: var(--ast-3);
  color: rgba(255,255,255,.65);
  margin-top: 4rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 3rem max(16px, env(safe-area-inset-left,0px)) 2rem;
}
@media (min-width: 640px) { .footer-inner { grid-template-columns: repeat(4, 1fr); } }
.footer-heading {
  font-family: var(--ui);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,.35);
  margin-bottom: 0.875rem;
}
.footer-links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
}
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-bar {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.125rem max(16px, env(safe-area-inset-left,0px));
  text-align: center;
  font-family: var(--ui);
  font-size: 0.8125rem;
  color: rgba(255,255,255,.35);
}
/* Legacy footer — keep for compat but no longer used in sailor/base.html */
footer {
  border-top: 1px solid var(--edge);
  padding-block: 1.25rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
  text-align: center;
  font-family: var(--ui);
}
footer a { color: var(--ink-2); }

/* ── Search page ─────────────────────────────────────────────────────────── */
.search-form { margin-block: 1.5rem; }
.search-fields { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: flex-end; }
.search-field { display: flex; flex-direction: column; gap: 0.25rem; font-family: var(--ui); font-size: 0.8125rem; color: var(--ink-2); }
.search-field span { font-weight: 500; }
.search-field-wide { flex-basis: 100%; }
.search-geo { display: flex; gap: 0.5rem; }
.search-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.search-results { margin-top: 1.5rem; }
.results-count { font-family: var(--ui); font-size: 0.875rem; color: var(--ink-2); margin-bottom: 0.75rem; }

/* ── Event list row ──────────────────────────────────────────────────────── */
.card-link { text-decoration: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.card-link:hover { border-color: var(--ast-0); text-decoration: none; }
.event-row-name { font-weight: 600; font-size: 1.0625rem; color: var(--ink); }
.event-row-meta { font-family: var(--ui); font-size: 0.8125rem; color: var(--ink-2); margin-top: 0.2rem; }
.event-row-classes { margin-top: 0.4rem; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.event-row-side { text-align: right; white-space: nowrap; flex-shrink: 0; }
.event-row-regs { font-family: var(--ui); font-size: 0.8125rem; color: var(--ink-2); }
.event-row-dist { font-family: var(--ui); font-size: 0.8125rem; color: var(--ast-0); margin-top: 0.2rem; }

/* ── Crew board ──────────────────────────────────────────────────────────── */
.crew-layout { display: grid; gap: 2rem; }
@media (min-width: 700px) { .crew-layout { grid-template-columns: 1fr 1fr; } }
.crew-col h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.crew-card { margin-bottom: 0.75rem; }
.crew-card-global { margin-bottom: 0.75rem; }
.crew-card-header { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.crew-card-event { font-family: var(--ui); font-size: 0.875rem; color: var(--ink-2); }
.crew-card-event a { color: var(--ast-0); }
.crew-card-body { font-size: 0.9375rem; }
.crew-model { font-weight: 600; font-size: 0.9375rem; display: flex; align-items: center; gap: 0.4rem; }
.crew-exp { margin: 0.25rem 0; display: inline-block; }
.crew-note { font-size: 0.875rem; color: var(--ink-2); margin: 0.25rem 0; }
.crew-contact { font-family: var(--ui); font-size: 0.8125rem; color: var(--ink-3); margin-top: 0.4rem; }
.crew-form-toggle { margin-top: 1rem; }
.crew-form-toggle summary { cursor: pointer; list-style: none; }
.crew-form-toggle summary::-webkit-details-marker { display: none; }
.crew-form { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; padding: 1rem; background: var(--surface); border-radius: 0.5rem; }
.crew-form label { display: flex; flex-direction: column; gap: 0.25rem; font-family: var(--ui); font-size: 0.875rem; color: var(--ink-2); }
.lead { color: var(--ink-2); margin-bottom: 1rem; }

/* ── Clubs ───────────────────────────────────────────────────────────────── */
.card-grid { display: grid; gap: 1rem; }
@media (min-width: 600px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card-grid .card-link { flex-direction: column; align-items: flex-start; }
.card-burgee { margin-bottom: 0.75rem; }
.burgee-img { width: 56px; height: 56px; object-fit: contain; }
.burgee-img-lg { width: 80px; height: 80px; object-fit: contain; }
.burgee-placeholder { width: 56px; height: 56px; border-radius: 50%; background: var(--ast-0); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--ui); font-size: 1.25rem; font-weight: 700; }
.burgee-placeholder-lg { width: 80px; height: 80px; font-size: 1.75rem; }
.card-stat { font-family: var(--ui); font-size: 0.8125rem; color: var(--ink-3); margin-top: 0.25rem; }
.club-header { display: flex; gap: 1.25rem; align-items: flex-start; }
.club-header-burgee { flex-shrink: 0; }
.club-header-info { flex: 1 }
.club-header-info h1 { margin-bottom: 0.25rem; }
.ext-link { font-family: var(--ui); font-size: 0.875rem; color: var(--ast-0); }
.tab-nav { display: flex; gap: 0; border-bottom: 2px solid var(--edge); margin: 1.5rem 0 1.25rem; overflow-x: auto; }
.tab-nav .tab { padding: 0.5rem 1rem; color: var(--ink-2); border-bottom: 2px solid transparent; text-decoration: none; font-family: var(--ui); font-size: 0.9375rem; white-space: nowrap; }
.tab-nav .tab.active { color: var(--ast-0); border-bottom-color: var(--ast-0); }
.tab-nav .tab:hover { color: var(--ast-0); text-decoration: none; }
.tab-panel {}
.prose { font-family: var(--body); line-height: 1.7; color: var(--ink); white-space: pre-wrap; }
.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.pill { background: var(--surface); border: 1px solid var(--edge); border-radius: 999px; padding: 0.2rem 0.65rem; font-family: var(--ui); font-size: 0.8125rem; color: var(--ink-2); }
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-family: var(--ui); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-final { background: rgba(11,235,107,.12); color: #0a7a3f; }
.badge-provisional { background: rgba(255,210,0,.15); color: #7a6500; }
.badge-pending, .badge-upcoming { background: var(--surface); color: var(--ink-3); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 0.5rem; }
.data-table th { text-align: left; font-family: var(--ui); font-size: 0.75rem; color: var(--ink-3); padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--edge); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.data-table td { padding: 0.5rem 0.5rem; border-bottom: 1px solid var(--edge); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, 'Cascadia Code', 'Fira Mono', monospace; }
.club-admin-link { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--edge); }
.link-muted { color: var(--ink-3); font-size: 0.875rem; }
.link-muted:hover { color: var(--ink-2); }
.admin-section { margin-bottom: 2rem; }
.admin-section h2 { font-family: var(--ui); font-size: 0.75rem; margin-bottom: 1rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; }
.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field-label { font-family: var(--ui); font-size: 0.875rem; color: var(--ink-2); font-weight: 500; }
.field-hint { font-weight: 400; color: var(--ink-3); }
.textarea { resize: vertical; min-height: 80px; }
.auth-wrap { max-width: 360px; margin: 2rem auto; }
.auth-wrap h1 { margin-bottom: 0.25rem; }
.form-card { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.auth-back { margin-top: 1rem; font-family: var(--ui); font-size: 0.875rem; color: var(--ink-3); }
.admin-back { margin-top: 2rem; font-family: var(--ui); font-size: 0.875rem; color: var(--ink-3); }

/* ── Merch ───────────────────────────────────────────────────────────────── */
.merch-section { margin-bottom: 2.5rem; }
.merch-section h2 { font-family: var(--ui); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 1rem; }
.merch-grid { display: grid; gap: 1rem; }
@media (min-width: 500px) { .merch-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 800px) { .merch-grid { grid-template-columns: repeat(3, 1fr); } }
.merch-card { background: var(--surface); border: 1px solid var(--edge); border-radius: 0.5rem; overflow: hidden; }
.merch-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.merch-img-placeholder { width: 100%; aspect-ratio: 4/3; background: var(--ast-4); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--ink-3); border-bottom: 1px solid var(--edge); }
.merch-info { padding: 0.875rem; }
.merch-name { font-family: var(--h1); font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.4rem; }
.merch-desc { font-family: var(--ui); font-size: 0.8125rem; color: var(--ink-2); line-height: 1.5; margin-bottom: 0.6rem; }
.merch-deadline { font-family: var(--ui); font-size: 0.75rem; color: var(--ast-1); margin-bottom: 0.5rem; }
.bulk-order-section { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--edge); }
.bulk-order-section h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.bulk-order-lead { color: var(--ink-2); font-size: 0.9375rem; margin-bottom: 1.5rem; }
.field-row { display: grid; gap: 0.75rem; }
@media (min-width: 500px) { .field-row { grid-template-columns: 1fr 1fr; } }
.badge-new { background: rgba(11,235,107,.12); color: #0a7a3f; }
.badge-quoted { background: rgba(255,210,0,.12); color: #7a6500; }
.badge-ordered, .badge-shipped { background: rgba(100,149,237,.15); color: #3060b8; }
.badge-closed { background: var(--surface); color: var(--ink-3); }

/* ── Registration ────────────────────────────────────────────────────────── */
.reg-fee-notice { background: var(--surface); border: 1px solid var(--edge); border-radius: 0.5rem; padding: 0.75rem 1rem; margin-bottom: 1.5rem; font-size: 0.9375rem; }
.fee-note { font-family: var(--ui); color: var(--ink-3); font-size: 0.875rem; margin-left: 0.5rem; }
.reg-form { max-width: 580px; }
.reg-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; }

/* ── Regattas list ────────────────────────────────────────────────────────── */
.regatta-list { display: flex; flex-direction: column; gap: 0.5rem; }
.regatta-card {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 0.15rem;
  padding: 0.875rem 1rem;
  background: var(--bg-up);
  border: 1px solid var(--edge);
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.regatta-card:hover { border-color: var(--ast-0); box-shadow: 0 2px 8px rgba(61,30,74,.1); text-decoration: none; }
.regatta-card-dates { font-family: var(--ui); font-size: 0.8125rem; color: var(--ink-3); }
.regatta-card-name { font-family: var(--h1); font-size: 1.0625rem; font-weight: 600; color: var(--ink); }
.regatta-card-meta { display: flex; gap: 0.75rem; flex-wrap: wrap; font-family: var(--ui); font-size: 0.8125rem; color: var(--ink-3); }
.badge-open { background: var(--ast-0); color: #fff; padding: 0.1rem 0.5rem; border-radius: 999px; font-family: var(--ui); font-size: 0.75rem; font-weight: 600; }

/* ── Login ────────────────────────────────────────────────────────────────── */
.login-form { max-width: 380px; }
.login-note { font-family: var(--ui); font-size: 0.875rem; color: var(--ink-3); margin-top: 0.5rem; }

/* ── Page header helpers ──────────────────────────────────────────────────── */
.page-header { margin-bottom: 1.5rem; }
.page-sub { font-family: var(--ui); font-size: 0.9375rem; color: var(--ink-2); margin-top: 0.375rem; }
.page-h h1 { margin-bottom: 0.25rem; }
.rr { font-variant-numeric: tabular-nums; }
