:root {
  --bg: #f6f8f5;
  --bg-elev: #edf2ee;
  --surface: #ffffff;
  --bg-header: rgba(246, 248, 245, 0.86);
  --ink: #10201a;
  --muted: #5a6b63;
  --line: #e0e8e2;
  --accent: #0d8a5e;
  --accent-strong: #0b6b4d;
  --accent-soft: #e0f3e8;
  --lime: #c9f25c;
  --shadow: 0 1px 2px rgba(16, 40, 30, 0.04), 0 8px 24px rgba(16, 40, 30, 0.06);
  --shadow-soft: 0 1px 2px rgba(16, 40, 30, 0.04);
  --radius: 18px;
  --font-ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-logo: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-title: "Plus Jakarta Sans", system-ui, sans-serif;
  --sporza: #c8102e;
  --wielerflits: #d97706;
  --nos: #c4122f;
  --cyclingnews: #0f766e;
  --veldritkrant: #2f6b3a;
  --cyclocross24: #1f9e74;
  --indeleiderstrui: #1d4ed8;
  --hln: #9f1239;
  --wielerrevue: #7c3aed;
  --wielerkrant: #0369a1;
  --ad: #005ca9;
  --cyclingmagazine: #b45309;
  --logo-ink: #10201a;
  --logo-accent: #0d8a5e;
  --thumb-bg: #e6ede8;
}

[data-theme="dark"] {
  --bg: #0b1210;
  --bg-elev: #15201c;
  --surface: #111b17;
  --bg-header: rgba(11, 18, 16, 0.84);
  --ink: #e9f3ee;
  --muted: #92a59b;
  --line: #22322b;
  --accent: #4be3a0;
  --accent-strong: #7cf0bd;
  --accent-soft: #12321f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3);
  --logo-ink: #e9f3ee;
  --logo-accent: #4be3a0;
  --thumb-bg: #1a2621;
  --sporza: #f0566b;
  --nos: #f0566b;
  --cyclingnews: #2dd4bf;
  --veldritkrant: #6fcf7f;
  --indeleiderstrui: #7ea6ff;
  --hln: #f47a9a;
  --wielerrevue: #b494ff;
  --wielerkrant: #4fb8f0;
  --ad: #5aa7f0;
  --wielerflits: #f5a524;
  --cyclingmagazine: #e7a04a;
}

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

html {
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

[data-theme="dark"] body {
  background:
    radial-gradient(1200px 400px at 10% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
}

a {
  color: inherit;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-header);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 8px;
}

.brand {
  text-decoration: none;
  display: block;
}

.logo {
  font-family: var(--font-logo);
  font-size: clamp(1.4rem, 2.4vw, 1.7rem);
  letter-spacing: -0.035em;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--logo-ink);
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: block;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(13, 138, 94, 0.25);
}

.wordmark b {
  font-weight: 800;
}

.wordmark span {
  font-weight: 400;
  color: var(--logo-accent);
}

.tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.updated {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.search {
  position: relative;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.select-wrap {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  max-width: 11.5rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 28px 9px 12px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  outline: none;
}

.lang-wrap select {
  max-width: 6.2rem;
  padding-left: 10px;
}

.select-wrap select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.search input {
  width: min(280px, 46vw);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 14px 9px 38px;
  font: inherit;
  font-size: 0.92rem;
  outline: none;
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:hover,
.filter:hover {
  border-color: var(--accent);
}

.search-toggle {
  display: none;
}

.search-toggle .icon-close {
  display: none;
}

.filter-short {
  display: none;
}

.filters-wrap {
  position: relative;
  margin: 0 -4px;
  padding: 0 0 10px;
}

.filters-wrap::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 10px;
  width: 36px;
  background: linear-gradient(to right, transparent, var(--bg-header));
  pointer-events: none;
  z-index: 1;
}

.filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-group {
  display: flex;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 6px;
}

.filter-group + .filter-group {
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.filter {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}

.filter.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.races {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px 0 0;
}

@media (min-width: 760px) {
  .races {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: stretch;
  }

  .race-next,
  .race-wins {
    grid-column: 1 / -1;
  }

  .countdown-grid {
    max-width: 28rem;
    gap: 10px;
  }

  .countdown-grid .num {
    font-size: 1.75rem;
  }
}

.race-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 20, 40, 0.04);
  padding: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.card-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.card-toggle:hover .chevron,
.card-toggle:focus-visible .chevron {
  color: var(--accent);
  opacity: 1;
}

.card-summary {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.card-kicker {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
}

.card-headline {
  display: block;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
}

.card-sub {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.chevron {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 1px;
  color: var(--muted);
  opacity: 0.85;
  transition: transform 0.2s ease, color 0.15s ease;
  display: grid;
  place-items: center;
}

.chevron svg {
  display: block;
}

.is-open > .card-toggle .chevron {
  transform: rotate(180deg);
}

.winner-rows,
.lead-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  width: 100%;
  min-width: 0;
}

.winner-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 12px;
}

.winner-row,
.lead-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
}

.winner-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.winner-row .gender-label {
  min-width: 0;
  white-space: nowrap;
}

.winner-row .rider {
  display: flex;
  width: 100%;
  max-width: 100%;
}

.gender-label {
  flex: 0 0 auto;
  min-width: 4.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.winner-name,
.lead-who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.lead-row {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px 8px;
  align-items: center;
}

.comp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.lead-who {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
}

.gender-mark {
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.rider {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  min-width: 0;
}

.rider .winner-name,
.rider .rider-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flag {
  display: inline-block;
  width: 1.15em;
  height: 0.86em;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center;
  border-radius: 2px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent);
  background: var(--bg-elev);
  vertical-align: middle;
}

.card-body {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-body[hidden] {
  display: none;
}

.stand-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 4px;
}

.stand-tabs::-webkit-scrollbar {
  display: none;
}

.stand-tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 8px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.stand-tab.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.standings-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.race-next {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 70%, var(--bg)) 0%, var(--bg) 72%);
  box-shadow: var(--shadow);
}

.race-next .card-toggle {
  padding: 14px 14px 8px;
  align-items: flex-start;
}

.race-next .card-kicker {
  font-size: 0.7rem;
}

.race-next .card-headline {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
}

.race-next .card-headline .quiet {
  font-weight: 600;
  color: var(--muted);
}

.race-next.is-live .card-kicker {
  color: var(--accent);
}

.race-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.race-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

.race-title a {
  text-decoration: none;
}

.race-title a:hover,
.race-title a:focus-visible {
  color: var(--accent);
}

.race-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 4px;
}

.result-col h3 {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.result-col h3 a {
  color: inherit;
  text-decoration: none;
}

.result-col h3 a:hover {
  color: var(--accent);
}

.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.result-list li {
  display: grid;
  grid-template-columns: 1.2rem 1fr auto;
  gap: 6px;
  align-items: center;
  font-size: 0.8rem;
  line-height: 1.35;
  padding: 1px 0;
}

.result-list .pos {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.result-list .who {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.result-list .who .rider {
  max-width: 100%;
}

.result-list .gap {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
}

.more-results {
  margin-top: 4px;
}

.more-results summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

.start-list {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  font-size: 0.85rem;
}

.start-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 1px 0;
}

.start-list time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.countdown {
  margin: 0 0 8px;
  padding: 0;
}

.countdown-caption {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.countdown-grid div {
  background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 12px;
  text-align: center;
  padding: 10px 2px 8px;
  box-shadow: var(--shadow-soft);
}

.countdown-grid .num {
  display: block;
  font-size: 1.55rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--accent);
}

.countdown-grid .unit {
  display: block;
  margin-top: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.countdown-done,
.countdown-live {
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  text-align: center;
}

.next-headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  width: 100%;
}

.next-name {
  min-width: 0;
}

.count-inline {
  flex: 0 0 auto;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  color: var(--accent);
  white-space: nowrap;
}

.wins-lead {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
}

.wins-lead .rider {
  flex: 1;
  min-width: 0;
}

.wins-fig {
  flex: 0 0 auto;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}

.wins-fig .quiet {
  font-weight: 600;
  color: var(--muted);
}

.wins-note {
  margin: 0 0 6px;
  font-size: 0.76rem;
  line-height: 1.4;
}

.wins-scroll {
  max-height: 18rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.wins-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  line-height: 1.3;
}

.wins-table th,
.wins-table td {
  padding: 4px 6px 4px 0;
  text-align: left;
  vertical-align: middle;
}

.wins-table th {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
}

.wins-table tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.wins-table .pos,
.wins-table .num {
  font-variant-numeric: tabular-nums;
}

.wins-table .pos {
  width: 1.4rem;
  color: var(--muted);
  padding-right: 8px;
}

.wins-table .num {
  text-align: right;
  padding-left: 8px;
  padding-right: 0;
  width: 3.1rem;
  font-weight: 650;
}

.wins-table .who {
  min-width: 0;
}

.wins-table .who .rider {
  max-width: 100%;
}

.wins-table th.num,
.wins-table td.num {
  white-space: nowrap;
}

.wins-table th.tv,
.wins-table td.tv {
  font-weight: 800;
  color: var(--accent);
  width: 3.2rem;
}

.wins-table th.tv {
  color: var(--accent);
}


.wins-more {
  margin: 4px 0 0;
  font-size: 0.7rem;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 0 48px;
}

.news-item {
  border-bottom: 1px solid var(--line);
}

.news-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.news-row:hover .news-title,
.news-row:focus-visible .news-title {
  color: var(--accent);
}

.news-thumb {
  position: relative;
  flex: 0 0 112px;
  width: 112px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--thumb-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .news-thumb {
  background: var(--thumb-bg);
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-placeholder {
  display: none;
  font-family: var(--font-logo);
  font-size: 1.4rem;
  font-weight: 700;
  color: #8b8f99;
  line-height: 1;
}

.news-thumb.is-placeholder .news-placeholder,
.news-thumb:not(:has(img)) .news-placeholder {
  display: block;
}

.news-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 1px;
}

.news-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.news-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.badge-sporza { color: var(--sporza); }
.badge-wielerflits { color: var(--wielerflits); }
.badge-nos { color: var(--nos); }
.badge-cyclingnews { color: var(--cyclingnews); }
.badge-veldritkrant { color: var(--veldritkrant); }
.badge-cyclocross24 { color: var(--cyclocross24); }
.badge-indeleiderstrui { color: var(--indeleiderstrui); }
.badge-hln { color: var(--hln); }
.badge-wielerrevue { color: var(--wielerrevue); }
.badge-wielerkrant { color: var(--wielerkrant); }
.badge-ad { color: var(--ad); }
.badge-cyclingmagazine { color: var(--cyclingmagazine); }

.label-video {
  color: #c4122f;
}

[data-theme="dark"] .label-video {
  color: #f07180;
}

.news-title {
  font-family: var(--font-ui);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.32;
  color: var(--ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.news-item.is-read .news-title {
  color: var(--muted);
  font-weight: 500;
}

.news-detail {
  padding: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-detail[hidden] {
  display: none;
}

.news-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.summary {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.5;
}

.source-link {
  margin-top: 2px;
  padding-top: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  width: fit-content;
}

.source-link:hover,
.source-link:focus-visible {
  text-decoration: underline;
}

.startlist-box {
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.startlist-box summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
}

.startlist-box summary::-webkit-details-marker {
  display: none;
}

.startlist-box summary::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  vertical-align: 2px;
}

.startlist-box[open] summary::before {
  transform: rotate(45deg);
}

.startlist-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 6px;
}

.startlist-download {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.startlist-download:hover,
.startlist-download:focus-visible {
  border-color: var(--accent);
}

.startlist-riders {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow: auto;
  font-size: 0.82rem;
}

.startlist-riders li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0 8px;
  padding: 4px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  align-items: center;
}

.startlist-riders .bib {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--muted);
}

.startlist-riders .who {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
}

.startlist-riders .who .rider {
  max-width: 100%;
}

.startlist-riders .team {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.startlist-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.status,
.empty {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0 0 10px;
}

.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.sources a {
  color: var(--ink);
}

@media (max-width: 720px) {
  .wrap {
    width: min(1120px, calc(100% - 20px));
  }

  .tagline,
  .updated {
    display: none;
  }

  .header-top {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
  }

  .logo {
    font-size: 1.15rem;
    gap: 6px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .header-tools {
    width: auto;
    margin-left: auto;
    gap: 6px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .search-toggle {
    display: grid;
  }

  .search-panel {
    display: none;
  }

  .site-header.is-search-open .brand {
    display: none;
  }

  .site-header.is-search-open .header-tools {
    flex: 1;
    min-width: 0;
    align-items: flex-start;
  }

  .site-header.is-search-open .search-panel {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    min-width: 0;
    gap: 6px;
  }

  .site-header.is-search-open .search {
    display: block;
    flex: 1 1 100%;
    min-width: 0;
  }

  .site-header.is-search-open .search input {
    width: 100%;
    padding: 8px 10px 8px 34px;
    font-size: 0.88rem;
  }

  .site-header.is-search-open .select-wrap {
    flex: 1 1 auto;
  }

  .site-header.is-search-open .select-wrap select {
    width: 100%;
    max-width: none;
    padding: 8px 24px 8px 10px;
    font-size: 0.78rem;
  }

  .site-header.is-search-open .lang-wrap {
    flex: 0 0 auto;
  }

  .site-header.is-search-open .lang-wrap select {
    width: auto;
    max-width: 5.6rem;
    padding-left: 8px;
  }

  .site-header.is-search-open .search-toggle .icon-search {
    display: none;
  }

  .site-header.is-search-open .search-toggle .icon-close {
    display: block;
  }

  .filters-wrap {
    padding-bottom: 8px;
  }

  .filters-wrap::after {
    bottom: 8px;
    width: 28px;
  }

  .filter {
    padding: 4px 9px;
    font-size: 0.72rem;
  }

  .filter-rest,
  .filter-full {
    display: none;
  }

  .filter-short {
    display: inline;
  }

  .races {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 6px 0 0;
  }

  .race-card {
    border-radius: 12px;
  }

  .card-toggle {
    padding: 7px 10px;
    gap: 8px;
  }

  .card-kicker {
    font-size: 0.6rem;
    letter-spacing: 0.06em;
  }

  .card-summary {
    font-size: 0.84rem;
    gap: 1px;
    line-height: 1.25;
  }

  .card-headline {
    font-size: 0.86rem;
  }

  .card-sub {
    font-size: 0.7rem;
    line-height: 1.25;
  }

  .card-body {
    padding: 0 10px 8px;
  }

  .chevron {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    margin-top: 0;
  }

  .race-next .card-toggle {
    padding: 7px 10px;
  }

  .race-next .card-kicker {
    font-size: 0.6rem;
  }

  .race-next .card-headline {
    font-size: 0.86rem;
  }

  .count-inline {
    font-size: 0.84rem;
  }

  .countdown {
    margin: 0 0 6px;
    padding: 0;
  }

  .countdown-grid {
    gap: 5px;
  }

  .countdown-grid div {
    padding: 5px 2px 4px;
    border-radius: 8px;
  }

  .countdown-grid .num {
    font-size: 1.1rem;
  }

  .countdown-grid .unit {
    margin-top: 2px;
    font-size: 0.55rem;
  }

  .winner-rows,
  .lead-rows {
    margin-top: 3px;
    gap: 2px;
  }

  .winner-rows {
    gap: 0 8px;
  }

  .winner-row,
  .lead-row,
  .wins-lead {
    font-size: 0.75rem;
    gap: 4px 6px;
  }

  .gender-label {
    font-size: 0.6rem;
  }

  .lead-row {
    grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 1fr);
    gap: 2px 6px;
    font-size: 0.74rem;
  }

  .comp-badge {
    min-width: 1.9rem;
    padding: 1px 4px;
    font-size: 0.58rem;
  }

  .wins-fig {
    font-size: 0.74rem;
  }

  .wins-note {
    font-size: 0.7rem;
  }

  .wins-table {
    font-size: 0.76rem;
  }

  .wins-scroll {
    max-height: 16rem;
  }

  .race-title {
    font-size: 0.98rem;
  }

  .result-grid {
    gap: 6px 10px;
  }


  .feed {
    padding: 6px 0 36px;
  }

  .news-row {
    gap: 10px;
    padding: 8px 0;
  }

  .news-thumb {
    flex-basis: 100px;
    width: 100px;
    height: 80px;
    border-radius: 8px;
  }

  .news-title {
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .summary {
    font-size: 0.88rem;
    line-height: 1.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Samengevoegde verhalen: "Ook bij" en de andere koppen */
.news-also {
  margin: -4px 0 0;
  padding: 0 0 9px 124px;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.news-item.is-open .news-also {
  display: none;
}

.also-label {
  font-weight: 600;
}

.also-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.also-link:hover,
.also-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.label-count {
  color: var(--muted);
  font-weight: 600;
}

.news-pub-sep,
.news-pub {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
  color: var(--muted);
}

.news-pub {
  font-variant-numeric: tabular-nums;
}

.story-more {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.story-more-label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.story-more-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.story-more-list li + li {
  border-top: 1px dashed var(--line);
}

.also-headline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 0;
  color: var(--ink);
  text-decoration: none;
}

.also-headline:hover .also-title,
.also-headline:focus-visible .also-title {
  color: var(--accent);
}

.also-title {
  font-size: 0.9rem;
  line-height: 1.35;
}

.also-when {
  font-size: 0.74rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .news-also {
    padding-left: 110px;
    margin-top: -2px;
    padding-bottom: 8px;
  }
}


/* ---- Veldritnieuws: frisse laag ---- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

[data-theme="dark"] body {
  background:
    radial-gradient(1100px 380px at 8% -12%, rgba(75, 227, 160, 0.10), transparent 60%),
    var(--bg);
}

.site-header {
  border-bottom-color: color-mix(in srgb, var(--line) 80%, transparent);
}

.tagline {
  font-weight: 500;
}

.icon-btn {
  background: var(--surface);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.icon-btn:hover {
  color: var(--accent);
}

.search input,
.select-wrap select {
  background: var(--surface);
}

.filter.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

[data-theme="dark"] .filter.is-active {
  color: #06140e;
}

.race-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.race-card:hover {
  box-shadow: var(--shadow);
}

.card-kicker {
  letter-spacing: 0.1em;
}

.race-next {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background:
    radial-gradient(600px 160px at 0% 0%, color-mix(in srgb, var(--lime) 22%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 80%, var(--surface)) 0%, var(--surface) 80%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.race-next::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--lime), var(--accent));
}

[data-theme="dark"] .race-next {
  background:
    radial-gradient(600px 160px at 0% 0%, rgba(201, 242, 92, 0.08), transparent 70%),
    linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 85%);
}

.race-after {
  grid-column: 1 / -1;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  background: color-mix(in srgb, var(--surface) 70%, var(--bg));
  box-shadow: none;
}

.race-after .card-toggle {
  padding: 10px 14px;
}

.race-after .card-kicker {
  color: var(--muted);
}

.race-after .card-headline {
  font-size: 0.98rem;
  font-weight: 650;
}

.race-after .card-headline .quiet {
  font-weight: 500;
  color: var(--muted);
}

.race-after .count-inline {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.86rem;
}

.race-title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.countdown-grid div {
  background: var(--surface);
  border-radius: 14px;
}

.feed {
  gap: 2px;
}

.news-item {
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition: background 0.15s, border-radius 0.15s;
}

.news-item:hover,
.news-item.is-open {
  background: var(--surface);
  border-radius: 16px;
  border-bottom-color: transparent;
  box-shadow: var(--shadow-soft);
}

.news-row {
  padding: 12px 10px;
}

.news-detail {
  padding: 0 10px 14px;
}

.news-thumb {
  border-radius: 12px;
}

.news-title {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.news-item.is-read .news-title {
  font-weight: 500;
}

.news-placeholder {
  color: var(--accent);
  opacity: 0.7;
  font-weight: 800;
}

.source-link {
  color: var(--accent);
}

.site-footer {
  background: var(--surface);
}

@media (max-width: 720px) {
  .logo {
    font-size: 1.2rem;
    gap: 8px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .news-row {
    padding: 10px 6px;
  }

  .race-after .card-toggle {
    padding: 7px 10px;
  }

  .race-after .card-kicker {
    font-size: 0.6rem;
  }

  .race-after .card-headline {
    font-size: 0.84rem;
  }

  .race-after .count-inline {
    font-size: 0.8rem;
  }

  .news-detail {
    padding: 0 6px 12px;
  }
}
