/* ==========================================================================
   HARDBOUND CLASSICS — stylesheet
   Palette: teal (primary) · warm paper neutrals · gilt/amber accents
   Type:    Roboto Condensed (display) · Roboto (body)   [UK English site]
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
    /* Teal scale */
    --teal-950: #062e2d;
    --teal-900: #0a3b3a;
    --teal-800: #0e4c4a;
    --teal-700: #11625f;
    --teal-600: #147d79;
    --teal-500: #1b9a93;
    --teal-400: #37b6ad;
    --teal-300: #6fcec5;
    --teal-200: #a9e1db;
    --teal-100: #d6efeb;
    --teal-50:  #edf8f6;

    /* Neutrals & paper */
    --ink:        #123331;
    --body:       #2d4a47;
    --muted:      #5d746f;
    --paper:      #f5f2e9;
    --surface:    #ffffff;
    --line:       #e7e1d2;
    --line-strong:#d6cfbb;

    /* Gilt / amber accents */
    --gold:        #b08a33;
    --gold-deep:   #8a6a26;
    --gold-soft:   #f7efdc;
    --gold-line:   #e5d7ae;

    /* Feedback */
    --danger:     #a93f2c;
    --danger-soft:#fbeae5;

    /* Type */
    --font-head: 'Roboto Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Roboto', 'Segoe UI', Arial, sans-serif;

    /* Shape & elevation */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --shadow-card: 0 1px 2px rgba(10, 59, 58, .06), 0 10px 24px -18px rgba(10, 59, 58, .22);
    --shadow-lift: 0 22px 40px -18px rgba(8, 50, 48, .35);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--body);
    background-color: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; vertical-align: middle; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.12; margin: 0 0 .45em; }
p { margin: 0 0 1em; }
a { color: var(--teal-700); }
button { font-family: inherit; }

::selection { background: var(--teal-200); color: var(--teal-950); }

:focus-visible { outline: 3px solid rgba(27, 154, 147, .55); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 32px); }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 200;
    background: var(--teal-900); color: #fff; padding: .6em 1.2em; border-radius: 0 0 8px 8px;
    text-decoration: none; font-family: var(--font-head); transition: top .2s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- 3. Buttons, chips, fields ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55em;
    font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
    letter-spacing: .09em; font-size: .92rem; line-height: 1;
    padding: .85em 1.55em; border-radius: var(--r-sm);
    border: 1px solid transparent; cursor: pointer; text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease,
                box-shadow .18s ease, transform .18s ease;
    white-space: nowrap;
}
.btn svg { flex: none; }
.btn-primary { background: var(--teal-700); color: #fff; box-shadow: 0 8px 18px -10px rgba(10, 59, 58, .6); }
.btn-primary:hover { background: var(--teal-800); transform: translateY(-1px); }
.btn-outline { border-color: var(--teal-600); color: var(--teal-800); background: transparent; }
.btn-outline:hover { background: var(--teal-50); border-color: var(--teal-700); }
.btn-light { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-light:hover { background: rgba(255, 255, 255, .16); transform: translateY(-1px); }
.btn-gold { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-deep); }
.btn-gold:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-sm { font-size: .8rem; padding: .7em 1.15em; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.chip {
    display: inline-flex; align-items: center; gap: .4em;
    font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; font-size: .66rem; line-height: 1;
    padding: .45em .85em; border-radius: 999px; border: 1px solid transparent;
    white-space: nowrap;
}
.chip--genre   { background: var(--teal-50);  color: var(--teal-800); border-color: var(--teal-200); }
.chip--ai      { background: var(--gold-soft); color: var(--gold-deep); border-color: var(--gold-line); }
.chip--classic { background: #f3f1e8;          color: #6d6246;          border-color: #ded6bd; }
.chip--meta    { background: transparent; border: 1px solid var(--line); color: var(--muted); }

.overline {
    display: block; margin: 0 0 12px;
    font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
    letter-spacing: .24em; font-size: .74rem; color: var(--teal-700);
}

/* Form fields */
.field-label {
    display: block; margin: 0 0 7px;
    font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
    letter-spacing: .14em; font-size: .72rem; color: var(--teal-800);
}
.form-input, textarea.form-input, select.form-input {
    width: 100%; font: inherit; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: 10px; padding: .8em 1em; transition: border-color .15s ease, box-shadow .15s ease;
}
.form-input:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(27, 154, 147, .18); }
textarea.form-input { resize: vertical; }
select.form-input {
    appearance: none; -webkit-appearance: none; padding-right: 2.6em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2311625f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .9em center;
}
.hint { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }
.err-text { font-size: .84rem; color: var(--danger); margin: 8px 0 0; display: flex; gap: .4em; align-items: flex-start; }
.err-text svg { flex: none; margin-top: 2px; }

/* ---------- 4. Header & navigation ---------- */
.site-header {
    position: sticky; top: 0; z-index: 60;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -18px rgba(8, 50, 48, .4); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 78px; }
.brand { display: inline-flex; align-items: center; flex: none; border-radius: 6px; }
.brand img { display: block; height: 38px; width: auto; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
    display: inline-block; padding: .62em .95em;
    font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
    letter-spacing: .12em; font-size: .8rem; text-decoration: none;
    color: var(--ink); border-radius: var(--r-sm); transition: color .15s ease, background-color .15s ease;
}
.site-nav a:not(.btn):hover { color: var(--teal-700); background: var(--teal-50); }
.site-nav a.is-active { color: var(--teal-700); }
.site-nav a.is-active:not(.btn)::after { content: ""; display: block; height: 2px; margin-top: 4px; background: var(--teal-600); border-radius: 2px; }
.nav-cta { margin-left: 10px; }

.nav-toggle {
    display: none; border: 0; background: none; color: var(--ink);
    width: 44px; height: 44px; border-radius: var(--r-sm); cursor: pointer;
    place-items: center;
}
.nav-toggle:hover { background: var(--teal-50); color: var(--teal-800); }
.nav-toggle svg path.burger-close { display: none; }
.nav-toggle[aria-expanded="true"] svg path.burger-open { display: none; }
.nav-toggle[aria-expanded="true"] svg path.burger-close { display: block; }

/* ---------- 5. Buttons/icons ---------- */
.icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink);
    border-radius: 50%; cursor: pointer; transition: all .15s ease;
}
.icon-btn:hover { border-color: var(--teal-500); color: var(--teal-700); background: var(--teal-50); }

/* ---------- 6. Sections ---------- */
.section { padding: clamp(58px, 7vw, 96px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 700; margin: 0; }
.link-more {
    font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
    letter-spacing: .12em; font-size: .8rem; color: var(--teal-700);
    text-decoration: none; padding: .6em .2em .6em .9em; white-space: nowrap;
}
.link-more:hover { color: var(--teal-900); }
.link-more svg { transition: transform .18s ease; }
.link-more:hover svg { transform: translateX(4px); }

/* ---------- 7. Home hero ---------- */
.hero {
    position: relative; overflow: hidden;
    padding: clamp(52px, 7.5vw, 104px) 0 clamp(64px, 8vw, 120px);
    background:
        radial-gradient(900px 520px at 88% -12%, rgba(169, 225, 219, .55) 0%, transparent 62%),
        radial-gradient(760px 460px at -12% 108%, rgba(229, 215, 174, .45) 0%, transparent 58%),
        var(--paper);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); gap: clamp(36px, 5vw, 72px); align-items: center; }
.hero h1 {
    font-size: clamp(2.45rem, 5.3vw, 4.1rem); font-weight: 700; line-height: 1.02;
    letter-spacing: -.01em; margin: 0 0 20px; text-wrap: balance;
}
.hero h1 .hl { color: var(--teal-600); position: relative; white-space: nowrap; }
.hero h1 .hl svg { position: absolute; left: 0; right: 0; bottom: -.12em; width: 100%; height: .32em; color: var(--gold); }
.hero .lede { font-size: 1.08rem; color: var(--body); max-width: 56ch; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.hero-note { display: flex; align-items: center; gap: .5em; font-size: .84rem; color: var(--muted); margin: 0; }
.hero-note .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-500); flex: none; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--line-strong); }
.hero-stat { font-family: var(--font-head); font-size: .86rem; letter-spacing: .05em; color: var(--muted); }
.hero-stat strong { display: block; font-size: 1.35rem; color: var(--teal-800); line-height: 1.1; font-weight: 700; }

/* Hero cover still-life */
.hero-visual { position: relative; }
.hero-ring {
    position: absolute; right: 4%; top: 4%;
    width: min(420px, 92%); aspect-ratio: 1;
    border: 1px solid rgba(176, 138, 51, .5); border-radius: 50%;
}
.hero-ring::before {
    content: ""; position: absolute; inset: 14px;
    border: 1px dashed rgba(176, 138, 51, .32); border-radius: 50%;
}
.hero-covers { position: relative; height: 440px; max-width: 560px; margin-left: auto; z-index: 2; }
.hero-cover { position: absolute; width: clamp(150px, 16.5vw, 210px); filter: drop-shadow(0 26px 26px rgba(8, 50, 48, .3)); }
.hero-cover .cover { box-shadow: 0 30px 50px -24px rgba(8, 50, 48, .55); }
.hero-cover .cover { border-radius: 6px 2px 2px 6px; }
.hc-a { left: 2%; top: 48px; transform: rotate(-8deg); z-index: 1; }
.hc-b { left: 33%; top: 6px;  transform: rotate(2.5deg); z-index: 3; }
.hc-c { right: 0%; top: 88px; transform: rotate(9deg);  z-index: 2; }

.hero-chip {
    position: absolute; left: -4%; bottom: 26px; z-index: 4;
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 14px; padding: 12px 18px 12px 12px;
    box-shadow: var(--shadow-lift);
    animation: floaty 5.5s ease-in-out infinite;
}
.hero-chip .hci {
    width: 38px; height: 38px; border-radius: 10px; background: var(--gold-soft);
    border: 1px solid var(--gold-line); color: var(--gold-deep);
    display: grid; place-items: center; flex: none;
}
.hero-chip p { margin: 0; font-size: .82rem; line-height: 1.35; color: var(--muted); }
.hero-chip strong { display: block; font-family: var(--font-head); font-size: .92rem; color: var(--ink); letter-spacing: .02em; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- 8. Genre explorer ---------- */
.genre-row { display: flex; flex-wrap: wrap; gap: 12px; }
.genre-chip {
    display: inline-flex; align-items: center; gap: .6em;
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: 999px; padding: .68em 1.35em;
    font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; font-size: .78rem; color: var(--teal-800);
    text-decoration: none; transition: all .16s ease;
}
.genre-chip:hover { background: var(--teal-700); border-color: var(--teal-700); color: #fff; transform: translateY(-2px); }
.genre-chip .gc-count { font-family: var(--font-body); font-weight: 400; color: var(--gold-deep); }
.genre-chip:hover .gc-count { color: var(--gold-soft); }

/* ---------- 9. Book cards & grid ---------- */
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 28px 24px; }
.books-grid.is-empty { display: block; }
.catalogue-empty { animation: fadeIn .3s ease; }

.book-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 26px 18px 16px;
    box-shadow: var(--shadow-card); cursor: pointer; text-align: left; width: 100%;
    font: inherit; color: inherit;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.book-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: var(--teal-200); }
.book-card:focus-visible { outline-offset: 3px; }

.book-cover { display: grid; justify-items: center; margin-bottom: 18px; }
.book-cover .cover { width: min(100%, 166px); font-size: 15px; border-radius: 3px; }
.book-card h3 { font-size: 1.3rem; line-height: 1.14; margin: 0 0 3px; }
.book-author { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.book-meta { display: flex; align-items: center; gap: 14px; font-size: .8rem; color: var(--muted); margin: 0 0 12px; }
.book-meta .sep { opacity: .55; }
.synopsis { font-size: .88rem; color: var(--body); margin: 0 0 16px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot {
    margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding-top: 13px; border-top: 1px solid var(--line);
}
.rrp { font-family: var(--font-head); font-weight: 700; font-size: 1.06rem; color: var(--teal-900); letter-spacing: .02em; }
.card-open {
    display: inline-flex; align-items: center; gap: .35em;
    font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; font-size: .68rem; color: var(--teal-700);
    text-decoration: none;
}
.card-open svg { transition: transform .16s ease; }
.book-card:hover .card-open svg { transform: translateX(3px); }

/* ---------- 10. Cover art system (CSS book covers) ---------- */
.cover {
    position: relative; aspect-ratio: 2 / 3; overflow: hidden; font-size: 16px;
    background: linear-gradient(160deg, var(--cA) 0%, var(--cB) 68%, var(--cC) 130%);
    color: #f4eeda;
    --cG: #e2d2a0; --cT: #f4eeda;
    box-shadow: 0 14px 26px -16px rgba(8, 50, 48, .5);
}
/* binding shadow + paper grain */
.cover::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .14) 6%, rgba(0, 0, 0, 0) 17%);
}
.cover::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .5;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px);
}
.cover-frame {
    position: absolute; inset: 5.6%; z-index: 2;
    border: 1px solid var(--cG);
    display: flex; flex-direction: column;
    padding: 12% 11% 11%;
}
@supports (color: color-mix(in srgb, red, transparent)) {
    .cover-frame { border-color: color-mix(in srgb, var(--cG) 62%, transparent); }
}
.cover.is-classic .cover-frame { box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--cG) 38%, transparent); }

/* engraved pattern tints painted between gradient and frame */
.cv-tint { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.tint-rings { background: radial-gradient(circle at 76% 72%, rgba(255, 255, 255, .14) 0 30%, transparent 31%); }
.tint-bands { background: repeating-linear-gradient(108deg, rgba(0, 0, 0, .13) 0 22px, transparent 22px 44px); }
.tint-sheen { background: linear-gradient(152deg, rgba(255, 255, 255, .17) 0%, transparent 44%); }
.tint-dots { background-image: radial-gradient(rgba(255, 255, 255, .1) 1.3px, transparent 1.5px); background-size: 15px 15px; }
.tint-rays { background: repeating-conic-gradient(from 25deg at 25% 20%, rgba(255, 255, 255, .08) 0 8deg, transparent 8deg 16deg); }
.tint-snow { background-image: radial-gradient(rgba(255, 255, 255, .14) 1.1px, transparent 1.3px); background-size: 21px 21px; background-position: 3px 5px; }

.cover-head { text-align: center; flex: none; }
.cover-brand {
    font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
    letter-spacing: .34em; font-size: .4em; color: var(--cG);
    padding-left: .34em; /* optically centre the tracked text */
}
.cover-head-rule { height: 1px; margin: 6px auto 0; width: 74%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--cG) 80%, transparent), transparent); }

.cover-mid { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; text-align: center; }
.cover-title {
    font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
    letter-spacing: .03em; font-size: 1.34em; line-height: 1.07; color: var(--cT);
    text-wrap: balance; hyphens: none; overflow-wrap: anywhere;
}
.cover-title.is-long { font-size: 1.1em; letter-spacing: .015em; }
.cover-orn { width: .44em; height: .44em; transform: rotate(45deg); background: var(--cG); flex: none; }

.cover-foot { flex: none; text-align: center; }
.cover-edition {
    font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
    letter-spacing: .26em; font-size: .36em; color: var(--cG); margin-bottom: 8px; padding-left: .26em;
}
.cover-rule { height: 1px; width: 100%; margin: 0 0 9px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--cG) 80%, transparent), transparent); }
.cover-author {
    font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
    letter-spacing: .22em; font-size: .6em; color: var(--cT); opacity: .92;
    padding-left: .22em; line-height: 1.3;
}

/* ---------- 11. How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
    position: relative; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 30px 28px; overflow: hidden;
}
.step::before {
    content: attr(data-num); position: absolute; right: 6px; top: -30px;
    font-family: var(--font-head); font-weight: 700; font-size: 8.5rem; line-height: 1;
    color: var(--teal-100); pointer-events: none;
}
.step-num {
    position: relative; width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center; margin-bottom: 20px;
    background: var(--teal-700); color: #fff;
    font-family: var(--font-head); font-weight: 700; font-size: 1.12rem;
}
.step h3 { font-size: 1.35rem; margin: 0 0 8px; }
.step p { margin: 0; font-size: .93rem; color: var(--muted); }

/* ---------- 12. Band (teal callout) ---------- */
.band { position: relative; overflow: hidden; border-radius: 24px; color: #e7f5f2; }
.band-bg {
    position: absolute; inset: 0;
    background: linear-gradient(118deg, var(--teal-950) 0%, var(--teal-900) 45%, var(--teal-800) 100%);
}
.band-bg::after {
    content: "HARDBOUND CLASSICS"; position: absolute; right: -20px; bottom: -46px;
    font-family: var(--font-head); font-weight: 700; font-size: clamp(4rem, 11vw, 9rem);
    letter-spacing: .04em; color: rgba(255, 255, 255, .045); white-space: nowrap; pointer-events: none;
}
.band-inner { position: relative; padding: clamp(40px, 6vw, 68px); display: grid; grid-template-columns: minmax(0, 1.25fr) auto; gap: 30px; align-items: center; }
.band h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin: 0 0 12px; }
.band p { color: rgba(231, 245, 242, .82); margin: 0; max-width: 60ch; }
.band-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.band .step-arrow { font-size: 1.6rem; }

/* ---------- 13. Page header (inner pages) ---------- */
.page-hero { padding: clamp(44px, 6vw, 76px) 0 clamp(24px, 3.5vw, 44px); }
.page-hero-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin: 0 0 10px; letter-spacing: -.01em; }
.page-hero .lead { margin: 0; max-width: 66ch; }

/* ---------- 14. Catalogue toolbar ---------- */
.toolbar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-md); padding: 13px; margin-bottom: 30px;
}
.search-field {
    flex: 1 1 300px; display: flex; align-items: center; gap: 10px;
    background: var(--paper); border: 1px solid var(--line);
    border-radius: 10px; padding: 0 6px 0 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.search-field:focus-within { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(27, 154, 147, .15); background: var(--surface); }
.search-field input {
    flex: 1; min-width: 0; border: 0; background: transparent; padding: .72em 0;
    font: inherit; color: var(--ink); outline: none;
}
.search-field input::placeholder { color: var(--muted); opacity: .8; }
.search-field .clear-search {
    display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none;
    border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.search-field .clear-search:hover { background: var(--teal-100); color: var(--teal-900); }
.toolbar select.form-input { width: auto; }
.result-count { font-size: .82rem; color: var(--muted); padding-inline: 6px; white-space: nowrap; }

/* ---------- 15. Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; }
.modal.open { display: grid; }
.modal-backdrop {
    position: absolute; inset: 0; background: rgba(6, 37, 36, .6);
    backdrop-filter: blur(3px); animation: fadeIn .25s ease;
}
.modal-panel {
    position: relative; z-index: 1; width: min(900px, 100%); max-height: min(88vh, 840px); overflow: auto;
    background: var(--surface); border-radius: 20px; padding: clamp(22px, 4vw, 38px);
    display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); gap: clamp(22px, 3.4vw, 40px);
    box-shadow: 0 40px 90px -30px rgba(4, 26, 25, .7);
    animation: modalIn .3s cubic-bezier(.2, .8, .3, 1);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.985); } }
.modal-close { position: sticky; top: 0; float: right; margin-left: 10px; z-index: 3; }
.modal-cover { display: grid; justify-items: center; align-content: start; }
.modal-cover .cover { width: min(100%, 208px); font-size: 17px; }
.modal-title { font-size: clamp(1.7rem, 3vw, 2.25rem); margin: 2px 0 4px; padding-right: 46px; }
.modal-author { font-size: 1rem; color: var(--muted); margin: 0 0 14px; font-style: normal; }
.modal-synopsis { font-size: .97rem; margin: 18px 0 22px; }
.modal-content { min-width: 0; }
.modal-content .card-chips { margin-bottom: 0; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; }
.meta-item { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; }
.meta-item dt { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .13em; font-size: .64rem; color: var(--muted); margin: 0 0 3px; }
.meta-item dd { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--ink); }
.prompt-quote {
    margin: 20px 0 0; padding: 14px 18px; font-size: .9rem; line-height: 1.6; color: var(--gold-deep);
    background: var(--gold-soft); border: 1px dashed var(--gold-line); border-left: 3px solid var(--gold);
    border-radius: 10px;
}
.prompt-quote .pq-label { display: block; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .66rem; color: var(--gold-deep); margin-bottom: 5px; }
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- 16. Add-a-book page ---------- */
.add-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(22px, 3.4vw, 44px); align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 2.8vw, 30px); }
.panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.panel-step {
    flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--teal-700); color: #fff;
    font-family: var(--font-head); font-weight: 700; font-size: 1rem;
}
.panel-head h2 { font-size: 1.5rem; margin: 0; }
.panel-sub { color: var(--muted); font-size: .92rem; margin: 0 0 22px; }

.prompt-samples { display: flex; flex-wrap: wrap; gap: 8px; }
.p-chip {
    display: inline-flex; align-items: flex-start; gap: .45em; text-align: left;
    border: 1px dashed var(--gold-line); background: var(--gold-soft); color: #6b5425;
    border-radius: 999px; padding: .55em 1em; cursor: pointer;
    font-family: var(--font-body); font-size: .8rem; line-height: 1.4;
    transition: all .15s ease; max-width: 100%;
}
.p-chip:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.p-chip svg { flex: none; margin-top: 3px; }
.prompt-samples { margin-top: 10px; }

.char-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.char-count { font-size: .78rem; color: var(--muted); margin: 0; }

.note-ai {
    display: flex; gap: 12px; align-items: flex-start; margin-top: 24px;
    background: var(--teal-50); border: 1px solid var(--teal-200); border-radius: var(--r-md);
    padding: 14px 16px; color: var(--teal-900); font-size: .88rem;
}
.note-ai svg { flex: none; margin-top: 3px; color: var(--teal-600); }
.note-ai p { margin: 0; }

/* Review / results panel */
.review-panel { position: sticky; top: 96px; }
.state { min-height: 320px; }
.state-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    text-align: center; padding: 40px 26px; color: var(--muted);
    border: 2px dashed var(--line-strong); border-radius: var(--r-md); background: var(--paper);
    min-height: 380px;
}
.state-empty .se-icon { width: 58px; height: 58px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--teal-500); }
.state-empty p { margin: 0; font-size: .92rem; max-width: 40ch; }
.state-empty p strong { display: block; font-family: var(--font-head); font-size: 1.06rem; color: var(--ink); letter-spacing: .02em; margin-bottom: 4px; }

.state-busy { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; min-height: 380px; }
.busy-stack { display: flex; }
.busy-cover { width: 74px; border-radius: 4px; box-shadow: var(--shadow-card); animation: busyBounce 1.6s ease-in-out infinite; }
.busy-cover:nth-child(2) { animation-delay: .18s; }
.busy-cover:nth-child(3) { animation-delay: .36s; }
.busy-cover + .busy-cover { margin-left: -14px; }
@keyframes busyBounce { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-14px); } }
.busy-msg { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; letter-spacing: .04em; color: var(--teal-800); min-height: 1.6em; }
.busy-sub { margin: -12px 0 0; font-size: .8rem; color: var(--muted); }
.dots { display: inline-flex; gap: 5px; margin-left: 4px; }
.dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--teal-500); animation: dotPulse 1.2s infinite; }
.dots span:nth-child(2) { animation-delay: .15s; }
.dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dotPulse { 0%, 100% { opacity: .25; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }

.review-grid { display: grid; grid-template-columns: minmax(0, 158px) minmax(0, 1fr); gap: 24px; }
.review-cover { display: grid; justify-items: center; }
.review-cover .cover { width: 100%; font-size: 12.5px; }
.review-fields .form-input { padding: .62em .9em; }
.review-fields .field { margin-bottom: 12px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-grid .field { margin-bottom: 12px; }
.review-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.prompt-mini {
    margin-top: 16px; padding: 12px 14px; background: var(--paper);
    border: 1px solid var(--line); border-radius: 10px; font-size: .8rem; color: var(--muted);
}
.prompt-mini strong { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .13em; font-size: .64rem; color: var(--muted); display: block; margin-bottom: 4px; }
.prompt-mini em { color: var(--ink); font-size: .85rem; font-style: italic; }

.state-done { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 380px; gap: 8px; }
.success-icon { width: 74px; height: 74px; border-radius: 50%; background: var(--teal-100); color: var(--teal-800); display: grid; place-items: center; margin-bottom: 10px; animation: popIn .4s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes popIn { from { transform: scale(.5); opacity: 0; } }
.state-done h3 { font-size: 1.6rem; margin: 0; }
.state-done p { color: var(--muted); max-width: 42ch; margin: 0 0 16px; }
.done-cover { margin: 14px 0 22px; }
.done-cover .cover { width: 120px; font-size: 10.5px; }

/* ---------- 17. Footer ---------- */
.site-footer { background: var(--teal-950); color: #c6dedb; margin-top: clamp(50px, 7vw, 90px); padding: 64px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-wordmark { font-family: var(--font-head); font-weight: 700; letter-spacing: .2em; font-size: 1rem; color: #fff; margin: 0 0 14px; }
.footer-tag { font-size: .9rem; color: rgba(198, 222, 219, .78); max-width: 38ch; margin: 0; }
.footer-heading { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; color: var(--teal-300); margin: 0 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 10px; font-size: .92rem; }
.footer-col a { color: #c6dedb; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-contact li { color: rgba(198, 222, 219, .78); }
.footer-contact a { text-decoration: underline; text-underline-offset: 4px; text-decoration-style: dotted; }
.footer-legal {
    display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap;
    margin-top: 52px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .13);
    font-size: .8rem; color: rgba(198, 222, 219, .55);
}
.footer-legal p { margin: 0; }

/* ---------- 18. Toasts ---------- */
.toast-region { position: fixed; bottom: 22px; right: 22px; z-index: 130; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.toast {
    display: flex; align-items: center; gap: 11px;
    background: var(--teal-900); color: #eaf7f4;
    border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px;
    padding: 13px 18px; font-size: .9rem; max-width: min(360px, calc(100vw - 44px));
    box-shadow: var(--shadow-lift); animation: toastIn .3s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.toast .t-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.toast--success .t-icon { background: rgba(111, 206, 197, .22); color: var(--teal-300); }
.toast--info .t-icon { background: rgba(232, 215, 174, .25); color: #ecd9a4; }
.toast p { margin: 0; line-height: 1.4; }

/* ---------- 19. Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 20. Responsive ---------- */
@media (max-width: 1020px) {
    .add-grid { grid-template-columns: 1fr; }
    .review-panel { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { margin-top: 8px; }
    .hero-covers { margin-inline: auto; }
    .steps { grid-template-columns: 1fr; }
    .band-inner { grid-template-columns: 1fr; }
    .band-actions { justify-content: flex-start; }

    .nav-toggle { display: grid; }
    .site-nav {
        position: fixed; left: 0; right: 0; top: 78px; z-index: 55;
        background: var(--surface); border-bottom: 1px solid var(--line);
        box-shadow: 0 26px 40px -30px rgba(8, 50, 48, .5);
        opacity: 0; visibility: hidden; transform: translateY(-10px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }
    .menu-open .site-nav { opacity: 1; visibility: visible; transform: none; }
    .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 20px 22px; }
    .site-nav a:not(.btn) { display: block; padding: .8em .6em; }
    .site-nav a.is-active::after { margin-top: 5px; }
    .nav-cta { margin: 8px 0 0; }
    .nav-cta .btn { width: 100%; }
    .nav-cta .btn.is-active { outline: 2px solid var(--teal-300); outline-offset: 2px; }
}

@media (max-width: 760px) {
    .modal-panel { grid-template-columns: 1fr; padding: 24px; }
    .modal-cover { order: 2; }
    .modal-cover .cover { width: 170px; }
    .review-grid { grid-template-columns: 1fr; }
    .review-cover { justify-items: start; }
    .review-cover .cover { width: 132px; font-size: 11.5px; }
    .book-card h3 { font-size: 1.22rem; }
}

@media (max-width: 560px) {
    .header-inner { height: 68px; }
    .site-nav { top: 68px; }
    .brand img { height: 30px; }
    .hero-covers { height: 380px; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .field-grid { grid-template-columns: 1fr; }
    .hero-chip { left: 0; right: 0; margin-inline: auto; width: max-content; max-width: 92%; }
    .books-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px 14px; }
    .book-card { padding: 18px 12px 12px; }
    .toolbar select.form-input { width: 100%; }
    .toast-region { left: 16px; right: 16px; align-items: stretch; }
}

/* ---------- 21. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
