/* ==========================================================================
   joulujooks.ee — the one stylesheet of the Jõulujooks site (RULE 37.6).

   Nothing here is shared with site.css and no class from there is used on a
   Jõulujooks page: the two sites are meant to be separable (RULE 37.5).

   1. TOKENS — brought over by hand from joulujooks-handoff/tokens/tokens.css.
      A colour literal appears in this block and NOWHERE below it; everything
      else names a token. When the design package changes a value, this block
      is the only place that follows.
   ========================================================================== */

:root {
  /* raw — parent brand (CVI 2020) */
  --cvi-udu: #D9D9D6;
  --cvi-keskoo: #202A44;
  --cvi-kontrollpunkt: #FF6A14;
  /* raw — Jõulujooks exception */
  --jj-joulupunane: #C8102E;
  --jj-veinipunane: #7E0C1F;
  --jj-kuusk: #17614A;
  --jj-kuusk-tume: #104937;
  --jj-piparkook: #DED6D2;      /* replaces --cvi-udu as page surface */
  --jj-piparkook-hele: #EFE7E3;
  --jj-tint: #F3D9DD;
  --jj-tume-pruun: #3B2226;     /* replaces --cvi-keskoo as body text */
  --jj-hall: #7A6A66;
  --jj-joon: #C4B4B0;
  --jj-rada-pikk: #E35A12;      /* deviates from --cvi-kontrollpunkt — see spec §Contrast */
  --jj-rada-keskmine: #2F5FBF;
  --jj-rada-lyhike: #17614A;
  --jj-lilla: #8E2A8E;

  /* semantic */
  --color-surface: var(--jj-piparkook);
  --color-surface-raised: var(--jj-piparkook-hele);
  --color-surface-sponsor: var(--cvi-udu);
  --color-surface-dark: var(--cvi-keskoo);       /* footer, hero scrim, toast, mobile bar */
  --color-text: var(--jj-tume-pruun);
  --color-text-muted: var(--jj-hall);
  --color-text-on-dark: #FFFFFF;
  --color-text-on-dark-muted: var(--jj-tint);
  --color-accent: var(--jj-joulupunane);
  --color-accent-strong: var(--jj-veinipunane);
  --color-positive: var(--jj-kuusk);
  --color-border: var(--jj-joon);
  --color-focus: var(--jj-joulupunane);
  --color-course-long: var(--jj-rada-pikk);
  --color-course-medium: var(--jj-rada-keskmine);
  --color-course-short: var(--jj-rada-lyhike);

  /* type */
  --font-family: 'Exo', system-ui, sans-serif;
  --step--1: clamp(0.83rem, 0.79rem + 0.2vw, 0.94rem);
  --step-0:  clamp(1rem, 0.95rem + 0.25vw, 1.13rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.44rem, 1.26rem + 0.9vw, 2rem);
  --step-3:  clamp(1.73rem, 1.43rem + 1.5vw, 2.66rem);
  --step-4:  clamp(2.07rem, 1.6rem + 2.4vw, 3.55rem);
  --display: clamp(2.5rem, 1.2rem + 6.5vw, 7rem);
  --weight-regular: 400; --weight-semibold: 600; --weight-bold: 700; --weight-extrabold: 800; --weight-black: 900;
  --line-tight: 1.1; --line-body: 1.5;

  /* space — 4px grid */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-7: 28px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-14: 56px; --space-16: 64px;
  --section-y: clamp(4rem, 9vw, 9rem);
  --gutter: clamp(1rem, 4vw, 2rem);
  --container: 1240px;
  --container-narrow: 1000px;
  --tap-min: 44px; --tap-min-touch: 48px;

  /* radius */
  --radius-0: 0; --radius-1: 4px; --radius-2: 8px; --radius-pill: 999px;

  /* shadow — two levels */
  --shadow-1: 0 6px 24px rgba(59, 34, 38, .28);
  --shadow-2: 0 12px 28px rgba(0, 0, 0, .30);

  /* motion */
  --dur-instant: 120ms; --dur-quick: 200ms; --dur-base: 320ms; --dur-slow: 520ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-punch: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* breakpoints (reference — use in media queries) */
  --bp-sm: 600px; --bp-md: 900px; --bp-lg: 1200px; --bp-xl: 1600px;

  /* z-index */
  --z-route: 5; --z-header: 60; --z-mobile-bar: 65; --z-top-button: 70;
  --z-modal-register: 90; --z-modal: 95; --z-toast: 96; --z-lightbox: 97; --z-punch: 999;

  /* header */
  --header-h: 80px;            /* desktop; ~124px below 900px (nav wraps to 2nd row) */

  /* additions — not in the package, needed by the shell */
  --color-on-accent: #FFFFFF;                    /* text and button fill on the red header */
  --header-nav-h: 44px;                          /* the nav row below 900 px */
  --header-pad-y: 16px;                          /* 3 + 16 + 44 + 16 = 79, the prototype's desktop header */
  --text-xs: 13px; --text-sm: 14px; --text-md: 16px;   /* the prototype's fixed UI sizes: nav, buttons, footer */
  --color-rule-on-dark: rgba(217, 217, 214, .2);       /* --cvi-udu at 20 %: the footer divider */
  --color-track-on-accent: rgba(255, 255, 255, .2);    /* the scroll-progress track */
  --jj-kuusk-hele: #D8E8E1;                            /* body text on the green gift card */
  /* white, thinned — rules, tracks and fills on the red and wine surfaces */
  --white-05: rgba(255, 255, 255, .05); --white-14: rgba(255, 255, 255, .14); --white-15: rgba(255, 255, 255, .15);
  --white-20: rgba(255, 255, 255, .2);  --white-28: rgba(255, 255, 255, .28); --white-30: rgba(255, 255, 255, .3);
  --white-45: rgba(255, 255, 255, .45); --white-65: rgba(255, 255, 255, .65); --white-75: rgba(255, 255, 255, .75);
  /* Kesköö, thinned — the hero scrim and the veil over a photo */
  --keskoo-00: rgba(32, 42, 68, 0); --keskoo-35: rgba(32, 42, 68, .35); --keskoo-55: rgba(32, 42, 68, .55);
  --keskoo-62: rgba(32, 42, 68, .62); --keskoo-88: rgba(32, 42, 68, .88);
  /* Veinipunane, thinned — the hero's scrim (red since 14.10.2026, was Kesköö) */
  --vein-00: rgba(126, 12, 31, 0); --vein-55: rgba(126, 12, 31, .55);
  --vein-62: rgba(126, 12, 31, .62); --vein-88: rgba(126, 12, 31, .88);
  --accent-06: rgba(200, 16, 46, .06);                 /* a schedule row under the pointer */
  --shadow-card: 0 12px 26px rgba(59, 34, 38, .25);    /* a course card lifted */
  --shadow-cta: 0 12px 28px rgba(0, 0, 0, .3);         /* the hero button lifted */
  --jj-rada-keskmine-hele: #3D6FD6;                    /* the guide table's blue dot */
  --jj-hall-tume: #5E5552;                             /* fine print in a dialog */
  --kuusk-12: rgba(23, 97, 74, .12);                   /* the green guide tab at rest */
  --shadow-green: 0 10px 24px rgba(23, 97, 74, .3);    /* the order button lifted */
  --veil: rgba(59, 34, 38, .7);                        /* behind a dialog */
  --color-field: #FFFFFF;                              /* form inputs */
  --veil-dark: rgba(30, 16, 19, .62);                  /* behind the cookie dialog */
  --shadow-dialog: 0 18px 48px rgba(0, 0, 0, .45);
  --shadow-fab: 0 8px 24px rgba(59, 34, 38, .35);
}
/* Below 900 px the header is one compact row: logo, and a menu in the corner. */
@media (max-width: 899px) { :root { --header-h: 63px; } }

/* ==========================================================================
   2. FONT — Exo, served from this host. Two variable files per style (Latin,
   Latin Extended) cover 400–900; õ ä ö ü sit in the first, š ž in the second,
   and the browser fetches the second only when a page actually uses them.
   ========================================================================== */

@font-face { font-family: 'Exo'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('/assets/joulujooks/fonts/exo-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: 'Exo'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('/assets/joulujooks/fonts/exo-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'Exo'; font-style: italic; font-weight: 400 900; font-display: swap; src: url('/assets/joulujooks/fonts/exo-italic-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: 'Exo'; font-style: italic; font-weight: 400 900; font-display: swap; src: url('/assets/joulujooks/fonts/exo-italic-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ==========================================================================
   3. BASE
   ========================================================================== */

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

html {
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--step-0);
  line-height: var(--line-body);
  /* Estonian compounds (Linnaorienteerumise, ajavõtukiibi) do not fit a 360 px
     column whole; `lang="et"` on <html> is what lets the browser hyphenate. */
  hyphens: auto;
  overflow-wrap: break-word;
}

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

a { color: inherit; }

h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--cvi-udu), 0 0 0 4px var(--color-focus);
}

.jj-skip {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: var(--z-punch);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-dark);
  color: var(--color-text-on-dark);
}
.jj-skip:focus { top: var(--space-4); }

/* The organiser's preview strip. In the page's flow, above the header, so it
   cannot be mistaken for part of the design or cover any of it. */
.jj-preview { padding: 8px var(--gutter); background: var(--jj-lilla); color: var(--color-on-accent); font-size: var(--text-sm); text-align: center; }
.jj-preview a { margin-left: 8px; font-weight: var(--weight-bold); }
.jj-preview--test { background: var(--color-surface-dark); }

.jj-wrap {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.jj-wrap--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }

.jj-section { padding-block: var(--section-y); }

.jj-display {
  font-size: var(--display);
  font-style: italic;
  font-weight: var(--weight-black);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  /* The one word that must never break mid-way, even at 360 px. */
  hyphens: none;
}

.jj-h2 {
  font-size: var(--step-3);
  font-style: italic;
  font-weight: var(--weight-black);
  line-height: var(--line-tight);
  text-transform: uppercase;
}

.jj-lead {
  max-width: 34em;
  font-size: var(--step-1);
  line-height: 1.35;
}

/* ==========================================================================
   4. BUTTONS — the prototype's primary button: 44 px, white on red, and it
   turns dark on hover rather than lifting.
   ========================================================================== */

.jj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 0 clamp(14px, 3vw, 24px);
  border: 0;
  border-radius: var(--radius-0);
  font: inherit;
  font-size: var(--text-md);
  font-style: italic;
  font-weight: var(--weight-extrabold);
  line-height: var(--line-tight);
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-quick) var(--ease-out), color var(--dur-quick) var(--ease-out), transform var(--dur-instant) var(--ease-out);
}
.jj-btn:active { transform: scale(.97); }

/* On the red header, on photos and on the dark bar: white fill, red text. */
.jj-btn--primary { background: var(--color-on-accent); color: var(--color-accent); }
.jj-btn--primary:hover { background: var(--jj-tume-pruun); color: var(--color-on-accent); }
/* On the page surface: red fill, white text. */
.jj-btn--accent { background: var(--color-accent); color: var(--color-on-accent); }
.jj-btn--accent:hover { background: var(--color-accent-strong); }
.jj-btn--block { display: flex; width: 100%; min-height: var(--tap-min-touch); }

/* ==========================================================================
   5. HEADER — red, sticky. One row from 900 px; below that the nav drops to a
   row of its own (three short words, no hamburger — RULE 37.13).
   Sizes are the prototype's: 32×40 shield, 14 px wordmark, 16 px nav.
   ========================================================================== */

.jj-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--color-accent);
  color: var(--color-on-accent);
}
/* The header's own focus ring: red on red would vanish. */
.jj-header :focus-visible { box-shadow: 0 0 0 2px var(--color-accent), 0 0 0 4px var(--color-on-accent); }

.jj-progress { height: 3px; background: var(--color-track-on-accent); }
/* Filled by the script as the page scrolls; without it, an empty track. */
.jj-progress-fill { height: 3px; background: var(--color-on-accent); transform: scaleX(0); transform-origin: left; }

.jj-header-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--space-4);
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding: var(--header-pad-y) var(--gutter);
}

.jj-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--tap-min);
  text-decoration: none;
}
.jj-logo img { width: 32px; height: 40px; }
.jj-logo-word {
  font-size: var(--text-sm);
  font-style: italic;
  font-weight: var(--weight-black);
  line-height: 1;
  letter-spacing: 0.02em;
  hyphens: none;
}

.jj-nav { display: flex; align-items: center; gap: 6px; }
.jj-nav a {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  min-height: var(--tap-min);
  padding: 3px 14px 0;
  border-bottom: 3px solid transparent;
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--dur-quick) var(--ease-out);
}
.jj-nav a:hover { opacity: .75; }
.jj-nav a[aria-current="page"] { border-bottom-color: currentColor; }

.jj-header-side { display: flex; align-items: center; gap: var(--space-4); }

@media (min-width: 900px) {
  /* Logo and action take equal shares so the nav sits on the page's centre
     line whatever the button says. */
  .jj-logo, .jj-header-side { flex: 1; }
  .jj-header-side { justify-content: flex-end; }
}

/* The corner menu — phones and tablets only. */
.jj-menu { display: none; }

@media (max-width: 899px) {
  .jj-header-in { padding-block: 0; flex-wrap: nowrap; }
  .jj-logo { min-height: calc(var(--header-h) - 3px); }
  .jj-logo img { width: 26px; height: 33px; }
  .jj-logo-word { font-size: 12px; }
  /* The row of links and the action both leave the header: the links fold
     into the menu, the action is in the bottom bar. */
  .jj-nav, .jj-header-side { display: none; }

  .jj-menu { display: block; margin-right: -10px; }
  .jj-menu summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--tap-min-touch);
    height: var(--tap-min-touch);
    cursor: pointer;
    list-style: none;
  }
  .jj-menu summary::-webkit-details-marker { display: none; }
  /* Three bars; an X when the menu is open. */
  .jj-menu-ic, .jj-menu-ic::before, .jj-menu-ic::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform var(--dur-quick) var(--ease-out), opacity var(--dur-quick);
  }
  .jj-menu-ic { position: relative; }
  .jj-menu-ic::before, .jj-menu-ic::after { content: ''; position: absolute; left: 0; }
  .jj-menu-ic::before { top: -7px; }
  .jj-menu-ic::after { top: 7px; }
  .jj-menu[open] .jj-menu-ic { background: transparent; }
  .jj-menu[open] .jj-menu-ic::before { transform: translateY(7px) rotate(45deg); }
  .jj-menu[open] .jj-menu-ic::after { transform: translateY(-7px) rotate(-45deg); }

  .jj-menu-panel {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 6px var(--gutter) 12px;
    background: var(--color-accent-strong);
    box-shadow: var(--shadow-1);
  }
  .jj-menu-panel a {
    display: flex;
    align-items: center;
    min-height: var(--tap-min-touch);
    border-bottom: 1px solid var(--white-14);
    font-size: var(--text-md);
    font-weight: var(--weight-bold);
    text-decoration: none;
  }
  .jj-menu-panel a:last-child { border-bottom: 0; }
  .jj-menu-panel a[aria-current="page"] { font-style: italic; font-weight: var(--weight-black); }
}

/* ==========================================================================
   6. HOME PAGE — sizes are the prototype's own numbers, section by section.
   One breakpoint, 900 px, as in the prototype; the grids below it reflow by
   themselves (auto-fit), so most sections need no media query at all.
   ========================================================================== */

/* Section headings: "Vali oma rada", "Päeva kava", "Osavõtutasud". */
.jj-h {
  color: var(--color-accent-strong);
  font-size: clamp(30px, 4vw, 40px);
  font-style: italic;
  font-weight: var(--weight-black);
  line-height: 1.2;
}
.jj-h--on-accent { color: inherit; }

.jj-more {
  display: inline-block;
  padding: 12px 0;
  color: var(--color-accent);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  text-decoration: none;
}
.jj-more:hover { color: var(--color-accent-strong); }

/* ---- hero ----------------------------------------------------------------
   The prototype's header floats over a 720 px hero; here the header is in the
   flow (sticky), so the hero is that much shorter and the visible photo is the
   same. */
.jj-hero {
  position: relative;
  height: calc(100dvh - var(--header-h));
  min-height: calc(560px - var(--header-h));
  max-height: calc(720px - var(--header-h));
  overflow: hidden;
  background: var(--color-accent-strong);
  color: var(--color-text-on-dark);
}
.jj-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/*
 * Four photos take turns, six seconds each. The first never moves; the other
 * three fade in over it one after another and out again, so when all three
 * are clear the first is what shows. Pure CSS — and switched off entirely for
 * a visitor who asked for less motion, who simply sees the first photo.
 */
.jj-hero-img--more { opacity: 0; animation: jjhero 24s infinite; }
.jj-hero-img--2 { animation-delay: 6s; }
.jj-hero-img--3 { animation-delay: 12s; }
.jj-hero-img--4 { animation-delay: 18s; }
@keyframes jjhero {
  0% { opacity: 0; }
  6% { opacity: 1; }
  25% { opacity: 1; }
  31% { opacity: 0; }
  100% { opacity: 0; }
}
.jj-hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--vein-55), var(--vein-00) 55%),
    radial-gradient(ellipse 80% 90% at 0% 100%, var(--vein-88) 0%, var(--vein-62) 45%, var(--vein-00) 100%);
}
.jj-hero-in {
  position: absolute;
  inset: auto 0 0 0;
  max-width: calc(var(--container) + 2 * clamp(16px, 5vw, 32px));
  margin-inline: auto;
  padding: 0 clamp(16px, 5vw, 32px) 44px;
}
.jj-hero-in { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.jj-hero-text { max-width: 700px; min-width: 0; }
.jj-hero-sponsor { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-bottom: 6px; }
.jj-hero-sponsor-label { color: var(--jj-tint); font-size: 11px; font-weight: var(--weight-extrabold); letter-spacing: .16em; text-transform: uppercase; }
.jj-hero-sponsor-name { font-size: 22px; font-style: italic; font-weight: var(--weight-black); line-height: 1.1; }

.jj-hero-eyebrow {
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: var(--weight-bold);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.jj-hero-title {
  margin-left: -4px;
  padding-top: 4px;
  font-size: clamp(2.5rem, 11vw, 5rem);
  font-style: italic;
  font-weight: var(--weight-black);
  line-height: 1.1;
  hyphens: none;
}
.jj-hero-title--past { font-size: clamp(2.2rem, 9vw, 4.1rem); line-height: 1.06; }
.jj-hero-sub {
  max-width: 560px;
  margin-top: 8px;
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.4;
  text-wrap: pretty;
}
.jj-hero-sub--lead { max-width: 620px; font-weight: var(--weight-semibold); }

.jj-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; }
.jj-hero-actions:empty { display: none; }

.jj-btn--hero {
  min-height: 0;
  padding: 16px clamp(24px, 6vw, 38px);
  font-size: 18px;
  transition: transform var(--dur-quick) var(--ease-out), box-shadow var(--dur-quick);
}
.jj-btn--hero:hover { background: var(--color-on-accent); color: var(--color-accent); transform: translateY(-2px); box-shadow: var(--shadow-cta); }
.jj-btn--hero:active { transform: scale(.97); }

.jj-btn--ghost {
  min-height: 0;
  padding: 14px 26px;
  border: 2px solid var(--white-75);
  background: var(--white-20);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--color-on-accent);
  font-style: normal;
  font-weight: var(--weight-bold);
  text-transform: none;
}
.jj-btn--ghost:hover { border-color: var(--color-on-accent); background: var(--white-28); }

.jj-countdown { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-top: 26px; }
.jj-countdown-big {
  font-size: clamp(34px, 5vw, 52px);
  font-style: italic;
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-black);
  line-height: 1;
}
.jj-countdown-line { color: var(--jj-tint); font-size: var(--text-md); font-weight: var(--weight-semibold); }
/* "rajal · finiš suletakse" is the stopwatch's caption: no stopwatch, no caption. */
[data-since][hidden] + .jj-countdown-line--watch { display: none; }

.jj-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 5px 13px;
  background: var(--color-on-accent);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: var(--weight-extrabold);
}
.jj-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-accent); animation: jjpulse 2s ease-in-out infinite; }
@keyframes jjpulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

/* ---- mis: two rows of three cards ---------------------------------------- */
.jj-mis {
  max-width: calc(var(--container) + 2 * clamp(16px, 5vw, 32px));
  margin-inline: auto;
  padding: 64px clamp(16px, 5vw, 32px) 90px;
}
.jj-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 26px; }
.jj-cards--who { margin-top: 36px; }
.jj-card-img { width: 100%; height: 230px; object-fit: cover; }
.jj-card--who .jj-card-img { height: 200px; }
.jj-card-title { margin-top: 14px; color: var(--color-accent-strong); font-size: 22px; font-weight: var(--weight-extrabold); line-height: 1.5; }
.jj-card--who .jj-card-title { margin-top: 12px; font-size: 20px; }
.jj-card-body { margin-top: 4px; font-size: var(--text-md); line-height: 1.5; }

.jj-dots { display: flex; flex-direction: column; gap: 5px; margin: 6px 0 0; padding: 0; font-size: var(--text-md); list-style: none; }
.jj-dots li { position: relative; padding-left: 16px; }
.jj-dots li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ---- kostüümiboonus ------------------------------------------------------- */
.jj-bonus {
  position: relative;
  overflow: hidden;
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
}
.jj-bonus::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, var(--white-05) 0 2px, transparent 2px 11px);
}
.jj-bonus-in {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  align-items: center;
  gap: 56px;
  max-width: calc(var(--container) + 2 * clamp(16px, 5vw, 32px));
  margin-inline: auto;
  padding: var(--section-y) clamp(16px, 5vw, 32px);
}
.jj-bonus-title { font-size: clamp(44px, 6vw, 64px); font-style: italic; font-weight: var(--weight-black); line-height: .95; hyphens: none; }
.jj-bonus-lead { max-width: 470px; margin-top: 18px; color: var(--jj-tint); font-size: 19px; line-height: 1.5; text-wrap: pretty; }
.jj-bonus-img { width: 100%; height: auto; max-height: min(620px, 80vh); aspect-ratio: 4 / 5; object-fit: cover; }

.jj-gate { max-width: 480px; margin-top: 26px; }
.jj-gate svg { display: block; overflow: visible; }
.jj-gate-straight { fill: none; stroke: var(--white-30); stroke-width: 2; stroke-dasharray: 4 6; }
.jj-gate-detour { fill: none; stroke: var(--white-65); stroke-width: 2; }
.jj-gate-post, .jj-gate-a { fill: var(--color-on-accent); }
.jj-gate-b { fill: none; stroke: var(--color-on-accent); stroke-width: 2.5; }
.jj-gate-label { fill: var(--jj-tint); font: 700 11px var(--font-family); letter-spacing: .14em; }
.jj-gate-num { fill: var(--color-on-accent); font: italic 900 38px var(--font-family); }
.jj-gate-key { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 6px; color: var(--jj-tint); font-size: var(--text-xs); }
.jj-gate-key span { display: flex; align-items: center; gap: 7px; }
.jj-key-a { width: 10px; height: 10px; border-radius: 50%; background: var(--color-on-accent); }
.jj-key-b { width: 12px; height: 12px; border: 2px solid var(--color-on-accent); border-radius: 50%; }

.jj-tiers { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.jj-tier { flex: 1 1 180px; padding: 22px 24px; background: var(--color-accent); }
.jj-tier-gates { display: flex; gap: 8px; margin-bottom: 12px; }
/* A gate, as the map draws one: two posts and a bar, in a ring. */
.jj-gate-ic {
  position: relative;
  width: 38px;
  height: 38px;
  border: 3px solid var(--color-on-accent);
  border-radius: 50%;
  background:
    linear-gradient(var(--color-on-accent), var(--color-on-accent)) 9px 9px / 3px 14px no-repeat,
    linear-gradient(var(--color-on-accent), var(--color-on-accent)) 12px 11px / 9px 3px no-repeat,
    linear-gradient(var(--color-on-accent), var(--color-on-accent)) 21px 9px / 3px 14px no-repeat;
}
.jj-gate-ic--none { border: 3px dashed var(--white-45); background: none; }
.jj-tier-name { font-size: 17px; font-weight: var(--weight-extrabold); line-height: 1.5; }
.jj-tier-note { color: var(--jj-tint); font-size: var(--text-xs); }
.jj-tier-num { margin-top: 8px; font-size: 40px; font-style: italic; font-weight: var(--weight-black); line-height: 1; white-space: nowrap; }

/* ---- rajad + kava --------------------------------------------------------- */
.jj-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  align-items: start;
  gap: 56px;
  max-width: calc(var(--container) + 2 * clamp(16px, 5vw, 32px));
  margin-inline: auto;
  padding: var(--section-y) clamp(16px, 5vw, 32px);
}

.jj-courses { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.jj-course {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 16px 20px;
  color: var(--color-on-accent);
  text-decoration: none;
  transition: transform var(--dur-quick) var(--ease-out), box-shadow var(--dur-quick); }
.jj-course:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.jj-course--long { background: var(--color-course-long); }
.jj-course--medium { background: var(--color-course-medium); }
.jj-course--short { background: var(--color-course-short); }
.jj-course:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--cvi-udu), 0 0 0 4px var(--color-focus); }
.jj-course-name { display: block; font-size: 20px; font-style: italic; font-weight: var(--weight-black); line-height: 1.5; }
.jj-course-who { display: block; font-size: var(--text-sm); }
.jj-course-right { display: flex; align-items: center; gap: 14px; }
.jj-course-km { font-size: clamp(24px, 3vw, 28px); font-style: italic; font-weight: var(--weight-black); white-space: nowrap; }
.jj-course-arrow { font-size: 22px; font-weight: var(--weight-black); line-height: 1; }

.jj-schedule { display: flex; flex-direction: column; margin: 24px 0 0; padding: 0; font-size: 17px; list-style: none; }
.jj-schedule li {
  display: flex;
  gap: 16px;
  padding: 11px 8px;
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--dur-quick);
}
.jj-schedule li:last-child { border-bottom: 0; }
.jj-schedule li:hover { background: var(--accent-06); }
.jj-schedule b { flex: none; width: 64px; }
.jj-schedule-note { color: var(--color-accent); font-weight: var(--weight-bold); }
.jj-kava-note { margin-top: 16px; padding-left: 8px; font-size: var(--text-md); }
.jj-schedule .is-strong { align-items: baseline; padding-block: 13px; color: var(--color-accent); font-size: 22px; font-style: italic; font-weight: var(--weight-bold); }

/* ---- hinnad --------------------------------------------------------------- */
.jj-prices { background: var(--color-accent); color: var(--color-on-accent); }
.jj-prices-in {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  align-items: start;
  gap: 56px;
  max-width: calc(var(--container) + 2 * clamp(16px, 5vw, 32px));
  margin-inline: auto;
  padding: var(--section-y) clamp(16px, 5vw, 32px);
}

.jj-price-table { width: 100%; margin-top: 22px; border-collapse: collapse; font-size: var(--text-md); table-layout: fixed; }
.jj-price-table thead td { width: 42.857%; }
.jj-price-table th, .jj-price-table td { padding: 13px 14px; border-bottom: 1px solid var(--white-20); text-align: left; font-weight: var(--weight-regular); }
.jj-price-table thead th, .jj-price-table thead td { padding-block: 12px; border-bottom-color: var(--white-30); }
.jj-price-table tbody tr:last-child > * { border-bottom: 0; }
.jj-price-table th[scope="row"] { padding-left: 0; }
.jj-price-table thead th b { display: block; font-style: italic; }
.jj-price-table thead th span { display: block; font-size: 12px; }
.jj-price-table tbody td { font-weight: var(--weight-extrabold); }
/* The round in force: a lighter column with a white bar across its top. The
   other round is legible but stepped back. */
.jj-price-table .is-active { background: var(--white-15); }
.jj-price-table thead .is-active { box-shadow: inset 0 3px 0 var(--color-on-accent); }
.jj-price-table:has(.is-active) .is-idle { opacity: .55; }
.jj-prices-cta { margin-top: 26px; padding-inline: 36px; }
/* Home page: the round in force and its last day, in place of the table. */
.jj-price-key { margin-top: 22px; padding: 14px 18px; background: var(--white-15); box-shadow: inset 3px 0 0 var(--color-on-accent); font-size: var(--text-md); }
.jj-price-key b { display: block; font-style: italic; }
.jj-more--on-accent { margin-top: 10px; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.jj-more--on-accent:hover { color: inherit; text-decoration-thickness: 2px; }
/* Under the table: who the family price is for, and — after the last round —
   that a place is had only if one is free. On the home page's accent ground
   and on the guide's light one alike. */
.jj-price-note { margin-top: 10px; font-size: 14px; opacity: .85; }
.jj-price-late { display: inline-block; margin-top: 14px; padding: 8px 14px; border: 2px solid currentColor; font-style: italic; font-weight: var(--weight-extrabold); }
.jj-guide-body > .jj-price-late { color: var(--color-accent); }

.jj-includes { padding: 26px 28px 28px; background: var(--color-accent-strong); }
.jj-includes-title { font-size: 24px; font-style: italic; font-weight: var(--weight-black); line-height: 1.5; }
.jj-includes ul { margin: 14px 0 0; padding: 0; list-style: none; }
.jj-includes li { position: relative; padding: 9px 0 9px 19px; border-bottom: 1px solid var(--white-14); font-size: var(--text-md); }
.jj-includes li:last-child { border-bottom: 0; }
.jj-includes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-on-accent);
}

.jj-gift {
  display: block;
  margin-top: 16px;
  padding: 20px 22px;
  background: var(--jj-kuusk);
  color: var(--color-on-accent);
  text-decoration: none;
  transition: transform var(--dur-quick) var(--ease-out), background-color var(--dur-quick);
}
.jj-gift:hover { background: var(--jj-kuusk-tume); transform: translateY(-2px); }
.jj-gift:active { transform: scale(.99); }
.jj-gift-head { display: flex; align-items: center; justify-content: space-between; }
.jj-gift-title { font-size: 19px; font-style: italic; font-weight: var(--weight-black); }
.jj-gift-arrow { font-size: 20px; font-weight: var(--weight-extrabold); }
.jj-gift-body { display: block; margin-top: 5px; color: var(--jj-kuusk-hele); font-size: var(--text-sm); line-height: 1.5; }

/* ---- eelmine aastakäik: one large photo and four small -------------------- */
.jj-past {
  max-width: calc(var(--container) + 2 * clamp(16px, 5vw, 32px));
  margin-inline: auto;
  padding: var(--section-y) clamp(16px, 5vw, 32px);
}
.jj-past-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; }

.jj-gallery { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 220px 140px 140px; gap: 8px; margin-top: 22px; }
.jj-gallery a { display: block; overflow: hidden; cursor: zoom-in; }
.jj-gallery picture { display: block; height: 100%; }
.jj-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-quick) var(--ease-out); }
.jj-gallery a:hover img { transform: scale(1.03); }
.jj-gallery-main { grid-column: span 2; }

@media (min-width: 600px) {
  .jj-gallery { grid-template-columns: 1.6fr 1fr 1fr; grid-template-rows: 196px 196px; }
  .jj-gallery-main { grid-column: auto; grid-row: span 2; }
}

/* ---- toetajad: three tiers on the grey of the parent brand ----------------- */
.jj-sponsors { background: var(--color-surface-sponsor); }
.jj-sponsors-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  max-width: calc(var(--container) + 2 * clamp(16px, 5vw, 32px));
  margin-inline: auto;
  padding: var(--section-y) clamp(16px, 5vw, 32px);
}
.jj-sponsor-tier { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.jj-sponsor-label { color: var(--jj-hall-tume); font-size: 12px; font-weight: var(--weight-extrabold); letter-spacing: .16em; text-transform: uppercase; }
.jj-sponsor-grid { display: flex; flex-wrap: wrap; justify-content: center; max-width: 800px; }
.jj-sponsor-grid--partner { max-width: 640px; }
/* A sponsor is quiet until looked at: grey and stepped back, full on hover. */
.jj-sponsor {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  font-style: italic;
  font-weight: var(--weight-black);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  filter: grayscale(1);
  opacity: .7;
  transition: filter var(--dur-quick), opacity var(--dur-quick);
}
.jj-sponsor:hover { filter: none; opacity: 1; }
.jj-sponsor--main { width: 280px; max-width: 100%; height: 120px; padding: 24px; font-size: 30px; }
.jj-sponsor--supporter { width: 200px; max-width: 50%; height: 88px; padding: clamp(12px, 4vw, 24px); font-size: 20px; }
.jj-sponsor--partner { width: 160px; max-width: 50%; height: 72px; padding: clamp(10px, 3vw, 20px); font-size: var(--text-md); font-weight: var(--weight-extrabold); }
/* A logo fills its cell and keeps its proportions. Logo cells are wider than
   name cells: an institution's wordmark is long and unreadable at 120 px. */
.jj-sponsor img { width: 100%; height: 100%; object-fit: contain; }
.jj-sponsor--partner.has-logo { width: 240px; height: 84px; padding: 12px 16px; }
.jj-sponsor--supporter.has-logo { width: 240px; height: 96px; padding: 14px 18px; }
.jj-sponsor--main.has-logo { width: 340px; height: 130px; }
.jj-sponsor-slot { display: flex; width: 200px; max-width: 50%; height: 88px; padding: 12px; }
.jj-sponsor-slot a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--jj-hall);
  color: var(--jj-hall-tume);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-decoration: none;
  transition: border-color var(--dur-quick), color var(--dur-quick);
}
.jj-sponsor-slot a:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ---- inner pages: the wine band and the narrow column --------------------- */
.jj-prose p { max-width: 38em; margin-top: var(--space-4); }

.jj-band {
  /* 140 px in the prototype, of which the floating header covers its own height. */
  padding: calc(140px - var(--header-h)) clamp(16px, 5vw, 32px) 60px;
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
}
.jj-band-in { max-width: var(--container-narrow); margin-inline: auto; }
.jj-band-title { font-size: clamp(34px, 10vw, 64px); font-style: italic; font-weight: var(--weight-black); line-height: 1; text-wrap: balance; hyphens: none; }
.jj-band-lead { max-width: 620px; margin-top: 12px; color: var(--jj-tint); font-size: 18px; }

/* ---- juhend --------------------------------------------------------------- */
.jj-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  max-width: calc(var(--container-narrow) + 2 * clamp(16px, 5vw, 32px));
  margin-inline: auto;
  padding: 20px clamp(16px, 5vw, 32px) 100px;
}
.jj-guide-nav {
  display: flex;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
}
.jj-guide-nav::-webkit-scrollbar { display: none; }
.jj-guide-nav a {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 12px;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.jj-guide-nav a[aria-current="page"] { background: var(--color-accent); color: var(--color-on-accent); }
.jj-guide-nav a.is-green { background: var(--kuusk-12); color: var(--jj-kuusk); }
.jj-guide-nav a.is-green[aria-current="page"] { background: var(--jj-kuusk); color: var(--color-on-accent); }
/* Phone and tablet: every section in view, wrapped onto as many rows as it
   takes. A sideways-scrolling strip hid most of the eight and gave no sign
   that there was more (user, 21.10.2026). Each link is a bordered chip so it
   reads as a button, not as a line of text. */
@media (max-width: 899.98px) {
  .jj-guide-nav { flex-wrap: wrap; gap: 8px; overflow-x: visible; font-size: 15px; }
  .jj-guide-nav a { min-height: 40px; padding: 0 12px; border: 1px solid var(--color-border); white-space: normal; }
  .jj-guide-nav a[aria-current="page"] { border-color: var(--color-accent); }
  .jj-guide-nav a.is-green { border-color: transparent; }
}

@media (min-width: 900px) {
  .jj-guide { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-top: 48px; }
  .jj-guide-nav { position: sticky; top: calc(var(--header-h) + 50px); flex-direction: column; }
}

.jj-guide-body { min-width: 0; font-size: var(--text-md); line-height: 1.6; }
.jj-guide-body > p + p, .jj-guide-body > .jj-scroll-x + p, .jj-faq + p { margin-top: 14px; }
.jj-guide-h {
  margin-bottom: 18px;
  color: var(--color-accent-strong);
  font-size: clamp(26px, 7vw, 34px);
  font-style: italic;
  font-weight: var(--weight-black);
  line-height: 1.15;
  text-wrap: balance;
}
.jj-guide-h--tight { margin-bottom: 8px; }
.jj-guide-intro { max-width: 620px; margin-bottom: 24px; }
.jj-guide-intro p + p { margin-top: 14px; }
.jj-guide-text p + p { margin-top: 12px; }
/* Ajakava ja registreerimine: the worked example under the payment terms —
   secondary to the terms, but in a tinted box so it is not missed. */
.jj-guide-note { margin-top: 14px; padding: 12px 16px; border-left: 3px solid var(--color-accent); background: var(--accent-06); font-size: var(--text-sm); font-style: italic; }
.jj-guide-body > .jj-guide-gap { margin-top: 22px; }
.jj-guide-body > .jj-guide-tight { margin-top: 10px; }

.jj-scroll-x { overflow-x: auto; }
.jj-guide-table { width: 100%; min-width: 600px; border-top: 2px solid var(--color-accent); border-collapse: collapse; table-layout: fixed; }
.jj-guide-table th, .jj-guide-table td { padding: 14px 0; border-top: 1px solid var(--color-border); text-align: left; font-weight: var(--weight-regular); }
.jj-guide-table thead th { padding-block: 12px; border-top: 0; font-weight: var(--weight-extrabold); }
.jj-guide-table th:first-child { width: 18%; }
.jj-guide-table td { padding-right: 12px; }
.jj-guide-codes { color: var(--color-text-muted); white-space: nowrap; }
.jj-guide-table tbody th { font-weight: var(--weight-bold); }
/* Ajakava ja registreerimine: the home page's schedule and price table on the
   guide's light ground. The round in force gets the home page's treatment in
   the accent's tint — a shaded column with a bar across its top. */
.jj-guide-sub { color: var(--color-accent-strong); font-size: 20px; font-style: italic; font-weight: var(--weight-black); line-height: 1.3; }
.jj-guide-sub--gap { margin-top: 34px; margin-bottom: 12px; }
.jj-schedule--guide { margin-top: 10px; }
.jj-guide-table--rounds { min-width: 0; }
.jj-guide-table--rounds thead td { width: 40%; border-top: 0; }
.jj-guide-table--rounds th[scope="col"], .jj-guide-table--rounds td { padding-inline: clamp(8px, 2.5vw, 14px); }
.jj-guide-table--rounds thead th b { display: block; font-style: italic; }
.jj-guide-table--rounds thead th span { display: block; font-size: 12px; font-weight: var(--weight-regular); }
.jj-guide-table--rounds tbody td { font-weight: var(--weight-extrabold); }
.jj-guide-table--rounds .is-active { background: var(--accent-06); }
.jj-guide-table--rounds thead .is-active { box-shadow: inset 0 3px 0 var(--color-accent); }
.jj-guide-table--rounds:has(.is-active) .is-idle { opacity: .55; }
.jj-includes--guide { margin-top: 26px; color: var(--color-on-accent); }

.jj-dot { display: inline-block; width: 11px; height: 11px; margin-right: 8px; border-radius: 50%; }
.jj-dot--long { background: var(--cvi-kontrollpunkt); }
.jj-dot--medium { background: var(--jj-rada-keskmine-hele); }
.jj-dot--short { background: var(--jj-kuusk); }

.jj-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: start; gap: 32px; }
.jj-legend p + p { margin-top: 14px; }
.jj-legend-sample { padding: 18px 20px; border: 1px solid var(--color-border); background: var(--color-surface-raised); }
.jj-legend-cap { margin-bottom: 8px; color: var(--color-accent); font-size: 12px; font-style: italic; font-weight: var(--weight-bold); }
.jj-legend-lines { color: var(--jj-lilla); font-weight: var(--weight-semibold); line-height: 1.9; }
.jj-legend-img { width: 100%; height: auto; margin-top: 26px; aspect-ratio: 16 / 9; object-fit: cover; }

.jj-places { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; }
.jj-place { padding-left: 16px; border-left: 4px solid var(--color-accent); }
.jj-place b { color: var(--color-accent-strong); font-size: 19px; font-style: italic; }
.jj-place--finish { border-left-color: var(--jj-kuusk); }
.jj-place--finish b { color: var(--jj-kuusk); }

.jj-faq { margin-top: 22px; border-bottom: 1px solid var(--color-border); }
.jj-faq details { border-top: 1px solid var(--color-border); }
.jj-faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 4px;
  font-weight: var(--weight-extrabold);
  cursor: pointer;
  list-style: none;
  transition: color var(--dur-quick);
}
.jj-faq summary::-webkit-details-marker { display: none; }
.jj-faq summary:hover { color: var(--color-accent); }
.jj-faq-mark { color: var(--color-accent); font-size: 20px; font-style: italic; line-height: 1; }
.jj-faq-mark::before { content: '+'; }
.jj-faq details[open] .jj-faq-mark::before { content: '−'; }
.jj-faq details p { padding: 0 4px 16px; }

.jj-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 24px; }
.jj-task { display: flex; flex-direction: column; border-top: 4px solid var(--task, var(--color-accent)); background: var(--color-surface-raised); }
.jj-task--long { --task: var(--color-course-long); }
.jj-task--medium { --task: var(--color-course-medium); }
.jj-task--short { --task: var(--jj-kuusk); }
.jj-task--purple { --task: var(--jj-lilla); }
.jj-task--wine { --task: var(--color-accent-strong); }
.jj-task-img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.jj-task-body { padding: 16px 18px 20px; line-height: 1.5; }
.jj-task-body > p:last-child { margin-top: 6px; }
.jj-task-kicker { color: var(--task, var(--color-accent)); font-size: 12px; font-weight: var(--weight-extrabold); letter-spacing: .1em; }
.jj-task-title { margin-top: 4px; color: var(--color-accent-strong); font-size: 21px; font-style: italic; font-weight: var(--weight-black); }

.jj-guide-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--color-border); }
.jj-btn--guide { min-height: 0; padding: 14px 30px; }

/* ---- arhiiv: a row per year ------------------------------------------------ */
.jj-band--archive { padding-bottom: 56px; }
.jj-band-eyebrow { color: var(--jj-tint); font-size: var(--text-sm); font-weight: var(--weight-bold); letter-spacing: .06em; }
.jj-band-title--archive { margin-top: 6px; font-size: clamp(40px, 11vw, 60px); }

.jj-archive {
  max-width: calc(var(--container-narrow) + 2 * clamp(16px, 5vw, 32px));
  margin-inline: auto;
  padding: 32px clamp(16px, 5vw, 32px) 100px;
}
.jj-year { border-bottom: 1px solid var(--color-border); border-left: 4px solid transparent; transition: background-color var(--dur-base) ease; }
.jj-year[open] { border-left-color: var(--color-accent); background: var(--color-surface-raised); }
/* A Jõuluseiklus permanent course, not a race: the same row in the green the
   site uses for the things beside the race (the gift card, past tasks). */
.jj-year--permanent .jj-year-num { color: var(--jj-kuusk); }
.jj-year--permanent .jj-year-plus { border-color: var(--jj-kuusk); color: var(--jj-kuusk); }
.jj-year--permanent .jj-year-teaser { color: var(--jj-kuusk-tume); }
.jj-year--permanent[open] { border-left-color: var(--jj-kuusk); }
.jj-year summary {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 18px);
  padding: 18px clamp(10px, 3vw, 16px);
  cursor: pointer;
  list-style: none;
}
.jj-year summary::-webkit-details-marker { display: none; }
.jj-year summary:hover .jj-year-teaser { color: var(--color-accent); }
.jj-year-plus {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  font-size: 17px;
  font-weight: var(--weight-black);
  transition: transform .35s ease;
}
.jj-year[open] .jj-year-plus { transform: rotate(45deg); }
.jj-year-num { min-width: clamp(64px, 18vw, 110px); color: var(--color-accent-strong); font-size: clamp(24px, 6vw, 30px); font-style: italic; font-weight: var(--weight-black); }
.jj-year-teaser { flex: 1; font-size: var(--text-md); }
.jj-year-body { padding: 0 16px 28px; }
.jj-year-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; margin: 0; }
.jj-year-facts dt, .jj-year-col-title { color: var(--color-text-muted); font-size: 12px; font-weight: var(--weight-bold); }
.jj-year-facts dd { margin: 0; font-size: 17px; font-weight: var(--weight-extrabold); }
.jj-year-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  font-size: var(--text-md);
}
.jj-year-col-title { margin-bottom: 8px; }
.jj-year-cols ul { margin: 0; padding: 0; list-style: none; }
.jj-year-cols li { padding: 10px 0; }
.jj-year-cols a { color: var(--color-accent); font-weight: var(--weight-bold); text-decoration: none; }
.jj-year-cols a:hover { color: var(--color-accent-strong); }
.jj-year-bar { color: var(--color-text-muted); }
.jj-year-plain { font-weight: var(--weight-bold); }
.jj-year-cols--first { margin-top: 0; padding-top: 0; border-top: 0; }
.jj-year-none { color: var(--color-text-muted); }
/* A year's own page (/2024) and the way to it and back (RULE 37.108). */
.jj-year-own { margin: 20px 0 0; font-size: var(--text-sm); }
.jj-archive-back { margin: 28px 0 0; font-size: var(--text-sm); }
.jj-year-own a, .jj-archive-back a { color: var(--color-accent); font-weight: var(--weight-bold); text-decoration: none; }
.jj-year-own a:hover, .jj-archive-back a:hover { color: var(--color-accent-strong); }
.jj-band-eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---- tulemused -------------------------------------------------------------- */
.jj-band--results { padding-bottom: 48px; }
.jj-band-in--split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.jj-band-title--results { margin-top: 10px; font-size: clamp(38px, 11vw, 56px); }
.jj-res-state { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--jj-tint); font-size: var(--text-sm); }
.jj-res-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; background: var(--color-on-accent); color: var(--color-accent); font-size: 12px; font-weight: var(--weight-extrabold); }
.jj-res-badge .jj-live-dot { width: 8px; height: 8px; }
/* Past fifteen minutes without an update the dot stops pulsing: nothing is arriving. */
.jj-live-dot.is-stale { animation: none; opacity: .4; }
.jj-res-note { margin-top: 6px; color: var(--jj-tint); font-size: var(--text-md); }
.jj-res-count { color: var(--jj-tint); font-size: var(--text-md); text-align: right; }
.jj-res-count b { color: var(--color-on-accent); font-size: 28px; font-style: italic; font-weight: var(--weight-black); }
.jj-res-side { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.jj-res-side-title { color: var(--jj-tint); font-size: 12px; font-weight: var(--weight-bold); letter-spacing: .06em; }
.jj-res-downloads { display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--text-sm); font-weight: var(--weight-bold); }
.jj-res-downloads a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 14px;
  border: 2px solid var(--color-on-accent);
  text-decoration: none;
  transition: background-color var(--dur-quick), color var(--dur-quick);
}
.jj-res-downloads a:hover { background: var(--color-on-accent); color: var(--color-accent-strong); }
.jj-res-years { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; font-size: var(--text-sm); font-weight: var(--weight-bold); }
.jj-res-years a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  padding: 0 8px;
  border-bottom: 2px solid transparent;
  color: var(--jj-tint);
  text-decoration: none;
}
.jj-res-years a:hover, .jj-res-years a[aria-current="page"] { border-bottom-color: var(--color-on-accent); color: var(--color-on-accent); }

.jj-results {
  max-width: calc(var(--container-narrow) + 2 * clamp(16px, 5vw, 32px));
  margin-inline: auto;
  padding: 32px clamp(16px, 5vw, 32px) 100px;
}
.jj-res-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.jj-res-tab {
  display: flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 18px;
  border: 2px solid var(--tab);
  color: var(--tab);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-decoration: none;
}
.jj-res-tab--long { --tab: var(--color-course-long); }
.jj-res-tab--medium { --tab: var(--color-course-medium); }
.jj-res-tab--short { --tab: var(--color-course-short); }
.jj-res-tab[aria-current="page"] { background: var(--tab); color: var(--color-on-accent); }

.jj-res-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.jj-res-filter-label { margin-right: 6px; color: var(--color-text-muted); font-size: 12px; font-weight: var(--weight-bold); }
.jj-res-filter a {
  display: flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 14px;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-decoration: none;
}
.jj-res-filter a[aria-current="true"] { background: var(--color-text); color: var(--color-on-accent); }

.jj-res-table { width: 100%; min-width: 520px; margin-top: 20px; border-collapse: collapse; font-size: var(--text-md); }
.jj-res-table--long { --row: var(--color-course-long); }
.jj-res-table--medium { --row: var(--color-course-medium); }
.jj-res-table--short { --row: var(--color-course-short); }
.jj-res-table th, .jj-res-table td { padding: 13px 14px 13px 0; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: baseline; }
.jj-res-table thead th { padding-block: 8px; border-bottom: 3px solid var(--row); color: var(--color-text-muted); font-size: 11px; font-weight: var(--weight-bold); }
.jj-res-table thead th:first-child { width: 52px; }
.jj-res-table thead th:last-child { width: 110px; }
.jj-res-table tbody th { font-weight: var(--weight-bold); }
.jj-res-pos { color: var(--row); font-size: 20px; font-style: italic; font-weight: var(--weight-black); font-variant-numeric: tabular-nums; }
.jj-res-cls { margin-left: 4px; padding: 2px 7px; background: var(--row); color: var(--color-on-accent); font-size: 12px; font-weight: var(--weight-bold); }
.jj-res-club { color: var(--color-text-muted); }
.jj-res-total { font-variant-numeric: tabular-nums; font-weight: var(--weight-bold); }
.jj-res-foot { margin-top: 10px; color: var(--color-text-muted); font-size: var(--text-xs); }
.jj-res-empty { margin-top: 22px; padding: 48px; border: 1px solid var(--color-border); background: var(--color-surface-raised); text-align: center; }
.jj-res-empty-title { color: var(--color-accent-strong); font-size: 26px; font-style: italic; font-weight: var(--weight-black); }

/* ---- dialog ---------------------------------------------------------------
   Closed by default; open when it is the URL's target (`#kingi`) or when the
   server rendered it open. In the middle of the screen, over a veil, and the
   panel scrolls inside itself on a short screen. */
.jj-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.jj-modal:target, .jj-modal.is-open { display: flex; }
/* The page behind stays put while a dialog is open. */
html:has(.jj-modal:target), html:has(.jj-modal.is-open) { overflow: hidden; }

.jj-modal-veil { position: absolute; inset: 0; background: var(--veil); cursor: default; }
.jj-modal-panel {
  position: relative;
  width: 540px;
  max-width: 100%;
  max-height: 100%;
  padding: 28px clamp(20px, 5vw, 32px) 24px;
  overflow-y: auto;
  border-top: 6px solid var(--color-accent);
  background: var(--color-surface);
  animation: jjfade var(--dur-base) var(--ease-out);
}
@keyframes jjfade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.jj-modal-panel--gift { border-top-color: var(--jj-kuusk); }
.jj-modal-x {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-min);
  height: var(--tap-min);
  color: var(--color-text);
  font-size: 20px;
  font-weight: var(--weight-extrabold);
  text-decoration: none;
}
.jj-modal-x:hover { color: var(--color-accent); }
.jj-modal-title { padding-right: 40px; color: var(--color-accent-strong); font-size: 28px; font-style: italic; font-weight: var(--weight-black); line-height: 1.5; }
.jj-modal-panel--gift .jj-modal-title { color: var(--jj-kuusk); }
.jj-modal-lead { margin-top: 8px; font-size: var(--text-md); line-height: 1.5; text-wrap: pretty; }
.jj-modal-fine { margin-top: 14px; color: var(--jj-hall-tume); font-size: var(--text-xs); line-height: 1.5; }
.jj-modal-fine--note { margin-top: 10px; font-style: italic; line-height: 1.4; }

/* The three steps, one under another: a numbered list, each number in a green
   disc. (They used to sit in a row with arrows between, and wrapped badly.) */
.jj-gift-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 0;
  padding: 14px 16px;
  background: var(--color-surface-raised);
  font-size: var(--text-sm);
  line-height: 1.35;
  list-style: none;
  counter-reset: step;
}
.jj-gift-steps li { display: flex; align-items: center; gap: 10px; counter-increment: step; }
.jj-gift-steps li::before {
  content: counter(step);
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--jj-kuusk);
  color: var(--color-on-accent);
  font-size: var(--text-xs);
  font-style: italic;
  font-weight: var(--weight-black);
}

/* The gift dialog: one column on a phone; from 900 px the explanation sits
   beside the form, and the whole order fits a laptop screen without scrolling. */
.jj-gift-layout { display: grid; gap: 18px; }
.jj-gift-main { margin-top: 0; }
.jj-form-row { display: grid; gap: 12px; }
@media (min-width: 600px) { .jj-form-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .jj-modal-panel--gift { width: 920px; padding: 30px 36px 30px; }
  .jj-gift-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
  /* Shorter fields here than on a phone: a mouse does not need 48 px. */
  .jj-modal-panel--gift .jj-field input { min-height: var(--tap-min); padding-block: 9px; }
  .jj-modal-panel--gift .jj-field textarea { min-height: 0; padding-block: 9px; }
  .jj-modal-panel--gift .jj-form { gap: 10px; }
  .jj-modal-panel--gift .jj-chip-face { min-height: 48px; }
  /* The confirmation is one short message: back to a single narrow column. */
  .jj-modal-panel--gift.is-done { width: 540px; }
  .jj-modal-panel--gift.is-done .jj-gift-layout { grid-template-columns: 1fr; }
}

/* The preview step: one column, the card as wide as the panel lets it be.
   The frame keeps the card's proportion (229 × 162 mm); inside it the card
   scales itself to the frame (lib/joulujooks/card.js). */
.jj-gift-card { display: block; width: 100%; aspect-ratio: 229 / 162; margin: 16px auto 0; border: 0; box-shadow: 0 2px 14px rgba(0, 0, 0, .14); }
/* The whole step fits one screen: the card's height is what the screen has
   left after the rest of the dialog (about 300 px), and its width follows. */
.jj-gift-card { width: min(100%, max(280px, calc((100vh - 300px) * 229 / 162))); }
.jj-gift-card { width: min(100%, max(280px, calc((100dvh - 300px) * 229 / 162))); }
.jj-gift-actions { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-top: 16px; }
.jj-gift-actions .jj-btn { min-height: var(--tap-min-touch); margin-top: 0; }
.jj-gift-next { transition: opacity var(--dur-base) var(--ease-out); }
.jj-gift-main:invalid .jj-gift-next { opacity: .5; }
@media (min-width: 900px) {
  .jj-modal-panel--gift.is-preview { width: 920px; }
  .jj-gift-actions { grid-template-columns: auto auto; justify-content: end; }
}

/* Kontakt and Privaatsus: the red-topped panel, 520 px. */
.jj-modal-panel--info { width: 520px; padding-bottom: 28px; }
.jj-modal-body { margin-top: 10px; font-size: var(--text-md); line-height: 1.6; }
.jj-modal-body p + p { margin-top: 12px; }
.jj-contacts { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; font-size: var(--text-md); line-height: 1.5; }
.jj-contacts a { text-decoration: none; }
.jj-contacts a:hover { color: var(--color-accent); text-decoration: underline; }
.jj-contacts-org { color: var(--color-text-muted); }
.jj-volunteer { margin-top: 20px; padding: 18px 20px; background: var(--jj-kuusk); color: var(--color-on-accent); }
.jj-volunteer b { font-size: 18px; font-style: italic; font-weight: var(--weight-black); }
.jj-volunteer p { margin-top: 5px; color: var(--jj-kuusk-hele); font-size: var(--text-sm); line-height: 1.5; }
.jj-btn--close { display: flex; min-height: var(--tap-min-touch); margin-top: 20px; padding: 12px; }


/* ---- form -----------------------------------------------------------------
   Labels above every field; inputs at 16 px or iOS zooms the page on focus. */
.jj-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.jj-field { display: flex; flex-direction: column; gap: 5px; font-size: var(--text-xs); font-weight: var(--weight-bold); }
.jj-field input, .jj-field textarea {
  min-height: var(--tap-min-touch);
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-0);
  background: var(--color-field);
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-md);
  font-weight: var(--weight-regular);
}
.jj-field textarea { resize: vertical; }
.jj-field input:focus, .jj-field textarea:focus { outline: none; border-color: var(--jj-kuusk); box-shadow: 0 0 0 2px var(--cvi-udu), 0 0 0 4px var(--color-focus); }
.jj-field [aria-invalid="true"] { border-color: var(--color-accent); }
.jj-field-opt { color: var(--jj-hall-tume); font-weight: var(--weight-regular); }
.jj-field-error { margin-top: -6px; color: var(--color-accent); font-size: var(--text-xs); font-weight: var(--weight-bold); }

.jj-chips { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0; }
.jj-chips legend { padding: 0; font-size: var(--text-xs); font-weight: var(--weight-bold); }
.jj-chips .jj-field-error { margin-top: 0; }
/* Three across at every width: three short words fit a 360 px phone, and
   stacked they pushed the order button a screen further down. */
.jj-chips-row { display: flex; gap: 8px; margin-top: 5px; }
.jj-chip { position: relative; flex: 1; min-width: 0; cursor: pointer; }
.jj-chip--long { --chip: var(--color-course-long); }
.jj-chip--medium { --chip: var(--color-course-medium); }
.jj-chip--short { --chip: var(--color-course-short); }
/* The radio button itself stays in the page — focusable, announced, posted —
   and is drawn over by its label. */
.jj-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.jj-chip-face {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 8px 10px;
  border: 2px solid var(--chip);
  color: var(--chip);
  transition: background-color var(--dur-quick), color var(--dur-quick), transform var(--dur-instant);
}
.jj-chip-face b { font-size: var(--text-sm); font-style: italic; font-weight: var(--weight-black); }
.jj-chip-face span { font-size: var(--text-xs); font-weight: var(--weight-bold); }
.jj-chip input:checked + .jj-chip-face { background: var(--chip); color: var(--color-on-accent); }
.jj-chip input:focus-visible + .jj-chip-face { box-shadow: 0 0 0 2px var(--cvi-udu), 0 0 0 4px var(--color-focus); }
.jj-chip:active .jj-chip-face { transform: scale(.97); }

.jj-check-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.jj-check { display: flex; align-items: center; gap: 10px; min-height: var(--tap-min); font-size: var(--text-md); font-weight: var(--weight-semibold); cursor: pointer; }
.jj-check-box {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--jj-kuusk);
  color: var(--color-on-accent);
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
  transition: background-color var(--dur-quick);
}
.jj-check-input:checked + .jj-check .jj-check-box { background: var(--jj-kuusk); }
.jj-check-input:checked + .jj-check .jj-check-box::before { content: '✓'; }
.jj-check-input:focus-visible + .jj-check .jj-check-box { box-shadow: 0 0 0 2px var(--cvi-udu), 0 0 0 4px var(--color-focus); }
.jj-company { display: none; flex-direction: column; gap: 12px; margin-top: -6px; padding: 4px 0 2px; }
.jj-check-input:checked ~ .jj-company { display: flex; }
.jj-gift-rent { position: relative; }
.jj-gift-rent-price { margin-left: 6px; font-weight: var(--weight-bold); }

/* Off-screen, not `display: none`: some form-filling scripts skip hidden fields. */
.jj-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.jj-form-fail { margin-top: 4px; padding: 12px 14px; background: var(--color-accent); color: var(--color-on-accent); font-size: var(--text-sm); font-weight: var(--weight-semibold); line-height: 1.4; }

.jj-btn--green { min-height: 50px; margin-top: 6px; background: var(--jj-kuusk); color: var(--color-on-accent); transition: transform var(--dur-quick) var(--ease-out), box-shadow var(--dur-quick), background-color var(--dur-quick); }
.jj-btn--green:hover { background: var(--jj-kuusk-tume); transform: translateY(-2px); box-shadow: var(--shadow-green); }
.jj-btn--outline-green { display: flex; min-height: var(--tap-min-touch); margin-top: 20px; border: 2px solid var(--jj-kuusk); color: var(--jj-kuusk); }
.jj-btn--outline-green:hover { background: var(--jj-kuusk); color: var(--color-on-accent); }

.jj-gift-done { font-size: var(--text-md); line-height: 1.55; }
.jj-gift-done > p { margin-top: 12px; text-wrap: pretty; }
.jj-gift-done-head { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 22px; font-style: italic; font-weight: var(--weight-black); }
.jj-gift-tick { display: flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--jj-kuusk); color: var(--color-on-accent); font-size: 20px; font-style: normal; }

/* ==========================================================================
   7. FOOTER — the prototype's: parent-brand line left, four links right, a
   hairline, then the club's own line.
   ========================================================================== */

.jj-footer {
  padding: 44px var(--gutter) 34px;
  background: var(--color-surface-dark);
  color: var(--cvi-udu);
  font-size: var(--text-sm);
}
.jj-footer-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  max-width: var(--container);
  margin-inline: auto;
}

.jj-footer-parent {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  line-height: 1.4;
  text-decoration: none;
  transition: opacity var(--dur-quick) var(--ease-out);
}
.jj-footer-parent:hover { opacity: .75; }
.jj-footer-parent img { flex: none; width: auto; height: 44px; }
.jj-footer-parent b { color: var(--cvi-kontrollpunkt); }
.jj-footer-go { font-size: var(--text-xs); opacity: .7; }

.jj-footer-links { display: flex; flex-wrap: wrap; gap: 0 22px; font-weight: var(--weight-bold); }
.jj-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  text-decoration: none;
}
.jj-footer-links a:hover { color: var(--cvi-kontrollpunkt); }

.jj-footer-org {
  max-width: var(--container);
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--color-rule-on-dark);
  font-size: var(--text-xs);
  opacity: .6;
}

/* ==========================================================================
   8. MOBILE ACTION BAR — below 900 px only, and only when the page has an
   action (`body.has-bar`). The footer leaves room so the bar never covers its
   last line.
   ========================================================================== */

.jj-bar { display: none; }

@media (max-width: 899px) {
  .jj-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    position: fixed;
    inset: auto 0 0 0;
    z-index: var(--z-mobile-bar);
    padding: 10px var(--space-4) calc(10px + env(safe-area-inset-bottom));
    background: var(--color-surface-dark);
    color: var(--color-text-on-dark);
  }
  .jj-bar-ctx { font-size: var(--text-sm); font-weight: var(--weight-bold); line-height: 1.25; }
  .has-bar .jj-footer { padding-bottom: 110px; }
  /* Slid away by the script while the reader scrolls down. */
  .jj-bar { transition: transform var(--dur-base) var(--ease-out); }
  .jj-bar.is-away { transform: translateY(110%); }
}

/* ==========================================================================
   8b. SCRIPTED EXTRAS — the lightbox and the click ring (public/js/jj.js)
   ========================================================================== */

.jj-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--veil);
  cursor: zoom-out;
  animation: jjfade var(--dur-base) var(--ease-out);
}
.jj-lightbox[hidden] { display: none; }
.jj-lightbox img { max-width: 100%; max-height: 90vh; cursor: default; }
.jj-lightbox-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: var(--tap-min-touch);
  height: var(--tap-min-touch);
  border: 0;
  background: var(--color-surface-dark);
  color: var(--color-on-accent);
  font: inherit;
  font-size: 20px;
  font-weight: var(--weight-extrabold);
  cursor: pointer;
}

.jj-punch {
  position: fixed;
  z-index: var(--z-punch);
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  animation: jjpunch 320ms var(--ease-punch) forwards;
}
@keyframes jjpunch { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.6); } }

/* ==========================================================================
   9. ERROR PAGE
   ========================================================================== */

.jj-error p + p { margin-top: var(--space-6); }
.jj-error-code {
  color: var(--color-accent);
  font-size: var(--display);
  font-style: italic;
  font-weight: var(--weight-black);
  line-height: 1;
}

/* ==========================================================================
   9b. PHONE — the same page, a size smaller.

   The prototype's sizes are a desktop's with one breakpoint; on a 390 px
   screen its headings, numbers and gaps read as oversized and every section
   took a screen and a half. Below 600 px the rhythm tightens: less air
   between sections, smaller display type, shorter photos. Nothing is removed
   and tap targets keep their 44–48 px.
   ========================================================================== */

@media (max-width: 599px) {
  :root { --section-y: 44px; }

  .jj-hero-in { padding-bottom: 28px; gap: 14px; }
  .jj-hero-title { font-size: 2.35rem; }
  .jj-hero-title--past { font-size: 2rem; }
  .jj-hero-eyebrow { font-size: 12px; }
  .jj-hero-sub { font-size: var(--text-md); }
  .jj-hero-actions { gap: 10px; margin-top: 18px; }
  .jj-btn--hero { padding: 13px 22px; font-size: var(--text-md); }
  .jj-btn--ghost { padding: 11px 18px; font-size: var(--text-sm); }
  .jj-countdown { margin-top: 18px; }
  .jj-countdown-big { font-size: 30px; }
  .jj-countdown-line { font-size: var(--text-sm); }
  .jj-hero-sponsor { align-items: flex-start; padding-bottom: 0; }
  .jj-hero-sponsor-name { font-size: 17px; }

  .jj-h { font-size: 26px; }
  .jj-more { font-size: var(--text-sm); }

  .jj-mis { padding-top: 36px; padding-bottom: 44px; }
  .jj-cards { gap: 22px; }
  .jj-cards--who { margin-top: 26px; }
  .jj-card-img, .jj-card--who .jj-card-img { height: 170px; }
  .jj-card-title, .jj-card--who .jj-card-title { margin-top: 10px; font-size: 18px; line-height: 1.35; }
  .jj-card-body, .jj-dots { font-size: 15px; }

  /* Kostüümiboonus: the section that most outgrew a phone. */
  .jj-bonus-in { gap: 28px; }
  .jj-bonus-title { font-size: 34px; }
  .jj-bonus-lead { margin-top: 12px; font-size: 15px; }
  .jj-gate { margin-top: 18px; }
  .jj-gate-key { font-size: 12px; }
  .jj-tiers { gap: 10px; margin-top: 18px; }
  .jj-tier { flex-basis: 130px; padding: 14px 14px 16px; }
  .jj-tier-gates { margin-bottom: 8px; }
  .jj-gate-ic { transform: scale(.8); transform-origin: left top; margin-right: -6px; margin-bottom: -6px; }
  .jj-tier-name { font-size: 15px; }
  .jj-tier-num { margin-top: 6px; font-size: 28px; }
  .jj-bonus-img { max-height: 300px; aspect-ratio: 4 / 3; }

  .jj-two, .jj-prices-in { gap: 36px; }
  .jj-courses { gap: 10px; margin-top: 18px; }
  .jj-course { padding: 12px 16px; }
  .jj-course-name { font-size: 17px; }
  .jj-course-km { font-size: 21px; }
  .jj-schedule { margin-top: 16px; font-size: 15px; }
  .jj-schedule li { padding: 9px 4px; gap: 12px; }
  .jj-schedule b { width: 58px; }
  .jj-schedule .is-strong { font-size: 19px; }

  .jj-price-table { margin-top: 16px; font-size: 15px; }
  .jj-price-table th, .jj-price-table td { padding: 10px 10px; }
  .jj-includes { padding: 20px 20px 22px; }
  .jj-includes-title { font-size: 20px; }
  .jj-includes li { font-size: 15px; }
  .jj-gift { padding: 16px 18px; }

  .jj-gallery { grid-template-rows: 180px 110px 110px; margin-top: 16px; }

  .jj-sponsors-in { gap: 26px; }
  .jj-sponsor--main { height: 90px; font-size: 24px; }
  .jj-sponsor--supporter, .jj-sponsor-slot { height: 70px; }
  .jj-sponsor--supporter { font-size: 17px; }
  .jj-sponsor--partner { height: 56px; font-size: var(--text-sm); }
  .jj-sponsor--partner.has-logo { height: 64px; padding: 8px 10px; }

  /* Inner pages */
  .jj-band, .jj-band--archive, .jj-band--results { padding-top: 30px; padding-bottom: 30px; }
  .jj-band-title { font-size: 32px; }
  .jj-band-title--archive, .jj-band-title--results { font-size: 34px; }
  .jj-band-lead { margin-top: 8px; font-size: 15px; }
  .jj-guide { padding-bottom: 56px; }
  .jj-guide-body { font-size: 15px; }
  .jj-guide-h { margin-bottom: 12px; font-size: 24px; }
  .jj-archive, .jj-results { padding-top: 20px; padding-bottom: 56px; }
  .jj-year summary { padding-block: 14px; }
  .jj-year-teaser { font-size: var(--text-sm); }
  .jj-res-table { font-size: 15px; }
}

/* The footer, centred below 900 px: one column, everything on the axis. */
@media (max-width: 899px) {
  .jj-footer { padding-top: 32px; text-align: center; }
  .jj-footer-in { flex-direction: column; gap: 14px; }
  .jj-footer-parent { flex-direction: column; gap: 8px; }
  .jj-footer-links { justify-content: center; }
  .jj-footer-org { margin-top: 14px; padding-top: 14px; }
}

/* ==========================================================================
   10. REDUCED MOTION — every transition on the site, in one place.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .jj-hero-img--more { display: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .jj-btn:hover, .jj-btn:active, .jj-course:hover, .jj-gift:hover, .jj-gallery a:hover img, .jj-btn--green:hover { transform: none; }
}
