/* ==========================================================================
   SimpleMoney — Design tokens
   ========================================================================== */
/* Font loading moved to <link> tags in includes/header.php (with
   preconnect) instead of @import here — @import blocks the browser from
   discovering the font request until after this whole stylesheet is
   parsed, adding a serial round-trip to every page load. */

:root {
    --navy: #16233D;
    --navy-light: #24365C;
    --marigold: #E8A33D;
    --marigold-dark: #C6842A;
    /* Darker than --marigold-dark specifically for text on light
       backgrounds — --marigold-dark on white measures ~3.1:1 contrast
       (fails WCAG AA's 4.5:1 for normal text), while this measures ~5.2:1.
       Keep using --marigold-dark for borders/icons/large UI elements
       (3:1 is the correct threshold there); use this for body-size text. */
    --marigold-text: #9C5F1C;
    --paper: #FAF8F3;
    --paper-line: #E4DFD3;
    --charcoal: #2B2A28;
    --charcoal-soft: #5C594F;
    --green-gain: #2F7A4D;

    --font-display: 'Fraunces', serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --max-width: 1120px;
    --radius: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--charcoal);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--navy);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--marigold-text); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--marigold);
    outline-offset: 2px;
}

/* Reading progress bar — shown only on article pages ($showReadingProgress
   in blog-post.php). Tracks scroll progress through .post-article
   specifically (not the whole page including "What to Read Next"/footer),
   so it actually reflects progress through the article. */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 998;
    background: transparent;
}
.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--marigold);
}
@media (prefers-reduced-motion: no-preference) {
    .reading-progress-bar { transition: width 0.1s ease-out; }
}

/* Skip link — invisible until keyboard-focused, lets keyboard/screen-reader
   users jump straight past the header nav to the page's actual content. */
.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    background: var(--navy);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius);
    z-index: 1000;
    transition: top 0.15s ease;
}
.skip-link:focus {
    top: 12px;
    color: #fff;
}

/* Visually hidden but still readable by screen readers — for labels that
   would be visually redundant (icons with obvious meaning, form fields
   whose purpose is clear from a placeholder alone) but still need an
   accessible name for assistive tech. Also doubles as the honeypot
   fields' hiding mechanism, since position:absolute + clip keeps them out
   of both sighted and keyboard/screen-reader flow. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Ledger-line signature: a ruled underline beneath section headings,
   evoking a bank passbook without being literal about it. */
.section-heading {
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 32px;
}
.section-heading::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 64px; height: 3px;
    background: var(--marigold);
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
    background: var(--navy);
    border-bottom: 3px solid var(--marigold);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}
.logo svg { flex-shrink: 0; }
.logo:hover { color: var(--marigold); }
.main-nav { display: flex; gap: 28px; }
.nav-link {
    color: #D8DEEA;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.nav-link:hover, .nav-link.active {
    color: #fff;
    border-bottom-color: var(--marigold);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    background: var(--navy);
    color: #fff;
    padding: 72px 0 88px;
    background-image:
        repeating-linear-gradient(to bottom, transparent, transparent 39px, rgba(255,255,255,0.045) 40px);
    position: relative;
    overflow: hidden;
}
.hero-decoration {
    position: absolute;
    right: -20px;
    bottom: -10px;
    opacity: 0.5;
    pointer-events: none;
}
@media (max-width: 900px) {
    .hero-decoration { display: none; }
}
.hero h1 { color: #fff; max-width: 640px; }
.hero p.lede {
    max-width: 560px;
    font-size: 1.15rem;
    color: #C7CEDD;
    margin-top: 18px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.hero-actions .btn { margin-top: 0; }
.btn-outline-light {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.3);
    color: #fff;
}
.btn-outline-light:hover {
    border-color: var(--marigold);
    background: transparent;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 13px 28px;
    border-radius: var(--radius);
    background: var(--marigold);
    color: var(--navy);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
    background: #F0B65C;
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(232, 163, 61, 0.35);
}
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--paper-line);
    color: var(--navy);
}
.btn-outline:hover {
    border-color: var(--marigold);
    background: transparent;
    box-shadow: 0 8px 20px rgba(22, 35, 61, 0.1);
}

/* ==========================================================================
   Cards / Grid (blog listing, feature highlights)
   ========================================================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}
.card {
    background: #fff;
    border: 1px solid var(--paper-line);
    border-radius: var(--radius);
    padding: 26px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: 0 8px 24px rgba(22,35,61,0.08); transform: translateY(-2px); }
.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(232, 163, 61, 0.14);
    color: var(--marigold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.card .eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--marigold-text);
    display: block;
    margin-bottom: 10px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--charcoal-soft); font-size: 0.95rem; }
.card .read-more {
    display: inline-block;
    margin-top: 14px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
    transition: letter-spacing 0.15s ease, color 0.15s ease;
}
.card:hover .read-more { color: var(--marigold-text); letter-spacing: 0.02em; }

section { padding: 64px 0; }
section.alt { background: #fff; border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }

/* ==========================================================================
   Page heading icon — the small circular icon next to an H1 on calculator
   pages (reuses the same renderIcon() set as .card-icon, just larger).
   ========================================================================== */
.page-heading-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 6px;
}
.page-heading-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(232, 163, 61, 0.14);
    color: var(--marigold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.page-heading-row h1 { margin: 0; }

/* ==========================================================================
   Calculator (EMI etc.)
   ========================================================================== */
.calculator {
    background: #fff;
    border: 1px solid var(--paper-line);
    border-radius: var(--radius);
    padding: 36px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
@media (max-width: 720px) {
    .calculator { grid-template-columns: 1fr; }
}
.calc-field { margin-bottom: 22px; }
.calc-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.calc-label-row label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy);
}
.calc-field input[type="range"] {
    width: 100%;
    accent-color: var(--marigold);
}
/* The editable amount next to each slider — lets you type an exact figure
   (e.g. ₹18,500) instead of fighting a slider's step size for precision. */
.value-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.value-input-group .unit {
    font-family: var(--font-mono);
    color: var(--charcoal-soft);
    font-size: 0.85rem;
}
.value-input {
    font-family: var(--font-mono);
    color: var(--navy);
    font-weight: 700;
    font-size: 0.95rem;
    border: 1.5px solid var(--paper-line);
    border-radius: 4px;
    padding: 5px 8px;
    width: 96px;
    text-align: right;
    background: #fff;
    transition: border-color 0.15s ease;
}
.value-input:focus {
    border-color: var(--marigold);
    outline: none;
}
/* Hide the native spinner arrows — the slider is the "click to nudge"
   control, this input is for typing an exact number. */
.value-input::-webkit-outer-spin-button,
.value-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.value-input[type="number"] { -moz-appearance: textfield; }
.calc-results {
    background: var(--navy);
    color: #fff;
    border-radius: var(--radius);
    padding: 28px;
}
.calc-results .result-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    font-size: 0.95rem;
}
.calc-results .result-row:last-child { border-bottom: none; }
.calc-results .result-row .figure {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.1rem;
}
.calc-results .result-row.total .figure { color: var(--marigold); font-size: 1.3rem; }

/* "How it works"/FAQ explanation + Related Articles/Tools blocks under
   each calculator — reuses .post-body typography and .grid/.card layout
   so a calculator page reads consistently with a blog article. */
.calculator-explanation { margin-top: 48px; }
.related-content-block { margin-top: 48px; }
.related-content-block .section-heading { margin-bottom: 24px; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs { margin-bottom: 18px; }
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 6px;
    font-size: 0.85rem;
}
.breadcrumbs li { display: flex; align-items: center; gap: 6px; color: var(--charcoal-soft); }
.breadcrumbs li:not(:last-child)::after { content: "/"; color: var(--paper-line); margin-left: 6px; }
.breadcrumbs a { color: var(--charcoal-soft); text-decoration: underline; text-decoration-color: var(--paper-line); }
.breadcrumbs a:hover { color: var(--marigold-text); text-decoration-color: var(--marigold-text); }
.breadcrumbs [aria-current="page"] { color: var(--navy); font-weight: 600; }

/* ==========================================================================
   Blog post page layout (blog-post.php)
   ========================================================================== */
.post-article { max-width: 760px; padding-top: 48px; padding-bottom: 64px; }
.preview-banner {
    background: var(--marigold);
    color: var(--navy);
    text-align: center;
    padding: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}
.preview-banner a { color: var(--navy); text-decoration: underline; }
.affiliate-note {
    font-size: 0.85rem;
    color: var(--charcoal-soft);
    margin-top: 28px;
    border-top: 1px solid var(--paper-line);
    padding-top: 16px;
}
.post-newsletter { margin-top: 32px; }
.back-link { margin-top: 40px; }

/* ==========================================================================
   Blog post body — headings, lists, tables within article content
   ========================================================================== */
.post-body { font-size: 1.05rem; line-height: 1.8; color: var(--charcoal); }
.post-body h2 { margin-top: 36px; margin-bottom: 14px; font-size: 1.5rem; }
.post-body h3 { margin-top: 28px; margin-bottom: 12px; }
.post-body p { margin-bottom: 16px; }
.post-body ul, .post-body ol { margin: 0 0 16px 22px; }
.post-body li { margin-bottom: 6px; }
.post-body strong { color: var(--navy); }
.post-body a { text-decoration: underline; text-decoration-color: var(--paper-line); }
.post-body a:hover { text-decoration-color: var(--marigold-dark); }
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 24px;
    background: #fff;
    font-size: 0.92rem;
    /* Data tables (salary/EMI breakdowns etc.) are often wider than a phone
       screen. display:block lets the table itself become a horizontally
       scrollable container instead of overflowing the page and breaking
       the layout, without needing to wrap every table in post content. */
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.post-body th, .post-body td {
    border: 1px solid var(--paper-line);
    padding: 10px 14px;
    text-align: left;
}
.post-body th {
    background: var(--navy);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.post-body table + h3 { margin-top: 28px; }

/* Blockquote / pull-quote — for a standout stat or quote inside an article */
.post-body blockquote {
    margin: 28px 0;
    padding: 4px 0 4px 22px;
    border-left: 3px solid var(--marigold);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--navy);
    line-height: 1.5;
}
/* Callout / tip box — wrap a paragraph in <div class="tip">...</div> in
   post content to highlight a key takeaway or warning */
.post-body .tip, .post-body .callout {
    background: #FBF3E7;
    border: 1px solid var(--marigold);
    border-left: 4px solid var(--marigold-dark);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 24px 0;
}
.post-body .tip p:last-child, .post-body .callout p:last-child { margin-bottom: 0; }
.post-body .tip::before {
    content: "Tip";
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--marigold-text);
    margin-bottom: 6px;
}
/* Warning box — wrap a paragraph in <div class="warning">...</div> for a
   caution/risk callout (e.g. "don't do X"), distinct from a positive Tip. */
.post-body .warning {
    background: #FBEAEA;
    border: 1px solid #C0392B;
    border-left: 4px solid #C0392B;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 24px 0;
}
.post-body .warning p:last-child { margin-bottom: 0; }
.post-body .warning::before {
    content: "Warning";
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8E2A20;
    margin-bottom: 6px;
}

/* ==========================================================================
   Legal pages (Disclaimer, Privacy Policy, Terms of Use)
   ========================================================================== */
.legal-page h2 { margin-top: 32px; margin-bottom: 10px; font-size: 1.15rem; }
.legal-page p, .legal-page li { color: var(--charcoal-soft); font-size: 0.97rem; line-height: 1.75; margin-bottom: 12px; }
.legal-page ul { margin: 0 0 14px 22px; }
.legal-page .warn-box {
    background: #FBF3E7;
    border: 1.5px solid var(--marigold);
    border-left: 4px solid var(--marigold-dark);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 28px;
}
.legal-page .warn-box p { color: var(--navy); font-weight: 600; margin: 0; }
.legal-page .lawyer-note {
    margin-top: 32px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--paper-line);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--charcoal-soft);
}

/* ==========================================================================
   Forms (contact page)
   ========================================================================== */
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--navy); }
.form-field input, .form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--paper-line);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: #fff;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--charcoal-soft); margin-top: 4px; }
.alert-success {
    background: #E9F5EC; border: 1px solid var(--green-gain);
    color: #1E5C36; padding: 16px 20px; border-radius: var(--radius); margin-bottom: 24px;
}
.alert-error {
    background: #FBEAEA; border: 1px solid #C0392B;
    color: #8E2A20; padding: 16px 20px; border-radius: var(--radius); margin-bottom: 24px;
}

/* ==========================================================================
   Contact page layout — form + info sidebar
   ========================================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}
@media (max-width: 720px) {
    .contact-layout { grid-template-columns: 1fr; }
}
.contact-sidebar { display: flex; flex-direction: column; gap: 16px; }
.contact-info-card {
    background: #fff;
    border: 1px solid var(--paper-line);
    border-radius: var(--radius);
    padding: 18px 20px;
}
.contact-info-card h4 { color: var(--navy); font-size: 0.92rem; margin-bottom: 5px; }
.contact-info-card p { color: var(--charcoal-soft); font-size: 0.85rem; line-height: 1.55; }
.contact-response {
    background: #E9F5EC;
    border: 1px solid var(--green-gain);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #1E5C36;
}

/* ==========================================================================
   Newsletter signup — the real growth/monetization engine
   ========================================================================== */
.newsletter-box {
    background: var(--navy);
    color: #fff;
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid var(--navy-light);
}
.newsletter-box h3 { color: #fff; margin-bottom: 8px; }
.newsletter-box p { color: #C7CEDD; font-size: 0.92rem; margin-bottom: 18px; }
.newsletter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--navy-light);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

/* ==========================================================================
   Ad slot placeholders — swap the inner comment for your AdSense <ins> tag
   ========================================================================== */
.ad-slot {
    background: repeating-linear-gradient(45deg, #F0EDE3, #F0EDE3 10px, #E9E5D8 10px, #E9E5D8 20px);
    border: 1px dashed var(--paper-line);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--charcoal-soft);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-height: 100px;
    margin: 8px 0;
}
.ad-slot-container { min-height: 100px; margin: 8px 0; overflow: hidden; }

/* ==========================================================================
   Footer — brand + description, Explore, Legal, then a single disclaimer
   + copyright block. Flat navy (no gradient banding) with one marigold
   top border — kept deliberately simple rather than busy.
   ========================================================================== */
.site-footer {
    background: var(--navy);
    color: #C7CEDD;
    margin-top: 56px;
    border-top: 3px solid var(--marigold);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 40px;
    padding: 56px 24px 40px;
}
@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 14px;
}
.footer-logo:hover { color: var(--marigold); }
.footer-brand p {
    color: #A8B1C4;
    font-size: 0.9rem;
    line-height: 1.65;
    max-width: 320px;
}
.footer-col h4 {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a {
    color: #A8B1C4;
    font-size: 0.92rem;
    transition: color 0.15s ease, padding-left 0.15s ease;
}
.footer-col a:hover { color: var(--marigold); padding-left: 3px; }
.footer-legal {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px;
}
.footer-disclaimer {
    max-width: 820px;
    line-height: 1.6;
    color: #8791A8;
    font-size: 0.78rem;
    margin-bottom: 16px;
}
.footer-disclaimer strong { color: #B7BFD1; }
.footer-bottom {
    font-size: 0.82rem;
    color: #8994AA;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

/* ==========================================================================
   Category cover illustrations — flat vector "images" (icon + tinted panel)
   used on blog cards, category chips, and article hero banners in place of
   stock photography. See includes/icons.php renderCategoryCover().
   ========================================================================== */
.card { position: relative; overflow: hidden; }
.card-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.card > .card-cover:first-child,
a.card > .card-cover:first-child {
    margin: -26px -26px 20px -26px;
}
.card-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(-45deg, transparent, transparent 16px, rgba(22,35,61,0.05) 16px, rgba(22,35,61,0.05) 17px);
}
.card-cover::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 36%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.07));
    pointer-events: none;
}
.card-cover-scene {
    position: relative;
    width: 72%;
    max-width: 190px;
    height: auto;
    transition: transform 0.25s ease;
}
.card:hover .card-cover-scene { transform: scale(1.06); }
.cover-marigold { background: linear-gradient(135deg, #FBEBD1, #F3D3A0); }
.cover-green { background: linear-gradient(135deg, #DFF0E3, #BEE0C9); }
.cover-navy { background: linear-gradient(135deg, #E3E8F1, #C9D3E6); }

/* ==========================================================================
   Section intro copy — a short muted line under a .section-heading
   ========================================================================== */
.section-intro {
    color: var(--charcoal-soft);
    max-width: 620px;
    margin-top: -18px;
    margin-bottom: 32px;
    font-size: 1.02rem;
}

/* ==========================================================================
   Category filter chips (blog listing)
   ========================================================================== */
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}
.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1.5px solid var(--paper-line);
    background: #fff;
    color: var(--charcoal-soft);
    font-size: 0.88rem;
    font-weight: 600;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.category-chip:hover { border-color: var(--marigold); color: var(--navy); }
.category-chip.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.category-chip .count { opacity: 0.65; font-family: var(--font-mono); font-size: 0.78rem; }

/* ==========================================================================
   Homepage category highlights strip
   ========================================================================== */
.category-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}
.category-strip-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--paper-line);
    border-radius: var(--radius);
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.category-strip-item:hover {
    box-shadow: 0 8px 24px rgba(22,35,61,0.08);
    transform: translateY(-2px);
    border-color: var(--marigold);
}
.category-strip-item .card-icon { margin-bottom: 0; }
.category-strip-item h4 { color: var(--navy); font-size: 1rem; }
.category-strip-item span.count { color: var(--charcoal-soft); font-size: 0.82rem; }

/* ==========================================================================
   "Editor's pick" / "Popular" badge — small marigold pill on a featured card
   ========================================================================== */
.badge-pick {
    display: inline-block;
    background: var(--marigold);
    color: var(--navy);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.badge-pick-inline { margin-left: 8px; margin-bottom: 0; vertical-align: middle; }

/* ==========================================================================
   Homepage "Featured Articles" — 2 large cards side by side, stacking on
   narrower screens (its own grid so it doesn't inherit the 280px auto-fit
   minimum from .grid, which would let them shrink too aggressively)
   ========================================================================== */
.grid-featured {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* ==========================================================================
   "Editor's Picks" reading list — a compact numbered list, deliberately a
   different shape from the card grids elsewhere on the page for visual
   rhythm as you scroll.
   ========================================================================== */
.pick-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--paper-line);
    border-radius: var(--radius);
    overflow: hidden;
}
.pick-item {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    padding: 18px 22px;
    transition: background 0.15s ease, padding-left 0.15s ease;
}
.pick-item:hover { background: #FBF8F1; padding-left: 28px; }
.pick-number {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--paper-line);
    font-weight: 600;
    flex-shrink: 0;
    width: 24px;
}
.pick-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pick-thumb.cover-marigold { color: var(--marigold-dark); }
.pick-thumb.cover-green { color: #1E6B3E; }
.pick-thumb.cover-navy { color: var(--navy); }
.pick-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick-copy .eyebrow { margin: 0; }
.pick-title {
    font-family: var(--font-display);
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pick-arrow { color: var(--marigold-text); font-weight: 600; flex-shrink: 0; }
@media (max-width: 560px) {
    .pick-thumb { display: none; }
}

/* ==========================================================================
   Related Finance Tool callout (blog posts)
   ========================================================================== */
.related-tool-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--navy);
    color: #fff;
    border-radius: var(--radius);
    padding: 26px 28px;
    margin: 40px 0;
}
.related-tool-box .card-icon {
    background: rgba(232, 163, 61, 0.22);
    color: var(--marigold);
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    margin-bottom: 0;
}
.related-tool-box .related-tool-copy { flex: 1; min-width: 200px; }
.related-tool-box .eyebrow { color: var(--marigold); font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 4px; }
.related-tool-box h4 { color: #fff; margin-bottom: 4px; }
.related-tool-box p { color: #C7CEDD; font-size: 0.9rem; }
@media (max-width: 560px) {
    .related-tool-box { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Article hero — category cover banner + meta above a blog post's title
   ========================================================================== */
.post-hero {
    border-radius: var(--radius);
    margin-bottom: 28px;
}
.post-hero .card-cover-scene { max-width: 220px; }
.post-eyebrow {
    font-family: var(--font-mono);
    color: var(--marigold-text);
    text-transform: uppercase;
    font-size: 0.8rem;
}
.post-title { margin-top: 12px; margin-bottom: 10px; }
.post-byline {
    color: var(--charcoal-soft);
    font-size: 0.88rem;
    margin-bottom: 28px;
}
.post-byline a { text-decoration: underline; text-decoration-color: var(--paper-line); }

/* ==========================================================================
   Scroll-reveal — sections fade/slide in as they enter the viewport.
   Content is fully visible by default (no FOUC, works with JS disabled);
   assets/js/main.js adds .js-reveal-ready only once it has confirmed
   IntersectionObserver support and wired up the observer.
   ========================================================================== */
.reveal { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s ease; }
.js-reveal-ready .reveal { opacity: 0; transform: translateY(18px); }
.js-reveal-ready .reveal.is-visible { opacity: 1; transform: none; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
