/* ==========================================================================
   AI eBook Suite - homepage styles ("Ink & Paper", homepage spec v2)
   templates/index.html, _book_cover.html, _cost_table.html (the cost table styles, formerly costs.css)
   and the share-image page _og_cover.html. Depends on the tokens in site.css. Mobile-first.
   Breakpoints: < 640px phone; 640-959px one centred column (max 560px); >= 960px desktop.
   Prefixes: .h- page, .bk book covers, .c- cost table.
   Blue (--c-brand*) is for actions only: buttons, links, focus rings, the "best value" row.
   Movement (transforms on hover, transitions, the progress animation) only under
   prefers-reduced-motion: no-preference; the static fan of the shelf is allowed everywhere.
   ========================================================================== */

.page-home { background: var(--c-bg); }
.page-home .content-wrapper { padding: 0; line-height: 1.5; }  /* UI text; the book excerpts keep 1.65 */
.page-home .flash-messages-container { margin-block: var(--space-4); }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Layout primitives ---------- */
.h-container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.h-container--narrow { max-width: 820px; }
@media (min-width: 640px) and (max-width: 959px) {
    .h-container, .h-container--narrow { max-width: calc(560px + 2 * var(--gutter)); }
}
.h-section { padding-block: clamp(44px, 8vw, 96px); scroll-margin-top: 64px; }
#hero, #tour, #subscribe, #costs, #contact { scroll-margin-top: 72px; }

.h-head { max-width: 760px; margin: 0 auto clamp(28px, 5vw, 48px); text-align: center; }
.h-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--c-paper-accent); margin-bottom: var(--space-3);
}
.h-title {
    font-family: var(--font-serif); font-size: var(--fs-h2); line-height: 1.15; font-weight: 700;
    letter-spacing: -0.015em; color: var(--c-ink); margin-bottom: var(--space-3); text-wrap: balance;
}
.h-lede { font-size: var(--fs-lg); color: var(--c-ink-2); line-height: 1.6; text-wrap: pretty; max-width: 62ch; margin-inline: auto; }
/* Phones: tighter sections and heads (page height budget at 390x844, spec section 2) */
@media (max-width: 639px) {
    .h-section { padding-block: 32px; }
    .h-head { text-align: left; margin-inline: 0; margin-bottom: 20px; }
    .h-eyebrow, .h-title { margin-bottom: 8px; }
    .h-lede { font-size: 1rem; line-height: 1.55; }
    .h-head .h-lede { margin-inline: 0; }
}

/* CJK: serif display stacks look out of place, use the sans stack (book text keeps its own lang, so it is not affected) */
:lang(zh) .h-title, :lang(ja) .h-title, :lang(ko) .h-title,
:lang(zh) .h-hero__title, :lang(ja) .h-hero__title, :lang(ko) .h-hero__title,
:lang(zh) .h-final__title, :lang(ja) .h-final__title, :lang(ko) .h-final__title,
:lang(zh) .h-vs__title, :lang(ja) .h-vs__title, :lang(ko) .h-vs__title,
:lang(zh) .c-costs__title, :lang(ja) .c-costs__title, :lang(ko) .c-costs__title,
:lang(zh) .c-highlight, :lang(ja) .c-highlight, :lang(ko) .c-highlight,
:lang(zh) .h-plan__amount, :lang(ja) .h-plan__amount, :lang(ko) .h-plan__amount,
:lang(zh) .h-mock__title, :lang(ja) .h-mock__title, :lang(ko) .h-mock__title {
    font-family: var(--font-sans); letter-spacing: 0;
}
/* Japanese: break headings at phrase boundaries where supported (Chrome 119+) */
:lang(ja) .h-title, :lang(ja) .h-hero__title, :lang(ja) .h-final__title, :lang(ja) .h-vs__title { word-break: auto-phrase; }

/* ---------- Buttons and links ---------- */
.h-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0.65rem 1.15rem; border-radius: var(--radius-md);
    font-weight: 650; font-size: 1rem; line-height: 1.25; text-decoration: none; text-align: center;
    border: 1px solid transparent; cursor: pointer;
}
.h-btn:hover { text-decoration: none; }
.h-btn .icon { width: 1.15em; height: 1.15em; }
.h-btn--lg { min-height: 52px; padding: 0.8rem 1.4rem; font-size: 1.0625rem; }
.h-btn--sm { min-height: 44px; padding: 0.45rem 0.9rem; font-size: 0.9375rem; }
.h-btn--block { width: 100%; }
.h-btn--brand { background: var(--c-brand); color: var(--c-night); }
.h-btn--brand:hover { background: #3dbfff; color: var(--c-night); }
.h-btn--primary { background: var(--c-brand-ink); color: #fff; }
.h-btn--primary:hover { background: var(--c-brand-ink-strong); color: #fff; }
.h-btn--primary:disabled { opacity: .75; cursor: progress; }
.h-btn--ghost-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.h-btn--ghost-dark:hover { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .5); }
.h-btn--outline { background: transparent; color: var(--c-brand-ink); border-color: var(--c-brand-ink); }
.h-btn--outline:hover { background: var(--c-brand-tint); color: var(--c-brand-ink-strong); }
.on-dark :focus-visible { outline-color: #7dd3fc; }

.h-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 650; color: var(--c-brand-ink); }
.h-link .icon { width: 1.05em; height: 1.05em; }

@media (prefers-reduced-motion: no-preference) {
    .h-btn { transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
    .h-btn:active { transform: translateY(1px); }
    .h-link .icon, .h-hero__link .icon { transition: transform .15s ease; }
    .h-link:hover .icon, .h-hero__link:hover .icon { transform: translateX(3px); }
}

.h-card {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2); padding: clamp(20px, 4vw, 32px);
}

.h-checklist { list-style: none; display: grid; gap: 10px; }
.h-checklist li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--c-ink); }
.h-checklist .icon { color: var(--c-success); margin-top: 0.15em; }

/* ---------- Book covers (_book_cover.html): sizes follow --w, no container queries ---------- */
.bk {
    --w: 120px;
    position: relative; isolation: isolate; display: flex; flex-direction: column; flex: none;
    width: var(--w); aspect-ratio: 2 / 3;
    padding: calc(var(--w) * .1) calc(var(--w) * .09);
    border-radius: 2px 6px 6px 2px; overflow: hidden; text-decoration: none;
    font-family: var(--font-book); color: var(--c-ink-warm); background: var(--c-paper-2);
    box-shadow: inset 4px 0 0 rgba(0, 0, 0, .18), inset 7px 0 6px -5px rgba(255, 255, 255, .25),
                0 2px 3px rgba(0, 0, 0, .2), 0 18px 30px -14px rgba(10, 15, 30, .6);
}
a.bk:hover { text-decoration: none; }
.bk:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 3px; border-radius: 2px 6px 6px 2px; }
.bk::after {
    content: ""; position: absolute; inset: calc(var(--w) * .045);
    border: 1px solid currentColor; opacity: .28; pointer-events: none;
}
.bk__art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.bk__title { font-size: calc(var(--w) * .13); line-height: 1.04; font-weight: 600; text-wrap: balance; overflow-wrap: break-word; }
.bk__sub { font-size: calc(var(--w) * .06); line-height: 1.2; }
.bk__by {
    font: 700 calc(var(--w) * .045) / 1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase;
    opacity: .7; white-space: nowrap;
}
.bk--sm { --w: 84px; }
.bk--xs { --w: 64px; }

/* Il custode del libeccio (it, mystery): night sea, lighthouse */
.bk--il-faro-di-punta-chiappa {
    background: radial-gradient(120% 60% at 72% 16%, rgba(245, 196, 81, .38), transparent 60%),
                linear-gradient(#0E2A3B, #163E55 58%, #0B2130);
    color: #F4EBDD; justify-content: flex-end;
}
.bk--il-faro-di-punta-chiappa .bk__sub {
    color: #F5C451; text-transform: uppercase; letter-spacing: .12em; font-weight: 600;
    font-family: var(--font-sans); margin-bottom: .5em;
}
.bk--il-faro-di-punta-chiappa .bk__title { font-style: italic; }
.bk--il-faro-di-punta-chiappa .bk__by { margin-top: .8em; }

/* Flour, Water, Patience (en, guide): cream, bread */
.bk--sourdough-at-home { background: #F3E7D3; color: #3A2416; justify-content: flex-start; }
.bk--sourdough-at-home .bk__title {
    order: -1; font: 800 calc(var(--w) * .14) / .95 var(--font-sans); text-transform: uppercase; letter-spacing: -.01em;
}
.bk--sourdough-at-home .bk__sub { color: #7A4B26; font-style: italic; margin-top: .6em; }
.bk--sourdough-at-home .bk__by { margin-top: auto; }

/* Las cartas bajo la cal (es, novel): lemon yellow, whitewashed arch */
.bk--la-casa-de-los-limoneros {
    background: linear-gradient(#F4CE4B, #E9B52F); color: #1F4D36; text-align: center;
    padding-top: calc(var(--w) * .28);
}
.bk--la-casa-de-los-limoneros .bk__title { order: -1; font-size: calc(var(--w) * .125); }
.bk--la-casa-de-los-limoneros .bk__sub {
    font-style: italic; margin-top: .6em;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.bk--la-casa-de-los-limoneros .bk__by { margin-top: auto; }

/* ---------- Hero ---------- */
.h-hero {
    position: relative; overflow: hidden; color: var(--c-on-night);
    background:
        radial-gradient(55% 60% at 88% 6%, rgba(0, 169, 255, .14), transparent 62%),
        var(--c-night);
    padding-block: 28px 36px;
}
.h-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.h-hero__title {
    font-family: var(--font-serif); font-size: clamp(2rem, 8.4vw, 3.4rem); line-height: 1.08; font-weight: 700;
    letter-spacing: -0.02em; color: #fff; margin: 0 0 14px; text-wrap: balance;
}
.h-hero__sub { font-size: 1rem; line-height: 1.55; color: var(--c-on-night-2); max-width: 60ch; }
.h-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; margin-top: 22px; }
.h-hero__link {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-block: 10px;
    color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45);
    text-underline-offset: 4px;
}
.h-hero__link:hover { color: #fff; text-decoration-color: #fff; }
.h-hero__link .icon { width: 1.05em; height: 1.05em; }
.h-hero__micro { font-size: 0.875rem; line-height: 1.5; color: var(--c-on-night-2); margin-top: 2px; }
.h-hero__shelf { margin-top: 18px; }
.h-hero__caption { font-size: 0.8125rem; line-height: 1.5; color: var(--c-on-night-2); text-align: center; max-width: 46ch; margin: 14px auto 0; }
.h-hero__price { font-size: 0.9375rem; line-height: 1.55; color: var(--c-on-night); margin-top: 18px; max-width: 60ch; }
.h-hero__price strong { color: #fff; font-weight: 700; }
@media (max-width: 639px) {
    .h-hero__actions .h-btn { width: 100%; }
}
@media (min-width: 960px) {
    .h-hero { padding-block: 96px; }
    /* One grid, no wrappers: the shelf takes the right column, the text stays in DOM order on the left */
    .h-hero__grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); column-gap: 32px;
        grid-template-rows: 1fr auto auto auto auto auto 1fr;
        grid-template-areas: ". shelf" "title shelf" "sub shelf" "actions shelf" "micro shelf" "price shelf" ". shelf";
    }
    .h-hero__title { grid-area: title; }
    .h-hero__sub { grid-area: sub; font-size: 1.0625rem; }
    .h-hero__actions { grid-area: actions; margin-top: 28px; }
    .h-hero__micro { grid-area: micro; }
    .h-hero__price { grid-area: price; margin-top: 22px; }
    .h-hero__shelf { grid-area: shelf; align-self: center; margin-top: 0; }
}

/* Shelf: the DOM order is the visual order, left to right (samples.py "shelf"), so the keyboard order is too.
   The middle book is the page's own, in front; a focused side cover comes to the front so its ring is not hidden. */
.h-shelf {
    --shelf-w: clamp(96px, 28vw, 150px);
    list-style: none; display: flex; justify-content: center; align-items: flex-end; padding: 12px 0 10px; margin: 0;
}
.h-shelf > li { flex: none; }
.h-shelf .bk { --w: var(--shelf-w); }
.h-shelf > li:nth-child(1) { margin-right: -14px; transform: rotate(-7deg) translateY(10px); }
.h-shelf > li:nth-child(2) { z-index: 2; transform: translateY(-6px) scale(1.06); }
.h-shelf > li:nth-child(3) { margin-left: -14px; transform: rotate(7deg) translateY(10px); }
.h-shelf > li:focus-within { z-index: 3; }
@media (max-width: 639px) and (max-height: 700px) { .h-shelf { --shelf-w: 88px; } }
@media (min-width: 960px) { .h-shelf { --shelf-w: min(180px, 15.5vw); } }
@media (prefers-reduced-motion: no-preference) {
    .h-shelf .bk { transition: transform .2s ease, box-shadow .2s ease; }
    .h-shelf .bk:hover, .h-shelf .bk:focus-visible { transform: translateY(-6px); }
}

/* ---------- Sample books (#books) ---------- */
.h-books-sec { background: var(--c-paper); }
/* position: relative keeps the visually-hidden (absolute) spans of off-screen cards inside the scroller's clip */
.h-books { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
/* Phones and tablets: a swipe carousel (CSS scroll-snap, works without JS) */
@media (max-width: 959px) {
    .h-books {
        grid-auto-flow: column; grid-auto-columns: 86%;
        overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
        padding: 4px var(--gutter) 16px; margin-inline: calc(-1 * var(--gutter)); scroll-padding-inline: var(--gutter);
        scrollbar-width: none;
    }
    .h-books::-webkit-scrollbar { display: none; }
    .h-book { scroll-snap-align: start; }
}
@media (min-width: 960px) { .h-books { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.h-book {
    --book-accent: var(--c-paper-accent);
    position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0;
    background: var(--c-page); border: 1px solid var(--c-paper-line); border-radius: 6px; padding: 20px;
    box-shadow: 0 22px 40px -26px rgba(60, 40, 10, .4); scroll-margin-top: 80px;
}
.h-book--il-faro-di-punta-chiappa { --book-accent: #1F4E6B; }
.h-book--sourdough-at-home { --book-accent: #C98B2B; }
.h-book--la-casa-de-los-limoneros { --book-accent: #2E6B47; }
.h-book__top { display: flex; gap: 14px; align-items: flex-start; }
.h-book__meta { min-width: 0; }
.h-book__kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-paper-accent); line-height: 1.4; }
.h-book__title { font-family: var(--font-book); font-size: 1.125rem; line-height: 1.25; font-weight: 600; color: var(--c-ink-warm); margin: 4px 0; }
.h-book__sub {
    font-size: 0.8125rem; line-height: 1.4; color: var(--c-ink-3);
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.h-book__page { background: var(--c-paper); border-radius: 3px; padding: 18px 18px 16px; margin: 0; }
.h-book__label {
    font-size: 0.75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px;
}
.h-book__page blockquote { margin: 0; }
.h-book__page blockquote p { font-family: var(--font-book); font-size: 1rem; line-height: 1.65; color: var(--c-ink-warm); }
.h-book__page blockquote p::first-letter {
    float: left; font-size: 2.9em; line-height: .85; padding: 4px 6px 0 0; color: var(--book-accent);
}
.h-book__facts { font-size: 0.8125rem; line-height: 1.55; color: var(--c-ink-2); font-variant-numeric: tabular-nums; }
.h-book__actions { display: flex; gap: 8px; margin-top: auto; }
.h-book__actions .h-btn { min-height: 44px; padding: 0.45rem 0.6rem; font-size: 0.9375rem; line-height: 1.2; }
.h-book__read { flex: 1; min-width: 0; }
.h-book__actions .h-btn--sm { flex: none; min-width: 64px; }
.h-books__dots { display: flex; justify-content: center; gap: 8px; margin-top: 2px; }
.h-books__dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--c-paper-line); }
.h-books__dots span.is-active { background: var(--c-paper-accent); }
.h-books__swipe { text-align: center; font-size: 0.8125rem; color: var(--c-ink-3); margin-top: 6px; }
@media (min-width: 960px) { .h-books__dots, .h-books__swipe { display: none; } }
.h-books__after { margin-top: 12px; }
.h-books__fine { font-size: 0.8125rem; line-height: 1.55; color: var(--c-ink-3); margin-top: 6px; max-width: 76ch; }
.h-books__fine a { text-decoration: underline; text-underline-offset: 2px; }
/* Phones: a tighter card (page height budget, spec section 2); the excerpt gets a wider measure, so fewer lines */
@media (max-width: 639px) {
    .h-books { padding-bottom: 12px; }
    .h-book { padding: 16px; gap: 10px; }
    .h-book__page { padding: 14px 14px 12px; }
    .h-book__label { margin-bottom: 6px; }
    .h-books__swipe { margin-top: 2px; }
    .h-books__after { margin-top: 4px; }
    .h-books__fine { margin-top: 2px; line-height: 1.5; }
}

/* ---------- Demo (#demo) ---------- */
.h-demo { background: var(--c-surface); }
.h-demo__grid { display: grid; gap: 0; }
.h-demo__shot { display: none; }
@media (min-width: 960px) {
    .h-demo__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 56px; align-items: start; }
    .h-demo__copy .h-head { text-align: left; margin: 0 0 32px; }
    .h-demo__copy .h-lede { margin-inline: 0; }
    .h-demo__shot { display: block; --pw: 280px; margin-inline: 0; }
}
.h-demo__card { --card-pad: clamp(16px, 4vw, 32px); padding: var(--card-pad); min-width: 0; }
.h-field { margin-bottom: var(--space-4); }
.h-label { display: block; font-weight: 650; font-size: 0.95rem; margin-bottom: 6px; color: var(--c-ink); }
.h-input {
    display: block; width: 100%; min-height: 52px; padding: 0.75rem 1rem;
    font-size: 1rem; line-height: 1.4; color: var(--c-ink); background: #fff;
    border: 1px solid var(--c-line-strong); border-radius: var(--radius-md);
}
.h-input::placeholder { color: #64748b; }
.h-input:hover { border-color: #94a3b8; }
.h-input:focus { outline: none; border-color: var(--c-brand-ink); box-shadow: 0 0 0 3px rgba(0, 105, 168, .22); }
.h-input[aria-invalid="true"] { border-color: var(--c-danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .15); }
.h-select {
    -webkit-appearance: none; appearance: none; padding-right: 2.75rem; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.9rem center; background-size: 18px;
}
/* Example topics: one row that scrolls sideways on phones (the label sits on its own line above).
   A scroll box clips at its padding edge: 6px of padding above and below (offset by negative margins, so the
   layout does not move) keep the chips' focus ring (3px outline + 2px offset) fully visible. */
.h-examples__label { font-size: 0.875rem; color: var(--c-ink-3); margin: -4px 0 6px; }
.h-examples {
    display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
    margin: -6px calc(-1 * var(--card-pad, 20px)) calc(var(--space-5) - 6px); padding: 6px var(--card-pad, 20px);
    scroll-padding-inline: var(--card-pad, 20px);
}
.h-examples::-webkit-scrollbar { display: none; }
@media (min-width: 960px) {
    /* A mouse cannot swipe: the chips wrap on desktop */
    .h-examples { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
}
.h-chip {
    flex: none; scroll-snap-align: start;
    border: 1px solid #b3e3ff; background: var(--c-brand-tint); color: var(--c-brand-ink-strong);
    border-radius: var(--radius-pill); padding: 6px 14px; min-height: 44px; white-space: nowrap;
    font-size: 0.875rem; font-weight: 550; cursor: pointer; line-height: 1.3;
}
.h-chip:hover { background: var(--c-brand-tint-2); }
@media (min-width: 375px) { .h-demo__submit { white-space: nowrap; } }
@media (max-width: 639px) { .h-demo__submit { padding-inline: 12px; font-size: 1rem; } }
.h-demo__micro { font-size: 0.8125rem; line-height: 1.5; color: var(--c-ink-3); margin-top: 10px; }
.h-error {
    color: #8a1c12; background: var(--c-danger-bg); border: 1px solid #f3b8b1;
    border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: var(--space-4); font-size: 0.925rem;
}
.h-error[hidden] { display: none; }
.h-loader { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: var(--space-3); color: var(--c-ink-2); font-size: 0.925rem; }
.h-loader[hidden] { display: none; }
.h-loader__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-brand); }
@media (prefers-reduced-motion: no-preference) {
    .h-input { transition: border-color .15s ease, box-shadow .15s ease; }
    .h-loader__dot { animation: h-pulse 1s ease-in-out infinite alternate; }
}
@keyframes h-pulse { from { opacity: .35; transform: scale(.8); } to { opacity: 1; transform: scale(1.1); } }

/* ---------- App screenshots in a generic phone frame (4:5 crops, no notch: they start below the app navbar) ---------- */
.h-phone {
    width: var(--pw, min(64vw, 240px)); margin-inline: auto; padding: 8px; border-radius: 30px; background: #0b1220;
    box-shadow: 0 0 0 1px #2a3a5a, 0 30px 60px -30px rgba(15, 23, 42, .45);
}
.h-phone img {
    display: block; width: 100%; height: auto; border-radius: 22px;
    -webkit-mask-image: linear-gradient(#000 84%, transparent); mask-image: linear-gradient(#000 84%, transparent);
}

/* ---------- How it works (#how-it-works) ---------- */
.h-how { background: #fff; }
.h-how2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; }
.h-how2__step { display: flex; flex-direction: column; min-width: 0; }
.h-how2__num { display: block; font-family: var(--font-serif); font-size: 2.25rem; line-height: 1; color: var(--c-ink-3); }
.h-how2__title { font-size: 1.25rem; line-height: 1.3; color: var(--c-ink); margin: 8px 0 4px; }
.h-how2__desc { font-size: 1rem; color: var(--c-ink-2); max-width: 48ch; }
.h-how2__visual { margin-top: 16px; display: flex; justify-content: center; }
.h-how2__extra { margin-top: 18px; display: grid; justify-items: center; gap: 6px; text-align: center; }
.h-how2__extra .h-link { display: inline-block; padding-block: 10px; line-height: 1.4; max-width: 34ch; }
.h-how2__extra .h-link .icon { margin-left: 4px; vertical-align: -0.15em; }
/* Phones: the numeral sits beside the step title, the screenshots use a slightly smaller frame */
@media (max-width: 639px) {
    .h-how2 { gap: 32px; }
    .h-how2__step { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: baseline; }
    .h-how2__step > :not(.h-how2__num):not(.h-how2__title) { grid-column: 1 / -1; }
    .h-how2__title { margin: 0 0 4px; }
    .h-how2__visual { margin-top: 12px; }
    .h-how2__visual .h-phone { --pw: min(56vw, 220px); }
    .h-how2__extra { margin-top: 12px; gap: 2px; }
}
@media (min-width: 960px) {
    .h-how2 { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; row-gap: 0; }
    /* Same rows in the three columns, so the screenshots line up at the bottom */
    @supports (grid-template-rows: subgrid) {
        .h-how2__step { display: grid; grid-row: span 5; grid-template-rows: subgrid; }
        .h-how2__visual { align-self: end; }
    }
}

/* Step 2: the plan illustration (real plan of the page's first sample book) */
.h-mock {
    position: relative; width: 100%; max-width: 520px; margin-inline: auto;
    background: linear-gradient(180deg, #14203a 0%, #0f1829 100%);
    border: 1px solid #2a3a5a; border-radius: 18px;
    box-shadow: 0 30px 60px -30px rgba(15, 23, 42, .55), inset 0 1px 0 rgba(255, 255, 255, .04);
    font-size: 0.875rem; color: var(--c-on-night); overflow: hidden; text-align: left;
}
.h-mock--compact { max-width: 420px; }
.h-mock__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid #22314f; }
.h-mock__bar > span { width: 10px; height: 10px; border-radius: 50%; background: #2a3a5a; }
.h-mock__bar em { font-style: normal; font-family: var(--font-mono); font-size: 0.75rem; color: var(--c-on-night-2); margin-left: 8px; }
.h-mock__plan { padding: 16px 16px 8px; }
.h-mock__kicker { font-size: 0.7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #7dd3fc; }
.h-mock__title { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.25; color: #fff; margin: 4px 0 10px; }
/* Plan and chapters show the real text of a sample book (no placeholder bars: they read as a page still loading). */
.h-mock__rows { display: grid; gap: 8px; }
.h-mock__rows > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.h-mock__rows dt { font-size: 0.75rem; color: var(--c-on-night-2); }
.h-mock__rows dd { font-size: 0.8125rem; line-height: 1.45; color: #dbe4ef; }
.h-mock__chapters { list-style: none; display: grid; gap: 4px; padding: 6px 10px 8px; border-top: 1px solid #22314f; margin-top: 6px; }
.h-mock__chapters li {
    display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center;
    padding: 6px 8px; border-radius: 10px; border: 1px solid transparent;
}
.h-mock__num {
    width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
    font-size: 0.72rem; font-weight: 700; background: #1d2b48; color: #dbe4ef;
}
.h-mock__ch { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; color: #dbe4ef; }
.h-mock__state { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--c-on-night-2); white-space: nowrap; }
.h-mock__state .icon { width: 14px; height: 14px; }
.h-mock__chapters li.is-done .h-mock__state { color: #86efac; }
.h-mock__chapters li.is-done .h-mock__num { background: rgba(134, 239, 172, .14); color: #86efac; }
.h-mock__chapters li.is-active { background: rgba(0, 169, 255, .08); border-color: rgba(0, 169, 255, .4); }
.h-mock__chapters li.is-active .h-mock__num { background: var(--c-brand); color: var(--c-night); }
.h-mock__chapters li.is-active .h-mock__ch { color: #fff; font-weight: 600; }
.h-mock__chapters li.is-active .h-mock__state { color: #7dd3fc; }
.h-mock__progress { grid-column: 2 / -1; height: 6px; border-radius: 4px; background: #26365a; overflow: hidden; }
.h-mock__progress > span { display: block; height: 100%; width: 62%; border-radius: inherit; background: linear-gradient(90deg, #00A9FF, #7dd3fc); }
.h-mock__ctx { grid-column: 2 / -1; display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: #a5d8f7; }
.h-mock__ctx .icon { width: 14px; height: 14px; }
.h-mock__chapters li.is-queued { opacity: .7; }
/* Export formats: a plain caption, nothing that looks like a button */
.h-mock__export { display: flex; align-items: center; gap: 6px; padding: 4px 18px 14px; font-size: 0.75rem; color: var(--c-on-night-2); }
.h-mock__export .icon { width: 14px; height: 14px; color: #7dd3fc; }
@media (prefers-reduced-motion: no-preference) {
    .h-mock__progress > span { animation: h-grow 2.4s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes h-grow { from { width: 6%; } to { width: 62%; } }
@media (max-width: 639px) {
    .h-mock__bar, .h-mock__export, .h-mock__rows > .h-mock__row-cast { display: none; }
    .h-mock__plan { padding: 14px 14px 6px; }
    .h-mock__title { font-size: 1.1rem; margin: 2px 0 8px; }
    .h-mock__rows > div { grid-template-columns: 1fr; gap: 2px; }
    .h-mock__synopsis { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
    .h-mock__chapters { padding: 6px 8px 8px; }
    .h-mock__chapters li { grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 8px; padding: 5px 6px; }
    .h-mock__num { width: 22px; height: 22px; font-size: 0.7rem; }
}

/* Step 3: the same book in four files (CSS file icons, labels only) */
.h-files { margin: 0; }
.h-files__row { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; justify-content: center; }
.h-file {
    --file-c: var(--c-ink-2);
    position: relative; width: 56px; aspect-ratio: 3 / 4; background: #fff;
    border: 1px solid var(--c-line-strong); border-radius: 4px; overflow: hidden;
    font: 700 11px/1 var(--font-mono);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}
.h-file::before {
    content: ""; position: absolute; top: 0; right: 0; width: 14px; height: 14px;
    background: var(--c-paper-2); clip-path: polygon(0 0, 100% 100%, 0 100%);
}
.h-file span {
    position: absolute; inset: auto 0 0; height: 18px; display: grid; place-items: center;
    color: #fff; background: var(--file-c); letter-spacing: .02em;
}
.h-file--epub { --file-c: #1a7f37; }
.h-file--docx { --file-c: #2b579a; }
.h-file--pdf { --file-c: #b42318; }
.h-file--html { --file-c: #b45309; }
.h-files figcaption { font-size: 0.8125rem; color: var(--c-ink-3); margin-top: 8px; }
@media (max-width: 639px) {
    .h-file { width: 48px; }
    .h-files figcaption { margin-top: 6px; }
}

/* "Why not just use ChatGPT?" */
.h-vs { max-width: 760px; margin: clamp(48px, 7vw, 72px) auto 0; }
.h-vs__title { font-family: var(--font-serif); font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); line-height: 1.25; color: var(--c-ink); margin-bottom: 12px; text-wrap: balance; }
.h-vs__table { width: 100%; border-collapse: collapse; }
.h-vs__table tr { border-top: 1px solid var(--c-line); }
.h-vs__table tr:last-child { border-bottom: 1px solid var(--c-line); }
.h-vs__table td { vertical-align: top; }
.h-vs__table .icon { width: 1.1em; height: 1.1em; flex: none; }
.h-vs__self { font-size: 0.875rem; line-height: 1.45; color: var(--c-ink-3); }
.h-vs__self .icon { color: var(--c-ink-3); }
.h-vs__us { font-size: 1rem; line-height: 1.45; color: var(--c-ink); font-weight: 600; }
.h-vs__us .icon { color: var(--c-brand-ink); }
.h-vs__foot { font-size: 0.875rem; color: var(--c-ink-2); margin-top: 12px; }
@media (max-width: 639px) {
    .h-vs { margin-top: 36px; }
    .h-vs__title { font-size: 1.25rem; }
    .h-vs__foot { margin-top: 8px; }
    .h-vs__table, .h-vs__table tbody, .h-vs__table tr { display: block; }
    .h-vs__table tr { padding: 10px 0; }
    .h-vs__table td { display: flex; gap: 8px; align-items: flex-start; }
    .h-vs__self { margin-bottom: 4px; }
    .h-vs__table .icon { margin-top: .2em; }
}
@media (min-width: 640px) {
    .h-vs__table td { width: 50%; padding: 14px 16px 14px 0; }
    .h-vs__table .icon { margin-right: 8px; vertical-align: -0.15em; }
}

/* ---------- Pricing (#pricing, contains #costs) ---------- */
.h-pricing { background: var(--c-surface); }
.h-pricing__grid { display: grid; gap: 16px; align-items: start; }
.h-pricing__side { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 960px) { .h-pricing__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; } }
.h-plan { border-top: 4px solid var(--c-ink-warm); }
.h-plan__name { font-size: 0.875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.h-plan__price { margin: 6px 0 18px; color: var(--c-ink-2); }
.h-plan__amount { font-family: var(--font-serif); font-size: clamp(2.75rem, 2rem + 3vw, 3.5rem); font-weight: 700; color: var(--c-ink); line-height: 1; letter-spacing: -0.02em; }
.h-plan__period { font-size: 1.05rem; }
@media (min-width: 480px) and (max-width: 959px) { .h-plan__list { grid-template-columns: 1fr 1fr; gap: 10px 20px; } }
.h-plan__ai { display: flex; gap: 8px; align-items: flex-start; margin: 18px 0 20px; font-size: 0.9375rem; line-height: 1.5; color: var(--c-ink-2); }
.h-plan__ai strong { color: var(--c-ink); }
.h-plan__ai .icon { color: var(--c-ink-3); margin-top: 0.15em; }
.h-plan__hint { text-align: center; font-size: 0.875rem; color: var(--c-ink-3); margin-top: 10px; }
.h-plan__fine { font-size: 0.8125rem; color: var(--c-ink-3); margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--c-line); line-height: 1.55; }
/* Phones: a more compact plan card (page height budget). The fine print stays visible at 0.8125rem. */
@media (max-width: 639px) {
    .h-pricing__grid, .h-pricing__side { gap: 12px; }
    .h-plan__price { margin: 4px 0 12px; }
    .h-plan__amount { font-size: 2.5rem; }
    .h-plan__list { gap: 6px; }
    .h-plan__ai { margin: 12px 0 14px; font-size: 0.875rem; }
    .h-plan__hint { font-size: 0.8125rem; line-height: 1.45; margin-top: 8px; }
    .h-plan__fine { margin-top: 12px; padding-top: 10px; line-height: 1.45; }
}

/* Example month (rendered by _cost_table.html: the amounts come from its table) */
.h-receipt { background: var(--c-page); border: 1px dashed var(--c-paper-line); border-radius: 6px; padding: 18px; }
.h-receipt__title { font-size: 0.8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-paper-accent); margin-bottom: 10px; }
.h-receipt__rows { display: grid; gap: 8px; margin: 0; }
.h-receipt__rows > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; }
.h-receipt__rows dt { font-size: 0.9375rem; line-height: 1.4; color: var(--c-ink-2); }
.h-receipt__rows dd { margin: 0; text-align: right; font-weight: 600; color: var(--c-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.h-receipt__rows > .h-receipt__total { border-top: 1px solid var(--c-ink-warm); padding-top: 8px; margin-top: 2px; }
.h-receipt__total dt, .h-receipt__total dd { font-weight: 700; color: var(--c-ink); }
.h-receipt__note { font-size: 0.75rem; line-height: 1.5; color: var(--c-ink-3); margin-top: 10px; }
@media (max-width: 639px) {
    .h-receipt { padding: 14px; }
    .h-receipt__title { margin-bottom: 8px; }
    .h-receipt__rows { gap: 6px; }
    .h-receipt__note { margin-top: 8px; }
}

/* Disclosure rows (API key help, calculator): the same 52px row and chevron as the FAQ */
.h-keyhelp, .c-calc-wrap { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-md); }
.h-keyhelp > summary, .c-calc-wrap > summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
    min-height: 52px; padding: 12px 18px; font-weight: 650; line-height: 1.35; color: var(--c-ink); border-radius: var(--radius-md);
}
.h-keyhelp > summary::-webkit-details-marker, .c-calc-wrap > summary::-webkit-details-marker { display: none; }
.h-keyhelp > summary:hover, .c-calc-wrap > summary:hover { color: var(--c-brand-ink); }
.h-keyhelp[open] .h-faq__chev, .c-calc-wrap[open] > summary .h-faq__chev { transform: rotate(-135deg) translateY(-2px); }
.h-keyhelp__body { padding: 0 18px 16px; color: var(--c-ink-2); font-size: 0.9375rem; }
.h-keyhelp__body ol { padding-left: 1.3em; margin: 8px 0 4px; display: grid; gap: 4px; }
@media (max-width: 639px) {
    .h-keyhelp > summary, .c-calc-wrap > summary { min-height: 48px; padding: 10px 16px; font-size: 0.9375rem; }
    .h-keyhelp__body { padding: 0 16px 14px; }
}

/* ---------- Cost table + calculator (#costs, _cost_table.html; formerly costs.css) ---------- */
.c-costs { max-width: 960px; margin: clamp(36px, 5vw, 56px) auto 0; }
.c-costs__title { font-family: var(--font-serif); font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); line-height: 1.25; color: var(--c-ink); text-wrap: balance; }
.c-highlight {
    margin: 12px 0 18px; padding-left: 14px; border-left: 3px solid var(--c-brand);
    font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.4; color: var(--c-ink);
}
.c-table-wrap { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .25); }
.c-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.c-table caption { caption-side: top; text-align: left; font-size: 0.75rem; color: var(--c-ink-3); padding: 10px 16px 8px; }
.c-col-model { width: 40%; }
.c-col-len { width: 20%; }
.c-table th, .c-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.c-table thead th { background: var(--c-night); color: var(--c-on-night); font-size: 0.95rem; font-weight: 650; line-height: 1.3; }
.c-th-full > span { display: block; font-size: 0.8rem; font-weight: 450; color: var(--c-on-night-2); margin-top: 2px; }
.c-th-short { display: none; }
.c-th-short b { font-weight: 700; color: #fff; }
.c-table tbody tr:last-child th, .c-table tbody tr:last-child td { border-bottom: 0; }
.c-table tbody th { font-weight: 450; }
.c-table tbody th strong { display: block; font-size: 1.05rem; color: var(--c-ink); line-height: 1.3; }
.c-table tbody th small { display: block; color: var(--c-ink-3); font-size: 0.8rem; }
.c-table td { font-family: var(--font-serif); font-size: clamp(1.15rem, 1.05rem + .5vw, 1.45rem); font-weight: 700; color: var(--c-ink); white-space: nowrap; }
.c-tier { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); margin-bottom: 2px; line-height: 1.4; }
.c-tier em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 650; margin-left: 6px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--c-brand); color: var(--c-night); }
.c-table tr.is-best th, .c-table tr.is-best td { background: var(--c-brand-tint); }
.c-table tr.is-best td { color: var(--c-brand-ink-strong); }
/* Phones: still a real 4-column table, all 12 prices visible at 360px with no sideways scroll */
@media (max-width: 639px) {
    .c-table caption { padding-inline: 10px; }
    .c-table th, .c-table td { padding: 10px 6px; }
    .c-table tbody th { padding-left: 10px; }
    .c-table thead th { font-size: 0.8125rem; line-height: 1.25; text-align: right; }
    .c-table thead th:first-child { text-align: left; padding-left: 10px; }
    .c-th-full { display: none; }
    .c-th-short { display: inline; }
    .c-table td { text-align: right; font: 600 0.9375rem / 1.2 var(--font-sans); font-variant-numeric: tabular-nums; }
    .c-cur { display: none; }
    .c-tier { font-size: 0.6875rem; letter-spacing: .04em; }
    /* The row is already tinted: the tag becomes a plain label on its own line */
    .c-tier em { display: block; margin: 1px 0 2px; padding: 0; background: none; color: var(--c-brand-ink-strong); white-space: normal; line-height: 1.25; }
    .c-table tbody th strong { font-size: 0.875rem; }
    .c-table tbody th small { font-size: 0.6875rem; }
}
.c-note { font-size: 0.8125rem; line-height: 1.55; color: var(--c-ink-3); margin-top: 12px; }
.c-samples { font-size: 0.875rem; line-height: 1.5; color: var(--c-ink-2); margin-top: 8px; }
/* Phones: the pull quote repeats the receipt's novel row and the samples line repeats the hero price line,
   so both are left out (page height budget); the table, the note and the calculator stay. */
@media (max-width: 639px) {
    .c-costs { margin-top: 28px; }
    .c-costs__title { font-size: 1.25rem; margin-bottom: 12px; }
    .c-highlight, .c-samples { display: none; }
    .c-note { margin-top: 10px; line-height: 1.45; }
}

/* Calculator: closed by default; hidden entirely without JavaScript (costs.js removes [hidden]) */
.c-calc-wrap { margin-top: 18px; }
@media (max-width: 639px) { .c-calc-wrap { margin-top: 12px; } }
.c-calc-wrap:has(> .c-calc[hidden]) { display: none; }
.c-calc { margin: 0 10px 10px; background: var(--c-night); color: var(--c-on-night); border-radius: var(--radius-md); padding: clamp(18px, 3vw, 28px); }
.c-calc__grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .c-calc__grid { grid-template-columns: 1fr 1fr 1.2fr; align-items: end; } }
.c-calc label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.9rem; color: var(--c-on-night-2); }
.c-calc output { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.c-calc input[type=range] { width: 100%; accent-color: var(--c-brand); }
.c-calc select { width: 100%; min-height: 44px; border-radius: var(--radius-md); border: 1px solid var(--c-line-night); background: var(--c-night-2); color: #fff; padding: 0 12px; font: inherit; }
.c-calc__result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--c-line-night); }
.c-calc__result span { color: var(--c-on-night-2); }
.c-calc__result strong { font-family: var(--font-serif); font-size: clamp(1.8rem, 1.5rem + 1.4vw, 2.6rem); color: var(--c-brand); line-height: 1.1; }
.c-calc__result small { color: var(--c-on-night-2); }
.c-calc__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.c-calc .h-btn--outline { color: #fff; border-color: rgba(255, 255, 255, .45); }
.c-calc .h-btn--outline:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.c-calc .h-btn--primary { background: var(--c-brand); color: var(--c-night); }
.c-calc .h-btn--primary:hover { background: #3dbfff; color: var(--c-night); }
.c-calc :focus-visible { outline-color: #7dd3fc; }
@media (max-width: 639px) { .c-calc__cta .h-btn { width: 100%; } }

/* ---------- FAQ ---------- */
.h-faq { background: #fff; }
.h-faq__list { display: grid; gap: 12px; }
.h-faq__item { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-md); }
.h-faq__item[open] { border-color: var(--c-line-strong); box-shadow: var(--shadow-1); }
.h-faq__item summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 16px 20px; min-height: 56px; font-weight: 650; font-size: 1.05rem; color: var(--c-ink); border-radius: var(--radius-md);
}
.h-faq__item summary::-webkit-details-marker { display: none; }
.h-faq__item summary:hover .h-faq__q { color: var(--c-brand-ink); }
.h-faq__chev {
    flex: none; width: 10px; height: 10px; margin-right: 4px;
    border-right: 2px solid var(--c-ink-3); border-bottom: 2px solid var(--c-ink-3);
    transform: rotate(45deg) translateY(-3px);
}
.h-faq__item[open] .h-faq__chev { transform: rotate(-135deg) translateY(-2px); }
@media (prefers-reduced-motion: no-preference) { .h-faq__chev { transition: transform .15s ease; } }
.h-faq__item p { padding: 0 20px 20px; color: var(--c-ink-2); max-width: 70ch; }
/* Phones: denser rows (page height budget); every row stays at least 48px tall */
@media (max-width: 639px) {
    .h-faq__list { gap: 8px; }
    .h-faq__item summary { padding: 12px 16px; min-height: 48px; font-size: 1rem; line-height: 1.35; }
    .h-faq__item p { padding: 0 16px 16px; }
}

/* ---------- Final CTA (#contact, with the About line) ---------- */
.h-final {
    color: var(--c-on-night); text-align: center; padding-block: clamp(48px, 8vw, 96px);
    background: radial-gradient(60% 90% at 50% 0%, rgba(0, 169, 255, .14), transparent 65%), var(--c-night);
}
.h-final__shelf { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin-bottom: 28px; }
.h-final__shelf .bk, .h-final__shelf .bk-slot { --w: 64px; }
@media (min-width: 960px) { .h-final__shelf .bk, .h-final__shelf .bk-slot { --w: 96px; } }
.bk-slot {
    flex: none; width: var(--w); aspect-ratio: 2 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 4px; border: 2px dashed rgba(255, 255, 255, .35); border-radius: 2px 6px 6px 2px; background: transparent;
    color: var(--c-on-night-2); font-size: 0.6875rem; font-weight: 700; line-height: 1.2; letter-spacing: .06em;
    text-transform: uppercase; text-decoration: none; overflow-wrap: anywhere;
}
.bk-slot b { font-size: 1.5rem; font-weight: 400; line-height: 1; }
.bk-slot:hover { color: #fff; border-color: rgba(255, 255, 255, .65); text-decoration: none; }
.h-final__title { font-family: var(--font-serif); font-size: var(--fs-h2); line-height: 1.15; color: #fff; margin: 0 auto 12px; max-width: 30ch; text-wrap: balance; }
.h-final__lede { color: #cbd5e1; font-size: var(--fs-lg); max-width: 56ch; margin: 0 auto; }
.h-final__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: var(--space-6); }
@media (max-width: 639px) {
    .h-final { padding-block: 36px; }
    .h-final__shelf { margin-bottom: 20px; }
    .h-final__lede { font-size: 1rem; line-height: 1.55; }
    .h-final__actions { margin-top: 24px; }
    .h-final__actions .h-btn { width: 100%; }
    .h-final__about { margin-top: 20px; }
}
.h-final__about { font-size: 0.875rem; line-height: 1.55; color: var(--c-on-night-2); max-width: 60ch; margin: 28px auto 0; }
.h-final__about a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* The footer follows the dark final band: no double border */
.page-home footer.site-footer { border-top: 0; }
