/* ==========================================================================
   QuickFitnessTools.com — Global Design System
   Palette, typography, layout primitives, navigation, footer, components,
   calculator widget, animations, accessibility, responsive breakpoints.
   ========================================================================== */

/* ----- Design Tokens ----- */
:root {
  /* Palette */
  --brand-primary:     #00B488;   /* vibrant mint (fills / buttons) */
  --brand-primary-ink: #047857;   /* deep emerald (text / links) */
  --brand-dark:        #0B1220;   /* dark ink (text on mint, rings) */
  --brand-bg:          #F7FAFC;   /* page background */
  --brand-surface:     #FFFFFF;   /* card surfaces */
  --brand-surface-2:   #EEF3F8;   /* inset inputs / toggles */
  --brand-border:      #E2E8F0;   /* subtle borders */
  --brand-text:        #0F172A;   /* primary text */
  --brand-muted:       #5B6B7F;   /* secondary text */
  --brand-accent:      #4F46E5;   /* indigo accent */

  --primary-glow: rgba(0, 180, 140, 0.18);
  --primary-soft: rgba(0, 180, 140, 0.10);
  --glass-bg:     rgba(255, 255, 255, 0.72);
  --glass-border: rgba(15, 23, 42, 0.08);

  /* Type families */
  --font-display: "Poppins", system-ui, sans-serif;
  --font-body:    "Outfit", system-ui, sans-serif;
  --font-mono:    "Outfit", system-ui, sans-serif;

  /* Type scale (px) 12/14/16/20/24/32/48/64/80 */
  --fs-xs:  0.75rem;
  --fs-sm:  0.875rem;
  --fs-md:  1rem;
  --fs-lg:  1.25rem;
  --fs-xl:  1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 3rem;
  --fs-4xl: 4rem;
  --fs-5xl: 5rem;

  /* Layout */
  --max-width: 1280px;
  --radius-card: 16px;
  --radius-pill: 50px;
  --section-pad: 96px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --speed: 300ms;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--brand-text);
  background: var(--brand-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ----- Typography ----- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6vw, var(--fs-4xl)); }
h2 { font-size: clamp(1.75rem, 4vw, var(--fs-3xl)); }
h3 { font-size: var(--fs-xl); }
p { color: var(--brand-text); }
.muted { color: var(--brand-muted); }
.mono { font-family: var(--font-mono); }

/* ----- Layout primitives ----- */
.wrap { width: 100%; max-width: var(--max-width); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 40px; }
@media (min-width: 768px) { .section { padding-block: 56px; } }
@media (min-width: 1024px) { .section { padding-block: var(--section-pad); } }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand-primary-ink);
  margin-bottom: 16px;
}
.section-title { margin-bottom: 16px; }
.section-lead { color: var(--brand-muted); font-size: var(--fs-lg); max-width: 60ch; }

/* Skip link (a11y) */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--brand-primary); color: var(--brand-dark);
  padding: 12px 20px; border-radius: 0 0 12px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: var(--fs-md);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background var(--speed) var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--brand-primary); color: var(--brand-dark);
  box-shadow: 0 8px 30px var(--primary-glow);
}
.btn-primary:hover { box-shadow: 0 12px 40px rgba(0, 200, 150, 0.35); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--brand-text); border: 1px solid var(--brand-border); }
.btn-ghost:hover { border-color: var(--brand-primary); color: var(--brand-primary-ink); }
.btn-block { width: 100%; }

/* ----- Cards / glassmorphism ----- */
.card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 10px 30px rgba(15,23,42,0.05);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 12px 34px rgba(15,23,42,0.06);
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px var(--primary-glow);
  border-color: rgba(0, 200, 150, 0.25);
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: var(--fs-xs);
  padding: 6px 12px; border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.badge-mint { background: var(--primary-soft); color: var(--brand-primary); border: 1px solid rgba(0,200,150,0.25); }
.badge-indigo { background: rgba(99,102,241,0.12); color: var(--brand-accent); border: 1px solid rgba(99,102,241,0.3); }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--brand-border); background: rgba(255, 255, 255, 0.9); box-shadow: 0 4px 20px rgba(15,23,42,0.06); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); }
.logo .pulse-dot {
  width: 12px; height: 12px; border-radius: 50%; background: var(--brand-primary);
  box-shadow: 0 0 0 0 var(--brand-primary); animation: dot-pulse 2.4s infinite;
}
@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,200,150,0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(0,200,150,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,200,150,0); }
}

.nav-links { display: none; align-items: center; gap: 32px; }
.nav-links a { color: var(--brand-muted); font-weight: 500; transition: color var(--speed) var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--brand-text); }
.nav-cta { display: none; }

.nav-toggle {
  display: flex; flex-direction: column; gap: 5px; width: 40px; height: 40px;
  align-items: center; justify-content: center; border-radius: 10px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--brand-text); border-radius: 2px; transition: transform var(--speed) var(--ease), opacity var(--speed) var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* Mobile overlay menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: var(--brand-bg);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 32px;
  transform: translateX(100%);
  transition: transform 400ms var(--ease);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700;
  padding: 12px 0; opacity: 0; transform: translateY(16px);
}
.mobile-menu.open a { animation: menu-in 400ms var(--ease) forwards; }
.mobile-menu.open a:nth-child(1) { animation-delay: 80ms; }
.mobile-menu.open a:nth-child(2) { animation-delay: 140ms; }
.mobile-menu.open a:nth-child(3) { animation-delay: 200ms; }
.mobile-menu.open a:nth-child(4) { animation-delay: 260ms; }
.mobile-menu.open a:nth-child(5) { animation-delay: 320ms; }
.mobile-menu.open a:nth-child(6) { animation-delay: 380ms; }
@keyframes menu-in { to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   Hero + breathing radial grid
   ========================================================================== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(0,180,140,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,180,140,0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.04); }
}
.hero-glow {
  position: absolute; top: 30%; left: 50%; transform: translateX(-50%);
  width: 640px; height: 640px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(0,180,140,0.14), transparent 65%);
  filter: blur(20px); pointer-events: none;
}
.hero-content { position: relative; z-index: 1; text-align: center; padding-block: 120px; }
.hero h1 { margin-bottom: 24px; }
.hero h1 .accent { color: var(--brand-primary); }
.hero-sub { font-size: clamp(1rem, 2.2vw, 1.375rem); color: var(--brand-muted); max-width: 56ch; margin: 0 auto 36px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 40px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: center; }
.trust-item { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--brand-muted); display: flex; align-items: center; gap: 8px; }
.trust-item::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-primary); }

/* ==========================================================================
   Stats bar
   ========================================================================== */
.stats-bar { background: var(--brand-surface); border-block: 1px solid var(--brand-border); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 16px; padding-block: 48px; text-align: center; }
.stat-value { font-family: var(--font-mono); font-size: var(--fs-2xl); font-weight: 700; color: var(--brand-primary); }
.stat-label { font-size: var(--fs-sm); color: var(--brand-muted); margin-top: 4px; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================================================
   Category + calculator card grids
   ========================================================================== */
.grid { display: grid; gap: 24px; }
.grid-cats { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-cats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cats { grid-template-columns: repeat(3, 1fr); } }

.cat-card { display: flex; flex-direction: column; gap: 12px; }
.cat-icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary-soft), rgba(99,102,241,0.12));
  border: 1px solid var(--glass-border);
}
.cat-icon svg { width: 28px; height: 28px; stroke: var(--brand-primary); }
.cat-card h3 { font-family: var(--font-display); }
.cat-count { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--brand-accent); }
.cat-link { margin-top: auto; color: var(--brand-primary-ink); font-weight: 600; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: 6px; }
.cat-link::after { content: "→"; transition: transform var(--speed) var(--ease); }
.cat-card:hover .cat-link::after { transform: translateX(4px); }

/* Pill quick-access row */
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  padding: 10px 18px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 500;
  background: var(--brand-surface); border: 1px solid var(--brand-border); color: var(--brand-muted);
  transition: all var(--speed) var(--ease);
}
.pill:hover { border-color: var(--brand-primary); color: var(--brand-primary-ink); background: var(--primary-soft); }

/* How it works */
.steps { display: grid; gap: 24px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; }
.step-num {
  font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--brand-primary-ink);
  border: 1px solid rgba(0,180,140,0.35); border-radius: var(--radius-pill);
  width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 16px;
}
.step h3 { font-size: var(--fs-lg); margin-bottom: 8px; }

/* Trust / accuracy split */
.split { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; } }
.icon-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.icon-tile { padding: 20px; text-align: center; }
.icon-tile .v { font-family: var(--font-mono); color: var(--brand-primary-ink); font-weight: 700; font-size: var(--fs-lg); }
.icon-tile .l { font-size: var(--fs-sm); color: var(--brand-muted); margin-top: 4px; }

/* Blog cards */
.grid-blog { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-blog { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-blog { grid-template-columns: repeat(3, 1fr); } }
.blog-card { overflow: hidden; padding: 0; }
.blog-thumb { height: 160px; background: linear-gradient(135deg, #D1FAE5, #E0E7FF); position: relative; }
.blog-thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(0,200,150,0.18) 1px, transparent 1px); background-size: 22px 22px;
}
.blog-body { padding: 24px; }
.blog-body h3 { font-size: var(--fs-lg); margin: 12px 0 8px; }
.blog-excerpt { color: var(--brand-muted); font-size: var(--fs-sm); margin-bottom: 16px; }
.read-more { color: var(--brand-primary-ink); font-weight: 600; font-size: var(--fs-sm); }

/* ==========================================================================
   Calculator widget
   ========================================================================== */
.calc-shell { display: grid; gap: 24px; grid-template-columns: 1fr; max-width: 1040px; margin-inline: auto; }
@media (min-width: 900px) { .calc-shell { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.unit-toggle { display: inline-flex; padding: 4px; border-radius: var(--radius-pill); background: var(--brand-surface-2); border: 1px solid var(--brand-border); }
.unit-toggle button { padding: 8px 20px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 600; color: var(--brand-muted); transition: all var(--speed) var(--ease); }
.unit-toggle button.active { background: var(--brand-primary); color: var(--brand-dark); }

.field { margin-bottom: 20px; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 8px; color: var(--brand-text); }
.field input, .field select {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  background: var(--brand-surface-2); border: 1px solid var(--brand-border); color: var(--brand-text);
  font-family: var(--font-mono);
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--brand-primary);
  animation: pulse-ring 1.6s var(--ease) infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(0,200,150,0.35); }
  70%  { box-shadow: 0 0 0 8px rgba(0,200,150,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,200,150,0); }
}
.field.invalid input { border-color: #ef4444; animation: none; }
.field-error { color: #DC2626; font-size: var(--fs-sm); margin-top: 6px; display: none; }
.field.invalid .field-error { display: block; }

.field-row { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 480px) { .field-row { grid-template-columns: 1fr 1fr; } }

.calc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.calc-actions .btn { flex: 1 1 auto; }
@media (max-width: 479px) { .calc-actions .btn-primary { width: 100%; flex-basis: 100%; } }

/* Results */
.results { margin-top: 8px; opacity: 0; max-height: 0; overflow: hidden; transition: opacity 400ms var(--ease); }
.results.show { opacity: 1; max-height: none; }
.result-main { text-align: center; padding: 32px 24px; border-radius: var(--radius-card); border: 1px solid #BBF1DE; background: #ECFDF5; }
.result-number { font-family: var(--font-mono); font-size: var(--fs-4xl); font-weight: 700; line-height: 1; }
.result-cat { display: inline-block; margin-top: 12px; padding: 6px 16px; border-radius: var(--radius-pill); font-weight: 600; font-size: var(--fs-sm); }
.result-sub { color: var(--brand-muted); font-size: var(--fs-sm); margin-top: 12px; }

/* result colour coding */
.c-green  { color: var(--brand-primary-ink); }   .bg-green  { background: var(--primary-soft); color: var(--brand-primary-ink); }
.c-yellow { color: #B45309; }                 .bg-yellow { background: rgba(180,83,9,0.12); color: #B45309; }
.c-orange { color: #C2410C; }                 .bg-orange { background: rgba(194,65,12,0.12); color: #C2410C; }
.c-red    { color: #DC2626; }                 .bg-red    { background: rgba(220,38,38,0.10); color: #DC2626; }

/* Gauge (CSS) */
.gauge { margin-top: 24px; }
.gauge-track { height: 12px; border-radius: var(--radius-pill); background: linear-gradient(90deg, #60a5fa, var(--brand-primary) 40%, #facc15 65%, #fb923c 82%, #f87171); position: relative; }
.gauge-marker { position: absolute; top: -6px; width: 4px; height: 24px; background: var(--brand-text); border-radius: 2px; transform: translateX(-50%); transition: left 600ms var(--ease); box-shadow: 0 0 0 2px #fff; }
.gauge-labels { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--brand-muted); margin-top: 8px; }

/* ==========================================================================
   Content sections (calculator article body)
   ========================================================================== */
.prose { max-width: 920px; margin-inline: auto; }
.prose h2 { margin: 48px 0 16px; }
.prose h3 { margin: 28px 0 10px; }
.prose p { margin-bottom: 16px; color: var(--brand-text); }
.prose ol, .prose ul { margin: 0 0 16px 22px; }
.prose ol li, .prose ul li { margin-bottom: 8px; }
.prose ul li { list-style: none; position: relative; padding-left: 22px; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-primary); }

.formula-box { background: #F0FDFA; border: 1px solid #BBF1DE; border-left: 4px solid var(--brand-primary); border-radius: 12px; padding: 24px; font-family: var(--font-mono); color: var(--brand-text); margin: 16px 0; overflow-x: auto; }
.var-list { font-family: var(--font-mono); font-size: var(--fs-sm); }
.var-list dt { color: var(--brand-primary-ink); font-weight: 700; margin-top: 8px; }
.var-list dd { color: var(--brand-muted); margin-left: 0; }

.range-cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .range-cards { grid-template-columns: repeat(2, 1fr); } }
.range-card { padding: 18px; border-radius: 12px; border: 1px solid var(--brand-border); background: var(--brand-surface); }
.range-card .r-label { font-weight: 700; }
.range-card .r-range { font-family: var(--font-mono); font-size: var(--fs-sm); }
.range-card .r-desc { color: var(--brand-muted); font-size: var(--fs-sm); margin-top: 4px; }

.refs { font-size: var(--fs-sm); color: var(--brand-muted); }
.refs li { margin-bottom: 12px; counter-increment: ref; padding-left: 28px; position: relative; list-style: none; }
.refs li::before { content: counter(ref); position: absolute; left: 0; top: 0; font-family: var(--font-mono); color: var(--brand-primary-ink); }
.refs { counter-reset: ref; }

/* breadcrumb */
.crumbs { font-size: var(--fs-sm); color: var(--brand-muted); display: flex; flex-wrap: wrap; gap: 8px; padding-block: 20px; }
.crumbs a:hover { color: var(--brand-primary-ink); }
.crumbs span { color: var(--brand-border); }

/* related cards scroll row */
.scroll-row { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.scroll-row .card { min-width: 240px; scroll-snap-align: start; }

/* AdSense placeholder */
.ad-slot { margin: 32px auto; display: grid; place-items: center; min-height: 90px; max-width: 728px; border: 1px dashed var(--brand-border); border-radius: 12px; color: var(--brand-muted); font-family: var(--font-mono); font-size: var(--fs-xs); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--brand-surface-2); border-top: 1px solid var(--brand-border); padding-block: 56px 32px; }
.footer-top { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-top { grid-template-columns: 1.5fr 1fr 1fr; } }
@media (min-width: 1024px) { .footer-top { grid-template-columns: 1.6fr repeat(4, 1fr); } }
.footer-brand p { color: var(--brand-muted); font-size: var(--fs-sm); margin-top: 12px; max-width: 32ch; }
.footer-col h4 { font-family: var(--font-display); font-size: var(--fs-md); margin-bottom: 16px; }
.footer-col a { display: block; color: var(--brand-muted); font-size: var(--fs-sm); padding: 5px 0; transition: color var(--speed) var(--ease); }
.footer-col a:hover { color: var(--brand-primary-ink); }
.footer-bottom { border-top: 1px solid var(--brand-border); margin-top: 40px; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: var(--fs-xs); color: var(--brand-muted); }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Accessibility: focus + reduced motion
   ========================================================================== */
:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-grid { animation: none; }
}

/* ----- FAQ accordion ----- */
.faq-list { max-width: 72ch; }
.faq-item { border: 1px solid var(--brand-border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: var(--brand-surface); }
.faq-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-weight: 600; color: var(--brand-text); }
.faq-q .chev { transition: transform var(--speed) var(--ease); color: var(--brand-primary-ink); flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--speed) var(--ease); }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a p { padding: 0 20px 18px; color: var(--brand-muted); }

/* compact page hero */
.page-hero { padding-block: 32px 16px; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 5vw, var(--fs-3xl)); margin: 0 auto 12px; }
.page-hero .lead { color: var(--brand-muted); font-size: var(--fs-lg); max-width: 62ch; margin: 0 auto 16px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ==========================================================================
   Two-column calculator layout (input card + results card)
   ========================================================================== */
.calc-inputs, .calc-output { padding: 28px; }
.calc-output { display: flex; flex-direction: column; }

/* small card headers */
.calc-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.calc-card-head-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); border: 1px solid #BBF1DE; flex-shrink: 0; }
.calc-card-head-ic svg { width: 22px; height: 22px; stroke: var(--brand-primary); fill: none; }
.calc-card-title { font-size: 1.15rem; line-height: 1.2; }
.calc-card-sub { color: var(--brand-muted); font-size: var(--fs-sm); margin-top: 2px; }

/* awaiting-data empty state */
.calc-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; min-height: 300px; padding: 24px; }
.calc-empty-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); border: 1px solid #BBF1DE; animation: float 3.2s ease-in-out infinite; }
.calc-empty-icon svg { width: 34px; height: 34px; stroke: var(--brand-primary); fill: none; }
.calc-empty h3 { font-size: 1.3rem; }
.calc-empty p { color: var(--brand-muted); font-size: var(--fs-sm); max-width: 34ch; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* hide the empty state once a result is shown */
.calc-output.has-result .calc-empty { display: none; }

/* results fill the output card and centre vertically */
.calc-output .results { flex: 1; }
.calc-output .results.show { display: flex; flex-direction: column; justify-content: center; }

/* subtle result reveal animation */
@keyframes result-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
.results.show .result-main { animation: result-in 520ms var(--ease) both; }
.results.show .result-cat { animation: result-in 520ms var(--ease) 90ms both; }
.results.show .result-sub { animation: result-in 520ms var(--ease) 160ms both; }
.results.show #extra { animation: result-in 520ms var(--ease) 230ms both; }

@media (prefers-reduced-motion: reduce) {
  .calc-empty-icon, .results.show .result-main, .results.show .result-cat, .results.show .result-sub, .results.show #extra { animation: none; }
}

/* tidy action buttons inside the two-column input card */
.calc-inputs .calc-actions { gap: 10px; }
.calc-inputs .calc-actions .btn-primary { flex: 1 1 100%; }
.calc-inputs .calc-actions .btn-ghost { flex: 1 1 0; min-width: 0; padding-inline: 14px; }

/* ==========================================================================
   Homepage redesign
   ========================================================================== */
.hero-pill { display: inline-block; padding: 7px 16px; border-radius: var(--radius-pill); background: var(--primary-soft); color: var(--brand-primary-ink); border: 1px solid #BBF1DE; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 24px; }
.trust-row { list-style: none; }

.section-head { text-align: center; max-width: 660px; margin-inline: auto; }
.section-head .eyebrow { color: var(--brand-primary-ink); }
.section-head .section-lead { margin-inline: auto; }

.tool-name { font-size: 1.3rem; margin: 14px 0 8px; line-height: 1.2; }
.card-hover .cat-link { margin-top: 16px; }

/* feature tiles */
.feature-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature { text-align: left; }
.feature-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary-soft), rgba(99,102,241,0.10)); border: 1px solid #BBF1DE; margin-bottom: 16px; }
.feature-ic svg { width: 26px; height: 26px; stroke: var(--brand-primary); fill: none; }
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }

/* subtle banded section */
.band { background: var(--brand-surface-2); }

/* CTA band */
.cta-band { text-align: center; padding: 56px 28px; max-width: 860px; margin-inline: auto; }
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { max-width: 46ch; margin: 0 auto 24px; }

/* ==========================================================================
   Footer (centered)
   ========================================================================== */
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.footer-logo { display: inline-flex; align-items: center; gap: 12px; }
.footer-logo-mark { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-primary), #0CA678); box-shadow: 0 8px 24px var(--primary-glow); }
.footer-logo-mark svg { width: 24px; height: 24px; }
.footer-logo-text { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1; color: var(--brand-text); display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.footer-logo-text small { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.2em; color: var(--brand-muted); }
.footer-tagline { color: var(--brand-muted); max-width: 52ch; }
.footer-socials { display: flex; gap: 12px; }
.footer-socials .social { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-surface); border: 1px solid var(--brand-border); color: var(--brand-muted); transition: transform var(--speed) var(--ease), color var(--speed) var(--ease), border-color var(--speed) var(--ease); }
.footer-socials .social:hover { color: var(--brand-primary); border-color: var(--brand-primary); transform: translateY(-3px); }
.footer-socials .social svg { width: 18px; height: 18px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; }
.footer-nav a { color: var(--brand-text); font-weight: 600; font-size: 0.95rem; transition: color var(--speed) var(--ease); }
.footer-nav a:hover { color: var(--brand-primary-ink); }
.footer-divider { width: 100%; max-width: 1000px; height: 1px; background: var(--brand-border); }
.footer-copy { color: var(--brand-muted); font-size: var(--fs-sm); max-width: 64ch; }

/* ==========================================================================
   Tweaks: hero spacing, stats + how-it-works sizing, logo, disclaimer band
   ========================================================================== */
/* 1) tighter hero */
.hero { min-height: auto; }
.hero-content { padding-block: 72px 60px; }

/* 2a) bigger stats */
.stat-value { font-size: clamp(2.4rem, 4.5vw, 3.4rem); }
.stat-label { font-size: var(--fs-md); margin-top: 8px; }
.stats-grid { padding-block: 56px; gap: 40px 16px; }

/* 2b) how-it-works: less padding, larger type */
.band { padding-block: 56px; }
@media (min-width: 1024px) { .band { padding-block: 64px; } }
.steps { gap: 32px; }
.steps .step h3 { font-size: 1.55rem; margin-bottom: 10px; }
.steps .step p { font-size: 1.0625rem; }
.step-num { width: 50px; height: 50px; font-size: 1.1rem; margin-bottom: 18px; }

/* 3) header logo with icon + slogan */
.logo { gap: 11px; }
.logo-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-primary), #0CA678); box-shadow: 0 6px 18px var(--primary-glow); flex-shrink: 0; }
.logo-mark svg { width: 21px; height: 21px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--brand-text); }
.logo-text small { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.01em; color: var(--brand-muted); margin-top: 3px; }
@media (max-width: 420px) { .logo-text small { display: none; } }

/* 4) disclaimer band above footer */
.disclaimer-band { padding-block: 8px 40px; }
.disclaimer-box { display: flex; gap: 16px; align-items: flex-start; max-width: 940px; margin-inline: auto; background: var(--brand-surface); border: 1px solid var(--brand-border); border-radius: 16px; padding: 22px 26px; box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 10px 30px rgba(15,23,42,0.05); }
.disclaimer-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); border: 1px solid #BBF1DE; flex-shrink: 0; }
.disclaimer-ic svg { width: 22px; height: 22px; stroke: var(--brand-primary); fill: none; }
.disclaimer-box p { color: var(--brand-muted); font-size: 0.95rem; line-height: 1.65; }
.disclaimer-box strong { color: var(--brand-text); }

/* ==========================================================================
   Result "report" cards (rich, downloadable)
   ========================================================================== */
.calc-output .result-main { padding: 0; overflow: hidden; text-align: left; background: var(--brand-surface); border: 1px solid var(--brand-border); }

.report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; background: var(--brand-dark); color: #fff; }
.report-head .rh-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.report-head .rh-ic { width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,0.10); display: grid; place-items: center; flex-shrink: 0; }
.report-head .rh-ic svg { width: 17px; height: 17px; stroke: var(--brand-primary); fill: none; }
.report-head .rh-title { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--brand-primary); color: #04241b; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; padding: 5px 11px; border-radius: 50px; flex-shrink: 0; text-transform: uppercase; }
.report-badge svg { width: 12px; height: 12px; fill: #04241b; }

.report-body { padding: 28px 24px; text-align: center; }
.report-body .result-number { line-height: 1; }
.rn-unit { font-size: 0.38em; color: var(--brand-muted); font-weight: 700; margin-left: 4px; }
.report-sub-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--brand-surface); border: 1px solid var(--brand-border); border-radius: 50px; padding: 7px 15px; font-weight: 600; color: var(--brand-text); font-size: 0.85rem; box-shadow: 0 2px 8px rgba(15,23,42,0.05); }
.report-sub-pill svg { width: 15px; height: 15px; stroke: var(--brand-primary); fill: none; }

.report-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--brand-border); background: var(--brand-surface-2); }
.report-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; color: var(--brand-text); font-size: 0.88rem; }
.report-brand .rb-mark { width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, var(--brand-primary), #0CA678); display: grid; place-items: center; }
.report-brand .rb-mark svg { width: 13px; height: 13px; }
.report-dl { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--brand-border); background: var(--brand-surface); color: var(--brand-text); font-family: var(--font-body); font-weight: 600; font-size: 0.85rem; padding: 8px 14px; border-radius: 50px; cursor: pointer; transition: border-color var(--speed) var(--ease), color var(--speed) var(--ease); }
.report-dl:hover { border-color: var(--brand-primary); color: var(--brand-primary-ink); }
.report-dl svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }

/* gauge */
.report-gauge { margin: 22px 0 4px; text-align: left; }
.report-gauge .rg-labels { display: flex; justify-content: space-between; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; color: var(--brand-muted); text-transform: uppercase; margin-bottom: 9px; }
.report-gauge .rg-track { height: 14px; border-radius: 50px; background: var(--brand-surface-2); border: 1px solid var(--brand-border); overflow: hidden; }
.report-gauge .rg-fill { height: 100%; border-radius: 50px; background: linear-gradient(90deg, #34d399, var(--brand-primary)); transition: width 800ms var(--ease); }

/* insight / goal cards */
.report-section-title { display: flex; align-items: center; gap: 8px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-muted); margin: 24px 0 12px; text-align: left; }
.report-section-title svg { width: 16px; height: 16px; stroke: var(--brand-primary); fill: none; }
.goal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; text-align: center; }
@media (min-width: 520px) { .goal-grid { grid-template-columns: repeat(3, 1fr); } }
.goal-card { border-radius: 14px; padding: 16px 10px; background: var(--brand-surface-2); }
.goal-card .gc-label { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 7px; color: var(--brand-muted); }
.goal-card .gc-val { font-size: 1.5rem; font-weight: 800; font-family: var(--font-display); line-height: 1; color: var(--brand-text); }
.goal-card .gc-sub { font-size: 0.7rem; color: var(--brand-muted); margin-top: 6px; }
.goal-card.g-green { background: rgba(0,180,140,0.10); } .goal-card.g-green .gc-label, .goal-card.g-green .gc-val { color: var(--brand-primary-ink); }
.goal-card.g-amber { background: rgba(180,131,9,0.12); } .goal-card.g-amber .gc-label, .goal-card.g-amber .gc-val { color: #92600a; }
.goal-card.g-orange { background: rgba(194,65,12,0.12); } .goal-card.g-orange .gc-label, .goal-card.g-orange .gc-val { color: #c2410c; }
.goal-card.g-red { background: rgba(220,38,38,0.10); } .goal-card.g-red .gc-label, .goal-card.g-red .gc-val { color: #dc2626; }
.goal-card.g-blue { background: rgba(37,99,235,0.10); } .goal-card.g-blue .gc-label, .goal-card.g-blue .gc-val { color: #2563eb; }

/* note */
.report-note { display: flex; gap: 12px; text-align: left; background: var(--primary-soft); border: 1px solid #BBF1DE; border-radius: 14px; padding: 16px 18px; margin-top: 22px; }
.report-note .rn-ic { flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; background: #fff; border: 1px solid #BBF1DE; display: grid; place-items: center; }
.report-note .rn-ic svg { width: 18px; height: 18px; stroke: var(--brand-primary); fill: none; }
.report-note .rn-t { font-weight: 700; color: var(--brand-text); font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 4px; }
.report-note p { color: var(--brand-muted); font-size: 0.88rem; line-height: 1.55; }

/* ==========================================================================
   Mobile overflow fixes (calculator widget + report cards)
   ========================================================================== */
/* Let grid tracks shrink below content min-content so cards never exceed viewport */
.calc-shell { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .calc-shell { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.calc-shell > *, .calc-inputs, .calc-output,
.calc-output .results, .calc-output .result-main, .report-body { min-width: 0; }
.report-body { overflow-wrap: anywhere; }

/* Report header: keep title + badge on one tidy line, title ellipsizes if tight */
.report-head { gap: 10px; }
.report-head .rh-l { min-width: 0; flex: 1 1 auto; }
.report-head .rh-title { min-width: 0; }
.report-badge { flex-shrink: 0; }

/* Gauge + brand row stay within the card on small screens */
.report-gauge .rg-labels { gap: 6px; }
.report-gauge .rg-labels span { white-space: nowrap; }
.report-gauge .rg-labels span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.report-foot { flex-wrap: wrap; }

@media (max-width: 420px) {
  .calc-inputs, .calc-output { padding: 20px; }
  .report-body { padding: 24px 18px; }
  .report-head { padding: 13px 16px; }
  .report-head .rh-title { font-size: 0.9rem; }
  .report-badge { font-size: 0.6rem; padding: 5px 9px; }
  .goal-card .gc-val { font-size: 1.3rem; }
  .report-foot { padding: 12px 14px; }
  .report-dl { padding: 8px 12px; }
}

/* Hero number + unit: keep unit on one line, size down on small screens */
.rn-unit { white-space: nowrap; }
.report-body .result-number { overflow-wrap: normal; }
@media (max-width: 480px) {
  .report-body .result-number { font-size: 2.5rem; line-height: 1.05; }
}
@media (max-width: 360px) {
  .report-body .result-number { font-size: 2.1rem; }
}

/* ==========================================================================
   About + legal page polish, subtle content animations
   ========================================================================== */
@keyframes ecgDraw { from { stroke-dashoffset: 560; } to { stroke-dashoffset: 0; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes drawIn { to { stroke-dashoffset: 0; } }

.prose .lead { font-size: 1.18rem; color: var(--brand-muted); line-height: 1.6; }
.about-banner { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--brand-dark), #10233b); color: #fff; border-radius: 20px; padding: 34px 30px; margin: 34px 0; }
.about-banner h2 { color: #fff; margin-bottom: 8px; }
.about-banner p { color: rgba(255,255,255,0.82); margin: 0; }
.about-banner .ecg { display: block; width: 100%; height: 56px; margin-top: 18px; }
.about-banner .ecg path { fill: none; stroke: var(--brand-primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 560; animation: ecgDraw 3.4s var(--ease) infinite; }
.about-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 30px 0; }
@media (min-width: 620px) { .about-stats { grid-template-columns: repeat(4, 1fr); } }
.about-stats .as-card { background: var(--brand-surface); border: 1px solid var(--brand-border); border-radius: 16px; padding: 22px 16px; text-align: center; }
.about-stats .as-v { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; color: var(--brand-primary-ink); line-height: 1; }
.about-stats .as-l { font-size: 0.82rem; color: var(--brand-muted); margin-top: 7px; }
.value-ic { animation: floaty 5s ease-in-out infinite; }
.legal-updated { display: inline-block; background: var(--brand-surface-2); border: 1px solid var(--brand-border); border-radius: 50px; padding: 6px 14px; font-size: 0.85rem; color: var(--brand-muted); margin-bottom: 14px; }
.prose .feature-grid { margin: 28px 0; }
.prose .feature { text-align: left; }

/* tool-page explainer illustration */
.tool-figure { background: linear-gradient(135deg, var(--primary-soft), rgba(99,102,241,0.07)); border: 1px solid var(--brand-border); border-radius: 18px; padding: 26px; margin: 28px 0; }
.tool-figure svg { display: block; width: 100%; height: auto; max-height: 230px; }
.tool-figure .tf-cap { text-align: center; color: var(--brand-muted); font-size: 0.88rem; margin-top: 14px; }
.tool-figure .anim-dash { stroke-dasharray: 600; stroke-dashoffset: 600; animation: drawIn 2.2s var(--ease) forwards; }
.tool-figure .anim-pulse { transform-box: fill-box; transform-origin: center; animation: floaty 4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .about-banner .ecg path, .value-ic, .tool-figure .anim-dash, .tool-figure .anim-pulse { animation: none; stroke-dashoffset: 0; }
}

/* ==========================================================================
   Typography normalization to standard web sizing
   ========================================================================== */
h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.2rem; }
.page-hero h1 { font-size: clamp(1.8rem, 3.4vw, 2.3rem); }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3rem); }
.section-title { font-size: clamp(1.55rem, 2.8vw, 2rem); }
.section-lead { font-size: 1.0625rem; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.2rem); }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.prose .lead { font-size: 1.12rem; }
.feature h3, .cat-card h3, .step h3 { font-size: 1.2rem; }
.tool-name { font-size: 1.2rem; }

/* footer logo matches header logo exactly */
.footer-logo { gap: 11px; }
.footer-logo .logo-text { font-size: 1.1rem; }

/* mobile navigation: standard sizing */
.mobile-menu a { font-size: 1.2rem; padding: 10px 0; }

@media (max-width: 480px) {
  h1 { font-size: 1.7rem; }
  .page-hero h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.95rem; }
  h2, .section-title { font-size: 1.35rem; }
  .steps .step h3 { font-size: 1.2rem; }
  .mobile-menu a { font-size: 1.1rem; }
}

/* ==========================================================================
   Blog featured image placeholder (1280 x 720 / 16:9)
   ========================================================================== */
.post-featured { margin: 22px 0 10px; }
.post-featured img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; }
.post-featured-ph {
  aspect-ratio: 16 / 9; width: 100%;
  background: linear-gradient(135deg, var(--brand-surface-2), var(--primary-soft));
  border: 1px dashed var(--brand-border); border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--brand-muted);
}
.post-featured-ph svg { width: 44px; height: 44px; opacity: 0.55; stroke: currentColor; }
.post-featured-ph span { font-size: 0.92rem; font-weight: 600; letter-spacing: 0.01em; }
.post-meta { font-family: var(--font-mono); font-size: 0.85rem; }

/* ==========================================================================
   SITEWIDE FIXES (layout, ads, typography normalization) — authoritative
   ========================================================================== */

/* --- Card grid (blog archive + any card collection) --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  align-items: stretch;
}
.card-grid > a, .card-grid > article { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; gap: 18px; } }

/* --- Related calculators: convert horizontal scroller to even responsive grid --- */
.scroll-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  overflow: visible;
  scroll-snap-type: none;
  padding-bottom: 0;
}
.scroll-row .card { min-width: 0; scroll-snap-align: none; display: flex; flex-direction: column; }
@media (max-width: 720px) { .scroll-row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }

/* --- AdSense slots: structured but hidden until real ad code is inserted --- */
.ad-slot { margin: 28px auto; display: flex; justify-content: center; align-items: center; max-width: 728px; }
.ad-slot:empty { display: none !important; }

/* --- Typography normalization (consistent scale + line-heights, no monospace) --- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); letter-spacing: -0.015em; }
h1, h2, h3 { line-height: 1.2; }
h4, h5, h6 { line-height: 1.3; }
h1 { font-size: clamp(2rem, 3.2vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
.hero h1 { font-size: clamp(2.15rem, 4.2vw, 3rem); line-height: 1.15; }
.page-hero h1 { font-size: clamp(1.95rem, 3.2vw, 2.4rem); line-height: 1.18; }
.section-title { font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.2; }

body { line-height: 1.65; }
.prose p, .prose li { font-size: 1.05rem; line-height: 1.75; }
.prose p { margin-bottom: 1.05em; }
.prose h2 { margin-top: 1.9em; margin-bottom: 0.6em; }
.prose h2:first-of-type { margin-top: 0.8em; }
.prose h3 { margin-top: 1.4em; margin-bottom: 0.5em; }
.prose .lead, .lead { font-size: 1.18rem; line-height: 1.65; }
.section-lead { font-size: 1.18rem; line-height: 1.6; }
.muted { line-height: 1.6; }

/* Card titles: one consistent size across every card collection */
.card-grid h2, .card-grid h3, .scroll-row .card h3 { font-size: 1.2rem !important; line-height: 1.3 !important; margin: 0 0 8px !important; }
.card-grid p, .scroll-row .card p { font-size: 0.95rem !important; line-height: 1.55 !important; }

@media (max-width: 480px) {
  h1 { font-size: 1.7rem; }
  .hero h1 { font-size: 2rem; }
  .page-hero h1 { font-size: 1.7rem; }
  h2, .section-title { font-size: 1.4rem; }
  h3 { font-size: 1.2rem; }
  .prose p, .prose li { font-size: 1.02rem; }
}

/* ==========================================================================
   FIX PASS 2 — related-card badge stretch + consistent type scale
   ========================================================================== */

/* Stop badges from stretching to full width inside flex-column cards */
.scroll-row .card > .badge,
.card-grid > a > .badge,
.card-grid > article > .badge { align-self: flex-start; width: auto; }

/* --- One consistent heading scale (slightly tighter so nothing reads oversized) --- */
h1 { font-size: clamp(1.85rem, 2.8vw, 2.25rem); line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.6rem); line-height: 1.25; }
h3 { font-size: 1.2rem; line-height: 1.3; }
h4 { font-size: 1.05rem; line-height: 1.35; }
.hero h1 { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.15; }
.page-hero h1 { font-size: clamp(1.7rem, 3vw, 2.1rem); line-height: 1.2; }
.section-title { font-size: clamp(1.45rem, 2.4vw, 1.7rem); line-height: 1.25; }

/* --- One consistent body/prose size across ALL prose elements --- */
body { line-height: 1.65; }
.prose p, .prose li, .prose dd, .prose dt { font-size: 1.0625rem; }
.prose p, .prose li { line-height: 1.75; }
.formula-box { font-size: 1.0625rem; line-height: 1.7; }
.var-list { font-size: 1.0625rem; }
.var-list dt { font-size: 1.0625rem; line-height: 1.6; }
.var-list dd { font-size: 1.0625rem; line-height: 1.6; }

/* --- One consistent lead size everywhere (override page-hero 1.25rem) --- */
.lead, .prose .lead, .page-hero .lead, .section-lead { font-size: 1.15rem; line-height: 1.6; }

/* --- Card titles match the h3 size for harmony --- */
.card-grid h2, .card-grid h3, .scroll-row .card h3 { font-size: 1.2rem !important; line-height: 1.3 !important; }

@media (max-width: 480px) {
  h1 { font-size: 1.65rem; }
  h2, .section-title { font-size: 1.35rem; }
  h3 { font-size: 1.15rem; }
  .prose p, .prose li, .var-list, .var-list dt, .var-list dd, .formula-box { font-size: 1.02rem; }
  .lead, .prose .lead, .page-hero .lead, .section-lead { font-size: 1.08rem; }
}
