/* ============================================================
   EHBO Training — refined design system
   ============================================================ */

:root {
    --ehbo-bg: #f6f7fb;
    --ehbo-surface: #ffffff;
    --ehbo-ink: #0f172a;
    --ehbo-ink-soft: #475569;
    --ehbo-ink-mute: #94a3b8;
    --ehbo-border: #e2e8f0;
    --ehbo-accent: #dc2626;        /* FLAG red - lifeguard rescue red */
    --ehbo-accent-soft: #fee2e2;   /* tinted red surface */
    --ehbo-accent-deep: #b91c1c;
    --ehbo-amber: #fbbf24;         /* lifeguard yellow/amber (matches update banner icon) */
    --ehbo-amber-soft: #fef3c7;
    --ehbo-success: #16a34a;
    --ehbo-success-deep: #15803d;
    --ehbo-danger: #dc2626;
    --ehbo-warn-bg: #fef3c7;
    --ehbo-warn-ink: #92400e;
    --ehbo-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --ehbo-shadow-md: 0 6px 24px -8px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.06);
    --ehbo-shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(15, 23, 42, 0.08);
    --ehbo-radius: 16px;
    --ehbo-radius-sm: 10px;

    /* Brand colours used by the FLAG.Trainingen.Components LoadingSpinner via var(--flag-{Colour}) */
    --flag-red: #dc2626;
    --flag-ink: #0f172a;
    --flag-white: #ffffff;
}

html, body {
    background: var(--ehbo-bg);
    color: var(--ehbo-ink);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'cv11', 'ss01', 'ss03';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
}

/* ---------- Page shell ---------- */
.ehbo-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px calc(120px + env(safe-area-inset-bottom));
    outline: none;
}

.ehbo-header {
    margin-bottom: 24px;
}

.ehbo-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

    .ehbo-header h1 {
        font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
        font-weight: 800;
        letter-spacing: -0.025em;
        line-height: 1.1;
        color: var(--ehbo-ink);
        margin: 6px 0 8px;
    }

.ehbo-counter {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
    color: var(--ehbo-ink-soft);
    background: var(--ehbo-surface);
    border: 1px solid var(--ehbo-border);
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: var(--ehbo-shadow-sm);
}

    .ehbo-counter strong {
        font-weight: 800;
        color: var(--ehbo-accent);
        font-size: 1rem;
        letter-spacing: -0.01em;
    }

    .ehbo-counter__sep {
        margin: 0 2px;
        color: var(--ehbo-ink-mute);
    }

/* ---------- Progress ---------- */
.ehbo-progress {
    position: relative;
    margin-top: 16px;
    height: 8px;
    background: var(--ehbo-border);
    border-radius: 999px;
    overflow: hidden;
}

.ehbo-progress__bar {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--flag-red) 0%, var(--ehbo-amber) 100%);
    border-radius: inherit;
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ehbo-progress__label {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    width: 1px;
    height: 1px;
}

.ehbo-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ehbo-accent);
    background: var(--ehbo-accent-soft);
    padding: 5px 10px;
    border-radius: 999px;
}

.ehbo-subtitle {
    color: var(--ehbo-ink-soft);
    font-size: 1rem;
    margin: 0;
    max-width: 60ch;
}

/* ---------- Layout ----------
   Mobile-first: markup order is image then info, so it stacks photo-on-top
   naturally. On desktop we swap with `order` so info-box sits on the left
   (toggle button thumb-reach) and the photo on the right. */
.content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

@media (min-width: 861px) {
    .content {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
        gap: 28px;
    }

    .content .info-box { order: 1; }
    .content .image-wrapper { order: 2; }
}

/* ---------- Info card ---------- */
.info-box {
    background: var(--ehbo-surface);
    border: 1px solid var(--ehbo-border);
    border-radius: var(--ehbo-radius);
    padding: 22px;
    box-shadow: var(--ehbo-shadow-md);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---------- Toggle button (primary) ---------- */
.toggle-btn {
    appearance: none;
    background: var(--ehbo-ink);
    color: white;
    border: 1px solid var(--ehbo-ink);
    padding: 14px 18px;
    min-height: 48px;
    border-radius: var(--ehbo-radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: var(--ehbo-shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.toggle-btn__icon {
    font-size: 0.95rem;
    opacity: 0.95;
}

    .toggle-btn:hover {
        transform: translateY(-1px);
        box-shadow: var(--ehbo-shadow-md);
        background: #1e293b;
    }

    .toggle-btn:active {
        transform: translateY(0);
    }

/* ---------- Info reveal ---------- */
.info-section {
    display: none;
}

    .info-section.show {
        display: block;
        animation: ehbo-fade 0.25s ease;
    }

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

.condition-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

.condition-name {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ehbo-ink);
}

.condition-code {
    display: inline-flex;
    align-items: center;
    background: var(--ehbo-accent-soft);
    color: var(--ehbo-accent);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---------- Sections ---------- */
.section {
    margin-top: 16px;
}

.section-title {
    font-weight: 700;
    color: var(--ehbo-ink);
    margin-bottom: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .section-title i {
        font-size: 0.85rem;
        opacity: 0.7;
    }

.list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .list li {
        position: relative;
        padding: 10px 12px 10px 32px;
        background: #f8fafc;
        border: 1px solid var(--ehbo-border);
        border-radius: 10px;
        font-size: 0.92rem;
        line-height: 1.45;
        color: var(--ehbo-ink-soft);
    }

        .list li::before {
            content: "";
            position: absolute;
            left: 12px;
            top: 16px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--ehbo-danger);
        }

    .list--actions li::before {
        background: var(--ehbo-success);
    }

/* ---------- Sticky CTA ----------
   Pinned to the bottom on mobile (safe-area aware) so the primary action is
   always within thumb reach without scrolling. On desktop it floats inline. */
.ehbo-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(246, 247, 251, 0.96) 60%, rgba(246, 247, 251, 0));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    pointer-events: none;
}

    .ehbo-sticky-cta .btn-next {
        pointer-events: auto;
    }

@media (min-width: 861px) {
    .ehbo-sticky-cta {
        position: static;
        padding: 32px 0 0;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

.btn-next {
    appearance: none;
    background: var(--flag-red);
    color: white;
    border: none;
    padding: 16px 22px;
    min-height: 54px;
    border-radius: 14px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
    box-shadow: 0 12px 28px -10px rgba(220, 38, 38, 0.55), 0 2px 6px rgba(220, 38, 38, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    width: min(560px, 100%);
}

    .btn-next:hover {
        background: var(--ehbo-accent-deep);
        transform: translateY(-1px);
        box-shadow: 0 16px 32px -10px rgba(220, 38, 38, 0.6), 0 2px 6px rgba(220, 38, 38, 0.2);
        color: white;
    }

    .btn-next:active {
        transform: translateY(0);
    }

.btn-next__icon {
    font-size: 0.95rem;
}

.btn-next__arrow {
    transition: transform 0.2s ease;
}

.btn-next:hover .btn-next__arrow {
    transform: translateX(3px);
}

/* ---------- Keyboard hint ---------- */
.kbd-hint {
    display: none;
    gap: 14px;
    margin-top: 6px;
    color: var(--ehbo-ink-mute);
    font-size: 0.78rem;
}

    .kbd-hint kbd {
        display: inline-block;
        background: #f1f5f9;
        border: 1px solid var(--ehbo-border);
        border-bottom-width: 2px;
        border-radius: 6px;
        padding: 1px 6px;
        font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--ehbo-ink);
        margin-right: 4px;
    }

@media (hover: hover) and (min-width: 861px) {
    .kbd-hint { display: inline-flex; }
}

/* ---------- Image side ---------- */
.image-wrapper {
    position: relative;
}

.image-box {
    position: relative;
    background: var(--ehbo-surface);
    border: 1px solid var(--ehbo-border);
    border-radius: var(--ehbo-radius);
    overflow: hidden;
    box-shadow: var(--ehbo-shadow-md);
    min-height: 220px;
}

    .image-box img {
        width: 100%;
        height: auto;
        display: block;
        opacity: 0;
        transition: opacity 0.35s ease;
    }

    .image-box.is-loaded img {
        opacity: 1;
        animation: ehbo-img-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    }

@keyframes ehbo-img-pop {
    from { transform: scale(1.015); }
    to   { transform: scale(1); }
}

.image-skeleton {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 50%, #f8fafc 100%);
    background-size: 200% 100%;
    animation: ehbo-skeleton-shimmer 1.6s linear infinite;
}

@keyframes ehbo-skeleton-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

.photo-number {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.78);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    z-index: 10;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

/* ---------- Empty mapping ---------- */
.no-mapping {
    background: var(--ehbo-warn-bg);
    color: var(--ehbo-warn-ink);
    padding: 14px 16px;
    border-radius: var(--ehbo-radius-sm);
    font-size: 0.92rem;
    font-weight: 500;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .ehbo-page {
        padding: 20px 14px calc(110px + env(safe-area-inset-bottom));
    }

    .info-box {
        padding: 16px;
    }

    .ehbo-header {
        margin-bottom: 18px;
    }
}

/* ============================================================
   Landing page
   ============================================================ */

.landing {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 24px 72px;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    text-align: center;
    padding: 32px 0 56px;
    isolation: isolate;
}

    .hero::before {
        content: "";
        position: absolute;
        inset: -10% 10% auto 10%;
        height: 320px;
        background: radial-gradient(60% 60% at 50% 30%, rgba(220, 38, 38, 0.18), rgba(220, 38, 38, 0) 70%),
                    radial-gradient(40% 40% at 70% 50%, rgba(251, 191, 36, 0.14), rgba(251, 191, 36, 0) 70%);
        filter: blur(8px);
        z-index: -1;
    }

.hero h1 {
    font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--ehbo-ink);
    margin: 14px auto 16px;
    max-width: 18ch;
}

.hero h1 .accent {
    background: linear-gradient(90deg, var(--flag-red) 0%, var(--ehbo-amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    color: var(--ehbo-ink-soft);
    font-size: clamp(1rem, 0.9rem + 0.3vw, 1.15rem);
    line-height: 1.5;
    max-width: 56ch;
    margin: 0 auto 28px;
}

.hero-cta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.btn-primary-cta {
    appearance: none;
    background: var(--ehbo-ink);
    color: white;
    border: 1px solid var(--ehbo-ink);
    padding: 14px 22px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: 0 10px 24px -10px rgba(15, 23, 42, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

    .btn-primary-cta:hover {
        background: #1e293b;
        transform: translateY(-1px);
        color: white;
        box-shadow: 0 14px 30px -10px rgba(15, 23, 42, 0.45);
    }

.btn-secondary-cta {
    appearance: none;
    background: white;
    color: var(--ehbo-ink);
    border: 1px solid var(--ehbo-border);
    padding: 14px 22px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-secondary-cta:hover {
        background: #f8fafc;
        border-color: var(--ehbo-ink-mute);
        transform: translateY(-1px);
        color: var(--ehbo-ink);
    }

.cta-arrow {
    transition: transform 0.2s ease;
}

.btn-primary-cta:hover .cta-arrow,
.btn-secondary-cta:hover .cta-arrow {
    transform: translateX(3px);
}

/* ---------- Stats strip ---------- */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--ehbo-border);
}

.stat {
    text-align: center;
}

    .stat strong {
        display: block;
        font-size: 1.8rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        color: var(--ehbo-ink);
    }

    .stat span {
        font-size: 0.85rem;
        color: var(--ehbo-ink-soft);
    }

/* ---------- Section ---------- */
.section-block {
    margin-top: 72px;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ehbo-accent);
    background: var(--ehbo-accent-soft);
    padding: 5px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--ehbo-ink);
    margin: 0 0 12px;
    line-height: 1.15;
    text-transform: none;
}

.section-lede {
    color: var(--ehbo-ink-soft);
    font-size: 1.02rem;
    line-height: 1.55;
    max-width: 65ch;
    margin: 0 0 24px;
}

/* ---------- Why card ---------- */
.why-card {
    background: var(--ehbo-surface);
    border: 1px solid var(--ehbo-border);
    border-radius: var(--ehbo-radius);
    padding: 28px 28px 24px;
    box-shadow: var(--ehbo-shadow-md);
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.why-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.why-point {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.why-point__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--ehbo-accent-soft);
    color: var(--ehbo-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.why-point__title {
    font-weight: 700;
    color: var(--ehbo-ink);
    font-size: 0.98rem;
}

.why-point__body {
    color: var(--ehbo-ink-soft);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ---------- Feature card ---------- */
.feature-card {
    background: var(--ehbo-surface);
    border: 1px solid var(--ehbo-border);
    border-radius: var(--ehbo-radius);
    padding: 28px;
    box-shadow: var(--ehbo-shadow-md);
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

@media (min-width: 760px) {
    .feature-card {
        grid-template-columns: 1.2fr 1fr;
        gap: 32px;
    }
}

.feature-card__body h3 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--ehbo-ink);
}

.feature-card__body p {
    color: var(--ehbo-ink-soft);
    font-size: 0.98rem;
    line-height: 1.55;
    margin: 0 0 16px;
}

.feature-card__bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .feature-card__bullets li {
        font-size: 0.92rem;
        color: var(--ehbo-ink-soft);
        padding-left: 22px;
        position: relative;
    }

        .feature-card__bullets li::before {
            content: "✓";
            position: absolute;
            left: 0;
            top: 0;
            color: var(--ehbo-success);
            font-weight: 800;
        }

.feature-card__visual {
    background: linear-gradient(135deg, var(--ehbo-accent-soft) 0%, var(--ehbo-amber-soft) 100%);
    border: 1px solid var(--ehbo-border);
    border-radius: 12px;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ehbo-ink-mute);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.feature-card__mock {
    background: white;
    border: 1px solid var(--ehbo-border);
    border-radius: 10px;
    padding: 14px;
    width: 78%;
    box-shadow: var(--ehbo-shadow-md);
    transform: rotate(-2deg);
}

    .feature-card__mock .mock-pill {
        display: inline-block;
        background: var(--ehbo-accent-soft);
        color: var(--ehbo-accent);
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        padding: 3px 8px;
        border-radius: 999px;
        margin-bottom: 8px;
    }

    .feature-card__mock .mock-title {
        font-weight: 700;
        color: var(--ehbo-ink);
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .feature-card__mock .mock-row {
        height: 8px;
        background: #f1f5f9;
        border-radius: 4px;
        margin-bottom: 6px;
    }

    .feature-card__mock .mock-row.short {
        width: 60%;
    }

/* ---------- Author ---------- */
.author-card {
    background: var(--ehbo-ink);
    color: white;
    border-radius: var(--ehbo-radius);
    padding: 32px;
    box-shadow: var(--ehbo-shadow-lg);
    display: flex;
    gap: 20px;
    align-items: center;
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--flag-red), var(--ehbo-amber));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.author-body h4 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.author-body p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    line-height: 1.5;
}

.author-body .author-role {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    padding: 4px 10px;
    border-radius: 999px;
    margin-top: 8px;
}

/* ---------- Footer ---------- */
.landing-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--ehbo-border);
    color: var(--ehbo-ink-mute);
    font-size: 0.85rem;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
}

.landing-footer__version {
    font-variant-numeric: tabular-nums;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ehbo-ink-soft);
    background: var(--ehbo-surface);
    border: 1px solid var(--ehbo-border);
    border-radius: 999px;
    padding: 2px 8px;
    letter-spacing: 0.02em;
}

/* ---------- EHBO page footer ---------- */
.ehbo-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--ehbo-border);
    color: var(--ehbo-ink-mute);
    font-size: 0.85rem;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
}

.ehbo-footer__home {
    color: var(--ehbo-ink-soft);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: color 0.15s ease;
}

    .ehbo-footer__home:hover {
        color: var(--ehbo-accent);
    }

@media (max-width: 640px) {
    .author-card {
        flex-direction: column;
        text-align: center;
    }

    .hero-stats {
        gap: 20px;
    }
}

/* ============================================================
   Legal pages (privacy, cookies, terms)
   ============================================================ */

.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 72px;
}

.legal-nav {
    margin-bottom: 32px;
}

.legal-back {
    color: var(--ehbo-ink-soft);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

    .legal-back:hover {
        color: var(--ehbo-accent);
    }

.legal-header {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ehbo-border);
}

    .legal-header h1 {
        font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
        font-weight: 800;
        letter-spacing: -0.025em;
        color: var(--ehbo-ink);
        margin: 8px 0 4px;
    }

    .legal-header p {
        color: var(--ehbo-ink-mute);
        font-size: 0.85rem;
        margin: 0;
    }

.legal-section {
    margin-bottom: 28px;
}

    .legal-section h2 {
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: -0.01em;
        color: var(--ehbo-ink);
        margin: 0 0 10px;
    }

    .legal-section p {
        color: var(--ehbo-ink-soft);
        font-size: 0.95rem;
        line-height: 1.65;
        margin: 0 0 8px;
    }

    .legal-section ul {
        padding-left: 20px;
        margin: 0 0 8px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .legal-section li {
        color: var(--ehbo-ink-soft);
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .legal-section a {
        color: var(--ehbo-accent);
        text-decoration: underline;
        text-underline-offset: 2px;
    }

        .legal-section a:hover {
            color: var(--ehbo-accent-deep);
        }

.legal-footer {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--ehbo-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    color: var(--ehbo-ink-mute);
    font-size: 0.85rem;
}

/* ---------- Footer legal links (landing + ehbo page footers) ---------- */
.landing-footer__link,
.ehbo-footer__link {
    color: var(--ehbo-ink-mute);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s ease;
}

    .landing-footer__link:hover,
    .ehbo-footer__link:hover {
        color: var(--ehbo-ink-soft);
    }

/* ============================================================
   Loading spinner (used by both the static pre-WASM loader
   and the FLAG.Trainingen.Components LoadingSpinner)
   ============================================================ */

.flag-buoy-spin {
    animation: flag-buoy-rotate 1.4s linear infinite;
    transform-origin: 50% 50%;
    display: block;
}

@keyframes flag-buoy-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .flag-buoy-spin { animation-duration: 4s; }
}

/* Static first-load shell shown by index.html before WASM boots.
   Mirrors the LoadingSpinner component visually so the transition is seamless. */
.flag-initial-loader {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    background: var(--ehbo-bg);
    z-index: 9999;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.flag-initial-loader-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--flag-red);
    letter-spacing: 0.04em;
    text-align: center;
}

/* Inline runtime loading state (used inside pages) */
.ehbo-runtime-loader {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   App update banner (FLAG.Trainingen.Components AppUpdateBanner)
   ============================================================ */

.flag-update-banner {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 9998;
    width: min(560px, calc(100vw - 32px));
    background: var(--ehbo-ink);
    color: white;
    border-radius: 14px;
    box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.55), 0 4px 12px rgba(15, 23, 42, 0.25);
    animation: flag-update-slide-in 0.28s ease-out;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@keyframes flag-update-slide-in {
    from { transform: translate(-50%, 24px); opacity: 0; }
    to   { transform: translate(-50%, 0);    opacity: 1; }
}

.flag-update-banner-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
}

.flag-update-banner-icon {
    font-size: 1.4rem;
    color: #fbbf24;
    flex-shrink: 0;
}

.flag-update-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}

    .flag-update-banner-text strong {
        font-weight: 700;
        font-size: 0.95rem;
        letter-spacing: -0.01em;
    }

.flag-update-banner-sub {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
}

.flag-update-banner-button {
    background: white;
    color: var(--ehbo-ink);
    border: none;
    padding: 9px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
    font-family: inherit;
}

    .flag-update-banner-button:hover:not(:disabled) {
        background: #f1f5f9;
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    }

    .flag-update-banner-button:disabled {
        opacity: 0.7;
        cursor: progress;
    }

.me-2 { margin-right: 0.5rem; }

@media (max-width: 520px) {
    .flag-update-banner-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .flag-update-banner-button {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   App install banner (Add-to-home-screen prompt)
   ============================================================ */

.flag-install-banner {
    position: fixed;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 9500;
    width: min(560px, calc(100vw - 24px));
    background: linear-gradient(135deg, #ffffff 0%, #fff7f7 100%);
    color: var(--ehbo-ink);
    border: 1px solid var(--ehbo-border);
    border-radius: 16px;
    box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.22), 0 6px 16px rgba(220, 38, 38, 0.08);
    animation: flag-install-slide-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

    .flag-install-banner::before {
        content: "";
        position: absolute;
        left: 0; top: 0; bottom: 0;
        width: 4px;
        background: linear-gradient(180deg, var(--flag-red) 0%, var(--ehbo-amber) 100%);
    }

@keyframes flag-install-slide-in {
    from { transform: translate(-50%, 24px); opacity: 0; }
    to   { transform: translate(-50%, 0);    opacity: 1; }
}

/* Lift above sticky CTA on EHBO page */
.ehbo-page ~ .flag-install-banner,
body:has(.ehbo-sticky-cta) .flag-install-banner {
    bottom: calc(96px + env(safe-area-inset-bottom));
}

.flag-install-banner-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 14px 20px;
}

.flag-install-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--flag-red) 0%, var(--ehbo-accent-deep) 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 6px 14px -4px rgba(220, 38, 38, 0.5);
}

.flag-install-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.35;
    min-width: 0;
}

    .flag-install-banner-text strong {
        font-weight: 700;
        font-size: 0.98rem;
        letter-spacing: -0.01em;
        color: var(--ehbo-ink);
    }

.flag-install-banner-sub {
    font-size: 0.85rem;
    color: var(--ehbo-ink-soft);
    margin-top: 1px;
}

    .flag-install-banner-sub i {
        color: var(--ehbo-accent);
        margin: 0 2px;
    }

    .flag-install-banner-sub em {
        font-style: normal;
        color: var(--ehbo-ink);
        font-weight: 600;
    }

.flag-install-banner-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.flag-install-banner-button {
    appearance: none;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
    font-family: inherit;
    min-height: 40px;
}

.flag-install-banner-button--primary {
    background: var(--flag-red);
    color: white;
    box-shadow: 0 8px 18px -6px rgba(220, 38, 38, 0.55);
}

    .flag-install-banner-button--primary:hover:not(:disabled) {
        background: var(--ehbo-accent-deep);
        transform: translateY(-1px);
        box-shadow: 0 12px 22px -6px rgba(220, 38, 38, 0.6);
    }

    .flag-install-banner-button--primary:disabled {
        opacity: 0.75;
        cursor: progress;
    }

.flag-install-banner-button--ghost {
    background: transparent;
    color: var(--ehbo-ink-soft);
    width: 40px;
    padding: 0;
}

    .flag-install-banner-button--ghost:hover {
        background: rgba(15, 23, 42, 0.06);
        color: var(--ehbo-ink);
    }

@media (max-width: 520px) {
    .flag-install-banner-inner {
        flex-wrap: wrap;
        padding: 14px 12px 14px 16px;
    }

    .flag-install-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .flag-install-banner-button--primary {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .flag-install-banner,
    .flag-update-banner,
    .image-box.is-loaded img,
    .ehbo-progress__bar {
        animation: none;
        transition: none;
    }
}
