/* ============================================================================
 * SlowBooks Pro — Components
 *
 * Aesthetic: "Decompiled Luxury" — the engineering-artifact nature of the
 * product rendered with editorial precision. Technical stamps, graph-paper
 * substrates, registration marks, pixel-precise retro chrome, all living
 * inside modern editorial layouts with real typographic hierarchy.
 * ============================================================================ */

/* ============================================================================
 * NAV — slim, chrome-gradient, build-ticker in the corner
 * ============================================================================ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background:
        linear-gradient(180deg, rgba(232, 237, 242, 0.92), rgba(200, 208, 220, 0.88));
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--toolbar-border);
    transition: box-shadow var(--dur-med) var(--ease-out);
}

.site-nav.is-scrolled {
    box-shadow: 0 1px 12px rgba(0, 34, 68, 0.12);
}

.site-nav > .container {
    height: 100%;
    display: flex;
    align-items: center;
    gap: var(--sp-6);
}
/* The links sit in a <nav>: the push to the right belongs on it (the list's
 * own margin-left: auto works inside the nav only), or the folded header left
 * GitHub and the menu button partway across from 400 to 1,200 px. */
.site-nav > .container > nav { margin-left: auto; }

.site-nav__brand {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    white-space: nowrap;
    font-weight: 800;
    font-size: var(--text-base);
    color: var(--qb-navy);
    letter-spacing: -0.025em;
    font-feature-settings: "ss01";
    position: relative;
}
.site-nav__brand::before {
    /* tiny bookmark/tab square in the QB navy */
    content: "";
    width: 10px;
    height: 10px;
    background: var(--qb-navy);
    margin-right: var(--sp-2);
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

.site-nav__brand--edition {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.site-nav__links {
    display: flex;
    gap: var(--sp-5);
    list-style: none;
    margin-left: auto;
    align-items: center;
}

.site-nav__link {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    position: relative;
    padding: 0.25rem 0;
    transition: color var(--dur-fast) var(--ease-out);
}
.site-nav__link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 2px;
    background: var(--qb-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-med) var(--ease-out);
}
.site-nav__link:hover { color: var(--qb-navy); }
.site-nav__link:hover::after { transform: scaleX(1); }

.site-nav__meta {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* "More": secondary links in a click-to-open list (front page). A real
 * button with aria-expanded; works by click, Enter/Space, Escape. */
.site-nav__more { position: relative; }
.site-nav__more-btn {
    background: none;
    border: 0;
    font: inherit;
    font-size: var(--text-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.site-nav__caret { font-size: 0.7em; transition: transform var(--dur-fast) var(--ease-out); }
.site-nav__more-btn[aria-expanded="true"] .site-nav__caret { transform: rotate(180deg); }
.site-nav__more-btn[aria-expanded="true"] { color: var(--qb-navy); }
.site-nav__more-list {
    display: none;
    position: absolute;
    top: calc(100% + 0.9rem);
    right: 0;
    min-width: 13rem;
    list-style: none;
    margin: 0;
    padding: var(--sp-2) 0;
    background: var(--panel-bg);
    border: 1px solid var(--toolbar-border);
    border-top: 2px solid var(--qb-navy);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: 0 14px 28px rgba(0, 34, 68, 0.18);
    z-index: 110;
}
.site-nav__more--open .site-nav__more-list { display: block; }
.site-nav__more-list .site-nav__link {
    display: block;
    padding: 0.55rem var(--sp-5);
    white-space: nowrap;
}
.site-nav__more-list .site-nav__link::after { display: none; }
.site-nav__more-list .site-nav__link:hover { background: var(--content-bg); }

/* Support SlowBooks Pro (Ko-fi): a turtle, not a coffee cup. "Support" in the
 * desktop row, which is already full; the whole name in the folded menu. */
.site-nav__support { color: var(--qb-navy); font-weight: 600; white-space: nowrap; }
.site-nav__support-full { display: none; }

/* Mobile menu toggle — an actual hamburger: sesame bun, patty, bun.
 * Morphs into a navy close-X when the menu is open. Desktop never sees it. */
.site-nav__toggle { display: none; }

/* The front page's menu needs 1,200 px in a row (1,100 before the Support
 * link); below that it overflowed sideways, so every page's menu folds into
 * the button there. */
@media (max-width: 1200px) {
    /* brand, GitHub and the menu button: a 32 px gap pushed the button 8 px
     * past a 375 px screen */
    .site-nav > .container { gap: var(--sp-3); }
    .site-nav__links li:not(:last-child) { display: none; }
    .site-nav__meta { display: none; }
    /* The GitHub button's → reads like it's pointing at the hamburger
     * when they sit side by side — arrow is desktop-only. */
    .site-nav .btn__arrow { display: none; }
    /* The version/build tag doesn't fit beside the brand on phones —
     * keep just "SlowBooks Pro" and let the retro flavor stay desktop. */
    .site-nav__brand--edition { display: none; }

    .site-nav__toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        gap: 3px;
        width: 44px;
        height: 40px;
        padding: 0 9px;
        /* the row's own gap spaces it; a margin here pushed the header 5 px past a 390 px screen */
        margin-left: 0;
        flex-shrink: 0;
        background: none;
        border: 1px solid var(--toolbar-border);
        border-radius: 8px;
        cursor: pointer;
    }
    .site-nav__toggle span {
        display: block;
        transition:
            transform var(--dur-med) var(--ease-out),
            opacity var(--dur-fast) var(--ease-out),
            background var(--dur-fast) var(--ease-out),
            border-radius var(--dur-fast) var(--ease-out);
    }
    /* Top bun — domed, sesame seeds via tiny radial dots */
    .site-nav__toggle span:nth-child(1) {
        height: 6px;
        border-radius: 6px 6px 2px 2px;
        background:
            radial-gradient(circle at 26% 55%, #fdf3d8 0, #fdf3d8 0.7px, transparent 1.4px),
            radial-gradient(circle at 52% 35%, #fdf3d8 0, #fdf3d8 0.7px, transparent 1.4px),
            radial-gradient(circle at 76% 60%, #fdf3d8 0, #fdf3d8 0.7px, transparent 1.4px),
            linear-gradient(180deg, #e3a94f, #cd8f38);
    }
    /* The patty */
    .site-nav__toggle span:nth-child(2) {
        height: 4px;
        border-radius: 2px;
        background: linear-gradient(180deg, #6f4222, #53301a);
    }
    /* Bottom bun */
    .site-nav__toggle span:nth-child(3) {
        height: 4px;
        border-radius: 2px 2px 5px 5px;
        background: linear-gradient(180deg, #daa14b, #c78a36);
    }
    /* Open state: the burger folds into a navy X */
    .site-nav--open .site-nav__toggle span {
        background: var(--qb-navy);
        border-radius: 2px;
    }
    .site-nav--open .site-nav__toggle span:nth-child(1) {
        height: 3px;
        transform: translateY(7px) rotate(45deg);
    }
    .site-nav--open .site-nav__toggle span:nth-child(2) { opacity: 0; }
    .site-nav--open .site-nav__toggle span:nth-child(3) {
        height: 3px;
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Open state: the link list drops below the sticky bar as a panel */
    .site-nav--open .site-nav__links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: var(--sp-2) 0 var(--sp-4);
        /* solid: the page used to show through the panel on iOS */
        background: #eef1f5;
        border-bottom: 2px solid var(--qb-navy);
        box-shadow: 0 14px 28px rgba(0, 34, 68, 0.18);
        max-height: calc(100vh - 64px);
        max-height: calc(100dvh - 64px);
        overflow-y: auto;
    }
    .site-nav--open .site-nav__links li { display: block; }
    /* the five main links, then More folds the rest until it's tapped */
    .site-nav--open .site-nav__more-btn {
        display: flex;
        width: 100%;
        justify-content: space-between;
        text-align: left;
        background: none;
        border: 0;
    }
    .site-nav--open .site-nav__more-list {
        display: none;
        position: static;
        min-width: 0;
        padding: 0 0 var(--sp-2);
        background: none;
        border: 0;
        box-shadow: none;
    }
    .site-nav--open .site-nav__more--open .site-nav__more-list { display: block; }
    .site-nav--open .site-nav__more-list .site-nav__link {
        padding-left: calc(var(--sp-5) + var(--sp-4));
        font-size: var(--text-sm);
    }
    .site-nav__support-short { display: none; }
    .site-nav__support-full { display: inline; }
    .site-nav--open .site-nav__link {
        display: block;
        padding: 0.7rem var(--sp-5);
        font-size: var(--text-base);
    }
    .site-nav--open .site-nav__links > li:last-child {
        padding: var(--sp-3) var(--sp-5) 0;
    }
}

/* ============================================================================
 * BUTTONS — modern + retro variants
 * ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 0.85rem 1.5rem;
    font-family: var(--font-modern);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out);
    white-space: nowrap;
    letter-spacing: -0.005em;
}

.btn--primary {
    background: var(--qb-navy);
    color: white;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 1px 2px rgba(0, 30, 60, 0.2);
}
.btn--primary:hover {
    background: var(--qb-navy-mid);
    color: white;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 6px 18px rgba(0, 30, 60, 0.22);
    transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }

.btn--primary .btn__arrow {
    display: inline-block;
    transition: transform var(--dur-fast) var(--ease-out);
}
.btn--primary:hover .btn__arrow { transform: translateX(3px); }

.btn--ghost {
    background: transparent;
    color: var(--qb-navy);
    border-color: rgba(0, 51, 102, 0.22);
}
.btn--ghost:hover {
    background: rgba(0, 51, 102, 0.04);
    border-color: var(--qb-navy);
    color: var(--qb-navy);
}

.btn--retro {
    padding: 0.5rem 1.25rem;
    font-family: var(--font-retro);
    font-size: var(--text-sm);
    background: linear-gradient(180deg, var(--toolbar-top) 0%, var(--toolbar-bottom) 100%);
    color: var(--text-primary);
    border: 1px solid var(--toolbar-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--bevel-up);
}
.btn--retro:hover { background: linear-gradient(180deg, #f0f4f9 0%, #d0d8e4 100%); }
.btn--retro:active { box-shadow: var(--bevel-down); transform: translateY(0); }

/* ============================================================================
 * HERO — the whole show
 * Asymmetric layout, letterpress-weight headline, blueprint substrate,
 * retro window polaroid-rotated, registration marks at corners, stamps
 * arranged like postal cancellations.
 * ============================================================================ */

.hero {
    padding: var(--section-y) 0 var(--sp-12);
    background:
        radial-gradient(900px 560px at 85% 5%, rgba(91, 155, 213, 0.20) 0%, transparent 55%),
        radial-gradient(800px 500px at 0% 100%, rgba(37, 115, 33, 0.10) 0%, transparent 60%),
        var(--pattern-graph),
        var(--qb-cream);
    overflow: hidden;
    position: relative;
}

.hero::before {
    /* fine cross-hatch over the cream — adds depth without noise */
    content: "";
    position: absolute;
    inset: 0;
    background: var(--pattern-cross);
    opacity: 0.7;
    pointer-events: none;
}

.hero::after {
    /* bottom edge fade into content-bg */
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 12rem;
    background: linear-gradient(180deg, transparent, var(--content-bg));
    pointer-events: none;
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: var(--sp-10);
    align-items: center;
    z-index: 1;
}

.hero__meta {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--qb-navy-mid);
    margin-bottom: var(--sp-6);
    opacity: 0;
    animation: fade-up var(--dur-slow) var(--ease-out) 0.05s forwards;
}

.hero__meta-dot {
    width: 6px; height: 6px;
    background: var(--qb-green);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(37, 115, 33, 0.2);
    animation: pulse 2.4s ease-in-out infinite;
}

.hero__headline {
    font-size: clamp(2.75rem, 7vw, var(--text-6xl));
    font-weight: 900;
    line-height: 0.96;
    letter-spacing: -0.038em;
    color: var(--ink);
    margin-bottom: var(--sp-5);
}

.hero__headline-line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: fade-up var(--dur-slow) var(--ease-out) forwards;
}
.hero__headline-line:nth-child(1) { animation-delay: 0.15s; }
.hero__headline-line:nth-child(2) { animation-delay: 0.28s; }
.hero__headline-line:nth-child(3) { animation-delay: 0.41s; }

.hero__headline-accent {
    color: var(--qb-navy);
    position: relative;
    display: inline-block;
}
.hero__headline-accent::after {
    /* gold underline in hand-drawn style */
    content: "";
    position: absolute;
    left: -2px; right: -2px; bottom: -0.15em;
    height: 6px;
    background: var(--qb-gold);
    transform: skewX(-10deg) scaleX(0);
    transform-origin: left;
    animation: underline-grow 0.7s var(--ease-out) 0.85s forwards;
    opacity: 0.7;
    border-radius: 3px;
}

.hero__sub {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 36rem;
    margin-bottom: var(--sp-8);
    opacity: 0;
    animation: fade-up var(--dur-slow) var(--ease-out) 0.55s forwards;
}

/* Two short paragraphs: the offer, then where the books live */
/* the lede now closes the copy block, so it keeps the full gap above the buttons */
.hero__sub--lead { margin-bottom: var(--sp-8); }
.hero__sub--second {
    /* the tagline under the headline: bigger and heavier than the lede */
    font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--qb-navy);
    margin-bottom: var(--sp-4);
    animation-delay: 0.5s;
}

.hero__ctas {
    display: flex;
    gap: var(--sp-3);
    flex-wrap: wrap;
    opacity: 0;
    animation: fade-up var(--dur-slow) var(--ease-out) 0.7s forwards;
}

.hero__stamps {
    display: flex;
    gap: var(--sp-3);
    flex-wrap: wrap;
    margin-top: var(--sp-8);
    opacity: 0;
    animation: fade-up var(--dur-slow) var(--ease-out) 0.85s forwards;
}

.hero__showcase {
    position: relative;
    opacity: 0;
    animation: window-enter 0.9s var(--ease-out) 0.4s forwards;
}

.hero__app {
    margin: 0;
    border: 1px solid var(--qb-navy-dark);
    border-radius: 8px;
    box-shadow: var(--shadow-hero);
    overflow: hidden;
    background: var(--panel-bg);
    transition: transform var(--dur-slow) var(--ease-spring);
}
.hero__app:hover { transform: scale(1.01); }
.hero__app img { display: block; width: 100%; height: auto; }



@media (max-width: 900px) {
    .hero { padding-bottom: var(--sp-10); }
    .hero .container { grid-template-columns: 1fr; }
}

/* The agent-ready strip: a centred heading block and one button */
.ai-ready { text-align: center; }
.ai-ready .section-head { margin-bottom: var(--sp-5); }
/* the flow: four steps, arrows between, the books lit up at the end */
.ai-flow {
    list-style: none;
    margin: 0 auto var(--sp-6);
    padding: 0;
    max-width: 68rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-8);
    counter-reset: none;
}
.ai-flow__step {
    position: relative;
    padding: var(--sp-5);
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(13, 26, 46, 0.06);
    text-align: left;
}
.ai-flow__step:not(:last-child)::after {
    /* the arrow to the next step */
    content: "";
    position: absolute;
    top: 50%;
    right: calc(-1 * var(--sp-8) + 6px);
    width: calc(var(--sp-8) - 12px);
    height: 2px;
    background: linear-gradient(90deg, var(--qb-blue-light), var(--qb-navy));
}
.ai-flow__step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: calc(50% - 5px);
    right: calc(-1 * var(--sp-8) + 4px);
    border: 6px solid transparent;
    border-left: 8px solid var(--qb-navy);
    border-right: 0;
}
.ai-flow__step--books {
    background: linear-gradient(135deg, #0b2547, #12386a);
    border-color: transparent;
    color: #ffffff;
}
.ai-flow__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: var(--sp-3);
    border-radius: 12px;
    background: #eef3fa;
    color: var(--qb-navy);
}
.ai-flow__icon svg { width: 24px; height: 24px; }
.ai-flow__step--books .ai-flow__icon { background: rgba(255, 255, 255, 0.12); color: #e6b85c; }
.ai-flow__step h3 { font-size: var(--text-lg); margin: 0 0 var(--sp-1); color: var(--ink); }
.ai-flow__step p { margin: 0; font-size: var(--text-sm); line-height: 1.45; color: var(--text-secondary); }
.ai-flow__step--books h3 { color: #ffffff; }
.ai-flow__step--books p { color: #c9d7e8; }

.ai-guards {
    list-style: none;
    margin: 0 auto var(--sp-6);
    padding: 0;
    max-width: 68rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-4);
}
.ai-guards li {
    padding: var(--sp-4) var(--sp-5);
    border-radius: 12px;
    background: rgba(37, 115, 33, 0.08);
    border: 1px solid rgba(37, 115, 33, 0.25);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    text-align: left;
}
.ai-guards strong { display: block; color: var(--qb-green-dark); font-size: var(--text-base); margin-bottom: 2px; }

.ai-does__label { margin: 0 0 var(--sp-3); font-weight: 700; color: var(--ink); }
.ai-does {
    list-style: none;
    margin: 0 auto var(--sp-6);
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-2);
}
.ai-does li {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #dfe5ee;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--qb-navy);
}
@media (max-width: 900px) {
    .ai-flow { grid-template-columns: 1fr; gap: var(--sp-6); max-width: 26rem; }
    .ai-flow__step:not(:last-child)::after {
        top: auto; bottom: calc(-1 * var(--sp-6) + 4px); right: auto; left: 50%;
        width: 2px; height: calc(var(--sp-6) - 10px);
        background: linear-gradient(180deg, var(--qb-blue-light), var(--qb-navy));
    }
    .ai-flow__step:not(:last-child)::before {
        top: auto; bottom: calc(-1 * var(--sp-6) + 2px); right: auto; left: calc(50% - 5px);
        border: 6px solid transparent; border-top: 8px solid var(--qb-navy); border-bottom: 0;
    }
    .ai-guards { grid-template-columns: 1fr; max-width: 26rem; }
}

/* ============================================================================
 * STAMPS — small retro callouts. Used like postal cancellations.
 * ============================================================================ */

.stamp {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 0.4rem 0.85rem;
    font-family: var(--font-retro);
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: var(--qb-navy);
    background: rgba(255, 253, 240, 0.7);
    border: 1px dashed rgba(204, 153, 51, 0.65);
    border-radius: var(--radius-sm);
    line-height: 1.1;
}

.stamp::before {
    content: "";
    width: 7px; height: 7px;
    background: var(--qb-gold);
    border-radius: 50%;
    flex-shrink: 0;
}

a.stamp { text-decoration: none; }

.stamp--muted {
    color: var(--text-muted);
    border-color: rgba(122, 122, 154, 0.4);
}
.stamp--muted::before { background: var(--text-muted); }

.stamp--navy {
    background: var(--qb-navy);
    color: var(--qb-gold-light);
    border-color: var(--qb-gold);
}
.stamp--navy::before { background: var(--qb-gold); }

.stamp--green {
    color: var(--qb-green-dark);
    border-color: rgba(37, 115, 33, 0.55);
}
.stamp--green::before { background: var(--qb-green); }

/* ============================================================================
 * RETRO WINDOW — the star component. Frames every screenshot.
 * ============================================================================ */

.retro-window {
    background: var(--panel-bg);
    border: 1px solid var(--qb-navy-dark);
    border-radius: 4px 4px 3px 3px;
    box-shadow: var(--shadow-hero);
    overflow: hidden;
    position: relative;
}

.retro-window__titlebar {
    height: 30px;
    display: flex;
    align-items: center;
    padding: 0 var(--sp-3);
    background:
        linear-gradient(180deg, #7ba7d6 0%, #4b7bac 50%, #2e5985 51%, #3c6b99 100%);
    color: white;
    font-family: var(--font-retro);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 0 rgba(0, 20, 40, 0.5);
    border-bottom: 1px solid var(--qb-navy-dark);
    gap: var(--sp-2);
}

.retro-window__titlebar-icon {
    width: 14px; height: 14px;
    background: var(--qb-gold);
    border: 1px solid var(--qb-navy-dark);
    border-radius: 2px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.retro-window__dots {
    margin-left: auto;
    display: flex;
    gap: 3px;
}

.retro-window__dot {
    width: 16px;
    height: 15px;
    border: 1px solid var(--qb-navy-dark);
    background: linear-gradient(180deg, #e0e6ef 0%, #b0b8c4 100%);
    font-family: var(--font-retro);
    font-size: 9px;
    line-height: 11px;
    color: var(--qb-navy);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    box-shadow: var(--bevel-up);
}

.retro-window__body { display: block; position: relative; }
.retro-window__body img {
    display: block;
    width: 100%;
}

/* Optional status bar under the body (looks like the app's) */
.retro-window__statusbar {
    display: flex;
    align-items: center;
    padding: 4px var(--sp-3);
    background: linear-gradient(180deg, var(--toolbar-top), var(--toolbar-bottom));
    border-top: 1px solid var(--toolbar-border);
    font-family: var(--font-retro);
    font-size: var(--text-2xs);
    color: var(--text-muted);
    letter-spacing: 0.06em;
    gap: var(--sp-4);
}
.retro-window__statusbar span::before { content: "◆  "; color: var(--qb-blue-light); }
.retro-window__statusbar span:last-child { margin-left: auto; }

/* ============================================================================
 * PILLAR CARDS — each one an account page in a ledger: a title bar, ruled
 * green-bar lines that post one after another as the card scrolls in, a tick
 * in the cleared column, and a double-ruled balance at the foot.
 * ============================================================================ */

.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
    margin-top: var(--stack-gap);
}

.pillar {
    --acct: var(--qb-navy);
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fffef7;
    border: 1px solid var(--panel-border);
    border-top: 4px solid var(--acct);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 34, 68, 0.06);
    overflow: hidden;
    transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pillar--free  { --acct: var(--qb-green-dark); }
.pillar--local { --acct: var(--qb-navy); }
.pillar--own   { --acct: #8a6418; }

.pillar__head {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 2px solid var(--acct);
    background: linear-gradient(#fffef7, #f6f2e3);
}
.pillar__icon {
    flex: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--qb-cream);
    border: 1px solid rgba(0, 51, 102, 0.15);
    border-radius: var(--radius-sm);
}
.pillar__icon svg { width: 24px; height: 24px; }
.pillar h3 {
    font-size: var(--text-xl);
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--ink);
}

/* the ruled lines: a cleared column on the left, green-bar shading; the
   unused part of the page below the entries stays ruled, like ledger paper */
.pillars .pillar__list {
    flex: 1;
    position: relative;
    background: repeating-linear-gradient(to bottom, transparent 0 46px, #dfe6d8 46px 47px);
}
.pillars .pillar__list::after {
    /* the margin rule between the cleared column and the entry, full height */
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2.2rem;
    width: 1px;
    background: #e4b8b0;
    pointer-events: none;
}
.pillars .pillar__list li {
    margin: 0;
    padding: var(--sp-3) var(--sp-5) var(--sp-3) 2.75rem;
    border-bottom: 1px solid #dfe6d8;
    color: var(--text-primary, #1d2433);
    line-height: 1.45;
}
.pillars .pillar__list li { background: #fffef7; }
.pillars .pillar__list li:nth-child(even) { background: #eef5ea; }
.pillars .pillar__list li::before {
    /* the cleared tick */
    content: "\2713";
    top: 50%;
    left: 1.05rem;
    width: auto;
    height: auto;
    transform: translateY(-50%);
    background: none;
    border-radius: 0;
    color: var(--acct);
    font-weight: 800;
    font-size: 0.95rem;
}

.pillar__balance {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--sp-3);
    margin: 0;
    padding: var(--sp-4) var(--sp-5) var(--sp-5) 2.75rem;
    border-top: 1px solid var(--acct);
    font-weight: 700;
    color: var(--ink);
}
.pillar__amount {
    font-family: var(--font-mono);
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--acct);
    padding-bottom: 2px;
    border-bottom: 3px double var(--acct);
}

/* posting: once the card is in view the lines write in one after another,
   then the balance; with no script or reduced motion they are simply there */
.pillar.to-reveal .pillar__list li,
.pillar.to-reveal .pillar__balance {
    opacity: 0;
    transform: translateX(-10px);
}
.pillar.to-reveal .pillar__list li::before { opacity: 0; }
.pillar.is-in-view .pillar__list li,
.pillar.is-in-view .pillar__balance {
    opacity: 1;
    transform: none;
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.pillar.is-in-view .pillar__list li::before { opacity: 1; transition: opacity 0.2s 0.25s; }
.pillar.is-in-view .pillar__list li:nth-child(1) { transition-delay: 0.25s; }
.pillar.is-in-view .pillar__list li:nth-child(2) { transition-delay: 0.55s; }
.pillar.is-in-view .pillar__list li:nth-child(3) { transition-delay: 0.85s; }
.pillar.is-in-view .pillar__list li:nth-child(4) { transition-delay: 1.15s; }
.pillar.is-in-view .pillar__list li:nth-child(1)::before { transition-delay: 0.5s; }
.pillar.is-in-view .pillar__list li:nth-child(2)::before { transition-delay: 0.8s; }
.pillar.is-in-view .pillar__list li:nth-child(3)::before { transition-delay: 1.1s; }
.pillar.is-in-view .pillar__list li:nth-child(4)::before { transition-delay: 1.4s; }
.pillar.is-in-view .pillar__balance { transition-delay: 1.3s; }

/* Short bullet lists: the pillars, the safety cards, the feature cards */
.pillar__list,
.safe-card ul,
.feature-card__list,
.whats-new {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pillar__list li,
.safe-card li,
.feature-card__list li,
.whats-new li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: var(--sp-2);
    line-height: 1.5;
    color: var(--text-secondary);
}
.pillar__list li::before,
.safe-card li::before,
.feature-card__list li::before,
.whats-new li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.6em;
    width: 0.45rem;
    height: 0.45rem;
    background: var(--qb-navy);
    border-radius: 1px;
}
.pillar__list li:last-child,
.safe-card li:last-child,
.feature-card__list li:last-child { margin-bottom: 0; }

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

/* ============================================================================
 * SECTION HEADING — shared pattern
 * ============================================================================ */

.section-head {
    max-width: 44rem;
    margin: 0 auto var(--stack-gap);
    text-align: center;
}

.section-head h2 {
    margin: var(--sp-3) 0 var(--sp-4);
}

/* ============================================================================
 * DEMO — stage-dressed screenshot with spec row
 * ============================================================================ */

#demo {
    background:
        linear-gradient(180deg, transparent 0%, rgba(0, 51, 102, 0.035) 100%),
        var(--content-bg);
}

.demo-stage {
    max-width: 1060px;
    margin: 0 auto;
    position: relative;
}

.demo-stage__frame {
    position: relative;
    padding: 0;
}

/* measurement ticks along the left/right edges of the frame */
.demo-stage__ruler {
    position: absolute;
    top: 30px; bottom: 0;
    width: 12px;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0, transparent 11px,
            rgba(0, 51, 102, 0.18) 11px, rgba(0, 51, 102, 0.18) 12px
        );
}
.demo-stage__ruler--l { left: -24px; }
.demo-stage__ruler--r { right: -24px; }

.demo-stage__callout {
    position: absolute;
    top: -10px;
    left: -6%;
    max-width: 14rem;
    background: var(--qb-navy);
    color: white;
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 32px rgba(0, 34, 68, 0.3);
    transform: rotate(-2deg);
    z-index: 3;
}
.demo-stage__callout::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 18%;
    width: 14px;
    height: 14px;
    background: var(--qb-navy);
    transform: rotate(45deg);
}
.demo-stage__callout-kicker {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--qb-gold-light);
    margin-bottom: 2px;
}
.demo-stage__callout-body {
    font-size: var(--text-sm);
    line-height: 1.35;
    color: white;
}

.demo-spec {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-6);
    margin-top: var(--stack-gap);
    padding-top: var(--sp-6);
    border-top: 1px dashed rgba(0, 51, 102, 0.2);
}

.demo-spec__cell {
    font-family: var(--font-mono);
}

.demo-spec__label {
    display: block;
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: var(--sp-2);
}

.demo-spec__value {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--qb-navy);
    font-variant-numeric: tabular-nums;
}

/* The callout hangs 6% outside the stage: below 1160 px that is past the
 * viewport's left edge, so it sits above the window instead. */
@media (max-width: 1160px) {
    .demo-stage__callout { position: static; transform: none; margin-bottom: var(--sp-5); max-width: none; }
    .demo-stage__callout::after { display: none; }
}
@media (max-width: 900px) {
    .demo-stage__ruler { display: none; }
    .demo-spec { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================================
 * INSTALL TABS — OS switcher with code panel
 * ============================================================================ */

.install {
    background:
        linear-gradient(180deg, rgba(0, 51, 102, 0.03), transparent 30%),
        var(--panel-bg);
}

.tabs-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--toolbar-border);
}

.tab {
    padding: var(--sp-4) var(--sp-5);
    font-family: var(--font-retro);
    font-size: var(--text-sm);
    font-weight: 600;
    background: var(--toolbar-bg);
    border: 1px solid var(--toolbar-border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    margin-right: -1px;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    transition: background var(--dur-fast) var(--ease-out);
}
.tab:hover { background: var(--toolbar-top); }

.tab[aria-selected="true"] {
    background: var(--panel-bg);
    color: var(--qb-navy);
    font-weight: 700;
    z-index: 1;
    box-shadow: inset 0 2px 0 var(--qb-gold);
}

.tab__icon { width: 16px; height: 16px; flex-shrink: 0; }

/* Narrow screens: the four folder tabs can't shrink below their labels,
 * and any element wider than the viewport gives the WHOLE page a
 * horizontal scroll. Trade the folder-tab illusion for a 2x2 grid. */
@media (max-width: 760px) {
    .tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        border-bottom: none;
        padding-bottom: var(--sp-2);
    }
    .tab {
        justify-content: center;
        margin: 0;
        border-bottom: 1px solid var(--toolbar-border);
        border-radius: var(--radius-sm);
    }
    .tab-panel {
        border-top: 1px solid var(--toolbar-border);
        border-radius: var(--radius-sm);
        padding: var(--card-pad-sm);
    }
    /* "Download SlowBooksPro-Setup-x64.exe" is one nowrap line wider
     * than a phone — let it wrap at the hyphens instead. */
    .tab-panel .btn {
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: center;
    }
}

.tab-panel {
    background: var(--panel-bg);
    border: 1px solid var(--toolbar-border);
    border-top: none;
    padding: var(--card-pad);
    border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
}

.tab-panel[hidden] { display: none; }

.tab-panel h3 {
    color: var(--qb-navy);
    margin-bottom: var(--sp-3);
    font-size: var(--text-xl);
}
.tab-panel__note {
    display: block;
    margin-top: var(--sp-2);
    font-size: var(--text-2xs);
    color: var(--qb-gold);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.tab-panel pre {
    background: var(--qb-navy-dark);
    color: var(--text-on-dark);
    border-radius: var(--radius-sm);
    position: relative;
    padding: var(--sp-5) var(--sp-5) var(--sp-5) calc(var(--sp-5) + 2.5rem);
    font-size: var(--text-sm);
    border: 1px solid var(--qb-navy);
    counter-reset: code-line;
}
.tab-panel pre code { color: #cde0f4; }
.tab-panel pre::before {
    /* tiny "CONSOLE" tag top-right of the block */
    content: "CONSOLE";
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.14em;
    color: var(--qb-gold);
    font-weight: 700;
}

/* ============================================================================
 * PHILOSOPHY — artifact-museum treatment of the splash dialog
 * ============================================================================ */

.philosophy {
    background:
        radial-gradient(700px 400px at 20% 10%, rgba(91, 155, 213, 0.18) 0%, transparent 55%),
        linear-gradient(180deg, var(--qb-navy) 0%, var(--qb-navy-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.philosophy::before {
    /* faint grid substrate, navy-on-navy */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(70% 60% at 50% 50%, black, transparent);
}

.philosophy__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
    gap: var(--sp-10);
    align-items: center;
}

.philosophy__copy h2 {
    font-size: var(--text-5xl);
    color: white;
    margin-bottom: var(--sp-5);
}
.philosophy__copy .hl { color: var(--qb-gold-light); }
.philosophy__copy p { color: var(--text-on-navy); font-size: var(--text-lg); }
.philosophy__vintage { margin-top: var(--sp-5); }
.philosophy__vintage strong { color: var(--qb-gold-light); font-size: var(--text-xl); }

.philosophy__pullquote {
    font-family: var(--font-modern);
    font-weight: 500;
    font-style: italic;
    font-size: var(--text-2xl);
    line-height: 1.3;
    color: white;
    margin-top: var(--sp-6);
    padding-left: var(--sp-5);
    border-left: 3px solid var(--qb-gold);
    max-width: 28rem;
    /* centred under the copy now the column is single (the About dialog is gone) */
    margin-inline: auto;
    text-align: left;
}

/* The about-dialog — treated like a cherished archival artifact */
.dialog-panel {
    background: var(--panel-bg);
    border: 1px solid #6b7a94;
    border-radius: 4px;
    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.6),
        0 12px 28px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    overflow: hidden;
    transform: rotate(-1.2deg);
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}

.dialog-panel::after {
    /* curled corner / pin */
    content: "";
    position: absolute;
    top: -14px; left: 24px;
    width: 48px; height: 28px;
    background: rgba(255, 253, 240, 0.85);
    border: 1px dashed rgba(204, 153, 51, 0.7);
    transform: rotate(-6deg);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dialog-panel__titlebar {
    height: 26px;
    background:
        linear-gradient(180deg, #7ba7d6 0%, #4b7bac 50%, #2e5985 51%, #3c6b99 100%);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 var(--sp-3);
    font-family: var(--font-retro);
    font-size: var(--text-2xs);
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(0,20,40,0.5);
    letter-spacing: 0.03em;
    gap: var(--sp-2);
}

.dialog-panel__titlebar-icon {
    width: 12px; height: 12px;
    background: var(--qb-gold);
    border: 1px solid rgba(0, 20, 40, 0.5);
    border-radius: 1px;
}

.dialog-panel__dots { margin-left: auto; display: flex; gap: 2px; }
.dialog-panel__dot {
    width: 14px; height: 13px;
    background: linear-gradient(180deg, #dfe5ee, #aeb5c3);
    border: 1px solid rgba(0, 20, 40, 0.5);
    border-radius: 1px;
    font-size: 9px; color: #001530; display: flex; align-items: center; justify-content: center;
}

.dialog-panel__body {
    padding: var(--sp-8) var(--sp-6) var(--sp-6);
    text-align: center;
    background:
        linear-gradient(180deg, #fafbfc 0%, #f0f2f5 100%);
}

.dialog-panel__title {
    font-family: var(--font-modern);
    font-weight: 800;
    font-size: var(--text-3xl);
    color: var(--qb-navy);
    letter-spacing: -0.03em;
    margin-bottom: var(--sp-1);
}

.dialog-panel__edition {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.28em;
    color: var(--qb-gold);
    text-transform: uppercase;
    margin-bottom: var(--sp-5);
    font-weight: 500;
}

.dialog-panel__divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--qb-navy) 20%, var(--qb-navy) 80%, transparent);
    margin: 0 auto var(--sp-5);
    width: 80%;
    position: relative;
}
.dialog-panel__divider::before,
.dialog-panel__divider::after {
    content: "◆";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--qb-gold);
    background: #f5f6f9;
    padding: 0 6px;
    font-size: 8px;
}
.dialog-panel__divider::before { left: 38%; }
.dialog-panel__divider::after  { left: 58%; }

.dialog-panel__info {
    font-family: var(--font-retro);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--sp-5);
}
.dialog-panel__info strong { color: var(--qb-navy); }

.dialog-panel__legal {
    font-family: var(--font-retro);
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.7;
    padding-top: var(--sp-4);
    border-top: 1px solid rgba(0, 51, 102, 0.15);
}

.dialog-panel__signoff {
    display: block;
    font-style: italic;
    color: var(--qb-gold);
    margin-top: var(--sp-3);
    font-family: var(--font-modern);
    font-weight: 500;
    font-size: var(--text-sm);
}

@media (max-width: 900px) {
    .philosophy__inner { grid-template-columns: 1fr; }
    .dialog-panel { transform: none; max-width: 100%; }
    .dialog-panel::after { display: none; }
}

/* ============================================================================
 * FAQ — disassembly-listing style with line numbers
 * ============================================================================ */

.faq {
    counter-reset: faq-item;
}

.faq details {
    border-top: 1px solid rgba(0, 51, 102, 0.12);
    padding: var(--sp-5) 0 var(--sp-5) 3.5rem;
    position: relative;
    counter-increment: faq-item;
    transition: background var(--dur-fast) var(--ease-out);
}
.faq details:last-child { border-bottom: 1px solid rgba(0, 51, 102, 0.12); }

.faq details::before {
    content: counter(faq-item, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: var(--sp-5);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--qb-blue-light);
    letter-spacing: 0.04em;
}

.faq details[open] {
    background: rgba(0, 51, 102, 0.025);
}

.faq summary {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--qb-navy);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-4);
    letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    width: 14px; height: 14px;
    flex-shrink: 0;
    background-image:
        linear-gradient(var(--qb-blue-light), var(--qb-blue-light)),
        linear-gradient(var(--qb-blue-light), var(--qb-blue-light));
    background-size: 14px 2px, 2px 14px;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform var(--dur-med) var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }

.faq details > p { margin-top: var(--sp-3); font-size: var(--text-base); color: var(--text-secondary); }

/* ============================================================================
 * FOOTER — closing stamp of a legal document
 * ============================================================================ */

.site-footer {
    background:
        radial-gradient(600px 300px at 85% 100%, rgba(204, 153, 51, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, var(--qb-navy-dark) 0%, #001833 100%);
    color: var(--text-on-navy);
    padding: var(--sp-10) 0 var(--sp-6);
    position: relative;
}

.site-footer::before {
    /* thin gold rule at the very top, like a certificate */
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--qb-gold) 30%, var(--qb-gold) 70%, transparent);
}

.site-footer a { color: var(--text-on-dark); }
.site-footer a:hover { color: var(--qb-gold); }

.site-footer__grid {
    display: grid;
    /* the brand column and the four link columns (Project, Install, Learn,
     * Compare): with four tracks the fifth column wrapped under the brand */
    grid-template-columns: 1.7fr repeat(4, 1fr);
    gap: var(--sp-6);
    margin-bottom: var(--stack-gap);
}

/* The AlternativeTo badge: a block under the brand column, a small inline
 * mark in the bottom bar of the pages without the link columns. */
.site-footer__badge { display: block; margin-top: var(--sp-4); max-width: 100%; }
.site-footer__badge img { display: block; width: 100%; max-width: 406px; height: auto; }
.site-footer__bottom .site-footer__badge { display: inline-block; margin-top: var(--sp-3); }
.site-footer__bottom .site-footer__badge img { width: 260px; height: 47px; }
/* A footer with only the bottom bar: no rule above it, no second top padding. */
.site-footer > .container > .site-footer__bottom:first-child { border-top: 0; padding-top: 0; }

.site-footer__brand {
    font-family: var(--font-modern);
    font-size: var(--text-xl);
    color: white;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: var(--sp-2);
}

.site-footer__tagline {
    font-size: var(--text-sm);
    color: var(--text-on-navy);
    max-width: 22rem;
    line-height: 1.55;
}

.site-footer__seal {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-4);
    padding: var(--sp-2) var(--sp-3);
    border: 1px solid rgba(204, 153, 51, 0.5);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    color: var(--qb-gold-light);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
}
.site-footer__seal::before {
    content: "◆";
    color: var(--qb-gold);
}

.site-footer h2 {
    line-height: 1.4;
    color: var(--qb-gold-light);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: var(--sp-4);
    font-weight: 600;
}

.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: var(--sp-2); font-size: var(--text-sm); }

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--sp-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-xs);
    color: var(--text-on-navy);
    gap: var(--sp-4);
    flex-wrap: wrap;
    font-family: var(--font-mono);
    letter-spacing: 0.03em;
}

@media (max-width: 900px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* 320 px phones (WCAG 1.4.10, reflow without sideways scrolling): the footer's
 * link columns stack, the brand, the GitHub button and the menu button don't
 * fit side by side (GitHub stays in the open menu), and a long path or command
 * in running text wraps. */
@media (max-width: 480px) {
    .site-footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
    .site-nav:not(.site-nav--open) .site-nav__links li:last-child { display: none; }
}
p code, li code { overflow-wrap: anywhere; }

/* ============================================================================
 * KEYFRAMES — single tidy block at the bottom
 * ============================================================================ */

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

@keyframes window-enter {
    from { opacity: 0; transform: rotate(4deg) translate(40px, 20px) scale(0.96); }
    to   { opacity: 1; transform: rotate(1.3deg) translate(0, 0) scale(1); }
}

@keyframes underline-grow {
    to { transform: skewX(-10deg) scaleX(1); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 115, 33, 0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(37, 115, 33, 0); }
}

/* Scroll reveal — JS adds .to-reveal then .is-in-view. */
.to-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.7s var(--ease-out),
        transform 0.7s var(--ease-out);
    will-change: opacity, transform;
}
.to-reveal.is-in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger pillars as they enter */
.pillars .pillar.to-reveal { transition-delay: 0s; }
.pillars .pillar:nth-child(2).to-reveal { transition-delay: 0.1s; }
.pillars .pillar:nth-child(3).to-reveal { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
    .hero__headline-line,
    .hero__headline-accent::after,
    .hero__sub,
    .hero__ctas,
    .hero__stamps,
    .hero__showcase,
    .hero__meta {
        opacity: 1;
        animation: none;
        transform: none;
    }
    .hero__app { transform: none; }
    .hero__meta-dot { animation: none; }
    .to-reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================================
 * V2.0.0 SHOWCASE — 2x2 feature grid with screenshot-prominent cards.
 * Sits between the pillars and the demo to give the new-in-v2 features
 * their own real estate without crowding the strategic 3-pillar story.
 * ============================================================================ */

.v2-showcase {
    background: var(--panel-bg);
    border-top: 1px solid rgba(0, 51, 102, 0.06);
}

.feature-showcase {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-5);
    margin-top: var(--stack-gap);
}

.feature-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        box-shadow var(--dur-med) var(--ease-out),
        border-color var(--dur-med) var(--ease-out);
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--qb-blue-light);
}

/* Every picture the same size: a 4:3 window onto the top-left of the
 * screenshot. The link opens the whole screen. */
.feature-card__image {
    display: block;
    background: linear-gradient(180deg, var(--qb-cream), #f0e8d0);
    padding: var(--sp-3);
    border-bottom: 1px solid var(--panel-border);
}

.feature-card__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: top left;
    border-radius: var(--radius-sm);
    border: 1px solid var(--qb-navy-dark);
    box-shadow: var(--shadow-md);
}

.feature-card__body {
    padding: var(--sp-5);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.feature-card h3 {
    font-size: var(--text-xl);
    color: var(--qb-navy);
    margin: 0 0 var(--sp-3);
    letter-spacing: -0.02em;
}

.feature-card__list li { font-size: var(--text-sm); }

.feature-card__more {
    margin-top: auto;
    padding-top: var(--sp-3);
    font-size: var(--text-sm);
    font-weight: 600;
}

@media (max-width: 1199px) {
    .feature-showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
    .feature-showcase { grid-template-columns: 1fr; }
}

/* ============================================================================
 * YOUR BOOKS ARE SAFE — the anti-ledger: after the paper account pages above,
 * a dark, modern panel. Each card leads with a live status, shows a small
 * proof of the thing, then two or three short lines.
 * ============================================================================ */
.safe {
    position: relative;
    background:
        radial-gradient(1200px 500px at 15% -10%, rgba(74, 127, 181, 0.35), transparent 60%),
        radial-gradient(900px 500px at 100% 110%, rgba(37, 115, 33, 0.18), transparent 60%),
        linear-gradient(180deg, #071a33, #0b2547);
    color: #dbe6f3;
}
.safe .section-head h2 { color: #ffffff; }
.safe .section-head .lede { color: #b8c8dc; }
.safe-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-5);
}
.safe-card {
    --glow: #6cc46a;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--card-pad);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    scroll-margin-top: calc(var(--nav-height) + var(--sp-4));
    transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}
.safe-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.24); }
.safe-card--server { --glow: #60a5fa; }
.safe-card--lock   { --glow: #fbbf24; }

.safe-card__status {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 var(--sp-4);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: var(--text-sm);
    font-weight: 600;
    color: #ffffff;
}
.safe-card__dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--glow);
    box-shadow: 0 0 0 0 var(--glow);
    animation: safe-pulse 2.4s ease-out infinite;
}
@keyframes safe-pulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--glow) 60%, transparent); }
    70%  { box-shadow: 0 0 0 8px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}
.safe-card h3 {
    font-size: var(--text-2xl);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0 0 var(--sp-4);
}
.safe-card__shot {
    /* a real screen from the app, on a light mat so it reads on the dark card */
    margin: 0 0 var(--sp-5);
    padding: 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.safe-card__shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.safe .safe-card ul li { color: #c9d7e8; }
.safe .safe-card ul li::before { background: var(--glow); border-radius: 50%; }
.safe-card__links {
    margin-top: auto;
    padding-top: var(--sp-5);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
}
.safe-card__links a {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
}
.safe-card__links a:hover { background: rgba(255, 255, 255, 0.1); }
.safe-card__links a:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .safe-card__dot { animation: none; }
}
@media (max-width: 900px) {
    .safe-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
 * WHAT PEOPLE SAY — quotes from GitHub Discussions, attributed and linked
 * ============================================================================ */
.says {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-5);
    max-width: 72rem;
    margin: 0 auto;
}
.say {
    position: relative;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    padding: var(--sp-6);
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(13, 26, 46, 0.04), 0 10px 30px rgba(13, 26, 46, 0.06);
    overflow: hidden;
    transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.say:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(13, 26, 46, 0.06), 0 18px 40px rgba(13, 26, 46, 0.1); }
.say::before {
    /* the oversized quote mark, decoration only */
    content: "\201C";
    position: absolute;
    right: 1rem;
    top: -1.6rem;
    font-size: 9rem;
    line-height: 1;
    font-weight: 900;
    color: rgba(0, 51, 102, 0.06);
    pointer-events: none;
}
.say--featured {
    grid-column: span 2;
    background: linear-gradient(135deg, #0b2547, #12386a);
    border-color: transparent;
    color: #ffffff;
}
.say--featured::before { color: rgba(255, 255, 255, 0.08); }

.say__who {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    font-size: var(--text-sm);
}
.say__avatar {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: #ffffff;
    background: linear-gradient(135deg, var(--qb-navy), var(--qb-blue-light));
}
.say--gh .say__avatar { background: linear-gradient(135deg, #21651d, #3e9a39); }
.say--featured .say__avatar { background: linear-gradient(135deg, var(--qb-gold), #e6b85c); color: #0b2547; }
.say__name {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}
.say__handle { font-weight: 500; color: var(--text-secondary); }
.say--featured .say__name { color: #ffffff; }
.say--featured .say__handle { color: #b8c8dc; }
.say__source {
    margin-left: auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--text-secondary);
}
.say__source svg { width: 18px; height: 18px; }
.say__source:hover { background: rgba(0, 51, 102, 0.06); color: var(--ink); }
.say--featured .say__source { color: #dbe6f3; }
.say--featured .say__source:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }

.say blockquote { margin: 0; flex: 1; }
.say blockquote p {
    margin: 0;
    font-size: var(--text-lg);
    line-height: 1.5;
    color: var(--text-primary);
}
.say--featured blockquote p {
    font-size: clamp(var(--text-xl), 2.2vw, var(--text-3xl));
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #ffffff;
}
/* the key phrase: colour and weight, no highlighter band */
.say mark {
    background: none;
    color: var(--qb-navy);
    font-weight: 700;
}
.say--featured mark { color: #f2c46b; }
.say__tag {
    align-self: flex-start;
    margin: 0;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}
.say--featured .say__tag { background: rgba(255, 255, 255, 0.12); color: #dbe6f3; }
@media (max-width: 1000px) {
    .says { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .says { grid-template-columns: 1fr; }
    .say--featured { grid-column: auto; }
}

/* ============================================================================
 * WHAT'S NEW — the current feature release as a short list
 * ============================================================================ */
.whats-new {
    max-width: 44rem;
    margin: 0 auto;
}
.whats-new li { font-size: var(--text-base); }
.whats-new__more {
    max-width: 44rem;
    margin: var(--sp-5) auto 0;
    text-align: center;
    color: var(--text-secondary);
}

/* ========================================================================
 * COMPARISON PAGES  (/compare/*)
 * ======================================================================== */

.cmp-page { padding: var(--page-top) 0 var(--sp-10); }
.cmp-page .container { max-width: 920px; }

/* The guide and comparison headlines run three lines at full size: the base
 * h1's 0.98 let a line's descenders touch the next, and the updated line sat
 * on the headline with no gap. */
.cmp-page h1 { line-height: 1.06; margin: var(--sp-3) 0 var(--sp-4); font-size: clamp(2rem, 7vw, var(--text-6xl)); }

.cmp-updated {
    font-size: 12px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .08em; margin: 0 0 var(--sp-5);
}

.cmp-verdict {
    border: 2px solid var(--qb-navy);
    border-left-width: 8px;
    background: var(--qb-cream);
    padding: var(--card-pad-sm) var(--card-pad); margin: var(--sp-6) 0 var(--sp-8);
    font-size: 16px; line-height: 1.55;
}
.cmp-verdict strong { color: var(--qb-navy); }

.cmp-table-wrap { overflow-x: auto; margin: var(--sp-6) 0; }
.cmp-table {
    width: 100%; border-collapse: collapse; font-size: 14px;
    background: #fff; border: 1px solid var(--panel-border);
}
.cmp-table caption {
    text-align: left; font-size: 12px; color: var(--text-muted);
    padding: 8px 2px; caption-side: bottom;
}
.cmp-table th, .cmp-table td {
    border: 1px solid var(--panel-border);
    padding: 10px 14px; text-align: left; vertical-align: top;
}
.cmp-table thead th {
    background: var(--qb-navy); color: #fff;
    font-size: 13px; letter-spacing: .03em;
}
.cmp-table tbody th {
    background: var(--qb-cream); font-weight: 600; white-space: nowrap;
}
.cmp-table .yes { color: #1e6b34; font-weight: 600; }
.cmp-table .no  { color: #a33; }
.cmp-table .meh { color: #8a6d1a; }

.cmp-page h2 { margin-top: var(--sp-8); }
.cmp-page h3 { margin-top: var(--sp-6); }
.cmp-page p, .cmp-page li { line-height: 1.65; }

.cmp-cta {
    margin: var(--sp-10) 0 0; padding: var(--card-pad);
    background: var(--qb-navy); color: #fff; text-align: center;
}
.cmp-cta h2 { color: #fff; margin: 0 0 var(--sp-2); }
.cmp-cta p { color: #cfd9e4; margin: 0 0 var(--sp-4); }
.cmp-cta .btn { margin: var(--sp-1); }
/* A long button label ("Download for macOS - Developer ID signed, notarized") wraps on a phone
   instead of pushing the page sideways. */
.cmp-cta .btn { max-width: 100%; white-space: normal; text-align: center; }
.cmp-cta .btn--ghost { border-color: #cfd9e4; color: #fff; }

/* ---------------------------------------------------------------------------
   Release list — the "what's new" section used to be one paragraph that every
   release was appended to; by v2.10 it was an unreadable wall. One row per
   release, version in its own column, one sentence of substance.
   --------------------------------------------------------------------------- */
.release-list {
    list-style: none;
    margin: var(--stack-gap) auto 0;
    padding: 0;
    max-width: 60rem;
    display: grid;
    gap: var(--sp-3);
    text-align: left;
}

.release-list li {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: var(--sp-4);
    align-items: baseline;
    padding: var(--sp-3) var(--sp-4);
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-left: 3px solid var(--qb-gold);
    border-radius: var(--radius-sm);
}

.release-list li:first-child {
    border-left-color: var(--qb-green);
}

.release-list__ver {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.release-list li:first-child .release-list__ver { color: var(--qb-green); }

.release-list li div {
    font-size: 0.95rem;
    line-height: 1.55;
}

.release-list strong { color: var(--ink); }

@media (max-width: 640px) {
    .release-list li {
        grid-template-columns: 1fr;
        gap: var(--sp-2);
    }
}
