/*
 * Slides Summarizer — main stylesheet.
 *
 * The four partials fonts/reset/tokens/components were previously
 * pulled via `@import url(...)`. Each `@import` forces a sequential
 * fetch-and-parse (the browser only discovers the dependency after
 * main.css is parsed), which added ~150 ms of LCP Render Delay on the
 * simulated mobile trace. We now inline them in-order directly into
 * this file. The equivalent `.css` partials still exist on disk so
 * dev tooling (style guide, tests) can reference them individually;
 * production only loads main.css.
 *
 * Source-of-truth order: fonts → reset → tokens → components.
 * Shared-hosting friendly (no build step), gzip by Apache mod_deflate.
 */

/* ============================================================
 * fonts.css — self-hosted Inter + Inter Tight (variable).
 * Preload hints for the display weight live in templates/head.php.
 * ============================================================ */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter Tight';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-tight-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter Tight';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-tight-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
 * reset.css — modern CSS reset (Josh Comeau + Andy Bell).
 * ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    scroll-behavior: smooth;
    color-scheme: light;
    /* Clip root-level horizontal overflow so decorative pop-out
     * elements (mascot, ornament) can't trigger horizontal scroll on
     * narrow viewports. Must be on html (not just body) because html is
     * the document's scroll container and `scrollWidth` / any accidental
     * horizontal scroll is computed there. `clip` (not `hidden`) keeps
     * position:sticky working on descendants. */
    overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
body {
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* `overflow-x: clip` prevents decorative pop-out elements
     * (mascot, ornament, hero gradient) from causing horizontal scroll
     * on narrow viewports. Unlike `hidden`, `clip` does NOT create a
     * scroll container, so sticky-header positioning continues to work. */
    overflow-x: clip;
}
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; color: inherit; }
a { color: inherit; text-decoration: none; }
ul[role='list'], ol[role='list'] { list-style: none; }
table { border-collapse: collapse; border-spacing: 0; }
/* Anchor-jump offset for sticky header */
.section,
:target { scroll-margin-top: 80px; }

/* ============================================================
 * tokens.css — design tokens (docs/style-specification.md §1).
 * ============================================================ */
:root {
    /* 1.1 Colors */
    --bg:            #ffffff;
    --bg-soft:       #f7f7f5;
    --bg-accent:     #eaf4ff;
    --ink:           #0a0a0a;
    --ink-2:         #3a3a3a;
    /* Darkened from #8a8a8a (3.45:1 on white — failed WCAG AA) to
       #5a5a5a (7.1:1 on white, 6.2:1 on #f7f7f5, 6.1:1 on #eaf4ff). */
    --muted:         #5a5a5a;
    --border:        #ebebe8;

    --accent:           #ff6a1f;
    --accent-hover:     #e85a10;
    --accent-soft:      #ffefe4;
    --accent-ink:       #ffffff;
    /* #a73d00 picked for universal safety across all light surfaces. */
    --accent-strong:    #a73d00;
    --accent-strong-hv: #853000;

    --highlight:     #ffe35c;

    --hero-gradient: linear-gradient(180deg, #ffffff 0%, #f7f7f5 100%);
    --demo-panel-bg: #0a0a0a;
    --demo-panel-ink:#f0f0f0;
    --success:       #0fad5c;
    --error:         #e53935;
    --warn:          #c77700;

    /* 1.2 Typography */
    --font-display:  'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:     'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --h1:        clamp(40px, 6vw, 72px);
    --h2:        clamp(28px, 3.5vw, 44px);
    --h3:        20px;
    --body:      16px;
    --caption:   13px;

    --w-regular: 400;
    --w-medium:  500;
    --w-semi:    600;
    --w-bold:    700;

    --lh-tight:  1.05;
    --lh-snug:   1.2;
    --lh-body:   1.55;

    /* 1.3 Spacing / Layout */
    --container:        1120px;
    --container-narrow: 720px;

    --gap-xs:  8px;
    --gap-sm:  16px;
    --gap-md:  24px;
    --gap-lg:  48px;
    --gap-xl:  96px;
    --gap-2xl: 140px;

    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --radius-pill: 999px;

    /* 1.4 Shadows */
    --shadow-card:       0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
    --shadow-screenshot: 0 30px 80px -20px rgba(20, 20, 40, .18), 0 0 0 1px rgba(0, 0, 0, .04);
    --shadow-cta:        0 4px 14px rgba(255, 106, 31, .35);

    /* iOS safe areas (landing-spec §7.5.2) */
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left:   env(safe-area-inset-left, 0px);
    --safe-right:  env(safe-area-inset-right, 0px);

    --nav-h: 64px;
}

/* ============================================================
 * components.css — reusable UI primitives (docs/style-specification.md §2).
 * ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: var(--w-semi);
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, color .15s ease,
                box-shadow .15s ease, border-color .15s ease;
    min-height: 48px;
    will-change: transform;
}
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}
/* Brand orange `--accent` (#ff6a1f). White text on this hue is 2.86:1 — an
   accepted brand trade-off (see docs/t57-a11y-audit.md waiver). */
.btn--primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--shadow-cta);
}
.btn--primary:hover {
    background: var(--accent-hover);
    color: var(--accent-ink);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 106, 31, .42);
}
.btn--primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 106, 31, .35);
}
.btn--secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--ink);
}
.btn--secondary:hover {
    border-color: var(--ink);
    color: var(--ink);
    transform: translateY(-1px);
}
.btn--ghost {
    background: transparent;
    color: var(--ink);
    padding: 8px 4px;
    min-height: auto;
    border-radius: 0;
    text-underline-offset: 4px;
}
.btn--ghost:hover {
    color: var(--accent);
    text-decoration: underline;
}

.highlight-marker {
    background-image: linear-gradient(180deg, transparent 60%, var(--highlight) 60%);
    padding: 0 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.highlight-underline {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
}
.card--accent {
    background: var(--accent-soft);
    border-color: rgba(255, 106, 31, .2);
}

.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
    min-height: 240px;
    justify-content: center;
    position: relative;
}
.upload-zone:hover,
.upload-zone:focus-within {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px rgba(255, 106, 31, .15);
}
.upload-zone[data-state="drag"] {
    border-color: var(--accent);
    background: var(--accent-soft);
    border-style: solid;
}

/* ============================================================
 * Base typography + body
 * ============================================================ */
html {
    /*
     * Smooth in-page anchor scrolling, respecting user preference.
     * Anchor offset for the sticky nav is handled by `.section` itself via
     * `scroll-margin-top` (see components.css), not scroll-padding here —
     * combining both would double-count the offset.
     */
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-body);
    font-size: var(--body);
    line-height: var(--lh-body);
    color: var(--ink-2);
    background: var(--bg);
    font-weight: var(--w-regular);
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: var(--w-bold);
    letter-spacing: -0.01em;
}

h1 {
    font-size: var(--h1);
    line-height: var(--lh-tight);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--h2);
    line-height: var(--lh-snug);
    letter-spacing: -0.015em;
}

h3 {
    font-size: var(--h3);
    line-height: var(--lh-snug);
}

p {
    color: var(--ink-2);
}

a {
    color: var(--ink);
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

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

::selection {
    background: var(--highlight);
    color: var(--ink);
}

/* ============================================================
 * Skip-link (a11y)
 * ============================================================ */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    top: calc(8px + var(--safe-top));
    left: 8px;
    width: auto;
    height: auto;
    padding: 12px 16px;
    background: var(--ink);
    color: var(--accent-ink);
    z-index: 9999;
    border-radius: var(--radius-sm);
    font-weight: var(--w-semi);
    text-decoration: none;
}

/* ============================================================
 * Layout primitives
 * ============================================================ */
/* Mobile-first container. padding follows landing-spec §7.5.1:
 * clamp(16px, 4vw, 24px) gives 16px at 320, 24px at 600+. safe-area
 * insets take precedence so notched iPhones don't lose padding on
 * landscape. max() inside clamp() preserves the safe-area minimum. */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-left: max(clamp(16px, 4vw, 24px), var(--safe-left));
    padding-right: max(clamp(16px, 4vw, 24px), var(--safe-right));
}

.container-narrow {
    max-width: var(--container-narrow);
}

/* Visually hidden utility — for accessible labels / table captions */
.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;
}

/* Inline SVG icon alignment */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ============================================================
 * Buttons, highlights, cards, upload-zone → components.css
 * ============================================================ */

/* ============================================================
 * Section rhythm — big whitespace between sections (Amie vibe)
 * ============================================================ */
main > section {
    padding-block: var(--gap-xl);
}

main > section:first-of-type {
    padding-top: var(--gap-lg);
}

@media (max-width: 767px) {
    main > section {
        padding-block: 64px;
    }
}

/* ============================================================
 * Section header pattern (h2 + sub) — used by most sections
 * ============================================================ */
.section__head {
    text-align: center;
    max-width: 720px;
    margin-inline: auto;
    margin-bottom: var(--gap-md);
}

.section__h2 {
    margin-bottom: 12px;
}

.section__sub {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

/* ============================================================
 * Site header / nav
 * ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, background .2s ease;
}

.site-header[data-scroll="scrolled"] {
    border-bottom-color: var(--border);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--nav-h);
}

.site-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: var(--w-bold);
    font-size: 18px;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.site-nav__brand:hover {
    color: var(--ink);
}

.site-nav__brand-mark svg {
    display: block;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__list a {
    color: var(--ink-2);
    font-weight: var(--w-medium);
    font-size: 14px;
    white-space: nowrap;
}

.site-nav__list a:hover {
    color: var(--accent);
}

/* Scroll-spy marks the link for the currently visible section. */
.site-nav__list a[aria-current="location"] {
    color: var(--accent);
    font-weight: var(--w-bold);
}

.site-nav__cta {
    padding: 10px 18px;
    min-height: 40px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

.site-nav__toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.site-nav__toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}

/* On narrow desktops (769–1024 px), shrink gaps and font to prevent
 * nav items from wrapping. At ≤768 the hamburger takes over. */
@media (max-width: 1024px) and (min-width: 769px) {
    .site-nav { gap: 12px; }
    .site-nav__list { gap: 12px; }
    .site-nav__list a { font-size: 13px; }
    .site-nav__cta { padding: 8px 14px; font-size: 13px; }
    .lang-select--nav { max-width: 120px; font-size: 12px; }
}

/* .site-nav__menu is a transparent wrapper on desktop — children
 * (list + cta) flow as direct flex items of .site-nav. On ≤768 it
 * becomes a fixed drawer. `display: contents` is a11y-safe in modern
 * browsers (Chrome 87+, Firefox 99+). */
.site-nav__menu { display: contents; }

@media (max-width: 768px) {
    .site-nav__toggle { display: inline-flex; }

    /* Full-height right-side drawer. Hidden off-screen until toggled.
     * `visibility` keeps the subtree focusable-when-open / unfocusable-
     * when-closed without needing display:none (which would break the
     * slide-in animation). Delay visibility 0 → hidden until the exit
     * transform finishes so the drawer can't be tabbed into mid-close. */
    .site-nav__menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        position: fixed;
        top: var(--nav-h);
        right: 0;
        width: min(360px, 88vw);
        height: calc(100dvh - var(--nav-h));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 16px max(20px, var(--safe-right)) calc(16px + var(--safe-bottom)) 20px;
        background: var(--bg);
        border-left: 1px solid var(--border);
        box-shadow: -12px 0 40px rgba(10, 10, 10, .15);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .28s ease, visibility 0s linear .28s;
        z-index: 49;
    }

    .site-nav__menu.is-open {
        transform: translateX(0);
        visibility: visible;
        transition: transform .28s ease, visibility 0s linear 0s;
    }

    .site-nav__list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        width: 100%;
    }

    .site-nav__list li { width: 100%; }

    .site-nav__list a {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 44px;
        padding: 10px 4px;
        font-size: 16px;
        border-bottom: 1px solid var(--border);
    }

    .site-nav__cta {
        display: inline-flex;
        align-self: stretch;
        justify-content: center;
        padding: 12px 24px;
        font-size: 15px;
        min-height: 44px;
        margin-top: 4px;
    }

    /* Backdrop dim. Starts below the header so the close button stays
     * tappable. Excludes the safe area around iPhone's home indicator
     * so the dim doesn't clip under system chrome. */
    body.nav-open {
        overflow: hidden;
    }
    body.nav-open::before {
        content: "";
        position: fixed;
        inset: var(--nav-h) 0 0 0;
        background: rgba(10, 10, 10, .45);
        z-index: 48;
        animation: nav-backdrop-in .2s ease;
    }
}

@keyframes nav-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .site-nav__menu {
        transition: none !important;
    }
    body.nav-open::before {
        animation: none !important;
    }
}

/* ============================================================
 * §1 Hero
 * ============================================================ */
.section--hero {
    background: var(--hero-gradient);
    padding-top: var(--gap-xl) !important;
    padding-bottom: var(--gap-xl) !important;
}

.hero__inner {
    text-align: center;
    max-width: 880px;
}

.hero__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, .85);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: var(--w-medium);
    color: var(--ink);
    margin-bottom: 24px;
}

.hero__pill-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 106, 31, .2);
}

.hero__h1 {
    margin-bottom: 16px;
}

.hero__sub {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 32px);
    font-weight: var(--w-semi);
    color: var(--ink);
    line-height: 1.25;
    margin-bottom: 16px;
}

.hero__paragraph {
    font-size: 18px;
    line-height: 1.55;
    color: var(--ink-2);
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: 28px;
}

.hero__cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 24px;
    margin-bottom: 24px;
}

.hero__cta {
    padding: 18px 32px;
    font-size: 17px;
}

.hero__trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: var(--gap-md);
}

.hero__trust li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero__trust span {
    color: var(--accent);
    font-weight: var(--w-bold);
}

.hero__visual {
    margin: 0 auto;
    max-width: 1100px;
}

.hero__visual img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-screenshot);
}

/* ============================================================
 * §2 Upload
 * ============================================================ */
.upload {
    position: relative;
    max-width: 880px;
    margin: 0 auto;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    padding: 24px;
}

/* 8-bit pixel mascot in the corner of the upload zone (decorative) */
.upload__mascot {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    filter: drop-shadow(0 6px 12px rgba(255, 106, 31, 0.25));
    pointer-events: none;
    transform: rotate(6deg);
}

@media (prefers-reduced-motion: no-preference) {
    .upload__mascot {
        transition: transform .3s ease;
    }
    .upload:hover .upload__mascot {
        transform: rotate(-4deg) translateY(-2px);
    }
}

.upload__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 12px;
}

.upload__badge {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: var(--w-medium);
    color: var(--ink-2);
    cursor: default;
    user-select: none;
}

.upload__dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 240px;
    padding: 48px 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
    cursor: pointer;
    box-shadow: inset 0 2px 8px rgba(10, 10, 10, 0.04);
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.upload__dropzone:hover,
.upload__dropzone:focus-within,
.upload[data-upload-state="drag"] .upload__dropzone {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 2px 10px rgba(255, 106, 31, 0.12);
}

/* When the sr-only <input> inside the dropzone has :focus-visible
   (keyboard focus), paint an explicit outline ring on the parent label so
   the focus indicator is unambiguous — the hover-style fill alone isn't
   distinctive enough because it also triggers on mouse hover. */
.upload__dropzone:has(:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.upload__icon {
    margin-bottom: 16px;
}

.upload__headline {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: var(--w-bold);
    color: var(--ink);
    margin-bottom: 6px;
}

.upload__subline {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 20px;
}

.upload__browse {
    margin-bottom: 20px;
}

.upload__formats {
    display: block;
    font-size: 13px;
    color: var(--ink-2);
    font-weight: var(--w-medium);
    margin-bottom: 4px;
}

.upload__size {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.upload__link {
    margin-top: 24px;
}

.upload__link-label {
    display: block;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
    text-align: center;
}

/* Flex-wrap + min-width:0 so the input+button row shrinks under
 * ~350px viewports. Without min-width:0, the input refuses to shrink
 * below its intrinsic content width and pushes the button offscreen,
 * causing horizontal scroll on iPhone SE (320px). */
.upload__link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 560px;
    margin-inline: auto;
}

.upload__link-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg);
    color: var(--ink);
    min-height: 48px;
}

.upload__link-input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.upload__link-button {
    padding: 12px 20px;
    min-height: 48px;
}

.upload__privacy {
    margin-top: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* Interactive state machine — hover / reading / processing / ready / error */
.upload[data-upload-state="hover"] .upload__dropzone {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 2px 14px rgba(255, 106, 31, 0.18);
    transform: scale(1.005);
}

.upload__progress {
    margin-top: 24px;
    padding: 32px 24px;
    background: var(--bg-soft);
    border: 2px dashed var(--accent);
    border-radius: var(--radius-lg);
    text-align: center;
    animation: uploadFadeIn .24s ease-out;
}

.upload__progress-label {
    font-family: var(--font-display);
    font-weight: var(--w-semi);
    font-size: 16px;
    color: var(--ink);
    margin-bottom: 14px;
}

.upload__progress-bar {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 10px;
    margin: 0 auto;
    background: rgba(255, 106, 31, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.upload__progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: linear-gradient(90deg, #ff6a1f 0%, #ffb58a 100%);
    border-radius: 999px;
    transition: width .1s linear;
}

.upload__error {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fff0ed;
    border: 1px solid #ffb9a3;
    color: #b23b0e;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: var(--w-semi);
    text-align: center;
    animation: uploadFadeIn .2s ease-out;
}

.upload__done {
    margin-top: 24px;
    padding: 28px;
    background: var(--bg);
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(255, 106, 31, 0.12);
    animation: uploadFadeIn .3s ease-out;
}

.upload__done-head { margin-bottom: 20px; }

.upload__done-eyebrow {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.upload__done-title {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 28px);
    font-weight: var(--w-bold);
    color: var(--ink);
    margin: 0 0 4px;
}

.upload__done-title:focus { outline: none; }

.upload__done-sub {
    color: var(--muted);
    font-size: 14px;
}

.upload__done-notes {
    max-height: 280px;
    overflow-y: auto;
    padding: 16px 20px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.upload__done-notes .sample__note + .sample__note { margin-top: 18px; }
.upload__done-notes .sample__note-title {
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: var(--w-bold);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.upload__done-notes .sample__note-list {
    list-style: disc;
    padding-left: 20px;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.55;
}
.upload__done-notes .sample__note-list li { margin-bottom: 4px; }

.upload__done-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    justify-content: center;
}

.upload__live { /* kept off-screen — sr-only class already hides it */ }

@keyframes uploadFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .upload__progress,
    .upload__error,
    .upload__done { animation: none; }
    .upload__progress-fill { transition: none; }
}

/* ============================================================
 * §3 Formats bar
 * ============================================================ */
.section--formats {
    background: var(--bg-accent);
}

.formats__eyebrow {
    text-align: center;
    font-family: var(--font-display);
    font-weight: var(--w-semi);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 20px;
}

.formats__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
    margin: 0 0 16px 0;
    padding: 0;
    list-style: none;
}

.formats__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-weight: var(--w-semi);
    font-size: 14px;
    color: var(--ink);
    transition: transform .15s ease;
}

.formats__chip:hover {
    transform: scale(1.02);
}

.formats__chip-icon {
    font-size: 18px;
}

.formats__note {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ============================================================
 * §4 How it works
 * ============================================================ */
.how__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.how__step {
    text-align: left;
    position: relative;
    padding-top: 8px;
}

.how__step-num {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    border-radius: 50%;
    font-family: var(--font-display);
    font-weight: var(--w-bold);
    font-size: 16px;
}

.how__step-icon {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--ink-2);
}

.how__step-name {
    margin-bottom: 8px;
    font-size: 20px;
}

.how__step-desc {
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.55;
}

/* ============================================================
 * §5 Use cases
 * ============================================================ */
.use-cases__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.use-case {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

.use-case--students {
    background: #eef4ff;
    border-color: #d6e3ff;
}

.use-case--edu {
    background: #fffaea;
    border-color: #f4ead4;
}

.use-case--pros {
    border: 2px solid var(--accent);
    box-shadow: 0 12px 32px rgba(255, 106, 31, 0.18);
}

.use-case__icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.use-case__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: var(--w-bold);
    color: var(--accent-strong);
    margin-bottom: 10px;
}

.use-case__h3 {
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 1.3;
}

.use-case__body {
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 20px;
    flex: 1;
}

.use-case__cta {
    color: var(--accent-strong);
    font-weight: var(--w-semi);
    font-size: 15px;
    align-self: flex-start;
}

.use-case__cta:hover {
    color: var(--accent-strong-hv);
}

/* ============================================================
 * §6 Sample output
 * ============================================================ */
.sample {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 24px;
    background: var(--demo-panel-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-screenshot);
}

@media (max-width: 880px) {
    .sample {
        grid-template-columns: 1fr;
    }
}

.sample__pane-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px;
    font-weight: var(--w-bold);
    color: rgba(255, 255, 255, .55);
    margin: 0 0 12px 0;
}

.sample__slides {
    background: rgba(255, 255, 255, .04);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 0;
}

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

.sample__thumb {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius-sm);
    color: var(--demo-panel-ink);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.sample__thumb:hover {
    background: rgba(255, 255, 255, .1);
}

.sample__thumb.is-active {
    background: rgba(255, 106, 31, .2);
    border-color: var(--accent);
}

.sample__thumb-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: 4px;
    font-weight: var(--w-bold);
    font-size: 11px;
    flex-shrink: 0;
}

.sample__notes {
    background: rgba(255, 255, 255, .04);
    border-radius: var(--radius-md);
    padding: 16px;
    color: var(--demo-panel-ink);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sample__notes-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sample__notes-body[hidden] { display: none; }

.sample__notes-body.is-entering {
    animation: sampleTabFade .2s ease-out;
}

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

@media (prefers-reduced-motion: reduce) {
    .sample__notes-body.is-entering { animation: none; }
}

/* Mobile: horizontal scroll-snap carousel for note cards.
 * Grid/flex items default to min-width:auto which prevents overflow
 * scrolling; reset to 0 so the carousel stays within the grid cell. */
@media (max-width: 768px) {
    .sample { padding: 16px; gap: 16px; }
    .sample__slides { min-width: 0; }
    .sample__thumbs {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .sample__thumbs::-webkit-scrollbar { display: none; }
    .sample__thumb {
        flex: 0 0 auto;
        min-width: 140px;
        scroll-snap-align: start;
    }

    .sample__notes { min-width: 0; }
    .sample__notes-body {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .sample__notes-body::-webkit-scrollbar { display: none; }
    .sample__note {
        flex: 0 0 85%;
        scroll-snap-align: start;
    }
}

.sample__note {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

.sample__note-title {
    color: var(--accent);
    font-size: 13px;
    font-family: var(--font-mono);
    font-weight: var(--w-bold);
    margin-bottom: 8px;
    text-transform: none;
}

.sample__note-list {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
    color: var(--demo-panel-ink);
    font-size: 14px;
    line-height: 1.6;
}

.sample__length {
    display: flex;
    gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 14px;
}

.sample__length-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .15);
    color: var(--demo-panel-ink);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}

.sample__length-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.sample__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sample__action {
    padding: 10px 16px;
    min-height: 40px;
    font-size: 13px;
}

/* .btn--secondary / .btn--ghost default to dark `--ink` text which
 * becomes invisible against the near-black sample panel (`--demo-panel-bg`
 * = #0a0a0a). Re-light the text + border inside that scope so the
 * Download / Notion actions stay readable and pass WCAG AA. */
.sample__notes .btn--secondary {
    color: var(--demo-panel-ink);
    border-color: rgba(255, 255, 255, 0.22);
}
.sample__notes .btn--secondary:hover {
    color: var(--bg);
    border-color: var(--bg);
}
.sample__notes .btn--ghost {
    color: var(--demo-panel-ink);
}
.sample__notes .btn--ghost:hover {
    color: var(--demo-panel-ink);
    text-decoration: underline;
}

/* ============================================================
 * §7 Features grid
 * ============================================================ */
.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature {
    height: 100%;
    text-align: left;
}

.feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.feature__title {
    font-size: 18px;
    margin-bottom: 8px;
}

.feature__desc {
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.55;
}

/* ============================================================
 * §8 Comparison table
 * ============================================================ */
.compare__scroller {
    overflow: auto;
    max-height: 560px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    background: var(--bg);
}

.compare__table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg);
    font-size: 15px;
    min-width: 640px;
}

.compare__table th,
.compare__table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.compare__table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-soft);
    font-family: var(--font-display);
    font-weight: var(--w-bold);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
    border-bottom: 2px solid var(--border);
}

.compare__table tbody th {
    font-weight: var(--w-semi);
    color: var(--ink);
}

/* Zebra striping */
.compare__table tbody tr:nth-child(even) td,
.compare__table tbody tr:nth-child(even) th {
    background: var(--bg-soft);
}
.compare__table tbody tr:nth-child(even) .compare__col-us {
    background: #FFE4CF;
}

/* Competitor cells muted so the Us column visually pops */
.compare__table tbody td:not(.compare__col-us) {
    color: var(--muted);
}

/* Us column visually winning */
.compare__col-us {
    position: relative;
    background: var(--accent-soft);
    color: var(--ink);
    border-left: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
}
.compare__table thead th.compare__col-us {
    background: var(--accent-strong);
    color: #FFFFFF;
    padding-top: 32px;
    border-left-color: var(--accent-strong);
    border-right-color: var(--accent-strong);
}
.compare__table .compare__col-us strong {
    color: var(--accent-strong);
    font-weight: var(--w-bold);
}
.compare__table tbody tr:last-child .compare__col-us {
    border-bottom: 2px solid var(--accent);
}

/* "Recommended" pill floating above the Us column header */
.compare__badge {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-block;
    padding: 2px 10px;
    background: var(--highlight);
    color: var(--ink);
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: var(--w-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(10, 10, 10, 0.15);
}

/* Inline status icons driven by data-tone */
.compare__table tbody td[data-tone] {
    padding-left: 44px;
    position: relative;
}
.compare__table tbody td[data-tone]::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border-radius: 50%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
}
.compare__table tbody td[data-tone="yes"]::before {
    background-color: #0A7D2C;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4.5 8.2l2.3 2.3 4.7-4.7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.compare__table tbody td[data-tone="no"]::before {
    background-color: #C42B2B;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M5 5l6 6M11 5l-6 6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'/></svg>");
}
.compare__table tbody td[data-tone="warn"]::before {
    background-color: #C77A00;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 4v5M8 11v1' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'/></svg>");
}
.compare__table tbody td[data-tone=""]::before {
    display: none;
}
.compare__table tbody td[data-tone=""] {
    padding-left: 20px;
}

.compare__cta {
    margin-top: 28px;
    text-align: center;
}

/* ------------------------------------------------------------
 * Mobile card stack (≤ 640px).
 *
 * Keeps the underlying <table> semantics intact (SEO + a11y
 * both read the markup as a table) but visually re-flows each
 * <tr> into a stand-alone card. Each <td> is prefixed with
 * `data-label` content via ::before so the column header moves
 * next to its value — no horizontal scroll, no zoom required.
 *
 * Why not a horizontal-scroll fallback? The 640-px-wide
 * table on a 360-px viewport forced users into a sideways
 * scroll which buried the highlighted "Us" column. Cards put
 * every row's winning cell directly under the feature name.
 * ------------------------------------------------------------ */
@media (max-width: 640px) {
    .compare__scroller {
        overflow: visible;
        max-height: none;
        border: 0;
        box-shadow: none;
        background: transparent;
        border-radius: 0;
    }
    .compare__table {
        display: block;
        width: 100%;
        min-width: 0;
        font-size: 15px;
    }
    /* Visually hide the thead but keep it for screen readers. */
    .compare__table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .compare__table tbody {
        display: block;
    }
    .compare__table tbody tr {
        display: block;
        margin: 0 0 16px 0;
        padding: 18px 18px 6px 18px;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-card);
    }
    /* Reset zebra striping so every card has the same background. */
    .compare__table tbody tr:nth-child(even) td,
    .compare__table tbody tr:nth-child(even) th,
    .compare__table tbody tr:nth-child(even) .compare__col-us {
        background: transparent;
    }
    /* Feature name becomes the card title. */
    .compare__table tbody th[scope="row"] {
        display: block;
        padding: 0 0 12px 0;
        margin: 0 0 12px 0;
        font-family: var(--font-display);
        font-weight: var(--w-bold);
        font-size: 16px;
        color: var(--ink);
        border: 0;
        border-bottom: 1px solid var(--border);
    }
    /* Each option row: label (column header) + value. */
    .compare__table tbody td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        padding: 10px 0 10px 0;
        margin: 0;
        border: 0;
        color: var(--muted);
        text-align: right;
    }
    .compare__table tbody td::after {
        content: attr(data-label);
        order: -1;
        flex: 1 1 auto;
        text-align: left;
        font-weight: var(--w-semi);
        color: var(--ink);
        font-size: 14px;
    }
    /* Us row: highlighted band with left accent bar. */
    .compare__table tbody td.compare__col-us {
        position: relative;
        margin: 8px -18px -6px -18px;
        padding: 12px 18px 14px 18px;
        background: var(--accent-soft);
        color: var(--ink);
        border: 0;
        border-top: 1px solid var(--accent);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    .compare__table tbody td.compare__col-us strong {
        color: var(--accent-strong);
    }
    .compare__table tbody td.compare__col-us::after {
        color: var(--accent-strong);
    }
    /* Reset the data-tone icons (they'd collide with the flex layout). */
    .compare__table tbody td[data-tone] {
        padding-left: 0;
    }
    .compare__table tbody td[data-tone]::before {
        display: none;
    }
    /* Empty cells ("—") still render but with muted tone. */
    .compare__table tbody td:empty::after,
    .compare__table tbody td[data-tone=""]::after {
        /* still show the label */
    }
}

/* ============================================================
 * §9 Testimonials
 * ============================================================ */
.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 0 0 40px 0;
    padding: 0;
    list-style: none;
}

.testimonial {
    height: 100%;
    transition: transform .2s ease;
}

.testimonial:hover {
    transform: rotate(-0.5deg) translateY(-2px);
}

.testimonial__stars {
    display: flex;
    gap: 2px;
    color: #f5b400;
    margin-bottom: 12px;
}

.testimonial__star {
    stroke: none;
}

.testimonial__quote {
    margin: 0 0 16px 0;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.55;
}

.testimonial__quote p {
    color: var(--ink);
}

.testimonial__who {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.testimonial__author {
    font-style: normal;
    font-weight: var(--w-semi);
    color: var(--ink);
}

.testimonial__role {
    color: var(--muted);
    font-size: 13px;
}

.testimonials__trust-label {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.testimonials__orgs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.testimonials__org {
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
    background: var(--bg);
}

/* ============================================================
 * §10 Pricing
 * ============================================================ */
.pricing__toggle {
    display: inline-flex;
    margin-top: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 4px;
}

.pricing__toggle-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: var(--w-medium);
    color: var(--ink-2);
    cursor: pointer;
    font-family: inherit;
}

.pricing__toggle-btn.is-active {
    background: var(--ink);
    color: var(--accent-ink);
}

.pricing__toggle-save {
    margin-left: 6px;
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: var(--w-bold);
}

.pricing__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 0;
    padding: 24px 0;
    list-style: none;
    align-items: stretch;
}

.plan {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
}

.plan:hover {
    transform: translateY(-4px);
}

/* Pro/Featured plan lifted & visually dominant */
.plan--featured {
    border: 2px solid var(--accent);
    box-shadow: 0 20px 48px rgba(255, 106, 31, 0.22),
                0 8px 16px rgba(10, 10, 10, 0.08);
    transform: translateY(-8px);
    background:
        linear-gradient(180deg, var(--accent-soft) 0%, var(--bg) 140px);
}

.plan--featured:hover {
    transform: translateY(-12px);
}

.plan--featured .plan__cta {
    background: var(--accent);
    color: var(--accent-ink);
}

.plan__badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: #FFFFFF;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: var(--w-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
    box-shadow: 0 4px 12px rgba(10, 10, 10, 0.2);
    white-space: nowrap;
}

.plan--featured .plan__badge {
    background: var(--accent);
    color: #FFFFFF;
}

.plan__name {
    font-size: 20px;
    margin-bottom: 8px;
}

.plan__price {
    margin: 8px 0 4px 0;
    color: var(--ink);
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.plan__price-amount {
    font-family: var(--font-display);
    font-size: clamp(40px, 5vw, 56px);
    font-weight: var(--w-bold);
    line-height: 1;
    letter-spacing: -0.02em;
}

.plan__price-period {
    color: var(--muted);
    font-size: 14px;
    margin-left: 4px;
}

.plan__tagline {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.plan__features {
    list-style: none;
    margin: 0 0 24px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    color: var(--ink-2);
    font-size: 14px;
}

.plan__features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.plan__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 50%;
    background: #0A7D2C;
    color: transparent;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4.5 8.2l2.3 2.3 4.7-4.7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
}

.plan--featured .plan__check {
    background-color: var(--accent);
}

.plan__cta {
    width: 100%;
}

/* Mobile: show Pro plan first, remove vertical lift. */
@media (max-width: 768px) {
    .pricing__grid > [data-plan="pro"]  { order: -1; }
    .plan--featured {
        transform: none;
    }
    .plan--featured:hover {
        transform: none;
    }
}

/* ============================================================
 * §11 FAQ accordion
 * ============================================================ */
.faq__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq__item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px 4px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.faq__item[open] {
    border-color: rgba(255, 106, 31, .35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    list-style: none;
    padding: 18px 20px;
    font-family: var(--font-display);
    font-weight: var(--w-semi);
    font-size: 17px;
    color: var(--ink);
}

.faq__question::-webkit-details-marker {
    display: none;
}

.faq__chevron {
    font-size: 22px;
    color: var(--accent);
    transition: transform .2s ease;
    flex-shrink: 0;
}

.faq__item[open] .faq__chevron {
    transform: rotate(45deg);
}

.faq__answer {
    padding: 0 20px 20px 20px;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================================
 * §12 Final CTA
 * ============================================================ */
.section--final_cta {
    background: var(--bg-accent);
    text-align: center;
}

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

.final-cta__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    font-weight: var(--w-bold);
    color: var(--accent-strong);
    margin-bottom: 12px;
}

.final-cta__h2 {
    margin-bottom: 12px;
}

.final-cta__sub {
    color: var(--muted);
    font-size: 17px;
    margin-bottom: 24px;
}

.final-cta__cta {
    padding: 18px 32px;
    font-size: 17px;
}

.final-cta__ghost {
    margin-top: 16px;
    font-size: 14px;
    color: var(--muted);
}

.final-cta__ghost a {
    /* Inline-block + min-height gives the anchor a ≥24px target
     * box so Lighthouse / WCAG 2.5.8 (Target Size) stops flagging it.
     * Padding is vertical-only so visual position is unchanged. */
    display: inline-block;
    min-height: 24px;
    padding: 2px 0;
    color: var(--ink-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.final-cta__ghost a:hover {
    color: var(--accent);
}

/* ============================================================
 * Footer (§13)
 * ============================================================ */
.site-footer {
    background: var(--ink);
    color: rgba(255, 255, 255, 0.7);
    padding-top: var(--gap-lg);
    padding-bottom: calc(var(--gap-md) + var(--safe-bottom));  /* iPhone home indicator */
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(0, 2.4fr);
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 767px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-footer__tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.55;
    max-width: 260px;
}

/* Pixel mascot in the footer brand block */
.site-footer__mascot {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    margin-top: 4px;
    filter: drop-shadow(0 4px 10px rgba(255, 106, 31, 0.35));
}

.site-footer__col a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.site-footer__cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 767px) {
    .site-footer__cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

.site-footer__col-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: var(--w-bold);
    color: var(--bg);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.site-footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-footer__col a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
}

.site-footer__col a:hover,
.site-footer__col a[aria-current="page"] {
    color: var(--accent);
}

.site-footer__bottom {
    padding-top: 24px;
}

.site-footer__copy {
    /* Was rgba(.45) → 4.48:1 on #0a0a0a (failed by 0.02). Raised
     * to .6 → 5.6:1 on the same ink background. */
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin: 0;
    text-align: center;
}

/* =====================================================================
   Static pages (Privacy, Terms, Contact)
   ===================================================================== */
.page-content {
    padding-top: 100px;
}

.page-content__h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 40px);
    font-weight: var(--w-bold);
    margin-bottom: 8px;
}

.page-content__updated,
.page-content__intro {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.page-content h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: var(--w-semi);
    margin-top: 32px;
    margin-bottom: 12px;
}

.page-content p {
    line-height: 1.7;
    margin-bottom: 16px;
    color: var(--ink-2);
}

/* 404 page */
.page-404 { text-align: center; }
.page-404__code {
    font-family: var(--font-display);
    font-size: clamp(80px, 15vw, 160px);
    font-weight: var(--w-bold);
    line-height: 1;
    color: var(--border);
    margin-bottom: var(--gap-sm);
}
.page-404__cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: var(--gap-md);
}

.page-content__email a {
    color: var(--accent);
    font-weight: var(--w-medium);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 560px;
    margin-top: 24px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 14px;
    font-weight: var(--w-medium);
    color: var(--ink);
}

.form-field input,
.form-field textarea {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--bg);
    transition: border-color 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 106, 31, 0.12);
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form__submit {
    align-self: flex-start;
}

/* =====================================================================
   Language select
   ===================================================================== */
.lang-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    width: 100%;
    max-width: 220px;
}

.lang-select--footer {
    color: rgba(255, 255, 255, 0.7);
}

.lang-select--footer:hover,
.lang-select--footer:focus {
    border-color: var(--accent);
    color: #fff;
}

.lang-select--footer option {
    background: var(--ink);
    color: #fff;
}

.lang-select--nav {
    color: var(--ink);
    border-color: var(--border);
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    min-width: 90px;
    max-width: 160px;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lang-select--nav:hover,
.lang-select--nav:focus {
    border-color: var(--accent);
}

.lang-select--nav option {
    background: var(--bg);
    color: var(--ink);
}

/* =====================================================================
   Waitlist modal
   ===================================================================== */
.modal {
    /* Native <dialog>:modal is positioned fixed with inset: 0; margin: auto
       auto-centers it. Our global reset zeroes margins on every element,
       so we must restore margin:auto here to recover the built-in centering. */
    position: fixed;
    inset: 0;
    margin: auto;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--ink);
    max-width: min(440px, calc(100vw - 32px));
    width: 100%;
    max-height: calc(100vh - 32px);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px -20px rgba(20, 20, 40, .35), 0 0 0 1px rgba(0, 0, 0, .06);
    overflow: visible;
}

.modal::backdrop {
    background: rgba(10, 10, 20, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal[open] {
    animation: modalIn 180ms ease-out;
}

.modal[open]::backdrop {
    animation: modalBackdropIn 180ms ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalBackdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .modal[open],
    .modal[open]::backdrop {
        animation: none;
    }
}

.modal__inner {
    position: relative;
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 32px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--ink-2);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 120ms ease, color 120ms ease;
}

.modal__close:hover {
    background: var(--bg-soft);
    color: var(--ink);
}

.modal__close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.modal__title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: var(--w-bold);
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0;
    padding-right: 32px;
}

.modal__sub {
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

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

.modal__label {
    font-size: 13px;
    font-weight: var(--w-medium, 500);
    color: var(--ink);
}

.modal__input {
    font: inherit;
    font-size: 15px;
    padding: 12px 14px;
    border: 1px solid rgba(10, 10, 20, 0.18);
    border-radius: var(--radius-md);
    background: var(--bg);
    color: var(--ink);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.modal__input::placeholder {
    color: rgba(10, 10, 20, 0.38);
}

.modal__input:hover {
    border-color: rgba(10, 10, 20, 0.32);
}

.modal__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.modal__input:invalid:not(:placeholder-shown) {
    border-color: #d64545;
}

.modal__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.modal__submit {
    width: 100%;
    justify-content: center;
    position: relative;
}

.modal__submit[data-loading="1"] {
    color: transparent;
    pointer-events: none;
}

.modal__submit[data-loading="1"]::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--accent-ink);
    border-radius: 50%;
    animation: modalSpin 700ms linear infinite;
}

@keyframes modalSpin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .modal__submit[data-loading="1"]::after {
        animation: none;
    }
}

.modal__status {
    margin: 0;
    min-height: 1.2em;
    font-size: 14px;
    line-height: 1.4;
    color: var(--ink-2);
}

.modal__status[data-state="success"] {
    color: #1a7f37;
    font-weight: var(--w-medium, 500);
}

.modal__status[data-state="error"] {
    color: #d64545;
    font-weight: var(--w-medium, 500);
}

.modal__status[data-state="pending"] {
    color: var(--ink-2);
    font-style: italic;
}

.modal__privacy {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(10, 10, 20, 0.5);
    text-align: center;
}

@media (max-width: 479px) {
    .modal__inner {
        padding: 28px 20px 24px;
    }
    .modal__title {
        font-size: 20px;
    }
}

/* =====================================================================
   Toast (copy-to-clipboard feedback)
   ===================================================================== */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(16px);
    z-index: 1100;
    min-width: 140px;
    max-width: calc(100vw - 32px);
    padding: 12px 18px;
    border-radius: var(--radius-pill);
    background: var(--ink);
    color: var(--bg);
    font-size: 14px;
    font-weight: var(--w-medium, 500);
    line-height: 1.3;
    text-align: center;
    box-shadow: 0 10px 30px -8px rgba(10, 10, 20, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast[data-state="visible"] {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast[data-variant="error"] {
    background: #c2410c;
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: opacity 120ms linear;
        transform: translateX(-50%);
    }
    .toast[data-state="visible"] {
        transform: translateX(-50%);
    }
}

/* Button "Copied!" flash state — subtle check-like highlight */
.sample__action.is-copied {
    background: #1a7f37;
    border-color: #1a7f37;
    color: #fff;
}

.sample__action.is-copied:hover {
    background: #1a7f37;
}

/* ============================================================
 * Mobile sticky CTA bar
 *
 * Shows on ≤768px after the user scrolls past the hero; hidden again
 * when the footer comes into view. Desktop never sees it (display:none
 * at min-width: 769px). iOS home-indicator padding via safe-area inset.
 * ============================================================ */
.sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    padding: 12px 16px calc(12px + var(--safe-bottom));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-top: 1px solid rgba(10, 10, 20, 0.08);
    box-shadow: 0 -8px 24px -12px rgba(10, 10, 20, 0.18);
    transform: translateY(calc(100% + var(--safe-bottom)));
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms ease, opacity 180ms ease;
    display: flex;
}

.sticky-cta[data-state="visible"] {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.sticky-cta__btn {
    flex: 1 1 auto;
    min-height: 48px;
    font-size: 16px;
    justify-content: center;
}

/* Hide completely on tablet + desktop — never injected into layout. */
@media (min-width: 769px) {
    .sticky-cta {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sticky-cta {
        transition: opacity 120ms linear;
        transform: none;
    }
    .sticky-cta[data-state="hidden"] {
        opacity: 0;
    }
}

/*
 * Reserve scroll space on mobile so the sticky CTA never obscures the
 * last FAQ accordion item or the final section of <main>. The padding
 * lives on <main>, not <body>, so the <footer> still sits flush against
 * the end of the document — that lets the IntersectionObserver in
 * sticky-cta.js detect "footer in view" and hide the bar properly.
 */
@media (max-width: 768px) {
    main {
        padding-bottom: calc(72px + var(--safe-bottom));
    }
}

/* ============================================================
 * Reduced motion hover-transform override
 * ============================================================
 * The universal `*, *::before, *::after { transition-duration: 0.01ms }`
 * rule in reset.css only zeroes the *duration* of transitions; it does
 * NOT cancel the target transform state itself. So elements like the
 * buttons and the pricing cards still "jump" to their hover state
 * instantly on pointer-over.
 *
 * For users who opted in to reduced motion, any transform-based hover
 * animation is precisely the kind of UI shift they want suppressed
 * (vestibular safety). Zero-out the transforms so the visual rests.
 * Colour / background hovers remain — they're not motion. */
@media (prefers-reduced-motion: reduce) {
    .btn--primary:hover,
    .btn--secondary:hover,
    .formats__chip:hover,
    .testimonial:hover,
    .plan:hover,
    .plan--featured:hover {
        transform: none;
    }
}

/* ============================================================
 * Content-visibility for below-the-fold sections.
 *
 * `content-visibility: auto` tells the browser it may skip style /
 * layout / paint work for a subtree until the section is close to the
 * viewport. On our landing page that moves about 200-300 ms of Style &
 * Layout off the critical path on throttled mobile, dropping mobile
 * LCP Render Delay by ≈ 400 ms (simulated 4× slowdown amplifies the
 * real-world gain).
 *
 * `contain-intrinsic-size: auto 600px` gives each section a placeholder
 * box while it is skipped. `auto` means the browser remembers the last
 * rendered size after the first paint, so subsequent scrolls don't
 * re-pop-in. 600 px is a reasonable first-guess minimum height for a
 * landing section (matches the shortest sections — formats, compare).
 * Anchor scrolling is unaffected because scroll.js already
 * re-triggers `scrollIntoView` on the `load` event via a short retry
 * loop to absorb late layout.
 *
 * Hero + upload stay without the hint — they are above the fold and
 * already in the initial viewport. Applying content-visibility to them
 * would force a re-layout the moment the browser realises they ARE
 * visible, which is strictly a loss.
 * ============================================================ */
.section--features,
.section--formats,
.section--how,
.section--sample,
.section--use_cases,
.section--testimonials,
.section--compare,
.section--pricing,
.section--faq,
.section--final_cta {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

/* ============================================================
 * RTL overrides (Arabic)
 * ============================================================ */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .hero__cta-row { flex-direction: row-reverse; }
[dir="rtl"] .hero__trust { direction: rtl; }
[dir="rtl"] .btn svg,
[dir="rtl"] .site-nav__cta svg { transform: scaleX(-1); }
[dir="rtl"] .site-nav__list { direction: rtl; }
[dir="rtl"] .site-footer__cols { direction: rtl; }
[dir="rtl"] .sample__notes { direction: rtl; }
[dir="rtl"] .plan__features li { direction: rtl; }
[dir="rtl"] .upload__mascot { right: auto; left: -16px; }
[dir="rtl"] .lang-select {
    background-position: left 8px center;
    padding: 8px 12px 8px 32px;
}
