/* ─────────────────────────────────────────────────────────────
   Flipbook landing
   Design: a single cream page slipped inside a leather notebook.
   ───────────────────────────────────────────────────────────── */

:root {
    --app-bg: #E8DCC8;
    --surface: #FBF7EC;
    --ink: #2E271B;
    --muted: #8A7F66;
    --border: #E2D9C4;
    --rule: #D8CFB8;
    --margin-red: #C0504D;
    --gold: #B8892B;
    --gold-hover: #9A7020;
    --leather: #5C3A21;
    --leather-dark: #432A18;
    --leather-surround-1: #4A2E18;
    --leather-surround-2: #2E1C0E;
    --shadow-soft: 0 12px 32px rgba(60, 45, 25, 0.10);
    --shadow-strong: 0 22px 46px rgba(60, 45, 25, 0.18);
    --radius: 14px;
    --line-height: 32px;
}

html.lamp {
    --app-bg: #D6C29A;
    --surface: #F4E8CE;
    --ink: #3A2E1E;
    --muted: #7A6A4A;
    --border: #C9B58C;
    --rule: #C9B58C;
    --margin-red: #A04A3F;
    --gold: #9A7020;
    --gold-hover: #7A5A18;
    --leather: #5C3A21;
    --leather-dark: #432A18;
    --leather-surround-1: #3E2614;
    --leather-surround-2: #241608;
    --shadow-soft: 0 12px 32px rgba(90, 70, 40, 0.18);
    --shadow-strong: 0 22px 46px rgba(90, 70, 40, 0.25);
}

html.dark {
    --app-bg: #0E0C08;
    --surface: #1F1C16;
    --ink: #EFE5D2;
    --muted: #8A8171;
    --border: #2E2A22;
    --rule: #2A2620;
    --margin-red: #7A3A35;
    --gold: #D4A846;
    --gold-hover: #E8C46A;
    --leather: #2E2014;
    --leather-dark: #1A1208;
    --leather-surround-1: #1E1408;
    --leather-surround-2: #0C0700;
    --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-strong: 0 22px 46px rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--app-bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.4s ease, color 0.4s ease;
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ── BOOK SURROUND ── */
.book {
    position: relative;
    min-height: 100vh;
    background:
        repeating-linear-gradient(135deg,
            rgba(255, 255, 255, 0.02) 0px,
            rgba(255, 255, 255, 0.02) 2px,
            transparent 2px,
            transparent 6px),
        radial-gradient(ellipse at 50% 0%, rgba(255, 220, 160, 0.08), transparent 60%),
        linear-gradient(180deg, var(--leather-surround-1), var(--leather-surround-2));
    padding: 100px 20px 60px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
    overflow-x: hidden;
    box-shadow:
        inset 0 40px 60px rgba(0, 0, 0, 0.35),
        inset 0 -40px 60px rgba(0, 0, 0, 0.35);
}

.book::before {
    content: "";
    position: fixed;
    inset: 14px;
    border: 1px solid rgba(212, 168, 70, 0.35);
    border-radius: 4px;
    pointer-events: none;
    z-index: 1;
}

@media (min-width: 1200px) {
    .book {
        padding: 120px 40px 80px;
    }
}

@media (max-width: 720px) {
    .book {
        padding: 80px 10px 40px;
    }

    .book::before {
        inset: 8px;
    }
}

/* ── THE PAGE ── */
.page {
    position: relative;
    width: 100%;
    max-width: 960px;
    min-width: 0;
    background-color: var(--surface);
    background-image:
        linear-gradient(to right,
            transparent 72px,
            var(--margin-red) 72px,
            var(--margin-red) 73px,
            transparent 73px),
        repeating-linear-gradient(to bottom,
            transparent 0,
            transparent calc(var(--line-height) - 1px),
            var(--rule) calc(var(--line-height) - 1px),
            var(--rule) var(--line-height));
    background-position: 0 0, 0 calc(var(--line-height) * 3);
    border-radius: 3px;
    padding: 90px 88px 60px 96px;
    box-sizing: border-box;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 30px 60px rgba(0, 0, 0, 0.35),
        0 8px 20px rgba(0, 0, 0, 0.25);
    background-blend-mode: multiply, normal;
    transition: background-color 0.4s ease;
}

.page::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background-image: radial-gradient(rgba(0, 0, 0, 0.025) 1px,
            transparent 1px);
    background-size: 3px 3px;
    opacity: 0.6;
    z-index: 0;
}

html.dark .page::after {
    background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px,
            transparent 1px);
}

.page>* {
    position: relative;
    z-index: 1;
}

@media (max-width: 720px) {
    .page {
        --line-height: 28px;
        padding: 60px 28px 40px 40px;
        background-position: 0 0, 0 calc(var(--line-height) * 2.5);
        background-image:
            linear-gradient(to right,
                transparent 32px,
                var(--margin-red) 32px,
                var(--margin-red) 33px,
                transparent 33px),
            repeating-linear-gradient(to bottom,
                transparent 0,
                transparent calc(var(--line-height) - 1px),
                var(--rule) calc(var(--line-height) - 1px),
                var(--rule) var(--line-height));
    }
}

/* ── NAV DOCK ── */
.nav {
    position: fixed;
    top: 12px;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 20px;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

.nav-inner {
    width: 100%;
    /* Increased from 720px to 840px to fit all 5 links + buttons */
    max-width: 840px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    /* Tightened gap slightly */
    padding: 9px 12px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
    border-radius: 14px;
    box-shadow:
        0 1px 2px rgba(60, 45, 25, 0.06),
        0 10px 26px rgba(60, 45, 25, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    pointer-events: auto;
    transition:
        max-width 0.35s cubic-bezier(.2, .8, .2, 1),
        padding 0.3s cubic-bezier(.2, .8, .2, 1),
        box-shadow 0.3s ease,
        background 0.3s ease;
    animation: navEnter 0.6s cubic-bezier(.2, .8, .2, 1) both;
    flex-wrap: wrap;
}

@keyframes navEnter {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.nav.scrolled .nav-inner {
    max-width: 720px;
    /* Adjusted to match the new width ratio */
    padding: 7px 10px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow:
        0 1px 2px rgba(60, 45, 25, 0.06),
        0 14px 30px rgba(60, 45, 25, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    padding: 4px 8px 4px 6px;
    border-radius: 10px;
    transition: transform 0.25s cubic-bezier(.2, .8, .2, 1);
}

.nav-brand:hover {
    transform: scale(1.03);
}

.nav-brand svg {
    transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
}

.nav-brand:hover svg {
    transform: rotate(-6deg) scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2px;
    font-size: 13.5px;
}

.nav-link {
    position: relative;
    padding: 7px 12px;
    border-radius: 9px;
    color: var(--muted);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition:
        color 0.2s ease,
        background 0.25s cubic-bezier(.2, .8, .2, 1),
        transform 0.25s cubic-bezier(.2, .8, .2, 1);
}

.nav-link:hover {
    color: var(--ink);
    background: rgba(184, 137, 43, 0.09);
    transform: translateY(-1px);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
    transform: translateX(-50%) scale(0);
    transition: transform 0.3s cubic-bezier(.2, .8, .2, 1);
}

.nav-link:hover::after {
    transform: translateX(-50%) scale(1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-theme {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 60%, transparent);
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.25s cubic-bezier(.2, .8, .2, 1),
        color 0.2s ease;
    flex-shrink: 0;
}

.nav-theme:hover {
    border-color: var(--gold);
    background: rgba(184, 137, 43, 0.12);
    transform: translateY(-1px);
}

.nav-theme:active {
    transform: translateY(0) scale(0.96);
}

.nav-theme .theme-icon {
    display: inline-block;
    line-height: 1;
    transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
}

.nav-theme.spinning .theme-icon {
    animation: themeSpin 0.5s cubic-bezier(.2, .8, .2, 1);
}

@keyframes themeSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.15);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

.nav-cta {
    padding: 7px 14px;
    border-radius: 9px;
    background: var(--leather);
    color: #F4DFA0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1px;
    border: 1px solid var(--leather);
    transition:
        transform 0.25s cubic-bezier(.2, .8, .2, 1),
        background 0.2s ease,
        box-shadow 0.25s ease;
    white-space: nowrap;
}

.nav-cta:hover {
    background: var(--leather-dark);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 16px rgba(92, 58, 33, 0.25);
}

.nav-cta:active {
    transform: translateY(0) scale(0.99);
}

@media (max-width: 820px) {
    .nav {
        top: 8px;
        padding: 0 10px;
    }

    .nav-inner {
        padding: 7px 9px;
        border-radius: 12px;
        gap: 8px;
        max-width: 100%;
    }

    .nav.scrolled .nav-inner {
        padding: 6px 8px;
        max-width: 100%;
    }

    .nav-links {
        display: none;
        /* Hide links on smaller screens */
    }

    .nav-brand {
        font-size: 14px;
    }

    .nav-theme {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .nav-cta {
        padding: 6px 11px;
        font-size: 12px;
    }
}

/* ── HERO ── */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 48px;
    align-items: center;
    padding: 20px 0 60px;
    min-width: 0;
}

.hero-text {
    min-width: 0;
}

.hero-text h1 {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(30px, 4.5vw, 50px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.5px;
    color: var(--ink);
    margin-bottom: 20px;
}

.lede {
    font-size: 16px;
    line-height: 1.7;
    color: var(--muted);
    max-width: 460px;
    margin-bottom: 28px;
}

.cta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--leather);
    color: #F4DFA0;
    border-color: var(--leather);
}

.btn-primary:hover {
    background: var(--leather-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.btn-ghost {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: var(--gold);
    color: var(--gold-hover);
}

.btn-coffee {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}

.btn-coffee:hover {
    background: var(--gold-hover);
    border-color: var(--gold-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.small-note {
    font-size: 12.5px;
    color: var(--muted);
}

.hero-image {
    min-width: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    transform: perspective(1200px) rotateY(-3deg) rotateX(2deg);
    transition: transform 0.5s cubic-bezier(.2, .8, .2, 1);
}

.hero-image:hover {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.hero-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 10px 0 40px;
    }

    .hero-image {
        transform: none;
    }
}

/* ── SECTION HEADINGS ── */
.features h2,
.screenshots h2,
.support h2,
.why h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 32px;
    color: var(--ink);
}

/* ── FEATURES ── */
.features {
    padding: 40px 0 60px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

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

.feature {
    position: relative;
    padding: 22px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: default;
    overflow: hidden;
    transition:
        transform 0.35s cubic-bezier(.2, .8, .2, 1),
        box-shadow 0.35s cubic-bezier(.2, .8, .2, 1),
        border-color 0.3s ease,
        background 0.3s ease;
    will-change: transform;
}

.feature::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(500px circle at 50% 0%,
            color-mix(in srgb, var(--gold) 12%, transparent),
            transparent 50%);
    transition: opacity 0.45s ease;
}

.feature:hover::before {
    opacity: 1;
}

.feature:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--gold) 55%, var(--border));
    background: color-mix(in srgb, var(--surface) 92%, var(--gold) 8%);
    box-shadow:
        0 1px 2px rgba(60, 45, 25, 0.04),
        0 10px 26px rgba(60, 45, 25, 0.10),
        0 22px 46px rgba(60, 45, 25, 0.06);
}

html.lamp .feature:hover {
    box-shadow:
        0 1px 2px rgba(60, 45, 25, 0.06),
        0 12px 30px rgba(60, 45, 25, 0.16),
        0 22px 46px rgba(60, 45, 25, 0.10);
}

html.dark .feature:hover {
    border-color: color-mix(in srgb, var(--gold) 60%, var(--border));
    background: color-mix(in srgb, var(--surface) 90%, var(--gold) 10%);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 12px 30px rgba(0, 0, 0, 0.5),
        0 24px 52px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: inline-block;
    transform-origin: left center;
    transition:
        transform 0.4s cubic-bezier(.2, .8, .2, 1),
        filter 0.4s ease;
}

.feature:hover .feature-icon {
    transform: scale(1.15) rotate(-4deg);
    filter: drop-shadow(0 4px 8px rgba(184, 137, 43, 0.25));
}

.feature h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ink);
    transition: color 0.3s ease;
}

.feature:hover h3 {
    color: color-mix(in srgb, var(--ink) 70%, var(--gold) 30%);
}

.feature p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

/* ── SCREENSHOTS ── */
.screenshots {
    padding: 40px 0 60px;
}

.screenshot-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

@media (max-width: 700px) {
    .screenshot-row {
        grid-template-columns: 1fr;
    }
}

.screenshot-row figure,
.screenshot-single {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    min-width: 0;
    transition:
        transform 0.4s cubic-bezier(.2, .8, .2, 1),
        box-shadow 0.4s cubic-bezier(.2, .8, .2, 1),
        border-color 0.3s ease;
    will-change: transform;
}

.screenshot-row figure::after,
.screenshot-single::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg,
            transparent 20%,
            rgba(255, 255, 255, 0.35) 50%,
            transparent 80%);
    transform: skewX(-12deg);
    pointer-events: none;
    opacity: 0;
    z-index: 2;
}

.screenshot-row figure::before,
.screenshot-single::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    background: radial-gradient(600px circle at 50% 0%,
            color-mix(in srgb, var(--gold) 14%, transparent),
            transparent 55%);
    transition: opacity 0.5s ease;
}

.screenshot-row figure:hover::before,
.screenshot-single:hover::before {
    opacity: 1;
}

.screenshot-row figure:hover::after,
.screenshot-single:hover::after {
    opacity: 1;
    animation: sheenSweep 1.1s cubic-bezier(.3, .05, .2, 1) forwards;
}

@keyframes sheenSweep {
    0% {
        left: -60%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 130%;
        opacity: 0;
    }
}

.screenshot-row figure:hover,
.screenshot-single:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--gold) 55%, var(--border));
    box-shadow:
        0 1px 2px rgba(60, 45, 25, 0.05),
        0 14px 32px rgba(60, 45, 25, 0.13),
        0 28px 58px rgba(60, 45, 25, 0.08);
}

html.lamp .screenshot-row figure:hover,
html.lamp .screenshot-single:hover {
    box-shadow:
        0 1px 2px rgba(60, 45, 25, 0.08),
        0 16px 36px rgba(60, 45, 25, 0.2),
        0 28px 58px rgba(60, 45, 25, 0.12);
}

html.dark .screenshot-row figure:hover,
html.dark .screenshot-single:hover {
    border-color: color-mix(in srgb, var(--gold) 60%, var(--border));
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.35),
        0 16px 36px rgba(0, 0, 0, 0.55),
        0 30px 62px rgba(0, 0, 0, 0.35);
}

.screenshot-row img,
.screenshot-single img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 0;
    transition:
        transform 0.55s cubic-bezier(.2, .8, .2, 1),
        filter 0.4s ease;
}

.screenshot-row figure:hover img,
.screenshot-single:hover img {
    transform: scale(1.03);
    filter: brightness(1.02) contrast(1.02);
}

.screenshot-row figcaption,
.screenshot-single .caption {
    padding: 12px 16px;
    font-size: 12px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 3;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.screenshot-row figure:hover figcaption,
.screenshot-single:hover .caption {
    color: color-mix(in srgb, var(--muted) 40%, var(--gold) 60%);
    letter-spacing: 0.5px;
}

/* ── WHY ── */
.why {
    padding: 40px 0 50px;
}

.why-inner {
    max-width: 620px;
}

.why p {
    font-family: 'Lora', Georgia, serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    margin-bottom: 16px;
}

/* ── SUPPORT ── */
.support {
    padding: 40px 0 50px;
    text-align: center;
}

.support-lede {
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.support-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── FOOTER ── */
.footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px dashed var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--ink);
}

.muted {
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 18px;
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--ink);
}

@media (max-width: 640px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

/* ── LEGAL PAGES ── */
.page-legal {
    max-width: 780px;
}

.page-legal h1 {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 600;
    letter-spacing: -0.4px;
    margin-bottom: 10px;
    color: var(--ink);
}

.page-legal .last-updated {
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 32px;
    font-family: 'JetBrains Mono', monospace;
}

.page-legal h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    margin-top: 34px;
    margin-bottom: 12px;
    color: var(--ink);
}

.page-legal p,
.page-legal li {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--ink);
    margin-bottom: 14px;
}

.page-legal ul {
    padding-left: 22px;
    margin-bottom: 20px;
}

.page-legal a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-legal a:hover {
    color: var(--gold-hover);
}

.page-legal code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: color-mix(in srgb, var(--ink) 8%, transparent);
    padding: 2px 6px;
    border-radius: 4px;
}

.back {
    display: inline-block;
    margin-bottom: 28px;
    font-size: 13.5px;
    color: var(--muted);
    transition: color 0.2s ease;
}

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

/* ── ITCH.IO BUTTON ── */
.btn-itch {
    background: #FA5C5C;
    /* itch.io signature red */
    color: #fff;
    border-color: #FA5C5C;
}

.btn-itch:hover {
    background: #E04B4B;
    border-color: #E04B4B;
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.btn-itch svg {
    flex-shrink: 0;
}

/* ── QR CODE BLOCK ── */
.qr-block {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding: 14px 18px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px dashed var(--border);
    border-radius: 12px;
    max-width: 420px;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.qr-block:hover {
    border-color: var(--gold);
    background: color-mix(in srgb, var(--surface) 88%, var(--gold) 12%);
}

.qr-code {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: 1px solid var(--border);
}

.qr-code canvas,
.qr-code img {
    width: 100%;
    height: 100%;
    display: block;
}

.qr-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.qr-text strong {
    font-family: 'Lora', Georgia, serif;
    font-size: 15px;
    color: var(--ink);
}

.qr-text span {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.4;
}

.qr-code:empty::before {
    content: "…";
    color: var(--muted);
    font-size: 18px;
}

@media (max-width: 900px) {
    .qr-block {
        max-width: 100%;
    }
}

/* ── DOWNLOAD PAGE ── */
.download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    margin: 28px 0 40px;
    flex-wrap: wrap;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.download-card:hover {
    border-color: var(--gold);
    background: color-mix(in srgb, var(--surface) 88%, var(--gold) 12%);
}

.download-card__title {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    color: var(--ink);
    font-size: 16px;
}

.download-card__meta {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.download-card .btn {
    flex-shrink: 0;
}

.download-steps {
    padding-left: 22px;
    margin-bottom: 20px;
}

.download-steps li {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--ink);
    margin-bottom: 8px;
}

.download-steps strong {
    color: var(--ink);
    font-weight: 600;
}