/* CFDPre docs — modern theme refinements on top of Furo. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Sora:wght@600;700;800&display=swap');

:root {
    --font-stack: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-stack--headings: "Sora", var(--font-stack);
}

h1, h2, h3, h4, .sidebar-brand {
    font-family: var(--font-stack--headings);
    letter-spacing: -0.01em;
}

.sidebar-logo {
    max-width: 78%;
    margin: 1rem auto 0.5rem auto;
}

/* A touch more breathing room and readability for the long theory page. */
article {
    line-height: 1.7;
}

/* Make block equations stand out a little. */
div.math {
    overflow-x: auto;
    padding: 0.4rem 0;
}

/* Keep wide result tables from overflowing awkwardly. */
table.docutils {
    display: block;
    overflow-x: auto;
}

/* ------------------------------------------------------------------ */
/* Landing-page hero banner                                             */
/* ------------------------------------------------------------------ */
.cfdpre-hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: -0.5rem -0.5rem 2rem -0.5rem;
    padding: 2.5rem 2.25rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #11203f 0%, #2a4d8f 45%, #00897b 100%);
    box-shadow: 0 12px 32px -16px rgba(17, 32, 63, 0.55);
}

.cfdpre-hero img {
    width: 260px;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.cfdpre-hero .cfdpre-hero-text {
    flex: 1 1 18rem;
}

.cfdpre-hero p {
    margin: 0;
    color: #eaf6f4;
    font-size: 1.15rem;
    max-width: 38rem;
}

.cfdpre-hero .cfdpre-badges {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cfdpre-hero .cfdpre-badges a {
    padding: 0.35rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.28);
    transition: background 0.15s ease, transform 0.15s ease;
}

.cfdpre-hero .cfdpre-badges a:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

/* ------------------------------------------------------------------ */
/* "Where to next" card grid                                            */
/* ------------------------------------------------------------------ */
.cfdpre-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 2rem 0;
}

.cfdpre-cards a.cfdpre-card {
    display: block;
    padding: 1.1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--color-background-border);
    background: var(--color-background-secondary);
    text-decoration: none !important;
    color: var(--color-foreground-primary) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.cfdpre-cards a.cfdpre-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-brand-primary);
    box-shadow: 0 10px 24px -16px rgba(0, 137, 123, 0.5);
}

.cfdpre-cards a.cfdpre-card strong {
    display: block;
    font-family: var(--font-stack--headings);
    font-size: 1.02rem;
    margin-bottom: 0.3rem;
    color: var(--color-brand-content);
}

.cfdpre-cards a.cfdpre-card span {
    font-size: 0.9rem;
    color: var(--color-foreground-secondary);
}
