  :root {
            --primary: #667eea;
            --primary-dark: #4a5ad4;
            --accent: #764ba2;
            --bg: #f5f7fa;
            --text: #333;
            --muted: #555;
            --max-width: 1100px;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            line-height: 1.6;
            color: var(--text);
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        }

        a {
            color: var(--primary);
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
        }

        header {
            background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
            color: white;
            padding: 12px 0 20px;   /* was 20px 0 40px */
            box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
            position: sticky;
            top: 0;
            z-index: 999;
        }

        .nav-container {
            max-width: var(--max-width);
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .logo {
            font-weight: 700;
            font-size: 1.2rem;
            letter-spacing: 0.03em;
        }

        nav ul {
            list-style: none;
            display: flex;
            gap: 18px;
            font-size: 0.95rem;
        }

        nav a {
            color: rgba(255, 255, 255, 0.9);
            font-weight: 500;
        }

        nav a:hover {
            color: #fff;
        }

        /* HERO – purple gradient band under the nav */
        .hero {
            max-width: var(--max-width);
            margin: 0 auto 32px;  /* touches header, space below */
            padding: 32px 20px 40px;
            display: grid;
            grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
            gap: 24px;
            align-items: center;

            /* make the hero itself purple again */
            background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
            color: #ffffff;
            border-radius: 0 0 24px 24px; /* soft bottom corners */
        }

        .hero-title {
            font-size: clamp(1.9rem, 2.6vw, 2.4rem);
            margin-bottom: 8px;
        }

        .hero-subtitle {
            font-size: 1.05rem;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 10px;
        }

        .hero-badge {
            display: inline-block;
            background: rgba(0, 0, 0, 0.15);
            padding: 6px 14px;
            border-radius: 999px;
            font-size: 0.75rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            margin-bottom: 10px;
        }

        .hero-cta {
            margin-top: 14px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .btn-primary,
        .btn-outline {
            border-radius: 999px;
            padding: 10px 24px;
            font-weight: 600;
            font-size: 0.95rem;
            border: 2px solid transparent;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .btn-primary {
            background: white;
            color: var(--primary-dark);
            border-color: white;
        }

        .btn-primary:hover {
            background: #f1f5ff;
        }

        .btn-outline {
            background: transparent;
            color: white;
            border-color: rgba(255, 255, 255, 0.8);
        }

        .btn-outline:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .hero-cover {
            flex: 0 0 220px;      /* was 260px */
            max-width: 220px;
            height: 320px;        /* was 380px */
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 18px 35px rgba(0, 0, 0, 0.25);
        }

        .hero-cover-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .hero-cover-placeholder {
            width: 230px;
            height: 340px;
            background: linear-gradient(145deg, #ffffff 0%, #e2e8ff 100%);
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 18px;
            color: #222;
            position: relative;
            overflow: hidden;
        }

        .hero-cover-placeholder::before {
            content: "";
            position: absolute;
            inset: 10px;
            border-radius: 10px;
            border: 1px solid rgba(102, 126, 234, 0.25);
        }

        .hero-cover-title {
            font-weight: 700;
            font-size: 1.1rem;
        }

        .hero-cover-author {
            font-size: 0.85rem;
            color: #555;
        }

        main {
            max-width: var(--max-width);
            margin: 0 auto 50px;
            padding: 0 20px;
        }

        section {
            margin-bottom: 45px;
        }

        section h2 {
            font-size: 1.6rem;
            margin-bottom: 10px;
            color: var(--primary-dark);
        }

        .section-subtitle {
            font-size: 0.95rem;
            color: #555;
            margin-bottom: 15px;
        }

        .card {
            background: white;
            border-radius: 14px;
            padding: 20px 22px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
            margin-bottom: 15px;
        }

        .two-column {
            display: grid;
            grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
            gap: 20px;
        }

        .pill {
            display: inline-block;
            border-radius: 999px;
            padding: 4px 10px;
            font-size: 0.75rem;
            background: #edf2ff;
            color: var(--primary-dark);
            margin-right: 5px;
            margin-bottom: 5px;
        }

        .comparison-list li {
            margin-bottom: 6px;
        }

        .book-meta {
            font-size: 0.9rem;
            color: #555;
            margin: 4px 0;
        }

        .grid-3 {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
            gap: 18px;
        }

        .small-label {
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #555;
        }

        .highlight {
            display: inline-block;
            margin-top: 4px;
            background: #fff8e1;
            padding: 4px 6px;
            border-radius: 4px;
            color: #333;              /* or: color: var(--primary-dark); */
        }

        .badge-soft {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 0.75rem;
            background: #e0f2fe;
            color: #0369a1;
            margin-right: 6px;
            margin-bottom: 4px;
        }

        .contact-form {
            display: grid;
            gap: 10px;
            margin-top: 10px;
        }

        .contact-form input,
        .contact-form textarea {
            padding: 10px;
            border-radius: 8px;
            border: 1px solid #d0d7ea;
            font: inherit;
        }

        .contact-form textarea {
            min-height: 100px;
            resize: vertical;
        }

        footer {
            text-align: center;
            padding: 25px 20px 35px;
            color: var(--muted);
            font-size: 0.85rem;
        }

        .scroll-top {
            position: fixed;
            bottom: 22px;
            right: 22px;
            width: 44px;
            height: 44px;
            border-radius: 999px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
            color: #fff;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 1.1rem;
            z-index: 900;
        }

        .scroll-top.show {
            display: flex;
        }

       /* Author section layout */
        .author-card {
            padding: 22px;
        }

        .author-layout {
            display: grid;
            grid-template-columns: 120px 1fr;
            gap: 18px;
            align-items: start;
            margin-top: 10px;
        }

        /* Photo column */
        .author-photo-col {
            flex-shrink: 0;
        }

        /* Passport-sized image */
        .author-photo {
            width: 110px;
            height: 140px;
            object-fit: cover;
            border-radius: 8px;
            box-shadow: 0 8px 18px rgba(0,0,0,0.18);
            background: #f5f7fa;
        }

        /* Bio column */
        .author-bio-col p {
            font-size: 0.95rem;
            line-height: 1.6;
            margin-bottom: 10px;
        }

        /* Mobile stacking */
        @media (max-width: 640px) {
            .author-layout {
                grid-template-columns: 1fr;
            }

            .author-photo {
                width: 100px;
                height: 130px;
            }

            .author-photo-col {
                margin-bottom: 6px;
            }
        }


        /* SEO comp block inside Comparison section */
        .seo-comp {
            font-size: 0.95rem;
            color: #444;
        }

        @media (max-width: 768px) {

            .hero {
                padding: 32px 16px 40px;
            }

            .two-column {
                grid-template-columns: 1fr;
            }

            nav ul {
                gap: 10px;
                font-size: 0.8rem;
            }

            .hero {
                text-align: left;
            }

            .hero-cover {
                order: -1;
            }
        }

        /* CTAs inside the Comparison & Literary Buzz card */
        .comparison-cta {
            margin-top: 14px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        /* Make outline buttons readable on white cards */
        .card .btn-outline {
            color: var(--primary-dark);
            border-color: var(--primary);
            background: #ffffff;
        }

        .card .btn-outline:hover {
            background: #eef2ff;
        }

       
/* =========================
   MOBILE TABLE FIX
   ========================= */
@media (max-width: 768px) {

    .chapter-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 100%;
        font-size: 0.78rem;
    }

    th,
    td {
        padding: 6px 6px;
        white-space: nowrap;
    }

    .summary-col {
        min-width: 220px;
        white-space: normal;
    }

    thead {
        position: static;
    }

        .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    nav ul {
        flex-wrap: wrap;
        gap: 8px;
    }

        .tab-buttons {
        gap: 6px;
    }

    .tab-button {
        padding: 10px 16px;
        font-size: 0.85rem;
        border-radius: 999px;
    }
}

@media (max-width: 600px) {

    th:nth-child(n+6),
    td:nth-child(n+6) {
        display: none;
    }
}

    .btn-outline-logo {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 140px;               /* Fixed width for uniformity */
        height: 60px;               /* Fixed height for uniformity */
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        background-color: #fff;
        padding: 10px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        transition: transform 0.2s;
        text-decoration: none;      /* Removes underline from links */
    }

    .btn-outline-logo:hover {
        transform: translateY(-2px);
        border-color: #bbb;
    }

    .btn-outline-logo img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;        /* THE MAGIC FIX: Ensures logos don't stretch */
        display: block;
    }

    /* Footer social links */
.social-links {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 18px;
}

.social-links a img {
    width: 22px;
    height: 22px;
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-links a:hover img {
    opacity: 1;
    transform: translateY(-2px);
}