:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #eef1ec;
  --text: #17201b;
  --muted: #56615a;
  --border: #d7ddd6;
  --brand: #0f5132;
  --brand-ink: #ffffff;
  --accent: #c2410c;
  --focus: #f59e0b;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 6px 20px rgb(0 0 0 / .06);
  --fs: 1rem;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1412;
  --surface: #171e1b;
  --surface-2: #1f2824;
  --text: #e8eee9;
  --muted: #a3b0a8;
  --border: #2d3933;
  --brand: #2f8f5f;
  --accent: #fb923c;
  --shadow: 0 1px 2px rgb(0 0 0 / .4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1412; --surface: #171e1b; --surface-2: #1f2824; --text: #e8eee9;
    --muted: #a3b0a8; --border: #2d3933; --brand: #2f8f5f; --accent: #fb923c;
    --shadow: 0 1px 2px rgb(0 0 0 / .4); color-scheme: dark;
  }
}
:root[data-contrast="high"] {
  --bg: #fff; --surface: #fff; --surface-2: #fff; --text: #000; --muted: #000;
  --border: #000; --brand: #000; --accent: #000; --shadow: none;
}
:root[data-contrast="high"][data-theme="dark"] {
  --bg: #000; --surface: #000; --surface-2: #000; --text: #fff; --muted: #fff; --border: #fff; --brand: #ff0;
  --brand-ink: #000;
}

* { box-sizing: border-box; }
html { font-size: calc(16px * var(--scale, 1)); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Heebo", system-ui, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}
a { color: var(--brand); }
:root[data-theme="dark"] a { color: #7dd3a8; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.container { max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; inset-inline-start: 8px; top: -100px; z-index: 100;
  background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

/* Header */
.site-header { background: var(--brand); color: var(--brand-ink); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.2rem; }
.brand-flag { width: 30px; height: 30px; }
nav { flex: 1; }
.tabs { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.tabs a {
  display: block; color: inherit; text-decoration: none; padding: 8px 14px; border-radius: 999px;
  font-weight: 500; opacity: .85;
}
.tabs a:hover { background: rgb(255 255 255 / .12); opacity: 1; }
.tabs a[aria-selected="true"] { background: var(--brand-ink); color: var(--brand); opacity: 1; font-weight: 700; }
.a11y-tools { display: flex; gap: 6px; }
.icon-btn {
  min-width: 40px; min-height: 40px; border-radius: 10px; border: 1px solid currentColor;
  background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer;
}
.site-header .icon-btn { border-color: rgb(255 255 255 / .4); }
.icon-btn[aria-pressed="true"] { background: var(--brand-ink); color: var(--brand); }


/* Hero */
.hero { background: linear-gradient(135deg, var(--brand), #14532d); color: #fff; overflow: hidden; }
:root[data-contrast="high"] .hero { background: var(--surface); color: var(--text); border-bottom: 2px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; padding-block: 36px; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; opacity: .8; }
.hero-title { margin: 4px 0 16px; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; }
.hero-contours { width: 180px; color: rgb(255 255 255 / .35); }
.next-event {
  background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .25); border-radius: var(--radius);
  padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
}
:root[data-contrast="high"] .next-event { background: none; border-color: var(--border); }
.next-event h2 { margin: 0; font-size: 1.3rem; }
.next-event p { margin: 2px 0 0; opacity: .9; }
.countdown { display: flex; gap: 10px; }
.countdown div { text-align: center; min-width: 56px; }
.countdown strong { display: block; font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .75rem; opacity: .85; }
.next-event .btn { background: #fff; color: var(--brand); }
@media (max-width: 640px) { .hero-contours { display: none; } .hero-inner { grid-template-columns: 1fr; } }

/* Buttons & chips */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px;
  background: var(--brand); color: var(--brand-ink); text-decoration: none; font-weight: 700; border: 0; cursor: pointer; font: inherit;
}
:root[data-theme="dark"] .btn { color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--border); }
:root[data-theme="dark"] .btn.ghost { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.chips legend { font-size: .85rem; color: var(--muted); margin-bottom: 6px; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: .9rem;
}
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }

/* Filters */
.filters {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: end; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: -24px;
  position: relative; box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field.grow { flex: 1 1 240px; }
.field label { font-size: .85rem; color: var(--muted); }
input, select {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; min-height: 42px;
}
.filters .chips { flex-basis: 100%; }
.result-count { color: var(--muted); margin: 20px 0 8px; }

/* Event list */
.event-list { list-style: none; padding: 0; margin: 0 0 48px; display: grid; gap: 14px; }
.month-sep { font-weight: 800; color: var(--muted); margin-top: 18px; font-size: .95rem; }
.event-card {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); border-inline-start: 6px solid var(--c);
}
.date-badge { text-align: center; background: var(--surface-2); border-radius: 12px; padding: 8px 4px; }
.date-badge .d { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1; }
.date-badge .m { font-size: .8rem; color: var(--muted); }
.date-badge .w { display: block; font-size: .75rem; color: var(--muted); }
.event-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.event-card h3 button { all: unset; cursor: pointer; }
.event-card h3 button:hover { text-decoration: underline; }
.event-card h3 button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .9rem; margin: 0; padding: 0; list-style: none; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--text); }
.soon { background: var(--accent); color: #fff; border-radius: 6px; padding: 0 6px; font-size: .75rem; font-weight: 700; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: end; }
@media (max-width: 640px) {
  .event-card { grid-template-columns: 64px 1fr; }
  .card-actions { grid-column: 1 / -1; justify-content: start; }
}
.empty { text-align: center; padding: 40px; color: var(--muted); background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--border); }

/* Annual */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.section-head h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg button { font: inherit; padding: 8px 16px; border: 0; background: var(--surface); color: var(--text); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 16px; font-size: .9rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 20px; }
.month-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.month-card.past { opacity: .6; }
.month-card h2 { margin: 0 0 8px; font-size: 1.05rem; display: flex; justify-content: space-between; }
.month-card h2 small { color: var(--muted); font-weight: 400; }
.month-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.month-card li button {
  all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 28px 10px 1fr; gap: 8px; align-items: center;
  width: 100%; padding: 4px 6px; border-radius: 8px; font-size: .92rem;
}
.month-card li button:hover { background: var(--surface-2); }
.month-card li button:focus-visible { outline: 3px solid var(--focus); }
.month-card .none { color: var(--muted); font-size: .9rem; }
.month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.month-nav h2 { margin: 0; }
.month-table { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--surface); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.month-table th { padding: 8px; font-size: .85rem; color: var(--muted); background: var(--surface-2); }
.month-table td { border: 1px solid var(--border); vertical-align: top; height: 92px; padding: 4px; font-size: .8rem; }
.month-table td.out { background: var(--surface-2); color: var(--muted); }
.month-table td.today { box-shadow: inset 0 0 0 2px var(--accent); }
.month-table .num { font-weight: 700; }
.month-table button {
  all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; margin-top: 3px; padding: 2px 5px; border-radius: 5px;
  background: var(--c); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.month-table button:focus-visible { outline: 3px solid var(--focus); }
@media (max-width: 640px) { .month-table td { height: 64px; } .month-table button { font-size: 0; height: 8px; } }

/* Forum */
.topic-list { list-style: none; padding: 0; margin: 16px 0 48px; display: grid; gap: 10px; }
.topic {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
}
.topic h2 { margin: 0; font-size: 1.05rem; }
.topic h2 a { color: var(--text); text-decoration: none; }
.topic h2 a:hover { text-decoration: underline; }
.replies { text-align: center; min-width: 64px; }
.replies strong { display: block; font-size: 1.3rem; line-height: 1; }
.replies span { font-size: .75rem; color: var(--muted); }
.cat { font-size: .78rem; background: var(--surface-2); border-radius: 6px; padding: 1px 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 24px; color: var(--muted); font-size: .9rem; }
.footer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.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; }
main:focus { outline: none; }
.icon-btn svg { vertical-align: middle; }
@media (max-width: 640px) {
  .site-header { position: static; }
  .header-inner { gap: 8px; }
  .brand { flex: 1; }
  nav { order: 3; flex-basis: 100%; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tabs a { white-space: nowrap; padding: 6px 12px; }
  .a11y-tools .icon-btn { min-width: 36px; min-height: 36px; }
}
.live-status { margin: 20px 0 0; font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.live-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.live-status:empty { display: none; }
.live-status.warn::before { background: #d97706; }
.forum-search { max-width: 420px; }

/* Live data additions */
.badges { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 2px; }
.pill { font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.pill.strong { background: var(--accent); color: #fff; border-color: var(--accent); }
.deadline { color: var(--accent); }
.event-card { grid-template-columns: 76px 1fr auto auto; }
.event-card.compact { padding-block: 10px; border-style: dashed; border-inline-start-style: solid; }
.event-card .summary { margin: 6px 0 0; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { flex-direction: column; align-items: stretch; }
.thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; }
@media (max-width: 860px) { .thumb { display: none; } .event-card { grid-template-columns: 76px 1fr auto; } }
@media (max-width: 640px) {
  .event-card { grid-template-columns: 64px 1fr; }
  .card-actions { flex-direction: row; }
}
.month-card li button.tentative span:last-child { color: var(--muted); }
.month-card li button.tentative .dot { background: transparent; border: 2px dashed var(--c); }
.month-table button.tentative { background: transparent; color: var(--text); border: 1px dashed var(--c); }


.news { margin: 8px 0 48px; }
.news h2 { font-size: 1.3rem; }
.news-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.news-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.news-item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.news-item p { margin: 0; }

.topic { display: block; padding: 0; }
.topic.featured { border-inline-start: 5px solid var(--accent); }
.topic details > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 14px 16px; border-radius: var(--radius); }
.topic details > summary::-webkit-details-marker { display: none; }
.topic details > summary:hover { background: var(--surface-2); }
.topic details > summary h2 { margin: 0; font-size: 1.05rem; }
.topic details > summary h2::after { content: " ▾"; color: var(--muted); font-size: .8em; }
.topic details[open] > summary h2::after { content: " ▴"; }
.topic .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 2px 0 0; }
.thread { padding: 0 16px 14px; border-top: 1px solid var(--border); }
.thread p { margin: 8px 0; overflow-wrap: anywhere; }
.related { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reply-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.reply-list > li { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; border-inline-start: 3px solid var(--border); }

/* ---------- Event page ---------- */
.small { font-size: .85rem; }
.ev-hero {
  --c: var(--brand);
  position: relative; overflow: hidden; color: #fff; padding: 18px 0 64px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 78%, #000) 0%, color-mix(in srgb, var(--c) 45%, #000) 100%);
}
.ev-contours { position: absolute; inset: auto 0 0 0; width: 100%; height: 70%; color: rgb(255 255 255 / .14); pointer-events: none; }
.ev-back { color: #fff; text-decoration: none; font-weight: 700; display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .12); }
.ev-back:hover { background: rgb(255 255 255 / .22); }
.ev-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; margin-top: 20px; }
.ev-date {
  display: grid; justify-items: center; background: #fff; color: #111; border-radius: 18px; padding: 10px 18px 12px; min-width: 112px;
  box-shadow: 0 10px 30px rgb(0 0 0 / .25); position: relative;
}
.ev-date::before { content: ""; position: absolute; inset-inline-end: -8px; top: -8px; width: 26px; height: 26px; border-radius: 4px;
  background: linear-gradient(135deg, #fff 50%, #f97316 50%); box-shadow: 0 2px 6px rgb(0 0 0 / .25); }
.ev-date .dow { font-size: .85rem; font-weight: 700; color: #b45309; }
.ev-date .day { font-size: 3.2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ev-date .mon { font-size: .9rem; color: #444; }
.ev-head h1 { margin: 6px 0 4px; font-size: clamp(1.7rem, 4.2vw, 2.8rem); line-height: 1.12; }
.ev-head h1:focus { outline: none; }
.ev-head .tag { color: #fff; }
.ev-head .pill { background: rgb(255 255 255 / .15); border-color: rgb(255 255 255 / .3); color: #fff; }
.ev-sub { margin: 0; opacity: .9; font-size: 1.05rem; }
.ev-count { display: grid; justify-items: center; text-align: center; min-width: 110px; }
.ev-count-big { font-size: 3.4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ev-count span:last-child { opacity: .9; }

.ev-body { position: relative; margin-top: -40px; padding-bottom: 96px; }
.ev-facts { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ev-facts > li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px;
  box-shadow: var(--shadow); display: grid; gap: 2px; align-content: start; position: relative;
}
.ev-facts .ev-ico { position: absolute; inset-inline-end: 14px; top: 12px; font-size: 1.3rem; opacity: .85; }
.ev-facts .k { font-size: .8rem; color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.ev-facts strong { font-size: 1.3rem; line-height: 1.25; }
.ev-facts span:not(.k):not(.ev-ico), .ev-facts a { font-size: .88rem; color: var(--muted); }
.ev-facts a { color: var(--brand); font-weight: 700; }
.ev-facts .reg-open { border-color: color-mix(in srgb, #16a34a 55%, var(--border)); background: color-mix(in srgb, #16a34a 8%, var(--surface)); }
.ev-facts .reg-open strong { color: #15803d; }
:root[data-theme="dark"] .ev-facts .reg-open strong { color: #4ade80; }

.ev-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.ev-main, .ev-side { display: grid; gap: 16px; min-width: 0; }
.ev-side { position: sticky; top: 76px; }
.ev-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); }
.ev-card h2 { margin: 0 0 12px; font-size: 1.2rem; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ev-card h2 .muted { font-size: .85rem; font-weight: 400; }
.ev-card p { margin: 8px 0; overflow-wrap: anywhere; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn-xl { width: 100%; justify-content: center; padding: 14px 18px; font-size: 1.1rem; border-radius: 12px; margin-top: 8px; }

/* Registration card */
.ev-reg { border-width: 2px; }
.ev-reg.reg-open { border-color: #16a34a; }
.ev-reg.reg-past, .ev-reg.reg-closed { border-color: var(--border); }
.ev-reg.reg-soon, .ev-reg.reg-onsite { border-color: #d97706; }
.reg-count { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 8px; }
.reg-count div { background: var(--surface-2); border-radius: 12px; padding: 8px 4px; text-align: center; }
.reg-count strong { display: block; font-size: 1.8rem; line-height: 1; font-variant-numeric: tabular-nums; }
.reg-count span { font-size: .75rem; color: var(--muted); }

/* Race-day timeline */
.tl { position: relative; padding: 8px 4px 0; }
.tl-track { position: relative; height: 18px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.tl-window { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: repeating-linear-gradient(45deg, #16a34a, #16a34a 8px, #22c55e 8px, #22c55e 16px); }
.tl-run { position: absolute; top: 5px; bottom: 5px; background: color-mix(in srgb, #f59e0b 55%, transparent); }
.tl-now { position: absolute; top: -8px; bottom: -8px; width: 3px; background: var(--accent); border-radius: 2px; }
.tl-now span { position: absolute; top: -20px; transform: translateX(50%); font-size: .72rem; font-weight: 800; color: var(--accent); white-space: nowrap; }
.tl-points { list-style: none; margin: 0; padding: 0; position: relative; height: 64px; }
.tl-points li { position: absolute; top: 0; inset-inline-start: var(--pos); transform: translateX(50%); display: grid; justify-items: center; text-align: center; padding-top: 10px; }
.tl-points li::before { content: ""; position: absolute; top: -27px; width: 3px; height: 30px; background: var(--text); border-radius: 2px; }
.tl-points li.cutoff::before { background: #dc2626; }
.tl-points time { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tl-points span { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.tl-points li.cutoff time { color: #dc2626; }
:root[data-theme="dark"] .tl-points li.cutoff time { color: #f87171; }
.tl-legend { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; font-size: .92rem; }
.tl-legend li { display: flex; gap: 8px; align-items: baseline; }
.sw { flex: none; width: 14px; height: 14px; border-radius: 4px; transform: translateY(2px); }
.sw.start { background: #16a34a; }
.sw.cutoff { background: #dc2626; }

/* Courses */
.courses-viz { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.courses-viz li {
  display: grid; grid-template-columns: minmax(130px, 1.3fr) auto minmax(80px, 2fr) 64px; gap: 12px; align-items: center;
  padding: 8px 10px; border-radius: 10px;
}
.courses-viz li:nth-child(odd) { background: var(--surface-2); }
.courses-viz li.easy { box-shadow: inset 3px 0 0 #16a34a; }
.cv-name { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.easy-pill { background: color-mix(in srgb, #16a34a 14%, var(--surface)); border-color: #16a34a; color: #15803d; }
:root[data-theme="dark"] .easy-pill { color: #4ade80; }
.cv-level { display: flex; gap: 3px; }
.cv-level span { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--muted); }
.cv-level span.on { background: var(--accent); border-color: var(--accent); }
.cv-bar { height: 10px; background: var(--border); border-radius: 999px; overflow: hidden; }
.cv-bar span { display: block; height: 100%; background: var(--c, var(--brand)); border-radius: 999px; }
.cv-km { font-weight: 800; font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
@media (max-width: 560px) {
  .courses-viz li { grid-template-columns: 1fr auto; }
  .cv-bar { grid-column: 1 / -1; order: 3; }
}

/* Map, people, files, forum */
.ev-osm { width: 100%; height: 280px; border: 0; border-radius: 12px; background: var(--surface-2); }
.ev-mapimg { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.ev-mapimg img { display: block; width: 100%; height: 180px; object-fit: cover; transition: transform .3s; }
.ev-mapimg:hover img { transform: scale(1.04); }
.chips-static { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips-static li { font-size: .82rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.ev-people { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.ev-people dt { color: var(--muted); }
.ev-people dd { margin: 0; font-weight: 500; }
.ev-files, .ev-threads { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ev-threads li { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.ev-threads li:last-child { border-bottom: 0; padding-bottom: 0; }
.ev-threads a { font-weight: 700; color: var(--text); }

/* Quick-action dock (mobile) */
.ev-dock { display: none; }
@media (max-width: 860px) {
  .ev-grid { grid-template-columns: 1fr; }
  .ev-side { position: static; }
  .ev-facts { grid-template-columns: repeat(2, 1fr); }
  .ev-dock {
    display: flex; gap: 8px; position: fixed; z-index: 30; inset-inline: 12px; bottom: max(12px, env(safe-area-inset-bottom));
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 8px; box-shadow: 0 10px 30px rgb(0 0 0 / .25);
  }
  .ev-dock > * { min-height: 48px; min-width: 48px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text); font: inherit; font-size: 1.2rem; display: grid; place-items: center; text-decoration: none; cursor: pointer; }
  .ev-dock .dock-main { flex: 1; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 1.05rem; border: 0; }
}
@media (max-width: 640px) {
  .ev-hero-grid { grid-template-columns: auto 1fr; gap: 16px; }
  .ev-count { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; gap: 8px; align-items: baseline; }
  .ev-count-big { font-size: 2rem; }
  .ev-date { min-width: 88px; padding: 8px 12px; }
  .ev-date .day { font-size: 2.4rem; }
  .ev-facts strong { font-size: 1.1rem; }
}
:root[data-contrast="high"] .ev-hero { background: var(--surface); color: var(--text); border-bottom: 2px solid var(--border); }
:root[data-contrast="high"] .ev-hero .ev-back, :root[data-contrast="high"] .ev-head .tag, :root[data-contrast="high"] .ev-head .pill { color: var(--text); }
:root[data-contrast="high"] .tl-window { background: var(--text); }

.toast { position: fixed; z-index: 50; bottom: 90px; left: 50%; transform: translateX(-50%); background: #111; color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; }
.sw.run { background: color-mix(in srgb, #f59e0b 70%, transparent); }
.tl-legend li { display: grid; grid-template-columns: 14px 1fr; gap: 8px; align-items: start; }
.ev-facts strong.tbd { color: var(--muted); font-weight: 500; }

/* ---------- Top four & registration countdowns ---------- */
.hero { padding-block: 28px 56px; }
.hero .hero-title { margin: 0 0 16px; }
.top4 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.top4-loading { grid-column: 1 / -1; opacity: .9; }
.top4-loading a { color: #fff; font-weight: 700; }
.top-card {
  background: var(--surface); color: var(--text); border-radius: 18px; padding: 14px 16px; display: grid; gap: 12px; align-content: start;
  box-shadow: 0 10px 30px rgb(0 0 0 / .18); border-top: 6px solid var(--c); position: relative;
}
.top-card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.top-head { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.top-date { display: grid; justify-items: center; background: var(--surface-2); border-radius: 12px; padding: 6px 10px; min-width: 56px; }
.top-date .day { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.top-date .mon { font-size: .75rem; color: var(--muted); }
.top-meta h2 { margin: 2px 0; font-size: 1.05rem; line-height: 1.3; }
.top-meta h2 a { color: var(--text); text-decoration: none; }
.top-meta h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 18px; } /* whole card is clickable */
.top-meta h2 a:hover { text-decoration: underline; }
.top-meta p { margin: 0; font-size: .88rem; color: var(--muted); }
.top-foot { margin: 0; display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--muted); margin-top: auto; }
.top-cta { position: relative; z-index: 1; font-weight: 800; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--brand); color: var(--brand-ink) !important; }

.reg-cd { background: color-mix(in srgb, #16a34a 9%, var(--surface)); border: 1px solid color-mix(in srgb, #16a34a 45%, var(--border)); border-radius: 12px; padding: 8px 10px; }
.reg-cd-label { margin: 0 0 4px; font-size: .78rem; font-weight: 800; color: #15803d; }
:root[data-theme="dark"] .reg-cd-label { color: #4ade80; }
.reg-line { margin: 0; font-size: .88rem; }
.cd { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cd > div { text-align: center; background: var(--surface); border-radius: 8px; padding: 4px 2px; }
.cd strong { display: block; font-size: 1.45rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd span { font-size: .7rem; color: var(--muted); }
.cd-done { grid-column: 1 / -1; font-weight: 700; color: var(--muted); }
.cd.cd-inline { display: inline-grid; grid-auto-flow: column; grid-template-columns: none; gap: 4px; }
.cd.cd-inline > div { display: flex; gap: 3px; align-items: baseline; padding: 2px 8px; background: var(--surface); }
.cd.cd-inline strong { font-size: 1.05rem; display: inline; }
.event-card .reg-cd { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 8px; padding: 6px 10px; }
.event-card .reg-cd-label { margin: 0; }

/* event-page hero countdown */
.ev-count { min-width: 230px; }
.ev-count-label { font-weight: 800; font-size: .9rem; opacity: .95; margin-bottom: 6px; }
.cd.cd-hero > div { background: rgb(255 255 255 / .14); padding: 8px 6px; border-radius: 12px; }
.cd.cd-hero strong { font-size: 2.2rem; }
.cd.cd-hero span { color: rgb(255 255 255 / .85); font-size: .78rem; }
.ev-reg .cd { margin: 4px 0 8px; }
.ev-reg .cd > div { background: var(--surface-2); padding: 8px 4px; }
:root[data-contrast="high"] .cd.cd-hero > div { background: var(--surface-2); }
:root[data-contrast="high"] .cd.cd-hero span { color: var(--text); }

/* search on demand */
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 26px 0 10px; flex-wrap: wrap; }
.list-head h2 { margin: 0; font-size: 1.35rem; }
.search-toggle[aria-expanded="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter-count { font-weight: 800; }
.filters { margin-top: 0; margin-bottom: 8px; }
.result-count:empty, .live-status[hidden] { display: none; }

@media (max-width: 1000px) { .top4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  /* Mobile: all four as a compact list, visible without scrolling */
  .hero { padding-block: 14px 18px; }
  .hero .hero-title { font-size: 1.45rem; margin-bottom: 10px; }
  .top4 { grid-template-columns: 1fr; gap: 8px; }
  .top-card { grid-template-columns: 1fr auto; gap: 6px 8px; padding: 10px 12px; border-radius: 14px; border-top: 0; border-inline-start: 6px solid var(--c); box-shadow: 0 4px 14px rgb(0 0 0 / .18); }
  .top-card .top-head { grid-column: 1 / -1; gap: 10px; align-items: center; }
  .top-date { min-width: 46px; padding: 3px 6px; border-radius: 10px; }
  .top-date .day { font-size: 1.3rem; }
  .top-date .mon { font-size: .68rem; }
  .top-meta .badges { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .top-meta h2 { font-size: .98rem; margin: 0; }
  .top-meta p { font-size: .8rem; }
  .top-card .reg-cd { grid-column: 1; display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 10px; min-width: 0; }
  .top-card .reg-cd-label { margin: 0; font-size: .7rem; white-space: nowrap; }
  .top-card .reg-line { grid-column: 1; align-self: center; font-size: .78rem; }
  .cd.cd-card { display: flex; gap: 3px; }
  .cd.cd-card > div { display: flex; gap: 2px; align-items: baseline; padding: 1px 5px; border-radius: 6px; }
  .cd.cd-card strong { display: inline; font-size: .95rem; }
  .cd.cd-card span { font-size: .62rem; }
  .top-foot { grid-column: 2; margin: 0; }
  .top-foot > span { display: none; }
  .top-cta { padding: 5px 12px; font-size: .85rem; }
  .top-di { display: flex; } /* the badge row is hidden here, the icon on the date shows the discipline */
  .top-card .reg-cd { flex-wrap: wrap; row-gap: 2px; }
  .cd.cd-card > div:nth-child(3) { display: none; } /* days + hours are enough here */
  /* No registration info yet: the button moves up beside the title */
  .top-card:not(:has(.reg-cd, .reg-line)) .top-head { grid-column: 1; }
  .top-card:not(:has(.reg-cd, .reg-line)) .top-foot { grid-row: 1; align-self: center; }
  .ev-count { min-width: 0; grid-column: 1 / -1; justify-items: stretch; }
  .ev-count-label { text-align: start; }
}

/* Race-day diagram inside the "when" tile */
.ev-facts.has-tl { grid-template-columns: 1.9fr 1fr 1fr 1fr; }
.fact-when .tl { padding: 22px 2px 0; }
.fact-when .tl-track { height: 12px; }
.fact-when .tl-run { top: 3px; bottom: 3px; }
.fact-when .tl-points { height: 44px; }
.fact-when .tl-points li { padding-top: 6px; }
.fact-when .tl-points li::before { top: -19px; height: 22px; width: 2px; }
.fact-when .tl-points time { font-size: .95rem; color: var(--text); }
.fact-when .tl-points li.cutoff time { color: #dc2626; }
:root[data-theme="dark"] .fact-when .tl-points li.cutoff time { color: #f87171; }
.ev-facts .fact-when .tl-points span { font-size: .72rem; color: var(--muted); }
.fact-when .tl-now span { top: -18px; }
@media (max-width: 860px) {
  .ev-facts.has-tl { grid-template-columns: repeat(2, 1fr); }
  .ev-facts.has-tl .fact-when { grid-column: 1 / -1; }
}

/* ---------- Discipline icons ---------- */
.di { --s: 22px; flex: none; display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); color: #fff; }
.di svg { width: 72%; height: 72%; }
.di.di-sm { --s: 18px; }
.di.di-xs { --s: 15px; vertical-align: -3px; margin-inline-end: 3px; background: rgb(255 255 255 / .25); }
.tag .di { --s: 20px; }
.chip .di { --s: 22px; }
.chip[aria-pressed="true"] .di { box-shadow: 0 0 0 2px var(--bg); }
.legend .di { --s: 20px; }
.ev-head .tag .di { box-shadow: 0 0 0 2px rgb(255 255 255 / .5); }
.top-date { position: relative; }
.top-di { display: none; position: absolute; inset-inline-start: -7px; bottom: -7px; }
.top-di .di { box-shadow: 0 0 0 2px var(--surface); }
.top-di .di + .di { margin-inline-start: -5px; }
.month-card li button { grid-template-columns: 28px 18px 1fr; }
.month-card li button.tentative .di { background: transparent; color: var(--c); box-shadow: inset 0 0 0 1.5px var(--c); }
.month-table button.tentative .di { background: transparent; color: var(--c); }
:root[data-contrast="high"] .di { background: var(--text); color: var(--bg); }

/* =====================================================================
   BOLDER — orienteering-map identity, amplified
   Forest green + control-flag orange, contour-line texture,
   Karantina display type for headings, dates and countdown digits.
   ===================================================================== */
:root {
  --display: "Karantina", "Heebo", system-ui, sans-serif;
  --forest: #0b3d2e;
  --forest-2: #06261d;
  --flag: #f26a1b;
  --flag-ink: #b93f06;
  --contours: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='420' viewBox='0 0 640 420'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='1.4'%3E%3Cpath d='M118 210c0-74 58-128 136-128s150 46 150 122-70 140-152 140-134-60-134-134z'/%3E%3Cpath d='M152 212c0-54 44-94 102-94s112 34 112 90-52 104-114 104-100-44-100-100z'/%3E%3Cpath d='M186 214c0-34 30-60 68-60s74 22 74 58-34 66-74 66-68-28-68-64z'/%3E%3Cpath d='M218 214c0-16 16-28 36-28s38 10 38 28-18 32-38 32-36-14-36-32z'/%3E%3Cpath d='M470 60c50-10 120 14 140 60s-6 92-60 100-110-14-120-58 2-92 40-102z'/%3E%3Cpath d='M482 92c34-6 82 10 94 40s-4 62-40 66-74-10-80-38 0-62 26-68z'/%3E%3Cpath d='M496 122c18-2 40 6 44 20s-2 30-20 32-38-6-40-20 2-30 16-32z'/%3E%3Cpath d='M-20 380c90-40 170 10 260-10s170-60 250-40 120 40 170 30'/%3E%3Cpath d='M-20 404c90-36 170 14 262-6s172-56 252-36 118 40 168 28'/%3E%3Cpath d='M-20 30c70 20 120-10 180 0s90 40 150 30'/%3E%3C/g%3E%3C/svg%3E");
}
:root[data-theme="dark"] { --flag-ink: #fb8a4a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --flag-ink: #fb8a4a; } }

/* Display typography */
.hero-title, .section-head h1, .list-head h2, .ev-head h1, .news h2, .month-sep {
  font-family: var(--display); font-weight: 700; letter-spacing: .005em;
}
.section-head h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; }
.list-head h2, .news h2 { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1; }
.month-sep { font-size: 1.6rem; color: var(--text); margin-top: 22px; border-bottom: 2px solid var(--text); padding-bottom: 2px; }

/* Hero: deep forest with a contour-map texture */
.hero {
  background: var(--contours) center / 640px 420px, radial-gradient(120% 90% at 85% 0%, #14583f 0%, var(--forest) 45%, var(--forest-2) 100%);
  padding-block: 30px 40px;
}
.hero .hero-title { font-size: clamp(3.4rem, 8vw, 6.2rem); line-height: .86; margin: 0 0 22px; display: flex; align-items: center; gap: 16px; }
.hero .hero-title::before {
  content: ""; flex: none; width: .62em; height: .62em; border-radius: 6px;
  background: linear-gradient(135deg, #fff 50%, var(--flag) 50%); box-shadow: 0 6px 18px rgb(0 0 0 / .35);
}

/* Top four: one lead event, three on the side */
.top4 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-auto-rows: auto; gap: 14px; }
.top-card { border-top: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 18px 40px rgb(0 0 0 / .28); }
.top-card.lead { grid-row: span 3; padding: 0 0 18px; gap: 14px; }
.lead-img { position: relative; height: 190px; margin: 0; }
.lead-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lead-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--surface) 0%, transparent 55%); }
.top-card.lead .top-head { margin-top: -54px; position: relative; z-index: 1; }
.top-card.lead:not(:has(.lead-img)) .top-head { margin-top: 22px; }
.top-card.lead .top-date { min-width: 92px; padding: 8px 14px; background: var(--surface); box-shadow: 0 8px 22px rgb(0 0 0 / .18); border-radius: 16px; }
.top-card.lead .top-date .day { font-family: var(--display); font-size: 4.4rem; line-height: .85; }
.top-card.lead .top-meta h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15; margin-top: 30px; }
.top-card.lead .top-meta p { font-size: .98rem; }
.lead-summary { margin: 0; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* The three side cards: compact rows */
.top-card:not(.lead) { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px 16px; border-inline-start: 6px solid var(--c); }
.top-card:not(.lead) .top-head { grid-column: 1 / -1; align-items: center; }
.top-card:not(.lead) .top-date .day { font-family: var(--display); font-size: 2.3rem; line-height: .9; }
.top-card:not(.lead) .top-meta h2 { font-size: 1.08rem; }
.top-card:not(.lead) .reg-cd, .top-card:not(.lead) .reg-line { grid-column: 1; align-self: center; }
.top-card:not(.lead) .top-foot { grid-column: 2; margin: 0; }
.top-card:not(.lead) .top-foot > span { display: none; }
.top-card:not(.lead):not(:has(.reg-cd, .reg-line)) .top-head { grid-column: 1; }
.top-card:not(.lead):not(:has(.reg-cd, .reg-line)) .top-foot { grid-row: 1; align-self: center; }
.top-card:not(.lead) .reg-cd { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 6px 10px; }
.top-card:not(.lead) .reg-cd-label { margin: 0; }
.top-card:not(.lead) .cd.cd-card { display: flex; gap: 4px; }
.top-card:not(.lead) .cd.cd-card > div { display: flex; gap: 3px; align-items: baseline; padding: 1px 7px; }
.top-card:not(.lead) .cd.cd-card strong { display: inline; font-size: 1.35rem; }

/* Early registration: the urgent, orange thing on the page */
.reg-cd { background: color-mix(in srgb, var(--flag) 10%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--flag) 55%, var(--border)); }
.reg-cd-label { color: var(--flag-ink); letter-spacing: .01em; }
.cd > div { background: var(--flag); color: #fff; }
.cd strong { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: .95; color: #fff; }
.cd span { color: rgb(255 255 255 / .9); font-weight: 700; }
.top-card.lead .reg-cd { padding: 12px 14px; }
.top-card.lead .reg-cd-label { font-size: .9rem; margin-bottom: 8px; }
.top-card.lead .cd.cd-card > div { padding: 8px 4px 6px; border-radius: 12px; }
.top-card.lead .cd.cd-card strong { font-size: 3.2rem; }
.cd.cd-inline > div { background: var(--flag); }
.cd.cd-inline strong { font-size: 1.35rem; }
.ev-count-label { color: #fff; }
.cd.cd-hero > div { background: var(--flag); box-shadow: 0 8px 22px rgb(0 0 0 / .3); }
.cd.cd-hero strong { font-size: 3.4rem; }
.cd.cd-hero span { color: #fff; }
.ev-facts .reg-open { border-color: color-mix(in srgb, var(--flag) 60%, var(--border)); background: color-mix(in srgb, var(--flag) 8%, var(--surface)); }
.ev-facts .reg-open strong { color: var(--flag-ink); }
:root[data-theme="dark"] .ev-facts .reg-open strong { color: var(--flag-ink); }
.ev-reg.reg-open { border-color: var(--flag); }
.top-cta { background: var(--forest); }
:root[data-theme="dark"] .top-cta { background: #2f8f5f; }

/* Event page hero */
.ev-hero { background: var(--contours) center / 640px 420px, linear-gradient(135deg, color-mix(in srgb, var(--c) 60%, var(--forest)) 0%, var(--forest-2) 100%); }
.ev-contours { display: none; }
.ev-head h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: .92; }
.ev-date .day { font-family: var(--display); font-size: 4.6rem; line-height: .85; }
.ev-facts strong { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1; }
.ev-facts .fact-when .tl-points time { font-family: var(--display); font-size: 1.4rem; }
.cv-km, .tl-points time { font-family: var(--display); font-size: 1.35rem; }
.date-badge .d { font-family: var(--display); font-size: 2.6rem; line-height: .9; }

/* High contrast keeps flat, legible surfaces */
:root[data-contrast="high"] .hero, :root[data-contrast="high"] .ev-hero { background: var(--surface); }
:root[data-contrast="high"] .hero .hero-title { color: var(--text); }
:root[data-contrast="high"] .cd > div { background: var(--text); }
:root[data-contrast="high"] .cd strong, :root[data-contrast="high"] .cd span { color: var(--bg); }

@media (max-width: 1000px) {
  .top4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .top-card.lead { grid-row: auto; grid-column: 1 / -1; display: grid; grid-template-columns: 300px 1fr; column-gap: 0; padding: 0; }
  .top-card.lead .lead-img { grid-row: 1 / span 4; height: 100%; min-height: 220px; }
  .top-card.lead .lead-img::after { background: linear-gradient(to left, var(--surface) 0%, transparent 40%); }
  .top-card.lead .top-head { margin-top: 18px; }
  .top-card.lead .top-foot { margin-bottom: 16px; }
  .top-card:not(.lead) { grid-template-columns: 1fr; }
  .top-card:not(.lead) .reg-cd, .top-card:not(.lead) .reg-line, .top-card:not(.lead) .top-foot { grid-column: 1; grid-row: auto; }
}
@media (max-width: 560px) {
  .hero { padding-block: 14px 18px; }
  .hero .hero-title { font-size: 2.9rem; margin-bottom: 12px; gap: 10px; }
  .top4 { grid-template-columns: 1fr; gap: 8px; }
  .top-card.lead, .top-card:not(.lead) { grid-column: auto; grid-row: auto; display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; padding: 10px 12px; border-radius: 14px; border-inline-start: 6px solid var(--c); }
  .lead-img, .lead-summary { display: none; }
  .top-card.lead .top-head { margin-top: 0; grid-column: 1 / -1; align-items: center; }
  .top-card.lead .top-date { min-width: 46px; padding: 3px 6px; box-shadow: none; background: var(--surface-2); border-radius: 10px; }
  .top-card .top-date .day, .top-card.lead .top-date .day { font-size: 2rem; line-height: .9; }
  .top-card.lead .top-meta h2 { font-size: 1.05rem; margin-top: 0; }
  .top-card.lead .top-meta p { font-size: .8rem; }
  .top-card .reg-cd, .top-card.lead .reg-cd { grid-column: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; padding: 3px 8px; }
  .top-card.lead .reg-cd-label { font-size: .7rem; margin: 0; }
  .top-card .cd.cd-card > div, .top-card.lead .cd.cd-card > div { display: flex; padding: 1px 6px; border-radius: 6px; }
  .top-card .cd.cd-card strong, .top-card.lead .cd.cd-card strong { font-size: 1.2rem; }
  .top-card.lead .top-foot { grid-column: 2; margin: 0; }
  .top-card.lead .top-foot > span { display: none; }
  .top-card.lead:not(:has(.reg-cd, .reg-line)) .top-head { grid-column: 1; }
  .top-card.lead:not(:has(.reg-cd, .reg-line)) .top-foot { grid-row: 1; align-self: center; }
  .ev-head h1 { font-size: 2.6rem; }
  .ev-facts strong { font-size: 1.7rem; }
  .cd.cd-hero strong { font-size: 2.4rem; }
}

/* ---- Bolder, pass 2 ---- */
/* Numerals: Heebo Black reads instantly; Karantina stays for Hebrew headings */
:root { --num: "Heebo", system-ui, sans-serif; }
.top-card .top-date .day, .top-card.lead .top-date .day, .top-card:not(.lead) .top-date .day, .ev-date .day, .date-badge .d,
.cd strong, .ev-facts strong, .ev-facts .fact-when .tl-points time, .cv-km, .tl-points time, .lb-day {
  font-family: var(--num); font-weight: 900; letter-spacing: -.03em;
}
.cd strong { font-size: 1.9rem; }
.top-card.lead .cd.cd-card strong { font-size: 2.6rem; }
.cd.cd-hero strong { font-size: 2.6rem; }
.ev-facts strong { font-size: 1.55rem; line-height: 1.15; }
.ev-date .day { font-size: 3.6rem; }
.date-badge .d { font-size: 1.9rem; }
.cv-km, .tl-points time, .ev-facts .fact-when .tl-points time { font-size: 1.05rem; }
.top-card:not(.lead) .top-date .day { font-size: 1.9rem; }
.top-card:not(.lead) .cd.cd-card strong { font-size: 1.15rem; }


/* Lead card: a coloured contour band instead of a low-res photo */
.lead-img { display: none; }
.lead-band {
  position: relative; display: flex; align-items: flex-end; gap: 14px; padding: 22px 22px 18px; min-height: 150px; color: #fff;
  background: var(--contours) center / 520px 340px, linear-gradient(140deg, color-mix(in srgb, var(--c) 88%, #fff) 0%, color-mix(in srgb, var(--c) 70%, #000) 100%);
}
.lb-day { font-size: 6.4rem; line-height: .78; text-shadow: 0 6px 24px rgb(0 0 0 / .25); }
.lb-mon { font-family: var(--display); font-size: 2rem; line-height: .95; padding-bottom: 4px; }
.lb-icons { margin-inline-start: auto; display: flex; gap: 6px; align-self: flex-start; padding-top: 34px; }
.di.di-xl { --s: 46px; background: rgb(255 255 255 / .18); box-shadow: inset 0 0 0 2px rgb(255 255 255 / .55); }
.top-card.lead .top-head { margin-top: 0; }
.top-card.lead .top-date { display: none; }
.top-card.lead .top-meta h2 { margin-top: 0; }
.top-card.lead .top-meta .badges { margin-bottom: 4px; }
:root[data-contrast="high"] .lead-band { background: var(--text); color: var(--bg); }

@media (max-width: 1000px) {
  .top-card.lead { grid-template-columns: 260px 1fr; }
  .top-card.lead .lead-band { grid-row: 1 / span 5; min-height: 100%; flex-direction: column; align-items: flex-start; justify-content: flex-end; }
  .lb-icons { position: absolute; top: 18px; inset-inline-end: 18px; padding: 0; }
  .top-card.lead .top-head { margin-top: 20px; }
  .top-card:not(.lead):not(:has(.reg-cd, .reg-line)) .top-head { grid-column: 1; }
  .top-card:not(.lead):not(:has(.reg-cd, .reg-line)) .top-foot { grid-row: auto; }
}
@media (max-width: 560px) {
  .lead-band { display: none; }
  .top-card.lead { grid-template-columns: 1fr auto; }
  .top-card.lead .top-head { margin-top: 0; }
  .top-card.lead .top-date { display: grid; }
  .top-card .top-date .day, .top-card.lead .top-date .day, .top-card:not(.lead) .top-date .day { font-size: 1.45rem; }
  .cd strong, .top-card .cd.cd-card strong, .top-card.lead .cd.cd-card strong, .top-card:not(.lead) .cd.cd-card strong { font-size: 1.05rem; }
  /* restore the compact two-column row (the tablet rules stack it) */
  .top-card:not(.lead) .top-head { grid-column: 1 / -1; }
  .top-card:not(.lead) .reg-cd, .top-card:not(.lead) .reg-line { grid-column: 1; grid-row: auto; }
  .top-card:not(.lead) .top-foot { grid-column: 2; grid-row: auto; align-self: center; }
  .top-card:not(.lead):not(:has(.reg-cd, .reg-line)) .top-head { grid-column: 1; }
  .top-card:not(.lead):not(:has(.reg-cd, .reg-line)) .top-foot { grid-row: 1; }
  .top-card .reg-cd-label, .top-card:not(.lead) .reg-cd-label { font-size: .7rem; }
  .ev-date .day { font-size: 2.6rem; }
  .ev-facts strong { font-size: 1.3rem; }
  .cd.cd-hero strong { font-size: 2rem; }
}

/* Lead card inner spacing (the band stays full-bleed) */
.top-card.lead > :not(.lead-band) { margin-inline: 22px; }
@media (max-width: 1000px) { .top-card.lead > :not(.lead-band) { margin: 0 22px; } .top-card.lead .top-head { margin-top: 20px; } .top-card.lead .top-foot { margin-bottom: 16px; } }
@media (max-width: 560px) { .top-card.lead > :not(.lead-band) { margin: 0; } .top-card.lead .top-head { margin-top: 0; } .top-card.lead .top-foot { margin-bottom: 0; } }
.start-time { color: var(--text); font-weight: 800; }
.diag { margin-top: 12px; text-align: start; }
.diag pre { font-size: .75rem; overflow-x: auto; background: var(--surface-2); padding: 10px; border-radius: 8px; }

/* ---------- My people ---------- */
.people-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; color: inherit; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .4);
}
.people-btn:hover { background: rgb(255 255 255 / .2); }
.people-count:empty { display: none; }
.people-dialog {
  border: 0; border-radius: 20px; padding: 22px; width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgb(0 0 0 / .35);
}
.people-dialog::backdrop { background: rgb(0 0 0 / .5); }
.people-dialog h2 { font-family: var(--display); font-size: 2.2rem; line-height: 1; margin: 0 0 8px; }
.dlg-x { position: absolute; inset-inline-end: 14px; top: 14px; margin: 0; }
.people-form { display: grid; gap: 6px; margin: 14px 0; }
.people-form label { font-size: .88rem; color: var(--muted); }
.people-row { display: flex; gap: 8px; }
.people-row input { flex: 1; min-width: 0; }
.people-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.people-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; background: var(--surface-2); border-radius: 10px; }
.people-list li.muted { background: none; padding: 0; }
.people-list .icon-btn { min-width: 34px; min-height: 34px; border-color: var(--border); }
.mypl { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.mypl li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; }
.mypl li > div { display: grid; }
.mypl .mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; }
.mypl .in .mark { background: #16a34a; color: #fff; }
.mypl .out .mark { background: var(--surface-2); color: var(--muted); }
.mypl .out > div > span:first-child { color: var(--muted); }
.linklike { all: unset; cursor: pointer; color: var(--brand); text-decoration: underline; }
.linklike:focus-visible { outline: 3px solid var(--focus); }
.people-chip { margin: 4px 0 0; font-size: .82rem; font-weight: 700; color: #15803d; }
:root[data-theme="dark"] .people-chip { color: #4ade80; }
@media (max-width: 640px) {
  .people-btn { min-height: 36px; padding: 0 10px; font-size: .9rem; }
}
@media (max-width: 640px) {
  .people-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .people-btn { order: 2; padding: 0 9px; min-width: 36px; justify-content: center; }
  .a11y-tools { order: 2; }
}
.hero-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-people { display: none; }
@media (max-width: 640px) {
  .site-header .people-btn { display: none; }
  .hero-people { display: inline-flex; flex: none; }
  .hero-head .hero-title { margin-bottom: 12px; }
}

/* ---------- Saved discipline filter (cookie) ---------- */
.hero-head { flex-wrap: wrap; }
.disc-filter { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.df-label { color: rgb(255 255 255 / .8); font-weight: 700; font-size: .9rem; }
.df-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px 0 8px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; color: rgb(255 255 255 / .75); background: transparent; border: 1.5px dashed rgb(255 255 255 / .45);
}
.df-btn .di { opacity: .55; background: transparent; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .7); }
.df-btn[aria-pressed="true"] { background: #fff; color: var(--forest); border: 1.5px solid #fff; }
.df-btn[aria-pressed="true"] .di { opacity: 1; background: var(--c); box-shadow: none; }
.df-btn:hover { border-color: #fff; color: #fff; }
.df-btn[aria-pressed="true"]:hover { color: var(--forest); }
.legend .off { opacity: .45; text-decoration: line-through; }
:root[data-contrast="high"] .df-label { color: var(--text); }
:root[data-contrast="high"] .df-btn { color: var(--text); border-color: var(--text); }
:root[data-contrast="high"] .df-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
@media (max-width: 640px) {
  .hero-head { flex-wrap: nowrap; gap: 8px; }
  .hero-head .hero-title { font-size: 2.3rem; gap: 8px; }
  .df-label, .df-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .disc-filter { gap: 4px; }
  .df-btn { min-height: 38px; min-width: 38px; padding: 0; justify-content: center; }
  .df-btn .di { --s: 26px; }
  .hero-people { min-width: 38px; padding: 0 8px; }
}
@media (max-width: 640px) { .hero-head .hero-title { font-size: 2.1rem; white-space: nowrap; } }
@media (max-width: 370px) { .hero-head .hero-title { font-size: 1.85rem; } .df-btn { min-width: 34px; min-height: 34px; } .df-btn .di { --s: 24px; } }

/* ---------- Club logos ---------- */
.club-logo {
  --s: 22px; position: relative; flex: none; display: inline-grid; place-items: center; width: var(--s); height: var(--s);
  border-radius: 50%; overflow: hidden; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); vertical-align: middle;
}
.club-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.club-logo .mono { font-weight: 900; font-size: calc(var(--s) * .5); color: var(--muted); line-height: 1; }
.cl-xs { --s: 18px; margin-inline-end: 5px; }
.cl-sm { --s: 22px; margin-inline-end: 6px; }
.cl-md { --s: 36px; margin-inline-end: 8px; }
.cl-lg { --s: 48px; }
.cl-btn { --s: 22px; box-shadow: 0 0 0 2px rgb(255 255 255 / .6); }
.club-li, .club-dd, .top-club, .author { display: inline-flex; align-items: center; }
.top-club { margin: 2px 0 0; font-size: .82rem; color: var(--muted); gap: 0; }
.club-tag { gap: 0; }
.ev-head .club-tag .club-logo { box-shadow: 0 0 0 2px rgb(255 255 255 / .5); }
.track-ico { display: inline-flex; }

/* ---------- League highlight (gold) ---------- */
:root { --gold: #f2b705; --gold-ink: #3d2c00; --gold-soft: #fff4cc; }
:root[data-theme="dark"] { --gold-soft: #3a2f0a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --gold-soft: #3a2f0a; } }
.league-pill { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 900; }
.event-card.is-league { background: linear-gradient(90deg, transparent 55%, var(--gold-soft)), var(--surface); box-shadow: inset 0 3px 0 var(--gold), var(--shadow); }
.top-card.is-league { box-shadow: inset 0 4px 0 var(--gold), 0 18px 40px rgb(0 0 0 / .28); }
.top-card.lead.is-league .lead-band { box-shadow: inset 0 -5px 0 var(--gold); }
.flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; }
.league-dot { margin-inline-end: 4px; }
.ev-hero.is-league .league-pill { font-size: .95rem; padding: 3px 12px; box-shadow: 0 4px 14px rgb(0 0 0 / .25); }
:root[data-contrast="high"] .league-pill { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- My club ---------- */
.mine-pill { background: transparent; color: var(--brand); border: 1.5px solid currentColor; font-weight: 900; }
:root[data-theme="dark"] .mine-pill { color: #4ade80; }
.ev-head .mine-pill { color: #fff; border-color: #fff; }
.event-card.is-mine { border-inline-start-width: 10px; }
.top-card.is-mine { outline: 3px solid color-mix(in srgb, var(--brand) 60%, #fff); outline-offset: -3px; }
.mine-author { font-weight: 800; color: var(--brand); }
.mine-author::after { content: " ★"; }
.pref { border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 12px; }
.people-dialog h3 { margin: 10px 0 6px; font-size: 1.1rem; }
.myclub-pick { display: flex; align-items: center; gap: 10px; }
.myclub-pick select { flex: 1; }
.myclub-row { display: flex; align-items: center; margin-bottom: 6px; }
.myclub-row p { margin: 0; }
.mates summary { cursor: pointer; color: var(--brand); font-weight: 700; margin-bottom: 6px; }
.mypl-sub { font-size: 1rem; margin: 14px 0 8px; display: flex; gap: 8px; align-items: baseline; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; min-height: 42px; }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); }
@media (max-width: 560px) {
  .top-card .flags { margin: 0; }
  .top-club { display: none; } /* phones: the "my club" badge stays; logos show on the event page */
}

/* ---------- Card HUD: attributes on top, club top-left, clear status ---------- */
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.top-bar .badges { margin: 0; }
.top-bar .top-club { display: inline-flex; align-items: center; margin: 0 0 0 0; margin-inline-start: auto; font-size: .85rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.top-card.lead > .top-bar { margin-top: 14px; }
.top-card:not(.lead) .top-bar { grid-column: 1 / -1; }
.top-meta .top-when { font-size: .95rem; color: var(--text); }
.top-meta .top-loc { color: var(--muted); }
.start-time { background: color-mix(in srgb, var(--brand) 10%, transparent); padding: 0 6px; border-radius: 6px; }
.title-flags:empty, .date-club { display: none; }
.title-flags { margin-inline-end: 6px; }
.reg-line { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; padding: 5px 10px; border-radius: 10px;
  font-size: .85rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.reg-closed { background: color-mix(in srgb, #64748b 12%, var(--surface)); }
.reg-closed strong { color: var(--brand); }
:root[data-theme="dark"] .reg-closed strong { color: #4ade80; }
.reg-soon { background: color-mix(in srgb, #d97706 12%, var(--surface)); border-color: color-mix(in srgb, #d97706 45%, var(--border)); }
.top-card:not(:has(.top-foot)) .reg-line, .top-card:not(:has(.top-foot)) .reg-cd { grid-column: 1 / -1; }
.event-card .reg-line { margin-top: 8px; }
@media (max-width: 560px) {
  /* keep four cards on screen: attributes become icons, the club logo sits under the date */
  .top-bar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .title-flags:not(:empty) { display: inline; }
  .date-club { display: block; margin-top: 4px; }
  .date-club .club-logo { margin: 0; }
  .top-meta .top-when { font-size: .85rem; }
  .reg-line { font-size: .78rem; padding: 3px 8px; }
}
.title-flags { display: none; }
@media (max-width: 560px) { .title-flags:not(:empty) { display: inline; } }
@media (min-width: 1001px) {
  /* side cards: attributes bar · title with the button beside it · registration status */
  .top4 .top-card:not(.lead) .top-bar { grid-column: 1 / -1; grid-row: 1; }
  .top4 .top-card:not(.lead) .top-head { grid-column: 1; grid-row: 2; }
  .top4 .top-card:not(.lead) .top-foot { grid-column: 2; grid-row: 2; align-self: center; }
  .top4 .top-card:not(.lead) .reg-cd, .top4 .top-card:not(.lead) .reg-line { grid-column: 1 / -1; grid-row: 3; justify-self: stretch; }
  .top4 .top-card:not(.lead):not(:has(.top-foot)) .top-head { grid-column: 1 / -1; }
}
@media (max-width: 1000px) and (min-width: 561px) {
  .top4 .top-card:not(.lead) .top-foot { grid-row: auto; }
  .top4 .top-card:not(.lead) .top-bar { grid-row: auto; }
}
/* discipline icon on the date: phones only (elsewhere the attribute bar names the discipline) */
@media (max-width: 560px) { .top-di { display: flex; } }

/* ---------- Club logo watermark at the card's left edge ---------- */
.hud-logo {
  position: absolute; z-index: 0; inset-inline-end: 8px; bottom: 8px; width: 120px; height: 120px;
  display: grid; place-items: center; pointer-events: none; opacity: .16;
}
.hud-logo img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; filter: saturate(.9); }
:root[data-theme="dark"] .hud-logo img { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hud-logo img { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; } }
:root[data-contrast="high"] .hud-logo { display: none; }
.top-card > :not(.hud-logo):not(.top-bar) { position: relative; z-index: 1; }
@media (min-width: 561px) { .top-card > .top-bar { position: relative; z-index: 1; } }
.top-card.lead .hud-logo { width: 170px; height: 170px; bottom: 16px; inset-inline-end: 16px; opacity: .13; }
.top-card:not(.lead) .hud-logo { top: 50%; bottom: auto; transform: translateY(-50%); width: 96px; height: 96px; }
.top-club { font-weight: 800; }
@media (max-width: 560px) {
  .hud-logo, .top-card.lead .hud-logo, .top-card:not(.lead) .hud-logo { width: 76px; height: 76px; top: 50%; bottom: auto; transform: translateY(-50%); inset-inline-end: 6px; opacity: .14; }
}

/* ---------- Register button inside the countdown ---------- */
.reg-cd.has-cta { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.reg-cd.has-cta .reg-cd-main { min-width: 0; }
.reg-cd.has-cta .top-cta { flex: none; align-self: center; box-shadow: 0 4px 12px rgb(0 0 0 / .18); }
.top-card .reg-cd.has-cta, .event-card .reg-cd.has-cta { grid-column: 1 / -1; }
.top-card.lead .reg-cd.has-cta .top-cta { padding: 10px 18px; font-size: 1rem; }
.event-card .reg-cd.has-cta { display: inline-flex; }
@media (max-width: 560px) {
  .top-card .reg-cd.has-cta { gap: 6px 8px; padding: 6px 8px; flex-wrap: nowrap; }
  .top-card .reg-cd.has-cta .reg-cd-main { display: grid; gap: 2px; }
}

/* ---------- Club logo watermark: larger and tilted, bleeding off the left edge ---------- */
.hud-logo { transform: rotate(-16deg); transform-origin: center; }
.top-card:not(.lead) .hud-logo { width: 150px; height: 150px; top: 50%; bottom: auto; inset-inline-end: -26px; transform: translateY(-50%) rotate(-16deg); opacity: .15; }
.top-card.lead .hud-logo { width: 240px; height: 240px; inset-inline-end: -40px; bottom: -30px; opacity: .12; }
@media (max-width: 560px) {
  .hud-logo, .top-card.lead .hud-logo, .top-card:not(.lead) .hud-logo { width: 120px; height: 120px; inset-inline-end: -22px; top: 50%; bottom: auto; transform: translateY(-50%) rotate(-16deg); opacity: .14; }
}

/* ---------- My registered people (with their start time) ---------- */
.people-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 6px 0 0; font-size: .85rem; color: var(--text); }
.pc-ico { font-size: 1rem; }
.pc-person { display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, #16a34a 12%, var(--surface)); border: 1px solid color-mix(in srgb, #16a34a 40%, var(--border)); }
.pstart { font-family: var(--num); font-weight: 900; font-size: .8rem; letter-spacing: -.01em; padding: 0 6px; border-radius: 999px; background: #16a34a; color: #fff; }
.mypl-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mypl .pstart { font-size: .85rem; padding: 1px 8px; }
:root[data-contrast="high"] .pstart { background: var(--text); color: var(--bg); }
@media (max-width: 560px) {
  .top-card .people-chip { margin-top: 3px; font-size: .78rem; }
  .top-card .pc-person { padding: 1px 3px 1px 6px; }
}

/* ---------- "More events" use the same HUD cards ---------- */
.event-list.hud-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.hud-list > .month-sep, .hud-list > .empty { grid-column: 1 / -1; }
.hud-list .top-card { position: relative; box-shadow: var(--shadow); border: 1px solid var(--border); border-inline-start: 6px solid var(--c); }
.hud-list .top-card.is-league { box-shadow: inset 0 4px 0 var(--gold), var(--shadow); }
.hud-list .top-card h3 { margin: 2px 0; font-size: 1.05rem; line-height: 1.3; }
.hud-list .top-card h3 a { color: var(--text); text-decoration: none; }
.hud-list .top-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.hud-list .top-card h3 a:hover { text-decoration: underline; }
.hud-list .top-card .top-foot, .hud-list .top-card .reg-cd, .hud-list .top-card .reg-line, .hud-list .top-card .top-cta { position: relative; z-index: 2; }
@media (min-width: 1001px) {
  .hud-list .top-card { grid-template-columns: 1fr auto; align-content: start; }
  .hud-list .top-card .top-bar { grid-column: 1 / -1; grid-row: 1; }
  .hud-list .top-card .top-head { grid-column: 1; grid-row: 2; }
  .hud-list .top-card .top-foot { grid-column: 2; grid-row: 2; align-self: center; margin: 0; }
  .hud-list .top-card .top-foot > span { display: none; }
  .hud-list .top-card .reg-cd, .hud-list .top-card .reg-line { grid-column: 1 / -1; grid-row: 3; }
  .hud-list .top-card:not(:has(.top-foot)) .top-head { grid-column: 1 / -1; }
}
@media (max-width: 1000px) { .event-list.hud-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .event-list.hud-list { grid-template-columns: 1fr; gap: 8px; } }

/* list cards: placement scoped to the list (beats the side-card rules) */
@media (min-width: 1001px) {
  #eventList .top-card .top-bar { grid-column: 1 / -1; grid-row: 1; }
  #eventList .top-card .top-head { grid-column: 1; grid-row: 2; }
  #eventList .top-card .top-foot { grid-column: 2; grid-row: 2; align-self: center; }
  #eventList .top-card .reg-cd, #eventList .top-card .reg-line { grid-column: 1 / -1; grid-row: 3; }
  #eventList .top-card:not(:has(.top-foot)) .top-head { grid-column: 1 / -1; }
}
@media (max-width: 1000px) and (min-width: 561px) {
  #eventList .top-card .top-foot { grid-row: auto; }
}

/* ---------- Forum attachments ---------- */
.msg-images { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.msg-img { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.msg-img img { display: block; max-width: min(100%, 420px); max-height: 320px; object-fit: contain; }
.msg-img-open { position: absolute; bottom: 8px; inset-inline-start: 8px; background: rgb(0 0 0 / .65); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; opacity: 0; transition: opacity .15s; }
.msg-img:hover .msg-img-open, .msg-img:focus-visible .msg-img-open { opacity: 1; }
.msg-img-link { font-weight: 700; }
.msg-files { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.msg-files a { display: inline-flex; gap: 4px; align-items: baseline; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); text-decoration: none; color: var(--text); font-weight: 600; font-size: .9rem; }
.msg-files a:hover { border-color: var(--brand); }

/* weekday in the date box */
.top-date .dow { font-size: .72rem; font-weight: 800; color: #b45309; line-height: 1.2; }
:root[data-theme="dark"] .top-date .dow { color: #fbbf24; }
.top-meta .top-when:empty { display: none; }
@media (max-width: 560px) { .top-date .dow { font-size: .66rem; } }

/* ---------- Distance ---------- */
.dist { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; color: var(--text); white-space: nowrap; }
.dist-line { font-size: .88rem; color: var(--muted); }
.home-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.home-pick select { flex: 1 1 160px; }
.people-dialog { overflow-y: auto; overscroll-behavior: contain; }

/* ---------- Image lightbox ---------- */
.lightbox {
  border: 0; padding: 0; width: min(1100px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px);
  background: #0b0f0d; color: #fff; border-radius: 16px; overflow: hidden; display: none;
}
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox::backdrop { background: rgb(0 0 0 / .8); }
.lb-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.lb-caption { margin: 0; flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-orig { color: rgb(255 255 255 / .8); font-size: .85rem; }
.lb-close { color: #fff; border-color: rgb(255 255 255 / .4); }
.lb-figure { margin: 0; min-height: 0; display: grid; place-items: center; padding: 0 12px; }
.lb-figure img { max-width: 100%; max-height: calc(100dvh - 140px); object-fit: contain; border-radius: 8px; background: #1a1f1c; }
.lb-nav { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 10px; }
.lb-nav .icon-btn { color: #fff; border-color: rgb(255 255 255 / .4); font-size: 1.4rem; }
.ev-files a[data-lightbox] { cursor: zoom-in; }
.msg-img, .ev-mapimg { cursor: zoom-in; }
@media (prefers-reduced-motion: no-preference) { .lightbox[open] { animation: lb-in .18s ease-out; } @keyframes lb-in { from { opacity: 0; transform: scale(.98); } } }

/* ---------- My registered people: gold star with a count + tooltip ---------- */
.top-card.has-people { box-shadow: 0 0 0 2px #f59e0b, 0 12px 30px rgb(245 158 11 / .25); }
.hud-list .top-card.has-people { box-shadow: 0 0 0 2px #f59e0b, var(--shadow); }
.ppl-star {
  position: absolute; z-index: 3; top: -12px; inset-inline-start: -12px; width: 36px; height: 36px; padding: 0; border: 0;
  background: none; cursor: pointer; display: grid; place-items: center; filter: drop-shadow(0 3px 6px rgb(0 0 0 / .3));
}
.ppl-star svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: #f59e0b; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }
.ppl-star .n { position: relative; font-family: var(--num); font-weight: 900; font-size: .85rem; color: #3d2c00; transform: translateY(1px); }
.ppl-star:hover svg, .ppl-star:focus-visible svg { fill: #fbbf24; }
.ppl-star:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) { .ppl-star { animation: star-pop .35s cubic-bezier(.3, 1.6, .5, 1); } @keyframes star-pop { from { transform: scale(.3); opacity: 0; } } }
.tip {
  position: fixed; z-index: 100; max-width: min(320px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 12px;
  background: #111; color: #fff; font-size: .88rem; line-height: 1.5; box-shadow: 0 10px 30px rgb(0 0 0 / .35); display: grid; gap: 2px; pointer-events: none;
}
.tip strong { color: #fbbf24; margin-bottom: 2px; }
:root[data-contrast="high"] .ppl-star svg { fill: var(--text); stroke: var(--bg); }
:root[data-contrast="high"] .ppl-star .n { color: var(--bg); }
.top-card .top-date { overflow: visible; }
@media (max-width: 560px) {
  .top-card .people-chip { display: none; } /* phones: the star and its tooltip carry it */
  .ppl-star { width: 30px; height: 30px; top: -10px; inset-inline-start: -10px; }
}

/* star first in the card's top bar (not on the date) */
.top-bar .ppl-star { position: relative; top: auto; inset-inline-start: auto; flex: none; width: 32px; height: 32px; margin-inline-end: 2px; }
.top-bar { justify-content: flex-start; }
.top-bar .top-club { margin-inline-start: auto; }
.tip { min-width: 160px; }
.tip-row { display: flex; justify-content: space-between; gap: 16px; }
.tip-row b { font-family: var(--num); font-weight: 900; color: #fbbf24; }
@media (max-width: 560px) {
  /* phones: the bar is screen-reader only, except the star on cards with my people */
  .top-card.has-people .top-bar { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; grid-column: 1 / -1; margin: -2px 0 0; }
  .top-card.has-people .top-bar > :not(.ppl-star) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .top-bar .ppl-star { width: 28px; height: 28px; }
}
.top-loc .dist { color: var(--text); font-weight: 800; }
.ev-facts strong .dist { font-family: var(--num); font-weight: 900; color: var(--brand); white-space: nowrap; }
:root[data-theme="dark"] .ev-facts strong .dist { color: #4ade80; }
.dist-set { font-size: .85rem; justify-self: start; }

/* ---- Help: sample card with arrows ---- */
.help-btn { font-weight: 900; font-size: 1.05rem; }
.help-dialog {
  border: 0; border-radius: 20px; padding: 22px; width: min(1100px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  overflow-y: auto; overscroll-behavior: contain; background: var(--bg); color: var(--text); box-shadow: 0 24px 60px rgb(0 0 0 / .35);
}
.help-dialog::backdrop { background: rgb(0 0 0 / .55); }
.help-dialog h2 { font-family: var(--display); font-size: 2.2rem; line-height: 1; margin: 0 0 4px; }
.hh-stage { position: relative; margin-top: 14px; }
.hh-card { display: block; max-width: 460px; margin: 0 auto; pointer-events: none; }
.hh-card .top-card { margin: 0; }
.hh-arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.hh-arrows path { fill: none; stroke: var(--flag, #f26a1b); stroke-width: 2; stroke-linejoin: round; }
.hh-arrows marker path { fill: var(--flag, #f26a1b); stroke: none; }
.hh-pin {
  position: absolute; z-index: 3; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  display: grid; place-items: center; font: 900 .7rem/1 var(--num, system-ui); color: #fff; background: var(--flag, #f26a1b);
  box-shadow: 0 0 0 2px var(--bg); pointer-events: none;
}
.hh-notes { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.hh-notes li { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; line-height: 1.35; }
.hh-num {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font: 900 .78rem/1 var(--num, system-ui); color: #fff; background: var(--flag, #f26a1b);
}
.hh-stage.wide .hh-notes { margin: 0; position: static; }
.hh-stage.wide .hh-notes li {
  position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px 8px;
  box-shadow: var(--shadow); z-index: 1;
}
:root[data-contrast="high"] .hh-arrows path, :root[data-contrast="high"] .hh-arrows marker path { stroke: var(--text); }
:root[data-contrast="high"] .hh-arrows marker path { fill: var(--text); }
:root[data-contrast="high"] .hh-pin, :root[data-contrast="high"] .hh-num { background: var(--text); color: var(--bg); }
/* The help card always shows its top bar, even where phones tuck it away */
@media (max-width: 560px) {
  .hh-card .top-card .top-bar, .hh-card .top-card.has-people .top-bar > :not(.ppl-star) {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
  }
  .hh-card .top-card .top-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 8px; }
}

/* "Show more" under the list */
.more-row { display: flex; justify-content: center; margin: 18px 0 6px; }
.more-btn { font-weight: 800; padding: 10px 22px; }
.more-row:has(.more-btn[hidden]) { display: none; }

/* Mini race-day diagram on the cards (instead of "start 09:00") */
.tlm { display: inline-block; position: relative; width: 150px; vertical-align: middle; padding-top: 2px; }
.tlm-track { display: block; position: relative; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.tlm-win { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: repeating-linear-gradient(45deg, #16a34a, #16a34a 4px, #22c55e 4px, #22c55e 8px); }
.tlm-run { position: absolute; top: 2px; bottom: 2px; background: color-mix(in srgb, #f59e0b 60%, transparent); }
.tlm-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-inline-start: -1px; background: var(--text); border-radius: 1px; }
.tlm-tick.cutoff { background: #dc2626; }
.tlm-pts { display: block; position: relative; height: 1.05em; margin-top: 1px; }
.tlm-pts time { position: absolute; top: 0; transform: translateX(50%); font: 900 .74rem/1.05 var(--num, system-ui); font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.tlm-pts time.cutoff { color: #dc2626; }
:root[data-theme="dark"] .tlm-pts time.cutoff { color: #f87171; }
:root[data-contrast="high"] .tlm-win { background: var(--text); }
.top-when:has(.tlm) { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }

/* "More info" button on cards and its dialog */
.info-btn {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
}
.info-btn > span[aria-hidden] {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff;
  font: italic 900 .75rem/1 Georgia, serif;
}
.info-btn:hover { border-color: var(--brand); }
.top-bar .info-btn { margin-inline-start: auto; }
.top-bar .info-btn + .top-club { margin-inline-start: 0; }
.info-m { display: none; }
@media (max-width: 560px) {
  .top-bar .info-btn { display: none; }
  .top-card > .info-btn.info-m { display: inline-flex; position: absolute; z-index: 2; top: 6px; inset-inline-end: 6px; width: auto; padding: 3px; border-radius: 50%; }
  .info-m .info-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .top-card:has(.info-m) .top-meta h2, .top-card:has(.info-m) .top-meta h3 { padding-inline-end: 26px; }
}
.info-dialog h2 { margin-top: 0; }
.info-body p { margin: 0 0 8px; line-height: 1.55; overflow-wrap: anywhere; }

/* "When" tile: compact — date and "in X days" on top, then the diagram */
.ev-facts strong.when-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; }
.ev-facts strong.when-top .when-in { font-family: inherit; font-size: .95rem; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.fact-when .tl { padding: 12px 2px 0; }
.fact-when .tl-points { height: 34px; }
.fact-when .tl-points li { padding-top: 4px; }
.fact-when .tl-points time { line-height: 1.1; }
.ev-facts .fact-when .tl-points span { font-size: .68rem; line-height: 1.1; }

/* Quick filter: only where my people are registered */
.reg-filter { padding-inline: 10px 14px; }
.reg-filter .rf-star { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.reg-filter[aria-pressed="true"] .rf-star { fill: #f5b301; stroke: #b07d00; }
.reg-filter[aria-busy="true"] .rf-star { animation: rf-spin 1s linear infinite; }
@keyframes rf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .reg-filter[aria-busy="true"] .rf-star { animation: none; opacity: .5; } }
@media (max-width: 640px) { .reg-filter { min-width: 38px; min-height: 38px; padding: 0; justify-content: center; } }
a.info-btn { text-decoration: none; }
.ev-info p { overflow-wrap: anywhere; }

/* Early registration sits at the bottom of the card, even when the row makes the card taller */
@media (min-width: 561px) {
  .top-card:not(.lead) { grid-template-rows: auto auto 1fr; }
  .top-card:not(.lead) > :is(.reg-cd, .reg-line, .top-foot) { align-self: end; }
}

/* Event page: registration in one tile (status, countdown, deadline, prices, on-site, actions) */
.ev-hero-grid { grid-template-columns: auto 1fr; }
.ev-share { margin-top: 10px; font: inherit; font-size: .85rem; font-weight: 700; color: #fff; background: rgb(255 255 255 / .12); border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.ev-share:hover { background: rgb(255 255 255 / .22); }
:root[data-contrast="high"] .ev-share { color: var(--text); }
.ev-facts.ev-facts3 { grid-template-columns: 1.5fr 1fr 1.7fr; }
.ev-facts .fact-reg { gap: 6px; border-width: 2px; }
.ev-facts .fact-reg.reg-open { border-color: color-mix(in srgb, var(--flag) 60%, var(--border)); background: color-mix(in srgb, var(--flag) 6%, var(--surface)); }
.ev-facts .fact-reg.reg-open > strong { color: var(--flag-ink); }
.fact-reg .reg-when { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.ev-facts .fact-reg .reg-cd-label { font-size: .8rem; font-weight: 800; color: var(--flag-ink); }
.fact-reg .cd.cd-reg { display: flex; gap: 6px; }
.fact-reg .cd.cd-reg > div { display: flex; align-items: baseline; gap: 4px; padding: 3px 9px; border-radius: 8px; background: var(--flag); color: #fff; }
.fact-reg .cd.cd-reg strong { font-size: 1.35rem; color: #fff; }
.ev-facts .fact-reg .cd.cd-reg span { font-size: .75rem; color: #fff; font-weight: 700; }
.ev-facts .fact-reg .reg-dl, .ev-facts .fact-reg .reg-onsite { font-size: .88rem; color: var(--muted); }
.ev-facts .fact-reg .reg-price { font-size: .92rem; color: var(--text); }
.fact-reg .reg-price b { font-family: var(--num); font-weight: 900; }
.fact-reg .reg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.fact-reg .reg-actions .btn-xl { padding: 10px 22px; font-size: 1.05rem; }
@media (max-width: 1000px) {
  .ev-facts.ev-facts3 { grid-template-columns: repeat(2, 1fr); }
  .ev-facts.ev-facts3 .fact-reg { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .ev-facts.ev-facts3 { grid-template-columns: 1fr; }
  .ev-facts.ev-facts3 > li { grid-column: auto; }
}
.ev-facts .fact-reg .reg-actions .btn { font-size: .95rem; color: var(--brand-ink); text-decoration: none; }
.ev-facts .fact-reg .reg-actions .btn.ghost { color: var(--brand); }
.ev-facts .fact-reg .reg-actions .btn-xl { font-size: 1.05rem; background: var(--flag-ink, #b93f06); }

/* Registration: compact at the top, full details lower down */
.ev-facts.ev-facts3 { grid-template-columns: 1.5fr 1fr 1.3fr; }
.ev-facts .fact-reg .reg-cd-label { flex-basis: 100%; }
.ev-facts .fact-reg .reg-actions { align-items: center; }
.ev-facts .fact-reg .reg-actions .linklike { font-size: .85rem; }
.reg-mine { border-top: 1px dashed var(--border); padding-top: 8px; margin-top: 2px; }
.ev-facts .reg-mine span { font-size: .85rem; }
.reg-mine-k { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--text); }
.ev-facts .reg-mine .reg-mine-k { color: var(--text); }
.reg-mine-k svg { width: 18px; height: 18px; fill: #f5b301; stroke: #b07d00; stroke-width: 1.2; }
.reg-mine ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.reg-mine li { font-size: .9rem; }
.ev-facts .reg-mine .pstart, .reg-mine .pstart { font-family: var(--num); font-weight: 900; color: var(--flag-ink); }
.ev-reg-full .reg-status { margin: 0 0 10px; }
.reg-rows { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
.reg-rows dt { color: var(--muted); font-size: .9rem; }
.reg-rows dd { margin: 0; }
.reg-rows b { font-family: var(--num); font-weight: 900; }
.reg-people { border-top: 1px solid var(--border); padding-top: 10px; margin-bottom: 12px; }
.reg-people h3 { margin: 0 0 4px; font-size: 1.05rem; }
.reg-people h4 { margin: 10px 0 6px; font-size: .95rem; }
.reg-people p { margin: 4px 0; }
.ev-facts .reg-mine strong { font-family: inherit; font-size: .95rem; font-weight: 800; line-height: 1.3; color: var(--text); letter-spacing: 0; }
.ev-facts .reg-mine .pstart { background: none; padding: 0; font-size: .9rem; }
@media (max-width: 1000px) {
  .ev-facts.ev-facts3 { grid-template-columns: repeat(2, 1fr); }
  .ev-facts.ev-facts3 .fact-reg { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .ev-facts.ev-facts3 { grid-template-columns: 1fr; }
}

/* Accessibility tools fold into one button */
.a11y-menu { position: relative; }
.a11y-tools[hidden] { display: none; }
.a11y-menu .a11y-tools {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 30; padding: 8px; border-radius: 14px;
  background: var(--forest, #0b3d2e); box-shadow: 0 12px 30px rgb(0 0 0 / .35); display: flex; gap: 6px;
}
.a11y-toggle[aria-expanded="true"] { background: rgb(255 255 255 / .2); }
:root[data-contrast="high"] .a11y-menu .a11y-tools { background: var(--bg); border: 2px solid var(--text); }
@media (max-width: 640px) { .a11y-menu { order: 2; } .a11y-toggle { min-width: 36px; min-height: 36px; } }

/* Distance colour: green close, red far */
.dist .dist-dot { display: inline-block; width: .62em; height: .62em; border-radius: 50%; margin-inline-end: 4px; vertical-align: .05em; background: hsl(var(--dh, 120) 80% 42%); box-shadow: 0 0 0 2px color-mix(in srgb, hsl(var(--dh, 120) 80% 42%) 25%, transparent); }
.top-loc .dist, .ev-facts strong .dist, .dist { color: hsl(var(--dh, 120) 75% 30%); }
:root[data-theme="dark"] .top-loc .dist, :root[data-theme="dark"] .ev-facts strong .dist, :root[data-theme="dark"] .dist { color: hsl(var(--dh, 120) 75% 62%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dist { color: hsl(var(--dh, 120) 75% 62%); } }
:root[data-contrast="high"] .dist { color: var(--text); }

/* Bigger star for my registered people */
.top-bar .ppl-star { width: 42px; height: 42px; }
.top-bar .ppl-star .n { font-size: 1.05rem; }
@media (max-width: 560px) { .top-bar .ppl-star { width: 34px; height: 34px; } .top-bar .ppl-star .n { font-size: .92rem; } }

/* Event names fit one line; the full name is in the tooltip and on the event page */
.top-meta { min-width: 0; }
.top-meta h2, .top-meta h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-meta h2 a, .top-meta h3 a { display: inline; }
/* "My registrations" heads the registration box, only when someone of mine is registered */
.reg-mine:empty { display: none; }
.fact-reg .reg-mine { border-top: 0; padding: 8px 10px; margin: 2px 0 4px; border-radius: 10px; background: color-mix(in srgb, #f5b301 16%, var(--surface)); border: 1px solid color-mix(in srgb, #f5b301 45%, var(--border)); }
.fact-reg .reg-mine ul { gap: 2px 14px; }

/* ---- Polish pass ---- */
/* Header in the forest green of the hero, in both themes */
.site-header { background: var(--forest, #0b3d2e); }
:root[data-contrast="high"] .site-header { background: var(--bg); color: var(--text); }
/* Card register button keeps its contrast in dark mode (system or chosen) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .top-cta { background: #2f8f5f; } }
/* The big register button: a fixed deep orange, so white text reads in both themes */
.ev-facts .fact-reg .reg-actions .btn-xl { background: #c2410c; }
.ev-facts .fact-reg .reg-actions .btn-xl:hover { background: #9a3412; }
/* Titles get the full width: the register button moves to its own row
   (everywhere except the four nearest on phones, which must fit one screen) */
@media (min-width: 561px) {
  .top-card:not(.lead) > .top-head { grid-column: 1 / -1; }
  .top-card:not(.lead) > .top-foot { grid-column: 1 / -1; grid-row: auto; align-self: end; justify-content: space-between; }
}
#eventList .top-card > .top-head { grid-column: 1 / -1; }
#eventList .top-card > .top-foot { grid-column: 1 / -1; grid-row: auto; align-self: end; justify-content: space-between; }
@media (min-width: 561px) {
  .top4 > .top-card:not(.lead) > .top-head { grid-column: 1 / -1; }
  .top4 > .top-card:not(.lead) > .top-foot { grid-column: 1 / -1; grid-row: auto; align-self: end; justify-content: space-between; }
}

/* Waze on the cards */
.waze-link {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 6px; border-radius: 999px;
  background: #33ccff; color: #062a3a; font-weight: 800; font-size: .78rem; text-decoration: none; line-height: 1.5; white-space: nowrap; vertical-align: middle;
}
.waze-link svg { width: 16px; height: 16px; color: #062a3a; }
.waze-link:hover { background: #1fb8ef; }
.waze-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
:root[data-contrast="high"] .waze-link { background: var(--text); color: var(--bg); }
:root[data-contrast="high"] .waze-link svg { color: var(--bg); }
@media (max-width: 560px) { .waze-link { font-size: 0; gap: 0; padding: 3px; } .waze-link svg { width: 18px; height: 18px; } }
/* Waze on the event page: larger, with its label, also on phones */
.waze-link.waze-lg, .ev-facts .waze-link.waze-lg { font-size: .95rem; gap: 6px; padding: 6px 14px 6px 10px; color: #062a3a; text-decoration: none; justify-self: start; align-self: start; }
.waze-link.waze-lg svg { width: 22px; height: 22px; }
@media (max-width: 560px) { .waze-link.waze-lg, .ev-facts .waze-link.waze-lg { font-size: .95rem; gap: 6px; padding: 6px 14px 6px 10px; } .waze-link.waze-lg svg { width: 22px; height: 22px; } }
.ev-actions .waze-link.waze-lg { min-height: 40px; }
.ev-dock .dock-waze { background: #33ccff; color: #062a3a; }
.ev-dock .dock-waze svg { width: 26px; height: 26px; color: #062a3a; }
:root[data-contrast="high"] .ev-dock .dock-waze { background: var(--text); }

/* Card: place + Waze, then the start diagram on its own line */
.top-tl { margin: 4px 0 0; line-height: 1; }
.top-tl .tlm { width: 170px; }
/* Club stays on the top line (it shortens with … if space runs out) */
.top-bar { flex-wrap: nowrap; }
.top-bar .badges { flex: none; flex-wrap: nowrap; }
.top-bar .top-club { min-width: 0; overflow: hidden; }
.top-bar .top-club > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Even bigger star */
.top-bar .ppl-star { width: 52px; height: 52px; margin-block: -6px; }
.top-bar .ppl-star .n { font-size: 1.2rem; }
@media (max-width: 560px) { .top-bar .ppl-star { width: 40px; height: 40px; margin-block: -4px; } .top-bar .ppl-star .n { font-size: 1rem; } }
/* Star tooltip: "רשומים:" heading */
.tip-head { font-weight: 800; color: #fbbf24; margin-bottom: 2px; }
/* Only the register button (no early-registration date): keep it at the end of the row */
.top-foot:has(> .top-cta:only-child) { justify-content: flex-end; }

/* Files on the event page */
.ev-file { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; }
.ev-file:hover { border-color: var(--brand); }
.ev-file .fi { font-size: 1.2rem; flex: none; }
.ev-file .fn { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ev-file .fk { flex: none; font-size: .75rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.ev-file.key { border-width: 2px; border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.ev-file.key.kind-results, .ev-file.key.kind-analysis { border-color: color-mix(in srgb, var(--flag) 60%, var(--border)); background: color-mix(in srgb, var(--flag) 7%, var(--surface)); }

/* Home: latest results */
.recent-results { margin-top: 28px; }
.recent-results h2 { font-family: var(--display); font-size: 2.2rem; line-height: 1; margin: 0 0 12px; }
.rr-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rr-card { display: flex; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); border-inline-start: 6px solid var(--c); box-shadow: var(--shadow); min-width: 0; }
.rr-date { flex: none; display: grid; justify-items: center; align-content: start; min-width: 52px; padding: 6px; border-radius: 12px; background: var(--surface-2); }
.rr-date .day { font-family: var(--num); font-weight: 900; font-size: 1.7rem; line-height: 1; }
.rr-date .mon { font-size: .75rem; color: var(--muted); }
.rr-main { min-width: 0; flex: 1; }
.rr-main h3 { margin: 0 0 8px; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-main h3 a { color: var(--text); text-decoration: none; }
.rr-main h3 a:hover { text-decoration: underline; }
.rr-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rr-files .ev-file { padding: 6px 10px; font-size: .9rem; }
@media (max-width: 900px) { .rr-list { grid-template-columns: 1fr; } }

/* =====================================================================
   Event card as a ticket (approved layout B)
   ===================================================================== */
:is(#top4, #eventList, #hhCard) > .top-card.tk {
  --stub: 92px;
  position: relative; display: grid; grid-template-columns: var(--stub) minmax(0, 1fr); grid-template-rows: none;
  gap: 0; padding: 0; border: 0; border-radius: 20px; overflow: visible; background: var(--surface);
  box-shadow: 0 10px 26px rgb(0 0 0 / .16); min-height: 0;
}
:is(#top4, #eventList, #hhCard) > .top-card.tk.lead { grid-row: auto; grid-column: auto; }
#top4 > .top-card.tk.lead { grid-row: span 3; }
:is(#top4, #eventList, #hhCard) > .top-card.tk > :is(.tk-stub, .tk-body) { position: relative; z-index: auto; grid-row: 1; margin: 0; }
:is(#top4, #eventList, #hhCard) > .top-card.tk > .tk-stub { grid-column: 1; }
:is(#top4, #eventList, #hhCard) > .top-card.tk > .tk-body { grid-column: 2; }
:is(#top4, #eventList, #hhCard) > .top-card.tk > .tk-notch { position: absolute; }

/* date stub, in the discipline's colour */
.top-card.tk .tk-stub {
  background: var(--c); color: #fff; border-radius: 0 20px 20px 0; /* RTL: the stub is on the right */
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 6px 14px;
}
.top-card.tk .tk-stub .top-date { display: grid; justify-items: center; background: none; box-shadow: none; padding: 0; min-width: 0; border-radius: 0; color: #fff; }
.top-card.tk .tk-stub .top-date .dow { color: #fff; font-weight: 800; font-size: .9rem; opacity: .95; }
.top-card.tk .tk-stub .top-date .day { color: #fff; font-family: var(--num); font-weight: 900; font-size: 2.6rem; line-height: 1; letter-spacing: -.03em; }
.top-card.tk .tk-stub .top-date .mon { color: #fff; font-size: .82rem; opacity: .95; }
.top-card.tk .tk-star:empty { display: none; }
.top-card.tk .tk-star .ppl-star { position: relative; inset: auto; top: auto; width: 48px; height: 48px; margin: 0; }
.top-card.tk .tk-star .ppl-star .n { font-size: 1.15rem; }

/* perforation on the seam: a dashed line and two notches */
.top-card.tk::before {
  content: ""; position: absolute; z-index: 3; inset-block: 14px; inset-inline-start: var(--stub);
  border-inline-start: 2px dashed rgb(0 0 0 / .16); pointer-events: none;
}
.top-card.tk .tk-notch { position: absolute; z-index: 3; inset-inline-start: calc(var(--stub) - 9px); width: 18px; height: 18px; border-radius: 50%; background: var(--notch-bg, var(--forest, #0b3d2e)); }
.top-card.tk .tk-notch.t { top: -9px; } .top-card.tk .tk-notch.b { bottom: -9px; }
#eventList > .top-card.tk { --notch-bg: var(--bg); }
#hhCard > .top-card.tk { --notch-bg: var(--bg); }

/* body */
.top-card.tk .tk-body { position: relative; min-width: 0; overflow: hidden; border-radius: 20px 0 0 20px; display: flex; flex-direction: column; gap: 9px; padding: 14px 16px 14px 14px; }
.top-card.tk .tk-body > * { position: relative; z-index: 1; }
.top-card.tk .tk-body > .hud-logo { position: absolute; z-index: 0; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .top-bar {
  position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin: 0; min-height: 26px;
}
.top-card.tk .top-bar .badges { display: flex; gap: 6px; flex: none; margin: 0; }
.top-card.tk .top-bar .badges:empty { display: none; }
.top-card.tk .top-bar .top-club { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: .84rem; font-weight: 800; color: var(--text); }
.top-card.tk .top-bar .top-club > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-card.tk .top-bar .top-club .club-logo { flex: none; }
.top-card.tk :is(h2, h3) { margin: 0; font-size: 1.12rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; }
.top-card.tk :is(h2, h3) a { color: var(--text); text-decoration: none; }
.top-card.tk :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* the whole card opens the event */
.top-card.tk :is(h2, h3) a:hover { text-decoration: underline; }
.top-card.tk .top-when { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: .9rem; color: var(--muted); }
.top-card.tk .top-when:empty { display: none; }
.top-card.tk .top-when .dist { font-family: var(--num); font-weight: 900; font-size: .95rem; }
.top-card.tk .top-tl { margin: 0; }
.top-card.tk .top-tl .tlm { width: min(220px, 100%); }
.top-card.tk .lead-summary { margin: 2px 0 0; font-size: .92rem; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.top-card.tk .waze-link, .top-card.tk .top-cta, .top-card.tk .ppl-star { position: relative; z-index: 2; }

/* compact registration: a dashed rule, the countdown and a small button on one row */
:is(#top4, #eventList, #hhCard) > .top-card.tk .reg-cd {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 0 0; border: 0; border-top: 1px dashed color-mix(in srgb, var(--flag) 45%, var(--border)); border-radius: 0; background: none; box-shadow: none;
}
.top-card.tk .reg-cd .reg-cd-label { margin: 0 0 3px; font-size: .72rem; font-weight: 800; color: var(--flag-ink); }
:is(#top4, #eventList, #hhCard) > .top-card.tk .cd.cd-card { display: flex; gap: 4px; align-items: baseline; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .cd.cd-card > div { display: inline-flex; align-items: baseline; gap: 3px; padding: 0; background: none; box-shadow: none; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .cd.cd-card strong { background: var(--flag); color: #fff; border-radius: 6px; padding: 0 6px; font-size: .95rem; line-height: 1.5; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .cd.cd-card span { font-size: .68rem; font-weight: 700; color: var(--flag-ink); margin-inline-end: 3px; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .top-cta { padding: 5px 12px; font-size: .84rem; box-shadow: none; flex: none; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .reg-line { margin: auto 0 0; padding: 8px 0 0; border-top: 1px dashed var(--border); background: none; border-radius: 0; font-size: .82rem; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .top-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--border); font-size: .82rem; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .top-foot:has(> .top-cta:only-child) { justify-content: flex-end; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .reg-line + .top-foot { border-top: 0; padding-top: 0; margin-top: 4px; }

/* league and "my club" accents */
.top-card.tk.is-league { box-shadow: 0 0 0 2px #f5b301, 0 10px 26px rgb(0 0 0 / .16); }
.top-card.tk.is-mine .tk-body { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 5%, var(--surface)), var(--surface) 60%); }

/* the lead card: bigger name and its blurb */
#top4 > .top-card.tk.lead { --stub: 120px; }
#top4 > .top-card.tk.lead .tk-stub .top-date .day { font-size: 3.6rem; }
#top4 > .top-card.tk.lead .tk-body { padding: 20px 22px 18px 18px; gap: 12px; }
#top4 > .top-card.tk.lead h2 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); white-space: normal; }

/* phones */
@media (max-width: 560px) {
  :is(#top4, #eventList, #hhCard) > .top-card.tk, #top4 > .top-card.tk.lead { --stub: 70px; border-radius: 16px; }
  .top-card.tk .tk-stub { padding: 10px 4px; border-radius: 0 16px 16px 0; gap: 6px; }
  .top-card.tk .tk-body { border-radius: 16px 0 0 16px; padding: 10px 12px 10px 10px; gap: 6px; }
  .top-card.tk .tk-stub .top-date .day, #top4 > .top-card.tk.lead .tk-stub .top-date .day { font-size: 2rem; }
  .top-card.tk .tk-stub .top-date .dow { font-size: .78rem; }
  .top-card.tk .tk-stub .top-date .mon { font-size: .72rem; }
  .top-card.tk .tk-star .ppl-star { width: 36px; height: 36px; }
  .top-card.tk .tk-star .ppl-star .n { font-size: .95rem; }
  .top-card.tk :is(h2, h3), #top4 > .top-card.tk.lead h2 { font-size: 1rem; white-space: nowrap; }
  .top-card.tk .mine-pill .mine-tx { display: none; }
  .top-card.tk .top-bar .badges .pill { font-size: .72rem; padding: 2px 7px; }
  .top-card.tk .lead-summary { display: none; }
  :is(#top4, #eventList, #hhCard) > .top-card.tk .reg-cd, :is(#top4, #eventList, #hhCard) > .top-card.tk .top-foot { padding-top: 6px; }
}
:root[data-contrast="high"] .top-card.tk .tk-stub { background: var(--text); color: var(--bg); }
:root[data-contrast="high"] .top-card.tk .tk-stub .top-date :is(.dow, .day, .mon) { color: var(--bg); }
/* ticket fixes: full-height stub, one-row registration, no empty rows */
:is(#top4, #eventList, #hhCard) > .top-card.tk { align-items: stretch; align-content: stretch; grid-template-rows: minmax(0, 1fr); }
:is(#top4, #eventList, #hhCard) > .top-card.tk > :is(.tk-stub, .tk-body) { align-self: stretch; height: auto; }
.top-card.tk .tk-body > :is(.reg-cd, .reg-line, .top-foot) { align-self: stretch; width: auto; max-width: none; justify-self: auto; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .reg-cd { flex-wrap: nowrap; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .reg-cd .reg-cd-main { min-width: 0; display: block; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .top-bar:not(:has(.pill, .top-club, .ppl-star)) { display: none; }
@media (max-width: 560px) {
}
:is(#top4, #eventList, #hhCard) > .top-card.tk .tk-body > :is(.reg-cd, .reg-line, .top-foot) { align-self: stretch; width: auto; justify-self: auto; grid-column: auto; grid-row: auto; }
/* "הרשמה מוקדמת עוד [3 ימים]" on one row */
:is(#top4, #eventList, #hhCard) > .top-card.tk .reg-cd .reg-cd-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .reg-cd .reg-cd-label { margin: 0; font-size: .8rem; display: block; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .cd.cd-card strong { font-size: 1rem; padding: 0 7px; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .cd.cd-card span { font-size: .78rem; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .reg-cd .reg-cd-main { flex-wrap: nowrap; }
:is(#top4, #eventList, #hhCard) > .top-card.tk .reg-cd .reg-cd-label { white-space: nowrap; }
@media (max-width: 560px) {
  :is(#top4, #eventList, #hhCard) > .top-card.tk .reg-cd { gap: 6px; }
  :is(#top4, #eventList, #hhCard) > .top-card.tk .reg-cd .reg-cd-main { gap: 4px; }
  :is(#top4, #eventList, #hhCard) > .top-card.tk .reg-cd .reg-cd-label { font-size: .72rem; }
  :is(#top4, #eventList, #hhCard) > .top-card.tk .cd.cd-card strong { font-size: .9rem; padding: 0 5px; }
  :is(#top4, #eventList, #hhCard) > .top-card.tk .cd.cd-card span { font-size: .7rem; margin: 0; }
  :is(#top4, #eventList, #hhCard) > .top-card.tk .top-cta { padding: 4px 10px; font-size: .78rem; }
}
/* Narrow cards: the register button beside the countdown shrinks to its arrow */
.top-card.tk .tk-body { container-type: inline-size; container-name: tkbody; }
@container tkbody (max-width: 300px) {
  .reg-cd .top-cta { width: 34px; height: 34px; padding: 0 !important; display: inline-grid; place-items: center; border-radius: 50%; font-size: 1rem !important; }
  .reg-cd .top-cta .cta-tx { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@container tkbody (max-width: 240px) {
  .reg-cd .reg-cd-main { flex-wrap: wrap !important; }
  .reg-cd .reg-cd-label { white-space: normal !important; }
}

/* =====================================================================
   Motion. Everything here is off under prefers-reduced-motion
   (the global rule near the top also stops all animation then).
   ===================================================================== */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-snap: cubic-bezier(.3, 1.4, .5, 1); }
@media (prefers-reduced-motion: no-preference) {
  /* Cards rise in, staggered, the first time they appear */
  .top-card.tk.is-new { animation: tk-in .52s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms - var(--t0, 0ms)); }
  @keyframes tk-in { from { opacity: 0; transform: translateY(16px) scale(.985); } }
  /* ...the date stub attaches from the outer edge (right, in RTL) */
  .top-card.tk.is-new .tk-stub { animation: tk-stub .58s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms + 70ms - var(--t0, 0ms)); }
  @keyframes tk-stub { from { transform: translateX(14px); opacity: .3; } }
  /* ...and the start window fills from the first start (right) */
  .top-card.tk.is-new :is(.tlm-win, .tlm-run) { transform-origin: right center; animation: tl-fill .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms + 220ms - var(--t0, 0ms)); }
  .top-card.tk.is-new .tlm-run { animation-delay: calc(var(--i, 0) * 60ms + 380ms - var(--t0, 0ms)); }
  @keyframes tl-fill { from { transform: scaleX(0); } }
  /* the event page's race-day diagram fills the same way */
  .view-in .fact-when :is(.tl-window, .tl-run) { transform-origin: right center; animation: tl-fill .8s var(--ease-out) both .15s; }
  .view-in .fact-when .tl-run { animation-delay: .35s; }

  /* A lift under the pointer (devices with hover only) */
  @media (hover: hover) {
    .top-card.tk { transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out); }
    .top-card.tk:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgb(0 0 0 / .22); }
    .top-card.tk.is-league:hover { box-shadow: 0 0 0 2px #f5b301, 0 18px 36px rgb(0 0 0 / .22); }
    .top-card.tk:hover .tk-stub { filter: saturate(1.15) brightness(1.04); }
    .top-card.tk .tk-stub { transition: filter .28s; }
  }
  /* Presses answer the finger */
  :is(.top-cta, .btn, .waze-link, .df-btn, .chip, .icon-btn) { transition: transform .12s var(--ease-out), background-color .15s, border-color .15s, color .15s; }
  :is(.top-cta, .btn, .waze-link, .df-btn, .chip, .icon-btn):active { transform: scale(.95); }

  /* The last day of early registration: the countdown chip pulses */
  .cd.urgent strong { animation: urgent 2.4s ease-in-out infinite; }
  @keyframes urgent { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--flag) 55%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

  /* Screens fade in when opened */
  .view.view-in { animation: view-in .34s var(--ease-out); }
  @keyframes view-in { from { opacity: 0; } } /* opacity only: a transform would unpin the fixed phone dock */

  /* Dialogs lift in over a fading backdrop */
  :is(.people-dialog, .help-dialog)[open] { animation: dlg-in .28s var(--ease-out); }
  :is(.people-dialog, .help-dialog, .lightbox)[open]::backdrop { animation: fade-in .25s ease-out; }
  @keyframes dlg-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
  @keyframes fade-in { from { opacity: 0; } }

  /* Search panel, tooltip, toast */
  #filters:not([hidden]) { animation: drop-in .24s var(--ease-out); }
  @keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } }
  .tip:not([hidden]) { animation: fade-in .12s ease-out; }
  .a11y-tools:not([hidden]) { animation: drop-in .2s var(--ease-out); }

  /* "Latest results" cards follow the same entrance */
  .rr-card { animation: tk-in .5s var(--ease-out) both; }
  .rr-card:nth-child(2) { animation-delay: 60ms; } .rr-card:nth-child(3) { animation-delay: 120ms; }
}
@media (prefers-reduced-motion: no-preference) {
  .toast:not([hidden]) { animation: toast-in .26s var(--ease-out); }
  @keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
}
/* Start times as text where the diagram is hidden (the four nearest on phones) */
.top-card.tk .start-alt { display: none; }
.top-card.tk .start-time { color: var(--text); font-family: var(--num); font-weight: 900; font-size: .9rem; }
/* Phones: the diagram is back in the four nearest (it replaces the text line) */
@media (max-width: 560px) {
}
@media (max-width: 560px) {
  /* distance + Waze and the diagram share one row */
}
@media (max-width: 560px) {
}

/* The four nearest use the very same card as the rest (no lead variant, no phone shortcuts) */
#top4.top4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; gap: 14px; }
@media (max-width: 700px) { #top4.top4 { grid-template-columns: 1fr; gap: 10px; } }

/* "ניווט ישראל" in the headings' display face */
.brand { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1; letter-spacing: .01em; }
@media (max-width: 640px) { .brand { font-size: 1.75rem; } }
/* Phones: breathing room between the filters and the cards */
@media (max-width: 640px) {
  .hero-head { margin-bottom: 16px; }
  .hero-head .hero-title { margin-bottom: 0; }
  .filters { margin-bottom: 18px; }
  .list-head { margin-bottom: 12px; }
}

/* ---- Loading: skeleton tickets with a shimmer ---- */
.top-card.tk.sk { pointer-events: none; }
.top-card.tk.sk .tk-stub { background: color-mix(in srgb, var(--brand) 55%, var(--surface-2)); justify-content: flex-start; gap: 8px; padding-top: 20px; }
.top-card.tk.sk .tk-body { gap: 12px; min-height: 150px; }
.sk-line { display: block; height: 11px; border-radius: 6px; background: var(--surface-2); position: relative; overflow: hidden; }
.sk-line.h { height: 18px; }
.sk-line.thin { height: 8px; margin-top: 6px; }
.sk-line.foot { height: 26px; border-radius: 999px; margin-top: auto; }
.sk-line.inv { background: rgb(255 255 255 / .35); height: 10px; }
.tk-stub .sk-line.h { height: 30px; }
.w30 { width: 30%; } .w45 { width: 45%; } .w55 { width: 55%; } .w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; }
.tk-stub .sk-line { margin-inline: auto; }
@media (prefers-reduced-motion: no-preference) {
  .sk-line::after {
    content: ""; position: absolute; inset: 0; transform: translateX(100%);
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / .55), transparent);
    animation: sk-shimmer 1.3s ease-in-out infinite;
  }
  .sk-line.inv::after { background: linear-gradient(90deg, transparent, rgb(255 255 255 / .45), transparent); }
  /* the shimmer sweeps right to left, the reading direction; cards start a beat apart */
  @keyframes sk-shimmer { to { transform: translateX(-100%); } }
  .top-card.tk.sk:nth-child(3) .sk-line::after { animation-delay: .12s; }
  .top-card.tk.sk:nth-child(4) .sk-line::after { animation-delay: .24s; }
  .top-card.tk.sk:nth-child(5) .sk-line::after { animation-delay: .36s; }
  .top-card.tk.sk { animation: sk-breathe 2.6s ease-in-out infinite; }
  @keyframes sk-breathe { 50% { opacity: .82; } }
}
:root[data-theme="dark"] .sk-line::after { background: linear-gradient(90deg, transparent, rgb(255 255 255 / .12), transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sk-line::after { background: linear-gradient(90deg, transparent, rgb(255 255 255 / .12), transparent); } }

/* =====================================================================
   Ranking (#ranking): one bar per competitor, my people in the brand colour
   ===================================================================== */
:root { --rk-bar: #84918a; --rk-mine: var(--brand); }
:root[data-theme="dark"] { --rk-bar: #66766e; --rk-mine: #3fb07a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rk-bar: #66766e; --rk-mine: #3fb07a; } }
:root[data-contrast="high"] { --rk-bar: var(--muted); --rk-mine: var(--text); }

.rk-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 4px 0 14px; }
.rk-field { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); font-weight: 700; }
.rk-field select { min-width: 150px; min-height: 42px; }
.rk-leagues button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }

.rk-mine-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.rk-mine-list li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 2px solid var(--rk-mine); box-shadow: var(--shadow); }
.rk-mine-name { font-weight: 800; }
.rk-mine-place b, .rk-mine-pts b { font-family: var(--num); font-weight: 900; font-size: 1.5rem; }
.rk-mine-place { color: var(--muted); }

.rk-section { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.rk-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.rk-sec-head h2 { margin: 0; font-family: var(--display); font-size: 1.9rem; line-height: 1; }
.rk-sec-head p { margin: 0; }
.rk-sec-head .rk-view { margin-inline-start: auto; }

.rk-chart { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rk-row { display: grid; grid-template-columns: 2.2em minmax(110px, 13em) minmax(0, 1fr) 4.2em; align-items: center; gap: 10px; padding: 3px 6px; border-radius: 8px; }
.rk-row:hover { background: var(--surface-2); }
.rk-rank { font-family: var(--num); font-weight: 900; color: var(--muted); text-align: center; }
.rk-who { display: grid; min-width: 0; line-height: 1.2; }
.rk-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-club { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-bar { position: relative; height: 14px; border-radius: 0 4px 4px 0; cursor: help; outline-offset: 3px; }
.rk-fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 4px 0 0 4px; background: var(--rk-bar); min-width: 2px; } /* RTL: anchored at the right, rounded at the data end */
.rk-val { font-family: var(--num); font-weight: 800; font-size: .9rem; color: var(--text); text-align: end; font-variant-numeric: tabular-nums; }
.rk-row.mine { background: color-mix(in srgb, var(--rk-mine) 10%, transparent); }
.rk-row.mine .rk-fill { background: var(--rk-mine); }
.rk-row.mine .rk-name { font-weight: 900; }
.rk-row.mine .rk-rank { color: var(--text); }
.rk-star { color: #f5b301; margin-inline-end: 4px; }
.rk-gap { list-style: none; padding: 2px 6px 2px 0; color: var(--muted); font-size: .8rem; text-align: center; }

.rk-table { margin-top: 14px; }
.rk-table summary { cursor: pointer; font-weight: 800; color: var(--brand); }
.rk-table .table-wrap { overflow-x: auto; margin-top: 8px; }
.rk-table table { border-collapse: collapse; width: 100%; font-size: .85rem; }
.rk-table :is(th, td) { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: start; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rk-table thead th { font-size: .75rem; color: var(--muted); }
.rk-table tr.mine { background: color-mix(in srgb, var(--rk-mine) 12%, transparent); }
.rk-table tbody th { font-weight: 700; }
.rk-skeleton { display: grid; gap: 10px; padding: 16px 0; }
.rk-skeleton .sk-line { height: 16px; }
.rk-skeleton .sk-line:nth-child(odd) { width: 80%; } .rk-skeleton .sk-line:nth-child(even) { width: 60%; }

@media (max-width: 640px) {
  .rk-controls { gap: 10px; }
  .rk-field { flex: 1 1 140px; } .rk-field select { min-width: 0; width: 100%; }
  .rk-row { grid-template-columns: 1.8em minmax(84px, 8.5em) minmax(0, 1fr) 3.4em; gap: 8px; padding-inline: 2px; }
  .rk-val { font-size: .8rem; }
  .rk-section { padding: 12px; }
  .rk-sec-head .rk-view { margin-inline-start: 0; }
}
/* Quick picks: categories where my people are */
.rk-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -4px 0 12px; }
.rk-quick-k { font-size: .85rem; font-weight: 700; color: var(--muted); }
.rk-quick .chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

/* ---- Ranking: "by event" dot strip ---- */
.es { --es-1: #2a78d6; --es-2: #eb6834; --es-3: #1baf7a; --es-more: #3f4743; --es-field: color-mix(in srgb, var(--text) 30%, transparent); --es-h: 210px;
  margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
:root[data-theme="dark"] .es { --es-1: #3987e5; --es-2: #d95926; --es-3: #199e70; --es-more: #b9c2bd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .es { --es-1: #3987e5; --es-2: #d95926; --es-3: #199e70; --es-more: #b9c2bd; } }
.es figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.es figcaption h3 { margin: 0; font-size: 1.1rem; }
.es-legend { list-style: none; margin: 8px 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; }
.es-legend li { display: inline-flex; align-items: center; gap: 6px; }
.es-key { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.es-key.s1 { background: var(--es-1); } .es-key.s2 { background: var(--es-2); } .es-key.s3 { background: var(--es-3); } .es-key.s-more { background: var(--es-more); }
.es-key.s-hollow { background: var(--surface); box-shadow: inset 0 0 0 2.5px var(--muted); }
.es-key.s-field { width: 7px; height: 7px; background: var(--es-field); }
.es-key.s-med { width: 14px; height: 2px; border-radius: 1px; background: var(--text); }
.es-scroll { overflow-x: auto; padding-bottom: 4px; }
.es-plot { position: relative; display: grid; grid-template-columns: 3.2em 1fr; min-width: calc(3.2em + var(--n) * 64px); }
.es-axis { position: relative; height: var(--es-h); }
.es-axis span { position: absolute; inset-inline-end: 6px; transform: translateY(50%); font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.es-grid { position: absolute; inset-block-start: 0; height: var(--es-h); inset-inline: 3.2em 0; pointer-events: none; }
.es-grid i { position: absolute; inset-inline: 0; height: 1px; background: var(--border); }
.es-cols { display: grid; grid-template-columns: repeat(var(--n), minmax(56px, 1fr)); }
.es-col { display: grid; grid-template-rows: var(--es-h) auto; min-width: 0; }
.es-track { position: relative; border-inline-start: 1px dashed color-mix(in srgb, var(--border) 70%, transparent); }
.es-dot { position: absolute; left: calc(50% + var(--jx, 0px)); width: 6px; height: 6px; margin: 0 0 -3px -3px; border-radius: 50%; background: var(--es-field); }
.es-med { position: absolute; left: 50%; width: 26px; height: 2px; margin: 0 0 -1px -13px; background: var(--text); border-radius: 1px; }
.es-me { position: absolute; left: calc(50% + var(--jx, 0px)); width: 13px; height: 13px; margin: 0 0 -6.5px -6.5px; border-radius: 50%; cursor: help; z-index: 2;
  background: var(--surface); box-shadow: inset 0 0 0 2.5px var(--c), 0 0 0 2px var(--surface); }
.es-me.counted { background: var(--c); }
.es-me.s1 { --c: var(--es-1); } .es-me.s2 { --c: var(--es-2); } .es-me.s3 { --c: var(--es-3); } .es-me.s-more { --c: var(--es-more); }
.es-me:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.es-lbl { display: block; padding: 6px 2px 0; font-size: .72rem; line-height: 1.25; text-align: center; color: var(--muted); text-decoration: none;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.es-lbl:hover { color: var(--brand); text-decoration: underline; }
:root[data-contrast="high"] .es { --es-field: var(--muted); }
.es-plot { padding-top: 10px; }
.es-axis, .es-grid { margin-top: 10px; }
.es-grid { inset-block-start: 10px; margin-top: 0; }

/* help: the star's tooltip shown open on the sample card */
.hh-tip { position: static; width: max-content; margin: 10px auto 0; pointer-events: none; }
.hh-stage.wide .hh-tip { position: absolute; z-index: 3; margin: 0; }
.hh-stage.wide:has(.hh-tip) { padding-bottom: 64px; }

/* forum: what is new since the last visit */
.tab-new {
  display: inline-block; vertical-align: 1px; margin-inline-start: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--flag, #f26a1b); color: #fff; font: 800 .7rem/18px var(--num, inherit); text-align: center; box-shadow: 0 0 0 2px var(--surface, #fff);
}
@media (prefers-reduced-motion: no-preference) { .tab-new { animation: star-pop .35s cubic-bezier(.3, 1.6, .5, 1); } }
.forum-new {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 8px 0 12px; padding: 10px 14px;
  border-radius: 12px; background: color-mix(in srgb, var(--flag, #f26a1b) 10%, var(--surface, #fff)); border: 1px solid color-mix(in srgb, var(--flag, #f26a1b) 35%, transparent);
}
.forum-new[hidden] { display: none; }
.new-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--flag, #f26a1b); margin-inline-end: 6px; vertical-align: middle; }
.pill.new { background: var(--flag, #f26a1b); color: #fff; border-color: transparent; font-weight: 800; }
.topic.is-new > details > summary { box-shadow: inset -4px 0 0 var(--flag, #f26a1b); }
.reply-list li.new-reply { background: color-mix(in srgb, var(--flag, #f26a1b) 8%, transparent); border-radius: 8px; box-shadow: inset -3px 0 0 var(--flag, #f26a1b); }
:root[data-contrast="high"] .pill.new, :root[data-contrast="high"] .tab-new { background: var(--text); color: var(--bg); }

/* ticket card: league / championship under the date */
.top-card.tk .tk-kind { display: grid; gap: 4px; justify-items: center; }
.top-card.tk .tk-kind > span {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: var(--gold); color: var(--gold-ink); font-size: .74rem; font-weight: 900; line-height: 1.5; box-shadow: 0 2px 6px rgb(0 0 0 / .2);
}
.top-card.tk .tk-kind > span > span { font-size: .8em; }
:root[data-contrast="high"] .top-card.tk .tk-kind > span { background: var(--bg); color: var(--text); }
@media (max-width: 560px) { .top-card.tk .tk-kind > span { padding: 1px 6px; font-size: .68rem; } }
.top-card.tk .tk-stub:has(.tk-kind) { justify-content: flex-start; }
.top-card.tk .tk-stub:has(.tk-kind) .tk-star { margin-top: auto; }

/* registered: no early-registration countdown and no register button (the event page's full section keeps them) */
#ev-reg.is-registered .reg-when, #ev-reg.is-registered .reg-actions .btn { display: none; }
:is(#top4, #eventList) > .top-card.is-registered :is(.reg-cd, .top-foot) { display: none; }
.top-card.tk .tk-kind > .tk-kind-sprint { background: #e0f2fe; color: #075985; }
.top-card.tk .tk-kind > .tk-kind-relay { background: #ede9fe; color: #5b21b6; }
.top-card.tk .tk-kind > .tk-kind-champ { background: #fff; color: #9a3412; }

/* ticket card: the name at the top (up to two lines), the organising club under it, a thin rule, then where and when */
.top-card.tk .tk-body { align-content: start; }
.top-card.tk :is(h2, h3), #top4 > .top-card.tk.lead :is(h2, h3) {
  white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; text-overflow: clip;
}
.top-card.tk .tk-club { display: flex; align-items: center; gap: 8px; min-width: 0; margin: -6px 0 0; font-size: .84rem; font-weight: 800; color: var(--muted); }
.top-card.tk .tk-club-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.top-card.tk .tk-club .pill { flex: none; }
.top-card.tk .tk-sep { border: 0; border-top: 1px solid var(--line, rgb(0 0 0 / .1)); margin: 0; width: 100%; }

/* competition kind: top left of the card, beside the name */
.top-card.tk .tk-head { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.top-card.tk .tk-head > :is(h2, h3) { flex: 1; min-width: 0; }
.top-card.tk .tk-head .tk-kind { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; flex: none; max-width: 45%; margin-top: 2px; }
.top-card.tk .tk-head .tk-kind > span { box-shadow: none; }
.top-card.tk .tk-head .tk-kind > .tk-kind-champ { border: 1px solid #fdba74; }

/* Ticket perforation as real holes: the two halves are masked at the seam and the shadow follows their shape
   (a drop-shadow on the card instead of a box-shadow), so nothing is painted over the shadow. RTL: the stub is on the right. */
:is(#top4, #eventList, #hhCard) > .top-card.tk {
  --hole: 9px;
  --sh: drop-shadow(0 10px 13px rgb(0 0 0 / .16));
  background: none; box-shadow: none; filter: var(--sh);
}
:is(#top4, #eventList, #hhCard) > .top-card.tk.is-league {
  box-shadow: none;
  filter: drop-shadow(0 0 .6px #f5b301) drop-shadow(0 0 .6px #f5b301) drop-shadow(0 0 .6px #f5b301) var(--sh);
}
:is(#top4, #eventList, #hhCard) > .top-card.tk > .tk-notch { display: none; }
.top-card.tk .tk-body:not(:where(.is-mine *)) { background: var(--surface); }
.top-card.tk .tk-body {
  -webkit-mask: radial-gradient(circle at 100% 0, #0000 var(--hole), #000 calc(var(--hole) + .5px)) top / 100% 51% no-repeat,
                radial-gradient(circle at 100% 100%, #0000 var(--hole), #000 calc(var(--hole) + .5px)) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle at 100% 0, #0000 var(--hole), #000 calc(var(--hole) + .5px)) top / 100% 51% no-repeat,
                radial-gradient(circle at 100% 100%, #0000 var(--hole), #000 calc(var(--hole) + .5px)) bottom / 100% 51% no-repeat;
}
.top-card.tk .tk-stub {
  -webkit-mask: radial-gradient(circle at 0 0, #0000 var(--hole), #000 calc(var(--hole) + .5px)) top / 100% 51% no-repeat,
                radial-gradient(circle at 0 100%, #0000 var(--hole), #000 calc(var(--hole) + .5px)) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle at 0 0, #0000 var(--hole), #000 calc(var(--hole) + .5px)) top / 100% 51% no-repeat,
                radial-gradient(circle at 0 100%, #0000 var(--hole), #000 calc(var(--hole) + .5px)) bottom / 100% 51% no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  :is(#top4, #eventList, #hhCard) > .top-card.tk { transition: transform .28s var(--ease-out), filter .28s var(--ease-out); }
  :is(#top4, #eventList, #hhCard) > .top-card.tk:hover { box-shadow: none; --sh: drop-shadow(0 18px 18px rgb(0 0 0 / .22)); }
  :is(#top4, #eventList, #hhCard) > .top-card.tk.is-league:hover { box-shadow: none; }
}

/* name: the place on the first line, the calendar's description on the second; kinds in the club row, on the left */
.top-card.tk :is(h2, h3) .tk-place, .top-card.tk :is(h2, h3) .tk-desc { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-card.tk :is(h2, h3):has(.tk-place) { display: block; -webkit-line-clamp: unset; line-clamp: none; }
.top-card.tk :is(h2, h3) .tk-desc { font-size: .9em; font-weight: 700; color: var(--muted); }
.top-card.tk .tk-club .tk-kind { display: flex; flex-wrap: nowrap; gap: 4px; flex: none; margin: 0; margin-inline-start: auto; max-width: none; }
.top-card.tk .tk-club .tk-kind > span { box-shadow: none; }
.top-card.tk .tk-club .tk-kind > .tk-kind-champ { border: 1px solid #fdba74; }

/* kinds on the place line: floated to the left, so only the first line of the name makes room for them */
.top-card.tk .tk-head { display: block; }
.top-card.tk .tk-head::after { content: ""; display: block; clear: both; }
.top-card.tk .tk-head > .tk-kind { float: left; display: flex; gap: 4px; margin: 3px 8px 2px 0; max-width: 60%; flex-wrap: wrap; justify-content: flex-end; }
.top-card.tk .tk-head > .tk-kind > span { box-shadow: none; }
.top-card.tk .tk-head > .tk-kind > .tk-kind-champ { border: 1px solid #fdba74; }
.top-card.tk .tk-head > :is(h2, h3):has(.tk-place) { overflow: visible; }
.top-card.tk .tk-head > .tk-kind { margin: 2px 8px 0 0; }
.top-card.tk .tk-head > .tk-kind > span { padding: 0 7px; line-height: 1.45; }

/* brand: the association's logo, mirrored, on a white tile (the JPG has a white background) */
.brand-logo { width: 36px; height: 38px; object-fit: contain; transform: scaleX(-1); background: #fff; border-radius: 8px; padding: 2px; box-shadow: 0 1px 4px rgb(0 0 0 / .2); flex: none; }
.brand-flag[hidden], .brand-logo[hidden] { display: none; }
@media (max-width: 560px) { .brand-logo { width: 30px; height: 32px; } }
