/* =========================================================
   Over40Macros — Editorial design system v2
   Aesthetic: Premium health editorial (think Outside Magazine
   meets The Atlantic). Warm palette, serif headlines,
   confident hierarchy, mature voice.
   ========================================================= */

/* Fonts: Fraunces (editorial serif) + Inter Tight (refined sans)  */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700;9..144,800&family=Inter+Tight:wght@400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
*::selection { background: #1e3a2e; color: #f5f0e8; }

:root {
  /* === Warm editorial palette === */
  --paper: #f5f0e8;          /* warm off-white background */
  --paper-deep: #ebe3d5;     /* slightly deeper paper for cards */
  --ink: #1a1a1a;            /* near-black for headlines */
  --ink-soft: #3a3a3a;       /* secondary text */
  --ink-muted: #6b6b6b;      /* tertiary */
  --rule: #d4cabb;           /* divider lines on paper */
  --rule-soft: #e3dccd;
  --card: #ffffff;
  --card-shadow: 0 1px 2px rgba(26,26,26,0.04), 0 8px 24px rgba(26,26,26,0.06);
  --card-shadow-lg: 0 1px 2px rgba(26,26,26,0.04), 0 20px 50px rgba(26,26,26,0.08);

  /* === Forest green primary — confident, mature, health-coded === */
  --forest: #1e3a2e;
  --forest-deep: #142822;
  --forest-soft: #2d5544;
  --forest-tint: #e8efe9;

  /* === Amber accent — warm, editorial === */
  --amber: #c97b2a;
  --amber-soft: #f4e8d6;
  --amber-deep: #8f5318;

  /* === Blue accent — cool, gender-neutral, adds pop === */
  --blue: #1f6fb2;        /* logo box, underlines, larger fills */
  --blue-deep: #1d5e96;   /* small text: links, kickers, tags (contrast on paper) */
  --blue-soft: #e6f0f8;   /* light tint */

  /* === Functional === */
  --rust: #a83a2c;           /* warnings, disclaimers */
  --rust-soft: #f6e6e2;
  --sage: #5b7560;           /* success/positive */
  --sage-soft: #e8eeea;

  /* === Type === */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1180px;
  --container-narrow: 760px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* === Header === */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(245, 240, 232, 0.92);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
  font-style: italic;
  line-height: 1;
}
.logo .num {
  font-style: normal;
  font-weight: 600;
  background: var(--blue);
  color: var(--paper);
  padding: 2px 7px;
  border-radius: 4px;
  margin: 0 2px;
  font-size: 0.78em;
  vertical-align: 0.08em;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--blue-deep); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--blue);
  transition: width 0.2s ease;
}
.nav-links a:hover::after { width: 100%; }

@media (max-width: 640px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 13px; }
  .logo { font-size: 21px; }
}

/* === Typographic primitives === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

/* === Eyebrow label (small caps style) === */
.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-deep);
}
.eyebrow.amber { color: var(--amber-deep); }
.eyebrow.muted { color: var(--ink-muted); }
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 10px;
  margin-bottom: 3px;
}

/* === Hero === */
.hero {
  padding: 80px 0 56px;
  text-align: center;
  position: relative;
}
.hero h1 {
  font-size: clamp(40px, 6.5vw, 68px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 18px auto 22px;
  max-width: 880px;
  font-variation-settings: 'opsz' 96;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--forest);
}
.hero-lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.55;
  font-weight: 400;
}
.hero-meta {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
  font-size: 13px;
  color: var(--ink-muted);
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta span::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--forest);
}

@media (max-width: 600px) {
  .hero { padding: 48px 0 36px; }
  .hero-lede { font-size: 17px; }
  .hero-meta { gap: 16px; font-size: 12px; }
}

/* === Ad slot === */
.ad-slot {
  margin: 32px auto;
  text-align: center;
  min-height: 100px;
  max-width: 728px;
  background: var(--paper-deep);
  border: 1px dashed var(--rule);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* === Calculator card (editorial style) === */
.calc-section {
  position: relative;
  padding-bottom: 40px;
}
.calculator {
  background: var(--card);
  border-radius: 8px;
  padding: 48px;
  box-shadow: var(--card-shadow-lg);
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  border: 1px solid var(--rule-soft);
}
.calculator::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 32px;
  right: 32px;
  height: 3px;
  background: linear-gradient(90deg, var(--forest) 0%, var(--amber) 100%);
  border-radius: 8px 8px 0 0;
}
.calc-heading {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule-soft);
}
.calc-heading h2 {
  font-size: 32px;
  font-weight: 600;
  font-style: italic;
  margin: 10px 0 8px;
}
.calc-heading p {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .calculator { padding: 28px 22px; }
  .calc-heading h2 { font-size: 24px; }
}

/* === Exclusion warning === */
.exclusion-warning {
  background: var(--amber-soft);
  border: 1px solid #e8d4b0;
  border-left: 3px solid var(--amber);
  border-radius: 6px;
  padding: 22px 26px;
  margin-bottom: 28px;
}
.exclusion-warning h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--amber-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.exclusion-warning h3::before {
  content: '!';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--amber);
  color: white;
  font-family: var(--font-display);
  font-style: italic;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}
.exclusion-warning p {
  font-size: 14px;
  color: var(--amber-deep);
  margin-bottom: 10px;
  line-height: 1.6;
}
.exclusion-warning ul {
  padding-left: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--amber-deep);
  margin: 10px 0;
  line-height: 1.7;
  columns: 2;
  column-gap: 24px;
}
.exclusion-warning ul li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 4px;
  break-inside: avoid;
}
.exclusion-warning ul li::before {
  content: '·';
  position: absolute;
  left: 4px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}
@media (max-width: 600px) {
  .exclusion-warning ul { columns: 1; }
}

.ack-row {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e8d4b0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.ack-row input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--amber);
  cursor: pointer;
  flex-shrink: 0;
}
.ack-row label {
  font-size: 13.5px;
  color: var(--amber-deep);
  cursor: pointer;
  line-height: 1.55;
}
.ack-row label a {
  color: var(--amber-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

/* === Units toggle === */
.units {
  display: inline-flex;
  gap: 0;
  margin-bottom: 24px;
  background: var(--paper);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--rule);
}
.units button {
  background: transparent;
  border: none;
  padding: 8px 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.2s;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.units button.active {
  background: var(--forest);
  color: var(--paper);
}

/* === Form fields === */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 20px;
  margin-bottom: 28px;
}
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; gap: 14px; } }

.field { display: flex; flex-direction: column; }
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.field input, .field select {
  padding: 13px 16px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 16px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  font-weight: 500;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--forest);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(30, 58, 46, 0.08);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231a1a1a' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* === Calculate button === */
.calc-btn {
  width: 100%;
  background: var(--forest);
  color: var(--paper);
  border: none;
  padding: 17px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.calc-btn:hover:not(:disabled) {
  background: var(--forest-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(30, 58, 46, 0.2);
}
.calc-btn:active:not(:disabled) { transform: translateY(0); }
.calc-btn:disabled {
  background: var(--rule);
  color: var(--ink-muted);
  cursor: not-allowed;
  text-transform: none;
  letter-spacing: 0.01em;
}

/* === Results === */
.results {
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--rule-soft);
  display: none;
  animation: fadeUp 0.5s ease;
}
.results.show { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.results > .eyebrow { display: block; text-align: center; margin-bottom: 8px; }
.results h3 {
  font-size: 28px;
  font-weight: 500;
  font-style: italic;
  text-align: center;
  margin-bottom: 28px;
}

.goal-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 28px;
  background: var(--paper);
  padding: 5px;
  border-radius: 8px;
  border: 1px solid var(--rule);
}
.goal-selector button {
  padding: 11px 8px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: all 0.2s;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.goal-selector button.active {
  background: var(--card);
  color: var(--forest);
  box-shadow: 0 1px 3px rgba(26,26,26,0.08);
}

.tdee-display {
  background: var(--forest);
  color: var(--paper);
  padding: 36px 24px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.tdee-display::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.tdee-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.75;
  position: relative;
}
.tdee-number {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 500;
  margin: 8px 0;
  letter-spacing: -0.04em;
  line-height: 1;
  position: relative;
  font-variation-settings: 'opsz' 144;
}
.tdee-unit {
  font-size: 13px;
  opacity: 0.7;
  letter-spacing: 0.04em;
  position: relative;
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 500px) { .macro-grid { grid-template-columns: 1fr; } }

.macro-box {
  background: var(--card);
  border: 1px solid var(--rule-soft);
  border-radius: 8px;
  padding: 22px 18px;
  text-align: center;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.macro-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}
.macro-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  border-radius: 0 0 8px 8px;
}
.macro-box.protein::before { background: #a83a2c; }
.macro-box.carbs::before { background: #5b7560; }
.macro-box.fats::before { background: #c97b2a; }

.macro-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.macro-grams {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.macro-grams .unit { font-size: 18px; font-weight: 500; color: var(--ink-muted); margin-left: 2px; }
.macro-cal {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.results-note {
  background: var(--forest-tint);
  border-left: 3px solid var(--forest);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--forest-deep);
  border-radius: 4px;
  margin-top: 18px;
  line-height: 1.6;
}
.results-note strong { color: var(--forest); font-weight: 600; }

.results-disclaimer {
  background: var(--rust-soft);
  border: 1px solid #e8c4be;
  border-left: 3px solid var(--rust);
  border-radius: 6px;
  padding: 18px 20px;
  margin-top: 16px;
}
.results-disclaimer h4 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--rust);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.results-disclaimer h4::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--rust);
  color: white;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 700;
}
.results-disclaimer p {
  font-size: 13.5px;
  color: #6b2a20;
  line-height: 1.6;
}
.results-disclaimer a { color: var(--rust); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }

/* === Section dividers / pull quotes === */
.section-divider {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 80px auto 40px;
  max-width: 760px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.section-divider span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-muted);
  font-weight: 400;
}

/* === Science explainer section === */
.explainer {
  background: var(--card);
  border-radius: 8px;
  padding: 64px;
  margin: 0 auto 48px;
  max-width: 760px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--rule-soft);
}
@media (max-width: 640px) { .explainer { padding: 36px 26px; } }

.explainer-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule-soft);
}
.explainer-header h2 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 500;
  margin: 10px 0 14px;
  letter-spacing: -0.03em;
}
.explainer-header h2 em { font-style: italic; color: var(--forest); }
.explainer-header .subtitle {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 540px;
  margin: 0 auto;
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 400;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 32px 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}
@media (max-width: 600px) {
  .stat-row { grid-template-columns: 1fr; gap: 0; }
  .stat:not(:last-child) { border-bottom: 1px solid var(--rule-soft); }
}
.stat {
  padding: 26px 16px;
  text-align: center;
  position: relative;
}
.stat:not(:last-child) {
  border-right: 1px solid var(--rule-soft);
}
@media (max-width: 600px) {
  .stat:not(:last-child) { border-right: none; }
}
.stat-num {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  color: var(--forest);
  display: block;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
  font-variation-settings: 'opsz' 144;
}
.stat-label {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.explainer h3 {
  font-size: 24px;
  font-weight: 600;
  margin: 36px 0 14px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.explainer h3 .num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--amber-deep);
  font-weight: 500;
  margin-right: 6px;
}
.explainer p {
  color: var(--ink-soft);
  margin-bottom: 16px;
  font-size: 16.5px;
  line-height: 1.7;
}
.explainer p em { font-style: italic; color: var(--ink); }
.explainer ul {
  padding-left: 0;
  list-style: none;
  margin: 14px 0 18px;
  font-size: 16px;
  color: var(--ink-soft);
}
.explainer ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  line-height: 1.65;
}
.explainer ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 12px;
  height: 1.5px;
  background: var(--forest);
}
.explainer ul li strong { color: var(--ink); font-weight: 600; }

.ref {
  font-size: 11px;
  vertical-align: super;
  color: var(--forest);
  text-decoration: none;
  font-weight: 700;
  padding: 0 1px;
  font-family: var(--font-body);
}
.ref:hover { text-decoration: underline; }

.references {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.references h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.references ol {
  padding-left: 22px;
  font-size: 13px;
  color: var(--ink-muted);
}
.references li {
  margin-bottom: 10px;
  line-height: 1.6;
}
.references a {
  color: var(--blue-deep);
  text-decoration: none;
  word-break: break-word;
}
.references a:hover { text-decoration: underline; }

.disclaimer {
  background: var(--rust-soft);
  border-left: 3px solid var(--rust);
  padding: 16px 20px;
  margin: 28px 0;
  border-radius: 4px;
  font-size: 14px;
  color: #6b2a20;
  line-height: 1.6;
}
.disclaimer strong { color: var(--rust); font-weight: 700; }

/* === Footer === */
.site-footer {
  background: var(--ink);
  color: var(--paper-deep);
  padding: 56px 0 36px;
  margin-top: 80px;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid #2a2a2a;
  flex-wrap: wrap;
}
.footer-brand {
  max-width: 320px;
}
.footer-brand .logo {
  color: var(--paper);
  font-size: 28px;
}
.footer-brand .logo .num { background: var(--blue); color: var(--paper); }
.footer-brand p {
  font-size: 14px;
  color: #999;
  margin-top: 12px;
  line-height: 1.6;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
}
.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.footer-col h5 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  color: #999;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 8px;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--paper); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: #777;
}
.footer-bottom a { color: #777; text-decoration: none; }
.footer-bottom a:hover { color: var(--paper-deep); }
.footer-bottom p { font-size: 12px; }
@media (max-width: 640px) {
  .footer-top { flex-direction: column; gap: 28px; }
  .footer-links { gap: 32px; }
}

/* === Blog/article shared styles === */
.article-hero {
  padding: 60px 0 32px;
  text-align: center;
}
.article-hero .eyebrow { display: inline-block; margin-bottom: 16px; }
.article-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 800px;
  margin: 0 auto 18px;
  font-variation-settings: 'opsz' 96;
}
.article-hero h1 em { font-style: italic; color: var(--forest); }
.article-meta {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  color: var(--ink-muted);
  font-size: 13px;
  flex-wrap: wrap;
}
.article-meta .dot {
  width: 4px;
  height: 4px;
  background: var(--ink-muted);
  border-radius: 50%;
}

.article-body { padding-bottom: 48px; }
.article-body p {
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.75;
  margin-bottom: 20px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.article-body h2 {
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 500;
  margin: 56px auto 18px;
  letter-spacing: -0.025em;
  max-width: 680px;
}
.article-body h2 em { font-style: italic; color: var(--forest); }
.article-body h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 36px auto 14px;
  max-width: 680px;
  color: var(--ink);
}
.article-body ul, .article-body ol {
  max-width: 680px;
  margin: 16px auto 24px;
  padding-left: 24px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}
.article-body li { margin-bottom: 10px; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body em { font-style: italic; }
.article-body .references,
.article-body .disclaimer,
.article-body .key-fact,
.article-body .cta-box,
.article-body .related-posts {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.key-fact {
  background: var(--forest-tint);
  border-left: 3px solid var(--forest);
  padding: 22px 26px;
  border-radius: 4px;
  margin: 32px auto;
  max-width: 680px;
}
.key-fact strong.label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--forest);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 8px;
}
.key-fact p {
  color: var(--forest-deep);
  margin: 0;
  font-size: 16px;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  line-height: 1.55;
}

.breadcrumb {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 32px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.breadcrumb a { color: var(--ink-muted); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--blue-deep); }
.breadcrumb .sep { margin: 0 8px; opacity: 0.5; }

.cta-box {
  background: var(--ink);
  color: var(--paper);
  padding: 40px 36px;
  border-radius: 8px;
  text-align: center;
  margin: 40px auto;
  max-width: 680px;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 0%, rgba(201, 123, 42, 0.18) 0%, transparent 50%);
}
.cta-box h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  font-style: italic;
  color: var(--paper);
  margin: 0 0 8px;
  position: relative;
}
.cta-box p {
  color: #b8b0a0;
  margin: 0 0 22px;
  font-size: 15px;
  position: relative;
}
.cta-box a {
  display: inline-block;
  background: var(--paper);
  color: var(--ink);
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.cta-box a:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.related-posts {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.related-posts h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
  color: var(--ink);
}
.related-posts a {
  display: block;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 500;
  transition: border-color 0.2s, transform 0.15s;
}
.related-posts a:hover {
  border-color: var(--blue);
  transform: translateX(2px);
}
.related-posts a::after { content: ' →'; color: var(--blue-deep); }

/* === Blog index post cards === */
.post-grid {
  display: grid;
  gap: 0;
  margin: 32px auto 0;
  max-width: 760px;
  border-top: 1px solid var(--rule);
}
.post-card {
  display: block;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.25s ease;
  cursor: pointer;
}
.post-card:hover {
  padding-left: 12px;
}
.post-card-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.post-card-tag {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--blue-deep);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.post-card-time {
  font-size: 12px;
  color: var(--ink-muted);
}
.post-card h2 {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: -0.025em;
  line-height: 1.2;
  transition: color 0.2s;
}
.post-card:hover h2 { color: var(--blue-deep); }
.post-card h2 em { font-style: italic; }
.post-card p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  max-width: 620px;
}
.post-card .read-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* === Page-section spacing utility === */
.section-pad { padding: 56px 0; }
.section-pad-lg { padding: 80px 0; }

/* ═══════════════════════════════════════════════════════════════
   NEW v2.1 — Soft notice, Lead capture, Modal, Daily Tracker
   ═══════════════════════════════════════════════════════════════ */

/* === Soft medical notice (replaces checkbox gate) === */
.soft-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--forest-tint);
  border-left: 3px solid var(--sage);
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.soft-notice-icon { flex-shrink: 0; font-size: 15px; margin-top: 1px; }
.soft-notice p { margin: 0; }
.soft-notice a { color: var(--blue-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* === Lead capture CTA (shown after results) === */
.lead-capture {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  background: linear-gradient(135deg, #1e3a2e 0%, #2a5040 100%);
  border-radius: 12px;
  padding: 36px 32px;
  margin-top: 32px;
  position: relative;
  overflow: hidden;
}
.lead-capture::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(201,123,42,0.15);
  border-radius: 50%;
  pointer-events: none;
}
.lead-capture-icon {
  font-size: 2.8rem;
  line-height: 1;
}
.lead-capture-body { flex: 1; }
.lead-capture-body h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  font-style: italic;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.lead-capture-body p {
  font-size: 14.5px;
  color: rgba(255,255,255,0.8);
  margin: 0;
  line-height: 1.6;
  max-width: 420px;
}
.btn-lead {
  display: inline-block;
  padding: 15px 32px;
  background: var(--amber);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(201,123,42,0.4);
  margin-top: 4px;
}
.btn-lead:hover {
  background: var(--amber-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,123,42,0.5);
}

.tracker-nudge {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-top: 12px;
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover { color: var(--amber); }

/* === Email capture modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(26, 26, 26, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-card {
  background: var(--card);
  border-radius: 10px;
  padding: 40px 32px 32px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: var(--card-shadow-lg);
  text-align: center;
  animation: fadeUp 0.3s ease;
}
.modal-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 32px;
  right: 32px;
  height: 3px;
  background: linear-gradient(90deg, var(--forest) 0%, var(--amber) 100%);
  border-radius: 8px 8px 0 0;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--ink); }
.modal-icon { font-size: 2.5rem; margin-bottom: 12px; }
.modal-card h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  font-style: italic;
  color: var(--forest);
  margin-bottom: 8px;
  letter-spacing: -0.025em;
}
.modal-card > p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 20px;
  line-height: 1.6;
}
.modal-input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  text-align: center;
  margin-bottom: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.modal-input:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(30, 58, 46, 0.08);
}
.btn-modal-submit {
  width: 100%;
  padding: 14px;
  background: var(--amber);
  color: var(--paper);
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background 0.2s;
  margin-bottom: 12px;
}
.btn-modal-submit:hover { background: var(--amber-deep); }
.modal-privacy {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin: 0;
}
.modal-privacy a { color: var(--ink-muted); text-decoration: underline; }
.modal-success {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--forest-tint);
  border-radius: 6px;
  padding: 16px;
  text-align: left;
  margin-top: 14px;
}
.modal-success span { font-size: 1.25rem; flex-shrink: 0; }
.modal-success p { margin: 0; font-size: 14px; color: var(--forest-deep); line-height: 1.55; }

/* === Daily tracker section === */
.tracker-section {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
  padding: 56px 0 72px;
}
.tracker-section .section-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 36px;
}
.tracker-section .section-intro h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  font-style: italic;
  color: var(--forest);
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}
.tracker-section .section-intro p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}

.tracker-card {
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--rule-soft);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

.tracker-targets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--forest);
}
@media (max-width: 600px) { .tracker-targets { grid-template-columns: repeat(2, 1fr); } }
.target-cell {
  padding: 18px 20px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.target-cell:last-child { border-right: none; }
.target-cell-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.6);
  margin-bottom: 4px;
}
.target-cell-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--paper);
  letter-spacing: -0.02em;
  line-height: 1;
}

.tracker-table-wrap { overflow-x: auto; }
.tracker-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tracker-tbl thead tr { background: var(--forest-tint); }
.tracker-tbl th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest);
  border-bottom: 2px solid var(--rule-soft);
}
.tracker-tbl th.num-col { text-align: center; }
.col-meal-name { width: 130px; }
.col-food-desc { min-width: 180px; }
.col-num-entry { width: 100px; }
.col-del-btn { width: 36px; }

.tracker-tbl tbody tr { border-bottom: 1px solid var(--rule-soft); }
.tracker-tbl tbody tr:nth-child(even) td { background: rgba(245,240,232,0.35); }
.tracker-tbl td { padding: 6px 8px; vertical-align: middle; }

.tbl-input {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid transparent;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 13.5px;
  background: transparent;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.tbl-input:focus {
  outline: none;
  border-color: var(--forest);
  background: var(--card);
}
.tbl-num { text-align: center; }
.tbl-del {
  background: none;
  border: none;
  color: var(--rule);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  transition: color 0.15s;
}
.tbl-del:hover { color: var(--rust); }

.tracker-tbl tfoot .total-row td {
  padding: 12px 12px;
  background: var(--forest);
  color: var(--paper);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}
.tracker-tbl tfoot .total-row td:first-child { text-align: left; }
.tracker-tbl tfoot .remain-row td {
  padding: 9px 12px;
  background: var(--forest-tint);
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
}
.tracker-tbl tfoot .remain-row td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
}

.tracker-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--rule-soft);
  flex-wrap: wrap;
}
.btn-add-row {
  padding: 9px 18px;
  background: var(--forest);
  color: var(--paper);
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-add-row:hover { background: var(--forest-deep); }
.btn-reset {
  padding: 9px 18px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-reset:hover { border-color: var(--rust); color: var(--rust); }

.tracker-footnote {
  padding: 12px 20px;
  font-size: 12px;
  color: var(--ink-muted);
  background: var(--amber-soft);
  border-top: 1px solid #e8d4b0;
  line-height: 1.55;
}
