/* ELI5 Park - brand theme for the topic pages.
   Every topic page still carries its own inline <style>; this file loads after it and
   pulls the shared pieces (background, type, headings, cards, links) onto one look.
   Page-specific demo colors are left alone on purpose. */

html body {
    font-family: var(--ep-font-body);
    color: var(--ep-ink);
    background:
        radial-gradient(900px 420px at 92% -120px, #fff1c2 0%, rgba(255, 241, 194, 0) 70%),
        radial-gradient(700px 380px at -10% 0, #d8f6e6 0%, rgba(216, 246, 230, 0) 70%),
        linear-gradient(180deg, #e3f4ff 0, #f3faff 420px, #fbfdff 100%);
    background-attachment: scroll;
    min-height: 100vh;
}

html body .container { padding: 28px 18px 8px; }

/* Rounded, friendly type everywhere (demo canvases keep their own fonts). */
html body button,
html body input,
html body select,
html body textarea { font-family: var(--ep-font-body); }

html body h1,
html body h2,
html body h3 { font-family: var(--ep-font-display); font-weight: 600; letter-spacing: -.005em; }

/* Page title + subtitle used to be white text on a dark gradient. */
html body .container > h1,
html body h1 {
    color: var(--ep-ink);
    text-shadow: none;
    font-size: clamp(30px, 4.6vw, 46px);
    line-height: 1.15;
    margin: 6px 0 10px;
}
html body .subtitle {
    color: var(--ep-ink-soft);
    font-size: clamp(16px, 2vw, 19px);
    font-weight: 600;
}

/* Breadcrumbs (the old in-page "🏠 ELI5 Park / Topic" row). */
html body .header-nav {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin: 0 0 18px; padding: 0; background: none; font-size: 15px; font-weight: 700;
}
html body .header-nav a {
    color: var(--ep-green-dark) !important; text-decoration: none; font-size: 15px;
    background: #fff; padding: 6px 12px; border-radius: 999px; box-shadow: 0 0 0 1.5px var(--ep-line) inset;
}
html body .header-nav a:hover { box-shadow: 0 0 0 2px var(--ep-green) inset; }
html body .header-nav span { color: var(--ep-muted) !important; font-size: 15px; }

/* Group headings on the section pages. */
html body .phase-title,
html body .section-title {
    color: var(--ep-ink);
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--ep-shadow);
    border-left: 8px solid var(--ep-sun);
    text-align: left;
    padding: 14px 20px;
    font-size: clamp(20px, 2.6vw, 26px);
}

/* Topic cards. */
html body .topic-card,
html body .doc-card {
    border-radius: 22px;
    box-shadow: var(--ep-shadow);
    border-left: 0; border-right: 0; border-bottom: 0;
}
html body .topic-card:hover,
html body .doc-card:hover {
    transform: translateY(-5px) rotate(-.4deg);
    box-shadow: 0 2px 0 rgba(31, 42, 68, .06), 0 20px 40px -14px rgba(31, 42, 68, .3);
}
html body .topic-card h2,
html body .doc-card h2 { color: var(--ep-ink); }
html body .topic-card p,
html body .doc-card p { color: var(--ep-ink-soft); }

/* Story boxes and other white panels: same soft card everywhere. */
html body .story-box,
html body .intro-box,
html body .disclaimer,
html body .recipe-card,
html body .section-card {
    border-radius: 24px;
    box-shadow: var(--ep-shadow);
    border: 1px solid rgba(31, 42, 68, .05);
}
html body .story-box p,
html body .story-box li { color: #2f3a55; }
html body .demo-area { border-radius: 24px; }

/* Bottom "← Back to ..." links sat on the dark gradient. */
html body .back-link { margin-top: 36px; }
html body .back-link a {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--ep-green-dark) !important; font-weight: 800; font-size: 17px;
    background: #fff; padding: 10px 20px; border-radius: 999px;
    box-shadow: 0 0 0 2px var(--ep-line) inset; text-decoration: none;
}
html body .back-link a:hover { box-shadow: 0 0 0 2px var(--ep-green) inset; }

/* Odds and ends that were tuned for dark backgrounds. */
html body .stat-box,
html body .book-section { background: #fff; box-shadow: var(--ep-shadow); }
html body .stat-box p,
html body .book-section p { color: var(--ep-ink-soft); }
html body .book-section h3 { color: var(--ep-ink); }
html body .nav-links a { color: var(--ep-green-dark); }
html body .emoji-row { color: var(--ep-ink); }
html body .container > p:not([class]),
html body .container > .container-note { color: var(--ep-ink-soft); }

@media (max-width: 768px) {
    html body .container { padding: 20px 14px 4px; }
}
