/* ==========================================================================
   Real Delilah — main stylesheet
   Palette: deep harbor navy, teal, warm brass on a soft parchment canvas.
   ========================================================================== */

:root {
  --bg: #f6f3ec;
  --bg-alt: #efeadf;
  --surface: #ffffff;
  --surface-2: #fbf9f4;
  --ink: #14213d;
  --ink-soft: #2c3a57;
  --muted: #5d6679;
  --line: #e4ddcf;
  --line-strong: #d4cab6;
  --primary: #0d6e6e;
  --primary-ink: #ffffff;
  --primary-soft: #e1f0ee;
  --navy: #14365a;
  --navy-deep: #0b1f38;
  --gold: #c6922e;
  --gold-soft: #f6e8c7;
  --gold-ink: #1b1405;
  --success: #0d8a6a;
  --danger: #b4302a;
  --shadow-sm: 0 1px 2px rgba(20, 33, 61, .06), 0 2px 8px rgba(20, 33, 61, .05);
  --shadow: 0 10px 30px -12px rgba(20, 33, 61, .22), 0 2px 6px rgba(20, 33, 61, .05);
  --shadow-lg: 0 28px 60px -24px rgba(11, 31, 56, .45);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1200px;
  --header-h: 74px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a1424;
  --bg-alt: #0e1b2f;
  --surface: #12223a;
  --surface-2: #0f1d33;
  --ink: #eef2f8;
  --ink-soft: #d3dbe8;
  --muted: #9ba8bd;
  --line: #213453;
  --line-strong: #2d4468;
  --primary: #4fc1b7;
  --primary-ink: #04201f;
  --primary-soft: #133a3f;
  --navy: #1b4673;
  --navy-deep: #06101f;
  --gold: #e4b65c;
  --gold-soft: #3a3020;
  --gold-ink: #1b1405;
  --success: #3ccf9f;
  --danger: #ff7b72;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 12px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 28px 60px -24px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 500px at 100% -10%, rgba(198, 146, 46, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(13, 110, 110, .06), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
html, body { overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.18; letter-spacing: -.01em; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.container.narrow { max-width: 820px; }
.container.narrow-wide { max-width: 980px; }
.center { text-align: center; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .78em 1.35em; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 650; font-size: .98rem; line-height: 1.1; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 8px 20px -10px var(--primary); }
.btn-primary:hover { color: var(--primary-ink); box-shadow: 0 12px 24px -10px var(--primary); }
.btn-gold { background: linear-gradient(180deg, #f0c76c, #c6922e); color: var(--gold-ink); box-shadow: 0 10px 22px -10px rgba(198, 146, 46, .9); }
.btn-gold:hover { color: var(--gold-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: .55em 1em; font-size: .9rem; }
.btn-lg { padding: .95em 1.6em; font-size: 1.05rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4em;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-soft); padding: .38em .8em; border-radius: 999px; text-decoration: none;
}
.chip:hover { color: var(--primary); filter: brightness(.97); }
.chip-lg { font-size: .88rem; text-transform: none; letter-spacing: 0; padding: .55em 1em; background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); }
.chip-lg:hover { border-color: var(--primary); color: var(--primary); }
.chip-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.2rem; }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 650; text-decoration: none; }
.link-arrow svg { transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(3px); }
.link-btn { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-decoration: none; }
.link-btn:hover { color: #fff; text-decoration: underline; }
.kicker { font-size: .8rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .55rem; }
.kicker-light { color: #f1cf7e; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.32rem; letter-spacing: -.01em; }
.brand-sub { font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.logo-mark { flex-shrink: 0; filter: drop-shadow(0 6px 10px rgba(20, 54, 90, .25)); }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: .2rem; margin: 0; padding: 0; }
.main-nav a, .menu-toggle {
  display: inline-flex; align-items: center; gap: .25rem; padding: .55rem .85rem; border-radius: 999px;
  color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .95rem; background: none; border: 0; cursor: pointer;
}
.main-nav a:hover, .menu-toggle:hover, .main-nav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.has-menu { position: relative; }
.menu-toggle svg { transition: transform .2s ease; }
.has-menu.open .menu-toggle svg { transform: rotate(180deg); }
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(6px);
  width: min(640px, 92vw); display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; padding: .8rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-menu.open .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
@media (hover: hover) and (min-width: 1025px) {
  .has-menu:hover .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
  .has-menu::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; }
}
.main-nav .mega-item { display: flex; align-items: flex-start; gap: .75rem; padding: .7rem .8rem; border-radius: var(--radius-sm); }
.main-nav .mega-item:hover { background: var(--surface-2); box-shadow: none; }
.mega-item strong { display: block; font-size: .95rem; color: var(--ink); }
.mega-item small { display: block; font-weight: 500; color: var(--muted); font-size: .82rem; line-height: 1.35; margin-top: 2px; }
.mega-icon { flex-shrink: 0; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--primary-soft); color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: .4rem; }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .2s, transform .15s;
}
.icon-btn:hover { border-color: var(--ink-soft); }
.nav-burger { display: none; }

/* Theme toggle */
.theme-toggle { background: none; border: 0; padding: 0; cursor: pointer; }
.tt-track {
  display: block; width: 62px; height: 34px; border-radius: 999px; position: relative;
  background: linear-gradient(180deg, #bfe3ff, #f6e8c7); border: 1px solid var(--line-strong);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .08); transition: background .35s ease;
}
.tt-thumb {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; color: var(--gold); display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  transition: transform .35s cubic-bezier(.4, 1.4, .5, 1), background .35s, color .35s;
}
.tt-thumb svg { position: absolute; transition: opacity .25s, transform .35s; }
.tt-moon { opacity: 0; transform: rotate(-60deg); }
[data-theme="dark"] .tt-track { background: linear-gradient(180deg, #0b1f38, #1b4673); }
[data-theme="dark"] .tt-thumb { transform: translateX(28px); background: #0b1f38; color: #f1cf7e; }
[data-theme="dark"] .tt-sun { opacity: 0; transform: rotate(60deg); }
[data-theme="dark"] .tt-moon { opacity: 1; transform: rotate(0); }

/* Search panel */
.search-panel { border-top: 1px solid var(--line); background: var(--surface); padding: 14px 0; }
.search-form { display: flex; align-items: center; gap: .75rem; color: var(--muted); }
.search-form input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.1rem; color: var(--ink); padding: .6rem 0; outline: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #eef3fa;
  background: linear-gradient(135deg, #0b1f38 0%, #14365a 48%, #0d5e63 100%);
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 8vw, 6rem);
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 30%, transparent 78%);
}
.hero::after {
  content: ""; position: absolute; right: -140px; bottom: -220px; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 207, 126, .28), transparent 65%); pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 600; }
.hero h1 em { font-style: italic; color: #f1cf7e; font-weight: 500; }
.hero-lead { font-size: 1.15rem; color: #c9d6e6; max-width: 34rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-size: .85rem; font-weight: 650; color: #f1cf7e; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); padding: .4rem .9rem; border-radius: 999px; margin-bottom: 1.3rem; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #4fc1b7; box-shadow: 0 0 0 4px rgba(79, 193, 183, .25); }
.hero-search {
  display: flex; align-items: center; gap: .6rem; max-width: 34rem; margin: 1.8rem 0 1.6rem;
  background: #fff; border-radius: 999px; padding: .4rem .4rem .4rem 1.1rem; color: #5d6679; box-shadow: var(--shadow-lg);
}
.hero-search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; color: #14213d; background: transparent; padding: .55rem 0; }
.hero-search-light { margin: 1.4rem 0 1rem; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.hero-search-light input { color: var(--ink); }
.hero-stats { list-style: none; display: flex; gap: 2.2rem; padding: 0; margin: 0; flex-wrap: wrap; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.9rem; color: #fff; line-height: 1.1; }
.hero-stats span { font-size: .85rem; color: #a9bbd1; }
.hero-art { position: relative; }
.hero-svg { width: 100%; height: auto; overflow: visible; }
.float { animation: bob 6s ease-in-out infinite; }
.f2 { animation-delay: -2s; }
.f3 { animation-delay: -4s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) { .float { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-tight { padding-top: 2rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head.center { justify-content: center; text-align: center; }
.center-note { text-align: center; margin-top: 2rem; }

/* Topics */
.topics-section { padding-top: 4rem; }
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.topic-card {
  position: relative; display: flex; flex-direction: column; gap: .4rem; padding: 1.4rem 1.3rem 1.2rem; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; overflow: hidden;
}
.topic-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--gold)); opacity: 0; transition: opacity .2s ease;
}
.topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; color: var(--ink); }
.topic-card:hover::before { opacity: 1; }
.topic-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--primary-soft); color: var(--primary); margin-bottom: .5rem; }
.topic-card:nth-child(even) .topic-icon { background: var(--gold-soft); color: var(--gold); }
.topic-name { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; }
.topic-desc { color: var(--muted); font-size: .92rem; line-height: 1.5; flex: 1; }
.topic-count { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 700; color: var(--primary); margin-top: .5rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; gap: .55rem; padding: 1.2rem 1.25rem 1.3rem; flex: 1; }
.card-body .chip { align-self: flex-start; }
.card-title { font-size: 1.22rem; margin: .1rem 0 0; }
.card-title a { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--gold), var(--gold)); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s ease; }
.card-title a:hover { background-size: 100% 2px; }
.card-excerpt { color: var(--muted); font-size: .95rem; margin: 0; flex: 1; }
.card-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin: .3rem 0 0; }
.card-meta span { display: inline-flex; align-items: center; gap: .35rem; }

/* Lead story */
.lead-story {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; margin-bottom: 1.8rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: var(--shadow);
}
.lead-media { display: block; overflow: hidden; }
.lead-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.lead-body { padding: clamp(1.5rem, 3vw, 2.6rem); display: flex; flex-direction: column; justify-content: center; gap: .8rem; }
.lead-body h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0; }
.lead-body h3 a { color: var(--ink); text-decoration: none; }
.lead-body h3 a:hover { color: var(--primary); }
.lead-body p { color: var(--muted); margin: 0; }
.lead-body .chip { align-self: flex-start; }
.lead-body .btn { align-self: flex-start; margin-top: .6rem; }

/* Start here */
.start-section { background: var(--bg-alt); border-block: 1px solid var(--line); }
.start-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: start; }
.start-intro p:last-child { color: var(--muted); }
.start-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; counter-reset: s; }
.start-steps li { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.start-steps li:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.step-num { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #fff; background: linear-gradient(135deg, var(--navy), var(--primary)); }
.start-steps a { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .2rem; }
.start-steps a strong { font-size: 1.04rem; }
.start-steps a span { color: var(--muted); font-size: .92rem; line-height: 1.45; }

/* Tabs */
.tab-list { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: 1.6rem; scrollbar-width: thin; }
.tab-list button {
  flex-shrink: 0; padding: .6rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); font-weight: 600; font-size: .92rem; cursor: pointer; transition: all .2s ease;
}
.tab-list button:hover { border-color: var(--primary); color: var(--primary); }
.tab-list button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.panel-more { margin-top: 1.4rem; }

/* Calculator band */
.calc-band {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  padding: clamp(2rem, 4vw, 3.2rem); border-radius: calc(var(--radius) + 8px); color: #dfe8f3;
  background: radial-gradient(600px 300px at 90% 0%, rgba(241, 207, 126, .25), transparent 60%), linear-gradient(120deg, #0b1f38, #14365a 60%, #0d6e6e);
  box-shadow: var(--shadow-lg);
}
.calc-band h2 { color: #fff; margin-bottom: .4rem; }
.calc-band p { max-width: 38rem; margin: 0; color: #c9d6e6; }

/* Trust */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.trust-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.6rem; box-shadow: var(--shadow-sm); }
.trust-item h3 { margin: .9rem 0 .4rem; }
.trust-item p { color: var(--muted); margin: 0; font-size: .97rem; }
.trust-icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: var(--gold); background: var(--gold-soft); }

/* ---------- Page hero / breadcrumbs ---------- */
.page-hero { padding: 2.4rem 0 1.4rem; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-alt), transparent); }
.page-lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 1.2rem; padding: 0; font-size: .86rem; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .45rem; opacity: .55; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs li[aria-current] { color: var(--ink-soft); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-hero { display: flex; gap: 1.2rem; align-items: flex-start; }
.cat-hero-icon { flex-shrink: 0; width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--navy), var(--primary)); box-shadow: var(--shadow); }
.other-topics { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.other-topics h2 { font-size: 1.4rem; }
.empty { color: var(--muted); padding: 2rem 0; }

/* Pagination */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; margin-top: 2.5rem; }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding: 0 .9rem; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink-soft); font-weight: 600; }
.pagination span[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Article ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--gold)); }
.post-header { padding: 2.4rem 0 1.6rem; }
.post-header h1 { margin-top: .9rem; font-size: clamp(2rem, 4.2vw, 3.1rem); }
.post-dek { font-size: 1.2rem; color: var(--muted); max-width: 48rem; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; color: var(--muted); font-size: .9rem; margin-top: 1.2rem; }
.post-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.post-meta a { color: var(--ink); font-weight: 650; text-decoration: none; }
.post-meta .sep { opacity: .45; }
.author-badge .logo-mark { filter: none; }
.post-hero-figure { margin: 0 auto 2.5rem; }
.post-hero-figure img { width: 100%; border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; object-fit: cover; }
.post-hero-figure figcaption, .prose figcaption { font-size: .86rem; color: var(--muted); text-align: center; margin-top: .75rem; font-style: italic; }
.post-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3rem; max-width: 1120px; }
.post-aside { position: relative; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; padding: 1.1rem 1.1rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc-title { font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: .55rem; padding: .38rem .4rem; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .88rem; line-height: 1.35; }
.toc a::before { content: counter(t, decimal-leading-zero); font-weight: 700; color: var(--line-strong); font-size: .78rem; padding-top: 1px; }
.toc a:hover, .toc a.active { color: var(--ink); background: var(--surface-2); }
.toc a.active::before { color: var(--primary); }
.post-main { min-width: 0; max-width: 46rem; }

/* Prose */
.prose { font-size: 1.1rem; line-height: 1.78; color: var(--ink-soft); }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.55rem, 2.6vw, 1.95rem); margin: 2.3em 0 .6em; color: var(--ink); }
.prose h3 { font-size: 1.32rem; margin: 1.8em 0 .5em; color: var(--ink); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.25em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--primary); font-weight: 700; }
.prose strong { color: var(--ink); }
.prose a { font-weight: 600; }
.prose blockquote { margin: 1.8em 0; padding: 1.1em 1.4em; border-left: 4px solid var(--gold); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.prose blockquote p:last-child { margin: 0; }
.prose figure { margin: 2em 0; }
.prose figure img { border-radius: var(--radius-sm); box-shadow: var(--shadow); margin: 0 auto; }
.prose img { border-radius: var(--radius-sm); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.5em 0; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.6em 0; font-size: .96rem; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; display: block; overflow-x: auto; }
.prose thead th { background: var(--navy); color: #fff; font-family: var(--font-body); font-weight: 650; text-align: left; }
.prose th, .prose td { padding: .75em 1em; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tbody tr:nth-child(even) { background: var(--surface-2); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose code { font-size: .9em; background: var(--bg-alt); padding: .1em .35em; border-radius: 5px; }
.prose .key-takeaways, .prose .callout, .prose .example {
  margin: 1.8em 0; padding: 1.3em 1.5em; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
}
.prose .key-takeaways { border-top: 4px solid var(--primary); }
.prose .key-takeaways > p:first-child, .prose .callout > p:first-child, .prose .example > p:first-child { font-family: var(--font-body); font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: .6em; }
.prose .key-takeaways ul { margin-bottom: 0; }
.prose .callout { background: var(--gold-soft); border-color: transparent; }
.prose .callout > p:first-child { color: var(--gold); }
[data-theme="dark"] .prose .callout > p:first-child { color: #f1cf7e; }
.prose .callout p:last-child, .prose .example p:last-child { margin-bottom: 0; }
.prose .example { border-left: 4px solid var(--gold); }
.prose .example > p:first-child { color: var(--gold); }
.post-disclaimer { display: flex; gap: .9rem; align-items: flex-start; margin: 2.8rem 0 1.5rem; padding: 1.1rem 1.3rem; border-radius: var(--radius); background: var(--bg-alt); border: 1px dashed var(--line-strong); color: var(--muted); font-size: .92rem; }
.post-disclaimer svg { flex-shrink: 0; margin-top: 3px; color: var(--primary); }
.post-disclaimer p { margin: 0; }
.author-box { display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.author-box p { margin: 0; color: var(--muted); font-size: .95rem; }
.author-box .author-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--ink); margin-bottom: .3rem; }
.related-section { background: var(--bg-alt); border-top: 1px solid var(--line); }

/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(1.3rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1rem; }
.form-row.two { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-weight: 650; font-size: .92rem; color: var(--ink); }
.opt { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface-2);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .75rem .9rem; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.form-note, .hint { font-size: .85rem; color: var(--muted); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; display: flex; gap: .6rem; align-items: flex-start; }
.notice ul { margin: 0; padding-left: 1.1rem; }
.notice.success { background: color-mix(in srgb, var(--success) 14%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--success) 40%, transparent); }
.notice.error { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 2rem; align-items: start; }
.contact-info { display: grid; gap: 1.2rem; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.info-card h2 { font-size: 1.25rem; margin: .9rem 0 .4rem; }
.info-card p { color: var(--muted); font-size: .96rem; }
.info-card p:last-child { margin: 0; }
.info-card.warn .trust-icon { color: var(--primary); background: var(--primary-soft); }

/* ---------- Calculator ---------- */
.calc-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.8rem; align-items: start; margin-bottom: 3rem; }
.calc-form { display: grid; gap: 1.1rem; }
.affix { display: flex; align-items: center; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s; }
.affix:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.affix span { padding: 0 .2rem 0 .9rem; color: var(--muted); font-weight: 600; }
.affix.right span { padding: 0 .9rem 0 .2rem; }
.field .affix input { border: 0; background: transparent; box-shadow: none; }
.calc-result { position: sticky; top: calc(var(--header-h) + 20px); padding: 1.8rem; border-radius: calc(var(--radius) + 6px); color: #dfe8f3; background: radial-gradient(400px 220px at 100% 0%, rgba(241, 207, 126, .22), transparent 60%), linear-gradient(150deg, #0b1f38, #14365a 60%, #0d5e63); box-shadow: var(--shadow-lg); }
.calc-total { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 3.4rem); color: #fff; line-height: 1; margin: .2rem 0 1.2rem; }
.calc-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .12); margin-bottom: 1.2rem; }
.calc-bar span { height: 100%; transition: width .3s ease; }
.calc-lines { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: .55rem; }
.calc-lines li { display: flex; align-items: center; gap: .6rem; font-size: .95rem; }
.calc-lines strong { margin-left: auto; color: #fff; }
.sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.sw1 { background: #4fc1b7; } .sw2 { background: #f1cf7e; } .sw3 { background: #8fb7e8; } .sw4 { background: #f08a6c; } .sw5 { background: #c3a6f0; }
.calc-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 1.1rem; }
.calc-summary span { display: block; font-size: .75rem; color: #a9bbd1; }
.calc-summary strong { color: #fff; font-size: .98rem; }

/* ---------- 404 ---------- */
.notfound { min-height: 55vh; display: grid; place-items: center; }
.big-404 { font-family: var(--font-display); font-size: clamp(6rem, 18vw, 10rem); line-height: 1; margin: 0; background: linear-gradient(135deg, var(--navy), var(--primary), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound .hero-search { margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; margin-top: 2rem; background: #081629; color: #a9b7cb; padding: 4rem 0 0; }
.footer-glow { position: absolute; left: -200px; top: -260px; width: 620px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(13, 110, 110, .35), transparent 65%); pointer-events: none; }
.footer-grid { position: relative; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
.brand-light, .brand-light:hover { color: #fff; }
.brand-light .brand-sub { color: #7f93ad; }
.footer-brand p { margin-top: 1rem; font-size: .95rem; max-width: 26rem; }
.footer-note { display: flex; gap: .5rem; align-items: flex-start; font-size: .85rem !important; color: #8ea0b8; }
.footer-note svg { flex-shrink: 0; margin-top: 3px; color: #f1cf7e; }
.footer-title { font-family: var(--font-body); font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #f1cf7e; margin-bottom: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .95rem; }
.footer-links a, .footer-links .link-btn { color: #c3cfdf; text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { position: relative; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding: 1.4rem 0 1.6rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; color: #7f93ad; }
.footer-bottom p { margin: 0; }

/* Cookie banner & back to top */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; display: flex; justify-content: center; }
.cookie-banner[hidden] { display: none; }
.cookie-inner { max-width: 760px; width: 100%; display: flex; gap: 1.2rem; align-items: center; padding: 1.1rem 1.3rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.cookie-inner p { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.cookie-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 70; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: all .25s ease; }
.to-top svg { transform: rotate(-90deg); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--bg); }
body.cookie-open .to-top { bottom: 110px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .post-layout { grid-template-columns: 1fr; gap: 0; }
  .post-aside { order: -1; }
  .toc { position: static; max-height: none; margin-bottom: 2rem; }
  .post-main { max-width: none; }
}
@media (max-width: 1024px) {
  .nav-burger { display: inline-grid; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; margin: 0; background: var(--bg); padding: 1rem 16px 2rem; overflow-y: auto;
    transform: translateX(100%); transition: transform .3s ease; visibility: hidden;
  }
  body.nav-open .main-nav { transform: none; visibility: visible; }
  body.nav-open { overflow: hidden; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: .25rem; }
  .main-nav a, .menu-toggle { width: 100%; justify-content: space-between; padding: .9rem 1rem; font-size: 1.05rem; }
  .mega { position: static; transform: none; width: 100%; grid-template-columns: 1fr; box-shadow: none; display: none; opacity: 1; visibility: visible; margin-top: .3rem; }
  .has-menu.open .mega { display: grid; transform: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 480px; margin: 0 auto; width: 100%; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .lead-story { grid-template-columns: 1fr; }
  .start-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .calc-grid, .contact-grid { grid-template-columns: 1fr; }
  .calc-result { position: static; }
}
@media (max-width: 640px) {
  :root { --header-h: 66px; }
  body { font-size: 1rem; }
  .brand-name { font-size: 1.15rem; }
  .brand-sub { display: none; }
  .header-actions .icon-btn { width: 38px; height: 38px; }
  .tt-track { width: 54px; height: 30px; }
  .tt-thumb { width: 22px; height: 22px; }
  [data-theme="dark"] .tt-thumb { transform: translateX(24px); }
  .topic-grid, .card-grid, .trust-grid { grid-template-columns: 1fr; }
  .form-row.two { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats { gap: 1.4rem; }
  .hero-search { padding-left: .9rem; }
  .hero-search .btn { padding: .7em 1em; }
  .cookie-inner { flex-direction: column; align-items: stretch; }
  .cookie-actions .btn { flex: 1; }
  .prose { font-size: 1.04rem; }
  .calc-summary { grid-template-columns: 1fr 1fr; }
  .cat-hero-icon { width: 56px; height: 56px; }
  .post-meta .sep { display: none; }
  .author-box { flex-direction: column; }
}
.lead-story:not(:has(.lead-media)) { grid-template-columns: 1fr; }
.hero-grid > *, .lead-story > *, .start-grid > *, .calc-grid > *, .contact-grid > * { min-width: 0; }
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .main-nav { z-index: 60; height: calc(100dvh - var(--header-h)); }
}
@media (max-width: 640px) {
  .hero h1 { font-size: clamp(2rem, 9vw, 2.4rem); }
  .hero-lead { font-size: 1.02rem; }
}
