/* Framework Geek V4: preserve the approved layout; use complete, paired themes.
   The legacy theme initializer can select dark mode from the OS or saved preference.
   Never force a light background independently of the foreground palette. */
:root{
 --accent:#2769de;--bg:#f6f7f5;--ink:#13212c;--muted:#5b6973;
 --line:#dce2e5;--surface:#fff;--tint:#eef2f4;--panel:#e9eef0;
 --fg-strip:#e9eef0;--fg-card:#f8faf9;--fg-card-line:#d8e0e3;
 --fg-rule:#dce4e7;--fg-row-line:#e2e8ea;--fg-link:#2465c3;
 --fg-note:#60717c;--fg-topic-ink:#465d69;--fg-topic-line:#d5dfe3;
 --fg-mark-bg:#13212c;--fg-mark-ink:#a5e7d1;color-scheme:light;
}
html[data-theme=dark]{
 --accent:#90bcff;--bg:#0f1b24;--ink:#eaf1f5;--muted:#acbeca;
 --line:#405865;--surface:#172935;--tint:#213746;--panel:#243c4c;
 --fg-strip:#1a2e3b;--fg-card:#172935;--fg-card-line:#405865;
 --fg-rule:#405865;--fg-row-line:#405865;--fg-link:#90bcff;
 --fg-note:#acbeca;--fg-topic-ink:#d5e5ed;--fg-topic-line:#506d7c;
 --fg-mark-bg:#d8eee9;--fg-mark-ink:#13212c;--shadow:none;color-scheme:dark;
}
body{background:var(--bg);color:var(--ink)}
.topline{background:#13212c;color:#dce8f1;letter-spacing:.12em}
.site-header{background:var(--bg);color:var(--ink);border-bottom:1px solid var(--line)}
.logo-mark{background:var(--fg-mark-bg);color:var(--fg-mark-ink);border-radius:10px;width:41px;height:41px}
.logo-mark svg{width:30px;height:30px;stroke-width:2.7}
.logo-name{font-size:27px;font-weight:850;letter-spacing:-1.5px;color:var(--ink)}
.logo-dot{color:var(--accent)}
.intro{padding-top:85px;padding-bottom:64px}
.intro h1{font-family:inherit;font-weight:800;letter-spacing:-.065em;line-height:1.02;max-width:950px;font-size:clamp(52px,7.6vw,105px)}
.intro h1 .serif{font-family:inherit;font-style:normal;color:var(--accent)}
.intro-text>p:last-child{max-width:650px;font-size:clamp(18px,2vw,23px);line-height:1.55}
.intro .eyebrow{color:var(--fg-link);font-weight:800}
.feature-main,.article-card,.feature-side .article-card{border-radius:14px;overflow:hidden}
.feature-content{background:var(--surface);color:var(--ink)}
.universe-strip{background:var(--fg-strip);color:var(--ink);border-block:1px solid var(--line)}
.tools-callout{background:#142633;border-radius:18px}
.site-footer{background:#12212d;color:#eaf1f5}
.site-footer a{color:#eaf1f5}
.footer-bottom{border-color:#ffffff30}
.article-header h1{letter-spacing:-.045em;font-weight:800}
@media(max-width:760px){.logo-name{font-size:20px}.logo-mark{width:31px;height:31px}.intro{padding-top:48px;padding-bottom:35px}.intro h1{font-size:clamp(41px,10vw,60px);letter-spacing:-.055em}.intro-text>p:last-child{font-size:17px}}
.site-footer .logo-name{color:#f0f6f7}.site-footer .logo-mark{background:#d8eee9;color:#13212c}.site-footer .logo-dot{color:#81b6ff}

/* Homepage V2: additional editorial discovery, original sections unchanged */
.category-index{padding-top:5.5rem;padding-bottom:5.5rem}
.category-index-heading{align-items:end}
.category-index-heading h2{letter-spacing:-.045em}
.index-intro{max-width:39rem;color:var(--muted,#687680);font-size:1rem;line-height:1.7;margin-top:1rem}
.category-index-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.15rem}
.index-group{border:1px solid var(--fg-card-line);border-radius:13px;padding:1.65rem;background:var(--fg-card);color:var(--ink);display:flex;flex-direction:column;min-width:0}
.index-group-top{display:flex;align-items:flex-start;gap:1rem;padding-bottom:1.3rem;border-bottom:1px solid var(--fg-rule)}
.index-number{font-size:.7rem;color:var(--fg-link);font-weight:800;letter-spacing:.1em;padding-top:.3rem}
.index-group-top>div{flex:1}
.index-group h3{font-size:1.5rem;letter-spacing:-.045em;line-height:1.2;margin:0 0 .5rem}
.index-group-top p{font-size:.85rem;color:var(--muted);margin:0;line-height:1.5}
.index-group-arrow{color:var(--fg-link)}
.index-links{list-style:none;padding:0;margin:.6rem 0 1.3rem}
.index-links li+li{border-top:1px solid var(--fg-row-line)}
.index-links a{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1.05rem 0;text-decoration:none;color:inherit;font-size:.97rem;font-weight:650;line-height:1.4}
.index-links a:hover,.index-all:hover{color:var(--fg-link)}
.index-read{display:inline-flex;align-items:center;gap:.45rem;white-space:nowrap;color:var(--fg-note);font-size:.73rem;font-weight:500}
.index-read svg{width:17px;height:17px}
.index-all{margin-top:auto;font-size:.8rem;font-weight:700;color:var(--fg-link);text-decoration:none;display:inline-flex;align-items:center;gap:.5rem}
.index-all svg{width:18px;height:18px}
@media(max-width:750px){.category-index{padding-top:3.8rem;padding-bottom:3.8rem}.category-index-grid{grid-template-columns:1fr}.index-group{padding:1.25rem}.category-index-heading{align-items:start}.index-group h3{font-size:1.35rem}}

/* V3: editorial topic cues are labels, never false links to unpublished content */
.index-topic-strip{border-top:1px solid var(--fg-rule);padding:1rem 0 1.2rem}
.index-topic-label{display:block;font-size:.66rem;letter-spacing:.11em;text-transform:uppercase;color:var(--fg-note);font-weight:800;margin-bottom:.7rem}
.index-topic-list{display:flex;flex-wrap:wrap;gap:.4rem}
.index-topic{font-size:.73rem;border:1px solid var(--fg-topic-line);color:var(--fg-topic-ink);padding:.38rem .62rem;border-radius:100px;background:var(--surface)}

/* Dark callouts stay dark in both themes; their foreground must not inherit light ink. */
.tools-callout{color:#f2f6f8}
.tools-callout .eyebrow,.tools-callout p,.cost-visual>span{color:#bdced9}
.tools-callout .button-light{background:#edf0de;color:#252e24}
/* Keep the print stylesheet legible even when the browser has selected dark mode. */
@media print{
 html[data-theme=dark]{--bg:#fff;--surface:#fff;--ink:#111;--muted:#444;--accent:#164f99;--line:#aaa;--tint:#f3f3f3;--panel:#f3f3f3;color-scheme:light}
 body,.feature-content,.universe-strip,.index-group{background:#fff;color:#111}
}
