/* ==========================================================================
   HealthFitCalculators — Design System
   A clean, trustworthy health-utility aesthetic.
   Emerald brand + warm coral CTA. Bricolage Grotesque / Hanken Grotesk.
   ========================================================================== */

:root {
  /* Brand */
  --brand: #0c9b6a;
  --brand-dark: #07734f;
  --brand-deep: #053425;      /* deep forest — premium dark sections */
  --brand-deep-2: #021f17;
  --brand-tint: #e6f6ef;
  --brand-tint-2: #d2efe1;
  --accent: #ff6b4a;
  --accent-dark: #e8512f;
  --brass: #c69749;           /* refined gold accent for luxury detailing */
  --brass-soft: #e2b25a;

  /* Neutrals */
  --ink: #122019;
  --ink-soft: #2b3a32;
  --muted: #5b6b62;
  --faint: #8a978f;
  --bg: #f5f8f4;
  --surface: #ffffff;
  --surface-2: #fbfcfa;
  --line: #e5eae5;
  --line-strong: #d4dcd5;

  /* Status (BMI / result categories) */
  --c-low: #3b82f6;
  --c-good: #0c9b6a;
  --c-warn: #e0a000;
  --c-high: #ef6c3b;
  --c-danger: #e0413c;

  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  /* Shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Shadow — softer, more layered for depth */
  --sh-sm: 0 1px 2px rgba(18, 32, 25, .05), 0 1px 3px rgba(18, 32, 25, .04);
  --sh-md: 0 8px 24px rgba(18, 32, 25, .07), 0 2px 8px rgba(18, 32, 25, .04);
  --sh-lg: 0 30px 70px rgba(5, 52, 37, .16), 0 10px 24px rgba(18, 32, 25, .07);
  --sh-glow: 0 18px 50px rgba(12, 155, 106, .22);

  /* Layout */
  --maxw: 1140px;
  --maxw-narrow: 760px;
  --header-h: 70px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
/* Editorial serif for primary headlines — high-end, high-contrast */
h1, h2 {
  font-family: var(--font-serif); font-weight: 500; line-height: 1.06;
  letter-spacing: -.025em; color: var(--ink);
  font-optical-sizing: auto; font-variation-settings: "opsz" 96;
}
/* Sharp grotesque for secondary headings + UI */
h3, h4 { font-family: var(--font-display); line-height: 1.18; letter-spacing: -.02em; color: var(--ink); font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.22rem; }
p { color: var(--ink-soft); }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: var(--maxw-narrow); }
.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .74rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1.5px; background: var(--brass); flex: none;
}
.eyebrow.center-eb { justify-content: center; }
/* Serif editorial accent inside display headings */
.serif-em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -.01em;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(229, 234, 229, .8);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.18rem;
  color: var(--ink); letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, var(--brand), var(--brand-dark));
  display: grid; place-items: center; color: #fff; flex: none;
  box-shadow: 0 4px 12px rgba(12, 155, 106, .35);
}
.brand .mark svg { width: 20px; height: 20px; }
.brand b { color: var(--brand-dark); }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; }
.nav-links a {
  color: var(--ink-soft); font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: var(--r-pill); transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--brand-tint); color: var(--brand-dark); text-decoration: none; }
.nav-links a.active { background: var(--brand-tint); color: var(--brand-dark); }

.nav-cta {
  background: var(--ink); color: #fff !important; font-weight: 700;
  padding: 9px 16px !important; border-radius: var(--r-pill) !important;
}
.nav-cta:hover { background: var(--brand-dark); }

.menu-btn {
  display: none; border: 1px solid var(--line-strong); background: var(--surface);
  width: 42px; height: 42px; border-radius: 10px; align-items: center; justify-content: center;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative;
}
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after { position: absolute; top: 6px; }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px;
    gap: 2px; box-shadow: var(--sh-md); transform: translateY(-130%); transition: transform .25s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 14px; border-radius: var(--r-sm); }
  .nav-cta { text-align: center; margin-top: 4px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-weight: 700; font-size: 1rem; border: none; border-radius: var(--r-pill);
  padding: 14px 26px; letter-spacing: -.01em;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .2s, background .2s, filter .2s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, #ff7a5c, var(--accent-dark));
  color: #fff; box-shadow: 0 10px 26px rgba(232, 81, 47, .34), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(232, 81, 47, .42), inset 0 1px 0 rgba(255,255,255,.25); filter: saturate(108%); }
.btn-dark { background: linear-gradient(135deg, #1c3329, var(--brand-deep)); color: #fff; box-shadow: 0 10px 26px rgba(5,52,37,.28); }
.btn-dark:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(5,52,37,.36); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--sh-sm); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 76px 0 64px; overflow: hidden;
  background:
    radial-gradient(900px 440px at 90% -12%, var(--brand-tint-2), transparent 68%),
    radial-gradient(680px 360px at -5% 5%, #fff1eb, transparent 64%),
    linear-gradient(180deg, #fbfdfb, var(--bg));
}
/* faint topographic grain layer */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle at 1px 1px, rgba(7,53,36,.05) 1px, transparent 0);
  background-size: 22px 22px; mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; }
.hero h1 { margin-top: 18px; font-size: clamp(2.3rem, 5.2vw, 3.5rem); letter-spacing: -.03em; }
.hero h1 .serif-em { color: var(--brand-dark); display: inline-block; }
.hero h1 .hl { position: relative; white-space: nowrap; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 13px;
  background: linear-gradient(90deg, var(--brass-soft), var(--accent)); opacity: .26; border-radius: 4px; z-index: -1;
}
.hero p.lead { font-size: 1.2rem; color: var(--muted); margin-top: 20px; max-width: 52ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 0; margin-top: 38px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; }
.hero-trust div { display: flex; flex-direction: column; padding-right: 30px; margin-right: 30px; border-right: 1px solid var(--line); }
.hero-trust div:last-child { border-right: none; }
.hero-trust b { font-family: var(--font-serif); font-weight: 500; font-size: 1.9rem; color: var(--brand-deep); line-height: 1; }
.hero-trust span { font-size: .82rem; color: var(--muted); margin-top: 6px; }

/* Hero visual: editorial image with overlapping live card */
.hero-visual { position: relative; }
.hero-visual .shot {
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg);
  border: 1px solid rgba(255,255,255,.5); aspect-ratio: 940 / 1160; max-height: 540px; margin-left: auto;
}
.hero-visual .shot img { width: 100%; height: 100%; object-fit: cover; }
.hero-card {
  position: absolute; left: -10px; bottom: -26px; width: 290px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255,255,255,.7); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: 18px;
}
.hero-card .mini-result {
  background: linear-gradient(150deg, var(--brand-tint), #fff 70%); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px; margin-top: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.hero-card .mini-result .num { font-family: var(--font-serif); font-weight: 500; font-size: 2.3rem; color: var(--brand-dark); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero { padding-top: 44px; }
  .hero-visual { max-width: 460px; margin: 8px auto 30px; }
  .hero-visual .shot { max-height: 420px; }
  .hero-card { left: 0; bottom: -20px; }
}

/* ---------- Section ---------- */
.section { padding: 72px 0; }
.section-head { max-width: 62ch; margin-bottom: 36px; }
.section-head.center { margin-inline: auto; }
.section-head h2 { margin-top: 12px; }
.section-head h2 .serif-em { color: var(--brand-dark); }
.section-head .lead { color: var(--muted); font-size: 1.12rem; margin-top: 14px; }
.section-alt { background: linear-gradient(180deg, var(--surface-2), #f3f8f3); border-block: 1px solid var(--line); }

/* ---------- Calculator card grid (home) ---------- */
.calc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 880px) { .calc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .calc-grid { grid-template-columns: 1fr; } }

.calc-card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 24px; transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s, border-color .22s;
  display: flex; flex-direction: column; gap: 11px; height: 100%; overflow: hidden;
}
.calc-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brass-soft)); opacity: 0; transition: opacity .22s;
}
.calc-card:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: transparent; text-decoration: none; }
.calc-card:hover::before { opacity: 1; }
.calc-card .ico {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(150deg, var(--brand-tint), var(--brand-tint-2));
  color: var(--brand-dark); display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(12,155,106,.12); transition: transform .22s;
}
.calc-card:hover .ico { transform: scale(1.06) rotate(-3deg); }
.calc-card .ico svg { width: 26px; height: 26px; }
.calc-card h3 { font-size: 1.2rem; color: var(--ink); }
.calc-card p { font-size: .95rem; color: var(--muted); flex: 1; }
.calc-card .go { font-weight: 700; color: var(--brand-dark); font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; transition: gap .2s; }
.calc-card:hover .go { gap: 11px; }

/* ---------- Feature split (image + text) ---------- */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-split .shot {
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg);
  border: 1px solid rgba(255,255,255,.6);
}
.feature-split .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list .fi {
  width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: var(--brand-deep); color: #fff; box-shadow: var(--sh-glow);
}
.feature-list .fi svg { width: 20px; height: 20px; }
.feature-list h3 { font-size: 1.08rem; margin-bottom: 3px; }
.feature-list p { font-size: .96rem; color: var(--muted); margin: 0; }
@media (max-width: 860px) {
  .feature-split { grid-template-columns: 1fr; gap: 30px; }
  .feature-split .shot { order: -1; }
}

/* ---------- Calculator page layout ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); padding: 18px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand-dark); }

.calc-head { padding: 14px 0 8px; }
.calc-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.calc-head p.lead { color: var(--muted); font-size: 1.1rem; margin-top: 12px; max-width: 62ch; }

.calc-layout { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; padding-top: 14px; }
@media (max-width: 980px) { .calc-layout { grid-template-columns: 1fr; } }

.calc-main { min-width: 0; }
.calc-tool { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 620px) { .calc-tool { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); padding: 24px;
}
.panel h2.panel-title { font-size: 1.1rem; margin-bottom: 16px; }

/* Form */
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 600; font-size: .88rem; color: var(--ink-soft); margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--faint); font-size: .8rem; }
.control { display: flex; }
input[type="number"], input[type="text"], select {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.control input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.control .unit {
  display: inline-flex; align-items: center; padding: 0 13px; font-weight: 600; color: var(--muted);
  background: var(--surface-2); border: 1.5px solid var(--line-strong); border-left: none;
  border-top-right-radius: var(--r-sm); border-bottom-right-radius: var(--r-sm); font-size: .9rem;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Segmented toggle (units, sex) */
.seg { display: inline-flex; background: var(--surface-2); border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); padding: 3px; }
.seg button {
  border: none; background: transparent; padding: 7px 16px; border-radius: var(--r-pill);
  font-weight: 700; font-size: .88rem; color: var(--muted); transition: all .15s;
}
.seg button.on { background: var(--ink); color: #fff; }
.seg.brand button.on { background: var(--brand); }

/* Result panel */
.result-panel { background: linear-gradient(165deg, var(--brand-tint), var(--surface) 65%); }
.result-empty { color: var(--faint); text-align: center; padding: 26px 6px; font-size: .95rem; }
.result-big {
  font-family: var(--font-display); font-weight: 800; font-size: 3.2rem; line-height: 1; color: var(--brand-dark);
}
.result-big small { font-size: 1.1rem; font-weight: 600; color: var(--muted); }
.result-label { font-weight: 700; font-size: 1.05rem; margin-top: 6px; }
.result-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .96rem; }
.result-row:last-child { border-bottom: none; }
.result-row b { font-family: var(--font-display); color: var(--ink); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .82rem;
  padding: 5px 12px; border-radius: var(--r-pill); margin-top: 10px;
}
.chip.low { background: #e7efff; color: var(--c-low); }
.chip.good { background: var(--brand-tint); color: var(--c-good); }
.chip.warn { background: #fdf3d7; color: #9a7400; }
.chip.high { background: #ffe9df; color: var(--c-high); }
.chip.danger { background: #fde5e4; color: var(--c-danger); }

/* BMI / range scale bar */
.scale { margin-top: 16px; }
.scale-bar { height: 12px; border-radius: var(--r-pill); display: flex; overflow: hidden; }
.scale-bar i { display: block; height: 100%; }
.scale-marks { display: flex; justify-content: space-between; font-size: .72rem; color: var(--faint); margin-top: 5px; }
.scale-pointer { position: relative; height: 10px; }
.scale-pointer i {
  position: absolute; top: 0; transform: translateX(-50%);
  width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-bottom: 8px solid var(--ink); transition: left .4s cubic-bezier(.22,1,.36,1);
}

/* Goal table */
.goal-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .94rem; }
.goal-table th, .goal-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.goal-table th { font-family: var(--font-display); font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.goal-table td b { color: var(--brand-dark); font-family: var(--font-display); }

/* Macro bars */
.macro-row { display: grid; grid-template-columns: 90px 1fr 70px; align-items: center; gap: 10px; margin: 12px 0; }
.macro-row .lbl { font-weight: 700; font-size: .9rem; }
.macro-track { height: 14px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; border: 1px solid var(--line); }
.macro-track i { display: block; height: 100%; border-radius: var(--r-pill); transition: width .5s cubic-bezier(.22,1,.36,1); }
.macro-row .val { text-align: right; font-family: var(--font-display); font-weight: 700; }
.m-protein { background: #2f9e8f; } .m-carb { background: var(--accent); } .m-fat { background: #f0b429; }

/* ---------- Long-form content ---------- */
.article { padding-top: 8px; }
.article h2 { margin-top: 40px; margin-bottom: 12px; scroll-margin-top: 90px; }
.article h3 { margin-top: 26px; margin-bottom: 8px; }
.article p { margin-bottom: 14px; color: var(--ink-soft); }
.article ul, .article ol { margin: 0 0 16px 1.1em; color: var(--ink-soft); }
.article li { margin-bottom: 7px; }
.article strong { color: var(--ink); }
.article .lead-in { font-size: 1.12rem; color: var(--muted); }
.article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .95rem; }
.article table th, .article table td { padding: 11px 12px; border: 1px solid var(--line); text-align: left; }
.article table th { background: var(--brand-tint); font-family: var(--font-display); color: var(--brand-dark); }
.article table tr:nth-child(even) td { background: var(--surface-2); }

.callout {
  background: var(--brand-tint); border-left: 4px solid var(--brand); border-radius: var(--r-sm);
  padding: 16px 18px; margin: 20px 0; font-size: .97rem;
}
.callout.warn { background: #fdf3d7; border-color: var(--c-warn); }

.toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 20px; margin: 22px 0;
}
.toc h4 { font-family: var(--font-display); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.toc ul { list-style: none; padding: 0; columns: 2; gap: 18px; }
.toc li { margin-bottom: 7px; break-inside: avoid; }
.toc a { color: var(--ink-soft); font-weight: 600; font-size: .92rem; }
@media (max-width: 560px) { .toc ul { columns: 1; } }

/* FAQ */
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 4px 18px; margin-bottom: 10px; transition: border-color .15s;
}
.faq details[open] { border-color: var(--brand-tint-2); box-shadow: var(--sh-sm); }
.faq summary {
  cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 1.04rem;
  padding: 14px 26px 14px 0; list-style: none; position: relative; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 12px; font-size: 1.5rem; color: var(--brand);
  transition: transform .2s; line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 16px; }

/* Related calculators strip */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  display: flex; gap: 12px; align-items: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; transition: all .15s;
}
.related-card:hover { border-color: var(--brand); box-shadow: var(--sh-sm); text-decoration: none; transform: translateY(-2px); }
.related-card .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-tint); color: var(--brand-dark); display: grid; place-items: center; flex: none; }
.related-card .ico svg { width: 20px; height: 20px; }
.related-card b { display: block; color: var(--ink); font-family: var(--font-display); font-size: .98rem; }
.related-card span { font-size: .82rem; color: var(--muted); }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 980px) { .sidebar { position: static; } }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; }
.side-box h4 { font-family: var(--font-display); font-size: .95rem; margin-bottom: 12px; }
.side-list { list-style: none; padding: 0; }
.side-list li { margin-bottom: 4px; }
.side-list a { display: block; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink-soft); font-weight: 600; font-size: .92rem; }
.side-list a:hover { background: var(--brand-tint); color: var(--brand-dark); text-decoration: none; }
.side-list a.active { background: var(--brand-tint); color: var(--brand-dark); }

/* Affiliate product card */
.aff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .aff-grid { grid-template-columns: 1fr; } }
.aff-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; background: var(--surface); }
.aff-card .tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.aff-card b { display: block; font-family: var(--font-display); margin: 4px 0; }
.aff-card .price { color: var(--brand-dark); font-weight: 700; font-size: .9rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cdd8d1; padding: 52px 0 26px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
.site-footer .brand { color: #fff; }
.site-footer .brand b { color: #6fe0ac; }
.site-footer p { color: #9fb0a6; font-size: .92rem; margin-top: 12px; max-width: 34ch; }
.footer-col h5 { font-family: var(--font-display); color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer-col a { display: block; color: #b8c6bd; font-size: .92rem; padding: 5px 0; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .84rem; color: #8295899; }
.footer-bottom .disc { color: #8a9a90; max-width: 70ch; }

/* ---------- Misc / utilities ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag-list a { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 14px; font-size: .85rem; color: var(--ink-soft); font-weight: 600; }
.tag-list a:hover { border-color: var(--brand); color: var(--brand-dark); text-decoration: none; }
.divider { height: 1px; background: var(--line); border: none; margin: 30px 0; }
.note { font-size: .85rem; color: var(--faint); }

/* Reveal animation */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .6s cubic-bezier(.22,1,.36,1) both; }
.reveal-2 { animation-delay: .08s; }
.reveal-3 { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* Legal / simple text pages */
.doc { padding: 30px 0 10px; }
.doc h1 { margin-bottom: 8px; }
.doc h2 { margin-top: 32px; margin-bottom: 10px; font-size: 1.4rem; }
.doc p, .doc li { color: var(--ink-soft); margin-bottom: 12px; }
.doc ul { margin-left: 1.1em; }

/* ==========================================================================
   High-end refinements (v2)
   ========================================================================== */

/* Premium dark CTA band */
.cta-band {
  position: relative; margin: 0 0 0; padding: 86px 0; overflow: hidden;
  background:
    radial-gradient(700px 320px at 82% 0%, rgba(18,176,122,.4), transparent 65%),
    radial-gradient(560px 300px at 8% 100%, rgba(198,151,73,.22), transparent 60%),
    linear-gradient(160deg, var(--brand-deep), var(--brand-deep-2));
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 0);
  background-size: 24px 24px;
}
.cta-inner { position: relative; max-width: 640px; margin-inline: auto; text-align: center; }
.cta-eb { color: var(--brass-soft); }
.cta-eb::before { background: var(--brass-soft); }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.cta-band h2 .serif-em { color: var(--brass-soft); }
.cta-band p { color: rgba(235,250,243,.8); font-size: 1.12rem; margin: 16px auto 28px; max-width: 46ch; }
.cta-tags { justify-content: center; margin-top: 30px; }
.cta-band .tag-list a {
  background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: rgba(235,250,243,.92);
}
.cta-band .tag-list a:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); color: #fff; }

/* Display weight tuning for serif headings */
.hero h1, .cta-band h2 { font-weight: 500; }

/* Calculator-page hero result number → serif for editorial feel */
.result-big { font-family: var(--font-serif) !important; font-weight: 500 !important; letter-spacing: -.02em; }

/* Brand mark refinement */
.brand .mark { box-shadow: 0 6px 16px rgba(12,155,106,.4), inset 0 1px 0 rgba(255,255,255,.3); }

/* Section-alt feature image subtle frame glow */
.feature-split .shot { position: relative; }
.feature-split .shot::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--r-xl);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); pointer-events: none;
}

/* Footer: warm up the dark with a hairline brass top accent */
.site-footer { position: relative; }
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent); opacity: .5;
}
