/* =============================================================
   HiQR — style.css
   -------------------------------------------------------------
   Mobile-first. Base rules target a 320px phone; each media query
   only ADDS complexity for more room, never patches a broken
   layout. Breakpoints used throughout:
     (base)   320px+  — one column, stacked, thumb-sized targets
     --bp-xs  480px+  — small phones in landscape / large phones
     --bp-sm  640px+  — big phones landscape / small tablets
     --bp-md  768px+  — tablets (iPad portrait)
     --bp-lg  1024px+ — tablets landscape / small laptops
     --bp-xl  1180px+ — desktop, container reaches max-width

   Table of contents:
     1. Design tokens
     2. Reset & base
     3. Layout utilities
     4. Header & nav
     5. Buttons
     6. Hero
     7. Generator (the product itself)
     8. Feature cards
     9. Supported types grid
    10. Comparison table
    11. FAQ accordion
    12. Final CTA + footer
    13. Scroll-reveal animation system
    14. Accessibility & motion preferences
============================================================= */

/* -------------------------------------------------------------
   1. Design tokens
------------------------------------------------------------- */
:root {
    color-scheme: dark;

    /* Brand Identity v2 — single permanent dark theme (no light/dark
       toggle). Exact values per spec: */
    --paper: #0C1126;      /* main background — body, header, hero, footer */
    --accent: #5170FF;     /* primary buttons, CTAs, active states, links, emphasis */
    --surface: #151B36;    /* Create QR container, cards, panels, form sections */
    --ink: #FFFFFF;        /* primary text, icons on dark */

    /* Derived tones — not in the spec verbatim, but needed to build a
       full UI from the four brand colors above (secondary text,
       borders, hover states, elevation). Tuned to sit comfortably
       between --paper and --surface. */
    --ink-soft: #E7E9F5;
    --surface-2: #1B2247;
    --surface-card: #151B36;
    --line: #232C52;
    --line-strong: #303B6B;
    --muted: #9CA3C7;
    --muted-2: #6B729B;

    --accent-deep: #8FA4FF;              /* text-on-accent-tint (needs to be bright, reads on dark) */
    --accent-hover: #6D89FF;             /* lighter shade for hover/lift states on accent-filled elements */
    --accent-tint: rgba(81,112,255,0.16);
    --accent-tint-2: rgba(81,112,255,0.10);

    /* Header glass state — solid at the top of the page, translucent
       + blurred once scrolled (see .site-header.is-scrolled). */
    --glass-header: rgba(12,17,38,0.72);
    --glass-header-border: rgba(255,255,255,0.08);

    /* Form fields sitting on the --surface panel. */
    --input-bg: rgba(255,255,255,0.05);

    /* Ambient dot-grid texture behind the whole page. */
    --bg-field-dot: rgba(255,255,255,0.05);

    /* QR Preview area — ALWAYS a plain white card with black-on-white
       QR output, regardless of anything else on the page. This is a
       hard brand requirement (QR contrast affects real-world scan
       reliability), so these never change. */
    --qr-area-bg: #FFFFFF;
    --qr-area-border: #E4E4E9;
    --qr-area-text: #9494A0;

    /* Typography */
    --font-display: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;

    /* Scale */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.30), 0 1px 1px rgba(0,0,0,0.24);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.40), 0 2px 8px rgba(0,0,0,0.28);
    --shadow-lg: 0 24px 64px rgba(0,0,0,0.55), 0 8px 24px rgba(0,0,0,0.32);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --dur-fast: 160ms;
    --dur-med: 320ms;
    --dur-slow: 640ms;
    --dur-theme: 240ms;

    /* Fluid spacing units — scale gently between phone and desktop
       instead of jumping at breakpoints. Used for section padding. */
    --space-section: clamp(56px, 10vw, 112px);
    --space-lg: clamp(28px, 5vw, 56px);
    --space-md: clamp(18px, 3.4vw, 32px);

    --container: 1180px;
    --tap: 44px; /* minimum comfortable touch target */
}

/* -------------------------------------------------------------
   2. Reset & base
------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    /* Prevents Android Chrome's automatic font-boosting ("text autosizer"),
       which otherwise inflates font sizes unpredictably inside narrow
       multi-column layouts. -webkit- covers older Chrome/Android builds;
       the unprefixed property covers current Chrome Mobile. */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    max-width: 100%;
    overflow-x: hidden;
    /* Stops Chrome's horizontal overscroll/edge-swipe (back/forward
       navigation gesture) from being mistaken for page scroll on phones. */
    overscroll-behavior-x: none;
    /* Keeps anchor-link targets (nav links, #generator, #faq, etc.)
       from landing underneath the fixed header. */
    scroll-padding-top: 65px;
}
body {
    margin: 0;
    max-width: 100%;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    /* Smooth, non-jarring shift when the theme toggle flips light/dark. */
    transition: background-color var(--dur-theme) var(--ease-out), color var(--dur-theme) var(--ease-out);
    /* The header is position:fixed (see .site-header) and removed from
       normal document flow, so this padding reserves the exact space
       it occupies — otherwise the Hero heading would start underneath
       it. Kept in sync with .header-inner's height + its 1px border
       at each breakpoint (64px + 1px here, 68px + 1px at 1024px+). */
    padding-top: 65px;
    /* Removes the gray/blue flash Chrome Mobile shows on every tap;
       each interactive element still gets its own :active/:hover state. */
    -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    /* Removes Chrome Mobile's default 300ms tap delay / double-tap-zoom
       handling on custom buttons, without touching any layout or visuals. */
    touch-action: manipulation;
}
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* Safety net so an unexpectedly long unbroken string (long email,
   URL, etc. typed into the generator) can never force horizontal
   scroll — normal text wrapping is unaffected either way. */
h1, h2, h3, h4, p, a, button, label, dd, dt {
    overflow-wrap: break-word;
    word-break: normal;
}

::selection { background: var(--accent); color: #fff; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* focus visibility — kept crisp for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* -------------------------------------------------------------
   3. Layout utilities
------------------------------------------------------------- */
.wrap {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}
@media (min-width: 640px) { .wrap { padding-inline: 28px; } }
@media (min-width: 1024px) { .wrap { padding-inline: 32px; } }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin: 0 0 14px;
}

/* Ambient background field — faint module-grid dot pattern that ties
   every section back to the QR/data-grid motif without being loud. */
.bg-field {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(circle at 1px 1px, var(--bg-field-dot) 1px, transparent 0);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 70%);
}

/* Full-width utility — used to make CTAs thumb-friendly on phones */
.btn-block { width: 100%; }

/* -------------------------------------------------------------
   4. Header & nav (mobile-first: hamburger by default)
------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--paper);
    border-bottom: 1px solid transparent;
    transition: background-color 320ms var(--ease-out), border-color 320ms var(--ease-out), backdrop-filter 320ms var(--ease-out);
}
.site-header.is-scrolled {
    background: var(--glass-header);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-bottom-color: var(--glass-header-border);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 64px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-right: auto;
}
.brand-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    display: block;
}
@media (min-width: 1024px) {
    .brand-logo { height: 48px; }
}

/* Inline nav + header CTA are desktop-only; mobile uses the drawer */
.main-nav { display: none; }
.header-cta { display: none; }

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: var(--tap);
    height: var(--tap);
    margin-right: -8px;
    flex: 0 0 auto;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 1.6px;
    background: var(--ink);
    transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

.mobile-nav {
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dur-med) var(--ease-in-out);
    border-top: 1px solid transparent;
}
.mobile-nav.open {
    max-height: 420px;
    border-top-color: var(--line);
}
.mobile-nav a {
    display: flex;
    align-items: center;
    min-height: var(--tap);
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) { .mobile-nav a { padding-inline: 28px; } }
.mobile-nav-cta { padding: 16px 20px 20px; }
@media (min-width: 640px) { .mobile-nav-cta { padding-inline: 28px; } }
.mobile-nav-cta .btn { height: 50px; }

@media (min-width: 1024px) {
    .header-inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        height: 68px;
    }
    .brand { margin-right: 0; }
    .main-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 32px;
        font-size: 14.5px;
        font-weight: 500;
        color: var(--muted);
    }
    .main-nav a { transition: color var(--dur-fast) var(--ease-out); }
    .main-nav a:hover { color: var(--ink); }
    .header-cta { display: block; justify-self: end; }
    .nav-toggle, .mobile-nav { display: none; }
    body { padding-top: 69px; }
    html { scroll-padding-top: 69px; }
}

/* -------------------------------------------------------------
   5. Buttons
------------------------------------------------------------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--tap);
    height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: -0.005em;
    white-space: nowrap;
    transition: transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
    will-change: transform;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn svg { flex: 0 0 auto; transition: transform var(--dur-fast) var(--ease-out); }
.btn:hover svg { transform: translateX(2px); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background-color var(--dur-theme) var(--ease-out),
    color var(--dur-theme) var(--ease-out);
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-ghost {
    color: var(--ink);
    font-weight: 500;
    padding-inline: 6px;
}
.btn-ghost::after {
    content: '';
    position: absolute;
    left: 6px; right: 6px; bottom: 10px;
    height: 1px;
    background: var(--line-strong);
    transition: background var(--dur-fast) var(--ease-out);
}
.btn-ghost:hover::after { background: var(--ink); }

.btn-outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line-strong);
}
.btn-outline:hover {
    border-color: var(--ink);
    transform: translateY(-2px);
}

.btn-small { height: 42px; padding: 0 18px; font-size: 13.5px; }
.btn-large { height: 56px; padding: 0 30px; font-size: 16px; }

.btn-download { flex: 1; }

/* -------------------------------------------------------------
   6. Hero (stacked by default, side-by-side once there's room)
------------------------------------------------------------- */
.hero {
    padding: clamp(28px, 4vw, 48px) 0 var(--space-section);
    /* Belt-and-suspenders: even though html/body already clip
       horizontal overflow, containing it at the section level too
       guarantees nothing inside the Hero can ever force a scrollbar. */
    overflow-x: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(32px, 5vw, 44px);
    align-items: center;
    min-width: 0;
    /* NOTE: no max-width here. This element also carries the .wrap
       class, which already caps it at var(--container) (1180px) and
       centers it. Setting max-width again here (even to 100%) would
       have equal CSS specificity to .wrap's rule and — being later in
       the file — would silently win and cancel that cap, letting the
       Hero stretch edge-to-edge on ultrawide monitors. */
}
.hero-copy {
    text-align: center;
    /* Grid/flex items default to a content-based automatic minimum
       width, which can silently force a wider-than-viewport track.
       min-width: 0 lets this column shrink to fit the phone screen;
       text still wraps normally, nothing is clipped. */
    min-width: 0;
    max-width: 100%;
}
.hero-title {
    font-size: clamp(34px, 9vw, 68px);
    color: var(--ink);
    max-width: 100%;
}
.hero-sub {
    margin-top: 20px;
    font-size: clamp(15.5px, 4vw, 18px);
    line-height: 1.6;
    color: var(--muted);
    max-width: 46ch;
    margin-inline: auto;
}
.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-top: 30px;
}
.hero-actions .btn-primary { width: 100%; }
.hero-actions .btn-ghost { align-self: center; }
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(20px, 6vw, 40px);
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}
.hero-stats > div { min-width: 64px; }
.hero-stats dt {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 500;
    color: var(--ink);
}
.hero-stats dd {
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--muted);
}

@media (max-width: 639px) {
    .hero-title { line-height: 1.16; }
}

@media (min-width: 480px) {
    .hero-actions { flex-direction: row; align-items: center; justify-content: center; flex-wrap: wrap; gap: 28px; }
    .hero-actions .btn { width: auto; }
}

@media (min-width: 1024px) {
    .hero { padding: 54px 0 80px; }
    .hero-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
    .hero-copy { text-align: left; }
    .hero-sub { margin-inline: 0; }
    .hero-actions { justify-content: flex-start; }
    .hero-stats { justify-content: flex-start; margin-top: 56px; padding-top: 32px; }
    .hero-stats dt { font-size: 26px; }
    .hero-stats dd { font-size: 13px; }
}

/* -------------------------------------------------------------
   7. Generator (the product itself)
------------------------------------------------------------- */
.hero-panel { display: flex; justify-content: center; min-width: 0; max-width: 100%; }

.generator {
    width: 100%;
    max-width: 560px;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    transition: background-color var(--dur-theme) var(--ease-out), border-color var(--dur-theme) var(--ease-out), box-shadow var(--dur-theme) var(--ease-out);
}
@media (min-width: 480px) { .generator { padding: 20px; } }
@media (min-width: 640px) { .generator { padding: 22px; border-radius: var(--radius-xl); } }

@media (min-width: 1024px) {
    .hero-panel { justify-content: flex-end; }
    .generator { max-width: 660px; }
}

.generator-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* keeps the swipe gesture inside the tab strip instead of it
       triggering Chrome's browser-level back/forward navigation */
    overscroll-behavior-x: contain;
    /* edge-to-edge scroll on phones without clipping focus rings */
    margin-inline: -4px;
    padding-inline: 4px;
}
.generator-tabs::-webkit-scrollbar { display: none; }
.type-tab {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.type-tab:hover { background: var(--surface-2); color: var(--ink); }
.type-tab.active { background: var(--accent); color: #fff; }
.type-tab svg { width: 14px; height: 14px; flex: 0 0 auto; }

.generator-form { margin-top: 16px; }
.field-groups { display: flex; flex-direction: column; gap: 12px; }
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.field-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 480px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: var(--tap);
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--ink);
    /* 16px prevents iOS Safari's auto-zoom-on-focus */
    font-size: 16px;
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-theme) var(--ease-out), color var(--dur-theme) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 76px; font-family: var(--font-body); }
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-tint);
}
.field-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: var(--tap);
}
.field-checkbox input { width: 20px; height: 20px; accent-color: var(--accent); flex: 0 0 auto; }
.field-checkbox label { font-family: var(--font-body); font-weight: 500; color: var(--ink); font-size: 14px; }

@media (min-width: 640px) {
    .field input, .field select, .field textarea { font-size: 14.5px; }
}

.generator-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
    margin: 18px 0;
}

.generator-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.qr-preview-wrap { display: flex; justify-content: center; }
.qr-preview {
    position: relative;
    width: clamp(160px, 42vw, 168px);
    height: clamp(160px, 42vw, 168px);
    border-radius: var(--radius-md);
    background: var(--qr-area-bg);
    border: 1px solid var(--qr-area-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.qr-preview canvas {
    width: 100%;
    height: 100%;
    transition: opacity var(--dur-med) var(--ease-out);
}
.qr-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--qr-area-text);
    background: var(--qr-area-bg);
    transition: opacity var(--dur-med) var(--ease-out);
}
.qr-preview.has-code .qr-empty-state { opacity: 0; pointer-events: none; }
.qr-preview:not(.has-code) canvas { opacity: 0; }

.generator-controls { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.control-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-transform: uppercase;
}
.control-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.control-colors { justify-content: flex-start; }
.control-swatch { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.control-swatch .control-label { font-size: 10px; }
.swatch {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--sw, #000);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--dur-fast) var(--ease-out);
}
.swatch:hover { transform: scale(1.06); }
.swatch input[type="color"] {
    position: absolute;
    inset: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0;
}
.control-reset {
    margin-left: auto;
    align-self: flex-end;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 10px 8px;
    margin-block: -10px;
    margin-right: -8px;
}
.control-reset:hover { color: var(--ink); }

/* QR Designer controls extend the existing generator control language. */
.designer-section {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-top: 4px;
}
.designer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.designer-grid-gradient { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; align-items: end; column-gap: 10px; }
.designer-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-transform: uppercase;
    line-height: 1.2;
}
.designer-field select {
    width: 100%;
    min-height: 40px;
    padding: 8px 32px 8px 11px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: var(--radius-sm);
    background: rgba(12, 17, 38, 0.78);
    color: #fff;
    color-scheme: dark;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.designer-field select:hover { border-color: var(--line-strong); background: rgba(12, 17, 38, 0.9); }
.designer-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.designer-field select:disabled { cursor: not-allowed; opacity: 0.48; }
.designer-field select option { background: #0C1126; color: #fff; }
.designer-swatch { align-self: end; }
.designer-logo { flex-direction: row; flex-wrap: wrap; align-items: center; }
.designer-logo > .control-label { width: 100%; }
.logo-upload {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 9px 12px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.logo-upload:hover { border-color: var(--accent); color: var(--ink); }
.logo-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.designer-logo .control-reset { margin-left: 0; margin-right: 0; align-self: center; }
.designer-status { width: 100%; margin: 1px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--muted-2); }
.designer-status.is-warning { color: #E7A13B; }

@media (max-width: 479px) {
    .designer-grid-gradient { grid-template-columns: 1fr 1fr; }
    .designer-swatch { align-self: start; }
}

.control-size { flex-wrap: nowrap; gap: 12px; }
.control-size .control-label { flex: 0 0 auto; }
#sizeSlider {
    flex: 1;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 999px;
    background: var(--line-strong);
    outline: none;
}
#sizeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 2px 6px rgba(47,94,255,0.4);
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out);
}
#sizeSlider::-webkit-slider-thumb:hover { transform: scale(1.15); }
#sizeSlider::-moz-range-thumb {
    width: 20px; height: 20px; border: none;
    border-radius: 50%; background: var(--accent); cursor: pointer;
}
.control-value {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink);
    min-width: 48px;
    text-align: right;
}

.segmented {
    display: flex;
    background: var(--surface-2);
    border-radius: 10px;
    padding: 3px;
    margin-left: auto;
}
.segmented button {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
    border-radius: 7px;
    color: var(--muted);
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.segmented button[aria-checked="true"] {
    background: var(--surface-card);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.control-downloads { flex-direction: column; gap: 10px; }
.control-downloads .btn { width: 100%; }
.control-footnote {
    font-size: 12px;
    color: var(--muted-2);
    text-align: center;
    margin-top: 2px;
}

@media (min-width: 560px) {
    .generator-body { grid-template-columns: auto 1fr; gap: 22px; }
    .qr-preview-wrap { justify-content: flex-start; }
    .control-downloads { flex-direction: row; gap: 10px; }
}

@media (min-width: 1024px) {
    .generator-body { grid-template-columns: minmax(176px, auto) minmax(0, 1fr); gap: 28px; }
    .qr-preview { width: 176px; height: 176px; }
    .generator-controls { gap: 14px; }
    .designer-grid-gradient { column-gap: 12px; }
}

/* -------------------------------------------------------------
   8. Feature cards
------------------------------------------------------------- */
.features { padding: var(--space-md) 0 var(--space-section); }
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.feature-card {
    padding: 26px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), background-color var(--dur-theme) var(--ease-out);
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
    background: var(--surface-card);
}
.feature-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--accent-tint);
    color: var(--accent-deep);
    margin-bottom: 18px;
}
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; line-height: 1.6; color: var(--muted); }

@media (min-width: 640px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 1024px) {
    .features-grid { grid-template-columns: repeat(4, 1fr); }
}

/* -------------------------------------------------------------
   9. Supported types grid
------------------------------------------------------------- */
.types { padding: var(--space-md) 0 var(--space-section); }
.section-heading { max-width: 640px; margin-bottom: 40px; }
.section-heading h2 { font-size: clamp(26px, 6vw, 40px); }
.section-sub { margin-top: 14px; font-size: clamp(14.5px, 3.6vw, 16px); color: var(--muted); line-height: 1.6; }

.types-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.type-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-card);
    text-align: left;
    min-height: var(--tap);
    transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), border-color var(--dur-fast) var(--ease-out), background-color var(--dur-theme) var(--ease-out);
}
.type-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.type-card-icon {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--ink);
}
.type-card h4 { font-size: 15px; font-weight: 600; }
.type-card p { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

@media (min-width: 640px) {
    .types-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
    .types-grid { grid-template-columns: repeat(4, 1fr); }
}

/* -------------------------------------------------------------
   10. Comparison table
   Mobile: each row becomes a labelled card (grid collapses to 1
   column, "them"/"us" values get a printed label via data-label).
   Tablet+: reassembles into a proper 3-column table.
------------------------------------------------------------- */
.compare { padding: var(--space-md) 0 var(--space-section); }
.compare-table {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-card);
    transition: background-color var(--dur-theme) var(--ease-out), border-color var(--dur-theme) var(--ease-out);
}
.compare-row {
    display: grid;
    grid-template-columns: 1fr;
}
.compare-row:not(:last-child) { border-bottom: 1px solid var(--line); }
.compare-cell {
    padding: 10px 18px;
    font-size: 14px;
    display: flex;
    align-items: center;
}
.compare-label {
    color: var(--ink);
    font-weight: 600;
    padding-top: 16px;
    padding-bottom: 4px;
}
.compare-them { color: var(--muted); }
.compare-us { color: var(--ink); font-weight: 600; background: var(--accent-tint-2); }
.compare-them::before,
.compare-us::before {
    content: attr(data-label) ': ';
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 10.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin-right: 6px;
}
.compare-us::before { color: var(--accent-deep); }
.compare-cell:last-child { padding-bottom: 16px; }
.compare-head { display: none; }
.check { color: var(--accent); margin-right: 6px; font-weight: 700; }

@media (min-width: 768px) {
    .compare-row { grid-template-columns: 1.4fr 1fr 1fr; }
    .compare-cell { padding: 18px 22px; }
    .compare-label { padding: 18px 22px; }
    .compare-cell:last-child { padding: 18px 22px; }
    .compare-them::before, .compare-us::before { content: none; }
    .compare-head { display: grid; background: var(--surface); }
    .compare-head .compare-cell {
        font-family: var(--font-mono);
        font-size: 11.5px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--muted);
        font-weight: 500;
    }
    .compare-col-us { color: var(--accent-deep); }
}

/* -------------------------------------------------------------
   11. FAQ accordion
------------------------------------------------------------- */
.faq { padding: var(--space-md) 0 var(--space-section); }
.faq-list { max-width: 760px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--tap);
    padding: 20px 4px;
    text-align: left;
    font-size: 15.5px;
    font-weight: 600;
}
.faq-icon {
    position: relative;
    flex: 0 0 auto;
    width: 20px; height: 20px;
}
.faq-icon::before, .faq-icon::after {
    content: '';
    position: absolute;
    background: var(--ink);
    transition: transform var(--dur-med) var(--ease-out), opacity var(--dur-fast);
}
.faq-icon::before { top: 9px; left: 2px; right: 2px; height: 1.6px; }
.faq-icon::after { left: 9px; top: 2px; bottom: 2px; width: 1.6px; }
.faq-question[aria-expanded="true"] .faq-icon::after { transform: rotate(90deg); opacity: 0; }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dur-med) var(--ease-in-out);
}
.faq-answer p { padding: 0 4px 22px; font-size: 14.5px; color: var(--muted); line-height: 1.65; max-width: 62ch; }

@media (min-width: 640px) {
    .faq-question { font-size: 16px; padding: 22px 4px; }
}

/* -------------------------------------------------------------
   12. Final CTA + footer
------------------------------------------------------------- */
.final-cta { padding: 16px 0 var(--space-section); }
.final-cta-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    text-align: center;
    padding: 48px 24px;
    border-radius: var(--radius-lg);
    background: var(--accent);
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: background-color var(--dur-theme) var(--ease-out), color var(--dur-theme) var(--ease-out);
}

/* `overflow: hidden` creates a scroll container, which prevents the
   article TOC from sticking to the document viewport. Clip horizontal
   overflow on article pages without creating that container. */
html.blog-article-page,
body.blog-article-page { overflow-x: clip; }
.final-cta-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.16) 1px, transparent 0);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 0%, transparent 75%);
}
.final-cta-inner h2 { font-size: clamp(24px, 6.6vw, 38px); position: relative; max-width: 20ch; margin-inline: auto; }
.final-cta-inner .btn { position: relative; align-self: center; width: 100%; max-width: 360px; }
.final-cta-inner .btn-primary { background: #fff; color: var(--accent); }
.final-cta-inner .btn-primary:hover { background: var(--paper); color: #fff; }

@media (min-width: 640px) {
    .final-cta-inner { padding: 72px 40px; border-radius: var(--radius-xl); align-items: center; }
    .final-cta-inner .btn { width: auto; }
}

.site-footer { border-top: 1px solid var(--line); padding-top: 48px; }
.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 40px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-logo { height: 54px; width: auto; object-fit: contain; display: block; }
.footer-brand p { font-size: 13.5px; color: var(--muted); max-width: 30ch; margin-top: 4px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-2);
    font-weight: 500;
    margin-bottom: 4px;
}
.footer-col a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    font-size: 14px;
    color: var(--muted);
    transition: color var(--dur-fast) var(--ease-out);
}
.footer-col a:hover { color: var(--ink); }
.roadmap-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
    padding: 9px 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.roadmap-pill em {
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--accent-deep);
    background: var(--accent-tint);
    padding: 3px 6px;
    border-radius: 999px;
    white-space: nowrap;
}
.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 20px 0;
    font-size: 12.5px;
    color: var(--muted-2);
    text-align: center;
}

@media (min-width: 640px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-bottom { text-align: left; }
}
@media (min-width: 1024px) {
    .footer-inner { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
}

/* -------------------------------------------------------------
   13. Scroll-reveal animation system
   Elements start slightly offset/transparent; JS toggles .in-view
   via IntersectionObserver. Respects prefers-reduced-motion below.
------------------------------------------------------------- */
.reveal { opacity: 0; }
.reveal[data-reveal="slide-up"] { transform: translateY(28px); }
.reveal[data-reveal="scale"] { transform: scale(0.96); }
.reveal.in-view {
    opacity: 1;
    transform: none;
    transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

/* -------------------------------------------------------------
   14. Accessibility & motion preferences
------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* Extra-small phones (iPhone SE / 320px) — tighten a few paddings
   so nothing feels cramped against the viewport edge */
@media (max-width: 359px) {
    .wrap { padding-inline: 16px; }
    .generator { padding: 14px; }
    .final-cta-inner { padding: 40px 18px; }
}

/* Smallest phones (iPhone SE, small Android): the "Error correction"
   label + 4-button segmented control is too tight side-by-side.
   Stack them and let the buttons fill the width evenly — bigger,
   easier-to-tap targets instead of a cramped single row. */
@media (max-width: 399px) {
    .control-ecc { flex-direction: column; align-items: flex-start; gap: 8px; }
    .control-ecc .segmented { margin-left: 0; width: 100%; }
    .control-ecc .segmented button { flex: 1; }
}

/* -------------------------------------------------------------
   15. Blog
   Every color, radius, shadow, spacing unit, and animation here
   reads from the same tokens as the rest of the site — nothing
   blog-specific was introduced, so this can never visually drift
   from the main product as new components get added.
------------------------------------------------------------- */

/* Marks the current nav item on /blogs/ pages (main site has no
   equivalent since it's a single scrolling page with anchors). */
.main-nav a[aria-current="page"],
.mobile-nav a[aria-current="page"] { color: var(--accent); }

/* Breadcrumb — shared by the index and every article page */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted-2);
    padding-top: var(--space-md);
}
.breadcrumb a { color: var(--muted); transition: color var(--dur-fast) var(--ease-out); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span[aria-current="page"] { color: var(--muted-2); }
.breadcrumb .sep { color: var(--line-strong); }

/* Blog index hero */
.blog-hero { padding: var(--space-md) 0 var(--space-lg); text-align: center; }
.blog-hero .eyebrow { justify-content: center; }
.blog-hero h1 {
    font-size: clamp(34px, 7vw, 56px);
    color: var(--ink);
}
.blog-hero p {
    margin: 16px auto 0;
    max-width: 46ch;
    font-size: clamp(15.5px, 3.4vw, 18px);
    color: var(--muted);
    line-height: 1.6;
}

.blog-list { padding: 0 0 var(--space-section); }
.blog-list .section-heading { margin-bottom: 28px; }

/* Card grid — 1 col mobile, 2 col tablet, 3 col desktop. Thumbnail
   cards need more breathing room than the compact type-cards, so
   this gets its own (wider) column rhythm rather than reusing
   .types-grid directly. */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 640px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (min-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

.blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-card);
    overflow: hidden;
    text-align: left;
    transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
}
.blog-card.is-disabled {
    cursor: not-allowed;
    opacity: 0.6;
}
.blog-card.is-disabled:hover { transform: none; box-shadow: none; border-color: var(--line); }

.blog-card-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background:
            radial-gradient(circle at 1px 1px, rgba(255,255,255,0.07) 1px, transparent 0) 0 0/22px 22px,
            linear-gradient(135deg, var(--surface-2), var(--surface-card));
    color: var(--accent);
    border-bottom: 1px solid var(--line);
}
.blog-card-thumb svg { width: 34%; height: 34%; filter: drop-shadow(0 4px 16px rgba(81,112,255,0.35)); }
.blog-card-image { width: 100%; height: 100%; object-fit: cover; }
.blog-card.is-disabled .blog-card-thumb { color: var(--muted-2); }
.blog-card.is-disabled .blog-card-thumb svg { filter: none; }

.blog-card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex: 1; }
.blog-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.blog-card-category {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-deep);
    background: var(--accent-tint);
    padding: 4px 9px;
    border-radius: 999px;
}
.blog-card-soon {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--muted-2);
    background: var(--surface-2);
    padding: 4px 9px;
    border-radius: 999px;
}
.blog-card-title { font-size: 18px; line-height: 1.3; color: var(--ink); }
.blog-card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted-2);
}
.blog-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}
.blog-card-cta svg { transition: transform var(--dur-fast) var(--ease-out); }
.blog-card:hover .blog-card-cta svg { transform: translateX(3px); }
.blog-card-cta-disabled { display: inline-flex; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--muted-2); }

/* Article page — hero */
.article-hero { padding: var(--space-md) 0 0; }
.article-hero-head { max-width: 760px; margin: 0 auto; text-align: center; }
.article-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}
.article-category {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-deep);
    background: var(--accent-tint);
    padding: 5px 11px;
    border-radius: 999px;
}
.article-meta-text {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--muted-2);
}
.article-hero h1 {
    font-size: clamp(30px, 5.6vw, 48px);
    color: var(--ink);
    max-width: 22ch;
    margin-inline: auto;
}
.article-hero-thumb {
    margin: 32px auto 0;
    max-width: 920px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
            radial-gradient(circle at 1px 1px, rgba(255,255,255,0.07) 1px, transparent 0) 0 0/26px 26px,
            linear-gradient(135deg, var(--surface-2), var(--surface-card));
    color: var(--accent);
    overflow: hidden;
}
.article-hero-thumb svg { width: 18%; height: 18%; min-width: 64px; min-height: 64px; filter: drop-shadow(0 8px 28px rgba(81,112,255,0.35)); }
.article-hero-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Article layout: content + sticky TOC sidebar at desktop */
.article-section { padding: var(--space-lg) 0 var(--space-section); }
.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}
@media (min-width: 1024px) {
    .article-layout { grid-template-columns: minmax(0, 220px) minmax(0, 720px); justify-content: center; }
}

.article-toc {
    order: -1;
    border: 1px solid var(--line);
    background: var(--surface-card);
    border-radius: var(--radius-md);
    padding: 16px 18px;
}
@media (max-width: 1023px) {
    .article-toc { display: none; }
}
.article-toc-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin-bottom: 10px;
    display: block;
}
.article-toc-list { list-style: decimal; margin: 0; padding: 0 0 0 24px; }
.article-toc-list li { margin: 0 0 9px; padding: 0; }
.article-toc-list li:last-child { margin-bottom: 0; }
.article-toc-list a {
    display: block;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.4;
    border-left: 2px solid transparent;
    padding-left: 10px;
    transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.article-toc-list a:hover { color: var(--ink); }
.article-toc-list a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

@media (min-width: 1024px) {
    .article-toc { order: 0; position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; }
}

/* Article prose */
.article-body { min-width: 0; }
.article-body > *:first-child { margin-top: 0; }
.article-body h2 {
    font-size: clamp(22px, 3.4vw, 28px);
    color: var(--ink);
    margin: 44px 0 16px;
    scroll-margin-top: 88px;
}
.article-body h3 {
    font-size: 18px;
    color: var(--ink);
    margin: 28px 0 12px;
}
.article-body p { font-size: 16px; line-height: 1.75; color: var(--muted); margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.article-body li { font-size: 16px; line-height: 1.7; color: var(--muted); }
.article-body li::marker { color: var(--accent); }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--accent-hover); }

/* Article pages should be readable immediately; reveal effects remain
   available for non-article sections elsewhere on the site. */
.article-hero .reveal,
.article-section .reveal,
.article-related .reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

/* In-article CTA block — same accent-block language as the
   page-level final CTA, scaled down to sit inline in the article. */
.article-inline-cta {
    margin: 40px 0;
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    background: var(--accent);
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.article-inline-cta h3 { color: #fff; margin: 0; font-size: 20px; }
.article-inline-cta p { color: rgba(255,255,255,0.9); margin: 0; font-size: 16px; }
.article-inline-cta .btn-primary { background: #fff; color: var(--accent); }
.article-inline-cta > a.btn { text-decoration: none; }
.article-inline-cta .btn-primary:hover { background: var(--paper); color: #fff; }

/* Prev / Next */
.article-pn {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 12px;
}
.article-pn-spacer { display: none; }
@media (min-width: 640px) {
    .article-pn { grid-template-columns: 1fr 1fr; }
    .article-pn-spacer { display: block; visibility: hidden; }
}
.article-body a.article-pn-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-card);
    text-decoration: none;
    transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.article-pn-item:not(.article-pn-empty):hover { transform: translateY(-2px); border-color: var(--line-strong); }
.article-pn-next { text-align: right; align-items: flex-end; }
.article-pn-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}
.article-pn-empty .article-pn-label { color: var(--muted-2); }
.article-pn-title { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.article-pn-empty .article-pn-title { color: var(--muted-2); font-weight: 500; }

/* Related articles */
.article-related { padding: 0 0 var(--space-section); }
.article-related .section-heading { margin-bottom: 24px; }
