/* ============================================================
   Brains Without Brakes — Mobile-First Stylesheet
   ============================================================ */

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
    --primary:       #4A90E2;
    --primary-dark:  #357ABD;
    --accent:        #E85D75;
    --text-dark:     #2C3E50;
    --text-light:    #5A6C7D;
    --bg-light:      #F8F9FA;
    --bg-white:      #FFFFFF;
    --border:        #E1E8ED;
    --divider:       #E8EEF3;
    --success:       #52B788;
    --warning:       #F4A261;

    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;
    --shadow-sm:     0 2px 8px rgba(0,0,0,.06);
    --shadow-md:     0 6px 20px rgba(0,0,0,.10);
}

/* ── Base ───────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 75px;
}

@media (min-width: 900px) {
    html {
        scroll-padding-top: 130px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-white);
    font-size: 1rem;
}

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

/* ── Accessibility: Skip Link ───────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 10000;
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
    outline: none;
}

/* ── Accessibility: Focus Styles ────────────────────────────── */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ── Typography (mobile-first) ──────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
}

h1 { font-size: 1.85rem; }
h2 { font-size: 1.5rem;  margin-top: 2rem; }
h3 { font-size: 1.2rem;  color: var(--primary-dark); }
h4 { font-size: 1rem;    color: var(--text-dark); }

@media (min-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem;   }
    h3 { font-size: 1.5rem; }
}

p {
    margin-bottom: 1.2rem;
    color: var(--text-light);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ── Article h2 accent underline ────────────────────────────── */
article h2,
.article-body h2 {
    position: relative;
    padding-bottom: 0.6rem;
    margin-bottom: 1.2rem;
}
article h2::after,
.article-body h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        to right,
        var(--primary) 50px,
        var(--divider) 50px
    );
}

/* Suppress accent in callouts and hero */
.callout h2::after,
.callout h3::after,
.callout h4::after,
.hero h1::after,
.hero h2::after {
    content: none;
}

/* Section separator when sections stack */
article .section + .section,
.article-body .section + .section {
    border-top: 2px solid var(--divider);
    padding-top: 2.5rem;
}

/* ── Header & Navigation (mobile-first) ─────────────────────── */
header {
    background: var(--bg-white);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    flex-shrink: 0;
}
.logo img { height: 36px; width: auto; }
.logo span { color: var(--text-dark); }

/* Mobile nav: hidden by default */
nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-md);
    list-style: none;
    gap: 0;
    z-index: 999;
    border-top: 1px solid var(--border);
}
nav ul.active {
    display: flex;
}
nav ul li {
    width: 100%;
}
nav ul a {
    display: block;
    padding: 0.7rem 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    border-bottom: 1px solid var(--divider);
    font-size: 0.95rem;
}
nav ul li:last-child a {
    border-bottom: none;
}
nav ul a:hover,
nav ul a.active {
    color: var(--primary);
    text-decoration: none;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-dark);
    padding: 0.4rem 0.6rem;
    min-width: 44px;
    min-height: 44px;
    line-height: 1;
}

/* Desktop nav */
@media (min-width: 900px) {
    nav {
        padding: 1.2rem 2rem;
    }
    nav ul {
        display: flex !important;
        flex-direction: row;
        position: static;
        background: none;
        padding: 0;
        box-shadow: none;
        gap: 1.75rem;
        border-top: none;
        width: auto;
    }
    nav ul li {
        width: auto;
    }
    nav ul a {
        display: inline;
        padding: 0;
        border-bottom: none;
        font-size: 0.95rem;
    }
    .mobile-menu-btn {
        display: none;
    }
}

/* ── Stacked header (logo above nav) ─────────────────────────── */
@media (min-width: 900px) {
    .header-stacked nav {
        flex-direction: column;
        align-items: center;
        padding: 1rem 2rem 0;
        gap: 0;
    }
    .header-stacked .logo {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
    }
    .header-stacked nav ul {
        width: 100% !important;
        justify-content: center;
        gap: 0.25rem !important;
        border-top: 1px solid var(--border) !important;
        padding: 0.6rem 0.5rem !important;
        flex-wrap: wrap;
    }
    .header-stacked nav ul a {
        padding: 0.25rem 0.6rem !important;
        border-radius: var(--radius-sm);
        white-space: nowrap;
    }
    .header-stacked nav ul a:hover,
    .header-stacked nav ul a.active {
        background: var(--bg-light);
    }
}

/* ── Hero (mobile-first) ────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 3.5rem 1.5rem;
    text-align: center;
}
.hero h1 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.05rem;
    color: rgba(255,255,255,.93);
    max-width: 680px;
    margin: 0 auto 1.75rem;
}
.hero .cta-button {
    display: inline-block;
    background: #fff;
    color: var(--primary-dark);
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 44px;
}
.hero .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.2);
    text-decoration: none;
}

@media (min-width: 768px) {
    .hero {
        padding: 6rem 2rem;
    }
    .hero h1 {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }
    .hero p {
        font-size: 1.3rem;
        margin-bottom: 2rem;
    }
    .hero .cta-button {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }
}

/* ── Containers ─────────────────────────────────────────────── */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}
.wide-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

@media (min-width: 768px) {
    .container,
    .wide-container {
        padding: 3rem 2rem;
    }
}

/* ── TOC Layout (mobile-first: single column) ───────────────── */
article.container.has-toc {
    max-width: 900px;
}

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

.toc-sidebar {
    margin-bottom: 2rem;
}

/* Desktop: 2-column grid with sticky TOC sidebar */
@media (min-width: 961px) {
    article.container.has-toc {
        max-width: 1200px;
        display: grid;
        grid-template-columns: 1fr 230px;
        gap: 4rem;
        align-items: start;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    .toc-sidebar {
        margin-bottom: 0;
        order: 2;
    }
    .article-body {
        order: 1;
    }
}

/* ── TOC Box ─────────────────────────────────────────────────── */
.toc {
    /* Override global nav { display:flex } */
    display: block !important;
    max-width: unset;
    justify-content: unset;
    align-items: unset;

    background: var(--bg-light);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 0;
    overflow: hidden;
}

/* details/summary toggle */
.toc-details {
    padding: 1.1rem 1.25rem;
}

.toc-details summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dark);
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.1rem;
    user-select: none;
    min-height: 44px;
    /* Override nav-inherited flex properties */
    position: static;
}
.toc-details summary::-webkit-details-marker { display: none; }
.toc-details summary::marker { content: ''; }

.toc-arrow {
    font-size: 1rem;
    transition: transform 0.2s;
    line-height: 1;
}
.toc-details[open] .toc-arrow {
    transform: rotate(-180deg);
}

/* On desktop: hide the toggle arrow, keep header visible */
@media (min-width: 961px) {
    .toc-details summary {
        cursor: default;
        pointer-events: none;
    }
    .toc-arrow {
        display: none;
    }
    /* Sticky on desktop */
    .toc {
        position: sticky;
        top: 80px;
    }
}

/* TOC list */
.toc ul {
    display: block !important;
    list-style: none;
    padding: 0.4rem 0 0;
    margin: 0;
    /* Override nav ul flex */
    flex-direction: unset;
    gap: 0;
    position: static;
    background: none;
    box-shadow: none;
    border: none;
}

.toc li {
    padding: 0 !important;
    color: inherit;
    border: none !important;
}
.toc li::before {
    display: none !important;
}

.toc a {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 0.3rem 0.5rem;
    margin: 0.1rem 0;
    border-radius: var(--radius-sm);
    border: none !important;
    transition: background 0.15s, color 0.15s, padding-left 0.15s;
    min-height: 36px;
    display: flex;
    align-items: center;
}
.toc a:hover {
    color: var(--primary);
    background: rgba(74,144,226,.08);
    text-decoration: none;
    padding-left: 0.8rem;
}
.toc a.toc-active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(74,144,226,.1);
}

/* ── Content Sections ────────────────────────────────────────── */
.section {
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .section {
        margin-bottom: 4rem;
    }
}

.section-alt {
    background: var(--bg-light);
    padding: 3rem 0;
    margin: 3rem 0;
}

@media (min-width: 768px) {
    .section-alt {
        padding: 4rem 0;
        margin: 4rem 0;
    }
}

/* ── Alternating tinted sections ────────────────────────────── */
article section.section:nth-of-type(even),
.article-body section.section:nth-of-type(even) {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

@media (min-width: 768px) {
    article section.section:nth-of-type(even),
    .article-body section.section:nth-of-type(even) {
        padding: 2rem;
    }
}

/* ── Blockquote ──────────────────────────────────────────────── */
blockquote {
    border-left: 4px solid var(--primary);
    padding: 0.75rem 1.5rem;
    margin: 1.75rem 0;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-dark);
    background: var(--bg-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
blockquote p {
    margin-bottom: 0;
    color: inherit;
}

/* ── Pull Quote utility ──────────────────────────────────────── */
.pull-quote {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-dark);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    line-height: 1.5;
    background: #FDF0F3;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.pull-quote p {
    margin-bottom: 0;
    color: inherit;
}

/* clearfix for floated images */
.section::after {
    content: '';
    display: table;
    clear: both;
}

/* ── Cards (mobile-first: single column) ────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin: 1.5rem 0;
}

@media (min-width: 600px) {
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
        gap: 1.5rem;
    }
}

.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.card h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* Alternating card accent colors */
.card-grid .card:nth-child(3n+2) {
    border-top-color: var(--accent);
}
.card-grid .card:nth-child(3n+2) h3 {
    color: var(--accent);
}
.card-grid .card:nth-child(3n) {
    border-top-color: var(--success);
}
.card-grid .card:nth-child(3n) h3 {
    color: #2a8a60;
}

.card-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* ── Page / Section Images ───────────────────────────────────── */
.page-image-wrap {
    margin: 0 0 1.5rem;
}

.page-image {
    width: 100%;
    height: 220px;
    border-radius: var(--radius-md);
    margin: 0;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .page-image { height: 340px; }
}

.image-caption {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: right;
    margin: 0.35rem 0 0;
    font-style: italic;
}

.image-caption a {
    color: var(--text-light);
}

.section-image-right,
.section-image-left {
    width: 100%;
    border-radius: var(--radius-md);
    margin: 1rem 0 1.5rem;
}

@media (min-width: 600px) {
    .section-image-right {
        float: right;
        width: 44%;
        margin: 0 0 1.5rem 2rem;
    }
    .section-image-left {
        float: left;
        width: 44%;
        margin: 0 2rem 1.5rem 0;
    }
}

/* ── Callout Boxes ───────────────────────────────────────────── */
.callout {
    background: var(--bg-light);
    border-left: 4px solid var(--primary);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.callout.warning  { border-left-color: var(--warning);  background: #FFF5E6; }
.callout.success  { border-left-color: var(--success);  background: #EDF7F1; }
.callout.important { border-left-color: var(--accent);  background: #FDF0F3; }

.callout h2,
.callout h3,
.callout h4 {
    margin-top: 0;
    color: var(--text-dark);
}
.callout h2 { font-size: 1.35rem; }
.callout h3 { font-size: 1.1rem; }
.callout h4 { font-size: 1rem; }

/* ── Lists ───────────────────────────────────────────────────── */
.content-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.2rem;
}
.content-list li {
    padding: 0.4rem 0 0.4rem 1.6rem;
    position: relative;
    color: var(--text-light);
    line-height: 1.6;
}
.content-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    background-color: var(--primary);
    border-radius: 50%;
    margin-top: 0.05em; /* optical centering */
}

/* ── Myth Cards ─────────────────────────────────────────────── */
.myth-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-sm);
}
.myth-card .myth {
    background: #FFE5E5;
    color: #C62828;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-bottom: 0.9rem;
}
.myth-card .myth::before   { content: "❌ MYTH: ";    font-weight: 700; }
.myth-card .reality {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.myth-card .reality::before { content: "✓ REALITY: "; font-weight: 700; }
.myth-card .explanation {
    margin-top: 1rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ── References ─────────────────────────────────────────────── */
.reference {
    font-size: 0.88rem;
    color: var(--text-light);
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    text-indent: -1.5rem;
}
.reference a { word-break: break-word; }

/* ── Stat highlight ─────────────────────────────────────────── */
.stat-highlight {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    display: block;
    margin-bottom: 0.25rem;
}

/* ── Section label pill ─────────────────────────────────────── */
.section-label {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    background: rgba(74,144,226,.1);
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    margin-bottom: 0.4rem;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
    background: var(--text-dark);
    color: #fff;
    padding: 2.5rem 1.25rem;
    margin-top: 3rem;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 600px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    footer {
        padding: 3rem 2rem;
    }
}
.footer-section h4 {
    color: #fff;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.9rem;
}
.footer-section a {
    color: rgba(255,255,255,.7);
    display: block;
    margin: 0.35rem 0;
    font-size: 0.875rem;
    transition: color 0.2s;
    min-height: 28px;
}
.footer-section a:hover {
    color: #fff;
    text-decoration: none;
}
.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.45);
    font-size: 0.82rem;
}

/* ── Back to Top ─────────────────────────────────────────────── */
#back-to-top {
    position: fixed;
    bottom: 1.75rem;
    right: 1.5rem;
    z-index: 900;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.25s, transform 0.25s, background 0.15s;
}
#back-to-top.btt-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
#back-to-top:hover {
    background: var(--primary-dark);
}

/* ── Search Button ───────────────────────────────────────────── */
.nav-btns {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-dark);
    padding: 0.4rem;
    min-width: 44px;
    min-height: 44px;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.search-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

/* On desktop stacked header (index.php), pin search to top-right */
@media (min-width: 900px) {
    .header-stacked .nav-btns {
        position: absolute;
        top: 1.1rem;
        right: 2rem;
    }
}

/* ── Search Modal ─────────────────────────────────────────────── */
#search-modal {
    border: none;
    border-radius: var(--radius-lg);
    padding: 0;
    width: min(580px, 94vw);
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    position: fixed;
    top: 10vh;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}
#search-modal[open] {
    display: flex;
    flex-direction: column;
}
#search-modal::backdrop {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}
.search-modal-inner {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 80vh;
}
.search-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 0;
    flex-shrink: 0;
}
.search-modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: default;
}
.search-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s;
}
.search-close-btn:hover {
    color: var(--text-dark);
    background: var(--bg-light);
}
.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.85rem;
    background: var(--bg-light);
    transition: border-color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.search-input-wrap:focus-within {
    border-color: var(--primary);
    background: var(--bg-white);
}
.search-input-wrap svg {
    flex-shrink: 0;
    color: var(--text-light);
}
#search-input {
    border: none;
    background: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-dark);
    width: 100%;
    font-family: inherit;
}
#search-input::placeholder {
    color: var(--text-light);
}
#search-results {
    overflow-y: auto;
    padding: 0 0.75rem 1rem;
    flex: 1;
}
.search-result {
    display: block;
    padding: 0.8rem 0.75rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--divider);
    transition: background 0.1s;
}
.search-result:last-child {
    border-bottom: none;
}
.search-result:hover,
.search-result:focus {
    background: var(--bg-light);
    outline: none;
}
.search-result-title {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}
.search-result-snippet {
    font-size: 0.84rem;
    color: var(--text-light);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.search-result mark {
    background: rgba(74, 144, 226, 0.18);
    color: var(--primary-dark);
    border-radius: 2px;
    padding: 0 1px;
    font-style: normal;
}
.search-no-results,
.search-hint {
    text-align: center;
    color: var(--text-light);
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

/* ── Utility ─────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-2        { margin-top: 2rem; }
.mb-2        { margin-bottom: 2rem; }
.highlight {
    background: linear-gradient(180deg, transparent 60%, #FFE082 60%);
    padding: 0 0.2rem;
}
