/* ===== THE SILVER LINING CURE — SITE STYLES ===== */

:root {
    --storm: #2e3440;
    --storm-mid: #3b4252;
    --silver: #d8dee9;
    --silver-light: #eceff4;
    --gold: #e8b931;
    --gold-soft: #fdf3d4;
    --sky: #5e9ccd;
    --sky-light: #dce9f5;
    --teal: #38ada9;
    --teal-light: #dff5f4;
    --purple: #6c5ce7;
    --purple-light: #ede9fc;
    --warm-bg: #faf8f4;
    --white: #ffffff;
    --text: #2e3440;
    --text-mid: #4c566a;
    --text-light: #7b8794;
    --shadow: 0 2px 12px rgba(0,0,0,0.07);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --radius: 10px;
    --content-width: 740px;
    --wide-width: 960px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--warm-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ===== NAV ===== */
.site-nav {
    position: sticky; top: 0; z-index: 100;
    background: var(--storm);
    color: var(--silver);
    padding: 12px 24px;
    font-size: 0.88em;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav-home {
    color: var(--silver-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}
.nav-home:hover { color: var(--gold); }
.nav-sep { opacity: 0.4; }
.nav-current { opacity: 0.7; }

/* ===== PAGE HERO ===== */
.page-hero {
    padding: 60px 24px 48px;
    text-align: center;
    color: var(--white);
}
.hero-inner { max-width: var(--wide-width); margin: 0 auto; }
.hero-label {
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.7;
    margin-bottom: 10px;
}
.page-hero h1 {
    font-size: 2.2em;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 10px;
}
.hero-sub {
    font-size: 1.05em;
    opacity: 0.8;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

.hero-book1 { background: linear-gradient(135deg, #e58e26, #f6b93b 50%, #f8c95a); }
.hero-book2 { background: linear-gradient(135deg, #1a7a76, #38ada9 50%, #4fc3bf); }
.hero-book3 { background: linear-gradient(135deg, #3d2d8f, #6c5ce7 50%, #8b7ff0); }
.hero-book4 { background: linear-gradient(135deg, #2d3436, #4a6fa5 50%, #6889b8); }
.hero-bible { background: linear-gradient(135deg, #92700c, #c9a227 50%, #e8b931); }
.hero-parent { background: linear-gradient(135deg, #18635f, #38ada9 50%, #4fc3bf); }
.hero-clinician { background: linear-gradient(135deg, #3d2d8f, #6c5ce7 50%, #8b7ff0); }

/* ===== CONTENT AREA ===== */
.content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
}
.content.wide { max-width: var(--wide-width); }

/* ===== MARKDOWN RENDERED STYLES ===== */
.content h1 {
    font-size: 1.9em;
    font-weight: 700;
    margin: 48px 0 20px;
    color: var(--storm);
    line-height: 1.25;
}
.content h1:first-child { margin-top: 0; }

.content h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin: 52px 0 18px;
    padding-top: 32px;
    border-top: 2px solid var(--silver);
    color: var(--storm);
    line-height: 1.3;
}
.content h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.content h3 {
    font-size: 1.2em;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--storm-mid);
}

.content h4 {
    font-size: 1.05em;
    font-weight: 600;
    margin: 24px 0 10px;
    color: var(--text-mid);
}

.content p {
    margin: 0 0 16px;
    color: var(--text);
}

.content strong { font-weight: 600; }
.content em { font-style: italic; }

.content ul, .content ol {
    margin: 0 0 16px;
    padding-left: 28px;
}
.content li { margin-bottom: 6px; }
.content li ul, .content li ol { margin-top: 6px; margin-bottom: 0; }

.content hr {
    border: none;
    height: 1px;
    background: var(--silver);
    margin: 40px 0;
}

.content a {
    color: var(--sky);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ===== READING MODE (books) ===== */
body.reading .content {
    font-family: 'Georgia', 'Palatino', 'Times New Roman', serif;
    font-size: 1.08em;
    line-height: 1.85;
}
body.reading .content h2 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    text-align: center;
    font-size: 1.6em;
    padding-top: 48px;
    margin-top: 64px;
    border-top: 3px solid var(--silver);
}
body.reading .content h3 {
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ===== TABLES ===== */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 24px;
    font-size: 0.92em;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.content thead th {
    background: var(--storm);
    color: var(--white);
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.content td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--silver-light);
    vertical-align: top;
}
.content tr:last-child td { border-bottom: none; }
.content tr:hover td { background: #f8f9fb; }

/* ===== BLOCKQUOTES — ILLUSTRATIONS ===== */
.content blockquote {
    margin: 28px 0;
    padding: 20px 24px;
    border-radius: var(--radius);
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 0.9em;
    line-height: 1.65;
}

.content blockquote.illustration {
    background: linear-gradient(135deg, #f0f4ff 0%, #f7f4ff 100%);
    border-left: 4px solid var(--purple);
    color: var(--text-mid);
}
.content blockquote.illustration strong {
    color: var(--purple);
    display: block;
    margin-bottom: 8px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 0.92em;
    letter-spacing: 0.02em;
}

.content blockquote:not(.illustration) {
    background: var(--gold-soft);
    border-left: 4px solid var(--gold);
    color: var(--text-mid);
    font-style: italic;
}

/* ===== CALLOUTS ===== */
.callout {
    margin: 24px 0;
    padding: 18px 22px;
    border-radius: var(--radius);
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 0.95em;
    line-height: 1.6;
}
.callout-breathing {
    background: #e8f6f8;
    border-left: 4px solid #3498db;
}
.callout-silver {
    background: var(--gold-soft);
    border-left: 4px solid var(--gold);
}
.callout-buddy {
    background: var(--teal-light);
    border-left: 4px solid var(--teal);
}
.callout-storm {
    background: #f0ecec;
    border-left: 4px solid #95a5a6;
}

/* ===== CODE BLOCKS ===== */
.content pre {
    background: var(--storm);
    color: var(--silver-light);
    padding: 18px 22px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.88em;
    line-height: 1.6;
    margin: 20px 0;
}
.content code {
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.9em;
}
.content p code, .content li code {
    background: var(--silver-light);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ===== FOOTER ===== */
.site-footer {
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--silver);
    color: var(--text-light);
    font-size: 0.88em;
}
.site-footer a {
    color: var(--sky);
    text-decoration: none;
    display: inline-block;
    margin-top: 8px;
}
.site-footer a:hover { text-decoration: underline; }

/* ===== TABLE OF CONTENTS ===== */
.toc {
    background: var(--white);
    border: 1px solid var(--silver);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin: 0 0 40px;
}
.toc h2 {
    font-size: 1em !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: none !important;
    color: var(--text-light) !important;
}
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--silver-light); }
.toc li:last-child { border-bottom: none; }
.toc a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.toc a:hover { color: var(--sky); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-hero { padding: 40px 16px 32px; }
    .page-hero h1 { font-size: 1.7em; }
    .content { padding: 32px 16px 60px; }
    .content h2 { font-size: 1.3em; }
    .content table { font-size: 0.85em; }
    .content td, .content th { padding: 8px 10px; }
}

/* ===== CHECKLIST STYLES ===== */
.content ul li:has(input[type="checkbox"]) { list-style: none; margin-left: -28px; }
.content input[type="checkbox"] { margin-right: 8px; }

/* ===== PRINT ===== */
@media print {
    .site-nav, .site-footer { display: none; }
    .page-hero { padding: 30px 0; }
    .content { max-width: 100%; padding: 20px 0; }
    body { background: white; }
}
