/* ==========================================================================
   Stories at Dawn - shared stylesheet
   Palette: night ink, lamp gold, dawn rose. One memorable moment: the
   sunrise horizon in the home hero. Everything else stays quiet.
   ========================================================================== */

:root {
    --ink-0: #0a0d15;
    --ink-1: #111623;
    --ink-2: #192033;
    --ink-3: #222b43;
    --line: #263049;
    --text: #f1ebdd;
    --muted: #98a1b6;
    --lamp: #e5bb6c;
    --lamp-strong: #f0cd86;
    --lamp-ink: #2a1d05;
    --dawn: #d98a6c;
    --ok: #6fcf97;
    --bad: #f0716b;
    --warn: #f2c25d;

    --lamp-text: #e5bb6c;
    --lamp-text-strong: #f0cd86;
    --soft: var(--soft);
    --header-bg: rgba(10,13,21,.88);
    --chip-bg: rgba(10,13,21,.82);
    --chip-free-ink: #07250f;
    --overlay: rgba(10,13,21,.88);
    --shadow-1: var(--shadow-1);
    --shadow-2: var(--shadow-2);
    --err-ink: #ffc4c0; --ok-ink: #bfeed2; --info-ink: #f5dfae; --warn-ink: #f8dc9c;
    color-scheme: dark;

    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-ui: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-read: 'Source Serif 4', Georgia, serif;

    --radius: 10px;
    --radius-lg: 16px;
    --wrap: 1180px;
}


/* ---------- Day theme ---------- */
html[data-theme="light"] {
    --ink-0: #fbf7ef;
    --ink-1: #fffdf8;
    --ink-2: #f4edde;
    --ink-3: #ebe2cf;
    --line: #e3d8c1;
    --text: #2b2218;
    --muted: #6e6454;
    --lamp: #e3ac45;
    --lamp-strong: #d49a2c;
    --lamp-ink: #2a1d05;
    --dawn: #c9714f;
    --ok: #2d8a57; --bad: #c4423b; --warn: #a8741a;
    --lamp-text: #94640c;
    --lamp-text-strong: #7a4f05;
    --soft: #4d4234;
    --header-bg: rgba(251,247,239,.86);
    --chip-bg: rgba(255,253,248,.92);
    --chip-free-ink: #0b3a1c;
    --overlay: rgba(251,247,239,.9);
    --shadow-1: rgba(70,50,20,.38);
    --shadow-2: rgba(70,50,20,.5);
    --err-ink: #8e2620; --ok-ink: #1d5e3a; --info-ink: #6b4a08; --warn-ink: #6f4b08;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--ink-0);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 1rem;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--lamp-text-strong); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 92%; max-width: var(--wrap); margin: 0 auto; }
.wrap-narrow { width: 92%; max-width: 760px; margin: 0 auto; }

:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--lamp); color: var(--lamp-ink); padding: 8px 14px; border-radius: 6px; z-index: 2000; }
.skip-link:focus { left: 8px; }

@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: .8em 1.5em; border-radius: 999px; border: 1px solid transparent;
    font: 600 .95rem/1 var(--font-ui); cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
    text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-busy { opacity: .6; cursor: progress; }
.btn-primary { background: var(--lamp); color: var(--lamp-ink); }
.btn-primary:hover { background: var(--lamp-strong); color: var(--lamp-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--lamp-text); color: var(--lamp-text-strong); }
.btn-danger { background: transparent; border-color: rgba(240,113,107,.5); color: var(--bad); }
.btn-danger:hover { background: rgba(240,113,107,.12); color: var(--bad); }
.btn-sm { padding: .55em 1.1em; font-size: .85rem; }
.btn-block { display: flex; width: 100%; }

/* ---------- header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--header-bg); backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 66px; }
.brand { display: inline-flex; align-items: center; }
.brand-mark { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--lamp-text); letter-spacing: -.01em; margin: 0; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; flex: 1; justify-content: flex-end; }
.site-nav ul { display: flex; gap: 1.5rem; margin-right: auto; margin-left: 1.5rem; }
.site-nav ul a { padding: 6px 0; color: var(--muted); font-weight: 500; font-size: .95rem; border-bottom: 2px solid transparent; }
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { color: var(--text); border-bottom-color: var(--lamp-text); }
.nav-search input {
    width: 190px; background: var(--ink-1); border: 1px solid var(--line); color: var(--text);
    padding: .5em 1em; border-radius: 999px; font: inherit; font-size: .9rem;
}
.nav-search input:focus { outline: none; border-color: var(--lamp-text); }
.nav-account { display: flex; align-items: center; gap: 1rem; }
.nav-link-quiet { color: var(--muted); font-size: .92rem; font-weight: 500; }
.nav-link-quiet:hover, .nav-link-quiet[aria-current="page"] { color: var(--text); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 42px; height: 42px; cursor: pointer; color: var(--text); }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; margin: auto; transition: transform .2s; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }

@media (max-width: 880px) {
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 1rem; padding: 1.25rem 4%;
        background: var(--ink-0); border-bottom: 1px solid var(--line);
    }
    .site-nav.is-open { display: flex; }
    .site-nav ul { flex-direction: column; gap: .25rem; margin: 0; }
    .site-nav ul a { display: block; padding: .6rem 0; }
    .nav-search input { width: 100%; }
    .nav-account { flex-wrap: wrap; }
}

/* ---------- hero (the one memorable moment) ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(4.5rem, 10vw, 8rem); isolation: isolate; }
.hero::before {
    content: ''; position: absolute; left: 50%; bottom: -55%; width: 150%; aspect-ratio: 1; transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(229,187,108,.55) 0%, rgba(217,138,108,.32) 34%, rgba(217,138,108,.08) 62%, transparent 75%);
    z-index: -1;
}
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--lamp), transparent); opacity: .7; }
@keyframes sunrise { from { transform: translate(-50%, 28%); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -.025em; margin-bottom: .45em; font-variation-settings: 'opsz' 144; max-width: 14ch; }
.hero .lede { font-size: 1.12rem; color: var(--soft); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-book { justify-self: center; width: min(300px, 70%); transform: rotate(2.5deg); transition: transform .4s; }
.hero-book:hover { transform: none; }
.hero-book .tile-cover { box-shadow: 0 30px 60px -20px var(--shadow-1), 0 0 0 1px rgba(255,255,255,.06); }
.hero-book figcaption { margin-top: .9rem; text-align: center; }
.hero-book figcaption strong { display: block; font-family: var(--font-display); font-size: 1.1rem; }
@media (max-width: 820px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-book { width: min(220px, 60%); order: -1; }
    .hero h1 { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hero::before { animation: none; }
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* ---------- sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.section-head a { color: var(--lamp-text); font-size: .92rem; font-weight: 500; }
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: .25em; }

/* ---------- story tiles ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.75rem 1.25rem; }
.tile { display: block; }
.tile-cover { position: relative; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--ink-2); box-shadow: 0 14px 30px -18px var(--shadow-1), 0 0 0 1px rgba(255,255,255,.05); transition: transform .25s, box-shadow .25s; }
.tile:hover .tile-cover { box-shadow: 0 22px 36px -18px var(--shadow-2), 0 0 0 1px rgba(229,187,108,.35); }
.cover { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback { display: flex; align-items: flex-end; padding: 1rem; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.15; color: rgba(241,235,221,.92); }
.chip { position: absolute; top: 10px; left: 10px; padding: .25em .7em; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.4; backdrop-filter: blur(6px); }
.chip-free { background: rgba(111,207,151,.9); color: var(--chip-free-ink); }
.chip-price { background: var(--chip-bg); color: var(--lamp-text-strong); border: 1px solid rgba(229,187,108,.5); }
.tile-title { font-size: 1.02rem; margin: .8rem 0 .15rem; font-weight: 600; }
.tile-meta { display: flex; flex-wrap: wrap; gap: .1rem .75rem; margin: 0; color: var(--muted); font-size: .85rem; }

.continue-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.continue-card { display: flex; gap: 1rem; align-items: center; padding: 1rem; background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.continue-card:hover { border-color: var(--lamp-text); }
.continue-card .thumb { width: 54px; flex: none; aspect-ratio: 2/3; border-radius: 5px; overflow: hidden; }
.continue-card strong { display: block; font-family: var(--font-display); }
.continue-card span { color: var(--muted); font-size: .88rem; }

/* ---------- pills / filters ---------- */
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { padding: .45em 1.1em; border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; color: var(--muted); background: transparent; cursor: pointer; font-family: inherit; }
.pill:hover { border-color: var(--lamp-text); color: var(--text); }
.pill.is-active, .pill[aria-current="true"] { background: var(--lamp); border-color: var(--lamp-text); color: var(--lamp-ink); font-weight: 600; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; padding: 1rem 0 1.75rem; }
.filter-bar form { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- forms ---------- */
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: .4rem; }
.field .hint { color: var(--muted); font-size: .82rem; margin-top: .35rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=url], input[type=color], select, textarea {
    width: 100%; background: var(--ink-1); color: var(--text); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .8em 1em; font: inherit;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lamp-text); box-shadow: 0 0 0 3px rgba(229,187,108,.18); }
input[type=checkbox], input[type=radio] { accent-color: var(--lamp-text); width: 1.05rem; height: 1.05rem; }
.check { display: flex; align-items: flex-start; gap: .65rem; }
.check label { margin: 0; font-weight: 400; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: .82rem; padding: .4rem .6rem; }
.pw-wrap input { padding-right: 4.5rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.alert { padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: .94rem; border: 1px solid; }
.alert-error { background: rgba(240,113,107,.1); border-color: rgba(240,113,107,.45); color: var(--err-ink); }
.alert-success { background: rgba(111,207,151,.1); border-color: rgba(111,207,151,.4); color: var(--ok-ink); }
.alert-info { background: rgba(229,187,108,.09); border-color: rgba(229,187,108,.4); color: var(--info-ink); }
.alert-warning { background: rgba(242,194,93,.1); border-color: rgba(242,194,93,.45); color: var(--warn-ink); }

/* ---------- auth + simple card pages ---------- */
.auth-wrap { display: grid; place-items: center; padding: clamp(2rem, 6vw, 4.5rem) 0; }
.auth-card { width: min(440px, 92vw); background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.4rem); }
.auth-card h1 { font-size: 1.9rem; }
.auth-card .alt { text-align: center; margin: 1.25rem 0 0; color: var(--muted); font-size: .92rem; }
.auth-card .alt a, .link { color: var(--lamp-text); }
.card { background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.card h2, .card h3 { margin-top: 0; }

/* ---------- story page ---------- */
.story-hero { padding: clamp(2rem, 5vw, 3.5rem) 0; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(217,138,108,.06), transparent 60%); }
.story-hero-grid { display: grid; grid-template-columns: 260px 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.story-cover { border-radius: 10px; overflow: hidden; aspect-ratio: 2/3; box-shadow: 0 30px 50px -24px var(--shadow-1), 0 0 0 1px rgba(255,255,255,.06); position: relative; }
.story-info h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: .3em; }
.facts { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; color: var(--muted); font-size: .92rem; margin-bottom: 1.25rem; }
.facts strong { color: var(--text); font-weight: 600; }
.story-desc { color: var(--soft); max-width: 64ch; font-family: var(--font-read); font-size: 1.08rem; line-height: 1.75; }
.buy-box { margin-top: 1.5rem; padding: 1.25rem 1.4rem; border: 1px solid rgba(229,187,108,.35); border-radius: var(--radius-lg); background: rgba(229,187,108,.05); max-width: 520px; }
.buy-box .price { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--lamp-text-strong); line-height: 1; }
.buy-box .price small { font-family: var(--font-ui); font-size: .85rem; color: var(--muted); font-weight: 400; margin-left: .35rem; }
.buy-box ul { margin: .9rem 0 1.1rem; color: var(--soft); font-size: .93rem; }
.buy-box li { padding-left: 1.4rem; position: relative; margin-bottom: .25rem; }
.buy-box li::before { content: ''; position: absolute; left: .15rem; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--lamp); }
.buy-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.buy-alt { margin: .9rem 0 0; font-size: .88rem; color: var(--muted); }
.owned-note { display: inline-flex; gap: .5rem; align-items: center; color: var(--ok); font-weight: 500; margin-top: 1rem; }
.story-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
@media (max-width: 720px) {
    .story-hero-grid { grid-template-columns: 1fr; }
    .story-cover { width: 180px; }
}

.chapter-list { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--ink-1); }
.chapter-row { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.chapter-row:last-child { border-bottom: 0; }
.chapter-row:hover { background: var(--ink-2); color: var(--text); }
.chapter-row .num { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2.2rem; }
.chapter-row .name { flex: 1; font-weight: 500; }
.chapter-row .tag { font-size: .78rem; padding: .2em .65em; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.chapter-row .tag-free { border-color: rgba(111,207,151,.5); color: var(--ok); }
.chapter-row.is-locked .name { color: var(--muted); }
.chapter-row.is-current { box-shadow: inset 3px 0 0 var(--lamp); }
.lock-icon { width: 15px; height: 15px; vertical-align: -2px; }

/* ---------- pricing ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 820px; margin: 0 auto; }
.plan { padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ink-1); display: flex; flex-direction: column; }
.plan.is-featured { border-color: var(--lamp-text); background: linear-gradient(180deg, rgba(229,187,108,.09), var(--ink-1) 55%); }
.plan h2 { font-size: 1.4rem; }
.plan .price { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; line-height: 1.1; margin: .25rem 0 .25rem; }
.plan ul { margin: 1.25rem 0 1.75rem; flex: 1; }
.plan li { padding: .4rem 0 .4rem 1.5rem; position: relative; color: var(--soft); }
.plan li::before { content: ''; position: absolute; left: 0; top: .95em; width: 8px; height: 8px; border-radius: 50%; background: var(--lamp); }

/* reader styles live in reader.css */

.paywall { position: relative; margin-top: -1rem; }
.paywall .teaser { -webkit-mask-image: linear-gradient(#000 25%, transparent); mask-image: linear-gradient(#000 25%, transparent); max-height: 14rem; overflow: hidden; }
.paywall-card { margin-top: -2rem; position: relative; padding: 1.75rem; border-radius: var(--radius-lg); border: 1px solid rgba(229,187,108,.45); background: var(--ink-1); color: var(--text); text-align: center; }
.paywall-card h2 { font-size: 1.5rem; }
.paywall-card .price { font-family: var(--font-display); font-size: 2.2rem; color: var(--lamp-text-strong); font-weight: 600; }
.paywall-card .buy-actions { justify-content: center; margin-top: 1rem; }

/* ---------- tables, pagination, misc ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ink-1); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .85rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: .84rem; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: .15em .7em; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid var(--line); color: var(--muted); }
.badge-ok { color: var(--ok); border-color: rgba(111,207,151,.5); }
.badge-bad { color: var(--bad); border-color: rgba(240,113,107,.5); }
.badge-warn { color: var(--warn); border-color: rgba(242,194,93,.5); }
.badge-gold { color: var(--lamp-text-strong); border-color: rgba(229,187,108,.55); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 2.5rem 0 0; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 .9rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; }
.pagination a:hover { border-color: var(--lamp-text); }
.pagination .current { background: var(--lamp); color: var(--lamp-ink); border-color: var(--lamp-text); font-weight: 600; }
.pagination .gap { border: 0; }

.empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius-lg); color: var(--muted); }
.empty h3 { color: var(--text); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat { padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ink-1); }
.stat strong { display: block; font-family: var(--font-display); font-size: 1.8rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .88rem; }

.band { background: var(--ink-1); border-block: 1px solid var(--line); }
.band-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; padding: 2.25rem 0; }
.band-inner h2 { margin-bottom: .2em; font-size: 1.6rem; }
.band-inner p { margin: 0; color: var(--muted); }
.subscribe { display: flex; gap: .5rem; flex-wrap: wrap; min-width: min(420px, 100%); }
.subscribe input { flex: 1; min-width: 200px; border-radius: 999px; }

.prose { max-width: 720px; margin: 0 auto; padding-bottom: 4rem; }
.prose h2 { font-size: 1.35rem; margin-top: 2rem; }
.prose p, .prose li { color: var(--soft); }
.prose ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1em; }

/* ---------- footer, toast ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 2.75rem; background: var(--ink-1); flex-shrink: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-head { font-weight: 600; margin-bottom: .6rem; }
.site-footer li { margin-bottom: .4rem; }
.site-footer li a { color: var(--muted); font-size: .93rem; }
.site-footer li a:hover { color: var(--lamp-text-strong); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding: 1.5rem 0 2rem; margin-top: 1.5rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3000; max-width: min(92vw, 460px); padding: .85rem 1.25rem; border-radius: 12px; background: var(--ink-3); border: 1px solid var(--line); box-shadow: 0 18px 40px var(--shadow-1); font-size: .94rem; }
.toast.is-error { border-color: rgba(240,113,107,.6); }
.toast.is-success { border-color: rgba(111,207,151,.6); }

.pay-overlay { position: fixed; inset: 0; z-index: 4000; background: var(--overlay); display: grid; place-items: center; text-align: center; padding: 1.5rem; }
.pay-overlay .spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--lamp-text); margin: 0 auto 1rem; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-card { text-align: center; max-width: 520px; margin: 0 auto; }
.success-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.25rem; background: rgba(111,207,151,.14); color: var(--ok); font-size: 1.8rem; }

.maintenance { display: grid; place-items: center; text-align: center; padding: 2rem; }
.maintenance-box { max-width: 460px; }

@media print {
    body { background: #fff; color: #000; }
    .site-header, .site-footer, .no-print, .skip-link { display: none !important; }
}
