/* css/style.css — global design system for HealthCalc India */
/* Single stylesheet shared by all calculator pages, legal pages, and homepage */

/* ─────────────────────────────────────────────────────────────
   1. CSS VARIABLES — Design tokens, never hardcode these values
   ───────────────────────────────────────────────────────────── */
:root {
  /* Brand — Deep Navy primary + Saffron accent */
  --primary:       #003358;   /* deep navy */
  --primary-light: #D0E4FF;   /* soft navy tint */
  --primary-mid:   #00497B;   /* mid navy */
  --primary-dark:  #001D35;   /* dark navy */
  --accent:        #E65100;   /* saffron — Indian identity */
  --accent-light:  #FFF3E0;   /* soft saffron tint */

  /* Result indicator badges */
  --indian:        #D97706;   /* warm amber — Indian standard */
  --who:           #0891B2;   /* calm cyan — WHO standard */

  /* Status */
  --success:       #059669;   /* emerald green */
  --warning:       #D97706;   /* amber */
  --danger:        #DC2626;   /* red */

  /* UI */
  --neutral:       #F8FFFE;   /* barely-there tint — warmer than grey */
  --card:          #FFFFFF;
  --border:        #E5E7EB;
  --border-light:  #F3F4F6;
  --text:          #111827;   /* near-black, slightly warm */
  --subtext:       #6B7280;   /* grey-500 */

  /* Ad slots — always neutral so ads blend naturally */
  --ad-bg:         #F9FAFB;
  --ad-border:     #E5E7EB;

  /* Spacing scale */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography — Manrope (headings + body) + JetBrains Mono (numbers) */
  --font-display: 'Manrope', sans-serif;
  --font-body:    'Manrope', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows — slightly more pronounced */
  --shadow-sm: 0 1px 3px rgba(0,51,88,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,51,88,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,51,88,0.14), 0 4px 12px rgba(0,0,0,0.08);
}

/* ─────────────────────────────────────────────────────────────
   2. RESET & BASE
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--neutral);
  min-height: 100vh;
  /* padding-bottom reserves space for sticky footer ad */
  padding-bottom: 70px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  padding-left: var(--space-lg);
}

/* ─────────────────────────────────────────────────────────────
   3. TYPOGRAPHY
   ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.875rem, 5vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.375rem, 3vw, 2rem);    font-weight: 600; }
h3 { font-size: clamp(1.0625rem, 2.5vw, 1.25rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

/* Numbers and result values use monospace */
.mono {
  font-family: var(--font-mono);
}

/* ─────────────────────────────────────────────────────────────
   4. LAYOUT CONTAINERS
   ───────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Page sections */
.section {
  padding: var(--space-2xl) 0;
}

.section--sm {
  padding: var(--space-xl) 0;
}

/* ─────────────────────────────────────────────────────────────
   5. HEADER & NAVIGATION
   ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 var(--space-md);
  max-width: 1100px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.site-logo__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.site-logo__text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.site-logo__text span {
  color: var(--accent);
}

/* Nav — hidden on mobile, shown on tablet+ */
.site-nav {
  display: none;
}

.site-nav__list {
  list-style: none;
  padding: 0;
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.site-nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav__link:hover,
.site-nav__link--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  text-decoration: none;
}

/* Mobile menu toggle */
.site-header__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text);
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md);
}

.mobile-nav--open {
  display: block;
}

.mobile-nav__list {
  list-style: none;
  padding: 0;
}

.mobile-nav__item {
  border-bottom: 1px solid var(--border);
}

.mobile-nav__link {
  display: flex;
  align-items: center;
  padding: var(--space-md) var(--space-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
}

.mobile-nav__link:hover {
  color: var(--primary);
  text-decoration: none;
}

@media (min-width: 768px) {
  .site-nav { display: block; }
  .site-header__menu-btn { display: none; }
}

/* Dropdown menu */
.site-nav__dropdown {
  position: relative;
}

.site-nav__dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__dropdown-btn:hover,
.site-nav__dropdown--open .site-nav__dropdown-btn {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.site-nav__dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 220px;
  list-style: none;
  padding: var(--space-sm) 0;
  z-index: 200;
}

.site-nav__dropdown--open .site-nav__dropdown-menu {
  display: block;
}

.site-nav__dropdown-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
  min-height: 44px;
}

.site-nav__dropdown-link:hover {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   6. FOOTER
   ───────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--text);
  color: #E0E0E0;
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-3xl);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.site-footer__brand .site-logo__text {
  color: #FFFFFF;
}

.site-footer__tagline {
  font-size: 0.875rem;
  color: #9E9E9E;
  margin-top: var(--space-sm);
  margin-bottom: 0;
}

.site-footer__heading {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.site-footer__links {
  list-style: none;
  padding: 0;
}

.site-footer__links li {
  margin-bottom: var(--space-sm);
}

.site-footer__links a {
  color: #9E9E9E;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer__links a:hover {
  color: #FFFFFF;
  text-decoration: none;
}

.site-footer__bottom {
  border-top: 1px solid #424242;
  padding-top: var(--space-lg);
  font-size: 0.8125rem;
  color: #757575;
  text-align: center;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* ─────────────────────────────────────────────────────────────
   7. BUTTONS
   ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.btn--primary:hover {
  background: var(--primary-mid);
  border-color: var(--primary-mid);
  text-decoration: none;
  color: #FFFFFF;
}

.btn--primary:disabled,
.btn--primary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--ghost:hover {
  background: var(--primary-light);
  text-decoration: none;
}

.btn--full {
  width: 100%;
}

/* ─────────────────────────────────────────────────────────────
   8. CARDS
   ───────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: var(--space-lg);
}

/* Calculator card — homepage grid links */
.calc-card {
  display: block;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: var(--space-lg);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.calc-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-2px);
  text-decoration: none;
}

.calc-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--primary);
  flex-shrink: 0;
  font-family: 'Material Symbols Outlined';
  font-size: 2rem;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
  user-select: none;
}

.calc-card__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.calc-card__description {
  font-size: 0.875rem;
  color: var(--subtext);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

.calc-card__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px var(--space-sm);
  border-radius: 99px;
  background: var(--primary-light);
  color: var(--primary);
}

.calc-card__badge--green {
  background: #E8F5E9;
  color: var(--success);
}

.calc-card__badge--red {
  background: #FFEBEE;
  color: var(--danger);
}

/* ─────────────────────────────────────────────────────────────
   9. CALCULATOR FORM
   ───────────────────────────────────────────────────────────── */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.unit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  margin-top: var(--space-sm);
}

.unit-toggle__option {
  position: relative;
}

.unit-toggle__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.unit-toggle__option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--subtext);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.unit-toggle__option input:checked + span {
  background: var(--primary);
  color: #FFFFFF;
}

.height-inputs {
  margin-top: var(--space-sm);
}

.height-inputs[hidden] {
  display: none !important;
}

.height-inputs--imperial {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.form-label__hint {
  font-weight: 400;
  color: var(--subtext);
  font-size: 0.875rem;
  margin-left: var(--space-xs);
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-md);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--card);
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,94,32,0.12);
}

.form-input--error {
  border-color: var(--danger);
}

.form-input--error:focus {
  box-shadow: 0 0 0 3px rgba(183,28,28,0.12);
}

.form-select {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-md);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23757575' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  padding-right: 40px;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,94,32,0.12);
}

/* Radio group */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  min-height: 44px;
  padding: var(--space-xs) var(--space-md);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.9375rem;
  font-weight: 500;
}

.radio-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.radio-option input[type="radio"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Checkbox group (PCOS symptoms) */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  cursor: pointer;
  min-height: 44px;
  padding: var(--space-sm) var(--space-md);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  transition: border-color 0.15s, background 0.15s;
}

.checkbox-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.checkbox-option input[type="checkbox"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-option__label {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
}

.checkbox-option__score {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--subtext);
  flex-shrink: 0;
  align-self: center;
}

/* Inline field error message */
.field-error {
  display: none;
  font-size: 0.875rem;
  color: var(--danger);
  font-weight: 500;
  margin-top: var(--space-xs);
}

.field-error--visible {
  display: block;
}

/* ─────────────────────────────────────────────────────────────
   10. DUAL RESULT PANEL
   ───────────────────────────────────────────────────────────── */
.result-section {
  display: none;
}

.result-section--visible {
  display: block;
}

.dual-result {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-md);
  align-items: center;
  margin-bottom: var(--space-lg);
}

.result-panel {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  border: 2px solid var(--border);
  text-align: center;
}

.result-panel--indian {
  border-color: var(--indian);
}

.result-panel--who {
  border-color: var(--who);
}

.result-panel__flag {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--subtext);
}

.result-panel--indian .result-panel__flag { color: var(--indian); }
.result-panel--who    .result-panel__flag { color: var(--who); }

.result-panel__value {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.result-panel__badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.result-panel__badge--success  { background: #E8F5E9; color: var(--success); }
.result-panel__badge--warning  { background: #FFF8E1; color: var(--warning); }
.result-panel__badge--danger   { background: #FFEBEE; color: var(--danger); }

.result-panel__risk {
  font-size: 0.8125rem;
  color: var(--subtext);
  margin-top: var(--space-xs);
}

.result-divider {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--subtext);
  text-align: center;
}

/* "Aha moment" difference box */
.difference-box {
  display: none;
  align-items: flex-start;
  gap: var(--space-md);
  background: #FFF8E1;
  border: 1.5px solid #FFD54F;
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
}

.difference-box--visible {
  display: flex;
}

.difference-box__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1.5;
}

.difference-box__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

/* Mobile: stack dual result panels vertically */
@media (max-width: 480px) {
  .dual-result {
    grid-template-columns: 1fr;
  }
  .result-divider {
    display: none;
  }
}

/* ─────────────────────────────────────────────────────────────
   11. GUIDANCE & DISCLAIMER BOXES
   ───────────────────────────────────────────────────────────── */

/* High-risk guidance box */
.guidance-box {
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
}

.guidance-box--attention {
  background: #FFF3E0;
  border: 1.5px solid #FFB74D;
}

.guidance-box h4 {
  margin-bottom: var(--space-sm);
  color: #E65100;
}

/* Medical disclaimer — inline on every calculator page */
.medical-disclaimer {
  background: #F1F8E9;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-md);
  font-size: 0.875rem;
  color: #33691E;
  line-height: 1.6;
}

.medical-disclaimer strong {
  display: block;
  margin-bottom: var(--space-xs);
}

/* "Why Indian Standards?" box */
.indian-standards-box {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  background: var(--primary-light);
  border: 1.5px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.indian-standards-box__icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.indian-standards-box__content h3 {
  margin-bottom: var(--space-sm);
  color: var(--primary);
}

.indian-standards-box__content p {
  font-size: 0.9375rem;
  color: var(--primary-mid);
  margin: 0;
}

/* Shared polished look for calculator pages */
.calculator-page {
  background:
    radial-gradient(circle at top right, rgba(41, 97, 149, 0.08), transparent 28%),
    linear-gradient(180deg, #F6FAFC 0%, #EEF6F7 100%);
}

.calculator-page .page-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, #0B3F67 0%, #0F5A8A 55%, #2B7AA8 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: var(--space-xl);
}

.calculator-page .page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14), transparent 20%),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.08), transparent 24%);
  pointer-events: none;
}

.calculator-page .page-hero .container {
  position: relative;
  z-index: 1;
}

.calculator-page .page-hero__eyebrow {
  color: rgba(231, 243, 255, 0.84);
}

.calculator-page .page-hero__title,
.calculator-page .page-hero__subtitle {
  color: #FFFFFF;
}

.calculator-page .tool-disclaimer--prominent,
.calculator-page .indian-standards-box,
.calculator-page #calculator-card,
.calculator-page .difference-box,
.calculator-page .guidance-box--attention,
.calculator-page .section--sm,
.calculator-page .sources-section,
.calculator-page .related-calcs {
  box-shadow: 0 18px 38px rgba(10, 39, 64, 0.06);
}

.calculator-page .tool-disclaimer--prominent {
  background: linear-gradient(180deg, #FFF9EE 0%, #FFF5DF 100%);
  border: 1px solid #F1C672;
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
}

.calculator-page .indian-standards-box {
  display: block;
  background: linear-gradient(180deg, #DDEAFE 0%, #D6E5FB 100%);
  border: 1px solid #B6CAE7;
  border-radius: 22px;
  padding: 1.5rem 1.625rem;
}

.calculator-page .indian-standards-box__icon {
  display: none;
}

.calculator-page .indian-standards-box__content h3 {
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.calculator-page .indian-standards-box__content p {
  font-size: 1rem;
  line-height: 1.75;
  color: #234C74;
  max-width: 60ch;
}

.calculator-page #calculator-card {
  border-radius: 24px;
  border: 1px solid rgba(193, 199, 208, 0.7);
  padding: 1.75rem;
  margin-bottom: var(--space-xl);
}

.calculator-page .contraception-gate {
  background: linear-gradient(180deg, #F7FAFC 0%, #F1F6FA 100%);
  border: 1px solid #D6E3EE;
  border-radius: 20px;
}

.calculator-page .checkbox-option {
  border-radius: 18px;
  border: 1px solid #D7E3EC;
  background: rgba(255, 255, 255, 0.94);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.calculator-page .checkbox-option:hover {
  border-color: #9CC1E5;
  box-shadow: 0 10px 20px rgba(41, 97, 149, 0.08);
  transform: translateY(-1px);
}

.calculator-page .checkbox-option:has(input:checked) {
  border-color: #4E8FC6;
  box-shadow: 0 12px 24px rgba(41, 97, 149, 0.12);
  background: #F6FBFF;
}

.calculator-page .btn--primary {
  background: linear-gradient(135deg, #0B3F67 0%, #0F5A8A 100%);
  border: none;
  box-shadow: 0 14px 28px rgba(11, 63, 103, 0.2);
}

.calculator-page .result-panel {
  border-radius: 24px;
  padding: 1.75rem;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 255, 0.96) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.calculator-page .result-panel__flag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 1.125rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(11, 63, 103, 0.06);
  border: 1px solid rgba(11, 63, 103, 0.1);
}

.period-page .period-result-layout {
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

.period-page .result-panel__flag {
  align-self: center;
  text-align: center;
}

.period-page .period-result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

.period-page .period-result-grid__label {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  display: block;
  margin-bottom: 0.35rem;
}

.period-page .period-result-grid__value {
  display: block;
  text-align: left;
  line-height: 1.65;
  white-space: pre-line;
  word-break: normal;
  overflow-wrap: anywhere;
}

.period-page .period-result-row {
  padding-bottom: 0.95rem;
  border-bottom: 1px solid rgba(193, 199, 208, 0.55);
}

.period-page .period-result-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

@media (max-width: 767px) {
  .period-page .period-result-layout {
    grid-template-columns: 1fr;
  }

  .period-page .period-result-grid__value {
    text-align: left;
  }
}

.calculator-page .result-panel__badge {
  margin-bottom: 1rem;
}

.calculator-page .result-panel__risk {
  font-size: 1rem;
  line-height: 1.7;
  margin-top: 0.5rem;
}

.calculator-page .difference-box {
  border-radius: 20px;
}

.calculator-page .guidance-box--attention {
  border-radius: 22px;
  background: linear-gradient(180deg, #FFF4E6 0%, #FFEED9 100%);
}

.calculator-page .section--sm,
.calculator-page .sources-section,
.calculator-page .related-calcs {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(193, 199, 208, 0.7);
  border-radius: 22px;
  padding: 1.75rem;
}

.calculator-page .section--sm + .section--sm,
.calculator-page .section--sm + .sources-section,
.calculator-page .sources-section + .related-calcs {
  margin-top: var(--space-lg);
}

.calculator-page .dual-result {
  gap: 1.5rem;
  align-items: stretch;
}

.calculator-page .result-divider {
  color: rgba(35, 76, 116, 0.7);
}

.calorie-page .dual-result {
  align-items: center;
}

.calorie-page .result-divider {
  align-self: center;
}

.calculator-page .section--sm h2,
.calculator-page .sources-section h3,
.calculator-page .related-calcs h3 {
  margin-bottom: 1rem;
  color: #0B3F67;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.calculator-page .section--sm p + p,
.calculator-page .sources-section li + li {
  margin-top: 1rem;
}

.calculator-page .section--sm p,
.calculator-page .sources-section li {
  line-height: 1.8;
}

.calculator-page .related-calcs__grid .card {
  border-radius: 18px;
  border: 1px solid #D7E3EC;
  box-shadow: none;
}

@media (max-width: 767px) {
  .calculator-page .indian-standards-box__content h3 {
    font-size: 1.35rem;
  }
}

/* Tool disclaimer (PCOS, period tracker age) */
.tool-disclaimer {
  background: var(--neutral);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  font-size: 0.875rem;
  color: var(--subtext);
  margin-bottom: var(--space-lg);
}

.tool-disclaimer--prominent {
  background: #FFF8E1;
  border-color: #FFD54F;
  color: #5D4037;
}

.tool-disclaimer--prominent strong {
  display: block;
  margin-bottom: var(--space-sm);
  color: #E65100;
}

/* Contraception gating question */
.contraception-gate {
  background: var(--neutral);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.contraception-gate p {
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.contraception-gate__sub {
  font-size: 0.875rem;
  color: var(--subtext);
  margin-bottom: var(--space-md);
  font-weight: 400 !important;
}

/* ─────────────────────────────────────────────────────────────
   12. AD SLOTS
   ───────────────────────────────────────────────────────────── */
.ad-slot {
  background: var(--ad-bg);
  border: 1px dashed var(--ad-border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  overflow: hidden;
}

.ad-slot__label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--subtext);
  font-weight: 600;
}

/* Header ad — 320x50 mobile / 728x90 desktop */
.ad-slot--header {
  width: 100%;
  min-height: 50px;
  margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
  .ad-slot--header {
    min-height: 90px;
  }
}

/* Mid-page ad — 300x250, only visible after result */
.ad-slot--midpage {
  width: 300px;
  min-height: 250px;
  margin: var(--space-xl) auto;
  display: none;
}

.ad-slot--midpage-visible {
  display: flex;
}

/* Sticky footer ad */
.ad-slot--footer-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  min-height: 50px;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: var(--space-xs) var(--space-md);
  flex-direction: row;
  justify-content: center;
  display: flex;
  align-items: center;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}

.ad-slot--footer-sticky .ad-slot__dismiss {
  position: absolute;
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  color: var(--subtext);
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────────────────────────────────────
   13. COOKIE CONSENT BANNER
   ───────────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 60px;
  left: var(--space-md);
  right: var(--space-md);
  z-index: 300;
  background: var(--text);
  color: #E0E0E0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-lg);
}

.cookie-banner__content p {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
  color: #E0E0E0;
}

.cookie-banner__content a {
  color: #A5D6A7;
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.cookie-banner__actions .btn--ghost {
  color: #E0E0E0;
  border-color: #757575;
}

.cookie-banner__actions .btn--ghost:hover {
  background: #424242;
}

@media (min-width: 640px) {
  .cookie-banner {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
  }
}

/* OK button — primary CTA, larger tap target */
.cookie-banner__ok-btn {
  min-width: 80px;
  font-size: 1rem;
  font-weight: 700;
}

/* Customize panel — hidden by default, shown on toggle */
.cookie-banner__customize-panel {
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

/* Save preferences button inside panel */
.cookie-banner__save-btn {
  margin-top: var(--space-md);
  width: 100%;
}

/* Each toggle row */
.cookie-toggle-row {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.cookie-toggle-row:last-of-type { border-bottom: none; }

/* Toggle label: text on left, switch on right */
.cookie-toggle-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  cursor: pointer;
}

.cookie-toggle-label__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.875rem;
  color: #E0E0E0;
}

.cookie-toggle-label__text strong {
  color: #FFFFFF;
  font-size: 0.9375rem;
}

.cookie-toggle-label__text span {
  color: #BDBDBD;
  line-height: 1.4;
}

/* Toggle switch — visually styled checkbox */
.cookie-toggle-switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  margin-top: 2px;
}

.cookie-toggle-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
  z-index: 1;
}

.cookie-toggle-switch__track {
  display: block;
  width: 44px;
  height: 24px;
  background: #616161;
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
}

.cookie-toggle-switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: transform 0.2s;
}

.cookie-toggle-switch input:checked + .cookie-toggle-switch__track {
  background: var(--success);
}

.cookie-toggle-switch input:checked + .cookie-toggle-switch__track::after {
  transform: translateX(20px);
}

.cookie-toggle-switch input:focus-visible + .cookie-toggle-switch__track {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────
   14. HOMEPAGE HERO
   ───────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 60%, var(--primary) 100%);
  color: white;
  padding: var(--space-3xl) 0;
  text-align: center;
}

.hero__eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: var(--primary-light);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-md);
  border-radius: 99px;
  margin-bottom: var(--space-md);
  border: 1px solid rgba(208,228,255,0.3);
}

.hero__title {
  color: white;
  margin-bottom: var(--space-md);
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(208,228,255,0.9);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
}

.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

.hero__cta-primary {
  background: white;
  color: var(--primary);
  font-weight: 700;
  border-color: white;
  min-height: 44px;
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 2px solid white;
  transition: background 0.15s;
}

.hero__cta-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--primary-dark);
  text-decoration: none;
}

.hero__cta-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.6);
  min-height: 44px;
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: background 0.15s;
}

.hero__cta-secondary:hover {
  background: rgba(255,255,255,0.1);
  text-decoration: none;
  color: white;
}

/* Hero split layout — left content + right visual */
.hero__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

.hero__visual {
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 900px) {
  .hero {
    text-align: left;
  }
  .hero__layout {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .hero__subtitle {
    margin: 0 0 var(--space-xl);
  }
  .hero__cta-row {
    justify-content: flex-start;
  }
}

/* ─────────────────────────────────────────────────────────────
   15. TRUST BAR
   ───────────────────────────────────────────────────────────── */
.trust-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}

.trust-bar__list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.trust-bar__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--subtext);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--primary-light);
  user-select: none;
}

.trust-bar__item--accent {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* General svg rule FIRST so accent override below wins (same specificity, later = wins) */
.trust-bar__item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.trust-bar__item--accent svg {
  color: #ffffff;
}

/* ─────────────────────────────────────────────────────────────
   16. CALCULATOR GRID (homepage)
   ───────────────────────────────────────────────────────────── */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 480px) {
  .calc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .calc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .calc-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  /* Bento-style featured card: spans 2 columns and 2 rows */
  .calc-card--featured {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .calc-card--featured .calc-card__title {
    font-size: 1.5rem;
  }
  .calc-card--featured .calc-card__icon {
    width: 64px;
    height: 64px;
    font-size: 2.5rem;
  }
  .calc-card--featured .calc-card__description {
    font-size: 1rem;
  }
  .calc-card--featured .calc-card__featured-cta {
    display: block;
  }
}

/* Featured card CTA — only shown when card is in bento layout */
.calc-card__featured-cta {
  display: none;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9375rem;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  margin-top: var(--space-md);
}

/* ─────────────────────────────────────────────────────────────
   17. HEALTH STATS BANNER
   ───────────────────────────────────────────────────────────── */
.stats-banner {
  background: var(--primary);
  color: white;
  padding: var(--space-2xl) 0;
}

.stats-banner__title {
  color: white;
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item {
  text-align: center;
}

.stat-item__number {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: white;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-item__label {
  font-size: 0.875rem;
  color: var(--primary-light);
  line-height: 1.4;
}

/* ─────────────────────────────────────────────────────────────
   18. CALCULATOR PAGE HERO
   ───────────────────────────────────────────────────────────── */
.page-hero {
  background: var(--primary-light);
  border-bottom: 1px solid var(--primary-light);
  padding: var(--space-2xl) 0 var(--space-xl);
}

.page-hero__eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.page-hero__title {
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.page-hero__subtitle {
  font-size: 1.0625rem;
  color: var(--primary-mid);
  max-width: 620px;
  line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────
   19. SOURCES SECTION
   ───────────────────────────────────────────────────────────── */
.sources-section {
  border-top: 2px solid var(--border);
  padding-top: var(--space-lg);
  margin-top: var(--space-3xl);
}

.sources-section h3 {
  margin-bottom: var(--space-md);
  font-size: 1rem;
  color: var(--subtext);
}

.sources-section ol {
  font-size: 0.875rem;
  color: var(--subtext);
  line-height: 1.7;
}

/* ─────────────────────────────────────────────────────────────
   20. RELATED CALCULATORS SECTION
   ───────────────────────────────────────────────────────────── */
.related-calcs {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 2px solid var(--border);
}

.related-calcs h3 {
  margin-bottom: var(--space-lg);
}

.related-calcs__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .related-calcs__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─────────────────────────────────────────────────────────────
   21. SECTION HEADINGS
   ───────────────────────────────────────────────────────────── */
.section-heading {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-heading__title {
  margin-bottom: var(--space-sm);
}

.section-heading__sub {
  font-size: 1.0625rem;
  color: var(--subtext);
  max-width: 560px;
  margin: 0 auto;
}

/* ─────────────────────────────────────────────────────────────
   22. LEGAL / STATIC PAGES
   ───────────────────────────────────────────────────────────── */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
}

.legal-page h1 {
  margin-bottom: var(--space-lg);
}

.legal-page h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  font-size: 1.25rem;
}

.legal-page p,
.legal-page li {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: var(--space-md);
}

.legal-page .last-updated {
  font-size: 0.875rem;
  color: var(--subtext);
  margin-bottom: var(--space-2xl);
}

/* ─────────────────────────────────────────────────────────────
   23. UTILITIES
   ───────────────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }

.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }

.hidden { display: none !important; }

/* ─────────────────────────────────────────────────────────────
   24. BLOG PREVIEW CARDS (homepage)
   ───────────────────────────────────────────────────────────── */
.blog-card {
  display: block;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.blog-card__category {
  font-size: 0.8125rem;
  color: var(--subtext);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.blog-card__title {
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.blog-card__excerpt {
  font-size: 0.9375rem;
  color: var(--subtext);
  margin: 0;
}

/* ─────────────────────────────────────────────────────────────
   25. BLOG GRID (homepage preview)
   ───────────────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─────────────────────────────────────────────────────────────
   26. WHY SECTION
   ───────────────────────────────────────────────────────────── */
.why-section {
  background: var(--primary-light);
  padding: var(--space-3xl) 0;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

@media (min-width: 640px) {
  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.why-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.why-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.why-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--primary);
}

.why-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.why-card__body {
  font-size: 0.9375rem;
  color: var(--subtext);
  line-height: 1.7;
  margin: 0;
}

.why-card__body strong {
  color: var(--text);
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────
   27. SCROLL ANIMATIONS
   ───────────────────────────────────────────────────────────── */

/* Initial state — hidden and shifted down */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Visible state triggered by Intersection Observer */
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger siblings within a grid */
.calc-grid .fade-up:nth-child(2) { transition-delay: 0.07s; }
.calc-grid .fade-up:nth-child(3) { transition-delay: 0.14s; }
.calc-grid .fade-up:nth-child(4) { transition-delay: 0.21s; }
.calc-grid .fade-up:nth-child(5) { transition-delay: 0.28s; }
.calc-grid .fade-up:nth-child(6) { transition-delay: 0.35s; }
.calc-grid .fade-up:nth-child(7) { transition-delay: 0.42s; }

.why-grid .fade-up:nth-child(2) { transition-delay: 0.1s; }
.why-grid .fade-up:nth-child(3) { transition-delay: 0.2s; }

/* Respect reduced-motion — skip animation entirely */
@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─────────────────────────────────────────────────────────────
   POST CARDS — shared by calculator pages (related articles)
   and blog listing page. Loaded via style.css so calculator
   pages don't need blog.css to get card styling.
   ───────────────────────────────────────────────────────────── */

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

/* Gradient placeholder — category-specific */
.post-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-thumb--bmi      { background: linear-gradient(135deg, #003358 0%, #004a7c 100%); }
.post-thumb--diabetes { background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 100%); }
.post-thumb--womens   { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); }
.post-thumb--nutrition{ background: linear-gradient(135deg, #14532d 0%, #15803d 100%); }
.post-thumb--fitness  { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 100%); }

.post-thumb svg {
  width: 52px;
  height: 52px;
  opacity: 0.90;
}

.post-card__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.post-card__meta {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  font-size: 0.8125rem;
  color: var(--subtext);
  margin-bottom: var(--space-sm);
}

.post-card__meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--subtext);
  flex-shrink: 0;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__excerpt {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--subtext);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--subtext);
  border-top: 1px solid var(--border-light);
  padding-top: var(--space-sm);
  margin-top: auto;
}

.post-card__arrow {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 700;
  transition: transform 0.15s;
}

.post-card:hover .post-card__arrow { transform: translateX(4px); }

/* Related articles section — on calculator pages */
.related-articles {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.related-articles__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-lg);
}

.related-articles__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .related-articles__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .related-articles__grid { grid-template-columns: repeat(3, 1fr); }
}
