/* ==========================================================================
   RUNNING.VN – stylesheet
   Brand tokens live in :root. To match paceracademy.com exactly, change the
   colours and fonts below – everything else follows automatically.
   ========================================================================== */

:root {
  /* Brand */
  --brand: #ff5a1f;          /* energetic orange: buttons, highlights */
  --brand-dark: #e2440b;
  --brand-soft: #fff1ea;
  --ink: #0b1f3a;            /* deep navy: header, headings, dark sections */
  --ink-2: #16325c;
  --accent: #0ea5a4;         /* teal: secondary accents */

  /* Neutrals */
  --text: #1b2433;
  --muted: #5d6b7e;
  --line: #e3e8ef;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --card: #ffffff;

  /* Status */
  --green: #15803d;  --green-bg: #e8f7ee;
  --amber: #b45309;  --amber-bg: #fef3c7;
  --red: #b91c1c;    --red-bg: #fde8e8;
  --purple: #6d28d9; --purple-bg: #efe7fd;

  /* Type */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Barlow Condensed", "Inter", system-ui, sans-serif;

  /* Shape */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 6px 20px rgba(11, 31, 58, .06);
  --shadow-lg: 0 10px 40px rgba(11, 31, 58, .14);
  --container: 1200px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.6 var(--font-body); color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink-2); text-decoration-color: rgba(22, 50, 92, .3); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.1; letter-spacing: .2px; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { background: var(--bg-alt); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }
.hp { position: absolute; left: -9999px; }
.pre { white-space: pre-wrap; }
:focus-visible { outline: 3px solid rgba(255, 90, 31, .45); outline-offset: 2px; }

.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; padding: .72em 1.25em; border-radius: 999px; border: 2px solid transparent; font: 600 .95rem/1.1 var(--font-body); cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-link { background: none; border: 0; color: var(--ink-2); text-decoration: underline; padding: .4em .2em; cursor: pointer; font: inherit; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #991b1b; color: #fff; }
.btn-sm { padding: .5em .95em; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
button.btn-link.danger, .danger { color: var(--red); }

/* ---------- header ---------- */
.site-notice { background: var(--brand); color: #fff; text-align: center; padding: 8px 16px; font-weight: 600; font-size: .9rem; }
.site-header { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 12px rgba(0, 0, 0, .15); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font: 800 1.55rem/1 var(--font-head); letter-spacing: .5px; }
.logo b { color: var(--brand); font-weight: 800; }
.logo:hover { color: #fff; }
.site-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.site-nav > a { color: rgba(255, 255, 255, .85); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.site-nav > a:hover, .site-nav > a.active { color: #fff; background: rgba(255, 255, 255, .1); }
.site-nav > a.active { box-shadow: inset 0 -3px 0 var(--brand); border-radius: 8px 8px 0 0; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-actions .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.nav-actions .btn-ghost:hover { border-color: #fff; color: #fff; }
.icon-link { color: #fff; padding: 8px; font-size: 1.15rem; display: inline-flex; }
.avatar-link { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; }
.avatar-link img, .avatar-initials { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar-initials { display: inline-grid; place-items: center; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 700; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 24px; height: 2px; background: #fff; position: relative; content: ""; transition: transform .2s; }
.nav-toggle .bars::before { position: absolute; top: -7px; }
.nav-toggle .bars::after { position: absolute; top: 7px; }
.nav-open .nav-toggle .bars { background: transparent; }
.nav-open .nav-toggle .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle .bars::after { transform: translateY(-7px) rotate(-45deg); }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); padding-top: 16px; padding-bottom: 4px; }
.breadcrumbs a { color: var(--muted); }

/* ---------- flashes ---------- */
.flashes { padding-top: 16px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 12px; border-left: 4px solid; font-size: .95rem; }
.flash-success { background: var(--green-bg); border-color: var(--green); }
.flash-error { background: var(--red-bg); border-color: var(--red); }
.flash-info { background: #eaf2fe; border-color: #2563eb; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(255, 90, 31, .35), transparent 60%), linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%); color: #fff; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60px -10%; height: 140px; background: repeating-linear-gradient(100deg, transparent 0 38px, rgba(255, 255, 255, .04) 38px 40px); transform: skewY(-3deg); }
.hero-inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 80px; position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 6vw, 4.4rem); text-transform: uppercase; }
.hero h1 span { color: var(--brand); }
.hero .lead { color: rgba(255, 255, 255, .85); font-size: 1.15rem; max-width: 36em; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.5px; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: .6em; }
.hero-search { display: flex; gap: 8px; background: #fff; padding: 8px; border-radius: 999px; margin-top: 24px; box-shadow: var(--shadow-lg); max-width: 640px; }
.hero-search select { flex: 1; border: 0; background: transparent; font: 500 1rem var(--font-body); color: var(--text); padding: 10px 14px; min-width: 0; }
.hero-search select + select { border-left: 1px solid var(--line); }
.hero-alt { margin-top: 16px; color: rgba(255, 255, 255, .75); }
.hero-alt a { color: #fff; }
.hero-stats { display: grid; gap: 14px; }
.hero-stats div { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 18px 22px; display: flex; align-items: baseline; gap: 12px; backdrop-filter: blur(4px); }
.hero-stats strong { font: 800 2.6rem/1 var(--font-head); color: #fff; }
.hero-stats span { color: rgba(255, 255, 255, .8); font-weight: 500; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 36px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--ink); color: #fff; }
.section-dark h2 { color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.page-head { background: linear-gradient(135deg, var(--ink), var(--ink-2)); color: #fff; padding: 44px 0 40px; margin-bottom: 32px; }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head .lead { color: rgba(255, 255, 255, .82); font-size: 1.1rem; max-width: 46em; margin: 0; }
.page-head .muted, .page-head .muted a { color: rgba(255, 255, 255, .75); }
.page-head-sm { padding: 30px 0 26px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.head-actions .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.lead { font-size: 1.1rem; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.empty { text-align: center; padding: 48px 20px; background: var(--bg-alt); border-radius: var(--radius); color: var(--muted); }
.empty h2 { font-size: 1.5rem; }
.empty-inline { color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.card h2 { font-size: 1.45rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.club-card, .post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.club-card:hover, .post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.club-card-cover, .post-card-cover { display: block; aspect-ratio: 2 / 1; background: var(--ink-2); position: relative; overflow: hidden; }
.post-card-cover { aspect-ratio: 16 / 9; }
.club-card-cover img, .post-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-pattern { position: absolute; inset: 0; background: radial-gradient(circle at 20% 120%, rgba(255, 90, 31, .7), transparent 50%), repeating-linear-gradient(115deg, var(--ink) 0 22px, var(--ink-2) 22px 44px); }
.cover-pattern-alt { background: radial-gradient(circle at 90% -20%, rgba(14, 165, 164, .7), transparent 55%), repeating-linear-gradient(65deg, var(--ink) 0 22px, var(--ink-2) 22px 44px); }
.badge { position: absolute; top: 12px; left: 12px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge-distance { left: auto; right: 12px; background: rgba(11, 31, 58, .85); }
.club-card-body, .post-card-body { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card-body { padding-top: 16px; }
.club-card-head { display: flex; gap: 12px; align-items: flex-start; position: relative; }
.club-card-head > .club-logo { margin-top: -28px; }
.club-card-head > div { padding-top: 10px; min-width: 0; }
.club-card-head h3 { font-size: 1.2rem; margin: 0; }
.club-card-head h3 a { color: var(--ink); text-decoration: none; }
.club-card-head p { margin: 0; }
.club-logo { width: 56px; height: 56px; flex-shrink: 0; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font: 800 1.2rem var(--font-head); border: 3px solid #fff; box-shadow: var(--shadow); overflow: hidden; }
.club-logo img { width: 100%; height: 100%; object-fit: cover; }
.club-logo-lg { width: 112px; height: 112px; font-size: 2.2rem; border-radius: 20px; border-width: 4px; }
.club-tagline { margin: 0; color: var(--muted); font-size: .93rem; }
.post-card h3 { font-size: 1.3rem; margin: 0; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.post-meta { color: var(--muted); }
.verified { color: var(--accent); font-size: .85em; }
.verified-lg { font: 600 .9rem var(--font-body); background: rgba(14, 165, 164, .15); color: #5eead4; padding: 3px 10px; border-radius: 999px; vertical-align: middle; }

.weekdays { display: flex; gap: 4px; }
.weekdays span { width: 30px; height: 26px; display: grid; place-items: center; border-radius: 6px; font-size: .72rem; font-weight: 700; background: var(--bg-alt); color: #a3adbb; }
.weekdays span.on { background: var(--ink); color: #fff; }
.next-run { margin: 0; color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg-alt); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tag-soft { background: #fff; }
.tag-green { background: var(--green-bg); color: var(--green); border-color: transparent; }
.tag-amber { background: var(--amber-bg); color: var(--amber); border-color: transparent; }
.tag-red { background: var(--red-bg); color: var(--red); border-color: transparent; }
.tag-purple { background: var(--purple-bg); color: var(--purple); border-color: transparent; }
.type-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin: 0 4px 0 2px; vertical-align: 1px; }
.type-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); border: 1px solid color-mix(in srgb, var(--c) 30%, white); white-space: nowrap; }
.type-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* ---------- city tiles ---------- */
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.city-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 120px; padding: 18px; border-radius: var(--radius); color: #fff; text-decoration: none; overflow: hidden; background: linear-gradient(160deg, var(--ink-2), var(--ink)); transition: transform .15s; }
.city-tile::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(120deg, transparent 0 30px, rgba(255, 255, 255, .04) 30px 32px); }
.city-tile strong { font: 800 1.5rem/1.1 var(--font-head); position: relative; }
.city-tile span { opacity: .8; font-size: .9rem; position: relative; }
.city-tile:hover { transform: translateY(-3px); color: #fff; }
.city-south { background: linear-gradient(160deg, #1d4ed8, var(--ink)); }
.city-north { background: linear-gradient(160deg, #be123c, var(--ink)); }
.city-central { background: linear-gradient(160deg, #0e7490, var(--ink)); }
.city-highlands { background: linear-gradient(160deg, #4d7c0f, var(--ink)); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .9rem; background: #fff; }
.chip:hover { border-color: var(--ink); }

/* ---------- run list ---------- */
.run-list { list-style: none; margin: 0; padding: 0; }
.run-day-label { font: 700 .8rem var(--font-body); text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 18px 0 6px; border-bottom: 1px solid var(--line); }
.run-day-label:first-child { padding-top: 0; }
.run-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.run-item:last-child { border-bottom: 0; }
.run-time { text-align: center; background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 4px; line-height: 1; }
.run-time strong { display: block; font: 800 1.3rem var(--font-head); }
.run-time span { font-size: .7rem; font-weight: 600; opacity: .8; }
.run-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.run-club { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.02rem; }
a.run-club:hover { color: var(--brand-dark); }
.run-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; color: var(--muted); font-size: .88rem; }
.run-meta span { display: inline-flex; align-items: center; gap: 5px; }
.run-meta .dist { color: var(--brand-dark); font-weight: 600; }
.run-note { margin: 6px 0 0; font-size: .88rem; color: var(--amber); }
.run-map { color: var(--ink-2); font-size: 1.3rem; padding: 8px; border-radius: 8px; border: 1px solid var(--line); display: inline-flex; }
.run-map:hover { border-color: var(--ink); }
.is-cancelled .run-time { background: #94a3b8; }
.is-cancelled .run-club, .is-cancelled .run-meta { text-decoration: line-through; opacity: .7; }
.run-list-compact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px; box-shadow: var(--shadow); }
.run-list-compact .run-day-label:first-child { padding-top: 14px; }

/* ---------- directory & filters ---------- */
.directory { display: grid; grid-template-columns: 290px 1fr; gap: 32px; align-items: start; padding-bottom: 56px; }
.filters { position: sticky; top: 88px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.filters label { display: block; font-weight: 600; font-size: .85rem; margin: 14px 0 5px; }
.filters .btn-block { margin-top: 16px; }
.filters .btn-link { margin-top: 4px; }
.location-filter { border: 0; padding: 0; margin: 0; }
.location-filter legend { font: 700 1.15rem var(--font-head); color: var(--ink); margin-bottom: 8px; padding: 0; }
.loc-row { display: grid; gap: 8px; }
.loc-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.loc-status { margin: 8px 0 0; min-height: 1em; }
.results-map { height: 320px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 22px; z-index: 0; }
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: #fff; }
.segmented a { padding: 6px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--muted); }
.segmented a.active { background: var(--ink); color: #fff; }
.cal-nav { display: flex; gap: 16px; font-weight: 600; }
.cal-day { margin-bottom: 28px; }
.cal-day-head { display: flex; align-items: baseline; gap: 10px; font-size: 1.5rem; border-bottom: 3px solid var(--ink); padding-bottom: 8px; margin-bottom: 4px; }
.cal-day-head span { color: var(--brand); }
.cal-day-head small { margin-left: auto; font: 500 .85rem var(--font-body); color: var(--muted); }
.cal-club-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.cal-club-head h2 { font-size: 1.35rem; margin: 0; }
.cal-club-head h2 a { color: var(--ink); text-decoration: none; }
.cal-club-head p { margin: 0; }
.cal-club .club-logo { border-width: 0; }

/* ---------- map dialog ---------- */
.map-dialog { width: min(760px, 94vw); border: 0; border-radius: var(--radius); padding: 0; box-shadow: var(--shadow-lg); }
.map-dialog::backdrop { background: rgba(11, 31, 58, .55); }
.map-dialog-head, .map-dialog-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; gap: 12px; }
.map-search { display: flex; gap: 8px; padding: 0 18px 10px; }
.map-search input { flex: 1; }
.map-results { list-style: none; margin: 0 18px 10px; padding: 0; max-height: 160px; overflow: auto; }
.map-results:empty { display: none; }
.map-results button { width: 100%; text-align: left; background: var(--bg-alt); border: 0; padding: 8px 12px; margin-bottom: 4px; border-radius: 6px; cursor: pointer; font: inherit; font-size: .88rem; }
.map-results button:hover { background: var(--brand-soft); }
.map-canvas { height: 420px; }
.btn-close { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); }
.pin-map { height: 300px; border-radius: var(--radius-sm); border: 1px solid var(--line); margin: 8px 0; z-index: 0; }
.pin-map-sm { height: 240px; }
.mini-map { height: 220px; border-radius: var(--radius-sm); margin: 10px 0; z-index: 0; }
.leaflet-container { font: inherit; }

/* ---------- club profile ---------- */
.club-hero { background: var(--ink); color: #fff; position: relative; margin-bottom: 32px; }
.club-hero-cover { height: 300px; position: relative; overflow: hidden; }
.club-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.club-hero-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(11, 31, 58, .95)); }
.club-hero-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: end; margin-top: -90px; position: relative; padding-bottom: 28px; }
.club-hero h1 { color: #fff; margin-bottom: .15em; }
.club-hero .lead { color: rgba(255, 255, 255, .85); margin: 0 0 .4em; }
.club-location { margin: 0; color: rgba(255, 255, 255, .75); }
.club-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.club-hero-actions .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.club-hero-actions .tag-green { font-size: .85rem; padding: 6px 12px; }
.club-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; padding-bottom: 48px; }
.timetable { display: grid; gap: 4px; margin-bottom: 14px; }
.tt-day { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tt-day:last-child { border-bottom: 0; }
.tt-day h3 { font-size: 1.15rem; margin: 0; padding-top: 2px; }
.tt-session { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 4px 0 10px; }
.tt-time { font: 800 1.15rem var(--font-head); color: var(--brand-dark); }
.tt-title { display: block; margin-top: 4px; color: var(--ink); }
.facts dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 14px; }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: 0; font-weight: 600; font-size: .92rem; }
.contact-links, .nearby-list, .news-list, .search-results { list-style: none; padding: 0; margin: 0; }
.contact-links li, .nearby-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.contact-links li:last-child, .nearby-list li:last-child { border-bottom: 0; }
.news-list li, .search-results li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share-buttons a, .share-buttons .btn-link { font-weight: 600; font-size: .9rem; }
.callout { background: var(--brand-soft); border-left: 4px solid var(--brand); padding: 16px 20px; border-radius: var(--radius-sm); margin: 18px 0; }
.callout h3 { margin-bottom: .4em; }
.callout > :last-child { margin-bottom: 0; }

/* ---------- races ---------- */
.races-block { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.race-list { list-style: none; padding: 0; margin: 20px 0 0; }
.race-list li { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.race-date { flex-shrink: 0; width: 62px; text-align: center; background: var(--brand); color: #fff; border-radius: 10px; padding: 6px 4px; font-size: .75rem; font-weight: 700; text-transform: uppercase; line-height: 1.1; }
.race-date b { display: block; font: 800 1.6rem/1 var(--font-head); }
.race-info a { color: #fff; font-weight: 600; text-decoration: none; font-size: 1.05rem; }
.race-info a:hover { color: var(--brand); }
.race-info small { display: block; color: rgba(255, 255, 255, .65); }
.runaway-cta { background: linear-gradient(150deg, var(--brand), #ff8a3d); color: #fff; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.runaway-cta h3 { color: #fff; font-size: 1.8rem; }
.runaway-cta .eyebrow { color: rgba(255, 255, 255, .85); }
.runaway-cta .btn-primary { background: var(--ink); }
.runaway-cta .btn-primary:hover { background: #000; }
.runaway-cta-light { position: sticky; top: 88px; }
.runaway-cta .checks li::before { color: #fff; }
.runaway-cta a:not(.btn) { color: #fff; }
.races-page { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; padding-bottom: 48px; }
.race-cards { list-style: none; padding: 0; margin: 0; }
.race-card { display: flex; gap: 18px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: #fff; box-shadow: var(--shadow); }
.race-card h2 { font-size: 1.3rem; margin: 0; }
.race-card h2 a { color: var(--ink); text-decoration: none; }
.runaway-banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid #ffd3bf; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 32px; }
.runaway-banner span { display: block; color: var(--muted); }

/* ---------- guides, FAQ, resources, articles ---------- */
.guide-links { list-style: none; padding: 0; margin: 0 0 20px; }
.guide-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.guide-links strong { display: block; color: var(--ink); font-size: 1.05rem; }
.guide-links span { color: var(--muted); font-size: .92rem; }
.guide-group { margin-bottom: 36px; }
.guide-grid, .resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.guide-card, .resource-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: #fff; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.guide-card:hover, .resource-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.guide-card strong, .resource-card strong { color: var(--ink); font: 700 1.25rem/1.2 var(--font-head); }
.guide-card span, .resource-card span { color: var(--muted); font-size: .92rem; }
.guide-card small, .resource-card small { color: var(--brand-dark); font-weight: 600; margin-top: auto; }
.resource-group { margin-bottom: 36px; }
.cta-card { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 32px; }
.cta-card h2 { color: #fff; }
.cta-card-sm { padding: 24px; }
.checks { list-style: none; padding: 0; margin: 0 0 20px; }
.checks li { padding-left: 26px; position: relative; margin-bottom: 8px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.faq-layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding-bottom: 48px; align-items: start; }
.faq-toc { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 4px; }
.faq-toc a { text-decoration: none; padding: 6px 10px; border-radius: 6px; font-weight: 600; font-size: .92rem; }
.faq-toc a:hover { background: var(--bg-alt); }
.faq-body section { margin-bottom: 36px; scroll-margin-top: 90px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fff; }
.faq-item summary { padding: 16px 48px 16px 18px; cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--brand); }
.faq-item[open] summary::after { content: "–"; }
.faq-item .prose { padding: 0 18px 8px; }
.intro-text { max-width: 820px; margin-bottom: 28px; font-size: 1.05rem; }
.prose { line-height: 1.75; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.4em 0; padding: 4px 20px; border-left: 4px solid var(--brand); color: var(--ink-2); font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.article-head { padding-top: 32px; padding-bottom: 12px; }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius); margin: 10px 0 28px; }
.article-body { font-size: 1.07rem; }
.article-foot { padding-bottom: 48px; }
.error-code { font: 800 6rem/1 var(--font-head); color: var(--brand); margin: 0; }
.search-big { display: flex; gap: 8px; margin-top: 14px; max-width: 640px; }
.search-big input { flex: 1; }

/* ---------- forms ---------- */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cdd5df; border-radius: var(--radius-sm); font: inherit; color: var(--text); background: #fff; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 90, 31, .15); }
textarea { resize: vertical; }
textarea.mono { font: .9rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
input[type=color] { width: 80px; height: 40px; padding: 2px; border: 1px solid #cdd5df; border-radius: 8px; }
.form label, .form .label { display: block; font-weight: 600; font-size: .9rem; margin: 16px 0 6px; }
.form fieldset { border: 0; border-top: 1px solid var(--line); padding: 20px 0 8px; margin: 0; }
.form fieldset:first-of-type { border-top: 0; padding-top: 0; }
.form legend { font: 700 1.35rem var(--font-head); color: var(--ink); padding: 0; }
.form .btn-primary, .form .btn-ghost { margin-top: 20px; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 12px 0; }
.form .check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--brand); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; }
.check-grid .check { margin: 6px 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.form-row-tight { gap: 0 10px; }
.form-inline-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.field-error { color: var(--red); font-size: .85rem; margin: 4px 0 0; }
.help { margin: -6px 0 12px 26px; }
.subform { border-top: 1px dashed var(--line); margin-top: 18px; padding-top: 6px; }
.subform h3 { margin-top: 14px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; flex-wrap: wrap; }
.input-sm { width: auto !important; padding: 6px 8px !important; font-size: .85rem !important; }
.thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.thumb-wide { width: 160px; height: 60px; }
.small-details { margin: 10px 0; }
.small-details summary { cursor: pointer; font-size: .9rem; color: var(--ink-2); font-weight: 600; }
.danger-zone { border-color: #fecaca; }
.danger-zone summary { cursor: pointer; font-weight: 600; color: var(--red); }

/* ---------- auth & account ---------- */
.auth-wrap { display: grid; place-items: center; padding: 56px 20px; background: linear-gradient(160deg, var(--bg-alt), #fff); min-height: 60vh; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 2.1rem; }
.account-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.account-head .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.account-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; padding-bottom: 48px; align-items: start; }
.list-rows { list-style: none; padding: 0; margin: 0; }
.list-rows li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.list-rows li:last-child { border-bottom: 0; }
.row-actions { display: inline-flex; gap: 10px; align-items: center; font-size: .9rem; margin-left: auto; flex-wrap: wrap; }
.avatar-edit { display: flex; gap: 18px; align-items: center; }
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font: 800 2rem var(--font-head); overflow: hidden; flex-shrink: 0; }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.runner-profile { display: flex; gap: 24px; align-items: flex-start; }
.contact-links-inline { display: flex; gap: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 14px; }
.tabs a { color: rgba(255, 255, 255, .8); text-decoration: none; padding: 8px 14px; border-radius: 8px 8px 0 0; font-weight: 600; font-size: .92rem; }
.tabs a.active, .tabs a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.manage-grid { padding-bottom: 48px; max-width: 980px; }

/* ---------- tables & admin ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 10px 8px; border-bottom: 2px solid var(--line); }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr.is-muted td { opacity: .55; }
.table .row-actions { margin: 0; }
.admin { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding-top: 28px; padding-bottom: 56px; align-items: start; }
.admin-nav { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.admin-nav a { padding: 9px 12px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--text); display: flex; justify-content: space-between; align-items: center; }
.admin-nav a:hover { background: var(--bg-alt); }
.admin-nav a.active { background: var(--ink); color: #fff; }
.count { background: var(--brand); color: #fff; font-size: .72rem; border-radius: 999px; padding: 1px 8px; }
.admin-main { min-width: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.admin-head h1 { font-size: 2.2rem; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat strong { display: block; font: 800 2rem/1 var(--font-head); color: var(--ink); }
.stat span { font-size: .82rem; color: var(--muted); }
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar select, .filter-bar input { width: auto; }
.revision { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; }
.revision summary { cursor: pointer; }
.diff td { word-break: break-word; }
.message.is-new { border-left: 4px solid var(--brand); }
.message header { display: flex; flex-direction: column; margin-bottom: 8px; }

/* ---------- pagination ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 32px 0; font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .78); padding: 56px 0 24px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: #fff; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.footer-brand p { margin-top: 14px; max-width: 30em; }
.socials { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding-top: 20px; font-size: .85rem; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .directory, .club-layout, .races-page, .account-grid { grid-template-columns: 1fr; }
  .filters, .runaway-cta-light { position: static; }
  .admin { grid-template-columns: 1fr; }
  .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--ink); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; box-shadow: 0 10px 20px rgba(0, 0, 0, .2); }
  .nav-open .site-nav { display: flex; }
  .site-nav > a { padding: 12px; }
  .site-nav > a.active { box-shadow: inset 3px 0 0 var(--brand); border-radius: 0; }
  .nav-actions { margin: 10px 0 0; flex-wrap: wrap; }
  .hero-inner, .two-col, .races-block { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 48px; padding-bottom: 56px; gap: 28px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .hero-stats div { flex-direction: column; gap: 2px; padding: 14px; }
  .hero-stats strong { font-size: 2rem; }
  .hero-search { flex-direction: column; border-radius: var(--radius); }
  .hero-search select + select { border-left: 0; border-top: 1px solid var(--line); }
  .club-hero-inner { grid-template-columns: 1fr; margin-top: -70px; gap: 14px; }
  .club-hero-cover { height: 200px; }
  .faq-layout { grid-template-columns: 1fr; }
  .faq-toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .tt-day { grid-template-columns: 1fr; gap: 6px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
}
@media (max-width: 560px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .run-item { grid-template-columns: 56px 1fr; }
  .run-map { display: none; }
  .tt-session { grid-template-columns: 1fr; gap: 4px; }
  .card { padding: 18px; }
  .runner-profile { flex-direction: column; }
  .table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- installer ---------- */
.install-card { max-width: 560px; }
.install-card h1 { font-size: 2rem; }
.install-badge { margin-left: auto; color: rgba(255, 255, 255, .7); font-weight: 600; font-size: .9rem; }
.install-steps { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.install-steps b { color: var(--brand-dark); }
.install-howto { padding-left: 1.2em; }
.install-howto li { margin-bottom: 6px; }
.code-input { font: 700 1.3rem ui-monospace, SFMono-Regular, Menlo, monospace !important; letter-spacing: 3px; text-transform: uppercase; }
