/* AIContentClips — main stylesheet */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg: #faf6ef;
  --bg-2: #f3ece0;
  --surface: #ffffff;
  --ink: #1c1a24;
  --ink-2: #4a4656;
  --muted: #6e6979;
  --line: #e6ddcf;
  --coral: #e2552b;
  --amber: #f0a830;
  --teal: #17806f;
  --violet: #6a4cd6;
  --accent: var(--coral);
  --accent-ink: #b8401c;
  --grad: linear-gradient(120deg, var(--coral), var(--amber) 45%, var(--teal));
  --shadow: 0 1px 2px rgba(28,26,36,.06), 0 8px 24px -12px rgba(28,26,36,.18);
  --shadow-lg: 0 24px 60px -24px rgba(28,26,36,.35);
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12111a; --bg-2: #1a1824; --surface: #1e1c2a; --ink: #f2eee6; --ink-2: #cfc9d9;
    --muted: #a39db0; --line: #2e2b3c; --accent-ink: #ff8a5f; --teal: #3cc0a8;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 24px 60px -24px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12111a; --bg-2: #1a1824; --surface: #1e1c2a; --ink: #f2eee6; --ink-2: #cfc9d9;
  --muted: #a39db0; --line: #2e2b3c; --accent-ink: #ff8a5f; --teal: #3cc0a8;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 24px 60px -24px rgba(0,0,0,.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 2em 0 .6em; }
h3 { font-size: 1.25rem; margin: 1.6em 0 .4em; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Scroll progress */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(0,0,0,.4); }
.nav { display: flex; align-items: center; gap: 16px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 1.2rem/1 var(--serif); }
.brand svg { width: 38px; height: 38px; transition: transform .5s cubic-bezier(.2,.8,.2,1.2); }
.brand:hover svg { transform: rotate(-8deg) scale(1.06); }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.menu { display: flex; gap: 4px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.menu a { position: relative; display: block; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .97rem; }
.menu a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .35s; border-radius: 2px; }
.menu a:hover::after, .menu a[aria-current="page"]::after { transform: scaleX(1); }
.menu a[aria-current="page"] { color: var(--ink); }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: transform .2s; }
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.burger { display: none; }
@media (max-width: 860px) {
  .burger { display: grid; }
  .menu {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; gap: 0; padding: 12px 16px 20px; background: var(--bg);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateY(-120%); transition: transform .4s cubic-bezier(.2,.8,.2,1); margin: 0;
  }
  .menu.open { transform: none; }
  .menu a { padding: 14px 8px; font-size: 1.1rem; border-radius: 10px; }
  .menu a::after { left: 8px; right: auto; width: 40px; }
}

/* Buttons */
.btn { --b: var(--ink); display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 650; text-decoration: none; border: 0; cursor: pointer; transition: transform .25s, box-shadow .25s; font-size: 1rem; }
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn svg { width: 18px; transition: transform .25s; }
.btn:hover svg { transform: translateX(4px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }

/* Animated gradient border */
.glow { position: relative; isolation: isolate; }
.glow::before {
  content: ""; position: absolute; inset: -1.5px; border-radius: inherit; z-index: -1; padding: 1.5px;
  background: conic-gradient(from var(--angle), var(--coral), var(--amber), var(--teal), var(--violet), var(--coral));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s; animation: spin 4s linear infinite;
}
.glow:hover::before, .glow.always::before, .glow:focus-within::before { opacity: 1; }
@keyframes spin { to { --angle: 360deg; } }

/* Hero */
.hero { position: relative; padding: clamp(40px, 7vw, 90px) 0 60px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 var(--teal); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.hero h1 { margin-top: 18px; font-size: clamp(2.3rem, 6vw, 4.2rem); }
.grad-text { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s ease-in-out infinite alternate; }
@keyframes shimmer { to { background-position: 100% 0; } }
.lead { font-size: clamp(1.08rem, 2vw, 1.25rem); color: var(--ink-2); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 36px; }
.stat b { display: block; font: 700 2rem/1 var(--serif); }
.stat span { font-size: .9rem; color: var(--muted); }
.hero-art { position: relative; aspect-ratio: 1; max-width: 480px; justify-self: center; width: 100%; }
.hero-art svg { width: 100%; height: 100%; overflow: visible; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .45; z-index: -1; animation: drift 14s ease-in-out infinite alternate; }
.blob.b1 { width: 380px; height: 380px; background: var(--amber); top: -80px; right: -60px; }
.blob.b2 { width: 300px; height: 300px; background: var(--teal); bottom: -120px; left: -80px; animation-delay: -6s; opacity: .3; }
@keyframes drift { to { transform: translate(-40px, 40px) scale(1.15); } }
.float { animation: float 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.float.d2 { animation-delay: -2s; } .float.d3 { animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-14px) rotate(2deg); } }
.page-flip { transform-box: fill-box; transform-origin: left center; animation: flip 5s cubic-bezier(.6,0,.4,1) infinite; }
.page-flip.p2 { animation-delay: -1.6s; } .page-flip.p3 { animation-delay: -3.2s; }
@keyframes flip { 0%, 15% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 65%, 100% { transform: scaleX(-1); opacity: 0; } }
.orbit { transform-origin: 240px 240px; animation: orbit 30s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
.parallax { transform: translateY(calc(var(--sy, 0) * -0.08px)); will-change: transform; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 340px; order: -1; } }

/* Marquee */
.marquee { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 14px 0; }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font: 600 1.05rem var(--serif); color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 40px; }
.marquee span::after { content: "✦"; color: var(--coral); font-size: .8em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections */
section { padding: clamp(50px, 8vw, 90px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.kicker { font: 700 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card .thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-2); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.card:hover .thumb img { transform: scale(1.06); }
.card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 1.22rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 700 .72rem var(--sans); letter-spacing: .06em; text-transform: uppercase; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-ink); text-decoration: none; position: relative; z-index: 2; }
.tag.reading-lists { background: color-mix(in srgb, var(--teal) 14%, transparent); color: var(--teal); }
.tag.reading-guides { background: color-mix(in srgb, var(--violet) 14%, transparent); color: var(--violet); }
:root[data-theme="dark"] .tag.reading-guides { color: #a594ff; }
.feature { display: grid; grid-template-columns: 1.2fr 1fr; }
.feature .thumb { aspect-ratio: auto; min-height: 100%; }
.feature .body { padding: 34px; justify-content: center; }
.feature h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } .feature .thumb { aspect-ratio: 16/9; } .feature .body { padding: 22px; } }

/* Scroll story (sticky motion graphic) */
.story { position: relative; height: 300vh; padding: 0; }
.story-sticky { position: sticky; top: 70px; height: calc(100vh - 70px); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
.story-steps { position: relative; min-height: 220px; }
.story-step { position: absolute; inset: 0; opacity: 0; transform: translateY(30px); transition: opacity .5s, transform .5s; }
.story-step.on { opacity: 1; transform: none; }
.story-step .num { font: 700 4rem/1 var(--serif); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.story-art svg { width: 100%; max-width: 440px; margin-inline: auto; }
.story-dots { display: flex; gap: 8px; margin-top: 20px; }
.story-dots i { width: 28px; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s, width .3s; }
.story-dots i.on { background: var(--coral); width: 48px; }
#bookCover { transform-box: fill-box; transform-origin: left center; transform: perspective(600px) rotateY(calc(var(--p, 0) * -160deg)); }
.story-lines line { stroke-dasharray: 160; stroke-dashoffset: calc(160 - var(--p, 0) * 160); }
.story-spark { opacity: var(--p2, 0); transform: scale(calc(.6 + var(--p2, 0) * .4)); transform-box: fill-box; transform-origin: center; }
@media (max-width: 860px) {
  .story { height: auto; padding: 60px 0; }
  .story-sticky { position: static; height: auto; grid-template-columns: 1fr; }
  .story-steps { min-height: 0; display: grid; gap: 28px; }
  .story-step { position: static; opacity: 1; transform: none; }
  .story-dots { display: none; }
  #bookCover { transform: perspective(600px) rotateY(-150deg); }
  .story-lines line { stroke-dashoffset: 0; }
  .story-spark { opacity: 1; transform: none; }
}

/* Category tiles */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat { border-radius: var(--radius); padding: 28px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 10px; transition: transform .35s; }
.cat:hover { transform: translateY(-5px); }
.cat .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.cat h3 { margin: 6px 0 0; }
.cat p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.cat .count { margin-top: auto; font-weight: 650; font-size: .9rem; color: var(--accent-ink); }
@media (max-width: 860px) { .cats { grid-template-columns: 1fr; } }

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* Page hero */
.page-hero { padding: 40px 0 30px; position: relative; overflow: hidden; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; }
.crumbs a { color: var(--muted); }
.page-hero .lead { margin-bottom: 0; }

/* Article layout */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; }
.article-cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 30px; }
.prose { max-width: 720px; font-size: 1.1rem; }
.prose h2 { padding-top: .2em; }
.prose h2::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; background: var(--grad); margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--coral); font-weight: 700; }
.prose blockquote { margin: 1.4em 0; padding: 18px 22px; border-left: 4px solid var(--teal); background: var(--bg-2); border-radius: 0 14px 14px 0; }
.prose blockquote p { margin: 0 0 .5em; }
.prose blockquote p:last-child { margin: 0; }
.table-wrap { overflow-x: auto; margin: 1.4em 0; border-radius: 14px; border: 1px solid var(--line); }
.prose table { border-collapse: collapse; width: 100%; font-size: .97rem; min-width: 480px; }
.prose th, .prose td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.prose th { background: var(--bg-2); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.prose strong { color: var(--ink); }
.aside { position: sticky; top: 96px; display: grid; gap: 20px; }
.box { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.box h2, .box h3 { font-size: 1rem; margin: 0 0 12px; font-family: var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.box h2::before { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .93rem; border-left: 2px solid transparent; line-height: 1.4; }
.toc a:hover { background: var(--bg-2); }
.toc a.active { border-left-color: var(--coral); color: var(--ink); background: var(--bg-2); font-weight: 600; }
.bookcard dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .93rem; }
.bookcard dt { color: var(--muted); }
.bookcard dd { margin: 0; font-weight: 600; }
.stars { display: inline-flex; gap: 2px; color: var(--amber); vertical-align: middle; }
.stars svg { width: 18px; height: 18px; }
.rating-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 700; }
@media (max-width: 1000px) { .article-wrap { grid-template-columns: 1fr; } .aside { position: static; order: -1; } .aside .toc { display: none; } }

/* FAQ */
.faq { margin-top: 2.4em; }
.faq details { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 18px 54px 18px 20px; font-weight: 650; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--coral); transition: transform .3s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--ink-2); }

/* Author + share */
.author { display: flex; gap: 16px; align-items: center; margin-top: 2.6em; padding: 22px; border-radius: var(--radius); background: var(--bg-2); }
.author .av { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font: 700 1.1rem var(--serif); }
.author p { margin: 0; font-size: .95rem; color: var(--ink-2); }
.share { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.share a, .share button { font: 600 .88rem var(--sans); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; }

/* Calculator */
.calc { margin: 1.5em 0 2em; padding: 26px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.calc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.calc label { display: grid; gap: 6px; font-weight: 600; font-size: .93rem; }
.calc input, .calc select { font: inherit; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
.calc input:focus, .calc select:focus { border-color: var(--coral); outline: none; }
.calc-out { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.calc-out div { padding: 16px; border-radius: 14px; background: var(--bg-2); text-align: center; }
.calc-out b { display: block; font: 700 1.6rem/1.1 var(--serif); }
.calc-out span { font-size: .82rem; color: var(--muted); }
@media (max-width: 600px) { .calc-grid, .calc-out { grid-template-columns: 1fr; } }

/* Filters (articles page) */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 30px; }
.chip { font: 600 .92rem var(--sans); padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: all .25s; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.search { flex: 1 1 240px; position: relative; }
.search input { width: 100%; font: inherit; padding: 11px 16px 11px 42px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; color: var(--muted); }
.empty { display: none; text-align: center; padding: 40px; color: var(--muted); }

/* Contact */
.contact-card { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; padding: 26px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin: 1.2em 0 2em; }
.contact-card .em { font: 700 clamp(1.05rem, 3vw, 1.4rem) var(--serif); word-break: break-all; }

/* CTA band */
.band { border-radius: 28px; padding: clamp(30px, 6vw, 60px); background: var(--ink); color: var(--bg); position: relative; overflow: hidden; }
.band h2 { color: var(--bg); margin-top: 0; }
.band p { color: color-mix(in srgb, var(--bg) 78%, transparent); max-width: 38em; }
.band .btn { background: var(--bg); color: var(--ink); }
.band::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: conic-gradient(from var(--angle), var(--coral), var(--amber), var(--teal), var(--coral)); filter: blur(50px); opacity: .5; animation: spin 10s linear infinite; }
.band > * { position: relative; z-index: 1; }

/* Footer */
.site-footer { margin-top: 60px; padding: 60px 0 30px; border-top: 1px solid var(--line); background: var(--bg-2); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h2 { font: 700 .8rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent-ink); text-decoration: underline; }
.site-footer p { color: var(--ink-2); font-size: .95rem; }
.copy { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 40; opacity: 0; pointer-events: none; transform: translateY(10px); transition: all .3s; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* 404 */
.nf { text-align: center; padding: 80px 0; }
.nf .big { font: 700 clamp(5rem, 18vw, 10rem)/1 var(--serif); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .parallax { transform: none; }
}
@media print { .site-header, .site-footer, .aside, .progress, .to-top, .share { display: none !important; } }
@media (max-width: 860px) { .theme-toggle { margin-left: auto; } }
.calc label { min-width: 0; }
.calc select { max-width: 100%; text-overflow: ellipsis; }
.article-wrap > * { min-width: 0; } @media (max-width:1000px){ .article-wrap { grid-template-columns: minmax(0,1fr); } }
.story-steps { min-height: 270px; }
.story-step { pointer-events: none; }
.story-step.on { pointer-events: auto; }
:root[data-theme="dark"] .blob { opacity: .16; }
:root[data-theme="dark"] .blob.b2 { opacity: .12; }
:root:not([data-theme="dark"]) { --muted: #5f5a6b; }
.page-hero .blob.b1 { opacity: .22; }
.tag.reading-guides { color: #5434c0; }
.tag.reading-lists { color: #0f6b5c; }
:root:not([data-theme="dark"]) .tag:not(.reading-lists):not(.reading-guides) { color: #993312; }
:root:not([data-theme="dark"]) .hero .blob.b2 { opacity: .16; }
:root:not([data-theme="dark"]) .hero .blob.b1 { opacity: .3; }

/* ---- v2: charts, tools, images ---- */
.thumb img, .article-cover img { width: 100%; height: auto; aspect-ratio: 1200 / 670; object-fit: cover; background: var(--bg-2); }
.article-cover img { border-radius: var(--radius); }
figure.chart { margin: 1.6em 0 2em; padding: 20px 20px 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow-x: auto; }
figure.chart svg { width: 100%; min-width: 520px; height: auto; display: block; }
figure.chart figcaption { margin-top: 10px; font-size: .84rem; color: var(--muted); }
.tool-wrap { max-width: 860px; }
.tool-wrap .prose { margin-top: 10px; }
.privacy-line { font-size: .86rem; color: var(--muted); margin: -1em 0 2em; }
.calc-note { margin: 14px 0 0; font-size: .9rem; color: var(--ink-2); }
.st-passage { font: 400 1.12rem/1.8 var(--serif); max-width: 66ch; margin: 0 0 20px; }
.st-passage p { margin: 0 0 1em; }
fieldset.q { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
fieldset.q legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.opt { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 6px; border-radius: 12px; background: var(--bg-2); cursor: pointer; font-weight: 500; }
.opt:hover { box-shadow: inset 0 0 0 1.5px var(--coral); }
.opt input { accent-color: var(--coral); width: 18px; height: 18px; flex: none; }
.st-scale { position: relative; height: 14px; border-radius: 99px; background: linear-gradient(90deg, var(--line), var(--teal)); margin: 26px 0 6px; }
.st-avg { position: absolute; top: -6px; width: 2px; height: 26px; background: var(--ink); opacity: .55; }
.st-avg.alt { opacity: .3; }
#st-marker { position: absolute; top: -9px; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; background: var(--coral); border: 4px solid var(--surface); box-shadow: var(--shadow); left: 0; transition: left 1s cubic-bezier(.2,.8,.2,1); }
.st-legend { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin: 0 0 18px; }
@media (max-width: 600px) { .st-legend span:nth-child(2) { display: none; } }
