/* ========================================
   FICTIONDB SITE.CSS — CLEAN TEST BUILD
   Global framework only.
   Page/list/member/book/author-specific CSS should load separately.
======================================== */

/* ========================================
   1. TOKENS
======================================== */

:root {
    /* Core brand */
    --nav: #004358;

    /* Page / surface system */
    --bg: #ffffff;
    --card: #fcfdfd;
    --border: rgba(0, 67, 88, 0.14);

    --paper: #f8f3ea;
    --paper-deep: #edf5f6;
    --surface-subtle: #f1f7f8;
    --table-head: #e7f0f2;
    --table-head-text: #27434a;

    /* Text */
    --text: #2a2a2a;
    --muted: #6f6a60;
    --text-muted: #6b7280;
    --text-muted-soft: rgba(102, 115, 125, 0.82);
    --text-subtle: #98a5ae;

    --text-inverse: #ffffff;
    --text-muted-inverse: rgba(255, 255, 255, 0.85);
    --text-subtle-inverse: rgba(255, 255, 255, 0.62);

    /* Accent */
    --accent: #2e6874;
    --accent-hover: #255561;

    --accent-rgb: 46, 104, 116;
    --focus-rgb: 140, 185, 195;

    --accent-02: rgba(var(--accent-rgb), 0.02);
    --accent-04: rgba(var(--accent-rgb), 0.04);
    --accent-05: rgba(var(--accent-rgb), 0.05);
    --accent-06: rgba(var(--accent-rgb), 0.06);
    --accent-08: rgba(var(--accent-rgb), 0.08);
    --accent-10: rgba(var(--accent-rgb), 0.10);
    --accent-12: rgba(var(--accent-rgb), 0.12);
    --accent-18: rgba(var(--accent-rgb), 0.18);
    --accent-22: rgba(var(--accent-rgb), 0.22);
    --accent-26: rgba(var(--accent-rgb), 0.26);
    --accent-30: rgba(var(--accent-rgb), 0.30);

    --focus: #8fb8c2;
    --focus-18: rgba(var(--focus-rgb), 0.18);

    /* White overlays */
    --white: #ffffff;
    --white-95: rgba(255, 255, 255, 0.95);
    --white-92: rgba(255, 255, 255, 0.92);
    --white-90: rgba(255, 255, 255, 0.90);
    --white-88: rgba(255, 255, 255, 0.88);
    --white-82: rgba(255, 255, 255, 0.82);
    --white-76: rgba(255, 255, 255, 0.76);
    --white-72: rgba(255, 255, 255, 0.72);
    --white-70: rgba(255, 255, 255, 0.70);
    --white-68: rgba(255, 255, 255, 0.68);
    --white-62: rgba(255, 255, 255, 0.62);
    --white-45: rgba(255, 255, 255, 0.45);
    --white-22: rgba(255, 255, 255, 0.22);
    --white-18: rgba(255, 255, 255, 0.18);
    --white-16: rgba(255, 255, 255, 0.16);
    --white-14: rgba(255, 255, 255, 0.14);
    --white-12: rgba(255, 255, 255, 0.12);
    --white-10: rgba(255, 255, 255, 0.10);
    --white-08: rgba(255, 255, 255, 0.08);
    --white-04: rgba(255, 255, 255, 0.04);

    /* Member/list colors kept global because member.css depends on them */
    --list1-bg: #d9e6ea;
    --list1-fg: #33434a;
    --list1-border: rgba(51, 67, 74, 0.16);
    --list1-active: #7d95a0;

    --list2-bg: #ece4d6;
    --list2-fg: #4a4236;
    --list2-border: rgba(74, 66, 54, 0.18);
    --list2-active: #a48755;

    --list3-bg: #d7e6e2;
    --list3-fg: #27413c;
    --list3-border: rgba(39, 65, 60, 0.16);
    --list3-active: #6f8f87;

    /* Hero */
    --hero-bg: #5f8f99;
    --hero-bg-top: #567f88;
    --hero-bg-bottom: #6f9fa8;
    --hero-bg-gradient: linear-gradient(
        180deg,
        var(--hero-bg-top) 0%,
        var(--hero-bg) 55%,
        var(--hero-bg-bottom) 100%
    );
    --hero-glow: rgba(255, 255, 255, 0.05);

    --hero-surface-top: rgba(255, 255, 255, 0.55);
    --hero-surface-bottom: rgba(243, 248, 249, 0.52);
    --hero-surface-bottom-strong: rgba(243, 248, 249, 0.62);

    --plan-top: #f7fbfb;
    --plan-featured-top: #e3f0f3;

    /* Effects */
    --shadow: none;
    --shadow-strong: 0 14px 30px rgba(21, 42, 48, 0.10);
    --cover-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    --tap-highlight: rgba(var(--accent-rgb), 0.14);

    /* Dividers / states */
    --divider: rgba(0, 67, 88, 0.10);
    --black-10: rgba(0, 0, 0, 0.10);
    --black-06: rgba(0, 0, 0, 0.06);
    --black-05: rgba(0, 0, 0, 0.05);
    --black-02: rgba(0, 0, 0, 0.02);

    /* UI elements */
    --chip-bg: #eef5f6;

    --search-shadow: 0 1px 0 var(--white-04) inset;
    --search-shadow-focus: 0 0 0 3px var(--focus-18);

    --search-icon-size: 18px;
    --search-icon-left: var(--s-6);

    --search-input-pad-left: 42px;
    --search-input-pad-y: var(--s-6);
    --search-input-pad-x: var(--s-8);

    --control-height: 38px;

    /* Radius */
    --radius: 12px;
    --radius-sm: 8px;
    --input-radius: 12px;
    --menu-btn-radius: 10px;
    --chip-radius: 999px;
    --book-row-radius: 6px;
    --cover-radius: 8px;
    --surface-radius-sm: 8px;

    /* Layout */
    --page-max: 1180px;
    --header-min-h: 64px;
    --header-min-h-lg: 70px;
    --menu-btn-size: 40px;
    --rail-w: 320px;
    --measure-compact: 360px;
    --measure-content: 520px;

    /* Spacing scale */
    --s-0: 0;
    --s-1: 2px;
    --s-2: 4px;
    --s-3: 6px;
    --s-4: 8px;
    --s-5: 10px;
    --s-6: 12px;
    --s-7: 14px;
    --s-8: 16px;
    --s-9: 18px;
    --s-10: 20px;
    --s-11: 24px;
    --s-12: 28px;
    --s-13: 32px;
    --s-14: 40px;

    --section-gap: var(--s-8);
    --section-gap-lg: var(--s-11);
    --content-gap: var(--s-5);
    --tight-gap: var(--s-3);

    /* Ratings */
    --rating-gold: #a8924f;
    --rating-fill: rgba(46, 104, 116, 0.75);
    --rating-empty: rgba(31, 41, 51, 0.14);
    --rating-user: var(--accent);
}

/* ========================================
   2. BASE / RESET
======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

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

a:hover {
    text-decoration: underline;
}

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

p {
    font-size: 0.97rem;
    line-height: 1.72;
    margin: 0;
}

/* ========================================
   3. UTILITIES
======================================== */

.container {
    width: min(100% - var(--s-11), var(--page-max));
    margin: 0 auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.stack > * + * {
    margin-top: var(--stack-space, var(--s-4));
}

/* ========================================
   4. SITE CHROME
======================================== */

.site-top {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header {
    background: var(--nav);
    color: var(--white);
    border-bottom: 1px solid var(--white-12);
}

.header-inner {
    min-height: var(--header-min-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-6);
    padding: 0 var(--s-2);
}

.logo {
    display: inline-flex;
    align-items: center;
}

.logo img {
    width: 150px;
    height: auto;
}

.desktop-nav,
.desktop-search {
    display: none;
}

.desktop-nav {
    align-items: center;
    gap: var(--s-10);
    height: 100%;
}

.desktop-nav a {
    color: var(--white-88);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.header-actions {
    display: none;
    align-items: center;
    gap: var(--s-6);
    margin-left: var(--s-6);
}

.header-actions a {
    font-size: 0.9rem;
    color: var(--white-72);
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    line-height: 1;
}

.header-actions a:hover {
    color: var(--white);
}

.account-link--signed-in {
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    line-height: 1.1;
    min-height: auto;
}

.account-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
}

.account-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--white-72);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Header search */

.desktop-search {
    min-width: 320px;
    max-width: 420px;
    width: 100%;
    margin-left: auto;
}

.search-field {
    position: relative;
    display: block;
    width: 100%;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: var(--search-icon-left);
    width: var(--search-icon-size);
    height: var(--search-icon-size);
    transform: translateY(-50%);
    stroke: var(--white-68);
    stroke-width: 2;
    fill: none;
    pointer-events: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.18s ease;
}

.desktop-search input,
.search-input {
    width: 100%;
    border: 1px solid var(--white-16);
    background: linear-gradient(
        180deg,
        var(--white-12) 0%,
        var(--white-08) 100%
    );
    color: var(--white);
    border-radius: var(--input-radius);
    padding:
        var(--search-input-pad-y)
        var(--search-input-pad-x)
        var(--search-input-pad-y)
        var(--search-input-pad-left);
    font: inherit;
    box-shadow: var(--search-shadow);
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}

.desktop-search input::placeholder,
.search-input::placeholder {
    color: var(--white-68);
}

.desktop-search input:hover,
.search-input:hover {
    border-color: var(--white-22);
    background: linear-gradient(
        180deg,
        var(--white-14) 0%,
        var(--white-08) 100%
    );
}

.desktop-search input:focus-visible,
.search-input:focus-visible {
    outline: none;
    border-color: var(--focus);
    background: linear-gradient(
        180deg,
        var(--white-18) 0%,
        var(--white-08) 100%
    );
    box-shadow: var(--search-shadow-focus);
}

.search-field:focus-within .search-icon {
    stroke: var(--white);
}

/* ========================================
   MOBILE MENU
======================================== */

.menu-toggle {
    appearance: none;
    border: 0;
    background: var(--white-08);
    color: var(--white);
    width: var(--menu-btn-size);
    height: var(--menu-btn-size);
    border-radius: var(--menu-btn-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.menu-toggle:hover {
    background: var(--white-12);
}

.hamburger {
    width: 18px;
    height: 14px;
    position: relative;
}

.hamburger span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 6px; }
.hamburger span:nth-child(3) { top: 12px; }

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}

.mobile-menu {
    display: none;
    background: var(--nav);
    color: var(--white);
    padding: var(--s-5) 0 var(--s-7);
    border-bottom: 1px solid var(--white-12);
}

.mobile-menu.open {
    display: block;
}

.mobile-menu-section {
    padding: var(--s-5) 0;
    border-top: 1px solid var(--white-08);
}

.mobile-menu-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.mobile-menu-section-label {
    margin-bottom: var(--s-3);
    color: var(--white-62);
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.mobile-menu .search-wrap {
    margin-bottom: 0;
}

.menu-links {
    display: grid;
    gap: var(--s-2);
}

.menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);

    min-height: 44px;
    padding: 0 var(--s-4);

    color: var(--white-90);
    background: var(--white-04);

    border: 1px solid var(--white-08);
    border-radius: 10px;

    font-size: 0.94rem;
    line-height: 1.25;
    font-weight: 650;
    text-decoration: none;
}

.menu-link:hover {
    color: var(--white);
    background: var(--white-08);
    border-color: var(--white-14);
    text-decoration: none;
}

.menu-link::after {
    content: "→";
    color: var(--white-45);
    font-size: 0.9rem;
}

.menu-links--primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.menu-links--primary .menu-link {
    justify-content: center;
    text-align: center;
}

.menu-links--primary .menu-link::after {
    display: none;
}

.menu-link--account {
    position: relative;
    display: grid;
    align-items: center;
    justify-content: start;
    min-height: 58px;
    background: var(--white-10);
    border-color: var(--white-14);
}

.menu-link--account span {
    display: block;
}

.menu-link--account span + span {
    margin-top: 2px;
    color: var(--white-62);
    font-size: 0.78rem;
    font-weight: 500;
}

.menu-link--account::after {
    position: absolute;
    right: var(--s-4);
}

@media (min-width: 992px) {
    .mobile-menu {
        display: none !important;
    }
}

/* Breadcrumb */

.breadcrumb-wrap {
    background: var(--nav);
    padding: var(--s-4) 0 var(--s-5);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--tight-gap);
    font-size: 0.78rem;
    color: var(--white-72);
}

.breadcrumb a {
    color: var(--white-82);
}

.breadcrumb-sep {
    color: var(--white-45);
}

.breadcrumb-current {
    color: var(--white-95);
}

/* Focus */

.menu-toggle:focus-visible,
.search-input:focus-visible,
.desktop-search input:focus-visible,
.menu-link:focus-visible,
.toc a:focus-visible,
.connect-btn:focus-visible,
.footer-group a:focus-visible,
.footer-logo:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/* ========================================
   5. LAYOUT
======================================== */

.page {
    padding: var(--s-5) 0 var(--s-12);
    padding-top: var(--s-3);
}

.content-layout {
    display: block;
}

.main-col {
    min-width: 0;
}

.sidebar {
    margin-top: var(--s-6);
    position: static;
}

.sidebar .section h2 {
    font-size: 1rem;
    line-height: 1.3;
}

.ad-rail {
    display: none;
}

@media (min-width: 992px) {
    .sidebar {
        margin-top: 0;
    }

    .content-layout.layout-1col {
        display: block;
    }

    .content-layout.layout-2col {
        display: grid;
        grid-template-columns: minmax(0, 1fr) var(--rail-w);
        gap: var(--s-11);
        align-items: start;
    }

    .content-layout.layout-3col {
        display: grid;
        grid-template-columns: minmax(0, 1fr) var(--rail-w);
        gap: var(--s-11);
        align-items: start;
    }

    .content-layout.layout-3col .ad-rail {
        display: none;
    }

    .content-layout.layout-2col.layout--wide-main {
        --rail-w: 260px;
    }

    .sidebar--sticky {
        position: sticky;
        top: 90px;
        max-height: calc(100vh - 110px);
        overflow: auto;
    }

    .sidebar--sticky-no-scroll {
        position: sticky;
        top: 90px;
    }
}

@media (min-width: 1200px) {
    .content-layout.layout-3col {
        grid-template-columns: minmax(0, 1fr) var(--rail-w) var(--rail-w);
    }

    .content-layout.layout-3col.layout--wide-main {
        grid-template-columns: minmax(0, 1fr) 240px 300px;
        gap: var(--s-8);
    }

    .content-layout.layout-3col .ad-rail {
        display: block;
    }
}

/* ========================================
   6. HERO SYSTEM
======================================== */

.hero {
    background: var(--hero-bg-gradient);
    color: var(--white);
    padding: var(--s-10) 0 var(--s-4);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--white-08);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, var(--hero-glow) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        120% 60% at 50% 0%,
        var(--hero-glow),
        transparent 70%
    );
    pointer-events: none;
}

.hero-inner {
    display: block;
}

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

.hero-cover {
    display: none;
}

.hero-cover img {
    border-radius: var(--cover-radius);
    box-shadow: var(--cover-shadow);
}

.hero h1 {
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    line-height: 1.15;
    margin: 0 0 var(--s-2);
    letter-spacing: -0.025em;
}

.hero .summary {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--white-88);
    max-width: 62ch;
    margin-top: 0;
}

.hero-meta {
    margin-top: var(--s-5);
    font-size: 0.88rem;
    line-height: 1.4;
    font-weight: 600;
    color: var(--white-92);
}

.hero-meta strong {
    color: var(--white);
}

.author {
    font-size: 0.92rem;
    color: var(--white-72);
    margin-bottom: var(--s-3);
}

.series-status {
    color: var(--white-62);
    font-weight: 500;
}

@media (min-width: 768px) {
    .hero {
        padding: var(--s-12) 0 var(--s-6);
    }

    .hero--media .hero-inner {
        display: grid;
        grid-template-columns: 126px minmax(0, 1fr);
        gap: var(--s-10);
        align-items: start;
    }

    .hero--media .hero-cover {
        display: block;
    }

    .hero--media .hero-cover img {
        width: 126px;
    }
}

@media (min-width: 992px) {
    .hero--media .hero-inner {
        grid-template-columns: 125px minmax(0, 1fr);
        gap: var(--s-12);
    }

    .hero--media .hero-cover img {
        width: 125px;
    }
}

.hero--simple .hero-content {
    max-width: 760px;
}

.hero--simple .summary {
    max-width: none;
}

.hero--compact {
    padding: var(--s-8) 0 var(--s-4);
}

.hero--compact h1 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.hero--compact .summary {
    font-size: 0.96rem;
    line-height: 1.6;
}

.hero--split .hero-inner {
    display: grid;
    gap: var(--s-8);
    align-items: start;
}

.hero--split .hero-content,
.hero--split .hero-side {
    min-width: 0;
}

@media (min-width: 992px) {
    .hero--split .hero-inner {
        grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px);
        gap: var(--s-12);
    }
}

/* ========================================
   7. SECTIONS / TYPOGRAPHY
======================================== */

.section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--s-8);
    margin-bottom: var(--section-gap);
    box-shadow: var(--shadow);
}

.list-section {
    margin-bottom: var(--section-gap);
    padding: var(--s-4) var(--tight-gap);
}

.section p + p {
    margin-top: var(--content-gap);
}

.section-meta {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 400;
    white-space: nowrap;
}

.book-count-extra {
    color: var(--muted);
}

.section-submeta {
    font-size: 0.9rem;
    color: var(--muted);
    margin: -4px 0 var(--s-4);
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-submeta strong {
    color: var(--text);
    font-weight: 600;
}

.meta-divider {
    opacity: 0.6;
}

.section-intro {
    margin-top: var(--s-2);
    margin-bottom: var(--s-5);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
    max-width: var(--measure-content);
}

.section > h2,
.list-section > h2,
.section-title {
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 650;
    letter-spacing: -0.015em;
    margin: 0 0 var(--s-4);
}

.section > h3 {
    font-size: 0.88rem;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    color: var(--muted);
    margin: var(--s-6) 0 var(--s-2);
}

.section > h2 + h3 {
    margin-top: var(--s-3);
}

.section > p + h3 {
    margin-top: var(--s-6);
}

.section > h3 + p {
    margin-top: 0;
}

.section p {
    line-height: 1.7;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    margin-top: var(--s-6);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

.section-link::after {
    content: "→";
    font-size: 0.9em;
    line-height: 1;
    transition: transform 0.15s ease;
}

.section-link:hover {
    text-decoration: underline;
}

.section-link:hover::after {
    transform: translateX(2px);
}

.section-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-18);
    border-radius: var(--surface-radius-sm);
}

/* ========================================
   8. META / SIDEBAR / TOC
======================================== */

.meta-list {
    display: grid;
    gap: var(--s-6);
    margin-top: var(--s-4);
}

.meta-row {
    display: grid;
    grid-template-columns: minmax(92px, 0.85fr) minmax(0, 1.15fr);
    gap: var(--s-4);
    padding: var(--s-3) 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-label {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.meta-value {
    min-width: 0;
    font-size: 0.88rem;
    line-height: 1.35;
    font-weight: 500;
    color: var(--text);
    text-align: right;
}

.meta-value a {
    color: inherit;
    text-decoration: none;
}

.meta-value a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.meta-value--truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-title {
    display: block;
    line-height: 1.35;
}

.meta-subvalue {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    line-height: 1.3;
    color: var(--muted);
    font-weight: 500;
}

@media (max-width: 767px) {
    .meta-row {
        grid-template-columns: 1fr;
        gap: var(--s-1);
    }

    .meta-value {
        text-align: left;
    }
}

.toc {
    display: none;
}

.toc a {
    display: block;
    padding: var(--s-3) 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--black-05);
}

.toc a:last-child {
    border-bottom: none;
}

.toc a:hover {
    color: var(--accent);
    text-decoration: none;
}

.toc a::after {
    content: "→";
    float: right;
    color: var(--muted);
    font-size: 0.85rem;
}

.sidebar-link-list {
    list-style: none;
    margin: var(--s-4) 0 0;
    padding: 0;
}

.sidebar-link-list li {
    margin: 0;
    padding: 0;
}

.sidebar-link-list a {
    display: block;
    padding: var(--s-3) 0;
    font-size: 0.9rem;
    line-height: 1.3;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.sidebar-link-list li:last-child a {
    border-bottom: none;
}

.sidebar-link-list a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ========================================
   9. TAGS / CHIPS / FAQ / ACTIONS
======================================== */

.tags,
.genre-chip-list,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4);
}

.tags span,
.genre-chip-list a,
.genre-chip-list .genre-chip,
.tag-list a,
.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: var(--s-4) var(--s-5);
    border-radius: var(--chip-radius);
    background: var(--chip-bg);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

.tag-list a,
.tag-chip {
    padding: 4px 10px;
    color: var(--text);
    line-height: 1.2;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.genre-chip-list a:hover,
.tag-list a:hover,
.tag-chip:hover {
    background: var(--accent-10);
    color: var(--accent);
    text-decoration: none;
}

.genre-chip-list .genre-chip.is-active {
    background: var(--accent);
    color: var(--white);
    font-weight: 700;
}

.tag-section {
    margin-top: var(--section-gap);
}

.tag-group + .tag-group {
    margin-top: var(--s-8);
}

.tag-group-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 var(--s-4);
}

.faq-item {
    margin-bottom: var(--content-gap);
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item strong {
    display: block;
    margin-bottom: var(--tight-gap);
    font-size: 0.96rem;
    line-height: 1.4;
}

.connect-actions {
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
}

.connect-item {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.connect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: var(--control-height);
    padding: 0 var(--s-8);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-04);
    border: 1px solid var(--accent-12);
    border-radius: var(--surface-radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.connect-btn:hover {
    background: var(--accent-08);
    border-color: var(--accent-22);
    color: var(--accent-hover);
}

.connect-note {
    font-size: 0.75rem;
    color: var(--muted);
}

/* ========================================
   10. MEDIA / DISCOVERY
======================================== */

.media-slot {
    flex: 0 0 auto;
    min-width: 0;
}

.media-slot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--cover-radius);
    box-shadow: var(--cover-shadow);
}

.media-slot--square {
    width: 126px;
}

.media-slot--square img,
.media-slot--square .media-fallback {
    width: 126px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.media-slot--cover {
    width: 126px;
}

.media-slot--cover img,
.media-slot--cover .media-fallback {
    width: 126px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.media-slot--hero {
    flex: 0 0 auto;
}

.media-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--cover-radius);
    box-shadow: var(--cover-shadow);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    border: 1px solid var(--white-16);
    color: var(--white-92);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.media-fallback--initials {
    font-size: 1.3rem;
}

.media-fallback--icon {
    font-size: 2rem;
    line-height: 1;
}

.discovery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-5);
}

.discovery-card {
    display: grid;
    gap: var(--s-4);
    min-width: 0;
    padding: var(--s-4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    text-decoration: none;
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        transform 0.08s ease;
}

.discovery-card:hover {
    border-color: var(--accent-22);
    background: var(--accent-04);
    text-decoration: none;
}

.discovery-card:active {
    transform: scale(0.995);
}

.discovery-card .media-slot {
    margin-inline: auto;
}

.discovery-body {
    display: grid;
    gap: 2px;
    min-width: 0;
    text-align: center;
}

.discovery-title {
    font-size: 0.9rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text);
    overflow-wrap: anywhere;
}

.discovery-meta {
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--muted);
}

@media (min-width: 768px) {
    .discovery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--s-6);
    }
}

@media (min-width: 1200px) {
    .discovery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .discovery-grid {
        grid-template-columns: 1fr;
        gap: var(--s-3);
    }

    .discovery-card {
        grid-template-columns: 72px minmax(0, 1fr);
        align-items: center;
        gap: var(--s-4);
        padding: var(--s-4);
    }

    .discovery-card .media-slot {
        margin: 0;
    }

    .discovery-card .media-slot--cover,
    .discovery-card .media-slot--cover img,
    .discovery-card .media-slot--cover .media-fallback {
        width: 72px;
    }

    .discovery-body {
        text-align: left;
    }

    .discovery-title {
        font-size: 0.96rem;
    }

    .discovery-meta {
        font-size: 0.8rem;
    }
}

/* ========================================
   11. AUTOSUGGEST
======================================== */

.search-shell {
    position: relative;
}

.autosuggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 2000;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    display: none;
}

.autosuggest.is-open {
    display: block;
}

.autosuggest-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: min(70vh, 520px);
    overflow-y: auto;
}

.autosuggest-item {
    border-bottom: 1px solid var(--border);
}

.autosuggest-item:last-child {
    border-bottom: 0;
}

.autosuggest-link {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--text);
    background: var(--card);
}

.autosuggest-link:hover,
.autosuggest-link.is-active {
    background: #f7fafb;
}

.autosuggest-link,
.autosuggest-link:hover,
.autosuggest-link:focus,
.autosuggest-link:active {
    text-decoration: none;
}

.ac-thumb {
    width: 40px;
    height: 52px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    overflow: hidden;
}

.ac-thumb.is-author {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #eef6ea;
    color: #2f6b3d;
}

.ac-thumb.is-series {
    background: var(--accent-04);
    color: var(--accent);
}

.ac-thumb.is-anthology {
    background: #f3eefc;
    color: #6a4fb3;
}

.ac-thumb.is-book {
    background: #f3f4f6;
    color: #4b5563;
}

.ac-thumb svg {
    width: 18px;
    height: 18px;
    display: block;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.ac-body {
    min-width: 0;
}

.ac-title {
    display: block;
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-meta {
    display: block;
    margin-top: 3px;
    font-size: 0.84rem;
    line-height: 1.35;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-type {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--accent-04);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.ac-type.is-book {
    background: #f3f4f6;
    color: #4b5563;
}

.ac-type.is-author {
    background: #eef6ea;
    color: #2f6b3d;
}

.ac-type.is-anthology {
    background: #f3eefc;
    color: #6a4fb3;
}

.desktop-search.search-shell,
.desktop-search .autosuggest-form,
.desktop-search .search-field {
    width: 100%;
}

.desktop-search .search-input {
    color-scheme: dark;
}

.home-hero-search {
    width: min(100%, 760px);
    margin: var(--s-8) auto 0;
}

.home-hero-search .search-field {
    position: relative;
    min-width: 0;
}

.home-hero-search .autosuggest-input {
    width: 100%;
}

.home-hero-search .search-input {
    min-height: 58px;
    font-size: 1.05rem;
    padding-left: 48px;
    background: #ffffff;
    color: var(--text);
    border: 1px solid rgba(0, 67, 88, 0.14);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.12),
        0 1px 0 rgba(255,255,255,0.9) inset;
}

.home-hero-search .search-input::placeholder {
    color: var(--text-muted);
}

.home-hero-search .search-icon {
    left: 16px;
    stroke: var(--text-muted);
}

.home-hero-search .search-input:hover {
    border-color: rgba(0, 67, 88, 0.22);
    background: #ffffff;
}

.home-hero-search .search-input:focus-visible {
    background: #ffffff;
    border-color: var(--focus);
    box-shadow:
        0 0 0 3px var(--focus-18),
        0 12px 30px rgba(0, 0, 0, 0.12);
}

.hero--home,
.home-hero-content,
.home-hero-search.search-shell {
    position: relative;
    z-index: 20;
}

.hero--home {
    overflow: visible;
}

@media (max-width: 767px) {
    .autosuggest-link {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 11px 12px;
    }

    .ac-thumb {
        width: 36px;
        height: 48px;
    }

    .ac-type {
        font-size: 0.68rem;
        padding: 0 7px;
    }
}

/* ========================================
   12. SHARE MODAL / ADS
======================================== */

.share-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.share-modal[hidden] {
    display: none !important;
}

.share-modal-inner {
    background: var(--card);
    border-radius: var(--radius);
    padding: var(--s-10);
    width: min(90%, 360px);
    box-shadow: var(--shadow-strong);
    text-align: center;
}

.share-title {
    margin: 0;
    font-size: 1rem;
}

.share-actions {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    margin-top: var(--s-8);
}

.share-link,
.share-link-copy {
    display: block;
    width: 100%;
    text-align: center;
    padding: var(--s-6);
    border-radius: var(--surface-radius-sm);
    background: var(--accent-04);
    border: 1px solid var(--accent-12);
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.share-link:hover,
.share-link-copy:hover {
    background: var(--accent-08);
    border-color: var(--accent-22);
}

.share-close {
    margin-top: var(--s-8);
    background: none;
    border: none;
    font-size: 0.8rem;
    color: var(--muted);
    cursor: pointer;
}

/* ========================================
   AD PLACEHOLDERS
======================================== */

.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    margin: 2rem auto;

    background: #f4f1ea;
    border: 0;
    border-radius: .5rem;

    overflow: hidden;
}

/* Remove development size labels */
.ad-slot::before {
    content: none;
}

/* ========================================
   SIDEBAR ADS
======================================== */

.ad-slot--sidebar-top {
    width: 100%;
    max-width: 300px;
    min-height: 600px;
    margin: 0 auto 1.5rem;
}

.ad-slot--sidebar-bottom {
    width: 300px;
    min-height: 250px;
    margin: 0 auto 1.5rem;
}

/* ========================================
   CONTENT ADS
======================================== */

.ad-slot--content-top {
    max-width: 970px;
    min-height: 250px;
}

.ad-slot--content-bottom {
    max-width: 728px;
    min-height: 90px;
}

/* ========================================
   DEVELOPMENT SIZE HELPERS
   (Remove when live ads are enabled)
======================================== */

.ad-slot--300x250 {
    width: 300px;
    height: 250px;
}

.ad-slot--300x600 {
    width: 300px;
    height: 600px;
}

.ad-slot--336x280 {
    width: 336px;
    height: 280px;
}

.ad-slot--728x90 {
    width: 728px;
    height: 90px;
}

.ad-slot--970x250 {
    width: 970px;
    height: 250px;
}

.ad-slot--320x50 {
    width: 320px;
    height: 50px;
}

.ad-slot--320x100 {
    width: 320px;
    height: 100px;
}

.ad-slot--320x250 {
    width: 320px;
    height: 250px;
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 767px) {

    .ad-slot--sidebar-top,
    .ad-slot--sidebar-bottom {
        display: none;
    }

    .ad-slot--content-top,
    .ad-slot--content-bottom {
        max-width: 320px;
        min-height: 250px;
        margin: 1.5rem auto;
    }
}



/* ========================================
   13. FOOTER
======================================== */

.site-footer {
    margin-top: var(--s-12);
    background: var(--nav);
    color: var(--white-82);
    border-top: 1px solid var(--white-08);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-8);
    padding: var(--s-10) 0 var(--s-8);
}

.footer-brand {
    grid-column: 1 / -1;
    max-width: none;
    padding-bottom: var(--s-6);
    border-bottom: 1px solid var(--white-08);
}

.footer-logo {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
    text-decoration: none;
    margin-bottom: var(--s-4);
}

.footer-logo:hover {
    text-decoration: none;
}

.footer-tagline {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--white-72);
    margin: 0;
    max-width: 42ch;
}

.footer-group {
    display: grid;
    gap: var(--s-2);
    align-content: start;
}

.footer-group h2 {
    margin: 0 0 var(--s-3);
    font-size: 0.78rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--white);
}

.footer-group a {
    color: var(--white-76);
    font-size: 0.92rem;
    line-height: 1.5;
    text-decoration: none;
}

.footer-group a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    padding: var(--s-5) 0 var(--s-8);
    border-top: 1px solid var(--white-08);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--white-62);
    text-align: center;
}

@media (max-width: 767px) {
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: var(--s-8);
        row-gap: var(--s-7);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (min-width: 768px) {
    .container {
        width: min(100% - var(--s-14), var(--page-max));
    }

    .page {
        padding-top: var(--s-9);
    }

    .section,
    .list-section {
        margin-bottom: var(--section-gap-lg);
    }

    .footer-inner {
        grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(140px, 1fr));
        align-items: start;
        gap: var(--s-12);
        padding-top: var(--s-13);
        padding-bottom: var(--s-11);
    }

    .footer-brand {
        max-width: 32rem;
        padding-bottom: 0;
        border-bottom: 0;
    }

    .footer-bottom {
        padding: var(--s-6) 0 var(--s-10);
    }

    .footer-bottom p {
        text-align: left;
    }
}
.footer-inner--expanded {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
}

.footer-logo--image {
    display: inline-block;
    margin-bottom: var(--s-4);
}

.footer-logo--image img {
    width: 180px;
    height: auto;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4);
    margin-top: var(--s-4);
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border-radius: 999px;
    background: var(--white-10);
    color: var(--white);
    text-decoration: none;

    font-size: 0.95rem;
    font-weight: 800;
}

.footer-social a:hover {
    background: var(--white-18);
    text-decoration: none;
}

.footer-connect p {
    margin: 0;
    color: var(--white-82);
    font-size: 0.92rem;
}

.footer-newsletter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: fit-content;
    min-height: 44px;
    margin-top: var(--s-8);
    padding: 0 var(--s-7);

    border-radius: 8px;
    background: var(--white-18);
    color: var(--white);
    text-decoration: none;

    font-size: 0.92rem;
    font-weight: 700;
}

.footer-newsletter-btn:hover {
    background: var(--white-22);
    text-decoration: none;
}

.footer-bottom--expanded {
    display: flex;
    justify-content: space-between;
    gap: var(--s-8);
    align-items: flex-start;
}

.footer-disclaimer {
    margin-top: var(--s-4);
    max-width: 78ch;
    color: var(--white-72);
}

.footer-disclaimer a,
.footer-legal a {
    color: var(--white-82);
    text-decoration: none;
}

.footer-disclaimer a:hover,
.footer-legal a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--s-2);
    min-width: 240px;

    color: var(--white-72);
    font-size: 0.9rem;
}

.footer-privacy-btn {
    flex-basis: 100%;
    margin-bottom: var(--s-3);

    width: fit-content;
    margin-left: auto;

    border: 1px solid var(--white-18);
    border-radius: 8px;
    background: var(--white-10);
    color: var(--white);

    padding: var(--s-3) var(--s-5);

    font: inherit;
    cursor: pointer;
}

.footer-privacy-btn:hover {
    background: var(--white-18);
}

@media (max-width: 991px) {
    .footer-inner--expanded {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom--expanded {
        display: grid;
        gap: var(--s-5);
    }

    .footer-legal {
        justify-content: flex-start;
        min-width: 0;
    }

    .footer-privacy-btn {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .footer-inner--expanded {
        grid-template-columns: 1fr;
    }
}









/* ========================================
   14. EXTRA HEADER CSS
======================================== */

@media (min-width: 992px) {
    .header-inner {
        min-height: var(--header-min-h-lg);
        gap: var(--s-9);
        align-items: center;
    }

    .logo img {
        width: 180px;
    }

    .menu-toggle,
    .mobile-menu {
        display: none !important;
    }

    .desktop-nav,
    .desktop-search {
        display: flex;
        align-items: center;
    }

    .desktop-nav {
        gap: var(--s-10);
        transform: translateY(4px);
        flex-shrink: 0;
    }

    .desktop-nav a {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .desktop-search {
        min-width: 360px;
        max-width: 460px;
        width: 100%;
        margin-left: auto;
        align-self: center;
    }

    .desktop-search input {
        padding-top: var(--s-6);
        padding-bottom: var(--s-6);
    }

    .header-actions {
        display: flex;
        transform: translateY(4px);
    }

    .breadcrumb-wrap {
        padding-top: var(--s-5);
        padding-bottom: var(--s-6);
    }

    .toc {
        display: flex;
        flex-direction: column;
        gap: var(--s-3);
    }
}

@media (max-width: 991px) {
    .toc-section {
        display: none;
    }
}

/* ========================================
   14. SHARED ANCHOR OFFSETS
======================================== */

#top-series,
#top-authors,
#top-books,
#related-genres,
#about-genre,
#major-awards,
#browse-genres,
#browse-years,
#about-awards {
    scroll-margin-top: 100px;
}

/* ========================================
   RELATED SERIES GRID
   Shared component
   Used by author + series pages
======================================== */

.related-series-section .section-intro {
    color: var(--muted);
    margin-bottom: var(--s-6);
}

.related-series-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-5);
    margin-top: var(--s-5);
}

.related-series-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 190px;

    padding: var(--s-4);

    text-align: center;

    border: 1px solid var(--border);
    border-radius: var(--surface-radius-sm);

    background: var(--card);
    text-decoration: none;

    transition:
        border-color 0.18s ease,
        background-color 0.18s ease;
}

.related-series-link:hover {
    border-color: var(--accent-22);
    background: var(--accent-04);
    text-decoration: none;
}

.related-series-cover {
    width: 72px;
    margin: 0 auto var(--s-3);
}

.related-series-cover img {
    width: 72px;
    height: 108px;
    object-fit: cover;

    border-radius: var(--cover-radius);
    box-shadow: var(--cover-shadow);
}

.related-series-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.related-series-title {
    margin: 0;

    font-size: 0.86rem;
    line-height: 1.25;
    font-weight: 700;

    color: var(--text);

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;

    min-height: calc(0.86rem * 1.25 * 2);
}

.related-series-author {
    margin: 0;

    font-size: 0.76rem;
    line-height: 1.3;

    color: var(--muted);

    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

.related-series-cta {
    display: inline-block;
    margin-top: var(--s-6);
}

@media (min-width: 768px) {
    .related-series-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .related-series-link {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        gap: var(--s-5);

        align-items: center;

        min-height: 0;

        text-align: left;
    }

    .related-series-cover {
        margin: 0;
    }

    .related-series-title {
        min-height: 0;
    }
}

/* ---- legacy site.css lines 3646-3713 ---- */
/* ========================================
   NEXT BOOK CALLOUT
   Reusable support component
======================================== */

.next-book-callout {
    display: grid;
    gap: var(--s-4);
    padding: var(--s-6);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-subtle);
    box-shadow: var(--shadow);
    margin: var(--s-6) 0 var(--s-7);
}

.next-book-callout-title {
    font-size: 0.96rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text);
}

.next-book-callout-text {
    margin: 4px 0 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--muted);
    max-width: 56ch;
}

.next-book-callout-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 40px;
    padding: 0 var(--s-5);
    border-radius: 10px;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        transform 0.08s ease;
}

.next-book-callout-link:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    text-decoration: none;
}

.next-book-callout-link:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .next-book-callout {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: var(--s-6);
    }
}

/* ========================================
   JUMP LINKS
======================================== */

.jump-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 var(--s-4);
    padding-left: var(--tight-gap);
    padding-right: var(--tight-gap);

    font-size: 0.85rem;
    color: var(--muted);
}

.jump-links > span {
    display: inline-flex;
    align-items: center;
}

.jump-links > span + span::before {
    content: "•";
    margin: 0 var(--s-3);
    color: var(--border);
}

.jump-links a {
    position: relative;
    display: inline-block;

    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    line-height: 1.5;

    border-bottom: 1px solid transparent;
}

.jump-links a:hover {
    color: var(--accent);
    border-bottom-color: currentColor;
}

.jump-links a::after {
    content: "";
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: -4px;
    right: -4px;
}
/* ========================================
   MEMBER UTILITY LINK
======================================== */

.utility-link {
    display: inline-block;
    max-width: 100%;

    padding: 10px 12px;

    border-radius: 12px;
    border: 1px solid rgba(var(--accent-rgb), 0.14);

    background: #daecf0;

    color: var(--text);
    text-decoration: none;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.utility-link:hover {
    background: #daecf0;
    border-color: rgba(var(--accent-rgb), 0.20);

    text-decoration: none;
}

.utility-label {
    display: block;

    margin-bottom: 2px;

    color: var(--accent);

    font-size: 0.7rem;
    line-height: 1.2;
    font-weight: 700;

    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.utility-title {
    display: block;

    color: var(--text);

    font-size: 0.95rem;
    line-height: 1.3;
    font-weight: 600;
}

.utility-meta {
    display: block;

    margin-top: 2px;

    color: var(--muted);

    font-size: 0.78rem;
    line-height: 1.25;
}

.hero-utility {
    margin-top: 10px;
}

.mobile-only {
    display: none !important;
}

.desktop-only {
    display: inline-block !important;
}

@media (max-width: 767px) {

    .mobile-only {
        display: inline-block !important;
    }

    .desktop-only {
        display: none !important;
    }
}

.section input,
.section select,
.section textarea {
    width: 100%;
    max-width: 100%;
    padding: var(--s-5) var(--s-6);
    border: 1px solid var(--border);
    border-radius: var(--input-radius);
    background: var(--white);
    color: var(--text);
    font: inherit;
}

.section textarea {
    resize: vertical;
}

.section input:focus-visible,
.section select:focus-visible,
.section textarea:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}