/* ============================================================================
   VODORO — product site design system (vodoro.de)
   Loaded only by website/base.html. Light, calm, product-first.

   The foundation (type scale, spacing, radii, header/footer anatomy, section
   rhythm) mirrors vodoro.css on purpose, so the two sites read as one
   company; only the colour tokens differ. Keep the two in step.

   Contents
     1. Font & tokens
     2. Base
     3. Layout & typography
     4. Buttons
     5. Header, navigation, language switch, mobile drawer
     6. Footer
     7. Heroes
     8. Components
     9. Page-specific blocks (download, contact, about, company, guide)
    10. Chrome: skip link, progress bar, back-to-top
    11. Motion
   ========================================================================== */

/* ── 1. Font & tokens ────────────────────────────────────────────────────── */
/* Self-hosted on purpose: loading Google Fonts from a German site sends the
   visitor's IP to Google, which German courts have ruled a GDPR violation. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin-wght.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin-ext-wght.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    /* Brand (from the app) */
    --color-primary: #3A7D44;
    --color-primary-dark: #2C6335;
    --color-primary-deep: #1E4527;
    --color-primary-light: #69B578;
    --color-accent: #8BC34A;
    --color-blue: #0B72BC;
    --color-warning: #ED9B40;
    --color-danger: #D64541;
    --color-success: #3A7D44;

    /* Surfaces & lines */
    --color-bg: #FFFFFF;
    --color-bg-alt: #F5F8F6;
    --color-surface: #FFFFFF;
    --color-tint: #EEF6EF;
    --color-outline: #E1E8E3;
    --color-outline-strong: #CBD6CE;

    /* Text */
    --color-ink: #0F1B14;
    --color-text: #2E3B34;
    --color-text-muted: #56655D;
    --color-text-light: #F8FAF9;

    /* ── Shared foundation (keep identical to vodoro.css) ── */
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: var(--font-body);

    --fs-display: clamp(2.25rem, 1.55rem + 3vw, 3.6rem);
    --fs-h1: clamp(2rem, 1.5rem + 2.2vw, 3rem);
    --fs-h2: clamp(1.7rem, 1.35rem + 1.5vw, 2.4rem);
    --fs-h3: 1.2rem;
    --fs-lead: clamp(1.075rem, 1rem + 0.35vw, 1.25rem);
    --fs-body: 1.0625rem;
    --fs-small: 0.9rem;
    --fs-eyebrow: 0.8rem;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --section-y: clamp(3.75rem, 7vw, 6.5rem);

    --container: 1160px;
    --container-narrow: 760px;
    --gutter: 16px;

    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(15, 27, 20, 0.05), 0 2px 8px rgba(15, 27, 20, 0.04);
    --shadow-md: 0 2px 4px rgba(15, 27, 20, 0.04), 0 12px 32px rgba(15, 27, 20, 0.08);
    --shadow-lg: 0 4px 8px rgba(15, 27, 20, 0.04), 0 28px 64px rgba(15, 27, 20, 0.14);

    --header-height: 68px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
    :root {
        --gutter: 24px;
    }
}

/* ── 2. Base ─────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: var(--color-bg);
    scroll-behavior: smooth;
    /* Anchor targets have to clear the fixed header. */
    scroll-padding-top: calc(var(--header-height) + 1.5rem);
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

@supports (overflow: clip) {

    html,
    body {
        overflow-x: clip;
    }
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'cv11', 'ss01';
}

img,
svg {
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: var(--color-primary);
}

/* Scroll lock while the mobile menu is open — lock the document
   scroller, not the body, so the page cannot jump to the top. */
html.rs-nav-open,
html.rs-nav-open body {
    overflow: hidden;
}

::selection {
    background: rgba(58, 125, 68, 0.22);
    color: var(--color-ink);
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

main {
    padding-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* ── 3. Layout & typography ──────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.content-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.content-tight {
    max-width: 640px;
    margin: 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-ink);
    line-height: 1.2;
    letter-spacing: -0.015em;
    font-weight: 700;
    text-wrap: balance;
}

h3 {
    font-size: var(--fs-h3);
    letter-spacing: -0.01em;
}

p {
    text-wrap: pretty;
}

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

.section--muted {
    background: var(--color-bg-alt);
}

.section--tight-top {
    padding-top: 0;
}

.section--flush-bottom {
    padding-bottom: 0;
}

/* Heading block that opens most sections: eyebrow, title, one sentence. */
.section-head {
    max-width: 680px;
    margin: 0 auto var(--space-7);
    text-align: center;
}

.section-head--left {
    margin-left: 0;
    text-align: left;
}

.section-head p {
    margin-top: var(--space-4);
    color: var(--color-text-muted);
    font-size: var(--fs-lead);
}

/* The eyebrow is a <p> too: without this the rule above turns it into a grey
   lead line, unlike the eyebrows of the heroes and the left-aligned sections. */
.section-head .eyebrow {
    margin-top: 0;
    color: var(--color-primary);
    font-size: var(--fs-eyebrow);
}

.section-title {
    font-size: var(--fs-h2);
    text-align: center;
    margin-bottom: var(--space-6);
}

.section-head .section-title {
    margin-bottom: 0;
}

.section-head--left .section-title,
.section-title--left {
    text-align: left;
}

/* A section title at hero size, for the one message a page leads with */
.section-title--display {
    font-size: var(--fs-display);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.section-title.light {
    color: var(--color-text-light);
}

.section-label,
.eyebrow {
    display: inline-block;
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: var(--space-3);
}

.lead {
    font-size: var(--fs-lead);
    color: var(--color-text-muted);
}

.muted {
    color: var(--color-text-muted);
}

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

.small {
    font-size: var(--fs-small);
}

.mt-5 {
    margin-top: var(--space-5);
}

.mt-6 {
    margin-top: var(--space-6);
}

.stack > * + * {
    margin-top: var(--space-4);
}

.divider {
    border: 0;
    border-top: 1px solid var(--color-outline);
    margin: var(--space-6) 0;
}

/* ── 4. Buttons ──────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.7rem 1.35rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

.btn:active {
    transform: translateY(1px);
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

/* Secondary: quiet, on light backgrounds. */
.btn-secondary,
.btn-ghost,
.btn-outline {
    background: var(--color-surface);
    color: var(--color-ink);
    border-color: var(--color-outline-strong);
}

.btn-secondary:hover,
.btn-ghost:hover,
.btn-outline:hover {
    background: var(--color-bg-alt);
    color: var(--color-ink);
    border-color: var(--color-ink);
}

/* On the dark green CTA band. */
.btn-light {
    background: #fff;
    color: var(--color-primary-deep);
}

.btn-light:hover {
    background: var(--color-tint);
    color: var(--color-primary-deep);
}

.on-dark .btn-outline,
.cta-band .btn-outline,
.cta-panel .btn-outline,
.cta-panel--gradient .btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.on-dark .btn-outline:hover,
.cta-band .btn-outline:hover,
.cta-panel .btn-outline:hover,
.cta-panel--gradient .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

.btn-lg {
    min-height: 52px;
    padding: 0.85rem 1.6rem;
    font-size: 1.05rem;
}

.btn-sm {
    min-height: 38px;
    padding: 0.5rem 1rem;
    font-size: 0.925rem;
}

.btn-block {
    width: 100%;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

.text-link::after {
    content: '→';
    transition: transform 0.2s var(--ease-out);
}

.text-link:hover::after {
    transform: translateX(3px);
}

.button-row,
.hero-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

/* Under left-aligned text the buttons start at the text's edge. */
.button-row--start {
    justify-content: flex-start;
}

/* ── 5. Header ───────────────────────────────────────────────────────────── */
header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-height);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* The translucent blur lives on a pseudo-element, not on the header itself:
   backdrop-filter would make the header a containing block for `position:
   fixed`, which would trap the mobile drawer and its overlay inside a 68px
   strip. This keeps the effect and leaves the drawer viewport-anchored. */
header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    pointer-events: none;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    header::before {
        background: #fff;
    }
}

header.is-scrolled {
    border-bottom-color: var(--color-outline);
    box-shadow: 0 1px 12px rgba(15, 27, 20, 0.05);
}

nav.container {
    /* Wider than the page content: six links, the language switch and two
       buttons do not fit into --container in German. */
    max-width: calc(1280px + 2 * var(--gutter));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    height: 100%;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    color: var(--color-ink);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.logo img {
    width: 40px;
    height: 40px;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-links a {
    display: inline-block;
    padding: 0.5rem 0.6rem;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.975rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
    color: var(--color-ink);
    background: var(--color-bg-alt);
}

.nav-links a.is-active {
    color: var(--color-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Language switch */
.language-selector {
    position: relative;
}

.language-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 40px;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.language-dropdown:hover {
    border-color: var(--color-outline-strong);
    background: var(--color-bg-alt);
}

.language-dropdown svg {
    width: 16px;
    height: 16px;
}

.language-dropdown .chevron {
    width: 12px;
    height: 12px;
    opacity: 0.6;
}

.language-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 170px;
    padding: 0.35rem;
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 1001;
}

.language-dropdown-content.show {
    display: block;
    animation: rsDropIn 0.18s var(--ease-out) both;
}

.language-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 40px;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.95rem;
    text-decoration: none;
}

.language-option:hover {
    background: var(--color-bg-alt);
}

.language-option.active {
    color: var(--color-primary);
    font-weight: 600;
}

.language-option.active::after {
    content: '✓';
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    position: relative;
    z-index: 1002;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mobile-menu-btn span {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-ink);
    transition: transform 0.25s var(--ease-out), opacity 0.2s ease;
}

.mobile-menu-btn span:nth-child(1) { top: 15px; }
.mobile-menu-btn span:nth-child(2) { top: 21px; }
.mobile-menu-btn span:nth-child(3) { top: 27px; }

.mobile-menu-btn.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 27, 20, 0.4);
}

.mobile-overlay.show {
    display: block;
}

/* The full nav (six links, language switch, demo and web-app buttons) needs
   about 1300 px in German; below that it collapses into the menu instead of
   running off the right edge. Keep in step with NAV_COLLAPSE_WIDTH in
   website.js. */
@media (max-width: 1299px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-wrapper {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1001;
        width: min(340px, 86vw);
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-5);
        padding: calc(var(--header-height) + var(--space-4)) var(--space-5) var(--space-6);
        background: var(--color-surface);
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.3s var(--ease-out), visibility 0.3s;
    }

    .nav-wrapper.show {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-links a {
        display: block;
        padding: 0.85rem 0.25rem;
        border-radius: 0;
        border-bottom: 1px solid var(--color-outline);
        font-size: 1.05rem;
    }

    .nav-links a:hover {
        background: none;
    }

    .nav-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .nav-actions .btn {
        width: 100%;
    }

    .language-dropdown {
        width: 100%;
        justify-content: space-between;
    }

    .language-dropdown-content {
        position: static;
        margin-top: var(--space-2);
        box-shadow: none;
    }
}

/* ── 6. Footer ───────────────────────────────────────────────────────────── */
footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-outline);
    color: var(--color-text-muted);
    padding: var(--space-8) 0 var(--space-6);
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (min-width: 960px) {
    .footer-grid {
        grid-template-columns: 1.6fr 1fr 1fr 1fr;
    }

    .footer-brand {
        grid-column: auto;
    }
}

.footer-brand .logo {
    margin-bottom: var(--space-3);
}

.footer-brand p {
    max-width: 320px;
}

.footer-col h2 {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-ink);
    margin-bottom: var(--space-3);
}

.footer-col ul {
    list-style: none;
    display: grid;
    gap: 0.4rem;
}

.footer-col a,
.footer-bottom a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover,
.footer-bottom a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-2) var(--space-5);
    margin-top: var(--space-7);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-outline);
    font-size: var(--fs-small);
}

/* ── 7. Heroes ───────────────────────────────────────────────────────────── */
/* Landing hero: copy on the left, the real app on the right. */
.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
    background:
        radial-gradient(900px 480px at 85% 10%, rgba(139, 195, 74, 0.14), transparent 70%),
        linear-gradient(180deg, var(--color-tint) 0%, var(--color-bg) 100%);
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-7);
    align-items: center;
}

@media (min-width: 900px) {
    .hero__grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: var(--space-8);
    }
}

.hero__title {
    font-size: var(--fs-display);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-5);
}

.hero__lead {
    max-width: 560px;
    font-size: var(--fs-lead);
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

.hero .hero-actions {
    justify-content: flex-start;
}

@media (max-width: 480px) {
    .hero-actions .btn,
    .cta-band .button-row .btn {
        flex: 1 1 100%;
    }
}

.hero__visual {
    display: flex;
    justify-content: center;
}

/* Sub-page hero: centred title and one sentence, no decoration. */
.page-hero {
    padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(180deg, var(--color-tint) 0%, var(--color-bg) 100%);
    text-align: center;
}

.page-hero--compact {
    padding: clamp(2.5rem, 5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.25rem);
}

.page-hero__title {
    max-width: 820px;
    margin: 0 auto var(--space-4);
    font-size: var(--fs-h1);
    letter-spacing: -0.025em;
}

.page-hero__subtitle {
    max-width: 680px;
    margin: 0 auto;
    font-size: var(--fs-lead);
    color: var(--color-text-muted);
}

.page-hero .hero-actions {
    margin-top: var(--space-6);
}

/* One line under the hero buttons pointing organisations to the demo. */
.hero__note {
    margin-top: var(--space-5);
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ── 8. Components ───────────────────────────────────────────────────────── */
/* Phone frame around real app screenshots. Pure CSS, so it scales cleanly. */
.phone {
    position: relative;
    width: min(300px, 76vw);
    aspect-ratio: 390 / 844;
    padding: 10px;
    border-radius: 46px;
    background: #121815;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 2px 6px rgba(15, 27, 20, 0.12),
        0 30px 70px -20px rgba(15, 27, 20, 0.35);
}

.phone img,
.phone__screen {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 36px;
    object-fit: cover;
    object-position: top;
    background: var(--color-bg-alt);
}

.phone--sm {
    width: min(220px, 60vw);
    padding: 7px;
    border-radius: 34px;
}

.phone--sm img,
.phone--sm .phone__screen {
    border-radius: 27px;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: var(--space-5);
}

.card-grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.card-grid--2 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

/* Exactly three across or one below: auto-fit would leave a lone card in a
   second row at tablet widths. A .card--wide inside still takes a full row. */
.card-grid--trio {
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .card-grid--trio {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.card h3 {
    margin-bottom: var(--space-2);
}

.card p + p {
    margin-top: var(--space-3);
}

.card--link {
    display: flex;
    color: inherit;
    text-decoration: none;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease-out);
}

.card--link:hover {
    border-color: var(--color-outline-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card--link .text-link {
    margin-top: auto;
    padding-top: var(--space-4);
}

/* Spans the whole grid row and reads as the lead card of the group */
.card--wide {
    grid-column: 1 / -1;
    border-color: var(--color-primary);
}

.card--wide h3 {
    font-size: var(--fs-h2);
}

.card--wide p {
    font-size: var(--fs-lead);
    max-width: 60ch;
}

/* Detour animation (website/_detour_demo.html), after the promo video.
   Sizes are in container units of the 870 px wide video frame, so the
   graphic scales as one piece from a phone card to a desktop column. */
.detour-demo {
    container-type: inline-size;
    display: grid;
    gap: var(--space-3);
    width: 100%;
    max-width: 520px;   /* stacked under the text on tablets it would fill the card */
    justify-self: center;
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-tint) 100%);
}

.detour-demo__setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3cqw;
    padding: 3cqw 4cqw;
    border-radius: 4cqw;
    background: var(--color-surface);
    box-shadow: 0 2cqw 6cqw rgba(15, 27, 20, 0.10);
}

.detour-demo__label {
    font-size: clamp(0.75rem, 4.1cqw, 1.15rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-ink);
}

.detour-demo__stepper {
    display: flex;
    align-items: center;
    gap: 2.5cqw;
    flex-shrink: 0;
}

.detour-demo__btn {
    width: 8.7cqw;
    height: 8.7cqw;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 6cqw;
    font-weight: 600;
    line-height: 1;
    color: var(--color-text-muted);
    background: #E5ECE7;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.detour-demo__btn--primary {
    color: #FFFFFF;
    background: var(--color-primary);
}

.detour-demo__btn--primary.is-pressed {
    background: #254D32;
    transform: scale(0.88);
    box-shadow: 0 0 0 1.4cqw rgba(139, 195, 74, 0.35);
}

.detour-demo__minutes {
    min-width: 21cqw;
    font-size: 6cqw;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
    color: #254D32;
}

.detour-demo__map {
    position: relative;
    border-radius: 4.6cqw;
    overflow: hidden;
    box-shadow: 0 2.8cqw 8cqw rgba(15, 27, 20, 0.14);
}

.detour-demo__map svg {
    display: block;
    width: 100%;
    height: auto;
}

.detour-demo__map text {
    font-family: var(--font-body);
}

.detour-demo__verdict {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 1.6cqw;
    padding: 1.8cqw 3cqw 1.8cqw 1.8cqw;
    border-radius: 999px;
    background: #FFFFFF;
    box-shadow: 0 1.6cqw 4cqw rgba(15, 27, 20, 0.20);
    font-size: 3.9cqw;
    font-weight: 600;
    white-space: nowrap;
    transform-origin: left center;
}

/* On the narrowest phones the frame is ~220 px wide and the scaled labels
   would drop below 9 px; hold them at a readable minimum instead. */
@container (max-width: 300px) {
    .detour-demo__verdict {
        font-size: 10px;
        gap: 4px;
        padding: 4px 8px 4px 4px;
    }

    .detour-demo .detour-demo__verdict svg {
        width: 13px;
        height: 13px;
    }

    .detour-demo__map text {
        font-size: 40px;
    }

    /* At this size the declined label would run past the right edge. */
    .detour-demo .detour-demo__verdict--no {
        left: auto;
        right: 2%;
        top: 83%;
    }
}

.detour-demo__verdict svg {
    width: 5cqw;
    height: 5cqw;
    flex-shrink: 0;
}

.detour-demo__verdict b {
    font-weight: 800;
}

.detour-demo__verdict--ok {
    left: 46%;      /* the pickup that fits: x 400, y 310 of 870 x 680 */
    top: 45.6%;
    color: #254D32;
}

.detour-demo__verdict--ok span {
    color: var(--color-primary);
}

.detour-demo__verdict--no {
    left: 43.7%;    /* under the far pickup: x 380, y 596 */
    top: 87.6%;
}

.detour-demo__verdict--no,
.detour-demo__verdict--no span {
    color: #C2410C;
}

.card--flat {
    box-shadow: none;
    background: var(--color-bg-alt);
    border-color: transparent;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: var(--space-4);
    border-radius: 12px;
    background: var(--color-tint);
    color: var(--color-primary);
}

.text-center .feature-icon,
.feature-icon--center {
    margin-left: auto;
    margin-right: auto;
}

.feature-icon__svg,
.feature-icon svg {
    width: 24px;
    height: 24px;
}

/* Icon + text rows (feature lists, values) */
.feature-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6) var(--space-7);
    max-width: 960px;
    margin: 0 auto;
}

@media (min-width: 720px) {
    .feature-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
}

.feature .feature-icon {
    flex-shrink: 0;
    margin-bottom: 0;
}

.feature h3 {
    margin-bottom: var(--space-1);
}

.feature p {
    color: var(--color-text-muted);
}

/* Numbered steps with a screenshot each */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: var(--space-5);
    counter-reset: step;
    list-style: none;
}

.step {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.step__body {
    padding: var(--space-6) var(--space-6) var(--space-5);
}

.step__num {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: var(--space-4);
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.step h3 {
    margin-bottom: var(--space-2);
}

.step p {
    color: var(--color-text-muted);
}

.step__shot {
    margin-top: auto;
    height: 260px;
    padding: var(--space-5) var(--space-5) 0;
    background: var(--color-bg-alt);
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.step__shot .phone {
    width: 210px;
    padding: 7px;
    border-radius: 32px 32px 0 0;
    aspect-ratio: auto;
    height: 330px;
    box-shadow: 0 10px 30px -12px rgba(15, 27, 20, 0.35);
}

.step__shot .phone img {
    border-radius: 25px 25px 0 0;
}

/* Simple numbered list (company onboarding, install steps) */
.numbered {
    display: grid;
    gap: var(--space-5);
    list-style: none;
    counter-reset: numbered;
}

.numbered > li {
    position: relative;
    padding-left: 3.25rem;
    counter-increment: numbered;
}

.numbered > li::before {
    content: counter(numbered);
    position: absolute;
    left: 0;
    top: -2px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-tint);
    color: var(--color-primary);
    font-weight: 700;
}

.numbered h3 {
    margin-bottom: var(--space-1);
}

.numbered p {
    color: var(--color-text-muted);
}

/* Split layout: text beside a visual */
.split {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-7);
    align-items: center;
}

@media (min-width: 900px) {
    .split {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }
}

.split__visual {
    display: flex;
    justify-content: center;
}

/* Feature rows stacked under a split heading */
.feature-stack {
    display: grid;
    gap: var(--space-5);
    margin-top: var(--space-6);
}

.feature .text-link {
    margin-top: var(--space-2);
}

.feature .text-link + .text-link {
    margin-left: var(--space-4);
}

.split-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: var(--space-7);
    align-items: start;
}

/* FAQ — native <details>, no script needed */
.faq {
    max-width: var(--container-narrow);
    margin: 0 auto;
    border-top: 1px solid var(--color-outline);
}

.faq details {
    border-bottom: 1px solid var(--color-outline);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5) 0;
    color: var(--color-ink);
    font-size: 1.075rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '';
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
    opacity: 0.55;
    transition: transform 0.25s var(--ease-out);
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq summary:hover {
    color: var(--color-primary);
}

.faq details p {
    padding: 0 var(--space-7) var(--space-5) 0;
    color: var(--color-text-muted);
}

/* Closing call to action */
.cta-band,
.cta-panel,
.cta-panel--gradient {
    position: relative;
    overflow: hidden;
    padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 4rem);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(600px 300px at 90% 0%, rgba(139, 195, 74, 0.22), transparent 70%),
        var(--color-primary-deep);
    color: var(--color-text-light);
    text-align: center;
}

.cta-band h2,
.cta-panel h2,
.cta-panel--gradient h2 {
    color: #fff;
    font-size: var(--fs-h2);
    margin-bottom: var(--space-3);
}

.cta-band p,
.cta-panel p,
.cta-panel--gradient p {
    max-width: 560px;
    margin: 0 auto var(--space-6);
    color: rgba(248, 250, 249, 0.82);
    font-size: var(--fs-lead);
}

/* Real usage numbers (about page) */
.stats-bar {
    padding: var(--space-6) 0;
    border-bottom: 1px solid var(--color-outline);
}

.stats-bar__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
    text-align: center;
}

@media (min-width: 760px) {
    .stats-bar__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stats-bar__number {
    display: block;
    color: var(--color-ink);
    font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stats-bar__label {
    display: block;
    margin-top: var(--space-1);
    color: var(--color-text-muted);
    font-size: var(--fs-small);
}

.stats-bar__disclaimer {
    margin-top: var(--space-5);
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Pricing table (company page) */
.price-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-variant-numeric: tabular-nums;
}

.price-table th,
.price-table td {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    border-bottom: 1px solid var(--color-outline);
}

.price-table thead th {
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    font-weight: 600;
}

.price-table tbody tr:last-child td {
    border-bottom: 0;
}

.price-table td:last-child,
.price-table th:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--color-ink);
}

.price-note {
    margin-top: var(--space-3);
    color: var(--color-text-muted);
    font-size: var(--fs-small);
}

/* Founding-partner offer box in the pricing section (_founding_offer.html). */
.offer-card + .text-link {
    margin-top: var(--space-4);
}


.offer-card {
    margin-top: var(--space-5);
    padding: var(--space-6);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(420px 200px at 100% 0%, rgba(139, 195, 74, 0.18), transparent 70%),
        var(--color-tint);
    box-shadow: var(--shadow-md);
}

.offer-card__tag {
    display: inline-block;
    margin-bottom: var(--space-3);
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: #fff;
    font-size: var(--fs-eyebrow);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.offer-card__title {
    margin-bottom: var(--space-3);
    color: var(--color-ink);
}

.offer-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.6rem;
    margin-bottom: var(--space-4);
    font-variant-numeric: tabular-nums;
}

.offer-card__new {
    color: var(--color-primary-dark);
    font-size: clamp(1.9rem, 1.6rem + 1.2vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.offer-card__old {
    color: var(--color-text-muted);
    font-size: 1.15rem;
    font-weight: 600;
}

.offer-card__unit {
    color: var(--color-text);
    font-size: var(--fs-small);
}

.offer-card__list {
    margin: 0 0 var(--space-5);
    padding: 0;
    list-style: none;
}

.offer-card__list li {
    position: relative;
    padding-left: 1.6rem;
    color: var(--color-text);
    font-size: var(--fs-small);
}

.offer-card__list li + li {
    margin-top: var(--space-2);
}

.offer-card__list li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.35em;
    width: 0.9rem;
    height: 0.5rem;
    border-left: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    transform: rotate(-45deg);
}

/* The button may wrap, so its label never widens the pricing column. */
.offer-card .btn {
    white-space: normal;
    text-align: center;
}

@media (max-width: 480px) {
    .offer-card {
        padding: var(--space-5);
    }

    .offer-card .btn {
        width: 100%;
    }
}

.cta-band .cta-band__offer {
    margin-top: calc(-1 * var(--space-4));
    color: #fff;
    font-size: var(--fs-small);
    font-weight: 600;
}

/* Text for screen readers only. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.stat-highlight {
    display: inline-block;
    margin-top: var(--space-4);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--color-tint);
    color: var(--color-primary-dark);
    font-size: var(--fs-small);
    font-weight: 600;
}

/* Forms */
.form-card {
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: var(--space-5);
}

label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--color-ink);
    font-size: 0.95rem;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    min-height: 46px;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--color-outline-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-ink);
    font: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(58, 125, 68, 0.16);
    outline: none;
}

/* Alerts */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
    border: 1px solid transparent;
}

.alert--success {
    background: #EEF7EF;
    border-color: #C6E2CA;
    color: #1E4527;
}

.alert--error {
    background: #FDF0EF;
    border-color: #F3C9C6;
    color: #7A1F1B;
}

.alert--info {
    background: var(--color-bg-alt);
    border-color: var(--color-outline);
    color: var(--color-text);
}

.alert.content-narrow {
    margin-bottom: var(--space-7);
}

.alert--warning {
    background: #FDF5EA;
    border-color: #F2D6B0;
    color: #6B4410;
}

.alert__title {
    display: block;
    margin-bottom: var(--space-1);
    color: inherit;
    font-size: 1rem;
}

.info-list {
    display: grid;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

/* Icon + label + value rows (contact details) */
.info-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.info-row__icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--color-tint);
    color: var(--color-primary);
}

.info-row__icon svg {
    width: 20px;
    height: 20px;
}

.info-row__body {
    flex: 1;
    min-width: 0;
}

.info-row__label {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.info-row__value {
    color: var(--color-ink);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.info-row__value a {
    color: var(--color-primary);
    text-decoration: none;
}

.info-row__value a:hover {
    text-decoration: underline;
}

/* Compact icon list (account welcome page) */
.icon-list {
    display: grid;
    gap: var(--space-5);
    margin-top: var(--space-6);
    list-style: none;
}

.card .section-title {
    font-size: 1.4rem;
    margin-bottom: var(--space-2);
}

.card .button-row {
    margin-top: var(--space-5);
}

.account-thanks {
    margin-top: var(--space-6);
}

.icon-list .feature-icon {
    width: 44px;
    height: 44px;
}

.icon-list h3 {
    font-size: 1.05rem;
}

.icon-list p {
    font-size: 0.95rem;
}

/* Long-form documents (legal) */
.doc {
    max-width: 820px;
    margin: 0 auto;
    background: var(--color-surface);
    padding: clamp(1.5rem, 5vw, 3rem);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow-wrap: break-word;
}

.doc h1,
.doc h2,
.doc h3,
.doc h4 {
    margin-top: 1.8rem;
    margin-bottom: 0.7rem;
}

.doc h2 {
    font-size: 1.4rem;
}

.doc h3 {
    font-size: 1.15rem;
}

.doc p,
.doc li {
    color: var(--color-text);
    line-height: 1.7;
}

.doc p + p {
    margin-top: 0.75rem;
}

.doc ul,
.doc ol {
    padding-left: 1.4rem;
    margin: 0.75rem 0;
}

.doc a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* A contact panel at the end of a legal page. */
.doc .cta-panel h3 {
    margin-top: 0;
    font-size: 1.4rem;
    color: #fff;
}

.doc .cta-panel p {
    color: rgba(248, 250, 249, 0.82);
    font-size: 1rem;
}

/* Savings calculator (landing page, website/_savings_calculator.html) */
.savings {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: var(--space-5);
    align-items: start;
}

.savings__form,
.savings__result {
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.25rem, 3vw, 2rem);
    min-width: 0;
}

.savings__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.savings__form fieldset {
    border: 0;
    min-width: 0;
}

.savings__form legend {
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: var(--space-2);
}

.savings__hint {
    font-size: var(--fs-small);
    color: var(--color-text-muted);
}

.savings__pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.savings__pill {
    position: relative;
}

.savings__pill input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.savings__pill span {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4em;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--color-outline-strong);
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-ink);
    cursor: pointer;
    line-height: 1.3;
}

.savings__pill span em {
    font-style: normal;
    font-weight: 400;
    color: var(--color-text-muted);
}

.savings__pill input:checked + span {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-light);
}

.savings__pill input:checked + span em {
    color: var(--color-text-light);
}

.savings__pill input:focus-visible + span {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.savings__fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    gap: var(--space-4);
}

.savings__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--color-ink);
}

.savings__field--km {
    margin-top: var(--space-3);
    max-width: 14rem;
}

.savings__field input {
    font: inherit;
    font-weight: 400;
    font-size: 1rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-outline-strong);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--color-ink);
    width: 100%;
}

.savings__result {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.savings__label {
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--color-text-muted);
}

.savings__hero {
    font-size: clamp(2.6rem, 2rem + 3vw, 3.6rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--color-primary);
}

.savings__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: var(--space-3);
}

.savings__grid > div {
    background: var(--color-tint);
    border-radius: var(--radius);
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 2px;
}

/* Three tiles need 444px in a row. Below that they wrap two and one; the
   last one then takes the whole row instead of leaving a hole beside it. */
.savings__result {
    container-type: inline-size;
}

@container (min-width: 292px) and (max-width: 443.98px) {
    .savings__grid > div:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

.savings__grid dt {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.35;
}

.savings__grid dd {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-ink);
}

.savings__trees p,
.savings__parking {
    color: var(--color-text);
}

.savings__trees b,
.savings__parking b {
    font-size: 1.3rem;
    color: var(--color-primary);
}

.savings__forest {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    margin-top: var(--space-2);
    color: var(--color-primary-light);
}

.savings__forest svg {
    width: 18px;
    height: 18px;
}

.savings__forest-more {
    margin-left: var(--space-2);
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--color-text-muted);
}

.savings__result .btn {
    align-self: flex-start;
}

.savings__method {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-outline);
    padding-top: var(--space-3);
}

@media (max-width: 860px) {
    .savings {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ── 8a. Benefits & app showcase ─────────────────────────────────────────── */
/* Four short benefits in one white bar that overlaps the end of the hero, so
   the first screen already says why Vodoro: wraps to 2×2 and then 1 column. */
.benefit-bar {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: var(--space-5);
    margin-top: calc(-1 * clamp(1.5rem, 4vw, 3rem));
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    padding: var(--space-5);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
    list-style: none;
}

.benefit-bar li {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
}

.benefit-bar .feature-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    margin: 0;
}

.benefit-bar strong {
    display: block;
    color: var(--color-ink);
    font-size: 1rem;
    line-height: 1.3;
}

.benefit-bar span {
    display: block;
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: 1.45;
}

/* Benefit cards above a showcase: icon, a title that is the benefit, one line. */
.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-7);
}

.benefit {
    padding: var(--space-5);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.benefit .feature-icon {
    width: 42px;
    height: 42px;
}

.benefit h3 {
    margin-bottom: var(--space-2);
    font-size: 1.075rem;
}

.benefit p {
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: 1.55;
}

/* App showcase: real screens to swipe through. A scroll-snap track, so it
   works by touch, trackpad and keyboard without JS; website.js adds the
   arrows and dots and hides them when every screen already fits. */
.showcase {
    position: relative;
    padding: var(--space-6) 0 var(--space-5);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(700px 360px at 80% 0%, rgba(139, 195, 74, 0.16), transparent 70%),
        var(--color-tint);
}

.section--muted .showcase {
    background:
        radial-gradient(700px 360px at 20% 0%, rgba(139, 195, 74, 0.18), transparent 70%),
        #E6F1E8;
}

.showcase__track {
    display: flex;
    gap: clamp(1rem, 2.5vw, 2rem);
    padding: var(--space-2) var(--space-5) var(--space-4);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--space-5);
    scrollbar-width: none;
    list-style: none;
}

.showcase__track::-webkit-scrollbar {
    display: none;
}

.showcase__track:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

/* Centre the screens when they all fit (set by website.js). */
.showcase.is-static .showcase__track {
    justify-content: center;
}

.showcase__slide {
    flex: 0 0 auto;
    width: min(250px, 68vw);
    scroll-snap-align: start;
}

.showcase__slide .phone {
    width: 100%;
    padding: 8px;
    border-radius: 38px;
}

.showcase__slide .phone img {
    border-radius: 30px;
}

.showcase__slide figcaption {
    margin-top: var(--space-4);
    padding: 0 var(--space-1);
}

.showcase__slide figcaption strong {
    display: block;
    color: var(--color-ink);
    font-size: 1rem;
}

.showcase__slide figcaption span {
    display: block;
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: 1.5;
}

/* A story told screen by screen: each caption starts with its number. */
.showcase__slide figcaption .showcase__step {
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0 0.45rem 0 0;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: 0.05em;
}

ol.showcase__track {
    list-style: none;
}

/* A document page among the phones (the CO₂ report): as high as a phone
   would be, the sheet centred in it. */
.showcase__slide--paper {
    width: min(300px, 78vw);
}

.paper {
    display: grid;
    place-items: center;
    height: calc(min(250px, 68vw) * 844 / 390);
}

.paper img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--color-outline);
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.showcase__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-2);
}

.showcase.is-static .showcase__controls {
    display: none;
}

.showcase__btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-outline-strong);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-primary);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}

.showcase__btn:hover {
    border-color: var(--color-primary);
}

.showcase__btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.showcase__btn svg {
    width: 20px;
    height: 20px;
}

.showcase__dots {
    display: flex;
    gap: var(--space-2);
}

.showcase__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--color-outline-strong);
    cursor: pointer;
    transition: width 0.25s var(--ease-out), background 0.25s;
}

.showcase__dot[aria-current="true"] {
    width: 24px;
    background: var(--color-primary);
}

/* "App screens with sample data": the names and figures are made up. */
.showcase-note {
    margin-top: var(--space-3);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* Two doors for organisations under the community sections. */
.org-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: var(--space-5);
}

.org-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    background: var(--color-primary-deep);
    color: var(--color-text-light);
}

.org-card h3 {
    color: #fff;
    font-size: 1.35rem;
}

.org-card p {
    color: rgba(248, 250, 249, 0.82);
}

.org-card .feature-icon {
    margin: 0;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.org-card .button-row {
    justify-content: flex-start;
    margin-top: auto;
    padding-top: var(--space-3);
}

/* ── 9. Page-specific blocks ─────────────────────────────────────────────── */
/* Download: platform cards */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: var(--space-5);
}

/* The pre-launch note follows the platforms, so the web app comes first. */
.platform-grid + .alert {
    margin-top: var(--space-6);
}

.platform-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-6);
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.platform-card--primary {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md);
}

.platform-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.platform-card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--color-bg-alt);
    color: var(--color-ink);
}

.platform-card__icon svg {
    width: 26px;
    height: 26px;
}

.platform-card h3 {
    font-size: 1.25rem;
}

.platform-card p {
    color: var(--color-text-muted);
    font-size: 0.975rem;
}

.platform-card .btn,
.platform-card__soon {
    width: 100%;
    margin-top: auto;
}

.platform-card__soon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px dashed var(--color-outline-strong);
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.platform-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.9rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.badge--success {
    background: var(--color-tint);
    color: var(--color-primary-dark);
}

/* "Install the web app": two short step lists, Android beside iPhone. */
.install-web {
    max-width: 960px;
    margin: var(--space-8) auto 0;
}

.install-web .section-title {
    margin-bottom: var(--space-4);
}

.install-web__lead {
    max-width: 680px;
    margin: 0 auto var(--space-6);
    color: var(--color-text-muted);
    font-size: var(--fs-lead);
    text-align: center;
}

.install-web .card h3 {
    margin-bottom: var(--space-4);
}

.install-web .button-row {
    margin-top: var(--space-6);
    justify-content: center;
}

/* Route pages (website/routes.py): the list of routes and its figures. */
.route-list {
    list-style: none;
}

.route-list .card {
    height: 100%;
}

.route-list h2 {
    margin-bottom: var(--space-1);
    font-size: var(--fs-h3);
}

.route-list__saving {
    margin-top: var(--space-3);
    color: var(--color-text);
}

.route-list__saving b {
    color: var(--color-primary);
    font-size: 1.5rem;
}

.route-list__note {
    margin-top: var(--space-6);
    color: var(--color-text-muted);
    text-align: center;
}

.page-hero .eyebrow a {
    color: inherit;
    text-decoration: none;
}

.page-hero .eyebrow a:hover {
    text-decoration: underline;
}

/* The worked example of the savings calculator on the landing page. */
.savings-example__lead {
    margin-bottom: var(--space-5);
    color: var(--color-text-muted);
    font-size: var(--fs-lead);
}

.install-block {
    max-width: var(--container-narrow);
    margin: var(--space-7) auto 0;
}

.install-block h3 {
    margin-bottom: var(--space-4);
}

.checksum {
    margin-top: var(--space-5);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.checksum code {
    display: block;
    margin-top: 0.35rem;
    padding: 0.6rem 0.75rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-sm);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    word-break: break-all;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: var(--space-3) var(--space-5);
    max-width: 860px;
    margin: 0 auto;
    list-style: none;
}

.check-grid li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 500;
    color: var(--color-ink);
}

.check-grid svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    align-items: start;
}

@media (min-width: 860px) {
    .contact-grid {
        grid-template-columns: 0.8fr 1.2fr;
        gap: var(--space-7);
    }
}

.contact-info {
    display: grid;
    gap: var(--space-5);
}

.contact-info h2,
.form-card h2 {
    font-size: 1.35rem;
}

.form-intro {
    margin: var(--space-2) 0 var(--space-6);
}

.form-note {
    margin-bottom: var(--space-5);
}

/* About: vision statement */
.vision-quote {
    max-width: 820px;
    margin: 0 auto;
    color: var(--color-ink);
    font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.7rem);
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: -0.01em;
    text-align: center;
    text-wrap: balance;
}

/* User guide (rendered Markdown) */
.guide-layout {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.guide-container {
    color: var(--color-text);
    line-height: 1.7;
    overflow-wrap: break-word;
}

.guide-container h1 {
    font-size: var(--fs-h1);
    margin-bottom: var(--space-4);
}

.guide-container h2 {
    font-size: 1.5rem;
    margin-top: var(--space-7);
    margin-bottom: var(--space-3);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-outline);
}

.guide-container h3 {
    font-size: 1.15rem;
    margin-top: var(--space-5);
    margin-bottom: var(--space-2);
}

.guide-container p,
.guide-container ul,
.guide-container ol {
    margin-bottom: var(--space-3);
}

.guide-container ul,
.guide-container ol {
    padding-left: 1.4rem;
}

.guide-container li {
    margin-bottom: 0.35rem;
}

.guide-container table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: var(--space-4) 0;
}

.guide-container th,
.guide-container td {
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--color-outline);
    text-align: left;
}

.guide-container th {
    background: var(--color-bg-alt);
    font-weight: 600;
}

.guide-container strong {
    color: var(--color-ink);
}

.guide-container hr {
    display: none;
}

.guide-container a {
    color: var(--color-primary);
    text-decoration: none;
}

.guide-container a:hover {
    text-decoration: underline;
}

.guide-container code {
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    background: var(--color-bg-alt);
    font-size: 0.9em;
}

/* ── 9a. AI assistant widget ─────────────────────────────────────────────── */
/* The widget itself is in assistant.css, shared with ai.vodoro.de. This only
   maps its colour variables onto this site's light green palette. */
.vd-assist-launcher,
.vd-assist-panel {
    --vd-assist-surface: var(--color-surface);
    --vd-assist-surface-2: var(--color-bg-alt);
    --vd-assist-surface-3: var(--color-tint);
    --vd-assist-field: var(--color-surface);
    --vd-assist-line: var(--color-outline);
    --vd-assist-line-strong: var(--color-outline-strong);
    --vd-assist-text: var(--color-text);
    --vd-assist-text-strong: var(--color-ink);
    --vd-assist-muted: var(--color-text-muted);
    --vd-assist-faint: var(--color-text-muted);
    --vd-assist-accent: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    --vd-assist-on-accent: #fff;
    --vd-assist-link: var(--color-primary-dark);
    --vd-assist-focus: var(--color-primary);
    --vd-assist-focus-ring: rgba(58, 125, 68, 0.2);
    --vd-assist-error: var(--color-danger);
    --vd-assist-shadow: var(--shadow-md);
    --vd-assist-shadow-lg: var(--shadow-lg);
    /* Above the header (1000) and the mobile nav (1001-1002), below the
       reading progress bar and the skip link. */
    --vd-assist-z: 1100;
}

/* ── 9b. Demo booking (/demo/) ───────────────────────────────────────────── */
/* The form is a Nextcloud page on cloud.vodoro.net in an iframe. It cannot
   report its height across origins, so the frame has a fixed height that
   fits the calendar plus the form, and the page inside scrolls if it needs
   more. On a phone it stays shorter than the screen, so there is always some
   page around it to swipe on: a frame that fills the screen traps the swipe
   (the form's own scroll fix is in its "Stil überschreiben" block).
   A white card on the muted section, as the corporate design asks; the page
   inside is white too, through the Appointments setting "Stil überschreiben"
   (vodoro-business README > Call booking). */

.booking-frame {
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.booking-frame iframe {
    display: block;
    width: 100%;
    height: 700px;
    height: min(700px, calc(100svh - 5rem));
    min-height: 460px;
    border: 0;
}

.booking-note {
    margin-top: var(--space-4);
    font-size: 0.95rem;
}

.contact-info .booking-cta {
    margin-top: var(--space-4);
}

/* ── 10. Chrome ──────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -120px;
    z-index: 1300;
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-sm);
    background: var(--color-ink);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

.scroll-progress {
    position: fixed;
    inset: 0 0 auto 0;
    height: 2px;
    z-index: 1200;
    background: var(--color-primary);
    transform: scaleX(var(--rs-progress, 0));
    transform-origin: 0 50%;
    pointer-events: none;
}

.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1150;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-outline);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-ink);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s var(--ease-out), visibility 0.25s;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.back-to-top:hover {
    border-color: var(--color-outline-strong);
}

html.rs-nav-open .back-to-top {
    opacity: 0;
    visibility: hidden;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

@media (min-width: 768px) {
    .back-to-top {
        right: 1.5rem;
        bottom: 1.5rem;
    }
}

/* ── 10a. Page structure ─────────────────────────────────────────────────── */
/* A row of pill links (the other routes on a route page): scrolls sideways
   on a phone unless it is the wrapping kind. */
.page-nav {
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.page-nav ul {
    display: flex;
    gap: var(--space-2);
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    padding-block: 2px;
}

.page-nav ul::-webkit-scrollbar {
    display: none;
}

.page-nav li {
    flex: 0 0 auto;
}

.page-nav li:first-child {
    margin-left: auto;
}

.page-nav li:last-child {
    margin-right: auto;
}

/* A handful of links that may simply wrap (the other routes of a route page). */
.page-nav--wrap ul {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
}

.page-nav--wrap li:first-child,
.page-nav--wrap li:last-child {
    margin: 0;
}

.page-nav a {
    display: block;
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: var(--fs-small);
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.page-nav a:hover,
.page-nav a:focus-visible {
    border-color: var(--color-primary);
    background: var(--color-tint);
    color: var(--color-primary-dark);
}

/* Audience switch under the landing hero: four doors, the rider's first. */
.audience {
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.audience__title {
    margin-bottom: var(--space-5);
    font-size: 1.35rem;
    text-align: center;
}

.audience__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: var(--space-4);
    list-style: none;
}

.audience__card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--space-3);
    row-gap: var(--space-2);
    align-items: center;
    height: 100%;
    padding: var(--space-5);
    padding-right: calc(var(--space-5) + 28px);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease-out);
}

.audience__card:hover,
.audience__card:focus-visible {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.audience__card--primary {
    border-color: var(--color-primary);
    background: var(--color-tint);
}

.audience__card--primary .feature-icon {
    background: var(--color-surface);
}

.audience__card .feature-icon {
    width: 40px;
    height: 40px;
    margin: 0;
}

.audience__card strong {
    color: var(--color-ink);
    font-size: 1.05rem;
    line-height: 1.3;
}

.audience__text {
    grid-column: 1 / -1;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: 1.5;
}

.audience__arrow {
    position: absolute;
    top: var(--space-5);
    right: var(--space-5);
    width: 20px;
    height: 20px;
    margin-top: 10px;
    color: var(--color-primary);
}

/* Cards side by side share their two rows (title, text), so a title that
   wraps to three lines does not push its text below the neighbours'. */
@supports (grid-template-rows: subgrid) {
    .audience__grid > li,
    .audience__card {
        grid-row: span 2;
        grid-template-rows: subgrid;
    }

    .audience__grid > li {
        display: grid;
        row-gap: 0;
    }

    .audience__text {
        align-self: start;
    }
}

/* Tabs (the examples on the landing page). The tabs are anchors to their
   panels, so with no script every panel shows and the links still jump;
   website.js (initTabs) sets .is-tabbed and then shows one panel at a time. */
.tabs__list {
    display: flex;
    gap: var(--space-1);
    width: fit-content;
    max-width: 100%;
    margin: 0 auto var(--space-3);
    padding: var(--space-1);
    overflow-x: auto;
    scrollbar-width: none;
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-pill);
    background: var(--color-bg-alt);
}

.tabs__list::-webkit-scrollbar {
    display: none;
}

.tabs__tab {
    flex: 0 0 auto;
    padding: 0.6rem 1.15rem;
    border-radius: var(--radius-pill);
    color: var(--color-text);
    font-size: 0.975rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tabs__tab:hover {
    color: var(--color-primary-dark);
}

.tabs__tab[aria-selected="true"] {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

/* The benefits follow the screens they are about. */
.showcase-note + .benefit-grid,
.tabs__intro + .benefit-grid {
    margin: var(--space-6) 0 0;
}

/* A tab's screens sit right under the tab row, so they read as its content
   (the panel's title and lead follow the screens). website.js scrolls the
   row right under the header when a tab is chosen; the phone is then as
   high as the window allows, so the row, the screen and its caption fit
   together: what is left after the header, the tab row and a caption of
   about five lines. The caption keeps the slide's width. */
.tabs .showcase {
    padding-top: var(--space-2);
}

.tabs .showcase__slide figcaption {
    margin-top: var(--space-3);
}

.tabs .showcase__slide .phone {
    --phone-fit: calc((100vh - 330px) * 390 / 844 + 16px);
    width: min(100%, max(170px, var(--phone-fit)));
    margin-inline: auto;
}

@supports (height: 100svh) {
    .tabs .showcase__slide .phone {
        --phone-fit: calc((100svh - 330px) * 390 / 844 + 16px);
    }
}

.tabs__intro {
    max-width: 44rem;
    margin: var(--space-6) auto 0;
    text-align: center;
}

.tabs__intro p {
    margin-top: var(--space-2);
    color: var(--color-text-muted);
}

.tabs__panel + .tabs__panel {
    margin-top: var(--section-y);
}

.tabs.is-tabbed .tabs__panel {
    margin-top: 0;
}

.tabs__panel[hidden] {
    display: none;
}

/* Three short points in one row once there is room for them. */
@media (min-width: 960px) {
    .feature-list--trio {
        grid-template-columns: repeat(3, 1fr);
        max-width: none;
        gap: var(--space-6);
    }
}

/* A split whose columns start at the same height (price table beside the
   steps); the shorter column stays in view while the longer one scrolls. */
.split--top {
    align-items: start;
}

@media (min-width: 900px) {
    .split--top > :last-child {
        position: sticky;
        top: calc(var(--header-height) + var(--space-5));
    }

    /* Its heading lines up with the one on the left, which has an eyebrow. */
    .split--top > :first-child:has(> .eyebrow) + :last-child {
        padding-top: calc(var(--fs-eyebrow) * 1.6 + var(--space-3));
    }
}

/* Phones: the same content in less height. Cards put their icon beside the
   title, the three steps show their screen beside the text, and the footer
   lists sit in two columns. */
@media (max-width: 639px) {
    :root {
        --section-y: 3rem;
    }

    .section-head {
        margin-bottom: var(--space-6);
    }

    .tabs__tab {
        padding: 0.55rem 0.9rem;
        font-size: var(--fs-small);
    }

    .card {
        padding: var(--space-5);
    }

    .card:has(> .feature-icon),
    .benefit:has(> .feature-icon) {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: var(--space-3);
        align-items: center;
    }

    .card > .feature-icon,
    .benefit > .feature-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0;
    }

    .card > .feature-icon + h3,
    .benefit > .feature-icon + h3 {
        margin-bottom: 0;
    }

    .card:has(> .feature-icon) > :not(.feature-icon, .feature-icon + h3),
    .benefit:has(> .feature-icon) > :not(.feature-icon, .feature-icon + h3) {
        grid-column: 1 / -1;
        margin-top: var(--space-3);
    }

    .benefit-grid {
        gap: var(--space-3);
        margin-bottom: var(--space-6);
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-6) var(--space-5);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    footer {
        padding-top: var(--space-7);
    }
}

/* Below 360 px the text column beside the screen would hold two words a line,
   so the steps stay stacked there. */
@media (min-width: 360px) and (max-width: 639px) {
    .step {
        flex-direction: row;
    }

    .step__body {
        flex: 1 1 0;
        min-width: 0;
        padding: var(--space-5);
    }

    .step__num {
        margin-bottom: var(--space-3);
    }

    .step__shot {
        flex: 0 0 132px;
        height: auto;
        min-height: 200px;
        margin-top: 0;
        padding: var(--space-4) var(--space-3) 0;
        align-items: flex-start;
    }

    .step__shot .phone {
        width: 108px;
        height: auto;
        aspect-ratio: 390 / 844;
        padding: 4px;
        border-radius: 18px;
    }

    .step__shot .phone img {
        border-radius: 14px;
    }
}

/* ── 11. Motion ──────────────────────────────────────────────────────────── */
/* Hidden only when JS is running, so a failed or blocked script can never
   leave the page blank. website.js feeds --reveal-delay to stagger grids. */
.rs-js .reveal {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    transition:
        opacity 0.6s var(--ease-out) var(--reveal-delay, 0ms),
        transform 0.6s var(--ease-out) var(--reveal-delay, 0ms);
}

.rs-js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@keyframes rsDropIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .rs-js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
