/* CEOI — institutional minimal (taste-skill + minimalist-ui)
   Design read: olympiad archive, trust-first, teal accent
   Dials: variance 4 / motion 3 / density 5 */

:root {
  --bg: #f8f8f6;
  --bg-muted: #f0f1ee;
  --fg: #1c2420;
  --fg-muted: #5c6761;
  --accent: #26413c;
  --accent-soft: #e4ebe7;
  --border: rgba(28, 36, 32, 0.1);
  --header-bg: rgba(248, 248, 246, 0.86);
  --focus: #26413c;
  --radius: 4px;
  --radius-lg: 8px;
  --font: "Outfit", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1080px;
  --narrow: 38rem;
  --header-h: 3.75rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-tint: 38 65 60;
}

.dark {
  --bg: #101513;
  --bg-muted: #171e1b;
  --fg: #e6ece9;
  --fg-muted: #95a39b;
  --accent: #7aab9c;
  --accent-soft: #1e2a26;
  --border: rgba(230, 236, 233, 0.1);
  --header-bg: rgba(16, 21, 19, 0.88);
  --focus: #7aab9c;
  --shadow-tint: 0 0 0;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

html.dark {
  color-scheme: dark;
}

@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;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
}

/* Subtle grain — breaks flat digital sterility */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.dark body::before {
  opacity: 0.06;
  mix-blend-mode: overlay;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  transition: color 200ms var(--ease);
}

a:hover {
  color: var(--fg);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  background: var(--fg);
  color: var(--bg);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.site {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.container.narrow {
  width: min(100% - 2.5rem, var(--narrow));
}

/* Header — quieter chrome */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  backdrop-filter: blur(14px) saturate(1.2);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  line-height: 1.1;
  min-width: 0;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-tagline {
  display: none;
}

.nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  position: relative;
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--radius);
  transition: color 200ms var(--ease);
}

.nav-list a:hover {
  color: var(--fg);
  background: transparent;
}

.nav-list a.active {
  color: var(--fg);
  font-weight: 600;
  background: transparent;
}

.nav-list a.active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.2rem;
  height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 150ms var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.dark .btn-primary {
  background: var(--fg);
  color: var(--bg);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #000);
  color: #fff;
}

.dark .btn-primary:hover {
  background: color-mix(in srgb, var(--fg) 90%, #fff);
  color: var(--bg);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--accent-soft);
  color: var(--fg);
  border-color: transparent;
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: none;
  padding: 0.5rem;
}

.btn-ghost:hover {
  color: var(--fg);
  background: var(--accent-soft);
}

.btn-icon {
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
}

.icon-sun {
  display: none;
}

.dark .icon-moon {
  display: none;
}

.dark .icon-sun {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 860px) {
  .mobile-only {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 1rem 1rem;
    display: none;
    margin-left: 0;
  }

  .nav.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .nav-list a {
    padding: 0.8rem 0.9rem;
  }

  .nav-list a.active::after {
    display: none;
  }

  .nav-list a.active {
    background: var(--accent-soft);
  }
}

.main {
  flex: 1;
}

/* Hero */
.hero {
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  align-items: flex-end;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Keep subjects on the right so copy sits in clear space */
  object-position: 82% center;
}

/* Theme-paired hero art */
.theme-img--dark {
  opacity: 0;
  pointer-events: none;
}

html.dark .theme-img--light {
  opacity: 0;
  pointer-events: none;
}

html.dark .theme-img--dark {
  opacity: 1;
  pointer-events: auto;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, hsl(60 12% 97% / 0.94) 0%, hsl(60 12% 97% / 0.82) 28%, hsl(60 12% 97% / 0.4) 52%, transparent 78%),
    linear-gradient(180deg, hsl(60 12% 97% / 0.2) 0%, transparent 40%, hsl(60 12% 97% / 0.72) 100%);
  pointer-events: none;
}

html.dark .hero-scrim {
  background:
    linear-gradient(90deg, hsl(168 22% 7% / 0.92) 0%, hsl(168 22% 7% / 0.78) 26%, hsl(168 22% 7% / 0.4) 46%, hsl(168 22% 7% / 0.08) 68%, transparent 100%),
    linear-gradient(180deg, hsl(168 22% 7% / 0.12) 0%, transparent 42%, hsl(168 22% 7% / 0.52) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  /* Same .container left edge as header brand + intro 1994 */
  padding: 5.5rem 0 5rem;
}

.hero-inner > * {
  max-width: 26rem;
}

.eyebrow {
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.hero .eyebrow {
  color: color-mix(in srgb, var(--fg) 55%, transparent);
}

.hero-brand {
  margin: 0;
  font-size: clamp(5rem, 15vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.88;
  color: var(--fg);
  text-wrap: balance;
}

.hero-tagline {
  margin: 1.15rem 0 0;
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--fg);
  text-wrap: balance;
}

.hero-lead {
  margin: 1.35rem 0 0;
  max-width: 24rem;
  color: var(--fg-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2.25rem;
}

.hero .btn-secondary {
  color: var(--fg);
  border-color: var(--border);
}

.hero .btn-secondary:hover {
  background: var(--accent-soft);
  color: var(--fg);
  border-color: transparent;
}

html.dark .hero .eyebrow {
  color: color-mix(in srgb, #e8eeeb 65%, transparent);
}

html.dark .hero-brand,
html.dark .hero-tagline {
  color: #f7f8f7;
}

html.dark .hero-lead {
  color: color-mix(in srgb, #e8eeeb 72%, transparent);
}

html.dark .hero .btn-secondary {
  color: #e8eeeb;
  border-color: color-mix(in srgb, #e8eeeb 32%, transparent);
}

html.dark .hero .btn-secondary:hover {
  background: color-mix(in srgb, #e8eeeb 10%, transparent);
  color: #fff;
  border-color: transparent;
}

@media (max-width: 700px) {
  .hero-media img {
    object-position: 78% center;
  }

  .hero-scrim {
    background:
      linear-gradient(180deg, hsl(60 12% 97% / 0.2) 0%, hsl(60 12% 97% / 0.55) 38%, hsl(60 12% 97% / 0.92) 100%);
  }

  html.dark .hero-scrim {
    background:
      linear-gradient(180deg, hsl(168 22% 7% / 0.25) 0%, hsl(168 22% 7% / 0.55) 38%, hsl(168 22% 7% / 0.88) 100%);
  }

  .hero-inner {
    padding: 4rem 0 3.5rem;
  }

  .hero-inner > * {
    max-width: none;
  }
}

/* Page banners */
.page-banner {
  position: relative;
  height: clamp(9rem, 18vw, 13rem);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.page-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.page-banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, var(--bg) 100%);
  pointer-events: none;
}

.dark .page-banner-scrim {
  background: linear-gradient(180deg, transparent 5%, var(--bg) 100%);
}

/* Sections */
.section {
  padding: 6rem 0 6.5rem;
}

.section-muted {
  background: var(--bg-muted);
  border-block: 1px solid var(--border);
}

.section-title {
  margin: 0 0 1.15rem;
  font-size: clamp(1.85rem, 3.2vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-wrap: balance;
}

.section-lead {
  margin: 0 0 2rem;
  color: var(--fg-muted);
  max-width: 36rem;
  text-wrap: pretty;
}

/* Intro split */
.intro-split {
  display: grid;
  grid-template-columns: minmax(5rem, 8rem) 1fr;
  gap: 2rem 3rem;
  align-items: start;
}

.intro-mark {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
  opacity: 0.85;
}

@media (max-width: 600px) {
  .intro-split {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.prose {
  color: var(--fg-muted);
  max-width: 65ch;
}

.prose p {
  margin: 0 0 1.15rem;
  text-wrap: pretty;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Full-bleed map module */
.map-module {
  position: relative;
  border-block: 1px solid var(--border);
  background: var(--bg-muted);
}

.map-module-stage {
  position: relative;
  width: 100%;
  /* Fixed rem height avoids dvh jump when browser chrome shows/hides */
  height: 38rem;
  min-height: 28rem;
  max-height: 85vh;
}

.participants-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-muted);
  z-index: 0;
}

.participants-map.is-loading {
  background:
    linear-gradient(105deg, var(--bg-muted) 0%, var(--accent-soft) 45%, var(--bg-muted) 100%);
  background-size: 220% 100%;
  animation: map-shimmer 1.6s var(--ease) infinite;
}

.participants-map.is-error::after {
  content: "Map could not be loaded. Check your connection.";
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.95rem;
  background: var(--bg-muted);
}

@keyframes map-shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.map-module-overlay {
  position: absolute;
  z-index: 5;
  left: max(1.25rem, calc((100% - var(--max)) / 2));
  bottom: 1.75rem;
  max-width: min(22rem, calc(100% - 2.5rem));
  padding: 1.35rem 1.4rem 1.45rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px -24px rgb(var(--shadow-tint) / 0.35);
  pointer-events: none;
}

.map-module-eyebrow {
  margin: 0 0 0.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.map-module-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-wrap: balance;
}

.map-module-lead {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--fg-muted);
  text-wrap: pretty;
}

.map-module-meta {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.map-module-hint {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  padding: 0.7rem 1rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  white-space: nowrap;
}

.map-module-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.map-module-hint kbd {
  font-family: var(--mono);
  font-size: 0.78em;
  font-weight: 600;
  padding: 0.12em 0.4em;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--accent-soft);
}

.map-module-hint-touch {
  display: none;
}

.participants-map.is-touch-idle {
  cursor: pointer;
}

.participants-map.is-touch-idle::after {
  content: "Tap to interact with map";
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 1.25rem;
  transform: translateX(-50%);
  padding: 0.45rem 0.75rem;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg-muted);
  font-size: 0.8rem;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .map-module-stage {
    height: 32rem;
    min-height: 24rem;
  }

  .map-module-overlay {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
    padding: 1.15rem 1.2rem 1.25rem;
  }

  .ceoi-map-label {
    display: none !important;
  }

  .map-module-hint-desktop {
    display: none;
  }

  .map-module-hint-touch {
    display: inline;
  }
}

.ceoi-map-label {
  font-family: var(--font) !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  background: color-mix(in srgb, var(--bg) 92%, transparent) !important;
  color: var(--fg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  padding: 0.22rem 0.4rem !important;
  white-space: nowrap;
  pointer-events: none !important;
}

.ceoi-map-label::before {
  display: none !important;
}

.leaflet-container {
  font: inherit;
  background: var(--bg-muted);
}

.leaflet-bottom.leaflet-right {
  margin: 0 0.85rem 0.85rem 0;
}

.leaflet-control-zoom a {
  background: color-mix(in srgb, var(--bg) 92%, transparent) !important;
  color: var(--fg) !important;
  border-color: var(--border) !important;
  width: 2.15rem !important;
  height: 2.15rem !important;
  line-height: 2.15rem !important;
  border-radius: 0 !important;
  backdrop-filter: blur(10px);
}

.leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  overflow: hidden;
  box-shadow: none !important;
}

.leaflet-control-attribution {
  background: color-mix(in srgb, var(--bg) 82%, transparent) !important;
  color: var(--fg-muted) !important;
  font-size: 0.62rem !important;
  font-family: var(--mono) !important;
  margin: 0 !important;
  padding: 0.2rem 0.45rem !important;
  max-width: 50%;
}

.leaflet-control-attribution a {
  color: var(--accent) !important;
}

/* Explore — strip list, not card grid */
.explore-grid {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.explore-link {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) 1fr auto;
  gap: 1rem 1.5rem;
  align-items: baseline;
  padding: 1.35rem 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  transition: background 200ms var(--ease), padding 200ms var(--ease);
}

.explore-link:hover {
  background: transparent;
  padding-left: 0.35rem;
}

.explore-label {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg);
}

.explore-desc {
  font-size: 0.95rem;
  color: var(--fg-muted);
  text-wrap: pretty;
}

.explore-link::after {
  content: "→";
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--fg-muted);
  transition: color 200ms var(--ease), transform 200ms var(--ease);
}

.explore-link:hover::after {
  color: var(--accent);
  transform: translateX(3px);
}

@media (max-width: 700px) {
  .explore-link {
    grid-template-columns: 1fr auto;
    gap: 0.35rem 1rem;
  }

  .explore-desc {
    grid-column: 1 / -1;
  }

  .explore-link::after {
    grid-row: 1;
    grid-column: 2;
  }
}

/* Inner page headers */
.page-header {
  padding: 3.5rem 0 1.75rem;
}

.page-banner + .page-header {
  padding-top: 2.25rem;
}

.page-title {
  margin: 0;
  font-size: clamp(2.15rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-wrap: balance;
}

.page-lead {
  margin: 0.9rem 0 0;
  max-width: 36rem;
  color: var(--fg-muted);
  font-size: 1.05rem;
  text-wrap: pretty;
}

/* Year / section jump nav — text chips, not pills */
.year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.1rem;
  margin-top: 1.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.year-nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--fg-muted);
  padding: 0.55rem 0.55rem;
  border: none;
  border-radius: 0;
  background: transparent;
  transition: color 200ms var(--ease);
}

.year-nav a:hover {
  color: var(--fg);
  background: transparent;
}

.sticky-nav {
  position: sticky;
  top: calc(var(--header-h));
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px);
  margin-inline: -0.25rem;
  padding-inline: 0.25rem;
}

/* History */
.year-list {
  padding-bottom: 5rem;
}

.decade-anchor {
  display: block;
  height: 0;
  width: 0;
  overflow: hidden;
  scroll-margin-top: calc(var(--header-h) + 3.25rem);
}

.year-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1.75rem;
  align-items: start;
  padding: 1.65rem 0;
  border-top: 1px solid var(--border);
  transition: background 200ms var(--ease);
}

/* Avoid double line under the decade jump nav */
.year-list > .year-row:first-child,
.year-list > .decade-anchor:first-child + .year-row {
  border-top: none;
}

.year-row:last-child {
  border-bottom: 1px solid var(--border);
}

.year-row:hover {
  background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
}

@media (max-width: 600px) {
  .year-row {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
}

.year-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.75rem;
  padding: 0.45rem;
  background: transparent;
  border: none;
  border-radius: 0;
}

.dark .year-logo {
  background: transparent;
}

.year-logo img {
  max-height: 3.25rem;
  width: auto;
  object-fit: contain;
}

.year-logo.is-placeholder {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--fg-muted);
  justify-content: flex-start;
}

.year-row--upcoming .year-title::after {
  content: "Upcoming";
  display: inline-block;
  margin-left: 0.55rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
}

.year-title {
  margin: 0 0 0.7rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.year-meta {
  margin: 0 0 0.4rem;
  font-size: 0.935rem;
  color: var(--fg-muted);
  line-height: 1.55;
  text-wrap: pretty;
}

.meta-label {
  display: inline-block;
  min-width: 6.75rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  opacity: 0.75;
}

/* Tasks archive — one line per year */
.task-list {
  padding-bottom: 5rem;
}

.task-row {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr) auto;
  gap: 0.85rem 1.35rem;
  align-items: baseline;
  padding: 0.95rem 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 3.25rem);
  transition: background 220ms var(--ease);
}

.task-list > .task-row:first-child {
  border-top: none;
}

.task-row:last-child {
  border-bottom: 1px solid var(--border);
}

.task-row:hover {
  background: color-mix(in srgb, var(--accent-soft) 40%, transparent);
}

.task-year-num {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1.4;
}

.task-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.85rem;
}

.task-place {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-wrap: balance;
}

.task-dates {
  margin: 0;
  font-size: 0.875rem;
  color: var(--fg-muted);
  white-space: nowrap;
}

.task-note {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  opacity: 0.85;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.75rem;
  max-width: 28rem;
}

.task-row.is-split {
  grid-template-columns: 4.25rem minmax(0, 1fr);
  align-items: start;
}

.task-row.is-split .task-actions {
  grid-column: 2;
  justify-content: flex-start;
  max-width: none;
  margin-top: -0.15rem;
}

.task-dl {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding-bottom: 0.05rem;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}

.task-dl:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.task-host {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg-muted);
  opacity: 0.8;
  transition: color 200ms var(--ease), opacity 200ms var(--ease);
}

.task-host:hover {
  color: var(--fg);
  opacity: 1;
}

@media (max-width: 720px) {
  .task-row {
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 0.35rem 0.9rem;
    padding: 1.05rem 0;
  }

  .task-actions,
  .task-row.is-split .task-actions {
    grid-column: 2;
    justify-content: flex-start;
    max-width: none;
    margin-top: 0.15rem;
  }
}

/* Regulations — banner hero + process + editorial document */
.reg-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(26rem, 58vw, 36rem);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.reg-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
}

.reg-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% center;
}

.reg-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, hsl(60 12% 97% / 0.92) 0%, hsl(60 12% 97% / 0.78) 40%, hsl(60 12% 97% / 0.55) 70%, hsl(60 12% 97% / 0.7) 100%),
    linear-gradient(180deg, hsl(60 12% 97% / 0.2) 0%, transparent 30%, hsl(60 12% 97% / 0.82) 100%);
}

html.dark .reg-hero-scrim {
  background:
    linear-gradient(90deg, hsl(168 22% 7% / 0.88) 0%, hsl(168 22% 7% / 0.62) 42%, hsl(168 22% 7% / 0.55) 72%, hsl(168 22% 7% / 0.72) 100%),
    linear-gradient(180deg, hsl(168 22% 7% / 0.25) 0%, transparent 30%, hsl(168 22% 7% / 0.82) 100%);
}

.reg-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2.5rem 3.5rem;
  align-items: end;
  padding: 3.75rem 0 3rem;
}

.reg-hero .eyebrow {
  color: color-mix(in srgb, var(--fg) 55%, transparent);
}

.reg-hero-title {
  margin: 0;
  font-size: clamp(2.4rem, 5.5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
  color: var(--fg);
  text-wrap: balance;
  max-width: 14ch;
}

.reg-hero-dek {
  margin: 1.15rem 0 0;
  max-width: 34rem;
  color: var(--fg-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.reg-process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.reg-process-step {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.75rem 0.95rem;
  align-items: start;
}

.reg-process-step:nth-child(even) {
  margin-left: 1.35rem;
}

.reg-process-num {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}

.reg-process-title {
  margin: 0.3rem 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--fg);
}

.reg-process-title a {
  color: inherit;
  text-decoration: none;
}

.reg-process-title a:hover {
  color: var(--accent);
}

.reg-process-body p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  text-wrap: pretty;
  max-width: none;
}

html.dark .reg-hero .eyebrow {
  color: color-mix(in srgb, #e8eeeb 70%, transparent);
}

html.dark .reg-hero-title {
  color: #f7f8f7;
}

html.dark .reg-hero-dek {
  color: color-mix(in srgb, #e8eeeb 78%, transparent);
}

html.dark .reg-process-num {
  border-color: color-mix(in srgb, #e8eeeb 28%, transparent);
  background: color-mix(in srgb, hsl(168 22% 7%) 55%, transparent);
  color: color-mix(in srgb, #e8eeeb 78%, transparent);
}

html.dark .reg-process-title {
  color: #f2f5f3;
}

html.dark .reg-process-title a:hover {
  color: #c5e0d6;
}

html.dark .reg-process-body p {
  color: color-mix(in srgb, #e8eeeb 72%, transparent);
}

body[data-page="regulations"] .year-nav {
  margin-top: 2.25rem;
}

.reg-doc {
  padding: 2.5rem 0 5rem;
}

.reg-section {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.75rem 1.5rem;
  padding: 2.5rem 0;
  scroll-margin-top: calc(var(--header-h) + 3.5rem);
}

.reg-section-index {
  margin: 0.35rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}

.reg-section-body h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.reg-section-body p {
  margin: 0 0 1rem;
  color: var(--fg-muted);
  max-width: none;
  line-height: 1.7;
  text-align: left;
  text-wrap: pretty;
}

.reg-section-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .reg-hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
  }

  .reg-process-step:nth-child(even) {
    margin-left: 0.75rem;
  }
}

@media (max-width: 700px) {
  .reg-hero {
    min-height: 0;
  }

  .reg-hero-scrim {
    background:
      linear-gradient(180deg, hsl(60 12% 97% / 0.3) 0%, hsl(60 12% 97% / 0.62) 35%, hsl(60 12% 97% / 0.94) 100%);
  }

  html.dark .reg-hero-scrim {
    background:
      linear-gradient(180deg, hsl(168 22% 7% / 0.35) 0%, hsl(168 22% 7% / 0.62) 35%, hsl(168 22% 7% / 0.92) 100%);
  }

  .reg-hero-inner {
    padding: 3rem 0 2.25rem;
  }

  .reg-hero-title {
    max-width: none;
  }

  .reg-process-step:nth-child(even) {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .reg-section {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* Footer */
.footer {
  position: relative;
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-muted) 70%, var(--bg));
  overflow: hidden;
}

.footer-panel {
  position: relative;
  padding: 4rem 0 1.75rem;
}

.footer-watermark {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-size: clamp(6rem, 22vw, 14rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: var(--fg);
  opacity: 0.035;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}

.dark .footer-watermark {
  opacity: 0.055;
}

.footer-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.35fr);
  gap: 3rem 4rem;
  align-items: start;
  padding-bottom: 3rem;
}

.footer-brand {
  max-width: 26rem;
}

.footer-logo {
  display: inline-block;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--fg);
  text-decoration: none;
}

.footer-tagline {
  margin: 0.65rem 0 0;
  font-size: 1rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.footer-blurb {
  margin: 1.1rem 0 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.75rem;
}

.footer-col-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.footer-col-title::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-col a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  transition: color 200ms var(--ease);
}

.footer-col a:hover {
  color: var(--fg);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--fg-muted);
  letter-spacing: 0.01em;
}

.footer-bottom p {
  margin: 0;
}

.footer-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-meta a {
  color: inherit;
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--fg);
}

@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .footer-panel {
    padding: 3rem 0 1.5rem;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 650ms var(--ease), transform 650ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}