﻿/* Import Google Fonts: Bebas Neue for headers, Inter for normal text */
/* Inter carries 700 as well as 600: the micro-labels throughout the site ask for font-weight:700
   and were being synthesised by the browser, which is muddy at 0.66-0.78rem uppercase with
   letter-spacing. */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;600;700&display=swap');

html {
    scroll-behavior: smooth;
}

/* blazor.web.js gives the page's <h1> tabindex="-1" and focuses it after every enhanced
   navigation, so screen readers announce the new page — the SPA equivalent of a full load
   moving focus to the top of the document. That is the default Blazor Web App template
   behaviour, and the template's own wwwroot/app.css suppresses the resulting focus ring with
   this exact rule — but app.css is never linked from App.razor here, only this file is, so the
   ring was showing with nothing to hide it until a click elsewhere moved focus off. Safe to
   leave unconditional: tabindex="-1" takes the element out of the normal tab order, so a
   keyboard user tabbing through the page can never land here themselves. */
h1:focus {
    outline: none;
}

/* The nav is a fixed pill occupying roughly y=25 to y=90, so anything scrolled to by an anchor
   lands underneath it — Kiezeltocht's "Meer info" button jumps to #routes and puts the heading
   behind the navigation. It also applies to the h1 blazor.web.js focuses after every enhanced
   navigation, which had the same problem for anyone using a keyboard. */
[id] {
    scroll-margin-top: 110px;
}

body { 
    margin: 0; 
    font-family: 'Inter', sans-serif; 
    background: #111;
}

/* The Floating Pill Navigation */
nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 10px 30px; 
    background: #fff; 
    position: fixed; 
    top: 25px; 
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1400px;
    z-index: 100;
    border-radius: 50px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    box-sizing: border-box;
}

/* width: auto is load-bearing now that the <img> carries width/height attributes. Those map to
   presentational hints, so with `height: 45px` here and `width: 440px` from the attribute BOTH
   dimensions were specified and the logo stretched to 440x45 across a 375px phone. `auto` hands
   the width back to the intrinsic ratio the attributes declare — which is the point of having
   them: the pill knows how wide the logo will be before the file arrives. */
.logo-img {
    height: 45px;
    width: auto;
    display: block;
}

/* Wraps the links and the auth control so the hamburger can reveal both together on mobile.
   display:contents makes the wrapper itself vanish from layout, leaving .nav-links and
   .nav-actions as direct flex children of nav exactly as they were before it existed. */
#nav-menu {
    display: contents;
}

.nav-links {
    display: flex;
    flex: 1; 
    justify-content: space-evenly; 
    align-items: center;
    padding: 0 2vw; 
}

/* The underline is a background image rather than a pseudo-element or a real border, and that is
   the whole reason it can exist here: these are inline <a>s inside a flex row whose widths were
   measured to the pixel (see .nav-user below — the logo, six links and the toggle want 1079px of
   1079px). A ::after would need position:relative and display:inline-block, which changes how
   they lay out; background-size animates on the compositor and changes nothing. */
.nav-links a {
    margin: 0;
    text-decoration: none;
    color: #1a1a1a;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.3rem);
    letter-spacing: 1px;
    white-space: nowrap;
    background-image: linear-gradient(#b30000, #b30000);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 2px;
    transition: color 0.2s, background-size 0.25s ease;
}

.nav-links a:hover {
    color: #666;
    background-size: 100% 2px;
}

/* NavLink sets ActiveClass="is-active" on every link above, but nothing ever styled it, so the
   page you are on was indistinguishable from the six you are not. It now carries the underline
   permanently as well as the red, which is what makes the hover read as "you would go here"
   against "you are here". */
.nav-links a.is-active {
    color: #b30000;
    background-size: 100% 2px;
}

/* --- Language Switcher Styling --- */
.lang-switch {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

#lang-toggle {
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    border-radius: 5px;
    padding: 4px 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#lang-toggle:hover {
    background: #1a1a1a;
    color: #fff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 1px solid #eee;
    padding-left: 20px;
    /* Sits after the language toggle, which follows #nav-menu in the markup. Without this the
       login control would land between the links and the toggle instead of at the far right. */
    order: 1;
}

.nav-auth-form {
    margin: 0;
    display: flex;
}

/* An <a> to /login rather than a submit: signing in starts with a page, because the official
   Strava button does not fit in the pill. Logout is still a form POST — SignOutAsync writes a
   Set-Cookie header, which needs a real HTTP response. */
.login-btn {
    background: #1a1a1a;
    color: #ffffff;
    padding: 8px 24px;
    border: none;
    border-radius: 50px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    line-height: 1.4;
    text-decoration: none;
    letter-spacing: 1px;
    cursor: pointer;
    /* `translate`, not `transform`, throughout the site's motion work: the two compose, so a lift
       written this way can never collide with an entrance animation. See css/motion.css. */
    transition: background 0.2s ease, translate 0.18s ease;
}

.login-btn:hover {
    background: #444;
    translate: 0 -2px;
}

/* The name beside the avatar, which appears only inside the hamburger panel.
   Measured at 1280: the logo (147), the six links (710) and the language toggle (35) already
   claim the pill's whole 1079px of content width, so ANY name overflows it — a member with a
   38-character one pushed 96px past the edge. Capping it would have been tuning to one example;
   the name lives in the dropdown instead, where its length cannot matter. */
.nav-user {
    display: none;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 1px;
    color: #1a1a1a;
}

/* Who you are, at the top of the dropdown. This is the one place the full name is shown in the
   navigation, so it wraps rather than truncating.

   A row, not a column: inside the hamburger panel it also carries the avatar, because the toggle
   that normally shows it is not rendered there. In the pill the face is hidden and the row
   collapses to the text column alone, which is what this looked like before. */
.nav-user-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 12px 10px 12px;
}

.nav-user-head-face {
    display: none;
    flex: none;
}

.nav-user-head-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.nav-user-head-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.nav-user-head-role {
    font-family: 'Inter', sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #b30000;
}

/* ---- signed-in menu: name/avatar opens a dropdown instead of sitting beside a bare logout
   button. Toggled in wwwroot/js/site.js on the same delegated-click pattern as the hamburger —
   this navbar is static SSR, so there is no circuit for an @onclick to run on. ---- */
.nav-user-wrap {
    position: relative;
}

.nav-user-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    padding: 4px 6px 4px 4px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nav-user-toggle:hover {
    background: #f5f5f5;
}

.nav-user-chevron {
    width: 13px;
    height: 13px;
    color: #999;
    transition: transform 0.2s ease;
}

.nav-user-toggle[aria-expanded="true"] .nav-user-chevron {
    transform: rotate(180deg);
}

.nav-user-menu {
    display: none;
    flex-direction: column;
    gap: 2px;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 190px;
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    box-sizing: border-box;
    z-index: 10;
}

.nav-user-menu.active {
    display: flex;
}

.nav-user-menu-divider {
    height: 1px;
    margin: 4px 6px;
    background: #eee;
}

/* The demo items and the logout form's submit button all resolve to this one shape, so the
   dropdown reads as a single consistent list regardless of which is a <button> and which is a
   form. */
.nav-user-menu-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    background: transparent;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.15s ease;
}

.nav-user-menu-item:hover {
    background: #f5f5f5;
}

/* Logout is the one destructive item in the list, so it keeps the club red rather than the
   neutral ink colour the demo items use. */
.logout-btn {
    color: #b30000;
}

.logout-btn:hover {
    background: #fdeaea;
}

.nav-user-menu .nav-auth-form {
    width: 100%;
}

/* Hamburger Icon (Hidden on Desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #1a1a1a;
    border-radius: 2px;
    transition: 0.3s;
}

/* =========================================
   MASTER MOBILE NAVIGATION (1200px Trigger)
========================================= */
@media (max-width: 1200px) {
    .logo {
        order: 1;
    }
    .lang-switch {
        order: 2;
        margin-left: auto;
        margin-right: 25px; 
    }
    /* The padding/negative-margin pair is the whole point: three 25x3 bars with 5px between them
       is a 25x19 hit box for the only control that opens the menu on a phone. Padding grows it to
       49x43 and the equal negative margin takes the growth back out of the layout, so the pill is
       pixel-for-pixel what it was. */
    .hamburger {
        order: 3;
        display: flex;
        position: relative;
        padding: 12px;
        margin: -12px;
    }

    /* Below this width the bell lives inside the collapsed panel, where nobody would see a badge
       until they opened it — so the hamburger carries a dot instead. Driven straight off the
       bell's own state with :has(), rather than the count being fetched a second time to put a
       class on <nav>. NotificationBell is a scoped component, but its plain class names are
       still on the element, so a global rule reaches it.

       Offsets are measured from the padded box, so they move with the padding above — the dot
       belongs against the bars, not against the invisible hit area around them. */
    nav:has(.notif-wrap.has-unread) .hamburger::after {
        content: "";
        position: absolute;
        top: 9px;
        right: 7px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #b30000;
    }
    /* The wrapper stops being transparent and becomes the dropdown panel itself, so the links
       and the auth control open together. Previously .nav-actions was simply display:none here,
       which left no way to sign in on a phone at all.

       It is absolutely positioned inside a fixed nav, so it does not scroll with the page: six
       links, the bell and the avatar row on a short phone in landscape would put the bottom of
       the panel below the fold with no way to reach it. It scrolls itself instead. */
    #nav-menu {
        display: none;
        position: absolute;
        top: 110%;
        left: 0;
        width: 100%;
        background: #fff;
        border-radius: 20px;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        order: 4;
        max-height: calc(100vh - 120px);
        max-height: calc(100svh - 120px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    #nav-menu.active {
        display: flex;
    }
    .nav-links {
        flex-direction: column;
        padding: 0;
    }
    /* Padding, not the 15px margin this used to carry. Margin is space around the link, not part
       of it, so every entry in the phone menu had a hit box the height of one line of Bebas —
       about 18px against a 44px guideline. Same rhythm on screen, a row you can actually hit. */
    .nav-links a {
        display: block;
        margin: 0;
        padding: 14px 0;
        text-align: center;
        /* No underline in the panel. These are display:block here, so it would run the full
           width of the dropdown under a centred word — a rule, not an underline. The red text
           already marks the current page, and the panel closes on navigation anyway. */
        background-image: none;
    }
    /* The toggle is a 28px-tall control in the one place it matters most. */
    #lang-toggle {
        padding: 8px 14px;
        font-size: 1.3rem;
    }
    /* A column, so the bell and the member's own section stack instead of competing for one row. */
    .nav-actions {
        order: 0;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        border-left: none;
        border-top: 1px solid #eee;
        padding: 14px 0 4px 0;
        margin: 10px 20px 0 20px;
    }

    /* ---- the signed-in section, flattened ----
       Below here the panel IS the menu. A dropdown that opens on top of an already-open dropdown
       is one disclosure too many, and inside this panel it could not work anyway: #nav-menu sets
       overflow-y: auto, which makes it a scroll container — and a scroll container clips its
       absolutely positioned descendants. The dropdown opened past .nav-actions, the panel's last
       row, so it was cut off by the scroll box and read as appearing behind everything.

       NotificationBell already answers this the same way one breakpoint at a time: below 1200px
       its toggle is not rendered and the bell becomes a plain link. Here the toggle goes and the
       menu becomes part of the panel, in flow, where nothing can clip it and nothing has to be
       opened twice to be seen. */
    .nav-user-wrap {
        width: 100%;
    }

    /* Hidden rather than made inert: a <button> that does nothing is worse than no button, and
       display:none is what also takes it out of the tab order. Its avatar and name are not lost —
       .nav-user-head below shows both. */
    .nav-user-toggle {
        display: none;
    }

    /* Both selectors, because nothing adds .active to this down here and nothing should have to. */
    .nav-user-menu,
    .nav-user-menu.active {
        display: flex;
        position: static;
        width: 100%;
        min-width: 0;
        gap: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .nav-user-head {
        justify-content: center;
        padding: 6px 20px 12px 20px;
    }

    .nav-user-head-face {
        display: block;
    }

    /* The name is free-form and a member may choose a 38-character one, so it breaks inside a
       word rather than pushing the panel wider than the screen. */
    .nav-user-head-name {
        overflow-wrap: anywhere;
    }

    /* Full-bleed rows on the panel's own rhythm: same 14px vertical padding as .nav-links a
       above, so the whole panel reads as one list of places to go. */
    .nav-user-menu-item {
        padding: 14px 20px;
        border-radius: 0;
        text-align: center;
        font-size: 0.95rem;
    }

    .nav-user-menu-divider {
        margin: 4px 20px;
    }

    /* The pill's inline name. It belonged to the toggle, which is gone from here. */
    .nav-user {
        display: none;
    }
}

/* =========================================
   THE ACCOUNT PAGES

   Welcome, account, no-member, login-problem and the admin roster all wear one outfit, taken
   from Kiezeltocht: the red micro-label, the Bebas heading, and the white card with a red top
   edge. These live here rather than in five scoped stylesheets because five copies of one card
   is exactly what a shared stylesheet is for — and because scoped CSS scopes its rightmost
   selector, so a page's own sheet could not reach AvatarBadge inside the card anyway.
========================================= */
/* 1060px, in the same family as the rest of the site — Kiezeltocht is 1100, the rides board 980,
   the kit page 1100. These pages were 640, which on a 1440 screen left 400px dead on either side
   and squeezed the prose to about 54 characters a line. Comfortable measure is 60-75, and the
   pages read as a different, smaller site than the seven around them. */
.auth-page {
    max-width: 1060px;
    margin: 0 auto;
    padding: 160px 5vw 120px 5vw;
}

/* Pages whose whole content is one sentence and one button. Widening those would only produce a
   small card adrift in a large empty space, so they stay deliberately narrow — but wider than
   they were. */
.auth-page.is-focused {
    max-width: 720px;
}

.auth-head {
    text-align: center;
    margin-bottom: 36px;
}

/* The intro keeps a reading measure of its own even though the shell around it is wide. */
.auth-head .auth-sub {
    max-width: 50ch;
}

/* ---- the two-column body ----
   Widening the shell without splitting the content would just trade 54-character lines for
   110-character ones, which is worse. The form keeps a comfortable column and the space buys a
   second one: on /welcome a live preview of the choice being made, on /account the facts about
   the account that are not editable. */
.auth-split {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(360px, 1fr);
    gap: 26px;
    align-items: start;
}

/* A grid item's default min-width is auto, which means "no narrower than my content" — so a long
   name in the preview could hold the left column open. The 900px rule below makes this academic
   today, but it is the sort of floor that bites the moment somebody narrows that query. */
.auth-split > * {
    min-width: 0;
}

.auth-aside {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* The aside stacks its own panels, so the generic card spacing would double up. */
.auth-aside > .auth-card,
.auth-aside > .auth-disclosure {
    margin-top: 0;
}

/* ---- the avatar preview ----
   Answers "what am I actually choosing" without a circuit: the radios drive it through :has(),
   the same mechanism the swatches already use. All three states are rendered and two are hidden,
   which is what makes it work with no JavaScript at all. */
.auth-preview {
    text-align: center;
    padding: 28px 24px;
}

.auth-preview-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111;
    margin: 16px 0 0 0;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

/* Nothing but spacing now: it holds a .member-role pill, which brings its own type and ground.
   One badge recipe for the roster, the account page and the welcome preview — the rank is the
   same fact wherever it is shown, so it should not be three near-identical sets of rules. */
.auth-preview-role {
    margin: 10px 0 0 0;
}

.auth-preview-badge {
    display: inline-flex;
}

/* `hidden` is styled by the BROWSER and any author rule naming `display` beats it, whatever the
   specificity -- so .auth-preview-badge's `display: inline-flex` above would have shown the
   upload mirror before there was anything in it. Same trap as .auth-crop-row, same companion. */
.auth-preview-badge[hidden] { display: none; }

/* Hide whichever of the four the visitor has not chosen. */
.auth-split:has(#avatar-strava:checked) .pv-initials,
.auth-split:has(#avatar-strava:checked) .pv-current,
.auth-split:has(#avatar-strava:checked) .pv-upload,
.auth-split:has(#avatar-initials:checked) .pv-strava,
.auth-split:has(#avatar-initials:checked) .pv-current,
.auth-split:has(#avatar-initials:checked) .pv-upload,
.auth-split:has(#avatar-keep:checked) .pv-strava,
.auth-split:has(#avatar-keep:checked) .pv-initials,
.auth-split:has(#avatar-keep:checked) .pv-upload,
.auth-split:has(#avatar-upload:checked) .pv-strava,
.auth-split:has(#avatar-upload:checked) .pv-initials,
.auth-split:has(#avatar-upload:checked) .pv-current {
    display: none;
}

/* The same picture as the crop stage, at the size the badge will really be. Not a second canvas:
   one <img> per view sharing one object URL, with the stage's transform scaled by the ratio of
   the two boxes, so it costs nothing per drag frame beyond two style writes. */
.crop-mirror {
    position: relative;
    display: block;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    overflow: hidden;
    background: #f2f2f2;
}

.crop-mirror img {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    max-width: none;
}

/* The chosen swatch, so the initials preview is the colour it will really be. Eight rules for
   eight swatches — verbose, but it is what makes the colour choice mean anything before saving.

   It targets the badge itself, not its wrapper, and the preview's badge is deliberately rendered
   with no Color so AvatarBadge emits no inline background — an inline style would beat every one
   of these and the preview would sit on one colour forever. */
.auth-split:has(#swatch0:checked) .pv-initials .avatar-initials { background: #1a3b31; }
.auth-split:has(#swatch1:checked) .pv-initials .avatar-initials { background: #1f6f54; }
.auth-split:has(#swatch2:checked) .pv-initials .avatar-initials { background: #b4531f; }
.auth-split:has(#swatch3:checked) .pv-initials .avatar-initials { background: #345b8c; }
.auth-split:has(#swatch4:checked) .pv-initials .avatar-initials { background: #7a3d8c; }
.auth-split:has(#swatch5:checked) .pv-initials .avatar-initials { background: #2f6f8c; }
.auth-split:has(#swatch6:checked) .pv-initials .avatar-initials { background: #8c3d5a; }
.auth-split:has(#swatch7:checked) .pv-initials .avatar-initials { background: #4a6b1f; }

/* ---- the one irreversible action ----
   Side by side rather than stacked, so the explanation and the button read as one statement, and
   full width below the form so it is never mistaken for part of the ordinary edits. */
.auth-danger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 26px;
    border-top-color: #999;
}

.auth-danger-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
    color: #111;
}

.auth-danger-body {
    margin: 0;
    color: #555;
    line-height: 1.7;
    max-width: 54ch;
}

.auth-danger form {
    flex: none;
}

@media (max-width: 768px) {
    .auth-danger {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ---- a set of facts, as panels ----
   Kiezeltocht's .included-item idiom, which is already this site's language for "several related
   points". Used by the privacy policy, whose six sections were a single 2540px-tall strip. */
.auth-panels {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.auth-aside .auth-panel {
    padding: 22px 24px;
}

.auth-panel {
    background: #fafafa;
    border-left: 5px solid #b30000;
    border-radius: 6px;
    padding: 26px 28px;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

/* /privacy is seven of these in a grid, which is the case this exists for: a container that
   warms slightly under the cursor tells you the page is a set of separate answers rather than
   one wall. It does not move — see .contact-card for why nothing uninteractive does. */
.auth-panel:hover {
    background: #fff;
    box-shadow: 0 8px 26px rgba(0,0,0,0.07);
}

.auth-panel h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: #111;
    margin: 0 0 12px 0;
    letter-spacing: 1px;
}

.auth-panel p,
.auth-panel ul {
    font-size: 0.98rem;
    line-height: 1.75;
    color: #555;
    margin: 0;
}

.auth-panel ul {
    padding-left: 20px;
}

.auth-panel li + li {
    margin-top: 8px;
}

.auth-panel a {
    color: #b30000;
    font-weight: 600;
}

/* Kiezeltocht's signature micro-label, at the size the rest of the site uses it. */
.auth-kicker {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #b30000;
    margin: 0 0 14px 0;
}

.auth-head h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.9rem, 8.5vw, 4.2rem);
    margin: 0;
    letter-spacing: 2px;
    line-height: 0.9;
    color: #111;
    overflow-wrap: break-word;
}

.auth-sub {
    font-size: 1.15rem;
    color: #555;
    line-height: 1.7;
    margin: 18px auto 0 auto;
    max-width: 52ch;
}

.auth-card {
    background: #fff;
    border-top: 6px solid #b30000;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.09);
    padding: 34px 36px;
}

.auth-card + .auth-card {
    margin-top: 22px;
}

/* ---- form controls ---- */
.auth-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 22px;
}

.auth-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: #b30000;
    margin-bottom: 8px;
}

.auth-input {
    padding: 13px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: #f9f9f9;
    color: #222;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.auth-error {
    margin-top: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #b30000;
}

.auth-hint {
    margin-top: 7px;
    font-size: 0.82rem;
    color: #888;
}

/* ---- the avatar picker ----
   Radio inputs, not buttons, so the whole form works with JavaScript off — which matters here
   because this page is static SSR with no circuit behind it. The input itself is clipped rather
   than display:none so it keeps its place in the accessibility tree and stays keyboard-reachable;
   the label beside it is what is actually drawn. */
.auth-choices {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
}

/* Natural widths, wrapping if they must — stretching them to share the row made a lone chip on
   a second line into a full-width bar, which looked worse than the wrap it was fixing. Three of
   them wanted 445px of a 431px row; the labels were shortened instead, in both languages, which
   is the fix that holds whatever the column width turns out to be. */
.auth-choice label {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 50px;
    color: #555;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.auth-choice label:hover {
    border-color: #999;
    color: #111;
}

.auth-choice input:checked + label {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

.auth-choice input:focus-visible + label {
    outline: 2px solid #b30000;
    outline-offset: 2px;
}

/* The swatches only mean anything when initials are the choice, so they appear with it. :has()
   keeps that a pure-CSS relationship — no circuit, no script, no round trip to the server. */
/* Eight 32px swatches plus their gaps want 319px, which is more than a phone's card has, so they
   already wrap to two rows. The gap is what stops that being a mis-tap: enlarging the targets
   would only push a third row. */
.auth-swatches {
    display: none;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.auth-avatar:has(.auth-initials-radio:checked) .auth-swatches {
    display: flex;
}

.auth-swatch input {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
}

.auth-swatch label {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.auth-swatch label:hover {
    transform: scale(1.08);
}

.auth-swatch input:checked + label {
    box-shadow: 0 0 0 2px #111;
}

.auth-swatch input:focus-visible + label {
    box-shadow: 0 0 0 2px #b30000;
}

.auth-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 26px;
}

/* ---- actions ---- */
.auth-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* The one-choice pages — /login, /denied, /not-found, /Error — centre their card rather than
   ranging it left. Modifiers rather than the inline style="text-align: center" they each grew,
   so the 768px rule that makes these buttons full width still has something to line up. */
.auth-card.is-centered {
    text-align: center;
}

.auth-actions.is-centered {
    justify-content: center;
    margin-top: 0;
}

.btn-solid {
    background: #b30000;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 16px 34px;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.btn-solid:hover {
    background: #8f0000;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    border-radius: 4px;
    padding: 14px 32px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, translate 0.18s ease;
}

.btn-outline:hover {
    background: #1a1a1a;
    color: #fff;
    translate: 0 -2px;
}

.btn-plain {
    background: transparent;
    border: none;
    color: #666;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    padding: 12px 4px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.18s ease;
}

.btn-plain:hover {
    color: #b30000;
}

/* ---- notes and disclosures ---- */
/* Capped, because the shell is now 1060px and an uncapped note under the members table ran to
   115 characters a line — the opposite failure to the one that motivated widening these pages. */
.auth-note {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #666;
    margin: 24px 0 0 0;
    max-width: 58ch;
}

/* A capped block still has to be centred by its margins, not only by its text-align. */
.auth-note.is-centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.auth-note a,
.auth-sub a {
    color: #b30000;
    font-weight: 600;
}

.auth-note a:hover,
.auth-sub a:hover {
    color: #7a0000;
}

.auth-disclosure {
    background: #fafafa;
    border-left: 5px solid #b30000;
    border-radius: 6px;
    padding: 22px 24px;
    margin-top: 26px;
}

/* An h3 because it is a third-level heading inside a card, which it always was. It also used to
   be the only way to escape the `h1/h2 { font-size: … !important }` block at the foot of this
   file; that block is gone, so the choice is now free rather than forced. */
.auth-disclosure h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: #111;
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.auth-disclosure ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.93rem;
    line-height: 1.75;
    color: #555;
}

/* Full width, immediately above the button that stores things. A grid rather than CSS columns so
   the markers stay aligned and an item cannot be split across the gap mid-sentence. */
.auth-disclosure.is-wide {
    margin-top: 22px;
}

.auth-disclosure.is-wide ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 38px;
}

@media (max-width: 900px) {
    .auth-disclosure.is-wide ul {
        grid-template-columns: 1fr;
    }
}

.auth-status {
    background: #f2f8f2;
    border-left: 5px solid #1f8a4c;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    color: #1f5c36;
}

/* The same strip in the other direction. Was an inline style on the account page, which meant
   the second page needing it would have copied five declarations rather than a class name. */
.auth-status.is-problem {
    background: #fdeaea;
    border-left-color: #b30000;
    color: #7a0000;
}

/* ---- the admin roster ---- */
.member-table {
    width: 100%;
    border-collapse: collapse;
}

.member-table th {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: #b30000;
    text-align: left;
    padding: 0 14px 14px 0;
    border-bottom: 1px solid #eee;
}

.member-table td {
    padding: 16px 14px 16px 0;
    border-bottom: 1px solid #f2f2f2;
    font-size: 0.98rem;
    color: #333;
    vertical-align: middle;
}

/* Seventeen rows of four columns, where the row you are reading and the row you are about to
   change somebody's rank in have to be the same one. A tint is the cheapest way to say which. */
.member-table tbody tr {
    transition: background 0.15s ease;
}

.member-table tbody tr:hover {
    background: #fafafa;
}

.member-name {
    display: flex;
    align-items: center;
    gap: 13px;
    font-weight: 600;
    color: #111;
}

.member-role {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    padding: 5px 11px;
    border-radius: 50px;
    /* THE CLUB'S OWN GREEN, and the default pill is the one that should carry it: Lid is the
       rank most of the club holds and the one the whole ladder exists to arrive at. It was grey
       on grey, which read as "unclassified" rather than as belonging. */
    background: #e7efec;
    color: #0b3631;
}

/* The default pill above is the Lid: grey ground, no modifier class. The ranks either side of it
   each get their own.

   The Gastrijder is the only one drawn as an outline rather than a filled pill. They ride with
   the club and appear in the klassement like anybody else, so the difference should read as "not
   yet one of us" rather than as a lesser version of the same thing — and it has to survive being
   the one rank that carries no discount, which is a real difference worth seeing at a glance. */
.member-role.is-guest {
    background: transparent;
    color: #8a8a8a;
    box-shadow: inset 0 0 0 1px #d6d6d6;
}

/* Tan for the organisator — the colour of the animal the club is named after, and not a second
   red on a page that already spends red on its headings. */
.member-role.is-organiser {
    background: #f7efe2;
    color: #8a6a2f;
}

/* The club's bordeaux rather than the headline red. #b30000 is the colour of every h2 on the
   site; spending it on a rank pill as well made the beheerder read as a heading fragment, and it
   is the one place a second club colour was already waiting to be used. */
.member-role.is-admin {
    background: #f6e9ec;
    color: #8f3446;
}

/* The one rank that is not a chamois. Glacier blue rather than a fourth warm tone, because it is
   not a step further up the club's ladder — it maintains the software the club happens to be on,
   and looking unlike the other three is the point. */
.member-role.is-yeti {
    background: #e8f1f7;
    color: #2b5f80;
}

/* ==========================================================================
   RANK COLOURS — GLOBAL, and they have to be
   --------------------------------------------------------------------------
   The solid colour each rank's pill was tinted from, for a card that carries a
   coloured edge. Two components draw one — the klassement's roster cards and
   the Clubwerking role list — and scoped CSS scopes the RIGHTMOST selector to
   the component that emitted the markup, so a scoped copy would colour one of
   the two and silently leave the other grey. The same trap AvatarBadge and the
   ride tag pills both document, met for the third time.

   RoleDisplay.StripeClass is what puts these on. They set border-left-color
   only: the border itself belongs to whatever card is wearing it, because a
   klassement row and a role card do not want the same weight.

   The ladder reads warm-to-cool on purpose, and two of the five are the club's
   own colours: Lid is the green, Beheerder the bordeaux. The Yeti stays
   glacier blue because it is not a step further up the club's ladder at all.
   ========================================================================== */

.rank-guest { border-left-color: #b4b4b4; }
.rank-member { border-left-color: #0b3631; }
.rank-organiser { border-left-color: #8a6a2f; }
.rank-admin { border-left-color: #8f3446; }
.rank-yeti { border-left-color: #2b5f80; }

/* ---- changing somebody's rank ------------------------------------------------
   A pill that happens to be a <select>, so an editable row and a locked one sit on the same
   baseline and the table does not visibly split into two kinds of row. Static SSR: this posts
   and reloads, which is why it is a real form and not a click handler. */
.member-role-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.member-role-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    cursor: pointer;
    /* Room on the right for the chevron drawn as a background image below. */
    padding-right: 27px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    background-size: 9px;
    transition: border-color 0.15s ease;
}

.member-role-select:hover {
    border-color: #ccc;
}

.member-role-select:focus-visible {
    outline: 2px solid #b30000;
    outline-offset: 2px;
}

/* The rank the dropdown is *currently showing*, not the one the server rendered. Without this
   the pill would keep the old colour until the save reloaded the page, so picking Kuddeleider
   would sit there in the grey of a Gems. */
.member-role-select:has(option[value="Guest"]:checked) {
    background: transparent;
    color: #8a8a8a;
    box-shadow: inset 0 0 0 1px #d6d6d6;
}

.member-role-select:has(option[value="Organiser"]:checked) {
    background-color: #f7efe2;
    color: #8a6a2f;
}

/* Kept in step with .member-role.is-admin by hand: a <select> cannot wear a class that depends
   on which option is chosen, which is what :has is standing in for here. */
.member-role-select:has(option[value="Admin"]:checked) {
    background-color: #f6e9ec;
    color: #8f3446;
}

/* Only a Yeti ever sees this option in the dropdown — RoleDisplay.Assignable stops at the
   viewer's own rank, and RoleEditor refuses a posted value above it regardless. */
.member-role-select:has(option[value="Yeti"]:checked) {
    background-color: #e8f1f7;
    color: #2b5f80;
}

/* Hidden until there is something to save. A tick button on all twenty rows is exactly the
   clutter this page does not need, and a row that offers to save what it already shows is a
   question nobody asked.

   Two selectors, and the first is not decoration. :has() compares the live selection against the
   attribute Blazor rendered, which *is* "the visitor changed it" — but :focus-within is
   universally supported, so anyone who has reached the control by keyboard or click can still
   see the button even where :has() cannot run. */
.member-role-save {
    display: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    padding: 6px 12px;
    border: none;
    border-radius: 50px;
    background: #b30000;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}

.member-role-save:hover {
    background: #8f0000;
}

.member-role-form:focus-within .member-role-save,
.member-role-form:has(option:checked:not([selected])) .member-role-save {
    display: inline-flex;
}

.member-date {
    color: #888;
    white-space: nowrap;
}

/* The table would force a horizontal scrollbar on the whole page otherwise. It is the right
   answer on a tablet or a narrow window; on a phone see the block-table rules below. */
.member-scroll {
    overflow-x: auto;
}

/* Below here the roster stops being a table and becomes one card per member.
   Four columns want roughly 440px — a 36px avatar and a name, a rank pill or its dropdown plus a
   save button, and two nowrap dates — against the ~293px a phone's .auth-card actually has. The
   result was a horizontal scroller nested inside 22px of card padding, with no scrollbar drawn
   and nothing to say the last two columns existed at all.

   Every value survives; each one just carries its heading with it, out of the data-label
   attribute Members.razor writes from the same resource keys the <th>s use. */
@media (max-width: 560px) {
    .member-scroll {
        overflow-x: visible;
    }

    .member-table,
    .member-table tbody,
    .member-table tr,
    .member-table td {
        display: block;
        width: 100%;
    }

    /* Clipped, never display:none. The headings are still the accessible names for these cells,
       and display:none would drop them out of the accessibility tree entirely — the same reason
       the ride card clips its <dt>s. */
    .member-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .member-table tr {
        padding: 16px 0;
        border-bottom: 1px solid #eee;
    }

    .member-table tr:last-child {
        border-bottom: none;
    }

    .member-table td {
        padding: 5px 0;
        border: none;
    }

    .member-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        font-family: 'Inter', sans-serif;
        font-size: 0.66rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.6px;
        color: #b30000;
    }

    /* The name is the card's title; a "MEMBER" label above it would say nothing. */
    .member-table td:first-child::before {
        content: none;
    }

    .member-table td:first-child {
        padding-bottom: 10px;
    }

    /* Two dates side by side rather than stacked: they are short, and four stacked blocks per
       member turns seventeen of them into a very long page.

       `.member-table td.member-date`, not a bare `.member-date` — the block rule above it is
       `.member-table td`, which is (0,1,1), so the plain class loses and both dates stay full
       width. Measured, not assumed. */
    .member-table td.member-date {
        display: inline-block;
        width: 49%;
        vertical-align: top;
    }
}

/* One column below 900px. The aside carries the preview and the disclosure, which belong under
   the form rather than beside it once there is no room — and the preview stays useful there,
   because it is the answer to "what did I just pick". */
@media (max-width: 900px) {
    .auth-split {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .auth-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .auth-page {
        padding-top: 130px;
    }

    /* Do not reduce this further. Strava's Connect button is a 237px asset their guidelines
       forbid altering, and 22px a side is what leaves it room inside the card at 375px. */
    .auth-card {
        padding: 26px 22px;
    }

    .auth-panel {
        padding: 22px 20px;
    }

    .auth-actions .btn-solid,
    .auth-actions .btn-outline {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .auth-page {
        padding-left: 24px;
        padding-right: 24px;
        padding-bottom: 70px;
    }

    /* Tap targets. Both are radio labels standing in for the radio itself, so the label is the
       control and its padding is the only hit area there is. */
    .auth-swatch label {
        width: 38px;
        height: 38px;
    }

    .auth-choice label {
        padding: 13px 16px;
    }
}

/* .auth-actions .btn-* goes full width at this size, but this button is not in an .auth-actions
   row — it sits in the danger card's own flex, which stacks here and left it at its natural
   width beside a full-width sibling on the card above. */
@media (max-width: 768px) {
    .auth-danger .btn-outline {
        width: 100%;
        text-align: center;
    }
}

/* =========================================
   THE HOME HERO

   These rules were inline on Home.razor until the mobile pass, alongside a dead #hero block that
   had not matched anything since the Blazor port. Inline is why the hero could not respond to a
   breakpoint at all — and why the h1/h2 !important overrides at the foot of this file existed.

   It stays in site.css rather than moving to Home.razor.css for one reason: the reservation rule
   below is `.hero:has(.next-ride)`, and .next-ride is emitted by a CHILD component. A scoped
   sheet rewrites its rightmost selector, so where the scope attribute lands inside :has() is not
   something to find out the hard way.
========================================= */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Two declarations, not one. 80vh on a phone measures the viewport with the URL bar hidden,
       so the hero is taller than the screen on load and shrinks as you scroll. svh is the bar-
       shown height, which is the stable one; browsers that do not know it keep the first. */
    min-height: 80vh;
    min-height: 80svh;
    padding: 100px 5vw 0 5vw;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    z-index: -2;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 700px;
    text-align: left;
    padding-bottom: 2vh;
}

/* 3.2rem is what the deleted `h1 { font-size: 3.2rem !important }` used to force at 375px, and
   6rem is what the inline style asked for — so this is the same two endpoints with the steps
   between them filled in. break-word rode in that deleted block too and has to come along. */
.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3.2rem, 8.5vw, 6rem);
    margin: 0;
    line-height: 0.92;
    letter-spacing: 2px;
    color: #fff;
    overflow-wrap: break-word;
}

/* A <p>, so the old h1/h2 sledgehammer never reached it: 2rem of uppercase Bebas at 0.15em of
   tracking, in a box that had no right padding. It was the worst line of type on any phone. */
.hero-tagline {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.15rem, 4.2vw, 2rem);
    margin: 15px 0 0 0;
    color: #fff;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1.25;
}

/* Below 1200px NextRideBadge stops sitting top-right and becomes a bar along the bottom of the
   hero, so the hero has to reserve room for it: the copy is vertically centred, and on a short
   viewport it otherwise runs underneath the badge. Because the hero is border-box, this padding
   comes out of the existing min-height rather than making the section taller.

   :has() so the space is only reserved when a badge is actually rendered — it renders nothing
   when there is no upcoming ride. */
@media (max-width: 1200px) {
    .hero:has(.next-ride) {
        padding-bottom: 200px;
    }
}

@media (max-width: 560px) {
    .hero {
        /* The pill clears at 90px; 118px was tuned for the badge sitting beside the copy, which
           it no longer does at this width. */
        padding-top: 108px;
    }

    /* The badge tightens its own padding and numeral below 560 and measures about 138px there,
       so the 200px above is 60px of reserved nothing taken straight out of the copy's room. */
    .hero:has(.next-ride) {
        padding-bottom: 160px;
    }
}

/* White Text Section */
.white-section {
    background: #ffffff;
    color: #1a1a1a;
    padding: 120px 5vw;
    text-align: center;
}

/* The shorter band Home used to ask for with an inline `padding: 100px 5vw`. A modifier here
   rather than a scoped rule on the page, because a scoped selector carries an extra attribute
   and would outrank the mobile step-downs at the bottom of this section. */
.section-tight {
    padding-top: 100px;
    padding-bottom: 100px;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Home's gallery band and its sponsors band each widened this inline; the join form narrowed it. */
.content-wrapper.is-wide { max-width: 1200px; }
.content-wrapper.is-mid { max-width: 1000px; }
.content-wrapper.is-form { max-width: 600px; }

.white-section h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 6.5vw, 5rem);
    margin-top: 0;
    margin-bottom: 30px;
    line-height: 1;
    letter-spacing: 1px;
    overflow-wrap: break-word;
}

.white-section p {
    font-size: 1.4rem;
    line-height: 1.7;
    font-weight: 300;
    color: #444;
}

/* Black Sponsors Section */
.black-section {
    background: #050505;
    color: #ffffff;
    padding: 120px 5vw;
    text-align: center;
}

.black-section h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 6.5vw, 4.5rem);
    margin-top: 0;
    margin-bottom: 60px;
    letter-spacing: 2px;
    overflow-wrap: break-word;
}

.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 50px; 
    max-width: 1000px; 
    margin: 0 auto;
    justify-items: center; 
    align-items: center;
}

.sponsor-box {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 15px; 
}

.sponsor-box img {
    width: 100%; 
    max-width: 180px; 
    height: auto;
    display: block;
    filter: brightness(0) invert(1); 
    opacity: 0.6; 
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sponsor-box:hover img {
    opacity: 1;
    transform: scale(1.05); 
}

@media (max-width: 768px) {
    .sponsor-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .sponsor-box img {
        max-width: 140px;
    }
}

/* Stay at two columns — a single column of six logos is a long scroll of nothing. The tile
   padding is what gives way instead, so each mark gets ~137px rather than ~123px. */
@media (max-width: 560px) {
    .sponsor-grid {
        gap: 22px 16px;
    }
    .sponsor-box {
        padding: 8px;
    }
    .sponsor-box img {
        max-width: 150px;
    }
}

.sponsor-box img.keep-color {
    filter: none;
}

.mountain-divider {
    width: 100%;
    height: 90px; 
    background: #ffffff; 
    line-height: 0;
    margin-bottom: -1px; 
}

.mountain-divider svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* The kit page's 2D flip cards were replaced by the WebGL garment viewer
   (js/merch3d.js); its styling is page-local in kit.html. */

/* The bands, on the way down. .black-section had no mobile rule at all until now — it kept its
   full 120px top and bottom on a 375px screen, which is a third of the viewport spent on nothing
   before the heading arrives. The h2 sizes that used to live here are gone: they were overruled
   by the !important block at the foot of this file and did nothing, and the clamp above does the
   job properly. */
@media (max-width: 768px) {
    .white-section,
    .black-section {
        padding: 80px 5vw;
    }
    .section-tight {
        padding-top: 70px;
        padding-bottom: 70px;
    }
    .white-section p {
        font-size: 1.1rem;
    }
    .black-section h2 {
        margin-bottom: 40px;
    }
}

/* 24px rather than 5vw: below here 5vw is under 28px and still shrinking with the screen, which
   is the wrong direction — the narrower the page, the more the copy needs an edge to sit off. */
@media (max-width: 560px) {
    .white-section,
    .black-section {
        padding: 64px 24px;
    }
    .section-tight {
        padding-top: 56px;
        padding-bottom: 56px;
    }
}

/* =========================================
   MEGA FOOTER STYLING
========================================= */
.site-footer {
    background-color: #050505;
    color: #fff;
    padding: 80px 5vw 40px 5vw;
    font-family: 'Inter', sans-serif;
    border-top: 1px solid #1a1a1a;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid #222; 
    padding-bottom: 60px;
    margin-bottom: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: center; 
    gap: 8vw; 
}

.footer-col h4 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    margin: 0 0 20px 0;
    letter-spacing: 1px;
}

.footer-col a {
    display: block;
    color: #888;
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-initiative, .footer-team {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #888;
    font-size: 0.95rem;
}

/* The privacy notice, moved out of the CONTACT column where it was the one entry that made that
   column four rows deep and read as a way of contacting the club. Smaller and quieter than its
   two neighbours on this row, because it is small print and not a destination. */
.footer-legal a {
    color: #666;
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: #aaa;
    text-decoration: underline;
}

.team-avatars {
    display: flex;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #050505; 
    margin-left: -12px; 
    background-size: cover;
    background-position: center;
}

.team-avatars .avatar:first-child {
    margin-left: 0; 
}

/* 1fr, not max-content. A max-content track cannot shrink below its longest link, so between
   here and the single-column rule below the grid could grow wider than the screen — and with
   `html { overflow-x: hidden }` in force that clips silently rather than offering a scrollbar. */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }
}

@media (max-width: 560px) {
    nav {
        padding: 10px 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        justify-content: center;
        gap: 40px;
    }
    /* Already display:block; padding rather than the 12px margin makes the whole row the target
       instead of just the ~15px of text on it. */
    .footer-col a {
        display: block;
        margin-bottom: 0;
        padding: 11px 0;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }
    .site-footer {
        padding: 60px 24px 30px 24px;
    }
    .footer-content {
        padding-bottom: 40px;
        margin-bottom: 30px;
    }
}

.mountain-img-divider {
    width: 100%;
    aspect-ratio: 3327 / 1216; 
    /* mountainfade.webp, not the .png beside it. The PNG is 3327x1216 and 3.0 MB, and this
       divider is on nearly every page — so it was 3 MB of silhouette before a visitor had read a
       word, every time. The WebP is 1600px wide and 78 KB. Precompression does not help here:
       Brotli saves a couple of percent on an already-compressed image, unlike the garment models
       it does so well on. The source PNG has an alpha channel but every pixel in it is opaque,
       which is why dropping alpha in the conversion changes nothing. */
    background:
        linear-gradient(to bottom, rgba(5, 5, 5, 0) 70%, #050505 98%),
        url('../images/mountainfade.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom center;
    margin-top: -100px; 
    margin-bottom: -2px; 
    position: relative;
    z-index: 5;
}

@media (max-width: 768px) {
    .mountain-img-divider {
        margin-top: -40px; 
    }
}

/* =========================================
   NEW PAGE STYLING (Sub-pages, Forms, Contact)
========================================= */

/* 1201px, not the 951px this carried for years. The nav collapses into the hamburger at 1200,
   and this block sits *after* that one in the file — so between 951 and 1200 both matched, equal
   specificity, and `margin-left: 20px` won. Every link in the collapsed panel was pushed 20px off
   its own centre. 951 was left behind when the collapse moved from 950 to 1200. */
@media (min-width: 1201px) {
    .nav-links a {
        margin-left: 20px;
        font-size: 1.15rem;
    }
}

.page-header {
    padding-top: 150px;
    padding-bottom: 80px;
}

/* The one heading recipe the sub-pages share. It replaces four inline `font-size: 5–6rem`
   declarations and the `h1 { … !important }` block that had to exist to shout them down; the
   per-page maximum is set alongside, so About stays 6rem and Member stays 5rem on a desktop.

   3.2rem is deliberately the size the deleted 480px override forced, so nothing moves on a phone
   except that it now arrives smoothly instead of in two jumps. */
.page-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3.2rem, 8.5vw, 6rem);
    margin: 0;
    letter-spacing: 2px;
    line-height: 0.92;
    overflow-wrap: break-word;
}

.page-title.is-5 { font-size: clamp(3.2rem, 8.5vw, 5rem); }
.page-title.is-55 { font-size: clamp(3.2rem, 8.5vw, 5.5rem); }

/* The lead paragraph under it, on both the dark and the light header bands. */
.page-lead {
    font-size: clamp(1.05rem, 3vw, 1.4rem);
    line-height: 1.75;
    max-width: 800px;
    margin: 20px auto 0 auto;
}

@media (max-width: 560px) {
    .page-header {
        padding-top: 120px;
        padding-bottom: 40px;
    }
}

.form-container {
    text-align: left;
}

.contact-card {
    background: #111;
    border: 1px solid #333;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* A container, not a control — so it warms rather than lifts. Moving a panel somebody cannot
   click reads as an invitation the panel does not honour, which is why nothing in this codebase
   translates unless it is a link, a button or a card that is one. */
.contact-card:hover {
    border-color: #4a4a4a;
    box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}

/* 40px a side is 80px of a 375px screen spent on card edge. */
@media (max-width: 560px) {
    .contact-card {
        padding: 30px 22px;
    }
}

.sleek-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: #1a1a1a;
    letter-spacing: 1px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: #f9f9f9;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.submit-btn {
    background: #1a1a1a;
    color: #ffffff;
    padding: 18px 20px; 
    height: auto; 
    line-height: normal; 
    width: 100%;
    box-sizing: border-box;
    display: block;
    border: none;
    border-radius: 5px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.2s ease, translate 0.18s ease;
    margin-top: 10px;
    margin-bottom: 40px;
}

.submit-btn:hover {
    background: #444;
    translate: 0 -2px;
}

.invert-logos-on-white .sponsor-box img {
    filter: brightness(0); 
    opacity: 0.8;
}

.invert-logos-on-white .sponsor-box:hover img {
    opacity: 1;
}

.subpage-footer {
    border-top: none; 
    padding-top: 20px; 
}

/* =========================================
   FLOATING INSTAGRAM GALLERY
========================================= */
/* min(280px, 100%), not a bare 280px. A minmax floor is a floor: on a viewport narrower than
   ~315px the track stays 280px wide inside a container that is not, and the cards run off the
   side. min() lets it give way at exactly the point it has to. */
.ig-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 30px;
    width: 100%;
}

/* auto-fit already resolves to one column at this width, but the 280px floor is a floor: it is
   wider than the content box of anything under a ~315px viewport, and the track would then be
   wider than its container. An explicit 1fr has no floor to trip over. */
@media (max-width: 560px) {
    .ig-gallery {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

.ig-card {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1; 
    border-radius: 8px; 
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ig-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ig-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ig-card:hover {
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.15); 
}

.ig-card:hover img {
    transform: scale(1.05); 
}

.ig-card:hover .ig-overlay {
    opacity: 1; 
}

/* =========================================
   GLOBAL FIXES & MOBILE OVERRIDES
========================================= */

/* 1. Strictly prevent the website from scrolling horizontally */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* 2. Include padding in width calculations globally so boxes don't overflow */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 3. Headings.
   There used to be two blocks here forcing `h1 { font-size: 4rem !important }` at 768px and
   3.2rem at 480px, with the comment "brutally override any inline font sizes on mobile screens".
   They were the only thing standing between a phone and the `font-size: 6rem` that Home, About,
   Sponsors and Member each wrote inline, because a media query cannot reach an inline style.

   The cost was paid by every other page. It overruled `.white-section h2 { 3.5rem }`, which sat
   dead in this file for months. It is why Privacy.razor writes <h3> where it means <h2>. And it
   beat Kiezeltocht's own correct clamp(2rem, 5vw, 3.4rem), forcing a 23-character hero date to
   51.2px at 375px — the one page that had solved this properly, undone by the workaround for the
   four that had not.

   Those four pages now use classes (.hero-title, .page-title, .section-tight and friends), so
   there is nothing left to shout down and each heading sizes itself with clamp(). If a new inline
   font-size ever appears on a heading, the answer is to give it a class, not to bring this back.

   overflow-wrap is kept as a floor for headings without one of those classes — the /Error page's
   own markup, say. It is not a size override, so it cannot overrule anybody's clamp. */
h1, h2, h3 {
    overflow-wrap: break-word;
}

/* 4. Touch screens, where :hover never fires.
   Three effects on this site were written as hover states over a dimmed resting state, which
   means a phone only ever saw the dimmed half. They were not subtle: the sponsor logos sat at
   60% and 80% opacity permanently, and the Instagram overlay — the only thing marking those
   three photos as links — never appeared at all. */
@media (hover: none) {
    .sponsor-box img,
    .invert-logos-on-white .sponsor-box img {
        opacity: 1;
    }

    /* Not the full-cover 40% scrim: as a permanent state it would just darken the photograph.
       A gradient into the bottom corner carries the glyph and leaves the picture alone. */
    .ig-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.5), rgba(0,0,0,0) 45%);
        align-items: flex-end;
        justify-content: flex-end;
        padding: 14px;
    }

    /* The lifts. Every other stylesheet in this codebase neutralises its own, and this block
       never did — .ig-card, the site's most pronounced hover at -10px, has been sticking on
       phones since it was written. A tapped element keeps :hover until something else is
       tapped, so without these the card simply stays raised, with its shadow, indefinitely.

       The four below are the ones added with css/motion.css. .ig-card is the old one. */
    .ig-card:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }

    .ig-card:hover img {
        transform: none;
    }

    .login-btn:hover,
    .submit-btn:hover,
    .btn-outline:hover {
        translate: none;
    }

    .nav-links a:hover {
        background-size: 0% 2px;
    }

    /* …except on the page you are actually on, where the underline is a permanent state rather
       than a hover, and losing it on touch would take the only marker with it. */
    .nav-links a.is-active:hover {
        background-size: 100% 2px;
    }

    /* The three that warm rather than lift. Each is restated at its resting value rather than
       reset with a keyword: `background: none` on .auth-panel would leave it transparent on a
       phone instead of #fafafa, which is not the same thing as "no hover effect". */
    .auth-panel:hover {
        background: #fafafa;
        box-shadow: none;
    }

    .contact-card:hover {
        border-color: #333;
        box-shadow: none;
    }

    .member-table tbody tr:hover {
        background: transparent;
    }
}

/* 5. Reduced motion.
   The site leans on transitions — every card lifts, every logo scales — plus smooth scrolling and
   an autoplaying hero. Honour the setting for all of it. The video is the one part CSS cannot
   reach, so wwwroot/js/site.js pauses that on the same query. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;

        /* The delays came with css/motion.css and are not optional there. This block collapses
           how long a thing takes to move but said nothing about how long it waits first, so a
           70ms-per-child stagger would still hold each element at opacity 0 in turn and then pop
           it — the reveal, reproduced as a stutter, for the one visitor who asked for none of it.
           The primary defence is that the "motion-on" gate is never set under this query at all,
           so none of those rules matches; this is what covers the seconds between somebody
           changing the system setting and the matchMedia listener in site.js noticing. */
        animation-delay: 0ms !important;
        transition-delay: 0ms !important;
    }
}
/* =========================================
   3D KIT VIEWER — global fallback rules
========================================= */
/* These cannot be scoped to Kit.razor: merch3d.js puts "merch3d-on" on <html>, which is
   outside every component, and Blazor's scoped CSS would attach its generated attribute to
   the <img> — silently missing any garment image emitted by a different component.
   While the WebGL viewer is live the poster is only a fallback, so hide it; the model fades
   itself in. A garment whose model failed to load re-shows its own poster. */
.merch3d-on [data-merch3d] img { opacity: 0; transition: opacity 0.4s ease; }
.merch3d-on [data-merch3d].merch3d-fallback img { opacity: 1; }

/* ---- the team shop, admin side -------------------------------------------------
   Static SSR pages, so these are plain forms and a plain table. Card recipe and literal colours
   like everything else in this file. */

/* The form's header band. It replaces a bare <h2> that sat on the first field with nothing
   between them, which is what made this card read as unfinished: eleven controls with no
   beginning. The band pulls itself out to the card's own edges with a negative margin, so it
   reads as part of the card rather than as a box inside one -- .auth-card's padding is 26px, and
   these four numbers have to track it. */
.shop-form-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin: -26px -26px 24px;
    padding: 18px 26px;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #ececec;
}

/* Adding and changing are different acts and the bar is where that is said. Green for a new
   item -- the club's own -- and bordeaux for an edit, which is the colour this site now uses
   wherever something already exists and is about to be altered. */
.shop-form-head.is-new {
    background: #f2f7f5;
    border-bottom-color: #d8e6e1;
}

.shop-form-head.is-edit {
    background: #faf0f2;
    border-bottom-color: #ecd8dd;
}

.shop-form-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: #111;
    margin: 0;
}

/* Which item is being edited, beside the title rather than under it: the answer to "am I about
   to overwrite the right thing". */
.shop-form-subject {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: #8f3446;
}

.shop-form-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }

.shop-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.shop-check input { width: auto; }

.shop-cancel { color: #8a8a8a; text-decoration: none; font-size: 0.9rem; }
.shop-cancel:hover { color: #b30000; }

.shop-empty { color: #8a8a8a; padding: 22px 0; }

/* ---- the catalogue, as a grid of cards ----

   Mirrors the member-facing .shop-grid, because the club's garments are told apart by looking at
   them and not by their names. See the comment on the markup in ShopAdmin.razor.

   auto-fill rather than auto-fit: with two items left in the catalogue, auto-fit would stretch
   them across the full width and make a photograph of a bidon a metre wide. auto-fill keeps the
   empty tracks, so a short catalogue looks like a short catalogue. */
.shopadmin-grid {
    list-style: none;
    margin: 26px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.shopadmin-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shopadmin-card:hover,
.shopadmin-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.13);
}

/* A hidden item is still listed -- it has to be, or there would be no way to bring it back --
   but it should not read as part of the live catalogue. */
.shopadmin-card.is-hidden { opacity: 0.55; }
.shopadmin-card.is-hidden:hover { opacity: 1; }

.shopadmin-shot {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: #f3f3f3;
    overflow: hidden;
}

.shopadmin-shot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* An item with neither a photo nor a model. Deliberately a flat panel and not an icon: there is
   nothing to illustrate, and a placeholder glyph would read as a broken image. */
.shopadmin-noshot {
    display: block;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(135deg, #f3f3f3 0 12px, #ededed 12px 24px);
}

.shopadmin-flags {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 6px;
    align-items: center;
}

/* The pill carries its own margin for the inline list it came from; inside a flex row that
   margin is just a gap nobody asked for. */
.shopadmin-flags .shop-hidden-tag { margin-left: 0; background: #fff; }

.shopadmin-body {
    flex-grow: 1;
    padding: 14px 16px 10px;
}

.shopadmin-name {
    margin: 0 0 4px;
    font-weight: 600;
    color: #111;
    overflow-wrap: anywhere;
}

.shopadmin-sizes {
    margin: 0 0 8px;
    color: #8a8a8a;
    font-size: 0.85rem;
}

.shopadmin-price {
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: #111;
}

.shopadmin-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px 14px;
    border-top: 1px solid #f0f0f0;
}

.shopadmin-edit {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #0b3631;
    text-decoration: none;
}

.shopadmin-edit:hover { text-decoration: underline; }

/* A phone never fires :hover, so the lift would stick after a tap and read as "still selected"
   on a card that is not selected. Same reset every card recipe on this site carries. */
@media (hover: none) {
    .shopadmin-card:hover { transform: none; }
}

.shop-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; }

.shop-list li {
    display: grid;
    grid-template-columns: 1.4fr 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-left: 6px solid #b30000;
}

/* A hidden item is still listed — it has to be, or there would be no way to bring it back —
   but it should not read as part of the live catalogue. */
.shop-list li.is-hidden { border-left-color: #c9c9c9; opacity: 0.62; }

.shop-list-name { font-weight: 600; color: #111; overflow-wrap: anywhere; }
.shop-list-sizes { color: #8a8a8a; font-size: 0.9rem; }
.shop-list-price { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; color: #111; }

.shop-hidden-tag {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: #8a8a8a;
    box-shadow: inset 0 0 0 1px #d6d6d6;
    border-radius: 50px;
    padding: 2px 8px;
    margin-left: 8px;
}

.shop-list-actions { display: flex; align-items: center; gap: 12px; }
.shop-list-actions a { color: #b30000; text-decoration: none; font-size: 0.9rem; }
.shop-list-actions a:hover { text-decoration: underline; }

/* Kept inline so a delete button sits on the same row as the edit link rather than starting a
   new block, which is what a bare <form> would do. */
.shop-inline-form { display: inline; margin: 0; }

.shop-delete {
    background: none;
    border: none;
    color: #b30000;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.shop-delete:hover { text-decoration: underline; }

/* ---- the orders overview ---- */

.orders-page { max-width: 1180px; margin: 0 auto; padding: 140px 5vw 110px; }

.orders-filters {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-end;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 18px 22px;
    margin-bottom: 18px;
}

.orders-filter { display: flex; flex-direction: column; gap: 5px; }

.orders-filter label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: #8a8a8a;
}

.orders-filter select,
.orders-filter input {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    min-width: 150px;
}

.orders-filter-actions { flex-direction: row; align-items: center; gap: 12px; }
.orders-clear { color: #8a8a8a; text-decoration: none; font-size: 0.9rem; }
.orders-clear:hover { color: #b30000; }

.orders-summary {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #b30000;
    margin: 0 0 14px;
}

/* The table is wide and the page is not, so it scrolls in its own box rather than pushing the
   whole layout sideways. Below 900px it stops being a table entirely — see the media query. */
.orders-scroll { overflow-x: auto; background: #fff; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08); }

.orders-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }

.orders-table th {
    text-align: left;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: #8a8a8a;
    padding: 14px 14px 10px;
    border-bottom: 2px solid #f0f0f0;
    white-space: nowrap;
}

.orders-table td { padding: 12px 14px; border-bottom: 1px solid #f4f4f4; vertical-align: middle; }
.orders-table tr:last-child td { border-bottom: none; }
.orders-table .is-num { text-align: right; }
.orders-table .is-total { font-weight: 700; color: #111; white-space: nowrap; }
.orders-table td a { color: #b30000; text-decoration: none; }
.orders-table td a:hover { text-decoration: underline; }

.orders-sort { color: inherit; text-decoration: none; }
.orders-sort:hover { color: #b30000; }
.orders-sort.is-active { color: #b30000; }

.orders-status {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    background: #f2f2f2;
    color: #555;
}

.orders-status.is-confirmed { background: #fdf0f0; color: #b30000; }
.orders-status.is-delivered { background: #eef7f1; color: #1f6b3a; }
.orders-status.is-cancelled { background: #f2f2f2; color: #9a9a9a; text-decoration: line-through; }

/* Below 900px the table becomes one card per line, labelled from data-label — the same answer
   the admin roster already gives, and for the same reason: nine columns want far more width
   than a phone has, and a sideways scroller inside a card has no affordance saying so. */
@media (max-width: 900px) {
    .orders-page { padding-top: 110px; }
    .orders-scroll { background: transparent; box-shadow: none; overflow-x: visible; }
    .orders-table, .orders-table tbody, .orders-table tr, .orders-table td { display: block; width: 100%; }
    .orders-table thead { display: none; }

    .orders-table tr {
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
        margin-bottom: 12px;
        padding: 6px 4px;
    }

    .orders-table td {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        border-bottom: 1px solid #f7f7f7;
        text-align: left;
    }

    .orders-table td::before {
        content: attr(data-label);
        font-size: 0.66rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.4px;
        color: #9a9a9a;
        flex: 0 0 auto;
    }

    .orders-table .is-num { text-align: right; }
    .orders-filter select, .orders-filter input { min-width: 0; width: 100%; }
    .orders-filter { flex: 1 1 140px; }
}

@media (max-width: 620px) {
    .shop-list li { grid-template-columns: 1fr auto; row-gap: 8px; }
    .shop-list-sizes { grid-column: 1 / -1; }
}


/* ==========================================================================
   The team shop
   --------------------------------------------------------------------------
   Follows the card recipe the rest of the site uses: white, 8px radius, the
   0 10px 40px rgba(0,0,0,0.08) shadow, a red accent edge and a -4px lift.
   Kiezeltocht is the reference for all of it.

   The stage rules are the load-bearing ones. merch3d.js reads a stage's
   padding ONCE at boot and caches it forever, and it subtracts padding from
   getBoundingClientRect() but never border-width. So:
     - .shop-stage padding is a fixed px value and is identical at every
       breakpoint. A clamp(), a vw, a % or a media-query override misaligns
       the garment after any resize.
     - .shop-stage carries no border. The accent edge goes on the wrapper.
   Both fail silently, which is why they are written down here as well as in
   the page.
   ========================================================================== */

/* The page itself is NOT width-limited; the prose inside it is.
   That is the difference between a grid that fills the screen and one that
   merely fills a column, and it avoids the usual full-bleed trick
   (margin-inline: calc(50% - 50vw)), which overshoots by the scrollbar's width
   and causes the sideways scroll this stylesheet forbids elsewhere.
   Everything that is text gets .shop-measure; the grid gets the viewport. */
.shop-page {
    max-width: none;
    margin: 0;
    padding: 0 0 80px;
}

/* The nav is a FIXED pill ending at about y=92, so anything at the top of the
   document slides under it. Every other page clears it with its own padding —
   .orders-page uses 110px — and the shop lost that when .shop-page's padding
   was dropped to let the grid run full width. The clearance belongs on the
   first block instead. */
.shop-head,
.shop-note,
.shop-placed,
.shop-standing,
.shop-controls,
.shop-empty {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 5vw;
    padding-right: 5vw;
    box-sizing: border-box;
}

/* These two already carry their own padding as part of the card recipe, so the
   measure is applied with margin only or the inner padding doubles. */
.shop-standing { padding: 22px 26px; max-width: 1000px; }
.shop-note,
.shop-placed { max-width: 1000px; }

/* The item page keeps a readable measure — one garment and a form do not want
   to be 1400px wide. */
/* 88px, and the crumb's own 30px makes 118 -- the same clearance .shop-head below uses, so the
   two shop pages start at the same height.

   IT WAS 0, AND THE COMMENT DIRECTLY BELOW IS ABOUT EXACTLY THIS. The nav is a fixed pill
   ending at about y=92, so with no top padding the crumb, the tags and the kicker all slid
   under it -- at every width, not only on a phone. On a desktop the only thing up there is a
   small grey "back" link, which is why it went unnoticed for so long; on a 360px screen the
   FIETSEN and HEREN tags disappear behind the logo. */
.shop-item-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 88px 5vw 80px;
}

/* The clearance lives in the SHORTHAND, not in a padding-top above, because a
   later `padding:` resets every side — which is exactly what hid both the nav
   clearance and the 5vw measure when they were written as separate rules. */
.shop-head {
    padding: 118px 5vw 10px;
}

.shop-kicker {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #b30000;
    margin: 0 0 6px;
}

.shop-head h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.6rem, 6vw, 4rem);
    line-height: 1;
    margin: 0 0 10px;
}

.shop-sub { color: #555; margin: 0; max-width: 60ch; }

/* ---- the line that says what this visitor is entitled to ---- */

.shop-note {
    margin: 22px 0 0;
    padding: 12px 16px;
    border-left: 3px solid #d8d8d8;
    background: #f7f7f7;
    border-radius: 0 6px 6px 0;
    color: #444;
    font-size: 0.95rem;
}

.shop-note.is-earned {
    border-left-color: #b30000;
    background: #fdf4f4;
    color: #1a1a1a;
}

.shop-placed {
    margin: 22px 0 0;
    padding: 14px 18px;
    border-radius: 6px;
    background: #eef7ee;
    border-left: 3px solid #2f7a2f;
    color: #1d4d1d;
}

.shop-empty { margin: 40px 0; color: #666; }
.shop-empty.is-problem { color: #b30000; }

/* ---- the grid ---- */

.shop-grid {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 26px;
}

.shop-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #b30000;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.12);
}

.shop-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.shop-card-shot {
    display: block;
    position: relative;
    background: #f4f4f4;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.shop-card-shot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.shop-card-noshot { display: block; width: 100%; height: 100%; }

.shop-card-3d {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(26, 26, 26, 0.85);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 4px 8px;
    border-radius: 4px;
}

.shop-card-body { display: block; padding: 16px 18px 20px; }

.shop-card-name {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.shop-card-sizes {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 10px;
}

.shop-card-price { display: block; }

/* The struck-through price is not decoration: a member has to be able to see
   what the discount took off, or the number means nothing to them. */
.shop-was {
    text-decoration: line-through;
    color: #999;
    margin-right: 8px;
    font-size: 0.92rem;
}

.shop-now {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    color: #b30000;
}

/* ---- one item ---- */

.shop-crumb { padding: 30px 0 0; margin: 0 0 6px; }
.shop-crumb a { color: #666; text-decoration: none; font-size: 0.9rem; }
.shop-crumb a:hover { color: #7a0000; }

.shop-detail {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 40px;
    align-items: start;
    padding-top: 10px;
}

.shop-detail-shot { min-width: 0; }

/* NO BORDER, and a fixed padding that never changes at any width. Read the
   block comment at the top of this section before touching either. */
.shop-stage {
    position: relative;
    background: #f4f4f4;
    border-radius: 8px;
    padding: 20px;
    aspect-ratio: 3 / 2;
}

.shop-stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.shop-stage.is-empty { background: #efefef; }

.shop-spin-hint {
    margin: 10px 0 0;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #b30000;
    text-align: center;
}

.shop-detail-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1.05;
    margin: 0 0 10px;
}

.shop-detail-price {
    margin: 0 0 8px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.shop-detail-price .shop-now { font-size: 2.2rem; }

.shop-off {
    background: #b30000;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
}

.shop-detail-why { color: #666; font-size: 0.9rem; margin: 0 0 18px; }
.shop-detail-copy { color: #444; margin: 0 0 24px; max-width: 52ch; }

/* ---- the order form ---- */

.shop-order {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #b30000;
    padding: 22px;
}

.shop-order-field { margin-bottom: 16px; }
.shop-order-field.is-narrow { max-width: 130px; }

.shop-order-go { width: 100%; }

.shop-order-terms {
    margin: 14px 0 0;
    font-size: 0.82rem;
    color: #777;
    line-height: 1.5;
}

/* ---- the 3D tag on the admin list ---- */

.shop-3d-tag {
    background: #1a1a1a;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 3px 6px;
    border-radius: 3px;
}

/* 900 rather than 768: the form and the stage each want ~420px, and below
   that the two-column layout squeezes the garment before the text. */
@media (max-width: 900px) {
    .shop-detail { grid-template-columns: 1fr; gap: 26px; }
    .shop-detail-shot { max-width: 520px; }
}

@media (hover: none) {
    /* A phone never fires :hover, so the lift would stick after a tap - the
       bug .ig-card carried for months. */
    .shop-card:hover { transform: none; }
}

/* The current photo on the shop admin form, beside the replace-it box. */
.shop-photo-now {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.shop-photo-now img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    background: #f4f4f4;
    border-radius: 6px;
}

/* ==========================================================================
   Shop: the standing panel, the filters, and the bigger artwork
   --------------------------------------------------------------------------
   Added when /kit and /shop became one page. The garment is the reason anybody
   opens this, so the cards give it a 4/3 box instead of 3/2 and the item page
   gives it the wider column.
   ========================================================================== */

/* ---- what this member is entitled to, said with the badge ---- */

/* `margin: 26px auto 0`, not `26px 0 0`. .shop-standing is centred 200 lines above this by
   `margin-left: auto; margin-right: auto` in the shared measure block, and a later SHORTHAND
   resets every side it does not name -- so this one declaration was quietly undoing it and the
   card sat hard against the left edge of the 1000px measure while the heading above it and the
   grid below it were both centred. The comment on .shop-head in that block warns about exactly
   this trap for `padding`; it runs the same way for `margin`. */
.shop-standing {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 26px;
    margin: 26px auto 0;
    padding: 22px 26px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-left: 6px solid #b30000;
}

/* Same sampled palette as the klassement cards — see Members.razor.css for
   where these come from and why they are not chosen by eye. */
.shop-standing.xp-t1 { border-left-color: #b8733a; }
.shop-standing.xp-t2 { border-left-color: #8e9aa8; }
.shop-standing.xp-t3 { border-left-color: #c8920f; }
.shop-standing.xp-t4 { border-left-color: #1b86b3; }
.shop-standing.xp-t5 { border-left-color: #5b2bb0; }
.shop-standing.xp-t6 { border-left-color: #e0a419; }

.shop-standing-badge {
    width: 130px;
    height: 130px;
    object-fit: contain;
    display: block;
}

.shop-standing-level {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 1px;
    margin: 0 0 2px;
}

.shop-standing-discount {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: #b30000;
    font-weight: 600;
}

.shop-standing-discount.is-none { color: #666; font-weight: 400; font-size: 0.95rem; }

/* <progress> needs all three of these: the element, the WebKit track and the
   WebKit value, or the bar is the browser's own and not the club's. */
.shop-standing-bar {
    width: 100%;
    max-width: 420px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: #ececec;
    appearance: none;
    display: block;
}

.shop-standing-bar::-webkit-progress-bar { background: #ececec; border-radius: 999px; }
.shop-standing-bar::-webkit-progress-value { background: #b30000; border-radius: 999px; }
.shop-standing-bar::-moz-progress-bar { background: #b30000; border-radius: 999px; }

/* NOT display: flex, and it was. A flex row makes the emblem and the sentence two items, so
   when the sentence wraps to two lines on a phone the emblem stays vertically centred against
   both of them and ends up floating on its own at the far left of a block it is supposed to
   begin. Left as normal flow it is an inline-block that sits at the head of the first line and
   wraps with the text, which is what it is: a mark in a sentence, not a column beside one. */
.shop-standing-next {
    margin: 8px 0 0;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
}

/* site.css is global, so no ::deep is needed or allowed here -- the rule reaches the emblem
   whoever emitted it. */
.shop-standing-next .cp-glyph { margin-right: 6px; }

.shop-standing-more {
    display: inline-block;
    margin-top: 10px;
    color: #b30000;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.shop-standing-more:hover { color: #7a0000; }

/* ---- one filter control and one sort control ----
   Both are <details>, which is why there is no JavaScript here: a browser opens
   and closes them on its own, and `name="shop-menu"` makes the pair mutually
   exclusive so opening one closes the other without a line of script.

   The panel is absolutely positioned, so opening a menu does not shove the grid
   down the page — which is the thing that made the old chip rows feel broken
   even when they worked. */

.shop-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 26px auto 14px;
    position: relative;
    z-index: 5;
}

.shop-menu { position: relative; }

.shop-menu > summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #1a1a1a;
    list-style: none;
    user-select: none;
    transition: border-color 0.2s, color 0.2s;
}

/* Safari draws its own triangle through ::-webkit-details-marker and ignores
   list-style, so both are needed to be rid of it. */
.shop-menu > summary::-webkit-details-marker { display: none; }

.shop-menu > summary::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.2s;
}

.shop-menu[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }

.shop-menu > summary:hover,
.shop-menu[open] > summary { border-color: #b30000; color: #b30000; }

.shop-menu-count {
    display: inline-grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #b30000;
    color: #fff;
    font-size: 0.68rem;
}

.shop-menu-current { color: #888; font-weight: 400; letter-spacing: 1px; }

.shop-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    min-width: 230px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.16);
    border: 1px solid #eee;
}

.shop-menu-group {
    margin: 8px 0 4px;
    padding: 0 10px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #b30000;
}

.shop-menu-group:first-child { margin-top: 2px; }

.shop-menu-item {
    display: block;
    padding: 8px 10px;
    border-radius: 5px;
    color: #333;
    text-decoration: none;
    font-size: 0.92rem;
    transition: background-color 0.15s, color 0.15s;
}

.shop-menu-item:hover { background: #f5f5f5; color: #b30000; }

.shop-menu-item.is-on {
    background: #fdf4f4;
    color: #b30000;
    font-weight: 600;
}

.shop-menu-item.is-on::after { content: " ✓"; }

.shop-menu-clear {
    display: block;
    margin-top: 8px;
    padding: 9px 10px;
    border-top: 1px solid #f0f0f0;
    color: #888;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.shop-menu-clear:hover { color: #b30000; }

.shop-count {
    margin: 0 0 0 auto;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    padding: 0;
}

/* ---- tags on a card ---- */

.shop-card-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.shop-tag {
    display: inline-block;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 3px 8px;
    border-radius: 3px;
    background: #f0f0f0;
    color: #666;
}

.shop-tag.is-fit { background: #fdf4f4; color: #b30000; }

/* ---- the grid, a catalogue of whole garments ----
   THIS REPLACES A FULL-BLEED "LOOKBOOK" AND THE REVERSAL IS DELIBERATE. That version ran four
   tiles edge to edge with hairline separators, after the supplier's own team store: big pictures
   across the whole screen rather than a narrow column of small ones. It is a good shape for a
   fashion label and it did not survive contact with this catalogue.

   What went wrong was the crop, not the idea. The tile was 4/5 and the picture `cover` at
   scale(1.12), so a jersey lost its sleeves and a bib was cut top and bottom -- every garment
   was shown as a detail of itself. The club has eleven products, not a season's collection; the
   question a visitor has is "what does the kit look like", and the answer was being trimmed off
   at the edges of its own tile.

   The admin catalogue at /admin/shop had been right all along: separated cards, the whole
   garment contained with air around it. This brings the public page to that, which is also just
   the site's own card recipe -- #fff, 8px radius, the 0 10px 40px shadow and a 4px lift -- so
   the shop stops being the one page with a bespoke one.

   `contain` is the load-bearing half. A poster is a rendered garment at a known shape, so
   cropping one was defensible; an uploaded photo is whatever somebody had, and the framesticker
   sheet at 1280x306 came out as about a fifth of itself. With contain everywhere that case
   needs no special rule, which is why `.shop-card-shot.is-photo` is gone again.

   The measure now matches the rest of the page: .shop-head, .shop-note and .shop-controls are
   all max-width 1100 with 5vw gutters, and the grid alone used to break out of it. A page whose
   heading and whose content start at different left edges reads as two pages. */

.shop-grid {
    max-width: 1100px;
    margin: 30px auto 0;
    padding-left: 5vw;
    padding-right: 5vw;
    box-sizing: border-box;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 26px;
    /* The hairline-separator trick came with the full-bleed grid: the gap showed a grey
       background through it. Cards that float need the gap to be empty. */
    background: none;
    border-top: 0;
    border-bottom: 0;
}

/* SQUARE, and the posters were re-cut to match -- that pairing is the point.

   The old posters were 1280x635 with the garment floating in the middle of all that: a bib was
   193 real pixels of product in a 1280-wide picture, 15% of the frame. THAT is what the
   `cover` + scale(1.12) was really for. It was not a lookbook flourish, it was compensating for
   posters that are mostly margin, and the compensation is what cropped the sleeves off.

   `contain` alone would have been honest and tiny -- the whole poster fits, so the garment
   lands at a third of the card. So each poster is now trimmed to its own content and recentred
   on a square at 90% height. The garment fills the card because the picture is the garment.

   Square rather than portrait because the four shapes disagree: a jersey is 0.85 wide-to-tall,
   a vest 0.57, a bib 0.37. A square is the one frame that suits all three without cropping any
   of them, and it keeps the cards a uniform height in the grid. */
.shop-card-shot {
    aspect-ratio: 1 / 1;
    background: #f4f4f4;
    padding: 10px;
    box-sizing: border-box;
}

.shop-card-shot img {
    object-fit: contain;
    object-position: center;
}

/* No zoom on hover. The card already lifts, and a picture that grows inside a `contain` box
   grows past the padding and clips the edges the padding is there to keep. */
.shop-card:hover .shop-card-shot img { transform: none; }

.shop-card-body {
    padding: 16px 18px 22px;
    border-top: 1px solid #f0f0f0;
}

.shop-card-name { font-size: 1rem; }

/* ---- one item: give the garment the wider column ----
   The stage keeps `contain` and its fixed padding. It is a [data-merch3d]
   element: merch3d.js reads that padding ONCE at boot and subtracts it from
   getBoundingClientRect() to place the model, so cropping or scaling here would
   misalign the garment against the box it is drawn over. The card above is a
   plain <img> and has no such constraint.

   INSIDE A min-width QUERY, AND IT HAS TO BE. Written as a bare rule it sat
   AFTER the `@media (max-width: 900px)` block that stacks this page into one
   column -- same specificity, later in the file, so it won at every width and
   the stacking rule never applied at all. A media query adds no specificity of
   its own; only source order separates the two.

   What that looked like: `.shop-detail-shot` carries `min-width: 0`, so with
   two columns still in force on a 360px screen the text column's min-content
   took 290px and the garment was left with EIGHT. The 3D viewer rendered into
   a 40x50 box that is mostly its own padding -- which reads as a broken model
   rather than as a layout that did not stack. 901 is the mirror of the 900
   above, so there is exactly one width where each applies. */

@media (min-width: 901px) {
    .shop-detail { grid-template-columns: 1.5fr 1fr; }
    .shop-stage { aspect-ratio: 4 / 5; }
}

/* ---- the item page's photo gallery ----
   Every photo is in the DOM and stacked; `is-on` picks the visible one. A carousel that swapped
   one <img>'s src would blank the frame on each step while the next file downloads, and would
   show nothing at all without JavaScript. Here the first is visible and the rest sit behind it.

   opacity rather than display, so the images stay in the accessibility tree and the stage never
   collapses to nothing between steps. */
.shop-gallery {
    position: relative;
    margin: 0;
}

.shop-gallery .shop-stage { position: relative; }

.shop-gallery .shop-shot {
    position: absolute;
    inset: 20px;                 /* the stage's own padding, which these are inside of */
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.shop-gallery .shop-shot.is-on { opacity: 1; }

/* The first photo is laid out NORMALLY and the rest absolutely over it, so the stage still has
   something to take its height from. With every shot absolute the box would collapse. */
.shop-gallery .shop-shot:first-child { position: relative; inset: auto; }

.shop-gallery-arrow {
    position: absolute;
    top: 50%;
    translate: 0 -50%;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    color: #111;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.shop-gallery-arrow.is-prev { left: 10px; }
.shop-gallery-arrow.is-next { right: 10px; }
.shop-gallery-arrow:hover { background: #fff; }

.shop-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.shop-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #d4d4d4;
    cursor: pointer;
    transition: background 0.2s ease;
}

.shop-dot.is-on { background: #b30000; }

/* ---- the admin photo list ---- */
.shop-photo-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shop-photo-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
}

.shop-photo-row img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    flex: 0 0 auto;
}

/* The rank reads "Hoofdfoto" for the first and #2, #3 ... after it, so what the arrows are
   doing is legible without having to look at the shop to find out. */
.shop-photo-rank {
    flex: 1 1 auto;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #b30000;
}

.shop-photo-moves { display: flex; gap: 4px; }

.shop-photo-move {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    line-height: 1;
}

.shop-photo-move:hover { background: #f0f0f0; }
.shop-photo-move[disabled] { opacity: 0.3; cursor: default; }

.shop-photo-drop { flex: 0 0 auto; font-size: 0.78rem; }

@media (max-width: 560px) {
    .shop-photo-row { flex-wrap: wrap; }
    .shop-photo-rank { flex: 1 1 100%; order: -1; }
}

/* An organiser previewing something not yet published. Amber rather than the red of a
   problem: nothing is wrong, it simply is not live. */
.shop-note.is-preview {
    background: #fff8e8;
    border-left: 3px solid #e0a419;
    padding: 10px 14px;
    color: #6b4c00;
}

/* ---- availability ----
   A small line under the name on a card, and a sentence on the item page. Only three states are
   ever drawn: in stock, sold out, and a batch with a date. A made-to-order item with no date
   gets nothing on the card -- see the comment in Shop.razor for why a label under every jersey
   is worse than no label at all. */
.shop-avail {
    display: block;
    margin-top: 2px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #777;
}

.shop-avail.is-in  { color: #1f7a52; }
.shop-avail.is-out { color: #b30000; }

.shop-supply {
    margin: 14px 0 0;
    font-size: 0.9rem;
    color: #555;
}

.shop-supply.is-in  { color: #1f7a52; font-weight: 600; }
.shop-supply.is-out { color: #b30000; font-weight: 600; }

/* The club's own delivery sentence, under the date rather than beside it: it is an estimate in
   somebody's words and should not look like part of the fact above it. */
.shop-supply-note {
    display: block;
    margin-top: 2px;
    font-size: 0.82rem;
    color: #888;
}

/* ---- the admin form's two supply halves ----
   Hidden by CLASS, not by the attribute alone. `[data-supply]` stays visible until site.js adds
   `is-off`, so with no JavaScript both halves are shown and both are fillable -- and the editor
   clears whichever the mode does not mean, so a form filled that way still saves correctly.
   A rule keyed on the attribute would hide the wrong half for anybody without the script. */
.settings-field[data-supply].is-off { display: none; }

/* ---- admin form: two fields on a row ---- */

.shop-form-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.shop-form-split > span { display: block; }

/* ---- orders: the leg length cell ---- */

.orders-leg { font-weight: 600; }

.orders-leg-cm {
    display: block;
    font-size: 0.72rem;
    color: #999;
}

/* No per-breakpoint column counts any more, and removing them is part of the redesign rather
   than tidying. They were written for a fixed four-across grid and said 3 / 2 / 2 down the
   ladder; against `auto-fill minmax(250px, 1fr)` they fight it, and the narrowest of them won
   at a phone width where auto-fill would have chosen one. Two 156px cards is not a picture of
   a garment, it is a thumbnail of one, which is the problem this redesign set out to fix.

   auto-fill decides it from the measure instead: three across on a wide screen, two from about
   530px, one below that. The 250px floor is the smallest box a jersey still reads in. */
@media (max-width: 900px) {
    .shop-standing { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .shop-standing-bar { margin: 0 auto; }
    .shop-form-split { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .shop-card-body { padding: 12px 12px 16px; }
    .shop-card-name { font-size: 0.9rem; }
}

@media (max-width: 560px) {
    .shop-filter-legend { min-width: 100%; margin-bottom: 2px; }
}

/* ==========================================================================
   XP settings: slider beside number, and what the numbers mean in rides
   ========================================================================== */

.settings-slider-row {
    display: grid;
    grid-template-columns: 1fr 96px;
    align-items: center;
    gap: 16px;
}

.settings-range {
    width: 100%;
    accent-color: #b30000;
    height: 26px;
}

.settings-number { text-align: center; }

.settings-preview {
    margin-top: 26px;
    padding: 18px 20px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 4px solid #b30000;
}

.settings-preview-title {
    margin: 0 0 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #b30000;
}

.settings-preview ul { list-style: none; margin: 0; padding: 0; }

.settings-preview li {
    display: grid;
    grid-template-columns: 34px 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #ededed;
}

.settings-preview li:last-child { border-bottom: none; }
.settings-preview-name { font-weight: 600; font-size: 0.92rem; }

.settings-preview-rides {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
}

.settings-preview-off {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: #b30000;
    min-width: 46px;
    text-align: right;
}

/* ==========================================================================
   Leden: the tally, and a member's participation over time
   ========================================================================== */

.member-tally {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
    margin-bottom: 18px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #b30000;
}

.member-tally-total strong,
.member-tally-part strong {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.7rem;
    margin-right: 7px;
}

.member-tally-total strong { color: #b30000; }

.member-tally-total span {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
}

.member-tally-part { display: inline-flex; align-items: center; }

.member-name.is-link { text-decoration: none; color: inherit; }
.member-name.is-link:hover { color: #b30000; }

.profile-history { margin-top: 34px; }

.history-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    margin-bottom: 16px;
}

.history-stats strong {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    color: #b30000;
    margin-right: 6px;
}

.history-stats span {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
}

/* preserveAspectRatio="none" on the element means the viewBox stretches to
   this box, so the bars fill whatever width the card gives them. */
.history-chart { width: 100%; height: 150px; display: block; }

.history-bar { fill: #b30000; }
.history-bar.is-empty { fill: #e4e4e4; }

.history-bar-value {
    fill: #888;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
}

.history-axis {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    margin-top: 4px;
}

.history-axis span {
    text-align: center;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #aaa;
}

@media (max-width: 560px) {
    .settings-slider-row { grid-template-columns: 1fr 78px; gap: 10px; }
    .history-axis span { font-size: 0.5rem; }
}

/* ==========================================================================
   The route library
   --------------------------------------------------------------------------
   Each card leads with the shape of the loop. The outline is an SVG path the
   GPX reader already projected into a 0-100 box, so nothing here does any
   arithmetic and nothing knows any geography.

   It is NOT a map: no basemap, no scale, no north arrow. It is the shape,
   which is what somebody scanning a library of routes actually recognises,
   and it must not be dressed up to look like more than that.
   ========================================================================== */

.routes-grid {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

.route-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #b30000;
    overflow: hidden;
}

.route-shape {
    position: relative;
    aspect-ratio: 3 / 2;
    background: #eceae3;       /* OSM's own land colour, so a slow tile is not a white hole */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* The card frames the map itself, so the map must not frame itself again inside it: the figure
   brings a margin, the frame a radius and a shadow, and all three would read as a box in a box.
   The aspect-ratio goes too — the card decides the shape here, not the mosaic. */
.route-shape .routemap { margin: 0; width: 100%; }

.route-shape .routemap-frame {
    border-radius: 0;
    box-shadow: none;
    aspect-ratio: 3 / 2 !important;
}

/* The mosaic is 4x3 tiles against a 3:2 card, so `cover` is what crops the difference rather
   than letterboxing it. Without it the grid stretches and every road on the map is subtly the
   wrong shape — which nobody can name but everybody can see. */
.route-shape .routemap-tiles img { object-fit: cover; }

.route-shape svg { width: 100%; height: 100%; display: block; }

/* Stroke width is in viewBox units, and the viewBox is 0-100 whatever the real
   route measures — so 2 is the same visual weight for a 20 km loop and a
   200 km one. That is the point of normalising in the reader. */
.route-shape path {
    stroke: #b30000;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

/* The track keeps its own stroke — see .routemap-line, which this must not reach. */
.route-shape .routemap-track path { stroke-width: unset; }

/* ---- the muted map ----
   A dozen full-colour maps on one page is a wall of green and beige with twelve red squiggles
   lost in it. Greyed back, the map is context and the TRACK is the subject, which is the right
   way round for a list somebody is scanning.

   The filter is on the tiles alone and never on the frame: a filter on the frame would catch
   the SVG track with it and turn the red line grey, which is the one thing on the card that has
   to stay findable. */
.routemap.is-muted .routemap-tiles {
    filter: grayscale(1) contrast(0.78) brightness(1.1);
}

/* The outline fallback has no tiles to grey, so it gets the same quietening on its own ground
   instead — otherwise a route with no map would be the loudest card on the page. */
.routemap.is-muted.is-outline { opacity: 0.85; }

/* The credit below is positioned against this. */
.routemap.is-muted { position: relative; }

/* Small, and out of the way. The licence requires it to be legible, not prominent, and on a
   card this size a full-weight credit line competes with the route's name. */
.routemap.is-muted .routemap-credit {
    position: absolute;
    right: 6px;
    bottom: 4px;
    margin: 0;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.56rem;
    line-height: 1.5;
    color: #555;
}

.route-noshape { display: block; width: 100%; height: 100%; }

.route-surface {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 9px;
    border-radius: 3px;
    background: rgba(26, 26, 26, 0.85);
    color: #fff;
}

.route-surface.is-gravel { background: #9c640a; }
.route-surface.is-offroad { background: #2f6b3a; }
.route-surface.is-mixed { background: #5e6a78; }

.route-body { padding: 16px 20px 20px; }

.route-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 1px;
    margin: 0 0 10px;
}

/* A <dl> laid out as label-over-value pairs, with the labels visually small
   rather than hidden: unlike the ride card, these numbers need naming — 52 and
   310 mean nothing side by side without "afstand" and "hoogtemeters". */
.route-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    gap: 10px;
    margin: 0 0 12px;
}

.route-facts dt {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
}

.route-facts dd { margin: 2px 0 0; font-size: 0.9rem; color: #444; }

.route-facts dd strong {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: #1a1a1a;
    margin-right: 3px;
}

.route-note { margin: 0 0 12px; font-size: 0.88rem; color: #666; }

.route-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.route-actions a,
.route-actions button {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #b30000;
    text-decoration: none;
}

.route-actions a:hover { color: #7a0000; }

.routes-current {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    color: #666;
}

/* ==========================================================================
   The route map, the climb profile, and one ride in detail
   --------------------------------------------------------------------------
   The map is tiles laid out as a grid with the track drawn over them as SVG.
   Keeping the line as SVG rather than burning it into an image is what lets it
   stay sharp when the picture scales down to a phone.
   ========================================================================== */

.routemap { margin: 0 0 14px; }

.routemap-frame {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #eceae3;       /* OSM's own land colour, so a slow tile is not a white hole */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.routemap-tiles {
    display: grid;
    width: 100%;
    height: 100%;
}

.routemap-tiles img {
    width: 100%;
    height: 100%;
    display: block;
}

.routemap-track {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Two strokes, not one: a pale casing under a red line. A single stroke
   disappears over either a dark forest or a pale field, and the route crosses
   both. vector-effect keeps the width constant however the viewBox scales. */
.routemap-casing {
    fill: none;
    stroke: #ffffff;
    stroke-width: 7;
    stroke-opacity: 0.85;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.routemap-line {
    fill: none;
    stroke: #b30000;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

/* Attribution. ODbL requires it wherever the tiles are shown — this is not
   decoration and must not be removed to tidy the layout. */
.routemap-credit {
    margin-top: 6px;
    font-size: 0.68rem;
    color: #999;
    text-align: right;
}

.routemap-credit a { color: #999; }
.routemap-credit a:hover { color: #b30000; }

/* The fallback when no tiles were fetched: the shape of the loop on its own. */
.routemap.is-outline svg {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f6f6f6;
    border-radius: 8px;
}

.routemap.is-outline path {
    fill: none;
    stroke: #b30000;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

/* ---- the climb ---- */

.routeprofile { margin: 0 0 18px; }

.routeprofile svg {
    width: 100%;
    height: 72px;
    display: block;
    background: #fafafa;
    border-radius: 6px;
}

.routeprofile-fill { fill: rgba(179, 0, 0, 0.12); }

.routeprofile-line {
    fill: none;
    stroke: #b30000;
    stroke-width: 1.5;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.routeprofile-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #999;
}

/* ---- IK KOM / IK KOM NIET ----

   Global, not scoped to RideCard, because two components emit this markup: the board's card and
   the ride's own page. The trap AvatarBadge documents, running the same way.

   One control split in two, not two buttons: the pair is a single question with two answers, and
   a joined shape says so. Neither half is filled until the visitor answers, which is what keeps
   "said no" visibly different from "said nothing". */
.rsvp-choice {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #e2e2e2;
    border-radius: 50px;
    overflow: hidden;
    background: #fff;
}

.rsvp-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: #888;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

/* The divider is on the CHILDREN of the pill, whatever they are. On the board the two buttons
   are siblings; on the ride page each sits in its own <form>, because a static page answers by
   posting one. `.rsvp-btn + .rsvp-btn` was true of the first shape only and would have left the
   ride page's pair with no seam between them. */
.rsvp-choice > * + * {
    border-left: 1px solid #e2e2e2;
}

/* So the button fills its form's height and the joined shape survives the extra element. */
.rsvp-choice > form {
    display: flex;
    margin: 0;
}

.rsvp-btn:hover {
    background: #fafafa;
    color: #111;
}

.rsvp-btn:focus-visible {
    outline: 2px solid #b30000;
    outline-offset: -2px;
}

/* Coming gets the club red; not coming gets grey. Declining is a perfectly good answer and
   should not look like a warning. */
.rsvp-btn.is-in.is-on,
.rsvp-btn.is-in.is-on:hover {
    background: #b30000;
    color: #fff;
}

.rsvp-btn.is-out.is-on,
.rsvp-btn.is-out.is-on:hover {
    background: #ececec;
    color: #444;
}

/* ---- one ride ---- */

.ridedetail {
    max-width: 1100px;
    margin: 0 auto;
    padding: 118px 5vw 70px;   /* 118px clears the fixed nav, as .shop-head does */
}

/* The crumb and the organiser's edit link share one row: "back" is where everybody looks first
   and the edit link belongs at the other end of it, not buried under the facts. */
.ridedetail-crumb {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ridedetail-crumb .shop-crumb { margin-bottom: 0; }

.ridedetail-edit {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #b30000;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.ridedetail-edit:hover {
    color: #7a0000;
    border-bottom-color: #7a0000;
}

.ridedetail-head { margin-bottom: 26px; }

/* Above the rider list, because answering is what somebody opening this page came to do, and
   below the map, because looking at the route is how they decide. */
.ridedetail-rsvp {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 0 0 30px;
    padding: 18px 22px;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid #b30000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.ridedetail-rsvp-q {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #b30000;
}

.ridedetail-when {
    margin: 0 0 4px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #b30000;
}

.ridedetail-head h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.05;
    margin: 0 0 12px;
}

.ridedetail-body {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 34px;
    align-items: start;
}

.ridedetail-nomap {
    background: #fafafa;
    border-radius: 8px;
    padding: 40px 26px;
    text-align: center;
    color: #777;
}

.ridedetail-facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 18px;
    margin: 0 0 20px;
    align-items: baseline;
}

.ridedetail-facts dt {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
}

.ridedetail-facts dd { margin: 0; color: #333; }

.ridedetail-facts dd strong {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.35rem;
    color: #1a1a1a;
    margin-right: 3px;
}

.ridedetail-download { display: inline-block; }

.ridedetail-notes {
    margin: 18px 0 0;
    padding: 14px 16px;
    background: #fafafa;
    border-left: 3px solid #b30000;
    border-radius: 0 6px 6px 0;
    font-size: 0.92rem;
    color: #555;
}

/* The rider list was running under MountainDivider, which is pulled up into the
   page by a negative margin and so sits ON TOP of whatever ends the content.
   The space has to come from the last section, because the divider's overlap is
   what hides the seam and must not be removed. */
.ridedetail-riders { margin-top: 40px; padding-bottom: 150px; }

.ridedetail-riders h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.7rem;
    letter-spacing: 1px;
    margin: 0 0 16px;
}

.ridedetail-rider-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.ridedetail-rider-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ridedetail-rider-list a:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.1);
}

@media (max-width: 900px) {
    .ridedetail-body { grid-template-columns: 1fr; gap: 24px; }
}

@media (hover: none) {
    .ridedetail-rider-list a:hover { transform: none; }
}


/* ==========================================================================
   Ride tags and their tooltips — GLOBAL, and that is the whole point
   --------------------------------------------------------------------------
   These started in RideCard.razor.css. Scoped CSS scopes the RIGHTMOST
   selector to the component that emitted the markup, so the moment RideDetail
   rendered its own .ride-pace and .ride-tip it got none of them: the tooltip
   had no `opacity: 0` and sat permanently open above the page, and the type
   pills lost their colours.

   Exactly the trap AvatarBadge already documents, running the same way. Two
   components emit this markup now, so the rules belong here.
   ========================================================================== */
   --------------------------------------------------------------------------
   The tempo and the event bonus both carry detail that will not fit on a pill,
   and the browser's own `title` is the wrong tool: it waits about a second, it
   cannot be styled, and on a touch screen it never appears at all.

   So the pill is a <button> with the detail inside it. A button because it is
   focusable — that is what makes this reachable by keyboard and by tap, which a
   :hover rule on a <span> can never be.
   ========================================================================== */

.ride-pace,
.ride-bonus {
    position: relative;
    border: 0;
    font: inherit;
    cursor: help;
    /* The pills already size themselves through .ride-type's shared rules; a
       button brings its own box, so these put it back. */
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.ride-bonus {
    background: #fff4e0;
    color: #8a5a00;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Centred ON the tag, not stacked above the row.
   `bottom: 100%` put it over whatever sat above — on a card that was the title,
   on the detail page it was the page heading. Centring it over its own tag with
   a transform means it belongs to the thing you are pointing at, wherever that
   thing happens to be. */
.ride-tip {
    position: absolute;
    bottom: 50%;
    left: 50%;
    translate: -50% 50%;
    z-index: 30;

    width: max-content;
    max-width: 230px;
    padding: 9px 12px;

    background: #1a1a1a;
    color: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);

    /* Sentence case, because the pill is uppercase and the explanation is prose. */
    font-size: 0.74rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.45;
    text-align: left;
    white-space: normal;

    /* opacity + pointer-events, never display:none — a tooltip that is removed
       from the box tree is removed from the accessibility tree with it, and
       aria-describedby then points at nothing. */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* No arrow: it sits ON the tag now rather than pointing down at it from above,
   so a tail would point at nothing. */

.ride-pace:hover .ride-tip,
.ride-pace:focus-visible .ride-tip,
.ride-bonus:hover .ride-tip,
.ride-bonus:focus-visible .ride-tip {
    opacity: 1;
}

/* ---- the discipline colours ----
   FILLED, not tinted. These started as pale backgrounds with coloured text,
   which read as five shades of beige across a board of nine cards — the club
   could not tell a run from a road ride at a glance, which is the one job a
   tag has. Solid fills on white are the strongest thing a small pill can do.

   Each colour is still paired with its own word, because colour alone is not a
   label: roughly one man in twelve cannot separate the red from the green. */

.ride-type,
.ride-pace,
.ride-bonus {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    border: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: #fff;
    white-space: nowrap;
}

.ride-type--road { background: #b30000; }
.ride-type--offroad { background: #8a5a12; }
.ride-type--run { background: #1a5f9e; }
.ride-type--event { background: #6b2fa0; }
.ride-type--other { background: #5a5a5a; }

/* The tempo is a different question from the discipline, so it is drawn as an
   outline rather than a second solid — two filled pills side by side read as
   one two-part label. */
.ride-pace {
    background: #fff;
    border: 1.5px solid currentColor;
    cursor: help;
}

.ride-pace.is-ensemble { color: #1f7a52; }
.ride-pace.is-rapide { color: #b30000; }

/* The event bonus is the one tag that changes what the ride is WORTH, so it is
   the one that gets gold. */
.ride-bonus {
    background: #e0a419;
    color: #3a2400;
    cursor: help;
    gap: 5px;
}

/* ---- the bonus pill on a phone ----
   This pill is the widest thing on a ride card and it is one flex item, which is the part that
   matters: `.ride-tags` is `flex-wrap: wrap`, but a wrapping row's min-content is its WIDEST
   ITEM, so wrapping the row cannot help when a single item is the problem. "DUBBELE CLUBPUNTEN"
   at `nowrap` measures 170px, and the ride card's middle grid track has about 130px to give at
   360px — so the track was forced to 170, every full-width row of the card came out 327px inside
   a 312px card, and the menu button in the third track was pushed 22px past the viewport.

   Nothing looked wrong, because `html, body { overflow-x: hidden }` clips rather than scrolls.
   Found by walking the DOM for boxes whose `right` exceeds `clientWidth` with the overflow turned
   back on, which is the only way this class of bug shows up at all.

   Letting the label wrap drops its min-content to its widest word, which the track can hold. The
   pill then takes two lines on an event card at phone width; that is the honest trade, and only
   `RideType.Event` renders it at all. Tightened a little first so it needs the second line less
   often. In `site.css` rather than `RideCard.razor.css` because `RideDetail` emits this pill too
   and a scoped rule would reach exactly one of the two. */
@media (max-width: 560px) {
    .ride-bonus {
        white-space: normal;
        text-align: center;
        letter-spacing: 1.1px;
        padding: 4px 9px;
        line-height: 1.25;
    }
}

.ride-flag { border-radius: 999px; }

/* The calendar links to a card by id; without this the fixed navbar lands on
   top of whatever you jumped to. */
.ride-card { scroll-margin-top: 120px; }

@media (hover: none) {
    /* A phone never fires :hover, so the tooltip would only ever open on focus.
       Tapping a button focuses it, which is exactly the path this leaves open. */
    .ride-pace:hover .ride-tip,
    .ride-bonus:hover .ride-tip { opacity: 0; }

    .ride-pace:focus .ride-tip,
    .ride-bonus:focus .ride-tip { opacity: 1; }
}

/* The shop's signed-out invitation. Centred, because it is the only thing on
   the page a visitor without an account can act on. */
.shop-signin {
    max-width: 1000px;
    margin: 26px auto 0;
    padding: 26px 5vw;
    text-align: center;
    background: #fafafa;
    border-radius: 8px;
}

.shop-signin p {
    margin: 0 0 14px;
    color: #555;
}

/* Clickable names that still read as headings rather than as links in a list. */
.route-name a,
.shop-list-name a {
    color: inherit;
    text-decoration: none;
}

.route-name a:hover,
.shop-list-name a:hover { color: #b30000; }

/* ---- the settings number box, with an optional unit ---- */

.settings-number-wrap {
    position: relative;
    display: block;
}

/* The multiplier is a count of rides, not a number of points, and the × is what
   says so at a glance. aria-hidden because the label already reads
   "vermenigvuldiger" — a screen reader does not need the symbol twice. */
.settings-suffix {
    position: absolute;
    right: 10px;
    top: 50%;
    translate: 0 -50%;
    color: #999;
    pointer-events: none;
}

/* ---- the ride form's route chooser ---- */

.route-choice {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.route-choice-btn {
    padding: 7px 13px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    color: #444;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.route-choice-btn:hover { border-color: #b30000; color: #b30000; }

.route-choice-btn.is-on {
    background: #b30000;
    border-color: #b30000;
    color: #fff;
}

/* The picker scrolls rather than growing, so a library of thirty routes cannot
   push the dialog's save button off the screen. */
.route-pick {
    max-height: 230px;
    overflow-y: auto;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
}

.route-pick-empty { margin: 0; padding: 16px; color: #888; font-size: 0.9rem; }

.route-pick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-bottom: 1px solid #f2f2f2;
    background: #fff;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.route-pick-item:last-child { border-bottom: 0; }
.route-pick-item:hover { background: #fafafa; }
.route-pick-item.is-on { background: #fdf4f4; }

.route-pick-shape {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    background: #f6f6f6;
    border-radius: 5px;
}

.route-pick-shape svg { width: 100%; height: 100%; display: block; }

.route-pick-shape path {
    stroke: #b30000;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.route-pick-body { display: flex; flex-direction: column; min-width: 0; }
.route-pick-body strong { font-size: 0.92rem; }

.route-pick-body span {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
}

.field-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.field-check input { margin-top: 3px; flex: 0 0 auto; }

.field-error { display: block; color: #b30000; font-size: 0.82rem; margin-top: 4px; }

/* ---- the no-show control on a ride ---- */

.rider-mark {
    border: 0;
    background: transparent;
    color: #bbb;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.15s, color 0.15s;
}

.rider-mark:hover { background: #fdf0f0; color: #b30000; }

/* A struck-through rider is one whose points have gone back, which is a visible
   fact rather than a hidden one — the organisator can see what they did. */
.ridedetail-rider-list li.is-absent a { opacity: 0.45; text-decoration: line-through; }

.ridedetail-correct-note {
    margin: 16px 0 0;
    font-size: 0.82rem;
    color: #888;
    max-width: 60ch;
}

/* ==========================================================================
   THE KIEZELTOCHT -- the club's own gravel event.

   These rules are GLOBAL rather than scoped, and that is deliberate. Three
   components emit this markup now: the 2027 teaser at /kiezeltocht, the 2026
   recap at /kiezeltocht/2026, and the past-editions index. Scoped CSS scopes
   the RIGHTMOST selector to the component that emitted the markup, so a copy
   in each of three stylesheets is three copies one edit away from disagreeing
   -- which is exactly what happened to RideCard's tag pills the moment
   RideDetail drew its own .ride-pace. They live here for the same reason.

   Anything that belongs to ONE of those pages stays in that page's own sheet:
   the recap's photo strip, the teaser's nothing, the index's cards.

   The white body background is still set per page via <HeadContent>: <body>
   is outside every component, so a scoped rule could never have reached it.
   ========================================================================== */

/* ---------- HERO ---------- */
/* `../images/`, not `images/`. A url() in a stylesheet resolves against THE STYLESHEET, and
   these two rules arrived here from a scoped .razor.css -- whose bundle Blazor serves from the
   site root, where `images/kiezeltocht-hero.jpg` was correct. This file is served from /css/, so
   the same string asks for /css/images/... and 404s. The hero rendered as a flat grey rectangle,
   which reads as a missing photograph rather than as a broken path.
   .mountain-img-divider in this file already had it right. */
.kiezel-hero {
    position: relative;
    /* Two declarations. 82vh on a phone is measured with the URL bar hidden, so the hero starts
       taller than the screen and settles as you scroll; svh is the bar-shown height and holds
       still. Browsers that do not know svh keep the first. */
    min-height: 82vh;
    min-height: 82svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 160px 5vw 170px 5vw;
    background-image: linear-gradient(rgba(0,0,0,0.32), rgba(0,0,0,0.62)), url('../images/kiezeltocht-hero.jpg');
    background-size: cover;
    background-position: center 35%;
    overflow: hidden;
}
.kiezel-hero-logo { width: min(520px, 80vw); height: auto; margin-bottom: 26px; filter: drop-shadow(0 8px 26px rgba(0,0,0,0.5)); }
.kiezel-hero-date {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 5vw, 3.4rem);
    color: #fff; letter-spacing: 3px; margin: 0; line-height: 1.05;
    text-shadow: 0 3px 18px rgba(0,0,0,0.5);
}
.kiezel-hero-place {
    font-size: clamp(1rem, 2vw, 1.3rem); color: #f0f0f0; margin: 12px 0 0 0;
    letter-spacing: 1px; text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.kiezel-hero-cta { margin-top: 42px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.btn-register {
    display: inline-block;
    background: #b30000; color: #fff; font-family: 'Inter', sans-serif; font-weight: 800;
    font-size: 1.05rem; text-transform: uppercase; letter-spacing: 1.5px;
    padding: 20px 42px; border-radius: 4px; text-decoration: none;
    box-shadow: 0 10px 34px rgba(179,0,0,0.42);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.btn-register:hover { background: #8f0000; transform: translateY(-3px); box-shadow: 0 15px 40px rgba(179,0,0,0.5); }
.btn-ghost {
    display: inline-block;
    background: rgba(255,255,255,0.10); color: #fff; border: 2px solid rgba(255,255,255,0.75);
    font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1.05rem;
    text-transform: uppercase; letter-spacing: 1.5px; padding: 18px 38px;
    border-radius: 4px; text-decoration: none; backdrop-filter: blur(3px);
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn-ghost:hover { background: #fff; color: #111; transform: translateY(-3px); }

/* ---------- FACT BAR ---------- */
/* THE COLUMN COUNT IS THE FACT COUNT, and getting it wrong is invisible on a
   wide screen in the worst way. This was repeat(4, 1fr) against three facts,
   left over from the version that also quoted a start time -- so the three
   sat in the left three quarters of the bar with an empty quarter after them,
   and the whole thing read as badly centred rather than as missing a cell. */
.fact-bar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    max-width: 1150px; margin: -70px auto 0 auto; position: relative; z-index: 5;
    background: #fff; border-radius: 10px; box-shadow: 0 18px 55px rgba(0,0,0,0.14);
    overflow: hidden;
}
.fact { padding: 34px 22px; text-align: center; border-right: 1px solid #ececec; }
.fact:last-child { border-right: none; }
.fact-label {
    font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px; color: #b30000; margin: 0 0 10px 0;
}
.fact-value { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; color: #111; margin: 0; line-height: 1.1; letter-spacing: 1px; }
.fact-sub { font-size: 0.92rem; color: #666; margin: 6px 0 0 0; line-height: 1.4; }

/* ---------- GENERIC SECTION ---------- */
.kiezel-section { max-width: 1100px; margin: 0 auto; padding: 100px 5vw 0 5vw; }
.kiezel-section h2 {
    font-family: 'Bebas Neue', sans-serif; font-size: clamp(2.6rem, 5vw, 4rem);
    color: #111; letter-spacing: 2px; margin: 0 0 22px 0; line-height: 1;
}
.kiezel-lead { font-size: 1.25rem; line-height: 1.85; color: #444; margin: 0 0 18px 0; }
/* ---------- FINAL CTA ---------- */
.final-cta {
    margin: 110px auto 0 auto; max-width: 1100px; padding: 70px 5vw;
    background: #111; border-radius: 12px; text-align: center;
    background-image: linear-gradient(rgba(17,17,17,0.86), rgba(17,17,17,0.92)), url('../images/kiezeltocht-hero.jpg');
    background-size: cover; background-position: center;
}
.final-cta h2 {
    font-family: 'Bebas Neue', sans-serif; font-size: clamp(2.6rem, 6vw, 4.4rem);
    color: #fff; letter-spacing: 2px; margin: 0 0 16px 0; line-height: 1;
}
.final-cta p { font-size: 1.15rem; color: #ccc; max-width: 640px; margin: 0 auto 36px auto; line-height: 1.7; }
.final-cta p.cta-note { font-size: 0.95rem; color: #999; margin: 34px auto 0 auto; }
.cta-note a { color: #e0e0e0; }

/* ---------- TWO FACTS, NOT THREE ----------
   The bar's column count IS the fact count -- it was repeat(4, 1fr) against three facts once and
   read as badly centred rather than as missing a cell. The 2027 teaser has two things to say
   (where, and what kind of riding); the date it does not have is not a cell saying "VOLGT". */
.fact-bar.is-two { grid-template-columns: repeat(2, 1fr); }

/* ---------- THREE SHORT POINTS ----------
   What a paragraph of prose was doing on the teaser, said in nine words. A trailer does not
   explain the film. */
.kiezel-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 34px;
}

.kiezel-point h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #b30000;
    margin: 0 0 8px;
}

.kiezel-point p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #444;
}

@media (max-width: 768px) {
    .kiezel-points { grid-template-columns: 1fr; gap: 22px; }
}

/* ---------- PHOTO STRIP ----------
   Global, because the recap and the 2027 teaser both emit it -- the recap as two rows of six,
   the teaser as one row of three. aspect-ratio plus object-fit: cover means a portrait shot
   crops rather than breaking the grid. */
.photo-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.photo-strip a {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 6px;
    background: #eee;
}

.photo-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.photo-strip a:hover img { transform: scale(1.04); }

@media (max-width: 768px) {
    .photo-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (hover: none) {
    /* A phone never fires :hover, so the zoom would stick after a tap. */
    .photo-strip a:hover img { transform: none; }
}

.kiezel-bottom-space { height: 140px; }

/* ==========================================================================
   The recap — added when the page stopped selling an event and started
   remembering one. Ported from the live static site so the two match.
   ========================================================================== */

.kiezel-notice {
    max-width: 1000px;
    margin: 50px auto 0 auto;
    padding: 20px 26px;
    background: #fdf4f4;
    border-left: 5px solid #b30000;
    border-radius: 0 8px 8px 0;
}

.kiezel-notice strong {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: #b30000;
    margin-bottom: 4px;
}

.kiezel-notice span { color: #444; }

/* The 2026 recap's thank-you, in the hero where the place line used to be. It keeps the notice's
   shape -- a bold line over a sentence -- but none of its colours: .kiezel-notice is a pale pink
   panel for a white page, and this sits over a darkened photograph. The text shadows match the
   hero's own, or the sentence disappears into the lighter part of the picture. */
.kiezel-hero-thanks {
    max-width: 620px;
    margin: 18px auto 0 auto;
}

.kiezel-hero-thanks strong {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    letter-spacing: 2px;
    color: #ff5a5a; /* Not the club red: #b30000 is close to unreadable over a dark photograph.
                       NextRideBadge makes the same swap for the same reason. */
    margin-bottom: 6px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.kiezel-hero-thanks span {
    display: block;
    font-size: clamp(0.98rem, 2vw, 1.15rem);
    line-height: 1.65;
    color: #f0f0f0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* The arrow link that ends a section. Global because all three Kiezeltocht pages use it. */
.gallery-link {
    display: inline-block;
    margin-top: 24px;
    color: #b30000;
    text-decoration: none;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.gallery-link:hover { color: #7a0000; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
    /* max-width: 1100px with margin:auto centres this on a wide screen, but below about 1150px
       "auto" resolves to 0 and the panel goes edge to edge -- a 12px-rounded dark block with its
       corners cut off by the screen. It needs the same 5vw gutter every section has. */
    .final-cta { margin-left: 5vw; margin-right: 5vw; margin-top: clamp(70px, 12vw, 110px); }
    .fact-bar { grid-template-columns: repeat(2, 1fr); margin-top: -50px; }
    .fact:nth-child(2) { border-right: none; }
    .fact:nth-child(1), .fact:nth-child(2) { border-bottom: 1px solid #ececec; }
}

@media (max-width: 560px) {
    .kiezel-hero { min-height: 70vh; min-height: 70svh; padding: 120px 24px 110px 24px; }
    .kiezel-section { padding: 70px 24px 0 24px; }
    .final-cta { padding-left: 24px; padding-right: 24px; }
    /* Same trap as .final-cta above: max-width plus `margin: auto` centres it on a desktop, but
       at 375px "auto" is 0 and a 10px-rounded card with a shadow runs edge to edge with its
       corners cut off by the screen. It is a floating card; it needs air beside it. */
    .fact-bar { margin-left: 24px; margin-right: 24px; }
    .fact { padding: 26px 16px; }
    .btn-register, .btn-ghost { width: 100%; text-align: center; padding: 18px 20px; }
    .kiezel-bottom-space { height: 70px; }
}

/* The three facts stay two-up as far down as this. They are short -- a date, a place, a pair of
   distances -- and one per row turns the bar into 400px of scroll before the page has said
   anything. Only below a phone's width does a single column start to earn itself. */
@media (max-width: 440px) {
    .fact-bar { grid-template-columns: 1fr; }
    .fact { border-right: none; border-bottom: 1px solid #ececec; }
    .fact:last-child { border-bottom: none; }
}

/* No hover on a touch screen, so a tapped button keeps the lift until something else is tapped --
   it reads as "still pressed" on a control that does nothing when pressed. */
@media (hover: none) {
    .btn-register:hover,
    .btn-ghost:hover {
        transform: none;
    }
}

/* ---- the end-of-season reset -------------------------------------------------
   The one control on /admin/instellingen that cannot be undone by pressing it again, drawn so it
   does not look like the four that can. Bordeaux rather than the headline red: this is a warning
   on a page of ordinary settings, not a heading, and the club's own colour says "careful" without
   borrowing the colour every h2 on the site already wears.

   Its own <form>, so it cannot share a submit with the economy above it. */

.settings-danger {
    border-left: 6px solid #8f3446;
    background: #fdfafb;
}

.settings-danger-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: #8f3446;
    margin: 0 0 10px;
}

.settings-danger-body {
    margin: 0 0 18px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* flex-end rather than centre: the field carries a label above it, so aligning on the middle
   would float the button halfway up the label. */
.settings-danger-row {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 14px;
}

.settings-danger-row .settings-field {
    flex: 0 1 220px;
    margin: 0;
}

.settings-danger-btn {
    flex: none;
    padding: 13px 26px;
    border: 0;
    border-radius: 4px;
    background: #8f3446;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.settings-danger-btn:hover { background: #6f2634; }

@media (max-width: 560px) {
    /* The button goes full width rather than sitting beside a box it no longer fits next to —
       and a destructive control is the last thing that should end up 60px wide in a corner. */
    .settings-danger-row .settings-field { flex: 1 1 100%; }
    .settings-danger-btn { width: 100%; }
}

/* ---- clubkledij, on the ride page --------------------------------------------
   The club's rule is that clubpunten are earned in clubkledij. Two controls express it, and they
   are deliberately different shapes because they are different statements: the organiser's is a
   small toggle beside a name, the member's own is a panel with the club's own words on it.

   Both are plain forms. This page opens no circuit. */

/* The tag anybody can see. Not an organiser-only thing: a rule about what the club wears works
   by being visible, and a tag only the organisatoren could see would change nobody's jersey. */
.rider-nokit {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #8f3446;
    background: #f6e9ec;
    border-radius: 50px;
    padding: 3px 10px;
    white-space: nowrap;
}

.ridedetail-rider-list li.is-nokit a > span { color: #8a8a8a; }

/* The organiser's kit toggle, beside the no-show ✕. A word rather than a glyph, because "absent"
   and "out of kit" are close enough in meaning that two symbols would be guessed at. */
.rider-mark.is-kit {
    width: auto;
    padding: 0 10px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.rider-mark.is-kit.is-on {
    background: #8f3446;
    color: #fff;
    border-color: #8f3446;
}

/* The member's own panel. Green while there is nothing to confess and bordeaux once there is,
   which is the same two colours the rank pills use and means the same thing in both places. */
.ride-kit {
    margin-top: 26px;
    padding: 18px 22px;
    border-radius: 8px;
    border-left: 6px solid #0b3631;
    background: #f2f7f5;
}

.ride-kit.is-on {
    border-left-color: #8f3446;
    background: #faf0f2;
}

.ride-kit-title {
    margin: 0 0 4px;
    font-weight: 700;
    color: #111;
}

.ride-kit-hint {
    margin: 0 0 14px;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* The club's own line, so it carries the weight of a sentence somebody wrote rather than of a
   validation message. */
.ride-kit-msg {
    margin: 0 0 14px;
    color: #8f3446;
    font-weight: 600;
    line-height: 1.6;
}

.ride-kit-btn {
    padding: 11px 20px;
    border: 1.5px solid #0b3631;
    border-radius: 4px;
    background: #fff;
    color: #0b3631;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.ride-kit-btn:hover { background: #0b3631; color: #fff; }

.ride-kit.is-on .ride-kit-btn { border-color: #8f3446; color: #8f3446; }
.ride-kit.is-on .ride-kit-btn:hover { background: #8f3446; color: #fff; }

@media (hover: none) {
    .ride-kit-btn:hover { background: #fff; color: #0b3631; }
    .ride-kit.is-on .ride-kit-btn:hover { background: #fff; color: #8f3446; }
}

/* ---- editing from the shop itself --------------------------------------------
   A beheerder's shortcut back to /admin/shop, on the page where a wrong price actually gets
   noticed. Deliberately quiet: it is drawn for perhaps three people in the club and must not
   change how the shop reads for everybody else. */

/* position: absolute against .shop-card, which is already positioned for the card link. The
   z-index is what lifts it off the card's own <a> — it is a SIBLING of that link rather than a
   child, because an <a> inside an <a> is not valid HTML. */
.shop-card-edit {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 5px 11px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    color: #0b3631;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-decoration: none;
}

.shop-card-edit:hover { background: #0b3631; color: #fff; }

.shop-crumb-edit {
    margin-left: 16px;
    color: #0b3631;
    font-weight: 700;
}

/* ---- a member's own profile picture ------------------------------------------
   A plain <input type="file">, which is what makes this work on a phone with no JavaScript: a
   mobile browser turns accept="image/*" into "camera or gallery" by itself, and nothing a drag
   zone adds survives being tapped with a thumb. */

/* A FILE INPUT IGNORES width: 100% AND SIZES ITSELF FROM ITS OWN CONTENTS -- the button plus
   however many characters of "no file chosen" the browser decided on. On a 375px phone that came
   out 375px wide inside a 329px card, i.e. 46px past the right edge.

   It did not show up as a sideways scroll, because `html, body { overflow-x: hidden }` clips
   rather than scrolls -- the exact masking CLAUDE.md warns about under Mobile layout. The button
   was simply cut off, which reads as a browser quirk rather than as a bug. Found by walking the
   DOM for boxes whose `right` exceeds `clientWidth`, which is the only way this is ever found.

   Both inputs on the site, because the shop's photo box has had this since it shipped and the
   profile's new one inherited it. */
input[type="file"].auth-input {
    max-width: 100%;
}

.auth-upload { margin-top: 14px; }

/* The file input is the one control on the site a browser draws itself, so the parts that can be
   styled are: the box around it, and the button inside it. */
.auth-file {
    padding: 10px 12px;
    cursor: pointer;
}

.auth-file::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    border: 1.5px solid #0b3631;
    border-radius: 4px;
    background: #fff;
    color: #0b3631;
    font-family: 'Inter', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.auth-file::file-selector-button:hover { background: #0b3631; color: #fff; }

@media (hover: none) {
    .auth-file::file-selector-button:hover { background: #fff; color: #0b3631; }
}

/* ---- choosing what the circle shows ----

   Global and not scoped, because two components emit it: /welcome and /account. The trap
   AvatarBadge documents, avoided rather than walked into for the fifth time.

   The stage is a SQUARE with a ring drawn on top, not a round box clipping a picture. Clipping
   the box would hide the corners of the photograph, and the corners are what tell somebody
   which way to drag -- a disc floating on nothing gives no sense of how much picture is left.
   The ring is the preview; the dimmed square around it is the context. */
.auth-crop {
    position: relative;
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 8px;
    background: #f2f2f2;
    cursor: grab;
    /* So a drag on a phone moves the picture instead of scrolling the page under the finger.
       Set here and not inline, unlike .kit-stage, because nothing scripts this element into
       existence -- the server renders it and site.js only un-hides it. */
    touch-action: none;
    user-select: none;
}

.auth-crop:active { cursor: grabbing; }

.auth-crop .crop-img {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    max-width: none;
    pointer-events: none;
    -webkit-user-drag: none;
}

/* One element doing two jobs: the white ring that shows where the circle falls, and -- through
   a box-shadow spread larger than the stage -- the dim over everything outside it. A second
   overlay element would need its own round hole cut in it, which is this same trick anyway. */
.auth-crop .crop-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(255,255,255,0.72);
    border: 2px solid #b30000;
    pointer-events: none;
}

/* `hidden` is an attribute the BROWSER styles, and any author rule setting `display` beats it --
   author beats user-agent whatever the specificity. So this row, which sets `display: flex`,
   ignored its own `hidden` attribute and the zoom slider sat under the file box before anybody
   had chosen a picture. The stage above it was genuinely hidden, because it sets no `display` at
   all, which is what made the pair look like one working control and one stray one.
   Any new rule here that names `display` needs this companion. */
.auth-crop-row[hidden] { display: none; }

.auth-crop-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 260px;
    margin-top: 10px;
}

.auth-crop-row .auth-hint { flex: 1 1 100%; }

/* Reusing the settings slider's shape would mean reaching into .settings-range, which is about
   a number box it is paired with. This one is paired with nothing. */
.auth-crop-zoom {
    flex: 1 1 auto;
    width: 100%;
    accent-color: #b30000;
    cursor: pointer;
}


/* ---- the shop's filter row, on a phone -----------------------------------------
   PRE-EXISTING, and it never showed as a sideways scroll because `html, body
   { overflow-x: hidden }` clips rather than scrolls — the masking CLAUDE.md warns about under
   Mobile layout. Found by walking the DOM for boxes whose `right` exceeds `clientWidth`, which
   is the only way any of these are ever found.

   At 375px the row is two menus plus a count pushed right with `margin-left: auto`, and the
   three do not fit: the count landed 90px past the edge and was simply cut off, and the second
   menu's 230px panel hung 11px over. */

@media (max-width: 560px) {
    /* The count drops to its own line rather than being squeezed out of existence. It still
       carries margin-left: auto, so it stays right-aligned on the line it lands on. */
    .shop-controls { flex-wrap: wrap; }

    .shop-controls .shop-menu { flex: 1 1 calc(50% - 6px); }
    .shop-menu > summary { width: 100%; justify-content: space-between; }
    .shop-count { flex: 1 1 100%; text-align: right; }

    /* position: static is what moves the panel's containing block from the 165px button up to
       .shop-controls, which is already positioned. left and right both at 0 then span the whole
       row, and min-width has to be cleared or the 230px floor puts it straight back over the
       edge. */
    .shop-controls .shop-menu { position: static; }

    .shop-menu-panel {
        left: 0;
        right: 0;
        min-width: 0;
    }
}

/* ---- the admin forms' two-up rows, on a phone --------------------------------
   `.shop-form-split` puts two fields side by side, which is right on a desktop and wrong at
   360px: each gets about 150px, and a <select> that narrow pushes its own label out beside it
   instead of above it. The route form's "Type rit" and "Startplaats" row was the visible case —
   one field with its label on top, the next with its label alongside, in the same form. */

@media (max-width: 560px) {
    .shop-form-split { grid-template-columns: 1fr; }
}
