/* ── Research section (/research) ─────────────────────────────── */
.research-main {
    max-width: 48rem;
    margin: 0 auto;
    padding: 8rem 1.5rem 5rem;
    color: var(--on-surface-variant);
    line-height: 1.75;
    font-size: 1rem;
}
.research-eyebrow {
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-fixed-dim);
    margin-bottom: 1rem;
}
.research-main h1 {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 4.5vw, 2.85rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.04em;
    color: var(--on-surface);
    margin-bottom: 1rem;
}
.research-subtitle {
    font-size: 1.15rem;
    color: var(--on-surface-variant);
    margin-bottom: 1.5rem;
}
.research-meta {
    font-family: var(--font-label);
    font-size: 0.85rem;
    color: var(--outline);
    margin-bottom: 2rem;
}
.research-note {
    border: 1px solid rgba(59, 75, 62, 0.4);
    border-left: 3px solid var(--primary-fixed-dim);
    background: var(--surface-container-low);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    font-size: 0.92rem;
    margin-bottom: 2.5rem;
}
.research-thesis {
    font-family: var(--font-headline);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--on-surface);
    margin: 2.5rem 0 1.25rem;
}
.research-thesis span { color: var(--primary-container); }
.research-main h2 {
    font-family: var(--font-headline);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--on-surface);
    margin: 3rem 0 1rem;
    scroll-margin-top: 6rem;
}
.research-main h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--on-surface);
    margin: 1.75rem 0 0.5rem;
}
.research-main p { margin-bottom: 1rem; }
.research-main strong { color: var(--on-surface); }
.research-main a { color: var(--primary-fixed-dim); text-decoration: none; }
.research-main a:hover { text-decoration: underline; }
.research-main ol, .research-main ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.research-main li { margin-bottom: 0.6rem; }
.research-main code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--surface-container-high);
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    color: var(--on-surface);
}
.research-toc {
    background: var(--surface-container-low);
    border: 1px solid rgba(59, 75, 62, 0.3);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.92rem;
}
.research-toc strong { display: block; margin-bottom: 0.5rem; font-family: var(--font-label); }
.research-toc ol { margin: 0; }
.research-toc li { margin-bottom: 0.25rem; }
.research-table-wrap { overflow-x: auto; margin: 1.25rem 0 1.5rem; }
.research-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.research-table th, .research-table td {
    text-align: left;
    vertical-align: top;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid rgba(59, 75, 62, 0.35);
}
.research-table th {
    font-family: var(--font-label);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--outline);
    background: var(--surface-container-low);
}
.research-table td:first-child { white-space: nowrap; color: var(--on-surface); font-weight: 700; }
.research-table .cls { font-family: var(--font-mono); color: var(--primary-fixed-dim); margin-right: 0.4rem; }
.research-callout {
    background: var(--surface-container);
    border: 1px solid rgba(59, 75, 62, 0.35);
    border-radius: 0.75rem;
    padding: 1.1rem 1.35rem;
    margin: 1.25rem 0;
}
.research-callout p:last-child { margin-bottom: 0; }
.research-callout-label {
    font-family: var(--font-label);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary-fixed-dim);
    display: block;
    margin-bottom: 0.4rem;
}
.research-code {
    background: var(--surface-container);
    border: 1px solid rgba(59, 75, 62, 0.35);
    border-radius: 0.75rem;
    padding: 1.1rem 1.35rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--on-surface-variant);
    margin: 1rem 0 1.5rem;
}
.research-code code { background: none; padding: 0; font-size: inherit; color: inherit; }
.research-cta {
    margin-top: 3rem;
    padding: 1.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 255, 148, 0.2);
    background: var(--surface-container-low);
}
.research-cta h2 { margin-top: 0; }
.research-cta-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.research-cta-actions a.btn { text-decoration: none; }
.research-cta-actions a.btn-primary { color: var(--on-primary-fixed); }
.research-cta-actions a.btn-outline { color: var(--on-surface); }

/* Index cards */
.research-card {
    display: block;
    background: var(--surface-container-low);
    border: 1px solid rgba(59, 75, 62, 0.35);
    border-radius: 0.75rem;
    padding: 1.5rem 1.75rem;
    margin-top: 1.5rem;
    transition: border-color 0.2s, transform 0.2s;
}
.research-main a.research-card { color: inherit; text-decoration: none; }
.research-card:hover { border-color: var(--primary-fixed-dim); transform: translateY(-2px); }
.research-card h2 { margin: 0.25rem 0 0.5rem; font-size: 1.35rem; }
.research-card p { margin-bottom: 0.5rem; }
.research-card-more { color: var(--primary-fixed-dim); font-weight: 700; font-size: 0.9rem; }

@media (max-width: 640px) {
    .research-table td:first-child { white-space: normal; }
}

/* Print / Save as PDF: renders the public page only */
@media print {
    body { background: #fff; color: #111; }
    .navbar, footer, .research-cta-actions, .research-toc { display: none; }
    .research-main { padding: 0; max-width: none; color: #111; }
    .research-main h1, .research-main h2, .research-main h3, .research-main strong,
    .research-thesis, .research-table td:first-child { color: #000; }
    .research-thesis span, .research-eyebrow, .research-table .cls { color: #00663a; }
    .research-note, .research-callout, .research-code, .research-cta, .research-table th {
        background: #f5f5f5; color: #111; border-color: #ccc;
    }
    .research-main code { background: #eee; color: #111; }
    .research-main a { color: #00663a; }
    h2, h3 { break-after: avoid; }
    .research-table, .research-code, .research-callout { break-inside: avoid; }
}
