/* =========================================================
   Zurnl — Site stylesheet (marketing/info pages)
   Separate from style.css which drives the PhotoSwipe reader.
   ========================================================= */

/* ---------- Light theme (default) ---------- */
:root,
[data-theme="light"] {
    /* Brand palette */
    --bg: #ffffff;
    --bg-soft: #f7f9fc;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-2: #f2f5f9;
    --text: #0f172a;
    --text-muted: #475569;
    --text-soft: #64748b;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;
    --primary-soft-2: #dbeafe;
    --accent: #0ea5e9;
    --accent-2: #8b5cf6;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .08), 0 2px 4px -2px rgba(15, 23, 42, .06);
    --shadow-lg: 0 12px 24px -8px rgba(15, 23, 42, .12), 0 4px 12px -4px rgba(15, 23, 42, .08);
    --shadow-xl: 0 24px 48px -16px rgba(15, 23, 42, .18);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 999px;

    --container: 1200px;
    --container-narrow: 820px;

    --transition: all .2s cubic-bezier(.4, 0, .2, 1);

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    color-scheme: light;
}

/* ---------- Dark theme (manual override) ---------- */
[data-theme="dark"] {
    --bg: #0b1120;
    --bg-soft: #0f172a;
    --bg-elevated: #111827;
    --surface: #111827;
    --surface-2: #1e293b;
    --text: #f1f5f9;
    --text-muted: #cbd5e1;
    --text-soft: #94a3b8;
    --border: #1e293b;
    --border-strong: #334155;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-soft: rgba(59, 130, 246, .14);
    --primary-soft-2: rgba(59, 130, 246, .28);
    --accent: #38bdf8;
    --accent-2: #a78bfa;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .35);
    --shadow-lg: 0 12px 24px -8px rgba(0, 0, 0, .5);
    --shadow-xl: 0 24px 48px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
}

/* Auto dark fallback ONLY when no manual theme is chosen by the user. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]):not([data-theme="light"]) {
        --bg: #0b1120;
        --bg-soft: #0f172a;
        --bg-elevated: #111827;
        --surface: #111827;
        --surface-2: #1e293b;
        --text: #f1f5f9;
        --text-muted: #cbd5e1;
        --text-soft: #94a3b8;
        --border: #1e293b;
        --border-strong: #334155;
        --primary: #3b82f6;
        --primary-hover: #60a5fa;
        --primary-soft: rgba(59, 130, 246, .14);
        --primary-soft-2: rgba(59, 130, 246, .28);
        --accent: #38bdf8;
        --accent-2: #a78bfa;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .35);
        --shadow-lg: 0 12px 24px -8px rgba(0, 0, 0, .5);
        --shadow-xl: 0 24px 48px -16px rgba(0, 0, 0, .6);
        color-scheme: dark;
    }
}

/* Smooth theme transition (skip for reduced-motion users). */
[data-theme],
:root:not([data-theme]) {
    transition: background-color .2s ease, color .2s ease;
}
@media (prefers-reduced-motion: reduce) {
    [data-theme], :root:not([data-theme]) { transition: none !important; }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 1rem;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: .35rem; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--text);
    margin-bottom: .6em;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { color: var(--text-muted); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Accessibility ---------- */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--primary);
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: 0 0 var(--radius-sm) 0;
    z-index: 1000;
    font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.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;
}

/* ---------- Layout helpers ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.25rem;
}
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section--alt { background-color: var(--bg-soft); }
.section--primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
}
.section--primary h1,
.section--primary h2,
.section--primary h3 { color: #fff; }
.section--primary p { color: rgba(255, 255, 255, .92); }

.section-head { max-width: 760px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-soft);
    padding: .35rem .75rem;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}
.lead { font-size: 1.15rem; color: var(--text-muted); }
.section--primary .eyebrow { background: rgba(255, 255, 255, .15); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .85rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px;
    text-align: center;
    line-height: 1;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--primary); background: var(--primary-soft); }
.btn-white {
    background: #fff;
    color: var(--primary);
}
.btn-white:hover { color: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-white-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .6);
}
.btn-white-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 1rem 1.85rem; font-size: 1.05rem; }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; min-height: 40px; }

/* ---------- Header / Nav ---------- */
:root { --header-h: 64px; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 100%;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text);
    letter-spacing: -.04em;
    line-height: 1;
}
.brand:hover { color: var(--text); }
.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.brand-name { display: inline-block; }

.nav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    padding: .5rem .75rem;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    display: inline-block;
    line-height: 1.2;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--primary); font-weight: 600; }

.nav-cta { display: flex; align-items: center; gap: .5rem; }

/* Theme toggle button */
.theme-toggle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary-soft-2); background: var(--primary-soft); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--text);
    flex-shrink: 0;
}
.nav-toggle:hover { color: var(--primary); border-color: var(--primary-soft-2); }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

@media (max-width: 880px) {
    :root { --header-h: 60px; }
    .brand { font-size: 1.2rem; }
    .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
    .nav-cta .btn-primary { display: none; }   /* hide "Open Reader" button on mobile — accessible via menu */
    .nav-toggle { display: inline-flex; }

    .nav-links {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: .15rem;
        background: var(--bg-elevated);
        padding: 1rem 1.25rem 1.5rem;
        margin: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        transform: translateY(-130%);
        visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }
    .nav-links.is-open {
        transform: translateY(0);
        visibility: visible;
        transition: transform .25s ease, visibility 0s linear 0s;
    }
    .nav-links a { padding: .85rem .75rem; font-size: 1rem; border-radius: var(--radius-sm); }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(3rem, 7vw, 6rem);
    background:
      radial-gradient(900px 500px at 85% -10%, rgba(14, 165, 233, .12), transparent 60%),
      radial-gradient(700px 400px at 0% 110%, rgba(139, 92, 246, .10), transparent 60%),
      var(--bg);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.75rem; }
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: .9rem;
}
.hero-meta strong { color: var(--text); font-weight: 700; display: block; font-size: 1.4rem; letter-spacing: -.02em; }

/* ---------- Hero illustration ---------- */
.hero-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
/* Theme tokens consumed by the inline SVG via CSS custom properties */
.hero-illustration {
    --brand-a: var(--primary);
    --brand-b: var(--accent);
    --brand-c: var(--accent-2);
    --brand-d: var(--accent);
    --paper-bg: var(--surface);
    --paper-line: var(--border);
    --paper-ink: var(--text);
    --paper-img: var(--primary-soft-2);
    --paper-img-2: var(--primary-soft);
    --paper-banner: var(--surface-2);
    --phone-bar: var(--primary);
    --phone-img: var(--primary-soft-2);
    --phone-img-2: var(--primary-soft);

    width: 100%;
    max-width: 540px;
    height: auto;
    display: block;
    filter: drop-shadow(0 24px 48px rgba(15, 23, 42, .18));
}
[data-theme="dark"] .hero-illustration,
:root:not([data-theme="light"]) .hero-illustration {
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .55));
}

/* Soft entrance animation (respects reduced motion via the global rule). */
.hero-illustration { animation: hero-pop .5s cubic-bezier(.2, .8, .25, 1) both; }
@keyframes hero-pop {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: translateY(0)   scale(1);   }
}

.hero-illustration-caption {
    text-align: center;
    color: var(--text-soft);
    font-size: .95rem;
    max-width: 360px;
    line-height: 1.5;
}
.hero-illustration-caption strong { color: var(--text); font-weight: 600; }
.hero-illustration-caption a {
    display: inline-block;
    margin-top: .35rem;
    font-weight: 600;
}

@media (max-width: 880px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .hero-illustration { max-width: 420px; }
}
@media (max-width: 480px) {
    .hero-illustration { max-width: 360px; }
}

/* ---------- Stats strip ---------- */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 2rem 1.25rem;
    border-block: 1px solid var(--border);
    background: var(--bg-soft);
}
.stat { text-align: center; }
.stat-num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -.03em;
    color: var(--text);
}
.stat-label { color: var(--text-soft); font-size: .9rem; margin-top: .15rem; }
@media (max-width: 640px) {
    .stats-strip { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}

/* ---------- Card grids ---------- */
.grid {
    display: grid;
    gap: 1.5rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}
.card:hover {
    border-color: var(--primary-soft-2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--primary-soft);
    color: var(--primary);
    display: grid;
    place-items: center;
    margin-bottom: 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }
.card-title { font-size: 1.2rem; margin-bottom: .5rem; }
.card p { color: var(--text-muted); font-size: .97rem; }

/* Variation: icon color accents */
.card.accent-2 .card-icon { background: rgba(14, 165, 233, .12); color: var(--accent); }
.card.accent-3 .card-icon { background: rgba(139, 92, 246, .12); color: var(--accent-2); }
.card.accent-4 .card-icon { background: rgba(5, 150, 105, .12); color: var(--success); }
.card.accent-5 .card-icon { background: rgba(217, 119, 6, .12); color: var(--warning); }

/* ---------- How-it-works / steps ---------- */
.steps {
    counter-reset: step;
    display: grid;
    gap: 1.5rem;
}
.step {
    position: relative;
    padding: 1.75rem 1.75rem 1.75rem 4.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 1.5rem;
    top: 1.6rem;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: -.02em;
}
.step h3 { margin-bottom: .35rem; }
@media (max-width: 620px) {
    .step { padding-left: 4.25rem; }
    .step::before { left: 1rem; width: 40px; height: 40px; }
}

/* ---------- Content / article prose ---------- */
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { margin-top: 2.5rem; margin-bottom: .9rem; }
.prose h3 { margin-top: 1.75rem; margin-bottom: .65rem; }
.prose p, .prose ul, .prose ol { color: var(--text-muted); margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose strong { color: var(--text); }
.prose a { font-weight: 500; }
.lead-para { font-size: 1.2rem; color: var(--text); margin-bottom: 1.5rem; }

/* ---------- FAQ ---------- */
.faq {
    max-width: 820px;
    margin-inline: auto;
    display: grid;
    gap: .85rem;
}
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
    transition: var(--transition);
}
.faq-item.is-open { border-color: var(--primary-soft-2); box-shadow: var(--shadow-md); }
.faq-trigger {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    padding: 1.15rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.35;
}
.faq-trigger:hover { color: var(--primary); }
.faq-trigger:focus-visible { outline-offset: -3px; }
.faq-chevron { flex-shrink: 0; transition: transform .2s ease; color: var(--text-soft); }
.faq-item.is-open .faq-chevron { transform: rotate(180deg); color: var(--primary); }
.faq-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
}
.faq-panel-inner { padding: 0 1.25rem 1.25rem; color: var(--text-muted); }

/* ---------- CTA band ---------- */
.cta-band {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: clamp(2.25rem, 5vw, 3.5rem);
    text-align: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}
.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 250px at 50% 0%, rgba(255, 255, 255, .15), transparent 70%);
    pointer-events: none;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .92); font-size: 1.1rem; max-width: 600px; margin: .75rem auto 1.75rem; }
.cta-band .btn-white { margin-inline: .25rem; }

/* ---------- Reader widget (CTA card on homepage) ---------- */
.reader-cta {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}
.reader-cta h3 { font-size: 1.5rem; }
.reader-cta .btn { margin-top: 1rem; }

/* ---------- Publication chips ---------- */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.25rem;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}
.chip:hover { color: var(--primary); border-color: var(--primary-soft-2); background: var(--primary-soft); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.chip:nth-child(3n) .chip-dot { background: var(--accent-2); }
.chip:nth-child(4n) .chip-dot { background: var(--success); }

/* ---------- Forms ---------- */
.form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 1.1rem; }
.form label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .4rem;
    font-size: .92rem;
}
.form input,
.form select,
.form textarea {
    width: 100%;
    padding: .8rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    transition: var(--transition);
}
.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft-2);
}
/* Make native <select> dropdown options inherit the page theme where supported */
select option { color: #0f172a; background: #fff; }
[data-theme="dark"] select option,
:root:not([data-theme="light"]) select option {
    color: #f1f5f9;
    background: #111827;
}
.form textarea { min-height: 140px; resize: vertical; }
.form-help { font-size: .85rem; color: var(--text-soft); margin-top: .35rem; }
.form-note { font-size: .85rem; color: var(--text-soft); margin-top: 1rem; text-align: center; }

/* ---------- Reader form (specialized inputs inside #reader) ---------- */
.reader-form { box-shadow: var(--shadow-lg); }
.reader-form .form-group { margin-bottom: 1.25rem; }
.reader-form > .form-group:last-of-type { margin-bottom: 1.5rem; }

.type-toggle { display: flex; gap: .5rem; }
.radio-label { flex: 1; cursor: pointer; }
.radio-label input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.radio-label input:focus-visible + .toggle-btn {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
.toggle-btn {
    display: block;
    text-align: center;
    padding: .65rem;
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 600;
    font-size: .97rem;
    -webkit-user-select: none;
    user-select: none;
}
.radio-label input:checked + .toggle-btn {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.toggle-btn:hover {
    border-color: var(--primary-soft-2);
    color: var(--primary);
}
.radio-label input:checked + .toggle-btn:hover {
    border-color: var(--primary-hover);
    color: #fff;
}

.dropdown-container { position: relative; }
.input-wrapper, .select-wrapper { position: relative; }
.search-icon, .chevron-icon {
    position: absolute;
    width: 20px;
    height: 20px;
    color: var(--text-soft);
    pointer-events: none;
}
.search-icon {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
}
.input-wrapper input { padding-left: 2.75rem; }
.chevron-icon {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}
.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.75rem;
}

.dropdown-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    z-index: 50;
    list-style: none;
    margin: 0;
    box-shadow: var(--shadow-lg);
}
.dropdown-list[hidden] { display: none; }

/* ---------- Spinner / reader CTA variants ---------- */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.25rem;
}
.attempt-counter {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    padding: .25rem .75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 1rem;
}
.reader-cta {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}
.reader-cta--error { border-color: rgba(220, 38, 38, .35); }
.reader-cta-actions {
    display: flex;
    gap: .6rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Contact card ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; display: grid; gap: 1.25rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-soft);
    color: var(--primary);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-meta { color: var(--text-soft); font-size: .85rem; margin-bottom: .15rem; }
.contact-val { color: var(--text); font-weight: 600; }

/* ---------- Legal / policy pages ---------- */
.legal { max-width: 880px; margin-inline: auto; }
.legal h1 { margin-bottom: .4rem; }
.legal-meta {
    color: var(--text-soft);
    font-size: .9rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.legal-updated { font-weight: 600; color: var(--text); }
.legal h2 { margin-top: 2.25rem; font-size: 1.4rem; }
.legal h3 { margin-top: 1.5rem; font-size: 1.1rem; }
.legal ol, .legal ul { padding-left: 1.4rem; }
.legal li { margin-bottom: .5rem; color: var(--text-muted); }
.legal p { color: var(--text-muted); }
.toc {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
}
.toc strong { display: block; margin-bottom: .65rem; color: var(--text); }
.toc ol { list-style: decimal; padding-left: 1.4rem; display: grid; gap: .3rem; }
.toc a { color: var(--text-muted); font-weight: 500; }
.toc a:hover { color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    padding-block: 3.5rem 1.5rem;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: var(--text-soft); font-size: .95rem; margin-top: .85rem; max-width: 320px; }
.footer-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-soft); margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.footer-col a { color: var(--text-muted); font-size: .95rem; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-soft);
    font-size: .88rem;
}
.footer-bottom a { color: var(--text-soft); }
.footer-bottom a:hover { color: var(--primary); }
.footer-social { display: flex; gap: .5rem; }
.footer-social a {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-soft);
}
.footer-social a:hover { color: var(--primary); border-color: var(--primary-soft-2); background: var(--primary-soft); }
.footer-social svg { width: 18px; height: 18px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; font-size: .88rem; color: var(--text-soft); margin-bottom: 1.5rem; }
.breadcrumb li { display: inline-flex; align-items: center; gap: .4rem; }
.breadcrumb li + li::before { content: "/"; color: var(--border-strong); margin-right: .35rem; }
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb [aria-current] { color: var(--text); font-weight: 500; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
    background:
      radial-gradient(700px 360px at 100% 0%, rgba(14, 165, 233, .10), transparent 60%),
      var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding-block: clamp(2.25rem, 5vw, 3.5rem);
}
.page-hero .container { max-width: var(--container-narrow); }
.page-hero h1 { margin-bottom: .65rem; }
.page-hero p { font-size: 1.15rem; color: var(--text-muted); max-width: 680px; }

/* ---------- Toast / status (contact form) ---------- */
.form-status {
    border-radius: var(--radius-sm);
    padding: .85rem 1rem;
    font-size: .92rem;
    margin-top: 1rem;
    display: none;
}
.form-status.show { display: block; }
.form-status.success { background: rgba(5, 150, 105, .12); color: var(--success); border: 1px solid rgba(5, 150, 105, .3); }
.form-status.error { background: rgba(220, 38, 38, .12); color: var(--danger); border: 1px solid rgba(220, 38, 38, .3); }

/* ---------- Misc ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }
.kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .85em;
    padding: .1rem .4rem;
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--text);
}
.divider { height: 1px; background: var(--border); margin-block: 2.5rem; border: none; }

/* ---------- PhotoSwipe overlay styling
   Rules for the full-screen reader overlay that app.js opens.
   Kept here so we don't have to load style.css for the marketing site. */
.view { display: none; }
.view.active {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 540px;
    margin-inline: auto;
}
.dropdown-list li {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color .1s;
    min-height: 44px;
    color: var(--text);
    border-radius: var(--radius-sm);
}
.dropdown-list li:hover,
.dropdown-list li.active { background: var(--surface-2); }

.custom-pswp-header {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, rgba(0,0,0,.8), rgba(0,0,0,0));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 10000;
    color: #fff;
}
.header-btn {
    background: rgba(255, 255, 255, .1);
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: var(--transition);
    min-height: 44px;
}
.header-btn:hover { background: rgba(255, 255, 255, .2); }
.header-btn svg { width: 18px; height: 18px; }

/* Header controls group + fullscreen toggle */
.header-controls {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.fullscreen-btn .icon-exit-fullscreen { display: none; }
.fullscreen-btn[aria-pressed="true"] .icon-enter-fullscreen { display: none; }
.fullscreen-btn[aria-pressed="true"] .icon-exit-fullscreen { display: block; }

.header-title-group { text-align: center; flex: 1; margin: 0 15px; overflow: hidden; }
.header-pub-title { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; margin: 0; color: #fff; }
.header-pub-date { font-size: .75rem; color: rgba(255, 255, 255, .7); }
.pswp__top-bar { display: none !important; }
.pswp-retry-btn { margin-top: 15px; padding: 8px 24px; min-height: 40px; display: inline-block; }
@media (max-width: 600px) {
    .header-pub-title { font-size: .9rem; }
    .header-btn span:not(.page-indicator) { display: none; }
    .custom-pswp-header { padding: 0 10px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
