/* Paths in url(...) are relative to this file, hence ../images/.

   NOTE: banor/style.css is a duplicate of this file, kept so that folder can
   be deployed on its own without depending on anything outside it. A fix or
   change made here almost certainly belongs there too. */

/* The fonts, from assets/fonts/ (Barlow, Barlow Condensed, Barlow Semi
   Condensed and Caveat, under the SIL Open Font License): kept on the site
   rather than fetched from Google, so visitors' addresses aren't sent there.
   Each in a Latin and an extended-Latin part; a browser fetches a part only
   when a page has characters from it. */
/* Barlow 400, latin-ext */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/barlow-400-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;
}
/* Barlow 400, latin */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/barlow-400-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;
}
/* Barlow 500, latin-ext */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/barlow-500-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;
}
/* Barlow 500, latin */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/barlow-500-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;
}
/* Barlow 600, latin-ext */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/barlow-600-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;
}
/* Barlow 600, latin */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/barlow-600-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;
}
/* Barlow 700, latin-ext */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/barlow-700-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;
}
/* Barlow 700, latin */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/barlow-700-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;
}
/* Barlow Condensed 800, latin-ext */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/barlow-condensed-800-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;
}
/* Barlow Condensed 800, latin */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/barlow-condensed-800-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;
}
/* Barlow Semi Condensed 600, latin-ext */
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-600-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;
}
/* Barlow Semi Condensed 600, latin */
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-600-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;
}
/* Barlow Semi Condensed 700, latin-ext */
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-700-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;
}
/* Barlow Semi Condensed 700, latin */
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-700-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;
}
/* Barlow Semi Condensed 800, latin-ext */
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-800-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;
}
/* Barlow Semi Condensed 800, latin */
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-800-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;
}
/* Caveat 700, latin-ext */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/caveat-700-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;
}
/* Caveat 700, latin */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/caveat-700-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 {
  --green-900: #063d27;
  --green-800: #0a5533;
  --green-700: #0c6b3f;
  --green-600: #0f8049;
  --green-500: #16974f;
  /* Sundbybergs IK Grafisk profil 2025, "Våra färger" */
  --sik-black: #000000;
  --sik-dark-green: #007846;
  --sik-green: #009a44;
  --gold: #c9b777;
  --ink: #10241a;
  --ink-soft: #445448;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(6, 40, 24, 0.25);
  --max: 1120px;
  --header-h: 82px;
  /* Typography follows tabyhalvmarathon.se: Barlow for running text, Barlow
     Semi Condensed 800 for headings, Barlow Condensed 800 for the site title,
     on a 17px base. */
  --font-body: 'Barlow', system-ui, -apple-system, sans-serif;
  --font-heading: 'Barlow Semi Condensed', 'Barlow', sans-serif;
  --font-title: 'Barlow Condensed', 'Barlow Semi Condensed', sans-serif;
  /* Shared by the header banner and the Kontakt section. */
  --banner-bg: linear-gradient(135deg, var(--green-600), var(--green-800) 70%);
}

* { box-sizing: border-box; }
/* scroll-padding keeps #anchor targets from landing underneath the sticky
   header. Sections already have 64px of top padding, so this is less than
   the full header height (--header-h). */
html {
  font-size: 17px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) - 28px);
  /* Stops iPhone Safari from enlarging text by itself in wide blocks — it
     blew up the news strip, whose text is one long unbroken line. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* What shows outside the page itself: around the iPhone notch / status bar
     and when the page is pulled past its top. Matches the header (see also
     the theme-color meta tag in each page). */
  background: var(--green-700);
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  margin: 0;
  line-height: 1.15;
}

/* Page-level headings scale the way the reference site's do: --h is the
   size in rem at full width (4.4 for h1, 3 for h2), shrinking with the
   viewport — by width on wide screens, by height on phones in portrait. */
h1, .section-title {
  font-weight: 800;
  font-size: min(calc((var(--h) - 1) * 1.2vw + 1rem), calc(var(--h) * 1rem));
}
@media (max-width: 767px) and (orientation: portrait) {
  h1, .section-title { font-size: calc((var(--h) - 1) * 0.012 * min(100vh, 900px) + 1rem); }
}
h1 { --h: 4.4; }
.section-title { --h: 3; }


p { line-height: 1.55; color: var(--ink-soft); }

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

a { color: inherit; }

/* ---------- Header ---------- */

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
}
.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.banner {
  /* The plain colour under the gradient is what iOS Safari picks up when it
     tints the status bar to match the top of the page. */
  background: var(--green-700) var(--banner-bg);
  /* With viewport-fit=cover the page reaches in under the notch: keep the
     header's content clear of it while its colour fills the area. */
  padding-top: env(safe-area-inset-top, 0px);
}

/* Stays pinned to the top while scrolling. z-index sits above the page
   content (incl. MapLibre's controls) but below the map's page-fullscreen
   overlay (1000), which is meant to cover everything. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.22);
}

.banner-inner {
  /* Wider than the page content: the large site title and the full menu
     don't fit side by side inside --max. */
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px max(20px, env(safe-area-inset-right, 0px)) 14px max(20px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
/* On phones the title is smaller, which left the header barely taller than
   the news strip below it — give it more height there. */
@media (max-width: 700px) {
  .banner-inner { padding-top: 20px; padding-bottom: 20px; }
}

/* Written "Två Sjöar Runt" in the markup; the capitals are styling. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  font-family: var(--font-title);
  font-weight: 800;
  /* 2.8rem as on the reference site; shrinks on narrow phones so it still
     fits next to the menu button. */
  font-size: clamp(1.6rem, 8vw, 2.8rem);
  line-height: 1.03;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: #fff;
}

/* The handwritten line under the title, ending flush with its last letter.
   It is positioned beneath the title rather than laid out below it, and the
   title is nudged up to make room, so the header keeps its height; sizes are
   in em and so follow the title as it shrinks on phones. */
.brand-name { position: relative; top: -0.17em; }
.brand-tag {
  position: absolute;
  right: 0;
  top: 90%;
  font-family: 'Caveat', cursive;
  font-size: 0.46em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
  pointer-events: none;
}

/* Klubbmärket, vitt utförande (Grafisk profil 2025) — the single-colour
   version meant for green and other dark backgrounds. */
.crest {
  display: inline-block;
  width: 54px;
  height: 58px;
  flex-shrink: 0;
  background: url('../images/brand-images/crest-white.png?v=3') center / contain no-repeat;
}

/* In the header the crest follows the title's size, so the pair shrinks
   together on narrow phones. */
.brand .crest { width: 1.05em; height: 1.12em; }
.crest-lg { width: 84px; height: 89px; }

.primary-nav {
  display: none;
  align-items: center;
  gap: 22px;
  font-size: 1rem;
  font-weight: 500;
}
/* The menu's links are in a wrapper for the admin app; it adds no box. */
.nav-links { display: contents; }
.primary-nav a { color: rgba(255,255,255,0.88); text-decoration: none; white-space: nowrap; }
.primary-nav a:hover { color: #fff; }
.nav-cta {
  background: rgba(255,255,255,0.14);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
}

/* The full menu needs this much room next to the site title; below it the
   menu button is used instead. */
@media (min-width: 1300px) {
  .menu-toggle { display: none; }
  .primary-nav { display: flex; }
}

body.nav-open .primary-nav {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 500;
  flex-direction: column;
  align-items: flex-start;
  background: var(--green-800);
  padding: 16px 20px 22px;
  gap: 14px;
  box-shadow: var(--shadow);
}
body.nav-open .nav-cta { margin-top: 4px; }

/* ---------- News ticker ---------- */

/* A gold strip between the header and the hero. As written in the page it
   is one centred line of text. script.js then adds .is-moving and enough
   copies of the text to fill the screen, and every copy slides left by
   exactly its own width, over and over — each lands where its neighbour
   was, so the loop has no visible seam. Hovering pauses it. */
.news-ticker {
  background: var(--gold);
  color: var(--green-900);
  padding: 10px 20px;
  text-align: center;
  font-size: 0.98rem;
  font-weight: 500;
}
.news-item { margin: 0; color: inherit; line-height: 1.4; }
.news-item strong { font-weight: 800; letter-spacing: 0.04em; }
.news-item strong:empty { display: none; } /* no lead-in set */
/* Switched off from the admin app. */
.news-ticker[hidden] { display: none; }

.news-ticker.is-moving {
  display: flex;
  padding: 10px 0;
  overflow: hidden;
  white-space: nowrap;
}
.news-ticker.is-moving .news-item {
  flex-shrink: 0;
  padding: 0 2.5rem;
  animation: news-scroll var(--news-duration, 11s) linear infinite;
}
.news-ticker.is-moving:hover .news-item { animation-play-state: paused; }
@keyframes news-scroll {
  to { transform: translateX(-100%); }
}
/* A slimmer strip on phones, so it doesn't compete with the header. */
@media (max-width: 700px) {
  .news-ticker,
  .news-ticker.is-moving { padding-top: 5px; padding-bottom: 5px; font-size: 0.82rem; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 58vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.hero-media {
  position: absolute;
  inset: 0;
  /* The photo is in index.html (style="background-image:…"), where the
     admin app changes it. */
  background-size: cover;
  background-position: center 30%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,45,28,0.55) 0%, rgba(6,40,25,0.55) 40%, rgba(5,30,20,0.92) 100%);
}
.hero-content {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 20px;
  width: 100%;
  /* Soft shadow lifts the text off the brighter parts of the photo. */
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5);
}
.hero-content .btn { text-shadow: none; }
/* A solid gold label rather than gold text straight on the photo, so it
   stays readable whatever part of the image ends up behind it. */
.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--green-900);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: none;
}
.hero h1 {
  margin-bottom: 18px;
  text-wrap: balance;
}
.hero-lede {
  color: #fff;
  max-width: 640px;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  font-family: inherit;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--green-900); }
.btn-primary:hover { background: #d6c690; }
.btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.5); }
.btn-ghost:hover { background: rgba(255,255,255,0.22); }
.btn-outline { background: transparent; color: var(--green-800); border: 1.5px solid var(--green-700); }
.btn-outline:hover { background: rgba(12,107,63,0.08); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn:disabled:hover { transform: none; }

/* ---------- Stats ---------- */

.stats { background: var(--green-900); color: #fff; }
.stats-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 20px;
  text-align: center;
}

.countdown-eyebrow {
  margin: 0 0 18px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.2rem, 5.5vw, 2.4rem);
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.75);
}

.countdown-done {
  margin: 20px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
}

@media (min-width: 700px) {
  .countdown { gap: 26px; }
  .stat-label { font-size: 0.78rem; }
}

/* ---------- Sections ---------- */

/* Sections alternate between white and a brand colour so each one reads as
   its own block. Body text only ever sits on white or SIK Mörkgrön —
   white on SIK Emblemgrön is too low-contrast for running text. */
.section { padding: 64px 0; background: var(--white); }

.section-green {
  background: var(--sik-dark-green);
  color: #fff;
  --ink-soft: rgba(255, 255, 255, 0.92);
}
.section-green .section-title { color: #fff; }

/* Pale green-grey with the normal dark text; white cards stand out on it. */
.section-alt { background: #eef3ec; }
.section-inner { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.section-title {
  color: var(--green-900);
  margin-bottom: 16px;
}
.section-title.center { text-align: center; }
.section-sub.center { text-align: center; max-width: 560px; margin: 0 auto 36px; }
.section-sub a { color: var(--green-700); font-weight: 600; text-decoration: none; }
.section-sub a:hover { text-decoration: underline; }

.social-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--green-900);
  font-weight: 600;
  font-size: 0.85rem;
}
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  color: var(--green-800);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.social-icon svg { width: 26px; height: 26px; }
.social-link:hover .social-icon { transform: translateY(-3px); }
.social-link.instagram:hover .social-icon {
  background: linear-gradient(135deg, #f58529, #dd2a7b 45%, #8134af 70%, #515bd4);
  color: #fff;
}
.social-link.facebook:hover .social-icon { background: #1877f2; color: #fff; }

.two-col {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 860px) {
  .two-col { grid-template-columns: 1.1fr 1fr; }
}

/* Om-sektionen: a large one-line statement on the left with the running
   text beside it, then two photos side by side underneath. */
.intro-split { display: grid; gap: 20px; }
.intro-title { margin: 0; text-wrap: balance; }
.intro-text p { margin: 0 0 1em; font-size: 1.05rem; }
.intro-text p:last-child { margin-bottom: 0; }
/* Always side by side. On phones the photos are cropped to squares so they
   keep some height at half the screen width. */
.intro-media { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 44px; }
.intro-media .media-frame { aspect-ratio: 1 / 1; }
@media (min-width: 640px) {
  .intro-media { gap: 24px; }
  .intro-media .media-frame { aspect-ratio: 4 / 3; }
}
@media (min-width: 860px) {
  .intro-split { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
  .intro-media { margin-top: 56px; }
}

.media-frame {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.media-caption { font-size: 0.82rem; margin-top: 10px; color: var(--ink-soft); text-align: center; }
/* A page without its picture (hidden from the admin app): no picture
   column, and the text takes the width. */
.col-media:has(> .media-frame[hidden]) { display: none; }
.two-col:has(.media-frame[hidden]) { grid-template-columns: 1fr; }
/* The map without its picture: no figure (nor its legend). */
.map-figure:has(img[hidden]) { display: none; }

.link-arrow {
  display: inline-block;
  margin-top: 6px;
  color: var(--green-700);
  font-weight: 600;
  text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; }

/* ---------- Distance overview (landing page) ---------- */

/* One tile per distance, shortest first. On phones each tile is a row with
   the distance as a big figure on the left; from 900px they stand side by
   side as five columns with the figure on top. The full class list with
   every start time lives on klassindelning/. */
.distance-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 640px;
  display: grid;
  gap: 12px;
}
.distance-card {
  display: grid;
  grid-template-columns: 6.4rem 1fr;
  grid-template-areas: "num name" "num desc" "num meta";
  column-gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.distance-card p { margin: 0; color: #fff; }
.distance-card .distance-name {
  grid-area: name;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.distance-card .distance-num {
  grid-area: num;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.1rem;
  line-height: 1;
  white-space: nowrap;
}
.distance-num .distance-unit { margin-left: 0.2em; font-size: 0.45em; font-weight: 700; }
.distance-num .distance-approx { margin: 0 0.25em 0 0; font-size: 0.45em; font-weight: 700; }
.distance-card .distance-desc { grid-area: desc; margin-top: 4px; font-size: 0.92rem; line-height: 1.4; opacity: 0.9; }
.distance-card .distance-meta { grid-area: meta; margin-top: 8px; font-size: 0.92rem; font-weight: 700; }
.distance-note { margin: 22px 0 0; text-align: center; font-size: 0.92rem; }
.distance-note + .cta-row { margin: 24px 0 0; }

@media (min-width: 900px) {
  .distance-grid { max-width: none; grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .distance-card {
    grid-template-columns: 1fr;
    grid-template-areas: "name" "num" "desc" "meta";
    /* The description row stretches, so every tile's start time and price
       line up along the bottom whatever the text length above. */
    grid-template-rows: auto auto 1fr auto;
    align-items: start;
    padding: 24px 20px 22px;
  }
  .distance-card .distance-num { margin-top: 12px; font-size: 2.7rem; }
  .distance-card .distance-desc { margin-top: 12px; }
  .distance-card .distance-meta {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
  }
}

/* ---------- Panels (klassindelning/, deltagarinformation/) ---------- */

/* A white panel with a green side that says what the panel is about.
   klassindelning/: one per group of classes — the fee is the same for every
   class in a group, so it is stated once on the green side instead of on
   every row, with a table of the classes beside it. deltagarinformation/:
   one per part of the race day, with the details listed beside it. */
.panels { display: grid; gap: 20px; max-width: 920px; margin: 0 auto; }
.panel {
  display: grid;
  background: var(--white);
  border: 1px solid rgba(6, 60, 35, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--sik-dark-green);
  color: #fff;
}
.panel-head h2 { font-size: 1.7rem; font-weight: 800; }
.panel-head p { margin: 0; color: #fff; line-height: 1.45; }
.panel-head .panel-figure {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1;
}
.panel-figure-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.panel-body { padding: 8px 6px; align-self: center; }
/* Large faint numeral: 1, 2, 3 through the race day. */
.panel-step {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3.4rem;
  line-height: 0.9;
  color: rgba(255, 255, 255, 0.35);
}

/* Detail rows inside a panel: the landing page's .fact (icon disc, title,
   text), stacked with a divider between rows. */
.info-rows { list-style: none; margin: 0; padding: 6px 14px; }
.info-rows .fact { padding: 16px 0; }
.info-rows .fact + .fact { border-top: 1px dashed rgba(6, 60, 35, 0.14); }
.info-rows .fact-icon { width: 46px; height: 46px; font-size: 1.25rem; background: #eef3ec; box-shadow: none; }
.info-rows .fact { grid-template-columns: 46px 1fr; }
.info-rows .fact h3 { margin-top: 2px; font-size: 1.12rem; }
.info-rows .fact a { color: var(--green-700); font-weight: 600; }

/* Numbered steps inside a panel (bana/: the course, turn by turn). */
.step-list { list-style: none; margin: 0; padding: 6px 14px; counter-reset: step; }
.step-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 14px;
  align-items: start;
  padding: 13px 0;
  line-height: 1.5;
  color: var(--ink-soft);
}
.step-list li + li { border-top: 1px dashed rgba(6, 60, 35, 0.14); }
.step-list li::before {
  content: counter(step);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef3ec;
  color: var(--green-900);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  margin-top: -5px;
}

/* Short how-to hints under the map on bana/. */
.map-hints { justify-content: center; }
.map-hints .legend-chip { font-weight: 500; }

.class-table { width: 100%; border-collapse: collapse; }
.class-table th,
.class-table td { padding: 13px 14px; text-align: left; vertical-align: middle; }
.class-table thead th {
  padding-bottom: 9px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid rgba(6, 60, 35, 0.14);
}
.class-table tbody tr + tr > * { border-top: 1px dashed rgba(6, 60, 35, 0.14); }
.class-table tbody th { font-weight: 600; color: var(--ink); }
.class-table .class-dist,
.class-table .class-start { white-space: nowrap; font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; }
.class-table .class-dist { color: var(--ink); }
/* A children's class's birth years, under its name. */
.class-born,
.start-born { display: block; font-size: 0.86em; font-weight: 500; color: var(--ink-soft); }
.class-table .class-start { color: var(--green-700); }
/* Distans and Start keep the same width in every panel, so the columns
   line up down the page. */
.class-table th:nth-child(2), .class-table td:nth-child(2) { width: 6.2rem; }
.class-table th:nth-child(3), .class-table td:nth-child(3) { width: 4.8rem; }

@media (min-width: 760px) {
  .panel { grid-template-columns: 290px 1fr; }
  .panel-head { padding: 28px; }
  .panel-body { padding: 14px 16px; }
  .class-table th,
  .class-table td { padding: 15px 16px; }
}

/* The same starts again, sorted by the clock. */
.start-order {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 640px;
  display: grid;
  gap: 12px;
}
.start-item {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  grid-template-areas: "time name" "time dist";
  column-gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: var(--white);
  border-radius: var(--radius);
  border-left: 4px solid var(--gold);
  box-shadow: var(--shadow);
}
.start-item p { margin: 0; }
.start-item .start-time {
  grid-area: time;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--green-900);
}
.start-item .start-name { grid-area: name; font-weight: 600; color: var(--ink); line-height: 1.35; }
.start-item .start-dist { grid-area: dist; font-size: 0.92rem; }
.start-order + .cta-row { margin: 36px 0 0; }

@media (min-width: 900px) {
  .start-order { max-width: none; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 14px; }
  .start-item {
    grid-template-columns: 1fr;
    grid-template-areas: "time" "name" "dist";
    align-content: start;
    padding: 22px 20px;
    border-left: none;
    border-top: 4px solid var(--gold);
  }
  .start-item .start-time { font-size: 2.3rem; margin-bottom: 12px; }
  .start-item .start-dist { margin-top: 4px; }
}

/* ---------- Course map ---------- */

.course-map-block { margin-top: 44px; }
/* Landing page: intro line, then the "Mer om banan" button close under it,
   then the map — the negative top margin eats into the intro line's own
   bottom spacing so the button reads as belonging to the text. */
.section-sub + .cta-row { margin: -12px 0 32px; }
/* A heading followed directly by its button or map, with no intro line. */
.section-title + .cta-row { margin: 4px 0 32px; }
.section-title + .race-map-wrap { margin-top: 36px; }
.cta-row + .course-map-block { margin-top: 0; }
.race-map-wrap {
  position: relative;
  width: 100%;
  /* The old map (350px, 440px on desktop) plus the height the elevation dock
     and the buttons above it now take up, so the dock covers added space
     rather than map that used to be in view. */
  height: 590px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #eef3ec;
  /* Height of the elevation dock along the bottom (.race-map-dock). The
     round buttons and MapLibre's attribution sit just above it, so they
     are positioned from this too. */
  --dock-h: 150px;
  /* Safe-area insets for the fullscreen state below — 0 here so every button
     offset can add var(--safe-*) unconditionally without a fullscreen-only
     override of each one individually. */
  --safe-t: 0px;
  --safe-r: 0px;
  --safe-b: 0px;
  --safe-l: 0px;
}
#race-map { width: 100%; height: 100%; }

/* "Fullscreen" here fills the page, not the screen — the button is a plain
   class toggle rather than the native Fullscreen API (see
   createPageFullscreenControl in race-map.js for why).

   Only this wrap — the map canvas plus its own overlaid play/reset/km/style
   buttons, plus the legend chips (see below) — expands, close to the same
   surface the native Fullscreen API would have taken over. The heading and
   elevation charts stay put in the page behind it, out of view, instead of
   coming along for the ride. */
.race-map-wrap.is-page-fullscreen {
  position: fixed;
  /* inset rather than 100vw/100vh: on phones 100vh is the viewport *with the
     address bar collapsed*, so it overshoots and leaves the bottom-row
     buttons positioned below what's actually on screen. Anchoring all four
     edges sizes against what's visible instead. */
  inset: 0;
  z-index: 1000;
  width: auto;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  /* Extends edge-to-edge under the notch/Dynamic Island and home indicator —
     these feed the button-offset calc()s below instead of padding the whole
     map in from the edge. */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}
body.has-page-fullscreen { overflow: hidden; }

.race-map-btn {
  position: absolute;
  /* Just above the elevation dock. */
  bottom: calc(var(--dock-h) + 24px + var(--safe-b));
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(6, 60, 35, 0.12);
  box-shadow: 0 3px 10px rgba(6, 40, 24, 0.25);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  color: var(--green-900);
  z-index: 3;
  transition: transform 0.15s ease, background 0.15s ease;
}
.race-map-btn:hover { transform: translateY(-1px); }
.race-map-btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* Play and reset exist once per course but share these two spots — only
   the selected course's pair is shown (race-map.js). --route-color is that
   course's line colour, set inline on the button. */
.race-map-btn-play {
  left: calc(12px + var(--safe-l));
  box-shadow: 0 3px 10px rgba(6, 40, 24, 0.25), inset 0 -3px 0 var(--route-color, var(--green-700));
}
.race-map-btn-play.playing { background: var(--route-color, var(--green-700)); color: #fff; }
.race-map-btn-reset {
  left: calc(60px + var(--safe-l));
  bottom: calc(var(--dock-h) + 28px + var(--safe-b));
  width: 34px;
  height: 34px;
}

.race-map-btn-km { left: calc(102px + var(--safe-l)); }
.race-map-btn-km.active { background: var(--gold); border-color: var(--gold); color: var(--green-900); }

.race-map-btn-style {
  bottom: auto;
  left: auto;
  /* Clears MapLibre's own top-right control stack: zoom buttons (~60px) +
     the fullscreen button (~30px), each with a 10px gap above them. */
  top: calc(122px + var(--safe-t));
  right: calc(10px + var(--safe-r));
  width: 34px;
  height: 34px;
  font-size: 0.9rem;
}
.race-map-btn-style.active { background: var(--green-800); color: #fff; }

/* MapLibre's own zoom/fullscreen controls (top-right) and compact-attribution
   control (bottom-right) need the same edge nudge in fullscreen. */
.race-map-wrap.is-page-fullscreen .maplibregl-ctrl-top-right {
  top: calc(10px + var(--safe-t));
  right: calc(10px + var(--safe-r));
}
.race-map-wrap.is-page-fullscreen .maplibregl-ctrl-bottom-right {
  bottom: calc(10px + var(--safe-b));
  right: calc(10px + var(--safe-r));
}

/* Legend chips (route show/hide toggles) move into the fullscreen map
   itself while active — see the `extras` param on
   createPageFullscreenControl in race-map.js — landing here as a plain
   appended child with no position of its own; this is what turns them into
   a floating bar across the top instead of sitting inline where they'd be
   invisible, left behind in the page under the overlay. */
.race-map-wrap.is-page-fullscreen > .legend-row {
  position: absolute;
  top: calc(12px + var(--safe-t));
  left: calc(12px + var(--safe-l));
  /* Stops short of the right edge so it never runs under MapLibre's own
     zoom/fullscreen-exit control stack there. */
  right: calc(56px + var(--safe-r));
  z-index: 20;
  margin: 0;
  justify-content: center;
  /* The row's own box can be wider than the chips it centers (empty space
     either side of them) — pointer-events: none here, re-enabled per chip
     below, lets a click/drag land on the map underneath instead of being
     swallowed by that empty space. */
  pointer-events: none;
}
.race-map-wrap.is-page-fullscreen > .legend-row > * {
  pointer-events: auto;
}
/* Routes can be shown/hidden in fullscreen, but not deleted — the trash
   icon (banor.js only; the main site's own legend never has one) simply
   isn't there while the legend row is floating over the fullscreen map,
   even though the chip itself still is. Deleting stays a page action. */
.race-map-wrap.is-page-fullscreen .legend-delete {
  display: none;
}

@media (min-width: 860px) {
  .race-map-wrap { height: 700px; }
}

/* ---------- Course dropdown (top-left of the map) ---------- */

.course-select {
  position: absolute;
  top: calc(12px + var(--safe-t));
  left: calc(12px + var(--safe-l));
  z-index: 4;
  font-family: var(--font-body);
}
.course-select-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 14px 0 18px;
  border: none;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(6, 40, 24, 0.28);
  cursor: pointer;
}
.course-select-btn:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; }
/* Thin divider between the label and the arrow, as on a split button. */
.course-select-label {
  padding-right: 12px;
  border-right: 1px solid rgba(6, 60, 35, 0.2);
  line-height: 24px;
}
.course-select-chevron { width: 18px; height: 18px; transition: transform 0.2s ease; }
.course-select.is-open .course-select-chevron { transform: rotate(180deg); }
.course-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  padding: 6px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 8px 26px rgba(6, 40, 24, 0.3);
  display: flex;
  flex-direction: column;
}
.course-select-menu[hidden] { display: none; }
.course-select-item {
  padding: 11px 14px;
  border: none;
  border-radius: 9px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.course-select-item:hover,
.course-select-item:focus-visible { background: #eef3ec; outline: none; }
.course-select-item[aria-checked="true"] { font-weight: 700; }

/* ---------- Elevation dock (bottom of the map) ---------- */

/* The elevation profile of the course on show, laid over the bottom of the
   map instead of sitting under it. Being inside .race-map-wrap it follows
   the map into fullscreen. */
.elevation-panel.race-map-dock {
  position: absolute;
  left: calc(12px + var(--safe-l));
  right: calc(12px + var(--safe-r));
  bottom: calc(12px + var(--safe-b));
  height: var(--dock-h);
  margin: 0;
  z-index: 3;
  display: block;
}
.race-map-dock .elevation-chart {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px 14px 6px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.race-map-dock .elevation-chart[hidden] { display: none; }
.race-map-dock .elevation-chart-head { margin-bottom: 2px; }
.race-map-dock .elevation-chart-body { flex: 1; min-height: 0; }
.race-map-dock .elevation-svg { height: 100%; }
/* MapLibre's attribution would otherwise sit underneath the dock. */
.race-map-wrap .maplibregl-ctrl-bottom-right,
.race-map-wrap.is-page-fullscreen .maplibregl-ctrl-bottom-right {
  bottom: calc(var(--dock-h) + 16px + var(--safe-b));
}

/* ---------- Elevation panel ---------- */

.elevation-panel {
  /* Always stacked, one full-width chart per row — side-by-side made each
     chart's fixed height look squashed relative to its width even at this
     site's widest layout, so there's no width worth switching to a row for. */
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}
.elevation-panel:empty { display: none; }

.elevation-chart {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px 10px;
  box-shadow: var(--shadow);
}
.elevation-chart[hidden] { display: none; }

.elevation-chart-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.elevation-chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.elevation-chart-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-900);
  margin-right: auto;
}
.elevation-chart-stats {
  display: flex;
  gap: 10px;
  font-size: 0.76rem;
  font-weight: 700;
}
.elevation-stat.up { color: var(--green-700); }
.elevation-stat.down { color: var(--ink-soft); }

.elevation-chart-body { position: relative; }
.elevation-svg {
  display: block;
  width: 100%;
  height: 128px;
  cursor: crosshair;
  touch-action: pan-y;
}
.elevation-hover-dot { pointer-events: none; }
.elevation-hover-line { pointer-events: none; }

.elevation-grid-line {
  stroke: rgba(6, 40, 24, 0.1);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.elevation-axis-label {
  font-size: 9px;
  font-weight: 600;
  fill: var(--ink-soft);
  font-family: inherit;
}
.elevation-axis-title {
  font-size: 9px;
  font-weight: 700;
  fill: var(--ink-soft);
  font-family: inherit;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.elevation-tooltip {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  background: var(--green-900);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(6, 40, 24, 0.35);
}
.elevation-tooltip[hidden] { display: none; }

/* ---------- Key facts (landing page) ---------- */

/* The short version of deltagarinformation/: six facts, each an icon in a
   white disc with a title and one line — no card boxes, so it reads as a
   quick list rather than another wall of panels. */
.fact-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1000px;
  display: grid;
  gap: 26px 36px;
}
@media (min-width: 640px) { .fact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .fact-grid { grid-template-columns: repeat(3, 1fr); gap: 34px 40px; } }
.fact {
  display: grid;
  grid-template-columns: 54px 1fr;
  column-gap: 16px;
  align-items: start;
}
.fact-icon {
  grid-row: span 2;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  box-shadow: var(--shadow);
  font-size: 1.45rem;
}
.fact h3 { margin-top: 5px; font-size: 1.2rem; color: var(--green-900); }
.fact p { margin: 4px 0 0; font-size: 0.95rem; line-height: 1.45; }
.fact-grid + .cta-row { margin: 40px 0 0; }

/* ---------- IP map (deltagarinformation/) ---------- */

.map-figure { max-width: 900px; margin: 0 auto; }
.map-figure .legend-row { justify-content: center; }
.map-figure + .cta-row { margin: 36px 0 0; }

.map-frame {
  background: var(--white);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
}
.map-frame img {
  width: 100%;
  border-radius: 10px;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--white);
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-900);
  box-shadow: var(--shadow);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-chip-toggle {
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.legend-chip-toggle:hover { box-shadow: 0 2px 8px rgba(6, 40, 24, 0.2); }
.legend-chip-toggle:focus-visible { outline: 2px solid var(--green-800); outline-offset: 2px; }
.legend-chip-toggle[aria-pressed="false"] {
  opacity: 0.5;
  box-shadow: none;
  border-color: rgba(6, 60, 35, 0.15);
}
.legend-chip-toggle[aria-pressed="false"] .legend-dot { opacity: 0.4; }

.legend-dot.start { background: #1a9c4c; }
.legend-dot.finish { background: #d81b60; }
.legend-dot.lap { background: #1c1c1c; }
.legend-dot.water { background: #29aae2; }
.legend-dot.parking { background: #e0392b; }
.legend-dot.bib { background: #d8a35c; }

/* ---------- Anmalan ---------- */

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 16px; }
.cta-row.center { justify-content: center; }
.fine-print { font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- FAQ (faq/) ---------- */

/* One white card holding every question, divided by thin lines. A question
   is a full-width button; its answer slides open beneath it. */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid rgba(6, 60, 35, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq-item + .faq-item { border-top: 1px solid rgba(6, 60, 35, 0.12); }
.faq-heading { font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 20px 22px;
  border: none;
  background: none;
  color: var(--green-900);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
  /* No grey flash over the question when it is tapped on a phone. */
  -webkit-tap-highlight-color: transparent;
}
/* Only where there is a real pointer: on touch screens the hover colour
   sticks after a tap and reads as a flicker. */
@media (hover: hover) {
  .faq-question:hover { background: #f4f7f2; }
}
.faq-question:focus-visible { outline: 2px solid var(--green-700); outline-offset: -2px; }
.faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--green-700);
  transition: transform 0.35s ease;
}
.faq-item.is-open .faq-icon { transform: rotate(180deg); }
/* The spacing sits on the paragraphs, not on the wrapper: the wrapper is
   what gets squeezed to zero height when an answer closes, and padding on
   it would keep it from closing all the way. */
.faq-answer-inner p { margin: 0; padding: 0 22px; }
.faq-answer-inner p + p { margin-top: 10px; }
.faq-answer-inner p:last-child { padding-bottom: 20px; }
.faq-answer a,
.faq-more a { color: var(--green-700); font-weight: 600; }

/* The open/close animation. script.js adds .is-enhanced, and only then are
   closed answers actually collapsed — without JavaScript every answer just
   stays readable. The answer is a one-row grid whose row animates between
   0fr and 1fr, which slides it to its natural height (no heights measured
   in script). visibility keeps links inside a closed answer out of the tab
   order, switching only once it has closed. */
.faq-list.is-enhanced .faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.faq-list.is-enhanced .faq-answer-inner {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear 0.35s;
}
.faq-list.is-enhanced .faq-item.is-open .faq-answer { grid-template-rows: 1fr; }
.faq-list.is-enhanced .faq-item.is-open .faq-answer-inner {
  visibility: visible;
  transition: visibility 0s;
}
/* The text also fades with the slide, but only on devices with a mouse:
   on iPhone, fading text switches how it is drawn at the start and end of
   the fade, which shows as a flicker. There the answer just slides. */
@media (hover: hover) {
  .faq-list.is-enhanced .faq-answer-inner {
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0s linear 0.35s;
  }
  .faq-list.is-enhanced .faq-item.is-open .faq-answer-inner {
    opacity: 1;
    transition: opacity 0.35s ease 0.08s, visibility 0s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .faq-list.is-enhanced .faq-answer,
  .faq-list.is-enhanced .faq-answer-inner,
  .faq-icon { transition: none !important; }
}

.faq-more { margin: 28px 0 0; text-align: center; }

/* ---------- Terms (villkor/, integritetspolicy/) ---------- */

/* The same white card as the FAQ, holding plain text: one block per heading,
   divided by thin lines. */
.terms {
  max-width: 820px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid rgba(6, 60, 35, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.terms-block { padding: 24px 28px; }
.terms-block + .terms-block { border-top: 1px solid rgba(6, 60, 35, 0.12); }
.terms-block h2 { margin: 0 0 10px; color: var(--green-900); font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.terms-block p { margin: 0; }
.terms-block p + p { margin-top: 12px; }
.terms-block a { color: var(--green-700); font-weight: 600; }
@media (max-width: 600px) {
  .terms-block { padding: 20px 18px; }
}

/* ---------- News (nyheter/) ---------- */

/* The list: a grid of white cards — three side by side on desktop, two on
   tablets and one per row on phones. A card is an optional picture on top, then heading,
   date, ingress and a "Läs mer" button that sits at the bottom of the card
   whatever the length of the text, so the buttons in a row line up. */
.post-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 640px) {
  .post-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .post-list { grid-template-columns: repeat(3, 1fr); }
}
.post-card {
  /* Lets the title in a picture-less card size itself to the card's width. */
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(6, 60, 35, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* Without JavaScript, a card without a picture gets a green edge on top. */
.post-card:not(:has(.post-image)) { border-top: 6px solid var(--sik-dark-green); }
/* The picture area. Underneath the photo it always holds the site title and
   crest on the header's green; that is what shows when a news item has no
   picture or its picture can't be loaded (script.js adds the area to cards
   without one, and takes a broken photo away). */
.post-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  aspect-ratio: 4 / 3;
  background: var(--green-700) var(--banner-bg);
  color: #fff;
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-size: clamp(1.3rem, 10cqi, 2.1rem);
  font-weight: 800;
  line-height: 1.03;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.post-image::before { content: 'Två Sjöar Runt'; }
.post-image::after {
  content: '';
  width: 1.05em;
  height: 1.12em;
  background: url('../images/brand-images/crest-white.png?v=3') center / contain no-repeat;
}
.post-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 26px 26px;
}
.post-date {
  display: block;
  margin: 0;
  color: var(--green-700);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* "av Martin Larvia" after the date, in ordinary letters; gone without a name. */
.post-byline { font-weight: 600; letter-spacing: 0; text-transform: none; }
.post-byline:has(> span:empty) { display: none; }
.post-title { margin: 0 0 10px; font-size: 1.7rem; font-weight: 800; line-height: 1.15; }
.post-title a { color: var(--green-900); text-decoration: none; }
.post-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-lede { margin: 0; font-size: 1.12rem; font-weight: 500; color: var(--ink); }
.post-card .post-lede { margin: 12px 0 24px; font-size: 1.05rem; font-weight: 400; }
.post-more { margin-top: auto; padding: 10px 22px; font-size: 1rem; }
.section-title + .post-list { margin-top: 36px; }
/* The landing page shows the newest few only: the list's data-cms-latest
   says how many, and the rest have the hidden attribute (.post-card[hidden]
   below). */
/* A sideways scroller on the landing page: one card at a time on phones,
   two on tablets, three on desktop. Swipe, or use the arrows (script.js;
   they are the photo gallery's). The dots under it show one per news item,
   the ones in view filled in, and take you to that item. When every card
   fits, script.js marks the slider data-fits and the arrows and dots go.
   The scroller reaches 20px past the column on each side, so that a card's
   shadow isn't cut off. */
.post-slider {
  --per-view: 1;
  --post-gap: 16px;
  position: relative;
  margin: 0 -20px;
  container-type: inline-size;
}
@media (min-width: 640px) { .post-slider { --per-view: 2; --post-gap: 24px; } }
@media (min-width: 980px) { .post-slider { --per-view: 3; --post-gap: 28px; } }
.post-list-latest {
  display: flex;
  gap: var(--post-gap);
  padding: 4px 20px 30px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  /* The shadow of a card slid out to the side fades out at the edge
     instead of stopping in a straight line. */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent);
}
.post-list-latest::-webkit-scrollbar { display: none; }
.post-list-latest .post-card {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--post-gap)) / var(--per-view));
  scroll-snap-align: start;
}
/* (.post-slider in front so these win over .gallery-arrow's own rules.)
   Level with the middle of a card's picture, which is 4:3. */
.post-slider .post-slider-arrow {
  top: calc((100cqi - 40px - (var(--per-view) - 1) * var(--post-gap)) / var(--per-view) * 0.375 + 4px);
}
.post-slider-arrow.gallery-prev { left: 30px; }
.post-slider-arrow.gallery-next { right: 30px; }
.post-slider[data-fits] .post-slider-arrow,
.post-slider[data-fits] .post-dots { display: none; }
.section-title + .post-slider { margin-top: 32px; }
@media (min-width: 640px) {
  .section-title + .post-slider { margin-top: 36px; }
}

/* The dots: small and round, the ones in view a little bigger and green. Each is a
   button 24px tall, with the dot drawn inside it, so it is easy to hit. */
.post-dots {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin: -8px 0 0;
  padding: 0 20px;
  list-style: none;
}
.post-dots button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-width: 20px;
  padding: 0 4px;
  border: none;
  background: none;
  cursor: pointer;
}
.post-dots button::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(6, 61, 39, 0.25);
  transition: width 0.25s ease, height 0.25s ease, background-color 0.25s ease;
}
.post-dots button:hover::before { background: rgba(6, 61, 39, 0.45); }
.post-dots button[aria-current="true"]::before { width: 12px; height: 12px; background: var(--green-700); }
.post-dots button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) {
  .post-dots button::before { transition: none; }
}
/* Cards on another page of the list (see the pager below). */
.post-card[hidden] { display: none; }

/* Page buttons under the news list — added by script.js only when there are
   more news items than fit on one page. */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; }
.pager button {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--green-700);
  border-radius: 999px;
  background: transparent;
  color: var(--green-800);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.pager button:hover { background: rgba(12, 107, 63, 0.08); }
.pager button[aria-current="page"] { background: var(--green-900); border-color: var(--green-900); color: #fff; cursor: default; }
.pager button[hidden] { display: none; }
.post-back { display: inline-block; color: var(--green-700); font-weight: 700; text-decoration: none; }
.post-back:hover { text-decoration: underline; text-underline-offset: 4px; }

/* A news item's own page: a single readable column. */
.post { max-width: 760px; margin: 0 auto; }
.post-back { margin-bottom: 26px; }
.post .section-title { margin: 8px 0 14px; }
.post .post-lede { font-size: 1.25rem; }
.post-body { margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(6, 60, 35, 0.14); }
.post-body p { margin: 0 0 14px; }
.post-body ul { margin: 0 0 14px; padding-left: 22px; color: var(--ink-soft); line-height: 1.55; }
.post-body li + li { margin-top: 6px; }
.post-body a { color: var(--green-700); font-weight: 600; }
@media (max-width: 600px) {
  .post-card-body { padding: 20px 18px 22px; }
}

/* ---------- Quote (landing page) ---------- */

/* A participant's words, large and centred on a green gradient, under a
   pair of slanted quotation marks. */
.section-quote {
  padding: 84px 0;
  background: linear-gradient(135deg, var(--green-900), var(--sik-dark-green) 60%, var(--sik-green));
}
.quote { max-width: 860px; margin: 0 auto; text-align: center; }
.quote-mark { display: block; width: 60px; height: 36px; margin: 0 auto 40px; fill: var(--gold); }
.quote blockquote { margin: 0; }
.quote blockquote p {
  margin: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.quote blockquote p + p { margin-top: 0.8em; }
.quote figcaption { margin-top: 30px; color: rgba(255, 255, 255, 0.9); font-size: 1rem; }
@media (max-width: 600px) {
  .section-quote { padding: 60px 0; }
  .quote-mark { width: 46px; height: 28px; margin-bottom: 28px; }
}

/* ---------- Page not found (404.html) ---------- */

/* The page is nothing but one card, centred on a pale background, in the
   manner of a news card without a picture: the site title and crest on the
   header's green, here under a big "404", and the message in the white
   part below. */
.notfound-page { background: #eef3ec; }
.notfound-page main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.notfound-page .notfound { width: 100%; }
.notfound {
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(6, 60, 35, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.notfound-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 44px 20px 48px;
  background: var(--green-700) var(--banner-bg);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}
.notfound-code { color: var(--gold); font-size: clamp(6rem, 26vw, 11rem); letter-spacing: 0.02em; }
.notfound-brand { display: inline-flex; align-items: center; gap: 0.25em; font-size: clamp(1.6rem, 7vw, 2.6rem); white-space: nowrap; }
.notfound-brand .crest { width: 1.05em; height: 1.12em; }
.notfound-body { padding: 34px 28px 30px; }
.notfound-body p { max-width: 520px; margin: 0 auto; }
.notfound-body a { color: var(--green-700); font-weight: 600; }
@media (max-width: 600px) {
  .notfound-body { padding: 28px 18px 24px; }
}

/* ---------- Gallery ---------- */

/* Edge-to-edge photo reel: one photo per view on phones, two on tablets,
   three on desktop. It is a native horizontal scroller with scroll-snap, so
   swiping works on its own; the arrows (script.js) just scroll it one photo
   at a time. */
.gallery { background: var(--white); }
.gallery-viewport { position: relative; }
.gallery-track {
  /* Photos butt up against each other and the screen edges. */
  --gallery-gap: 0px;
  --gallery-per-view: 1;
  display: flex;
  gap: var(--gallery-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide {
  flex: 0 0 calc((100% - (var(--gallery-per-view) - 1) * var(--gallery-gap)) / var(--gallery-per-view));
  aspect-ratio: 3 / 2;
  scroll-snap-align: start;
  overflow: hidden;
  background: var(--white);
}
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
/* .has-fade / .is-in are set by script.js: a photo sliding into view is a
   white panel first and then fades in, while the ones already showing just
   move along. The transition lives on .is-in only, so the reset back to
   white (which happens off screen) is instant. */
.gallery-track.has-fade .gallery-slide img { opacity: 0; }
.gallery-track.has-fade .gallery-slide.is-in img { opacity: 1; transition: opacity 0.7s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .gallery-track.has-fade .gallery-slide img { opacity: 1; transition: none; }
}
/* While script.js moves the view back to the middle copy of the photos
   (see the gallery block there): everything stays fully visible, so the
   swap between identical photos can't be seen. */
.gallery-track.is-teleporting .gallery-slide img { opacity: 1 !important; transition: none !important; }
@media (min-width: 640px) { .gallery-track { --gallery-per-view: 2; } }
@media (min-width: 1000px) { .gallery-track { --gallery-per-view: 3; } }

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--green-900);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.15s ease;
}
.gallery-arrow svg { width: 22px; height: 22px; }
.gallery-arrow:hover { background: #fff; }
.gallery-arrow:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gallery-prev { left: 24px; }
.gallery-next { right: 24px; }

/* ---------- Kontakt ---------- */

/* Three footer-style columns on the same green as the header banner. */
.section-contact {
  background: var(--banner-bg);
  color: #fff;
  --ink-soft: rgba(255, 255, 255, 0.92);
}
.contact-grid { display: grid; gap: 36px; }
@media (min-width: 760px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); gap: 48px; }
}
.contact-heading {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.contact-col p { margin: 0; }
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.contact-list a { color: inherit; text-underline-offset: 3px; }
.contact-list a:hover { color: #fff; }
.contact-email {
  color: #fff;
  font-weight: 600;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.contact-col .crest { margin-top: 16px; }
.section-contact .social-row { justify-content: flex-start; gap: 12px; margin-top: 18px; }
.section-contact .social-icon { width: 44px; height: 44px; }
.section-contact .social-icon svg { width: 22px; height: 22px; }

/* ---------- Sponsors ---------- */

.sponsors {
  padding-top: 44px;
  padding-bottom: 64px;
}

.sponsor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.sponsor-row img {
  height: 52px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  transition: transform 0.15s ease;
}
.sponsor-row img:hover { transform: translateY(-2px); }

/* ---------- Scroll reveal ---------- */

/* These classes are only ever added by script.js, so without JS (or with
   reduced motion) nothing is hidden. script.js also removes them again once
   the animation has finished — a leftover transform/will-change on an
   ancestor would break the map's position: fixed page-fullscreen. */
.reveal {
  opacity: 0;
  --reveal-shift: 28px;
  --reveal-duration: 0.9s;
}
/* Images travel further and take longer, so they read as sliding up into
   place rather than just fading in with the text. */
.reveal-media {
  --reveal-shift: 90px;
  --reveal-duration: 1.2s;
}
.reveal.is-visible {
  animation: reveal-up var(--reveal-duration) cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms) both;
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(var(--reveal-shift)); }
  to { opacity: 1; transform: none; }
}
