:root {
  color-scheme: dark;
  --ink: #eff6f1;
  --muted: #9aaba4;
  --surface: #0c1714;
  --surface-raised: #14231e;
  --surface-soft: #1b2d27;
  --line: rgba(231, 255, 242, 0.12);
  --accent: #28b8c7;
  --accent-dark: #06272b;
  --focus: #86edf4;
  --expected: #d7a85a;
  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 5%, rgba(40, 184, 199, 0.16), transparent 28rem),
    var(--surface);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 99;
  padding: 0.7rem 1rem;
  color: var(--accent-dark);
  background: var(--accent);
  border-radius: 999px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.site-header, .hero, .calendar-section, .site-footer {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}
.brand {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.brand-accent, .site-footer strong span { color: var(--accent); }
.brand-mark { display: flex; gap: 2px; align-items: flex-end; width: 27px; height: 27px; }
.brand-mark i { display: block; width: 7px; background: var(--accent); border-radius: 1px; transform: skewX(-18deg); }
.brand-mark i:nth-child(1) { height: 14px; }
.brand-mark i:nth-child(2) { height: 24px; }
.brand-mark i:nth-child(3) { height: 18px; }

.language-switcher {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
}
.language-button {
  min-width: 42px;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}
.language-button.is-active { background: var(--accent); color: var(--accent-dark); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(430px, 0.9fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: end;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(3.5rem, 6vw, 5.5rem);
}
.eyebrow, .section-kicker, .country-line {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 760px;
  margin: 1rem 0 1.2rem;
  font-family: var(--font-display);
  font-size: clamp(3.1rem, 7vw, 6.2rem);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.92;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-intro {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.6;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { padding: 1.35rem 0.85rem; border-right: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat strong, .stat span { display: block; }
.stat strong { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -0.06em; }
.stat span { margin-top: 0.25rem; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; }

.calendar-section {
  padding: clamp(2.8rem, 5vw, 4.5rem) clamp(1.2rem, 3.5vw, 3rem) 4rem;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(12, 23, 20, 0.92);
  box-shadow: 0 24px 70px rgba(0,0,0,0.22);
}
.calendar-heading-row {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.35rem;
}
.calendar-heading-row h2 {
  margin: 0.55rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.055em;
}
.calendar-meta { text-align: right; }
.results-label { margin: 0; color: var(--ink); font-size: 0.9rem; font-weight: 700; }
.updated-label { margin: 0.28rem 0 0; color: var(--muted); font-size: 0.74rem; }
.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0 0 1.3rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.status-legend span { display: inline-flex; gap: 0.45rem; align-items: center; }
.status-legend b { font-weight: 600; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.status-dot.is-expected { background: var(--expected); }

.filters {
  display: grid;
  grid-template-columns: 1.45fr repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-raised);
}
.filter-search { grid-column: span 2; }
.filter-field {
  min-width: 0;
  padding: 0.5rem 0.78rem 0.62rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.035);
}
.filter-field label {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.filter-field input, .filter-field select {
  width: 100%;
  height: 30px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}
.filter-field select { cursor: pointer; }
.filter-field option { color: #102018; background: #f1f7f3; }
.filter-search input[type="search"]::-webkit-search-cancel-button { filter: invert(1); }
.favorites-filter {
  grid-column: span 2;
  display: flex;
  gap: 0.55rem;
  align-items: center;
  min-height: 56px;
  padding: 0 0.9rem;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.035);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}
.favorites-filter input { width: 17px; height: 17px; accent-color: var(--accent); }
.favorites-filter > span:first-of-type { color: var(--accent); font-size: 1rem; }
.reset-button {
  min-height: 56px;
  padding: 0 1rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.reset-button:hover { color: var(--accent); background: rgba(40,184,199,0.09); }
.reset-button span:first-child { margin-right: 0.25rem; font-size: 1.1rem; }
.active-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; min-height: 2rem; margin: 1rem 0 0.3rem; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(40,184,199,0.35);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(40,184,199,0.08);
  font-size: 0.72rem;
  font-weight: 600;
}

.event-list { display: grid; }
.month-heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 2.7rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.month-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.event-card { border-bottom: 1px solid var(--line); }
.event-summary {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 130px 42px 112px;
  gap: clamp(0.8rem, 2.4vw, 2rem);
  align-items: center;
  padding: 1.35rem 0;
}
.event-date { display: flex; gap: 0.48rem; align-items: baseline; }
.date-day { font-family: var(--font-display); font-size: 2.35rem; font-weight: 700; letter-spacing: -0.07em; line-height: 1; }
.date-month { color: var(--accent); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.event-date.is-tbc .date-day { color: var(--expected); font-size: 1.15rem; letter-spacing: 0.04em; }
.event-date.is-tbc .date-month { color: var(--expected); }
.event-meta-line { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin-bottom: 0.3rem; }
.country-line { color: var(--muted); font-size: 0.62rem; }
.event-status, .registration-badge {
  padding: 0.15rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.event-status.is-confirmed { border-color: rgba(40,184,199,0.42); color: var(--accent); background: rgba(40,184,199,0.08); }
.event-status.is-expected { border-color: rgba(215,168,90,0.35); color: var(--expected); background: rgba(215,168,90,0.07); }
.registration-badge { border-color: rgba(116,207,152,0.35); color: #91d9ad; background: rgba(116,207,152,0.08); }
.event-name { margin: 0; font-family: var(--font-display); font-size: clamp(1.08rem, 2vw, 1.38rem); letter-spacing: -0.035em; }
.location-line { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.84rem; }
.event-distance-summary { display: flex; align-items: baseline; justify-content: flex-end; }
.distance-number { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; letter-spacing: -0.05em; }
.distance-unit { margin-left: 0.3rem; color: var(--muted); font-size: 0.65rem; font-weight: 700; }
.favorite-button {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  place-items: center;
  font-size: 1.15rem;
}
.favorite-button:hover, .favorite-button.is-active { border-color: var(--accent); color: var(--accent); background: rgba(40,184,199,0.08); }
.details-toggle {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}
.toggle-icon {
  display: grid;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  place-items: center;
  font-size: 1.2rem;
  font-weight: 400;
  transition: transform 180ms ease, background 180ms ease;
}
.details-toggle:hover .toggle-icon { background: rgba(40,184,199,0.1); }
.details-toggle[aria-expanded="true"] .toggle-icon { background: var(--accent); color: var(--accent-dark); transform: rotate(45deg); }

.event-details { padding: 0 0 2rem 108px; animation: reveal 180ms ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.detail-grid { display: grid; grid-template-columns: 1.35fr 1.3fr 0.75fr 0.9fr; gap: 0.65rem; }
.detail-item { min-height: 92px; padding: 0.95rem; border-radius: 12px; background: var(--surface-raised); }
.detail-label, .detail-item strong { display: block; }
.detail-label { margin-bottom: 0.35rem; color: var(--muted); font-size: 0.67rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.detail-item strong { font-size: 0.87rem; font-weight: 600; line-height: 1.45; }
.course-facts { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0 1.15rem; }
.course-fact { min-width: 145px; padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,0.02); }
.course-fact small, .course-fact b { display: block; }
.course-fact small { color: var(--muted); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.course-fact b { margin-top: 0.25rem; font-size: 0.82rem; }
.event-description { max-width: 720px; margin: 1rem 0; color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.event-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.event-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.62rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
a.event-link:hover, button.event-link:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); cursor: pointer; }
.website-link::after, .registration-link::after { content: "↗"; margin-left: 0.45rem; }
.registration-unavailable, .event-link:disabled { color: #71827b; cursor: not-allowed; }

.empty-state { margin-top: 2.5rem; padding: 4.5rem 1rem; text-align: center; border: 1px dashed var(--line); border-radius: 20px; }
.empty-state > span { color: var(--accent); font-size: 3rem; }
.empty-state h3 { margin: 0.5rem 0; font-family: var(--font-display); font-size: 1.5rem; }
.empty-state p { margin: 0 0 1.25rem; color: var(--muted); }
.empty-state button { padding: 0.7rem 1rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-dark); cursor: pointer; font-weight: 700; }

.site-footer { display: flex; gap: 3rem; align-items: end; justify-content: space-between; padding: 4rem 0 3rem; }
.site-footer strong { font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.08em; }
.site-footer p { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.76rem; }
.source-note { max-width: 680px; text-align: right; line-height: 1.5; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; gap: 2.8rem; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-search { grid-column: span 2; }
  .favorites-filter { grid-column: span 2; }
  .event-summary { grid-template-columns: 78px minmax(0, 1fr) 110px 42px; }
  .details-toggle { grid-column: 2 / -1; justify-content: flex-start; padding-top: 0; }
  .event-details { padding-left: 98px; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .site-header, .hero, .calendar-section, .site-footer { width: min(100% - 28px, 1240px); }
  .site-header { min-height: 70px; }
  .hero { padding-top: 3rem; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.8rem); }
  .hero-stats { overflow-x: auto; }
  .stat { min-width: 98px; }
  .calendar-section { width: 100%; padding-inline: 14px; border-right: 0; border-left: 0; border-radius: 24px; }
  .calendar-heading-row { display: block; }
  .calendar-meta { margin-top: 0.8rem; text-align: left; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
  .filter-search, .favorites-filter { grid-column: 1 / -1; }
  .reset-button { grid-column: 1 / -1; }
  .event-summary { grid-template-columns: 62px minmax(0, 1fr) 68px 38px; gap: 0.65rem; }
  .date-day { font-size: 2rem; }
  .event-date { display: block; }
  .date-month { display: block; margin-top: 0.2rem; }
  .event-distance-summary { align-self: start; }
  .distance-number { font-size: 1.2rem; }
  .distance-unit { font-size: 0.58rem; }
  .details-toggle { grid-column: 2 / -1; }
  .event-details { padding-left: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .course-fact { flex: 1 1 145px; }
  .site-footer { display: block; }
  .source-note { margin-top: 1.5rem !important; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
