/* discogp.com — Disco Grand Prix (orange, summer) & Nordic Grand Prix (ice blue, December)
   Both competitions share one type treatment; colour and posters tell them apart.
   Signature: the back-number bib that carries the countdown. */

/* self-hosted fonts (SIL OFL), no requests to Google */
@font-face {
  font-family: 'Anybody';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 50% 150%;
  font-display: swap;
  src: url(fonts/anybody-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Anybody';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 50% 150%;
  font-display: swap;
  src: url(fonts/anybody-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/atkinson-next-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/atkinson-next-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/atkinson-next-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/atkinson-next-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --dgp: #ff6a13;
  --dgp-deep: #5c1f00;
  --dgp-tint: #fff2e8;
  --dgp-ink: #2a0e00;
  --ngp: #a8e4ff;
  --ngp-deep: #082c45;
  --ngp-tint: #eef9ff;
  --ngp-ink: #04263d;

  --paper: #fbfaf8;
  --ink: #17140f;
  --muted: #5f5a53;
  --line: #e2ded7;
  --bib: #ffffff;
  --bib-ink: #121212;

  --accent: var(--ink);
  --on-accent: var(--paper);
  --tint: var(--paper);
  --link: #a33f00;

  --display: "Anybody", "Arial Narrow", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 6px;
  color-scheme: light;
}

.theme-dgp { --accent: var(--dgp); --on-accent: var(--dgp-ink); --tint: var(--dgp-tint); --link: #a33f00; }
.theme-ngp { --accent: var(--ngp); --on-accent: var(--ngp-ink); --tint: var(--ngp-tint); --link: #035b8c; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12100d;
    --ink: #f2eee8;
    --muted: #aaa39a;
    --line: #2c2823;
    --link: #ff9a5c;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .theme-dgp { --accent: var(--dgp-deep); --on-accent: #ffe3d1; --tint: #1a0d05; --link: #ff9a5c; }
  :root:not([data-theme="light"]) .theme-ngp { --accent: var(--ngp-deep); --on-accent: #e3f6ff; --tint: #06141f; --link: #8fd9ff; }
}
:root[data-theme="dark"] { --paper: #12100d; --ink: #f2eee8; --muted: #aaa39a; --line: #2c2823; --link: #ff9a5c; color-scheme: dark; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--tint);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
main { flex: 1; }
a { color: var(--link); text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: 1rem; }
h3 { font-size: 1.05rem; font-weight: 750; margin-bottom: .35rem; }
p { margin: 0 0 1rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- top bar & footer ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding: 14px var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.topbar a { color: var(--ink); text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar-mark { font-family: var(--display); font-weight: 800; letter-spacing: .01em; }
.topbar-back { font-weight: 700; }
.topbar-nav { display: flex; gap: 18px; flex-wrap: wrap; }

.foot {
  padding: 22px var(--gutter) 28px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.foot p { margin: 0; }
.foot a { color: inherit; margin-right: 16px; }

/* ---------- the bib (signature) ---------- */
.bib {
  --pin: radial-gradient(circle, rgba(0,0,0,.28) 0 2.5px, transparent 3.5px);
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 9.5rem;
  padding: 14px 22px 12px;
  background: var(--bib);
  color: var(--bib-ink);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 12px 24px -12px rgba(0,0,0,.45);
  background-image: var(--pin), var(--pin), var(--pin), var(--pin);
  background-size: 14px 14px;
  background-position: 6px 6px, calc(100% - 6px) 6px, 6px calc(100% - 6px), calc(100% - 6px) calc(100% - 6px);
  background-repeat: no-repeat;
  transform: rotate(-2.5deg);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.theme-ngp .bib, .panel-ngp .bib { transform: rotate(2deg); }
.bib-head {
  font: 700 .7rem/1 var(--body);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 2px solid currentColor;
  white-space: nowrap;
}
.bib-num {
  font: 900 clamp(4.2rem, 9vw, 6.8rem)/.88 var(--display);
  font-stretch: 70%;
  font-variant-numeric: tabular-nums;
  padding-top: 8px;
}
.bib-label { font: 700 .85rem/1.2 var(--body); }

/* ---------- start page: warm against cold ---------- */
.home { display: flex; flex-direction: column; }
.split { display: flex; flex: 1; }
.split-intro {
  margin: 0;
  padding: 12px var(--gutter);
  background: var(--paper);
  color: var(--muted);
  font-size: .95rem;
  border-bottom: 1px solid var(--line);
}
.panel {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  align-content: center;
  gap: clamp(20px, 3vw, 44px);
  padding: clamp(28px, 4vw, 56px) var(--gutter);
  text-decoration: none;
  transition: flex-grow .5s cubic-bezier(.2, .8, .2, 1);
}
/* halves stay equal so the two grids line up; the nearest competition is marked by its bib (and comes first on mobile) */
.panel-dgp { background: var(--dgp); color: var(--dgp-ink); }
.panel-ngp { background: var(--ngp); color: var(--ngp-ink); }

/* the poster is the hero of each half; the bib is pinned to its corner */
.panel-poster { position: relative; justify-self: start; }
.panel-poster img {
  height: clamp(340px, min(62svh, 36vw), 600px);
  width: auto;
  border-radius: 3px;
  box-shadow: 0 2px 0 rgba(0,0,0,.06), 0 24px 40px -22px rgba(0,0,0,.55);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
/* same grid in both halves: name at the poster's top edge, the rest locked to its bottom edge */
.panel-info {
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  justify-items: start;
  row-gap: 16px;
  min-width: 0;
}
.panel-name { align-self: start; }
.panel-mid { min-height: 9.5rem; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.panel-name {
  font-size: clamp(2rem, 3vw, 3.2rem);
  font-stretch: 100%;
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.01em;
}
.panel-when { display: flex; flex-direction: column; margin: 0; }
.panel-date { font: 800 clamp(1rem, 1.35vw, 1.3rem)/1.2 var(--display); white-space: nowrap; }
.panel-info .bib-num { font-size: clamp(3rem, 4.4vw, 4.4rem); }
.panel-info .bib { min-width: 8.5rem; max-width: calc(100% - 12px); }
.panel-venue { font-size: 1rem; }
.panel-status { margin: 0; font-weight: 700; max-width: 22ch; }
.panel-go {
  margin-top: 8px;
  font-weight: 700;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
  white-space: nowrap;
}
.panel:hover .bib, .panel:focus-visible .bib { transform: rotate(0deg) translateY(-4px); }
.panel:hover .panel-poster img { transform: translateY(-3px); }
.panel:focus-visible { outline: 4px solid currentColor; outline-offset: -10px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .panel-dgp { background: var(--dgp-deep); color: #ffe3d1; }
  :root:not([data-theme="light"]) .panel-dgp .panel-name { color: var(--dgp); }
  :root:not([data-theme="light"]) .panel-ngp { background: var(--ngp-deep); color: #e3f6ff; }
  :root:not([data-theme="light"]) .panel-ngp .panel-name { color: var(--ngp); }
}

/* medium screens: poster above the text inside each half */
@media (max-width: 1360px) {
  .panel { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .panel-info { grid-template-rows: auto; }
  .panel-name { min-height: 3.2rem; display: flex; align-items: flex-end; }
  .panel-poster img { height: clamp(320px, 54svh, 560px); }
}

@media (max-width: 720px) {
  .split { flex-direction: column; }
  .panel { flex: none; }
  .panel.is-next { order: -1; }
  .panel-poster { justify-self: center; }
  .panel-poster img { height: auto; width: min(320px, 78vw); }
  .panel-name { min-height: 0; }
  .panel-mid { min-height: 0; }
}

/* ---------- competition page ---------- */
.hero {
  background: var(--accent);
  color: var(--on-accent);
  padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(36px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 40px;
  align-items: end;
}
.hero-name {
  font-size: clamp(2.8rem, 8.5vw, 7.5rem);
  font-weight: 900;
  line-height: .9;
  margin-bottom: 14px;
}
.hero-tagline { font-size: 1.15rem; margin-bottom: 18px; }
.hero-when { display: flex; flex-direction: column; margin-bottom: 14px; }
.hero-when strong { font: 800 clamp(1.3rem, 2.6vw, 1.8rem)/1.2 var(--display); }
.hero-status { font-weight: 700; margin-bottom: 22px; }
.hero-when + .hero-actions { margin-top: 10px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.hero .bib { margin-bottom: 6px; }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero .bib { order: -1; justify-self: start; }
}

/* photo hero: the stage photo sits behind the text on wide screens and above it on phones */
.hero-media { display: block; }
.hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 721px) {
  .hero-photo {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: clamp(520px, 78vh, 820px);
    background: #050d18;
    color: #f2fbff;
  }
  .hero-media { position: absolute; inset: 0; z-index: -1; }
  .hero-media img { object-position: 68% 50%; }
  .hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(90deg, rgba(3, 14, 26, .9) 0%, rgba(3, 14, 26, .62) 32%, rgba(3, 14, 26, 0) 62%),
      linear-gradient(0deg, rgba(3, 14, 26, .55) 0%, rgba(3, 14, 26, 0) 35%);
  }
  .hero-photo .hero-text { max-width: 36rem; }
  .theme-ngp .hero-photo .btn:not(.btn-quiet) { background: var(--ngp); color: var(--ngp-ink); border-color: var(--ngp); }
  .theme-dgp .hero-photo .btn:not(.btn-quiet) { background: var(--dgp); color: var(--dgp-ink); border-color: var(--dgp); }
}
@media (max-width: 720px) {
  .hero-media { order: -2; margin: calc(-1 * clamp(32px, 6vw, 80px)) calc(-1 * var(--gutter)) 0; }
  .hero-media img { height: auto; aspect-ratio: 1; object-position: 50% 45%; }
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--ink);
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}
.hero .btn { background: var(--on-accent); color: var(--accent); border-color: var(--on-accent); }
.btn-quiet, .hero .btn-quiet { background: transparent; color: inherit; border-color: currentColor; }
.btn:hover { filter: brightness(1.12); }

.wrap { max-width: 980px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--gutter) 64px; }
.page h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 1rem; }
.lede { font-size: 1.2rem; max-width: 60ch; }
.levels { color: var(--muted); }
.note { color: var(--muted); font-size: .95rem; }
.block { margin-top: clamp(40px, 6vw, 64px); }

/* key dates: a real sequence, so an ordered list */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--line); }
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 11rem 1fr auto;
  gap: 4px 16px;
  padding: 10px 0 10px 20px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -8px; top: 17px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--tint);
  border: 3px solid var(--ink);
}
.tl-date { font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline .is-past { color: var(--muted); }
.timeline .is-past::before { border-color: var(--line); background: var(--line); }
.timeline .is-next::before { background: var(--accent); border-color: var(--ink); }
.tl-flag { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--on-accent); align-self: center; }
@media (max-width: 560px) {
  .timeline li { grid-template-columns: 1fr auto; }
  .tl-label { grid-column: 1; }
}

/* registration */
.reg { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.reg-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  transition: transform .2s ease, box-shadow .2s ease;
}
.reg-card strong { font-size: 1.1rem; }
.reg-card span { color: var(--muted); }
.reg-card .reg-go { margin-top: 14px; color: var(--ink); font-weight: 700; }
.reg-intl { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.reg-intl span, .reg-intl .reg-go { color: inherit; }
.reg + .note { margin-top: 12px; }
.reg-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(0,0,0,.4); }

/* levels: text beside a portrait photo */
.levels-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); gap: 24px 40px; align-items: center; }
.levels-photo { position: relative; margin: 0; }
.levels-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
/* small corner mark: the photo is AI-generated, full text for screen readers and on hover */
.ai-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(3, 14, 26, .55);
  color: rgba(242, 251, 255, .9);
  font: 700 .68rem/1.4 var(--body);
  letter-spacing: .08em;
  cursor: help;
}
.ai-badge-hero { top: 12px; right: 12px; bottom: auto; z-index: 1; }
@media (max-width: 720px) {
  .hero-photo { position: relative; }
  .ai-badge-hero { top: 10px; right: 10px; }
}
/* phones: the photo is extra scroll, the text says it all */
@media (max-width: 720px) {
  .levels-split { grid-template-columns: 1fr; }
  .levels-photo { display: none; }
}

/* hotels: cards sorted by distance to the arena, same edge as the registration cards */
.fact-hotels { grid-column: 1 / -1; }
.fact-hotels .note { margin: -4px 0 14px; color: var(--muted); }
.hotels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.hotels li { display: flex; }
.hotel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
a.hotel:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(0,0,0,.4); }
.hotel-tag {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 .72rem/1.3 var(--body);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hotel-name { font: 800 1.05rem/1.25 var(--display); }
.hotel-dist { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.hotel-min { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hotel-km { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hotel-go { margin-top: auto; padding-top: 8px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .hotel { transition: none; } a.hotel:hover { transform: none; } }
/* phones: compact rows (name and time left, arrow right) to keep the list short */
@media (max-width: 560px) {
  .hotels { gap: 8px; }
  .hotel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "tag tag" "name go" "dist go";
    align-items: center;
    gap: 2px 14px;
    padding: 12px 16px;
  }
  .hotel-tag { grid-area: tag; justify-self: start; margin-bottom: 4px; }
  .hotel-name { grid-area: name; }
  .hotel-dist { grid-area: dist; justify-content: flex-start; }
  .hotel-go { grid-area: go; margin: 0; padding: 0; font-size: 0; }
  .hotel-go span { font-size: 1.25rem; }
}

/* classes */
.classes { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.classes caption { text-align: left; font-weight: 700; padding-bottom: 6px; }
.classes th, .classes td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.classes th { font-size: .85rem; color: var(--muted); }
.classes tbody th { font-size: inherit; color: var(--ink); font-weight: 700; white-space: nowrap; }

/* rules: levels */
.ages { margin: 16px 0 0; font-weight: 700; }
.key-rule { margin: 24px 0 0; max-width: 60ch; padding: 16px 20px; border-left: 6px solid var(--dgp); background: var(--dgp-tint); color: var(--dgp-ink); font-weight: 700; font-size: 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; }
.level-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.level-jump a { padding: 8px 14px; border: 2px solid var(--ink); border-radius: var(--radius); color: var(--ink); font-weight: 700; text-decoration: none; }
.level { scroll-margin-top: 24px; border-top: 3px solid var(--ink); padding-top: 18px; }
.level-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.level-tag { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.level-who { font-size: 1.1rem; max-width: 60ch; margin: 10px 0 22px; }
.equiv { max-width: 860px; table-layout: fixed; }
.equiv thead th:nth-child(1) { width: 20%; }
.equiv thead th:nth-child(2) { width: 36%; }
.equiv td, .equiv tbody th { vertical-align: top; }
.format { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0 0 20px; max-width: 860px; }
.format dt { font-weight: 700; }
.format dd { margin: 0; max-width: 70ch; }
@media (max-width: 560px) {
  .format { grid-template-columns: 1fr; gap: 2px; }
  .format dd { margin-bottom: 12px; }
  .equiv th, .equiv td { padding: 8px 6px; font-size: .92rem; }
  .classes tbody th { white-space: normal; }
  .equiv tbody th { font-size: .92rem; }
  .equiv thead th:nth-child(1) { width: 28%; }
  .equiv thead th:nth-child(2) { width: 34%; }
}

.day-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.day-links a { display: inline-block; padding: 12px 18px; border: 2px solid var(--ink); border-radius: var(--radius); color: var(--ink); font-weight: 700; text-decoration: none; }

.practical { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 36px; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.code { font: 700 .95rem ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--paper); border: 1px dashed var(--muted); padding: 1px 6px; border-radius: 4px; }
.prices { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; }
.prices dd { margin: 0; font-weight: 700; text-align: right; }

.faq { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 10px 0 0; }

.poster a { display: inline-flex; flex-direction: column; gap: 10px; color: var(--ink); font-weight: 700; }
.poster img { width: min(320px, 100%); border-radius: 4px; box-shadow: 0 12px 30px -16px rgba(0,0,0,.5); }

/* forms */
.form { display: grid; gap: 16px; max-width: 560px; margin-bottom: 18px; }
.form label { display: grid; gap: 6px; font-weight: 700; }
.form input, .form select, .form textarea {
  font: inherit;
  font-weight: 400;
  font-size: 16px; /* avoids zoom on iOS */
  padding: 11px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.form button { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 14px 16px; border-radius: var(--radius); font-weight: 700; }
.notice-ok { background: #e3f6e8; color: #0d4a22; }
.notice-err { background: #fde6e4; color: #7a1610; }

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

/* language menu */
.topbar { position: relative; }
.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1.5px solid var(--ink); border-radius: 999px; cursor: pointer; font-weight: 700; font-size: .9rem; user-select: none; -webkit-tap-highlight-color: transparent; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lang .lang-code { font-family: var(--display); font-weight: 800; letter-spacing: .04em; }
.lang summary .lang-name { font-weight: 400; }
.lang-chev { transition: transform .15s ease-out; }
.lang[open] .lang-chev { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; margin: 0; padding: 6px; list-style: none; min-width: 168px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius); box-shadow: 0 12px 28px -14px rgba(0,0,0,.45); transform-origin: top right; animation: lang-in .14s ease-out; }
.lang-menu a { display: flex; gap: 10px; align-items: baseline; padding: 9px 10px; border-radius: 4px; color: var(--ink); text-decoration: none; }
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--line); text-decoration: none; }
.lang-menu a[aria-current] { font-weight: 700; }
.lang-menu a[aria-current]::after { content: "✓"; margin-left: auto; }
.lang-menu .lang-code { width: 2.2em; color: var(--muted); font-size: .8rem; }
@keyframes lang-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .lang-menu { animation: none; } .lang-chev { transition: none; } }
@media (max-width: 560px) { .lang summary .lang-name { display: none; } }
.topbar-nav { margin-left: auto; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .key-rule { background: #1a0d05; color: #ffe3d1; border-left-color: var(--dgp); }
}
:root[data-theme="dark"] .key-rule { background: #1a0d05; color: #ffe3d1; }

/* rules: age groups */
.agesec { scroll-margin-top: 24px; border-top: 3px solid var(--ink); padding-top: 18px; }
.agetable { max-width: 640px; table-layout: fixed; }
.agetable thead th:nth-child(1) { width: 44%; }
.only { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--muted); font-size: .72rem; font-weight: 700; white-space: nowrap; vertical-align: 1px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 28px 0 16px; }
.cat { border: 1.5px solid var(--ink); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.cat h3 { font-size: 1.15rem; margin: 0; }
.cat-size { font-family: var(--body); font-weight: 400; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.cat-split { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.sex { padding: 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--ngp); color: var(--ngp-ink); }
.sex + .sex { background: var(--dgp); color: var(--dgp-ink); }
.sex-mix { background: linear-gradient(90deg, var(--ngp), var(--dgp)); color: #17140f; }
.cat-text { margin: 0; font-size: .92rem; }
.age-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.age-chips li { padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: .85rem; white-space: nowrap; }
.age-chips b { font-weight: 700; }
.cat .note { margin: 0; font-size: .85rem; }
@media (max-width: 560px) { .only { display: block; width: max-content; margin: 4px 0 0; } }
@media (max-width: 560px) { .agetable thead th:nth-child(1) { width: 36%; } }

/* bigger tap targets in the top bar without changing its height */
.topbar-nav a, .topbar-back, .topbar-mark { display: inline-block; padding: 10px 4px; margin: -10px -4px; }
.lang summary { position: relative; }
.lang summary::after { content: ""; position: absolute; inset: -8px -4px; }
.lang-menu a { min-height: 44px; align-items: center; }
/* long words (e.g. "Nybegynnerklasser") may hyphenate instead of overflowing narrow table cells */
.classes th, .classes td, .cat, .level-who, .key-rule { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }

/* start page: one stage light across both competition colours, under the posters (desktop only) */
@media (min-width: 721px) {
  .split { position: relative; isolation: isolate; }
  .split::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    /* stretched over the whole split, not repeated per half: the beams live in the outer corners */
    background: url("light-1920.webp") center / 100% 100% no-repeat;
    background-image: image-set(url("light-900.webp") 1x, url("light-1920.webp") 2x);
    mix-blend-mode: screen;
    opacity: .85;
    pointer-events: none;
  }
  .split .panel > * { position: relative; z-index: 2; }
}
