/* Shared by the landing page in every language, PrivacyPolicy.html and the Lambda server's track and city pages.
   Phone first; system typeface; every page reads without script (js/analytics.js only adds its question). */

/* Colour roles, from the world of paper hiking maps: forest green is the one accent; the map
   surfaces (the first screen, the city tiles, the tops of the city pages) are map paper with
   the app's coral tracks on them, the same in both schemes, as the app's map has no dark scheme.
   Each fill is paired with the colour for content on it. */
:root {
    --bg: #ffffff;
    --surface: #f2f4ee;
    --text: #1c2620;
    --muted: #4b5750;
    --rule: #d7ddd0;
    --primary: #2e6b3c;
    --on-primary: #ffffff;
    --link: #2e6b3c;
    --focus: #2e6b3c;
    --cta-bg: #2e6b3c;
    --on-cta: #ffffff;
    --shadow: 0 24px 48px -16px rgb(28 38 32 / 0.3);
    --card: #ffffff;
    --radius: 20px;
    /* The map paper and what sits on it: the same in both schemes. */
    --paper: #eef1e6;
    --ink: #1c2620;
    --ink-muted: #4b5750;
    --paper-rule: rgb(28 38 32 / 0.16);
    --paper-action: #2e6b3c;
    /* A track, as the app draws it (track_line). */
    --track: #e95e50;
    /* The hill meter's bars, in the colour of contour lines; the length bar's three bands. */
    --hill: #9a6a3a;
    --mix-short: #c5dabf;
    --mix-middle: #6f9f76;
    --mix-long: #2e6b3c;
    /* The charts of How people ride: the bars and lines a chart's title is about are a
       track's coral; the rest are quiet, below the coral in both schemes; markers are ink. */
    --chart-quiet: #a7b0a6;
    --chart-ink: #1c2620;
    --fade-shade: rgb(28 38 32 / 0.2);
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121613;
        --surface: #191e1a;
        --text: #e7ebe4;
        --muted: #b6bfb5;
        --rule: #313a32;
        --primary: #93d3a0;
        --on-primary: #0e2414;
        --link: #93d3a0;
        --focus: #93d3a0;
        --cta-bg: #23402b;
        --hill: #d4a574;
        --mix-short: #3d5a44;
        --mix-middle: #6f9f76;
        --mix-long: #b6e3be;
        --chart-quiet: #4f5b52;
        --chart-ink: #e7ebe4;
        --fade-shade: rgb(0 0 0 / 0.6);
        --on-cta: #ffffff;
        --shadow: 0 24px 48px -16px rgb(0 0 0 / 0.6);
        --card: #1b211c;
    }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    font: 1.0625rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--link); text-underline-offset: 0.15em; }

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

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

h1, h2 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1 {
    font-weight: 800;
    font-size: clamp(2.5rem, 1.3rem + 5vw, 4.5rem);
    line-height: 1.04;
    letter-spacing: -0.015em;
}
h2 {
    font-weight: 700;
    font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
    letter-spacing: -0.02em;
}
p { margin: 0 0 12px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
/* Korean breaks lines between words, not inside them. */
:lang(ko) { word-break: keep-all; }

.wrap {
    margin: 0 auto;
    max-width: 1160px;
    padding: 0 24px;
}
.wrap.narrow { max-width: 760px; }

/* A link that stands on its own line gets a full 48px touch target (TE-1). */
.block-link,
.footer-links a,
.footer-links span {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
}

.skip-link {
    position: absolute;
    left: 8px;
    top: -100px;
    z-index: 4;
    padding: 12px 16px;
    background: var(--bg);
}
.skip-link:focus { top: 8px; }

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

.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
/* The header stays at the top of the window, so what it holds stays one tap away after a
   link has jumped down the page (NS-4): the home page always; the landing page's sections
   from 900px and the store from 480px (on a narrower phone, the landing page's two-word
   store button). A section a link jumps to, or a field the keyboard reaches, stops under it,
   not behind it. A phone held upright gives it its 69px; one on its side has too little
   height, and lets it scroll away. */
@media (min-height: 500px) {
    html { scroll-padding-top: 80px; }
    .site-header { position: sticky; top: 0; z-index: 3; }
}
.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 68px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1875rem;
    letter-spacing: -0.01em;
}
.brand img {
    flex: none;
    width: 34px;
    height: 34px;
}

/* The landing page's own sections and "How people ride", which every page's header links
   to; shown where there is room for them. On the story itself its link is marked. */
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 24px;
    color: var(--muted);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a[aria-current="page"] { background: var(--surface); color: var(--text); }

.button {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    border-radius: 24px;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    padding: 10px 22px;
    font-size: 0.9375rem;
    line-height: 1.3;
}
.button:hover { filter: brightness(1.1); }
.button.secondary { border: 1.5px solid currentColor; background: transparent; color: var(--link); }

/* On a narrow phone the badge in the hero is the way to the store; the header keeps the name.
   The home page leads with its rides instead, so its header's button stays, in two words. */
.button .short { display: none; }
@media (max-width: 479px) {
    .site-header .button { display: none; }
    .site-header .button.store-short { display: inline-flex; padding: 0 16px; }
    .site-header .store-short .long { display: none; }
    .site-header .store-short .short { display: inline; }
}
/* From 900px the home page's header shows its four links too; until there is room for
   them beside the store's whole name (Spanish needs 1000px), the button says it in two words. */
@media (min-width: 900px) and (max-width: 999px) {
    .site-header .store-short .long { display: none; }
    .site-header .store-short .short { display: inline; }
}

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

section { padding: 56px 0; }
section h2 { margin-bottom: 32px; }
.band { background: var(--surface); }

/* The first screen: the promise, then a ride on its map, drawn as the app shows a track it has
   selected, with a card that names it and opens its page (DV-11). On a phone the map is a picture of its own under the city buttons, the card
   overlapping its foot; from 1280px it stands beside the words. The pictures are
   drawn for 2x and 3x screens (paper_maps.js), so the lines and the names stay sharp. */
.hero {
    position: relative;
    padding: 0;
    overflow: hidden;
    background: var(--paper);
    color: var(--ink);
}
.hero-map { position: relative; margin: 0 0 16px; }
.hero-art img { display: block; width: 100%; height: auto; }
/* On a phone the card overlaps only the map's foot, below the ride, however many lines its
   words take on a narrow screen. The phone picture keeps room for it under the ride (TALL's
   padding.bottom in paper_maps.js, 75 of 390px wide); on a screen under 320px the overlap shrinks
   with the picture. */
.hero-ride {
    position: relative;
    margin: max(-48px, -15vw) 24px 0;
    display: grid;
    gap: 2px;
    padding: 14px 18px;
    border-radius: 18px;
    background: #ffffff;
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 18px 40px -18px rgb(28 38 32 / 0.55), 0 0 0 1px rgb(28 38 32 / 0.06);
}
.hero-ride .name { font-size: 1.125rem; font-weight: 700; line-height: 1.25; }
.hero-ride .facts { font-size: 0.9375rem; }
.hero-ride .where { color: var(--ink-muted); font-size: 0.875rem; }
.hero-ride .go { margin-top: 6px; color: var(--paper-action); font-size: 0.9375rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hero-ride .go::after { content: " \2192"; content: " \2192" / ""; }
.hero-ride:hover .go { text-decoration-thickness: 2px; }
.hero .wrap { position: relative; z-index: 1; }
/* The words' column is as wide as the page and lies over the map beside it: only what it
   holds takes a tap, so the ride's card under its empty side does. */
.hero .wrap { pointer-events: none; }
.hero .wrap > * { pointer-events: auto; }
/* One column no wider than the screen: the finder and a long Korean word wrap inside it. */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; padding-bottom: 0; }
.hero .lead { overflow-wrap: break-word; }
.lead {
    margin: 16px 0 24px;
    max-width: 36rem;
    font-size: clamp(1.125rem, 1rem + 0.7vw, 1.4375rem);
    line-height: 1.45;
    color: var(--muted);
    text-wrap: pretty;
}
.hero .lead { color: var(--ink); }
.hero :focus-visible { outline-color: var(--paper-action); }
/* From a tablet the wide picture, cut to a band that grows with the window so the whole ride
   stays in it; the ride runs down its middle, the card at its foot on the left. */
@media (min-width: 700px) {
    .hero-art img { height: clamp(480px, 50vw, 640px); object-fit: cover; object-position: 60% 15%; }
    .hero-ride { position: absolute; left: 24px; bottom: 16px; width: 330px; margin: 0; }
}
/* Beside the words the map keeps its shape, so the card stays beside the ride: paper_maps.js draws
   the ride within 48% to 70% across and 7% to 70% down of the wide picture. Its size is fixed, not the
   first screen's, which is taller in a language of longer words: a wider map brought the ride
   under the finder (German and French at 1280px). How close the ride comes to the words also
   depends on its shape (paper_maps.js says when to look again). Its left and bottom edges and
   the words fade into paper. */
@media (min-width: 1280px) {
    .hero-map {
        position: absolute;
        top: 0;
        right: 0;
        height: 760px;
        aspect-ratio: 1320 / 825;
        margin: 0;
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%), linear-gradient(0deg, transparent 0%, #000 14%);
        -webkit-mask-composite: source-in;
        mask-image: linear-gradient(90deg, transparent 0%, #000 22%), linear-gradient(0deg, transparent 0%, #000 14%);
        mask-composite: intersect;
    }
    .hero-art img { height: 100%; }
    .hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, var(--paper) 0%, var(--paper) 36%, rgb(238 241 230 / 0) 54%), linear-gradient(0deg, rgb(238 241 230 / 0.9) 0%, rgb(238 241 230 / 0) 22%);
        pointer-events: none;
    }
    .hero-grid { padding-bottom: 40px; }
    .hero-ride { left: 72%; top: 35%; bottom: auto; width: 296px; }
}

/* The badge is 60px tall: above the 48px floor and the same image the track pages use. */
.store { display: inline-block; border-radius: 10px; }
.store img { display: block; width: 172px; height: 60px; }
/* The badge, and beside it on a computer the same link as a code for an Android phone's
   camera (DEC-091): drawn by js/phone-code.js, hidden until then, and on a phone, where the
   badge itself leads to Play, never shown. */
.get-app { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.phone-code { display: flex; align-items: center; gap: 14px; max-width: 22rem; color: inherit; text-decoration: none; }
/* 160px: about 3 pixels a module on a plain monitor, which a phone's camera reads from a step back. */
.phone-code svg { flex: none; width: 160px; height: 160px; border-radius: 8px; }
.phone-code span { font-size: 0.9375rem; line-height: 1.4; }
.phone-code:hover span { text-decoration: underline; }
.phone-code[hidden] { display: none; }
@media not all and (hover: hover) and (pointer: fine) and (min-width: 768px) {
    .phone-code { display: none; }
}

/* What the map holds, in numbers. */
.proof {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 8px;
    border: 1px solid var(--paper-rule);
    border-radius: var(--radius);
    background: rgb(255 255 255 / 0.86);
    overflow: hidden;
    backdrop-filter: blur(10px);
}
.proof li {
    padding: 12px 16px;
    color: var(--ink-muted);
    font-size: 0.9375rem;
    line-height: 1.3;
}
/* The rules between the tiles are borders, which land on whole pixels: a 1px gap between
   columns of a fractional width can fall between two pixels and not show. */
.proof li:nth-child(even) { border-left: 1px solid var(--paper-rule); }
.proof li:nth-child(n+3) { border-top: 1px solid var(--paper-rule); }
.proof strong {
    display: block;
    color: var(--ink);
    font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
/* A count of what the site has leads to it: the whole tile is the link (TE-1), its words
   in the link colour and underlined, as every link of the site, and the figure stays ink. */
.proof a { display: block; height: calc(100% + 24px); margin: -12px -16px; padding: 12px 16px; color: var(--paper-action); text-decoration: none; }
.proof a span { text-decoration: underline; }
.proof a:hover { background: #ffffff; }
.proof a:focus-visible { outline-offset: -3px; }

/* The map behind the first screen is credited on it (MP-8). */
.hero-credit { margin: 0 0 16px; color: var(--ink-muted); font-size: 0.75rem; text-align: right; }

.pillar-lead { color: var(--muted); }
.points { margin-top: 24px; }
.points li {
    position: relative;
    max-width: 34rem;
    padding: 10px 0 10px 36px;
    border-top: 1px solid var(--rule);
    font-weight: 500;
}
/* A tick, drawn: the item is something the product does. */
.points li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 16px;
    width: 14px;
    height: 7px;
    border-left: 2.5px solid var(--primary);
    border-bottom: 2.5px solid var(--primary);
    transform: rotate(-45deg);
}

/* The app's own screen, in a plain phone outline. */
.phone {
    width: min(300px, 74vw);
    padding: 9px;
    border-radius: 44px;
    background: #1b1f1c;
    box-shadow: var(--shadow);
}
.phone picture { display: block; }
.phone img { display: block; width: 100%; border-radius: 36px; }

/* The pillars' drawings, on the hero's map paper. */
.art { width: min(440px, 100%); height: auto; border-radius: 28px; box-shadow: var(--shadow); }
.art-bg { fill: var(--paper); }
.art-road { fill: none; stroke: #d0d8c4; stroke-width: 3; }
.art-route { fill: none; stroke: var(--track); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
/* The part of the route already ridden is grey; what lies ahead keeps the track's colour. */
.art-route.done { stroke: #9aa392; stroke-width: 6; }
.art-cone { fill: rgb(138 180 248 / 0.35); }
.art-puck { fill: #8ab4f8; stroke: #ffffff; stroke-width: 5; }
.art-pin { stroke: #ffffff; stroke-width: 4; }
.art-pin.start { fill: #3ecf8e; }
.art-pin.end { fill: var(--track); }
.art-climb { fill: rgb(233 94 80 / 0.18); }
.art-climb-line { fill: none; stroke: var(--track); stroke-width: 3; stroke-linejoin: round; }
.art-chip rect { fill: #ffffff; }
.art-chip path { fill: none; stroke: var(--paper-action); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.art-chip .art-line { stroke: #cfd6c6; }
/* The first pillar's is a map, with its list drawn over it and its credit under it. */
.art-map { position: relative; overflow: hidden; background: var(--paper); }
.art-map img, .art-map svg { display: block; width: 100%; height: auto; }
.art-map svg { position: absolute; inset: 0; }

/* The home page as a way into the rides ------------------------------------------ */
/* One finder over the cities with a page, its scope in its placeholder (NS-6); the
   chips under it are the cities most people name, one tap each (NS-8, CL-4). */
.finder { margin: 0 0 16px; max-width: 34rem; }
.finder label { display: block; margin: 0 0 8px; font-weight: 600; font-size: 1.0625rem; }
.finder-box {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 28px;
    border: 1px solid var(--paper-rule);
    background: #ffffff;
    box-shadow: 0 12px 32px -16px rgb(28 38 32 / 0.45);
}
/* 16px or more, so a phone does not zoom into the field. */
.finder input {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: 24px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 1.0625rem;
}
.finder input::placeholder { color: #5d675f; }
.finder input:focus-visible { outline-offset: 0; outline-color: var(--paper-action); }
.finder button {
    flex: none;
    min-height: 48px;
    min-width: 64px;
    padding: 0 22px;
    border: 0;
    border-radius: 24px;
    background: var(--paper-action);
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.finder button:hover { filter: brightness(1.1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
.chips a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--paper-rule);
    border-radius: 24px;
    /* Nearly opaque: a city's name never sits on a track's line. */
    background: rgb(255 255 255 / 0.92);
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
}
.chips a:hover { border-color: var(--paper-action); background: #ffffff; }
/* A ride: itself on its map beside its name, where it is and its figures, as its page gives them. */
.ride-cards { display: grid; gap: 12px; }
.ride-cards a {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    height: 100%;
    padding: 12px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--text);
    text-decoration: none;
}
.ride-cards a:hover { border-color: var(--primary); }
.ride-cards a:hover .name { text-decoration: underline; }
.ride-cards .map { border-radius: 12px; }
.ride-cards .words { display: block; min-width: 0; }
/* On the narrowest phones the map gives the words room. */
@media (max-width: 359px) {
    .ride-cards a { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
}
.ride-cards .name { display: block; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.ride-cards .where { display: block; margin-top: 2px; color: var(--muted); font-size: 0.9375rem; }
.ride-cards .facts, .ride-cards .climb { display: block; margin-top: 4px; color: var(--muted); font-size: 0.9375rem; }
.ride-cards .climb { margin-top: 0; }
.ride-cards strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
/* The app: after the rides, what it does on the ride, each with a drawing of it. */
.app-intro { display: grid; gap: 40px; align-items: center; margin-bottom: 48px; }
.app-intro h2 { margin-bottom: 16px; }
.app-intro .section-lead { margin: 0 0 24px; }
/* Three more screens of the app, in a row that scrolls sideways on a phone. */
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: min(220px, 62vw); gap: 20px; margin: 0 0 48px; padding: 4px 0 16px; overflow-x: auto; scroll-snap-type: x mandatory; list-style: none; }
.shots li { scroll-snap-align: start; }
.shots figure { margin: 0; }
.shots .phone { width: 100%; padding: 7px; border-radius: 36px; }
.shots .phone img { border-radius: 30px; }
.shots figcaption { margin-top: 14px; font-weight: 600; line-height: 1.35; text-align: center; text-wrap: balance; }
.pillars { display: grid; gap: 16px; }
.pillar { padding: 20px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
.pillar .art { display: block; width: 100%; margin-bottom: 20px; box-shadow: none; border-radius: 16px; }
.pillar .art-map { margin-bottom: 6px; }
.art-credit { margin: 0 0 14px; color: var(--muted); font-size: 0.75rem; text-align: right; }
.pillar h3 { margin: 0 0 8px; font-size: 1.375rem; line-height: 1.2; }
.pillar .points { margin-top: 16px; }
/* On a phone the drawings would make the section four screens long; the words say it. */
@media (max-width: 759px) {
    .pillar .art, .art-credit { display: none; }
}
/* The heading of the first screen leaves room for the finder on a phone. */
.hero h1 { font-size: clamp(2.125rem, 1.2rem + 3.6vw, 3.75rem); }
.hero .lead { margin-bottom: 24px; }

/* Every city with a page: one ride it is known for, on its map, and what the card says of it. */
.section-lead { max-width: 36rem; margin: -16px 0 32px; color: var(--muted); font-size: 1.1875rem; }
.city-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
/* A card is as wide as its column, however long the name of its ride (cut short below). */
.city-cards > li { min-width: 0; }
.city-cards a {
    display: block;
    height: 100%;
    padding: 12px 12px 14px;
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
}
/* A card's map, a ride's or a city's. The window is a tile's shape (content-box, so the
   border is outside it); the picture of every tile behind it is as many windows wide and
   tall as it has tiles, moved so that the card's own tile (--col, --row) shows. */
.card-maps .map { position: relative; display: block; box-sizing: content-box; aspect-ratio: var(--tile); overflow: hidden; border: 1px solid var(--paper-rule); border-radius: 10px; background: var(--paper); }
.card-maps .map img { position: absolute; top: calc(var(--row) * -100%); left: calc(var(--col) * -100%); width: calc(var(--columns) * 100%); max-width: none; height: calc(var(--rows) * 100%); }
.city-cards .map { margin-bottom: 8px; }
/* The maps on the cards are credited under them (MP-8), as the first screen's is. */
.cards-credit { margin: 8px 0 0; color: var(--muted); font-size: 0.75rem; text-align: right; }
.city-cards .name { display: block; font-weight: 700; font-size: 1.0625rem; }
.city-cards .meta { display: block; color: var(--ink-muted); font-size: 0.875rem; }
/* The count wraps whole, after its country's dot. */
.city-cards .count span { white-space: nowrap; }
/* The one ride the card's map draws: its name on a line, cut short when long, then its length. */
.city-cards .ride { display: block; margin-top: 6px; color: var(--ink-muted); font-size: 0.8125rem; line-height: 1.35; }
.city-cards .ride-name { display: block; overflow: hidden; color: var(--ink); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.city-cards .ride-length { display: block; font-variant-numeric: tabular-nums; }
/* On a phone all the cities fit in a few screens: name and country, two to a row; the
   rides above carry the maps, and the map, its ride and the count are left to the city's page. */
@media (max-width: 599px) {
    .city-cards { gap: 8px; }
    .city-cards a { display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 10px 14px; border-radius: 16px; }
    .city-cards .map, .city-cards .count, .city-cards .ride, .cities .cards-credit { display: none; }
    .city-cards .name { font-size: 1rem; line-height: 1.25; }
    .city-cards .meta { font-size: 0.8125rem; line-height: 1.3; }
}
.city-cards a:hover .name { text-decoration: underline; }
.city-cards :focus-visible { outline-offset: 3px; }
.cities .more,
.story-teaser .more { margin: 32px 0 0; }

.columns { display: grid; gap: 40px; }
.columns > div { padding: 28px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
.columns h2 { margin-bottom: 12px; font-size: 1.5rem; }
.columns p { max-width: 34rem; }
/* How the tracks are chosen, and the limits of a search: said, but small. */
.fine, .limits { margin-top: 16px; color: var(--muted); font-size: 0.875rem; }
.limits { margin-top: 4px; }

.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    min-height: 64px;
    font-size: 1.1875rem;
}
.faq summary::-webkit-details-marker { display: none; }
/* A plus that becomes a minus: the two states differ in shape, not colour. */
.faq summary::after {
    content: "+";
    flex: none;
    width: 1em;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    text-align: center;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { max-width: 40rem; color: var(--muted); }
.faq details p:last-child { margin-bottom: 16px; }

.cta {
    padding: 0 0 72px;
    background: none;
    color: var(--on-cta);
    text-align: center;
}
.cta .wrap { max-width: 1112px; padding: 56px 24px; border-radius: 28px; background: var(--cta-bg); }
.cta h2 { margin-bottom: 24px; }
.cta :focus-visible { outline-color: var(--on-cta); }

.site-footer {
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.9375rem;
    padding: 40px 0 32px;
    background: var(--surface);
}
.site-footer p { margin: 0 0 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 8px; }
/* The page's own language in the list of languages: named, not a link. */
.footer-links [aria-current] { color: var(--text); font-weight: 600; }

/* Privacy policy, about page, track page and city pages --------------------------- */

.legal, .about, .track, .city { padding: 40px 20px 56px; }
/* The wide pages keep the header's side padding, so their words start under the logo. */
.wrap.track, .wrap.city { padding-right: 24px; padding-left: 24px; }
.legal h1, .about h1, .track h1, .city h1 { margin-bottom: 16px; font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); }
.legal h2, .about h2, .track h2, .city h2 { margin: 32px 0 8px; font-size: 1.25rem; }
/* Addresses are the longest words on the page; let them break on a narrow phone. */
.legal a, .about a, .site-footer a { overflow-wrap: anywhere; }
.about .lead { margin: 0 0 8px; }
/* Reading text stays under about 75 characters a line. */
.legal p, .legal li, .about p, .about li { max-width: 40rem; }

/* The page beside Komoot (server_nodejs/komoot_page.js): what a rider wants in the first
   column, each app's answer beside it; on a phone each row is a block, each answer labelled
   with its app, as there is no room for three columns. Notes, sources and the disclosure small. */
.about .note { color: var(--muted); font-size: 0.9375rem; }
.compare-what li { margin-bottom: 8px; }
.compare { width: 100%; margin: 8px 0 12px; border-collapse: collapse; font-size: 0.9375rem; }
.compare caption { margin-bottom: 8px; color: var(--muted); text-align: left; }
.compare th, .compare td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.compare thead th { color: var(--muted); font-weight: 600; }
.compare tbody th { width: 28%; font-weight: 600; }
@media (max-width: 599px) {
    .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .compare tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); }
    .compare th, .compare td { display: block; width: auto; padding: 2px 0; border: 0; }
    .compare tbody th { width: auto; margin-bottom: 4px; }
    .compare td::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 600; }
    /* French puts a space before a colon. */
    :lang(fr) .compare td::before { content: attr(data-label) "\00a0: "; }
}

/* The track page of the Lambda server (server_lambda/track_page.js). */
.track h1 { margin-bottom: 8px; overflow-wrap: anywhere; }
.track .lead { margin: 0 0 20px; }
/* The page is as wide as the header (page.js `wide`); its reading text keeps a line, as on a city page. */
.track p { max-width: 40rem; }
.track-map {
    height: 60vh;
    min-height: 280px;
    max-height: 480px;
    border: 1px solid var(--rule);
    border-radius: 16px;
    background: var(--surface);
    /* Leaflet's panes and controls (z-index up to 1000) stay under the skip link and under
       the header that stays at the top: the map is its own stacking context. */
    z-index: 0;
}
/* What is known of the track, as the city page's card says it: a chip each. */
.track-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.track-facts li { padding: 8px 14px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); color: var(--muted); font-size: 0.9375rem; }
.track-facts strong { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.track .note { color: var(--muted); font-size: 0.9375rem; }
/* What a track's mappers wrote of it, quoted: set apart from the facts above it, as on a city card. */
.track .desc { margin: 0 0 12px; color: var(--muted); font-style: italic; }
/* What the track's ways say of riding it, and the heights along it: one line over its baseline. */
.track .ways { margin: 0 0 16px; }
:is(.track, .route) .profile { margin: 16px 0 20px; }
/* The drawing stretches to the width; its axis labels are HTML around it, so they keep their size. */
:is(.track, .route) .profile-chart {
    display: grid;
    grid-template-columns: calc(var(--m, 6ch) + 10px) 1fr calc(var(--ft, 7ch) + 10px);
    grid-template-rows: 160px auto auto;
    padding: 14px 8px 8px;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: var(--card);
    color: var(--muted);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}
:is(.track, .route) .profile svg { display: block; width: 100%; height: 100%; overflow: visible; }
:is(.track, .route) .profile-y, :is(.track, .route) .profile-x { position: relative; }
:is(.track, .route) .profile-y span { position: absolute; right: 8px; transform: translateY(-50%); white-space: nowrap; }
:is(.track, .route) .profile-ft span { right: auto; left: 8px; }
:is(.track, .route) .profile-x { grid-column: 2; height: 1.6em; }
:is(.track, .route) .profile-mi { height: 1.4em; }
:is(.track, .route) .profile-x span { position: absolute; top: 6px; transform: translateX(-50%); white-space: nowrap; }
:is(.track, .route) .profile-x span:first-child { transform: none; }
:is(.track, .route) .profile-mi span { top: 2px; }
@media (max-width: 479px) {
    :is(.track, .route) .profile-chart { padding: 14px 4px 8px; }
    :is(.track, .route) .profile-y span { right: 6px; }
    :is(.track, .route) .profile-ft span { left: 6px; }
}
:is(.track, .route) .profile-grid { fill: none; stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
:is(.track, .route) .profile-area { fill: rgb(233 94 80 / 0.2); }
:is(.track, .route) .profile-line { fill: none; stroke: var(--track); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
:is(.track, .route) .profile figcaption { max-width: 40rem; margin-top: 8px; color: var(--muted); font-size: 0.9375rem; }
/* The ways to see the track that work on every device: under the map on Android, where the
   app's button leads; above it elsewhere, where they are what a visitor can do with the track. */
.track-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 12px; }
.links-first { display: none; margin: 0 0 20px; }
.links-first .track-links { margin-top: 0; }
.not-android .links-first { display: block; }
.not-android .links-later { display: none; }
/* The app's button leads on Android; elsewhere it opens nothing, so the page says where it works
   instead (the class is set by the page's script; without it, the button shows). */
.app-first { margin: 0 0 20px; }
/* Beside the button at phone width (360px and up) the badge is as tall as it, clear of nothing. */
.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.app-actions .button { min-height: 48px; padding-left: 14px; padding-right: 14px; }
.app-actions .hero-store { margin-top: 0; }
.app-actions .store img { width: 138px; height: 48px; }
.not-android .app-first { display: none; }
.app-later { display: none; }
.not-android .app-later { display: block; }
/* Leaflet's zoom buttons are 30px; a finger needs 48 (TE-1). */
.track-map .leaflet-bar a,
.track-map .leaflet-bar a:hover {
    width: 48px;
    height: 48px;
    font-size: 24px;
    line-height: 48px;
}

/* The city pages of the Lambda server (server_lambda/city_page.js). */
.wrap.city { padding-top: 0; }
.city .note { margin-top: 8px; color: var(--muted); font-size: 0.9375rem; }
/* Reading text stays under about 75 characters a line, as on the about page. */
.city p { max-width: 40rem; }
/* The top of a city's page, on the landing page's map paper, as wide as the window. */
body { overflow-x: clip; }
.city-hero {
    display: grid;
    gap: 16px;
    margin: 0 calc(50% - 50vw) 8px;
    padding: 8px calc(50vw - 50%) 28px;
    background: var(--paper);
    color: var(--ink);
}
.city-hero h1 { margin-bottom: 12px; }
.city-hero .lead { margin: 0 0 20px; color: var(--ink); font-size: 1.125rem; }
.city-hero .crumbs { color: var(--ink-muted); }
.city-hero .crumbs a { color: var(--paper-action); }
.city-hero :focus-visible { outline-color: var(--paper-action); }
/* What the list adds up to, as tiles side by side, each with its sign: the tracks, the
   longest, all of them together. The order is fixed (city_page.js): the longest only
   with two tracks or more, the total only with the longest. */
.city-facts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.city-facts li {
    padding: 10px 12px;
    border: 1px solid var(--paper-rule);
    border-radius: 14px;
    background: rgb(255 255 255 / 0.7);
    color: var(--ink-muted);
    font-size: 0.875rem;
    line-height: 1.3;
}
.city-facts li::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    margin-bottom: 6px;
    background: var(--paper-action);
    -webkit-mask: var(--sign) center / contain no-repeat;
    mask: var(--sign) center / contain no-repeat;
}
.city-facts li:nth-child(1) { --sign: url("/img/signs/tracks.svg"); }
.city-facts li:nth-child(2) { --sign: url("/img/signs/longest.svg"); }
.city-facts li:nth-child(3) { --sign: url("/img/signs/total.svg"); }
.city-facts strong { display: block; color: var(--ink); font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
/* A length breaks only at its space, between its two units: on a phone a third of the
   width holds "1,234.5 km" and "(767.0 mi)" a line each; under 360px no third does, and
   the facts become rows, the sign, the figure, then what it is. */
@media (max-width: 399px) {
    .city-facts li { padding: 10px; }
    .city-facts strong { font-size: 0.9375rem; }
}
@media (max-width: 359px) {
    .city-facts { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .city-facts li { display: grid; grid-template-columns: 20px auto minmax(0, 1fr); align-items: center; column-gap: 10px; padding: 8px 12px; }
    .city-facts li::before { margin: 0; }
    .city-facts strong { font-size: 1rem; }
}
/* At phone width the header hides its store button (above), so the top carries the badge,
   clear of the facts above it. */
.hero-store { display: block; width: fit-content; margin-top: 16px; }
@media (min-width: 480px) {
    .hero-store { display: none; }
}
/* What the city's list holds, in sentences: the first thing after the top. */
.city .summary { max-width: 40rem; margin-top: 24px; font-size: 1.0625rem; }
/* The map of the city's tracks: first on a phone, so a rider sees where the rides are before
   reading about them; beside the words from 900px. Its credit sits under it (MP-8). */
.city-map-pic { order: -1; margin: 0; }
.city-map-pic a { display: block; border-radius: 16px; }
.city-map-pic img { display: block; width: 100%; height: auto; border: 1px solid var(--paper-rule); border-radius: 16px; background: var(--paper); }
.city-map-pic figcaption { margin-top: 4px; color: var(--ink-muted); font-size: 0.6875rem; text-align: right; }
/* Each track's own shape in its row, in the track colour. */
.track-list a > svg { color: var(--track); }
.track-list a > svg path { stroke-linecap: round; stroke-linejoin: round; }
.track-list a > svg path { stroke-width: 3; }
/* Where the page is: the pages above it, then its own name, which is not a link. */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 8px; color: var(--muted); font-size: 0.9375rem; }
.crumbs li { display: inline-flex; align-items: center; min-height: 48px; }
.crumbs li + li::before { content: "\203A"; margin: 0 10px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 48px; }
@media (max-width: 599px) {
    .crumbs [aria-current] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* One track or one city a row; the whole row is the link (TE-1). */
.track-list li, .city-list li {
    margin-bottom: 8px;
    border: 1px solid var(--rule);
    border-radius: 14px;
    background: var(--card);
}
.track-list a, .city-list a {
    min-height: 56px;
    text-decoration: none;
}
.city-list a { display: flex; flex-direction: column; justify-content: center; padding: 8px 16px; }
/* A track's row: its sketch on map paper beside its name and length. */
.track-list a { display: grid; grid-template-columns: 96px 1fr; column-gap: 14px; align-content: center; padding: 8px 14px 8px 8px; }
.track-list a > svg { grid-column: 1; grid-row: 1 / span 4; align-self: center; width: 96px; height: 72px; border-radius: 10px; background: var(--paper); }
.track-list .name, .track-list .local, .track-list .facts, .track-list .more, .track-list .desc { grid-column: 2; }
.track-list .more { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
/* What a route's mappers wrote of it, quoted: set apart from the facts above it. */
.track-list .desc { margin-top: 4px; color: var(--muted); font-size: 0.875rem; font-style: italic; }
/* A route too long to be a track has no sketch: its words take the whole row. */
.track-list a.words { grid-template-columns: 1fr; padding: 10px 16px; }
.track-list .words > span { grid-column: 1; }
/* The hill meter (city_page.js hillMeter()): three rising bars, as many filled as the
   track is steep, then its word (LR-2). */
.hill { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hill svg { flex: none; }
.hill rect { fill: var(--rule); }
.hill-flat rect:nth-child(1), .hill-rolling rect:nth-child(-n+2), .hill-hilly rect { fill: var(--hill); }
.track-list .facts .hill { margin-left: 6px; }
/* The list at a glance: how long, as one bar of three bands, and how hilly, with the
   cards' meter. */
.ride-mix { display: grid; gap: 20px; max-width: 40rem; margin: 8px 0 28px; padding: 16px; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); }
.ride-mix .mix-title { margin: 0 0 10px; font-size: 1rem; font-weight: 700; }
.mix-bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; }
.mix-bar span { flex-basis: 0; }
.mix-short { background: var(--mix-short); }
.mix-middle { background: var(--mix-middle); }
.mix-long { background: var(--mix-long); }
.mix-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.mix-legend li { display: inline-flex; align-items: center; gap: 6px; }
.mix-legend .key { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.mix-hills { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.9375rem; }
.mix-hills strong { margin-left: 2px; font-variant-numeric: tabular-nums; }
.ride-mix .note { margin: 8px 0 0; color: var(--muted); font-size: 0.8125rem; }

/* The route pages (server_lambda/route_page.js): a city page's top, with the route's photo
   where the city has its map picture, first on a phone (the welcome before the numbers). */
.route-photo img { max-height: 440px; object-fit: cover; }
.route-photo figcaption a { display: inline; border-radius: 0; color: inherit; }
.route-sketch { display: block; width: 100%; height: auto; color: var(--track); }
.route-sketch path { stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
/* Its tiles: the length, how hilly, how it divides. */
.route-facts li:nth-child(1) { --sign: url("/img/signs/longest.svg"); }
.route-facts li:nth-child(2) { --sign: url("/img/signs/total.svg"); }
.route-facts li:nth-child(3) { --sign: url("/img/signs/tracks.svg"); }
/* A tile whose detail is further down (the heights, the sections, the places) leads there:
   its figure is a link, in the colour and underline of the top's links (CP-2), and the
   whole tile is its target (TE-1). */
.route-facts li { position: relative; }
.route-facts a { display: block; color: inherit; text-decoration: none; }
.route-facts a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.route-facts a strong { color: var(--paper-action); text-decoration: underline; text-underline-offset: 3px; }
/* What a route's length covers is a phrase, not a figure: on a phone the tiles are rows. */
@media (max-width: 599px) {
    .route-facts { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .route-facts li { display: grid; grid-template-columns: 20px auto minmax(0, 1fr); align-items: center; column-gap: 10px; min-height: 48px; padding: 8px 12px; }
    .route-facts li::before { margin: 0; }
    .route-facts a { display: grid; grid-column: 2 / 4; grid-template-columns: subgrid; align-items: center; }
}
/* A stage with no page of its own is a row like the others, not a link. */
.route-stages .row { display: grid; grid-template-columns: 96px 1fr; column-gap: 14px; align-content: center; min-height: 56px; padding: 8px 14px 8px 8px; }
.route-stages .row > svg { grid-column: 1; grid-row: 1 / span 4; align-self: center; width: 96px; height: 72px; border-radius: 10px; background: var(--paper); color: var(--track); }
.route-stages .row > svg path { stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.route-stages .row .name, .route-stages .row .local, .route-stages .row .facts { grid-column: 2; }
/* A section's GPX file at the end of its row, a target of its own (TE-1): the row stays
   the link to the section's page. */
.route-stages li.has-gpx { display: flex; align-items: stretch; }
.route-stages li.has-gpx > a:first-child, .route-stages li.has-gpx > .row { flex: 1; min-width: 0; }
.route-stages .stage-gpx { display: flex; align-items: center; justify-content: center; min-width: 56px; padding: 0 12px; border-left: 1px solid var(--rule); color: var(--link); font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.route-stages .stage-gpx:hover { text-decoration: underline; }
/* Under the map: the whole route's GPX file, and the code to show the map on another site,
   folded until asked for. */
.route-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 24px; margin: 12px 0 24px; }
.route-embed { flex: 1 1 20rem; max-width: 40rem; }
.route-embed summary { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; color: var(--primary); font-weight: 600; cursor: pointer; list-style: none; }
.route-embed summary::-webkit-details-marker { display: none; }
.route-embed summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; line-height: 1; }
.route-embed[open] summary::after { content: "\2212"; }
.route-embed p { margin: 8px 0; color: var(--muted); font-size: 0.9375rem; }
.route-embed textarea { box-sizing: border-box; width: 100%; padding: 10px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); color: var(--text); font: 0.8125rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.route-embed button { font-family: inherit; cursor: pointer; }
.route-embed .copy-status { margin-left: 8px; color: var(--text); font-weight: 600; }
/* The places a route passes, down a line in the track colour, each with its kilometre. */
.route-places { max-width: 40rem; margin: 8px 0 28px 6px; padding-left: 18px; border-left: 3px solid var(--track); }
.route-places li { position: relative; padding: 6px 0; }
.route-places li::before { content: ""; position: absolute; top: 12px; left: -26px; width: 13px; height: 13px; border: 3px solid var(--track); border-radius: 50%; background: var(--card); box-sizing: border-box; }
.route-places .at { display: inline-block; min-width: 4.5em; color: var(--muted); font-variant-numeric: tabular-nums; }
.route-places .place { font-weight: 600; }
/* The index of routes: a card each, its photo over its name. */
.route-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 24px; }
.route-index li { margin: 0; }
.route-index a { padding: 8px 8px 12px; }
.route-index img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; margin-bottom: 8px; border-radius: 10px; object-fit: cover; }

/* The countries of the city index. */
.city h3 { margin: 24px 0 8px; font-size: 1.0625rem; }
/* A length and its other unit stay on one line, on a line of its own under the kind: a
   separator between them would be left at the end of a line wherever the row wraps. */
.track-list .length { white-space: nowrap; }
.track-list .facts > .length { display: block; color: var(--text); }
.track-list .name, .city-list .name { font-weight: 600; overflow-wrap: anywhere; }
.track-list .facts, .city-list .facts { color: var(--muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
/* A route's own name where the card gives its English one: what its signs say. */
.track-list .local { font-size: 0.9375rem; overflow-wrap: anywhere; }
.track-list a:hover .name, .city-list a:hover .name { text-decoration: underline; }
/* The rest of a long list, folded under its first cards: the summary is a full-width row to tap (TE-1). */
.more-ridden { margin-bottom: 8px; }
.more-ridden summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    padding: 4px 0;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.more-ridden summary::-webkit-details-marker { display: none; }
.more-ridden summary::after { content: "+"; flex: none; width: 1em; font-size: 1.5rem; font-weight: 400; line-height: 1; text-align: center; }
.more-ridden[open] summary::after { content: "\2212"; }

/* How people ride (ride_story_page.js) ------------------------------------------ */

/* The story's text keeps a line of about 68 characters; its charts and tables take the
   column. The article stands clear of the header. */
.story-article { padding-top: 24px; }
.story h1 { margin-bottom: 16px; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
.story h2 { margin: 48px 0 12px; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); }
.story p { max-width: 36rem; }
.story .lead { margin: 0 0 8px; font-size: 1.1875rem; }
.story-provenance { color: var(--muted); font-size: 0.9375rem; }
.story-back { margin: 0 0 8px; font-size: 0.9375rem; }
.story-back a { display: inline-flex; align-items: center; min-height: 48px; }
.story-back a::before { content: "\2190"; margin-right: 6px; }

/* The countries with a page of their own, as a row of links under the lead. */
.story-countries { margin: 24px 0 8px; }
.story-countries h2 { margin: 0 0 4px; font-size: 1.0625rem; }
.story-countries p { margin: 0 0 4px; color: var(--muted); font-size: 0.9375rem; }
.story-countries ul { display: flex; flex-wrap: wrap; gap: 0 20px; }
.story-countries a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; }
.story-article a { overflow-wrap: anywhere; }

/* The three figures the page leads with, on the page's own surface in both schemes. */
.story-figures { display: grid; gap: 10px; margin: 24px 0 8px; }
.story-figures li { display: flex; align-items: baseline; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); color: var(--text); }
.story-figures strong { flex: none; font-size: 1.75rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.story-figures span { color: var(--muted); font-size: 0.9375rem; line-height: 1.3; }

/* A chart: its point as a caption, the marks from one baseline, the axis under it,
   and its numbers folded below. Coral is the tracks' colour and marks only what the
   caption says; the rest is quiet. A median is a dashed ink line whose words take a
   strip above the marks. */
.story-chart { --fade-bg: var(--card); margin: 20px 0 16px; padding: 16px 16px 4px; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); }
.story-chart figcaption { margin-bottom: 20px; }
.story-chart figcaption strong { display: block; font-size: 1.0625rem; line-height: 1.3; }
.story-chart figcaption span { display: block; margin-top: 2px; color: var(--muted); font-size: 0.875rem; }
.story-plot { position: relative; height: 180px; border-bottom: 1px solid var(--muted); }
.story-plot.has-strip { margin-top: 40px; }
.story-cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; align-items: end; height: 100%; }
.story-col { display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.story-bar { position: relative; width: 100%; max-width: 24px; border-radius: 4px 4px 0 0; background: var(--chart-quiet); }
.story-col.accent .story-bar { background: var(--track); }
.story-col:hover .story-bar { opacity: 0.8; }
/* A histogram's bars touch but for a hairline, so they read as one distribution. */
.story-cols.histogram { gap: 1px; }
.story-cols.histogram .story-bar { max-width: none; border-radius: 2px 2px 0 0; }
.story-value,
.story-marker > span,
.story-dot > span { color: var(--text); font-size: 0.8125rem; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; }
.story-value { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 4px; font-weight: 600; }
.story-marker { position: absolute; top: -40px; bottom: 0; width: 0; border-left: 1.5px dashed var(--chart-ink); }
.story-marker > span { position: absolute; top: 0; left: 6px; width: max-content; max-width: 7.5em; white-space: normal; }
.story-marker strong,
.story-dot strong { display: block; font-weight: 600; }
.story-marker.lean-left > span { right: 6px; left: auto; text-align: right; }
/* On a country's page: all riders' speeds as an outline over the bars, and a tick at their median. */
.story-outline { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.story-outline path { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.story-marker.compare { bottom: auto; height: 46px; border-left: 1.5px solid var(--muted); }
.story-marker.compare > span { color: var(--muted); }
.story-x { position: relative; height: 1.6em; margin-top: 6px; color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.story-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.story-x2 { margin-top: 0; }
.story-names { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; margin-top: 6px; color: var(--muted); font-size: 0.75rem; text-align: center; font-variant-numeric: tabular-nums; }
.story-names span { overflow: hidden; white-space: nowrap; }

/* The hours: two lines over one scale, the weekend's a cased coral track, each named at its peak. */
.story-lines svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.story-grid { fill: none; stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.story-line { fill: none; stroke: var(--chart-quiet); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.story-line.casing { stroke: var(--card); stroke-width: 6.5; }
.story-line.accent { stroke: var(--track); }
.story-y span { position: absolute; left: 0; transform: translateY(-120%); color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.story-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--chart-quiet); box-shadow: 0 0 0 2px var(--card); }
.story-dot.accent { background: var(--track); }
/* A name wraps rather than leave the chart: "Unter der Woche". */
.story-dot > span { position: absolute; bottom: 14px; left: 0; width: max-content; max-width: 7.5em; color: var(--muted); white-space: normal; }
.story-dot strong { color: var(--text); }
/* A name leaning left has the room of the hours before it. */
.story-dot.lean-left > span { right: 0; left: auto; max-width: 9.5em; text-align: right; }

/* The seasons: one small chart per region, the most rides from May to September first, on one scale,
   each with the share of an even year dashed across it. */
.story-multiples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.story-panel { display: flex; flex-direction: column; }
.story-panel p { margin: 0 0 auto; padding-bottom: 6px; font-size: 0.875rem; line-height: 1.35; }
.story-panel strong { font-variant-numeric: tabular-nums; }
.story-small { height: 56px; }
.story-even { position: absolute; right: 0; left: 0; border-top: 1px dashed var(--muted); pointer-events: none; }
/* Side by side, a panel names only January, May and September: where the coral starts and ends. */
.story-multiples:not(.single) .story-names span { overflow: visible; }
.story-multiples:not(.single) .story-names span:not(:nth-child(4n+1)) { visibility: hidden; }
.story-multiples.single { grid-template-columns: minmax(0, 1fr); max-width: 32rem; }
.story-multiples.single .story-small { height: 140px; }
@media (min-width: 360px) {
    .story-multiples { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 14px; }
}

/* Every chart's numbers, and the tables, in columns that line up. */
.story-numbers summary { display: flex; align-items: center; gap: 10px; min-height: 48px; color: var(--link); font-size: 0.9375rem; font-weight: 600; cursor: pointer; list-style: none; }
.story-numbers summary::-webkit-details-marker { display: none; }
.story-numbers summary::after { content: ""; width: 7px; height: 7px; margin-top: -4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s ease, margin 0.15s ease; }
.story-numbers[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
@media (prefers-reduced-motion: reduce) {
    .story-numbers summary::after { transition: none; }
}
.story-numbers table { margin-bottom: 12px; }
.story-table-wrap { margin: 16px 0; overflow-x: auto; }
/* A table that scrolls on a phone: the keyboard reaches it, and a shade at its right
   edge says there is more, until it is scrolled to its end, which covers the shade. */
.story-table-wrap[role="region"] {
    background:
        linear-gradient(to right, rgb(255 255 255 / 0), var(--fade-bg, var(--bg)) 60%) 100% 0 / 32px 100% no-repeat local,
        radial-gradient(farthest-side at 100% 50%, var(--fade-shade), rgb(0 0 0 / 0)) 100% 0 / 14px 100% no-repeat scroll;
}
.story-table,
.story-numbers table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.story-table caption { padding-bottom: 8px; font-weight: 700; text-align: left; }
.story-table th,
.story-table td,
.story-numbers th,
.story-numbers td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.story-table thead th,
.story-numbers thead th { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.story-table tbody th,
.story-numbers tbody th { font-weight: 500; }
.story .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.story .num:last-child { padding-right: 0; }
@media (max-width: 479px) {
    .story-table { font-size: 0.8125rem; }
    .story-table th,
    .story-table td { padding-right: 8px; }
}

/* The way to the app, on map paper, whose links keep the paper's green in both schemes. */
.story-cta { margin: 56px 0 24px; padding: 24px; border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.story-cta h2 { margin-top: 0; }
.story-cta a { color: var(--paper-action); }

/* Wider screens ----------------------------------------------------------------- */

@media (min-width: 600px) {
    .story-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .story-figures li { display: block; }
    .story-figures span { display: block; margin-top: 6px; }
    .story-plot { height: 220px; }
    .story-small { height: 80px; }
    .story-article { padding-top: 40px; }
    .story-chart { padding: 20px 24px 8px; }
    .story-multiples { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .story-multiples.single { grid-template-columns: minmax(0, 1fr); }
    .city-cards { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .proof { grid-template-columns: repeat(4, 1fr); }
    .proof li + li { border-left: 1px solid var(--paper-rule); }
    .proof li:nth-child(n+3) { border-top: 0; }
    .city-list { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 12px; }
    .track-list { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 12px; }
    .city-facts strong { font-size: 1.125rem; }
}

@media (min-width: 760px) {
    .columns { grid-template-columns: repeat(2, 1fr); gap: 56px; }
    .ride-mix { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
    .shots { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 240px)); justify-content: space-between; gap: 32px; overflow: visible; }
    .ride-cards { grid-template-columns: repeat(2, 1fr); }
    .ride-cards a { grid-template-columns: 144px minmax(0, 1fr); }
}

@media (min-width: 900px) {
    .city-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 40px; padding-top: 16px; padding-bottom: 40px; margin-bottom: 16px; }
    .city .track-map { max-height: 520px; }
    /* A track's map beside its words, as a city's is beside its own, so it is in the first screen. */
    .track-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; gap: 40px; }
    .track-top .track-map { height: min(70vh, 560px); max-height: none; margin-top: 8px; }
    .city-map-pic { order: 0; }
    .nav { display: flex; }
    .site-header .button { margin-left: 8px; }
    section { padding: 96px 0; }
    .hero-grid { padding-top: 64px; }
    .hero-text { max-width: 40rem; }
    .hero h1 { max-width: 13em; }
    .app-intro { grid-template-columns: minmax(0, 1fr) auto; gap: 72px; }
    /* Side by side, the cards share their rows, so the first one's map credit
       does not push its heading below the others'. */
    .pillars { grid-template-columns: repeat(3, 1fr); row-gap: 0; }
    .pillar { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
    .ride-cards { grid-template-columns: repeat(3, 1fr); }
    .city-cards { grid-template-columns: repeat(5, 1fr); }
    .cta { padding: 0 24px 96px; }
    .cta .wrap { padding: 72px 24px; }
}

/* Counting visits (js/analytics.js) ------------------------------------------- */

/* The question analytics.js asks once, at the foot of the window; both answers
   are the same size and weight, so neither is the easy one. */
.consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 20px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    font-size: 0.9375rem;
}
.consent p { margin: 0 0 12px; }
.consent-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.consent-buttons button {
    flex: 1 1 140px;
    min-height: 48px;
    padding: 0 22px;
    border: 1.5px solid var(--primary);
    border-radius: 24px;
    background: transparent;
    color: var(--link);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.consent-buttons button:hover { background: var(--surface); }

/* The privacy policy's "Change your choice": a button that reads as a link. */
.link-button {
    min-height: 48px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--link);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    cursor: pointer;
}
