/* ══════════════════════════════════════════════════════════════
   RICHIEST ETF PAGE — SHARED STYLESHEET
   Based on park/sgov.html

   Per-page inline <style> only needs:
     :root { --slot-color: var(--park); --slot-tint: var(--park-tint); }
     .etf-hero::before { content: "S"; }  ← first letter of ticker
   ══════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
    --ink: #0f0f0f;
    --ink-light: #3a3a3a;
    --ink-muted: #6b6b6b;
    --paper: #fafaf7;
    --paper-warm: #f4f2ec;
    --paper-mid: #ede9e0;
    --border: #ddd9ce;
    --border-mid: #c8c3b5;
    --park: #2d6a4f;
    --earn: #b5541a;
    --build: #1a3a6b;
    --roam: #5c3d8f;
    --dare: #8b1a1a;
    --park-tint: #eef5f1;
    --earn-tint: #fdf0e8;
    --build-tint: #edf1f8;
    --roam-tint: #f2eefa;
    --dare-tint: #f8eded;
    --font-display: "Playfair Display", Georgia, serif;
    --font-body: "DM Sans", system-ui, sans-serif;
    --font-mono: "DM Mono", "Courier New", monospace;
    --s1: 0.25rem;
    --s2: 0.5rem;
    --s3: 0.75rem;
    --s4: 1rem;
    --s5: 1.5rem;
    --s6: 2rem;
    --s7: 3rem;
    --s8: 4rem;
    --s9: 6rem;
    --content-width: 740px;
    --wide-width: 960px;
    --radius: 4px;
    --radius-lg: 8px;

    /* Slot color — override in each page's inline <style> */
    --slot-color: var(--park);
    --slot-tint: var(--park-tint);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.72; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--ink); }

/* ── NAV ── */
.site-nav { border-bottom: 1px solid var(--border); background: var(--paper); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: var(--wide-width); margin: 0 auto; padding: 0 var(--s5); display: flex; align-items: center; justify-content: space-between; height: 52px; position: relative; }
.nav-logo { font-family: var(--font-display); font-size: 1.25rem; font-weight: 900; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.nav-logo span { color: var(--earn); }
.nav-links { display: flex; gap: var(--s4); list-style: none; font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.nav-links a { text-decoration: none; color: var(--ink-muted); transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }
/* hamburger — hidden on desktop */
.nav-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: var(--s2); margin-right: calc(-1 * var(--s2)); }
.nav-toggle-label span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }

/* ── HERO ── */
.etf-hero { border-bottom: 1px solid var(--border); background: var(--slot-tint); padding: var(--s8) 0 var(--s7); position: relative; overflow: hidden; }
.etf-hero::before { position: absolute; right: -0.05em; top: -0.15em; font-family: var(--font-display); font-size: clamp(14rem, 22vw, 20rem); font-weight: 900; color: var(--slot-color); opacity: 0.055; line-height: 1; pointer-events: none; user-select: none; }
/* content: set per-page — first letter of ticker */
.hero-inner { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--s5); position: relative; }
.slot-number { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slot-color); margin-bottom: var(--s3); display: flex; align-items: center; gap: var(--s3); }
.slot-number::before { content: ""; display: inline-block; width: 20px; height: 2px; background: var(--slot-color); border-radius: 1px; }
.etf-hero h1 { font-family: var(--font-display); font-size: clamp(2.25rem, 5.5vw, 3.5rem); font-weight: 900; line-height: 1.08; letter-spacing: -0.04em; margin-bottom: var(--s3); }
.etf-hero h1 em { font-style: italic; color: var(--slot-color); display: block; }
.hero-fund-name { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-muted); margin-bottom: var(--s5); }
.hero-thesis { font-size: 1.0625rem; color: var(--ink-light); max-width: 540px; line-height: 1.65; margin-bottom: var(--s6); }
.frame-nav { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s5); }
.frame-nav a { padding: var(--s2) var(--s4); border-radius: 2px; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; text-decoration: none; transition: all 0.15s; }
.frame-nav a.current { background: var(--slot-color); color: white; }
.frame-nav a:not(.current) { background: rgba(0,0,0,0.06); color: var(--ink-muted); }
.frame-nav a:not(.current):hover { background: rgba(0,0,0,0.1); color: var(--ink); }
.hero-meta { display: flex; align-items: center; gap: var(--s3); font-size: 0.8125rem; color: var(--ink-muted); padding-top: var(--s3); border-top: 1px solid var(--border); }
.author-block { display: flex; align-items: center; gap: var(--s2); }
.author-block img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.author-name { font-weight: 500; color: var(--ink-light); }
.author-name a { color: inherit; text-decoration: none; }
.author-name a:hover { text-decoration: underline; }
.author-cred { color: var(--ink-light); }

/* ── PAGE BODY ── */
.page-body { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--s4) var(--s9); }

/* ── ARTICLE HERO IMAGE ── */
.article-hero-img { width: 100%; border-radius: var(--radius-lg); margin: var(--s7) 0 var(--s6); display: block; }

/* ── DISCLAIMER ── */
.disclaimer { font-size: 0.75rem; color: var(--ink-muted); margin-bottom: var(--s6); line-height: 1.5; }

/* ── TOC ── */
.toc { background: var(--paper-warm); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s5) var(--s6); margin-bottom: var(--s7); }
.toc-title { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--s1); }
.toc-meta { font-size: 0.75rem; color: var(--ink-muted); margin-bottom: var(--s4); }
.toc ol { list-style: none; counter-reset: toc-counter; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s5); font-size: 0.875rem; padding-left: 0 !important; margin: 0; }
.toc li { counter-increment: toc-counter; display: flex; align-items: baseline; gap: var(--s2); }
.toc li::before { content: counter(toc-counter); font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; color: var(--slot-color); min-width: 1.25em; flex-shrink: 0; }
.toc li a { text-decoration: none; color: var(--ink-light); transition: color 0.12s; }
.toc li a:hover { color: var(--slot-color); }
@media (max-width: 600px) { .toc ol { grid-template-columns: 1fr; } }

/* ── RICHIEST'S READ ── */
.richiests-read { background: var(--slot-tint); border: 1px solid var(--slot-color); border-radius: var(--radius-lg); padding: var(--s6); margin-bottom: var(--s7); position: relative; }
.read-label { position: absolute; top: calc(-1 * var(--s3)); left: var(--s5); background: var(--slot-color); color: white; font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; padding: var(--s1) var(--s3); border-radius: 2px; }
.read-ticker { font-family: var(--font-mono); font-size: 0.875rem; color: var(--slot-color); font-weight: 500; margin-bottom: var(--s3); margin-top: var(--s3); }
.read-item-label { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--s2); }
.read-quick-take { font-size: 1.0625rem; line-height: 1.7; margin-bottom: var(--s4); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.read-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4) var(--s5); }
.read-tradeoff { grid-column: 1 / -1; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s3) var(--s4); margin-top: var(--s2); }

/* ── BROKER CTA ── */
.broker-cta { background: var(--ink); border-radius: var(--radius-lg); padding: var(--s5) var(--s6); margin: var(--s6) 0; display: flex; align-items: center; gap: var(--s6); flex-wrap: wrap; }
.cta-text { flex: 1; min-width: 200px; }
.cta-headline { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; color: var(--paper); margin-bottom: var(--s1); line-height: 1.35; }
.cta-sub { font-size: 0.8125rem; color: rgba(250,250,247,0.6); }
.cta-buttons { display: flex; gap: var(--s3); flex-shrink: 0; flex-wrap: wrap; }
.cta-btn { display: inline-block; padding: var(--s3) var(--s5); border-radius: var(--radius); font-size: 0.875rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: all 0.15s; }
.cta-btn.primary { background: var(--paper); color: var(--ink); }
.cta-btn.primary:hover { background: var(--paper-mid); }
.cta-btn.secondary { background: transparent; color: var(--paper); border: 1px solid rgba(250,250,247,0.3); }
.cta-btn.secondary:hover { border-color: var(--paper); }

/* ── CONTENT SECTIONS ── */
.content-section { margin-bottom: var(--s8); }
.content-section p { margin-bottom: var(--s4); }
.content-section p:last-child { margin-bottom: 0; }
h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.25; color: var(--ink); margin-bottom: var(--s4); padding-top: var(--s6); }
h3 { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; margin-top: var(--s6); margin-bottom: var(--s3); color: var(--ink); }

/* ── DATA TABLES ── */
.data-table { width: 100%; border-collapse: collapse; margin-top: var(--s4); margin-bottom: var(--s4); font-size: 0.9375rem; }
.data-table th { text-align: left; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; padding: var(--s3); border-bottom: 2px solid var(--border); background: var(--paper-warm); }
.data-table td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.highlight-row td { font-weight: 600; background: var(--slot-tint); }
.table-note { font-size: 0.75rem; color: var(--ink-muted); margin-top: var(--s2); line-height: 1.5; }

/* ── CHART BLOCKS ── */
.chart-block { margin-bottom: var(--s8); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: white; padding: var(--s3) var(--s4); }
.chart-label { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--s3); }

/* ── VERDICT ── */
.verdict { background: var(--slot-tint); border-left: 3px solid var(--slot-color); padding: var(--s3) var(--s5); font-size: 0.9375rem; color: var(--ink-light); line-height: 1.6; margin-top: var(--s4); }

/* ── TOOL CTA ── */
.tool-cta { display: flex; align-items: center; gap: var(--s4); padding: var(--s5); background: var(--paper-warm); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-top: var(--s5); }
.tool-icon { font-size: 2rem; flex-shrink: 0; }
.tool-text { flex: 1; }
.tool-title { font-weight: 600; color: var(--ink); margin-bottom: var(--s1); }
.tool-desc { font-size: 0.8125rem; color: var(--ink-muted); }
.tool-link { font-size: 0.875rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--border-mid); text-decoration: none; color: var(--ink); transition: opacity 0.15s; }
.tool-link:hover { opacity: 0.75; }

/* ── FRAME FIT ── */
.frame-fit { background: var(--paper-warm); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s5) var(--s7); margin-bottom: var(--s4); }
.frame-title { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--s3); }
.frame-slots { display: flex; gap: var(--s2); margin-bottom: var(--s4); }
.frame-slot { font-size: 0.75rem; padding: var(--s1) var(--s3); border-radius: var(--radius); background: var(--paper); color: var(--ink-muted); }
.frame-slot.park  { background: var(--park-tint);  color: var(--park);  font-weight: 600; }
.frame-slot.earn  { background: var(--earn-tint);  color: var(--earn);  font-weight: 600; }
.frame-slot.build { background: var(--build-tint); color: var(--build); font-weight: 600; }
.frame-slot.roam  { background: var(--roam-tint);  color: var(--roam);  font-weight: 600; }
.frame-slot.dare  { background: var(--dare-tint);  color: var(--dare);  font-weight: 600; }

/* ── COMPARISON SUMMARY ── */
.comparison-summary { margin-top: var(--s6); }

/* ── FAQ ── */
.faq-section { margin-top: var(--s8); padding-bottom: var(--s8); }
.faq-item { padding: var(--s4) 0; border-bottom: 1px solid var(--border); }
.faq-q { font-weight: 600; color: var(--ink); margin-bottom: var(--s2); line-height: 1.5; }
.faq-a { font-size: 0.9375rem; color: var(--ink-light); line-height: 1.65; }

/* ── FOOTER ── */
.site-footer { margin-top: 0; border-top: 1px solid var(--border); background: var(--paper-warm); padding: var(--s7) 0 var(--s6); }
.footer-inner { max-width: var(--wide-width); margin: 0 auto; padding: 0 var(--s5); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s6); margin-bottom: var(--s7); }
.footer-brand .brand-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 900; margin-bottom: var(--s3); }
.footer-brand .brand-name span { color: var(--earn); }
.footer-brand p { font-size: 0.875rem; color: var(--ink-muted); max-width: 220px; line-height: 1.6; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--s3); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--s2); }
.footer-col a { font-size: 0.875rem; color: var(--ink-light); text-decoration: none; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: var(--s5); display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.footer-disclaimer { font-size: 0.75rem; color: var(--ink-muted); max-width: 500px; line-height: 1.5; }
.footer-links { display: flex; gap: var(--s4); font-size: 0.8125rem; }
.footer-links a { color: var(--ink-muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    /* mobile nav hamburger */
    .nav-toggle-label { display: flex; margin-left: auto; }
    .nav-links {
        display: none;
        position: absolute; top: 52px; left: 0; right: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 16px rgba(0,0,0,0.07);
        flex-direction: column;
        gap: 0;
        padding: var(--s2) 0 var(--s3);
        z-index: 99;
    }
    .nav-links li a { display: block; padding: var(--s3) var(--s5); font-size: 0.9375rem; border-bottom: 1px solid var(--border); }
    .nav-links li:last-child a { border-bottom: none; }
    .nav-toggle-input:checked ~ .nav-links { display: flex; }
    /* hamburger → X */
    .nav-toggle-input:checked ~ .nav-toggle-label span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle-input:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .nav-toggle-input:checked ~ .nav-toggle-label span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    /* layout stacking */
    .read-grid { grid-template-columns: 1fr; }
    .broker-cta { flex-direction: column; align-items: flex-start; }
    .tool-cta { flex-direction: column; text-align: center; align-items: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .cta-buttons { flex-direction: column; }
    .hero-meta { flex-wrap: wrap; gap: var(--s2); }
}
