/* ============================================================
   The Perimenopause Kitchen — site styles
   Source of truth: DESIGN.md (brand wins colours+fonts,
   references win layout+feel). Decision log D1–D14.
   ============================================================ */

:root {
  /* Brand core */
  --sage: #afbba0;
  --terracotta: #e15123;
  --cream: #fffbf6;

  /* Sage scale */
  --sage-50: #f1f3ee; --sage-100: #e3e8dd; --sage-200: #cfd7c6; --sage-300: #afbba0;
  --sage-400: #97a487; --sage-500: #7e8c6d; --sage-600: #66734f; --sage-700: #4d5839;

  /* Terracotta scale */
  --terracotta-50: #fbeee8; --terracotta-100: #f7d6c7; --terracotta-200: #f0aa8a;
  --terracotta-300: #ea7b4f; --terracotta-400: #e15123; --terracotta-500: #c4421a; --terracotta-600: #a13513;

  /* Cream scale */
  --cream-50: #fffefb; --cream-100: #fffbf6; --cream-200: #fdf4e8; --cream-300: #f7ecd9; --cream-400: #efe0c6;

  /* Deeps */
  --forest: #3c4a29; --forest-soft: #51613a;
  --ink: #221f1a; --ink-soft: #4a443c;
  --charcoal: #2b2b2d;

  /* Semantic */
  --surface-page: var(--cream-100);
  --surface-card: var(--cream-200);
  --surface-band: var(--sage-300);
  --text-heading: var(--ink);
  --text-body: var(--ink-soft);
  --text-brand: var(--forest);
  --text-muted: var(--sage-600);
  --accent: var(--terracotta-400);
  --accent-hover: var(--terracotta-500);
  --accent-press: var(--terracotta-600);
  --btn-fill: var(--sage-300);
  --btn-fill-hover: var(--sage-400);
  --border-soft: rgba(60, 74, 41, 0.16);
  --border-card: rgba(34, 31, 26, 0.10);

  /* Fonts */
  --font-display: 'Abril Fatface', 'Cooper Black', serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Sacramento', cursive;
  --font-sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Radii */
  --radius-xs: 6px; --radius-sm: 12px; --radius-md: 20px;
  --radius-lg: 28px; --radius-xl: 40px; --radius-pill: 999px;

  /* Shadows — warm whispers only */
  --shadow-sm: 0 1px 2px rgba(34, 31, 26, 0.06);
  --shadow-soft: 0 6px 18px rgba(34, 31, 26, 0.10);
  --shadow-card: 0 12px 34px rgba(60, 74, 41, 0.14);
  --shadow-lift: 0 18px 50px rgba(60, 74, 41, 0.20);

  /* Motion */
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 140ms; --dur: 240ms; --dur-slow: 420ms;

  /* Layout */
  --page-max: 1200px;
  --reading-max: 700px;
}

/* ---------- Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; transition: color var(--dur-fast) var(--ease-soft); }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--terracotta-100); color: var(--ink); }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-heading);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.75rem, 6vw, 4rem); line-height: 1.08; }
h2 { font-size: clamp(2.125rem, 4.5vw, 3rem); line-height: 1.12; }
h3 { font-size: clamp(1.625rem, 3vw, 2.25rem); line-height: 1.12; }

.display {
  font-size: clamp(3.25rem, 8vw, 5.5rem);
  line-height: 1.04;
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0;
  line-height: 1;
}

h1 .script, .display .script { font-size: 1.18em; }

.script-title {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--accent);
  font-size: clamp(3.5rem, 8vw, 5rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-brand);
}

.eyebrow-pill {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--sage-100);
  color: var(--forest);
}

.eyebrow-pill.warm { background: var(--terracotta-50); color: var(--terracotta-600); }
.eyebrow-pill.paper { background: var(--cream-300); color: var(--forest); }

.lead { font-size: 1.1875rem; line-height: 1.65; }
.small { font-size: 0.875rem; }
.muted { color: var(--text-muted); }

p + p { margin-top: 1.1em; }

/* ---------- Layout shells ---------- */
.container { max-width: var(--page-max); margin: 0 auto; padding: 0 32px; }
.reading { max-width: var(--reading-max); margin: 0 auto; padding: 0 32px; }

section { padding: 96px 0; }
.section-tight { padding: 72px 0; }
.section-hero { padding: 110px 0 96px; }

.band-cream2 { background: var(--cream-200); }
.band-cream3 { background: var(--cream-300); }
.band-sage50 { background: var(--sage-50); }
.band-sage100 { background: var(--sage-100); }

.center { text-align: center; }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head p { margin-top: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 14px 34px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur) var(--ease-soft), transform var(--dur-fast) var(--ease-soft), box-shadow var(--dur) var(--ease-soft);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-soft); }

.btn-primary { background: var(--accent); color: var(--cream-100); }
.btn-primary:hover { background: var(--accent-hover); color: var(--cream-100); }
.btn-primary:active { background: var(--accent-press); }

.btn-secondary { background: var(--btn-fill); color: var(--forest); }
.btn-secondary:hover { background: var(--btn-fill-hover); color: var(--forest); }

.btn-ghost { background: transparent; color: var(--forest); box-shadow: inset 0 0 0 1.5px var(--forest); }
.btn-ghost:hover { background: var(--sage-50); color: var(--forest); }

.btn-ghost.on-dark { color: var(--cream-100); box-shadow: inset 0 0 0 1.5px var(--cream-100); }
.btn-ghost.on-dark:hover { background: rgba(255, 251, 246, 0.12); color: var(--cream-100); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 251, 246, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-card);
}

.nav-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 32px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--forest);
  line-height: 1;
  white-space: nowrap;
}
.wordmark:hover { color: var(--forest-soft); text-decoration: none; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a.active { color: var(--forest); }

.nav .btn { padding: 11px 24px; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; stroke: var(--forest); }

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, var(--cream-100) 40%, var(--sage-50) 100%);
  padding: 120px 0 130px;
}

.hero-inner { position: relative; max-width: 780px; margin: 0 auto; padding: 0 32px; text-align: center; z-index: 2; }

.hero h1 { margin: 18px 0 26px; }
.hero .lead { max-width: 640px; margin: 0 auto 36px; }
.hero-note { margin-top: 18px; font-size: 0.875rem; color: var(--text-muted); }

/* Tilted polaroid cards — homepage hero + library only (D11) */
.polaroid {
  position: absolute;
  width: 250px;
  padding: 12px 12px 34px;
  background: var(--cream-50);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  z-index: 1;
}
.polaroid .ph {
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.polaroid.tilt-l { transform: rotate(-5deg); }
.polaroid.tilt-r { transform: rotate(4deg); }
.polaroid.tilt-l2 { transform: rotate(-3deg); }

.hero .polaroid.p1 { left: 2.5%; top: 12%; }
.hero .polaroid.p3 { right: 4%; bottom: 5%; width: 220px; }
.hero .polaroid.p4 { left: 5%; bottom: 4%; width: 210px; }

/* ---------- Peri mascot (see DESIGN.md D15 + mascot sheet rules) ---------- */
.peri { width: 230px; }
.peri svg { width: 100%; height: auto; }
.peri-caption {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--terracotta-500);
  text-align: center;
  margin-top: 2px;
  line-height: 1.1;
}
.hero .peri { position: absolute; right: 4.5%; top: 9%; z-index: 1; }

.peri-chip { width: 64px; height: 64px; margin: 0 auto 14px; }
.peri-chip svg { width: 100%; height: 100%; }

.peri-inline { width: 190px; margin: 0 auto 10px; }
.peri-inline svg { width: 100%; height: auto; }

/* Polaroid photos */
.polaroid .ph img { width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius-xs); }
.hero .polaroid.p3 .ph img { height: 175px; }
.hero .polaroid.p4 .ph img { height: 165px; }

/* Free Resource Library decorative polaroids: wide desktop only, so they never
   cross the centered heading/text on narrower screens. */
.section-hero .polaroid { display: none; }
@media (min-width: 1360px) {
  .section-hero .polaroid { display: block; width: 210px; }
  .section-hero .polaroid .ph img { height: 165px; }
}

/* Full-bleed photo divider (DESIGN.md: 40px top corners) */
.photo-band { border-radius: var(--radius-xl) var(--radius-xl) 0 0; overflow: hidden; }
.photo-band img { display: block; width: 100%; height: 400px; object-fit: cover; }

/* Large in-page photo (blog hub, about) */
.photo-large { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-card); }
.photo-large img { display: block; width: 100%; height: 380px; object-fit: cover; }

/* ---------- Blog hub: category sections + post cards ---------- */
.cat-section { margin-top: 72px; }
.cat-section:first-of-type { margin-top: 0; }
.cat-head { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.cat-head svg { height: 54px; width: auto; flex: 0 0 auto; }
.cat-head h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.cat-section > p { max-width: 720px; margin-bottom: 28px; }

.post-card {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  padding: 26px 28px 30px;
  min-height: 210px;
  color: inherit;
  overflow: hidden;
  transition: transform var(--dur) var(--ease-soft), box-shadow var(--dur) var(--ease-soft);
}
a.post-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.post-card .t-pill {
  display: inline-block;
  padding: 4px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.post-card h3 { font-size: 1.5rem; line-height: 1.15; max-width: 78%; }
.post-card .read { display: inline-block; margin-top: 14px; font-weight: 700; font-size: 0.9375rem; color: var(--accent); }
.post-card.on-dark h3 { color: var(--cream-100); }
.post-card.on-dark .read { color: var(--terracotta-200); }
.post-card .steam { position: absolute; right: 16px; bottom: 10px; width: 78px; height: auto; opacity: 0.95; }

/* ---------- Post page (thumbnail-formula hero) ---------- */
.post-hero {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  padding: 48px 52px 56px;
  margin-top: 48px;
  overflow: hidden;
  min-height: 300px;
}
.post-hero .t-pill {
  display: inline-block;
  padding: 5px 15px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.post-hero h1 { font-size: clamp(2rem, 4vw, 2.875rem); line-height: 1.12; max-width: 62%; }
.post-hero.on-dark h1 { color: var(--cream-100); }
.post-hero .peri-thumb { position: absolute; right: 24px; bottom: -6px; width: 210px; height: auto; }

.post-body { padding: 64px 0 96px; }
.post-body h2 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); margin: 2em 0 0.6em; }
.post-body h3 { font-size: 1.25rem; margin: 1.5em 0 0.4em; color: var(--forest); }
.post-body ul { margin: 1em 0 1em 1.3em; }
.post-body li { margin-bottom: 0.6em; }
.post-body li::marker { color: var(--accent); }

.peri-says {
  background: var(--terracotta-50);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 2em 0;
}
.peri-says .quote {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--terracotta-600);
  line-height: 1.35;
}
.peri-says .who {
  display: block;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 8px;
}

.post-back { display: inline-block; margin-bottom: 6px; font-weight: 700; font-size: 0.9375rem; }
.post-sources { background: var(--cream-200); border: 1px solid var(--border-card); border-radius: var(--radius-md); padding: 24px 28px; margin-top: 3em; font-size: 0.9375rem; }
.post-sources h2 { margin: 0 0 0.6em !important; font-size: 1.375rem !important; }
.post-sources ul { margin: 0 0 0 1.2em; }
.post-sources p { margin-top: 0.7em; }
.post-sources .src-label { margin-top: 1.1em; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage-600); }
.post-sources .src-label:first-of-type { margin-top: 0.2em; }
.post-sources a { word-break: break-word; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform var(--dur) var(--ease-soft), box-shadow var(--dur) var(--ease-soft);
}

a.card { display: block; color: inherit; }
a.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-soft); }

/* Quilt rotation (D8): cream-200 → sage-100 → terracotta-50 */
.quilt > :nth-child(3n + 1) { background: var(--cream-200); }
.quilt > :nth-child(3n + 2) { background: var(--sage-100); }
.quilt > :nth-child(3n + 3) { background: var(--terracotta-50); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.cat-card h3 { font-size: 1.75rem; margin: 18px 0 10px; }
.cat-card .motif { height: 96px; display: flex; align-items: center; }
.cat-card .motif svg { height: 76px; width: auto; }
.cat-card p { font-size: 0.9375rem; line-height: 1.6; }
.cat-card .more { display: inline-block; margin-top: 16px; font-weight: 700; font-size: 0.9375rem; color: var(--accent); }
a.cat-card:hover .more { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Feature / product showcase ---------- */
.feature-card {
  display: grid;
  grid-template-columns: 45% 1fr;
  gap: 0;
  background: var(--cream-200);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.feature-visual {
  background: var(--terracotta-50);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.feature-body { padding: 56px 56px 56px 48px; }
.feature-body h2 { font-size: clamp(1.875rem, 3vw, 2.5rem); margin-bottom: 8px; }
.feature-body .sub { font-weight: 700; color: var(--text-muted); font-size: 0.9375rem; letter-spacing: 0.02em; }

.check-list { list-style: none; margin: 26px 0; }
.check-list li { display: flex; gap: 14px; margin-bottom: 16px; font-size: 1rem; }
.check-list li svg { flex: 0 0 22px; height: 22px; margin-top: 3px; stroke: var(--forest); }

/* Guide cover mock (typographic, brand-only) */
.guide-cover {
  width: 250px;
  background: var(--cream-50);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 30px 24px;
  text-align: center;
  transform: rotate(-2deg);
}
.guide-cover .gc-eyebrow { font-size: 0.5625rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--sage-600); }
.guide-cover .gc-title { font-family: var(--font-serif); font-weight: 600; font-size: 1.75rem; line-height: 1.1; color: var(--ink); margin: 14px 0 6px; }
.guide-cover .gc-script { font-family: var(--font-script); font-size: 1.375rem; color: var(--accent); }
.guide-cover .gc-rule { height: 1px; background: var(--border-soft); margin: 18px 12px; }
.guide-cover .gc-sub { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.8; }
.guide-cover svg { margin: 6px auto 0; height: 58px; width: auto; }

/* ---------- Stats row ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4rem);
  color: var(--accent);
  line-height: 1.04;
}
.stat .lbl { margin-top: 10px; font-size: 0.9375rem; color: var(--ink-soft); }

/* ---------- Signup / forms ---------- */
.signup-block { max-width: 720px; margin: 0 auto; text-align: center; }

.form-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

input[type="text"], input[type="email"], textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream-50);
  border: 1.5px solid var(--sage-200);
  border-radius: var(--radius-md);
  padding: 13px 18px;
  min-width: 0;
  transition: border-color var(--dur-fast) var(--ease-soft);
}
input:focus, textarea:focus { outline: none; border-color: var(--forest); }
input::placeholder, textarea::placeholder { color: var(--sage-500); }

.form-row input { flex: 1 1 180px; max-width: 280px; }

.form-fine { margin-top: 18px; font-size: 0.75rem; color: var(--text-muted); max-width: 480px; margin-left: auto; margin-right: auto; }

.form-stack { display: flex; flex-direction: column; gap: 16px; max-width: 560px; margin: 40px auto 0; text-align: left; }
.form-stack label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage-600); margin-bottom: 6px; display: block; }
.form-stack textarea { min-height: 160px; resize: vertical; }
.form-stack .btn { align-self: flex-start; }

/* ---------- Symptom check quiz ---------- */
.quiz-card { background: var(--cream-200); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 36px 40px; }
.quiz-q { padding: 20px 0; border-bottom: 1px dashed var(--border-soft); }
.quiz-q:first-child { padding-top: 4px; }
.quiz-q p { font-size: 1.0625rem; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.quiz-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.quiz-opt { flex: 1 1 auto; min-width: 90px; font-family: var(--font-sans); font-size: 0.875rem; font-weight: 700; padding: 11px 10px; border-radius: var(--radius-md); border: 1.5px solid var(--sage-200); background: var(--cream-50); color: var(--sage-700); cursor: pointer; text-align: center; transition: all var(--dur-fast) var(--ease-soft); }
.quiz-opt:hover { background: var(--sage-100); }
.quiz-opt.on { background: var(--sage-300); color: var(--forest); border-color: var(--sage-400); }
.quiz-submit-row { text-align: center; margin-top: 32px; }
.quiz-hint { font-size: 0.875rem; color: var(--text-muted); margin-top: 14px; min-height: 1.2em; }

.quiz-result { margin-top: 36px; }
.result-top { background: var(--terracotta-50); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 36px 40px; }
.result-top .eyebrow { color: var(--terracotta-600); }
.result-top h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 10px 0 16px; }
.result-top ul { list-style: none; margin: 20px 0 0; }
.result-top ul li { display: flex; gap: 12px; margin-bottom: 12px; font-size: 1rem; }
.result-top ul li svg { flex: 0 0 20px; height: 20px; margin-top: 3px; stroke: var(--forest); }

.domain-map { margin-top: 32px; }
.domain-map h3 { font-size: 1.375rem; margin-bottom: 18px; }
.domain-row { display: grid; grid-template-columns: 150px 1fr 46px; align-items: center; gap: 14px; margin-bottom: 12px; }
.domain-row .dn { font-size: 0.9375rem; font-weight: 700; color: var(--ink-soft); }
.domain-track { background: var(--sage-100); border-radius: var(--radius-pill); height: 18px; overflow: hidden; border: 1px solid var(--border-card); }
.domain-fill { background: var(--sage-400); height: 100%; width: 0; border-radius: var(--radius-pill); transition: width 400ms var(--ease-soft); }
.domain-row.top .domain-fill { background: var(--accent); }
.domain-row.top .dn { color: var(--ink); }
.domain-pct { font-size: 0.8125rem; font-weight: 700; color: var(--text-muted); text-align: right; }

@media (max-width: 600px) {
  .quiz-card, .result-top { padding: 26px 22px; }
  .quiz-opt { min-width: 0; padding: 11px 6px; font-size: 0.8125rem; }
  .domain-row { grid-template-columns: 110px 1fr 40px; gap: 10px; }
}

/* ---------- Protein tracker tool ---------- */
.tool-card { background: var(--cream-200); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 40px; }
.tool-card + .tool-card { margin-top: 28px; }
.tool-card h3 { font-size: 1.375rem; margin-bottom: 16px; }
.tool-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.tool-field label { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage-600); margin-bottom: 7px; }
.tool-field input, .tool-field select { font-family: var(--font-sans); font-size: 1rem; color: var(--ink); background: var(--cream-50); border: 1.5px solid var(--sage-200); border-radius: var(--radius-md); padding: 12px 14px; }
.tool-field input:focus, .tool-field select:focus { outline: none; border-color: var(--forest); }
.tool-field input[type="number"] { width: 120px; }

.unit-toggle { display: inline-flex; border: 1.5px solid var(--sage-200); border-radius: var(--radius-pill); overflow: hidden; }
.unit-toggle button { border: none; background: var(--cream-50); color: var(--sage-700); font-weight: 700; padding: 12px 20px; cursor: pointer; font-family: var(--font-sans); }
.unit-toggle button.on { background: var(--sage-300); color: var(--forest); }

.target-display { text-align: center; margin: 30px 0 8px; }
.target-display .num { font-family: var(--font-display); font-size: clamp(3rem, 9vw, 4.5rem); color: var(--accent); line-height: 1.02; }
.target-display .lbl { font-size: 1rem; color: var(--ink-soft); margin-top: 4px; }
.target-display .sub { font-size: 0.875rem; color: var(--text-muted); margin-top: 10px; }

.progress { background: var(--sage-100); border-radius: var(--radius-pill); height: 28px; overflow: hidden; border: 1px solid var(--border-card); }
.progress-fill { background: var(--accent); height: 100%; width: 0; border-radius: var(--radius-pill); transition: width 350ms var(--ease-soft), background 300ms; }
.progress-fill.done { background: var(--sage-500); }
.progress-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-weight: 700; font-size: 0.9375rem; }
.progress-caption .msg { font-weight: 600; color: var(--forest); }

.quick-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.quick-chips button { font-family: var(--font-sans); font-size: 0.875rem; font-weight: 700; padding: 10px 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--sage-200); background: var(--cream-50); color: var(--sage-700); cursor: pointer; transition: all var(--dur-fast) var(--ease-soft); }
.quick-chips button:hover { background: var(--sage-100); transform: translateY(-1px); }

.log-list { list-style: none; margin: 20px 0 0; }
.log-list li { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--border-soft); font-size: 0.9375rem; }
.log-list li:last-child { border-bottom: none; }
.log-list .g { font-weight: 700; color: var(--forest); margin-left: auto; margin-right: 14px; }
.log-list .rm { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 1.25rem; line-height: 1; padding: 0 4px; }
.log-empty { color: var(--text-muted); font-size: 0.9375rem; margin-top: 16px; }
.tool-reset { margin-top: 18px; }
.tool-reset button { background: none; border: none; color: var(--text-muted); font-family: var(--font-sans); font-weight: 700; font-size: 0.8125rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.cheat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 28px; margin-top: 16px; }
.cheat-grid div { display: flex; justify-content: space-between; font-size: 0.9375rem; border-bottom: 1px dashed var(--border-soft); padding: 8px 0; }
.cheat-grid span { font-weight: 700; color: var(--forest); }

@media (max-width: 600px) {
  .tool-card { padding: 28px 22px; }
  .tool-field input[type="number"] { width: 100%; }
}

/* ---------- Form success message (after Kit signup) ---------- */
.form-success {
  max-width: 560px;
  margin: 32px auto 0;
  background: var(--cream-200);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  text-align: center;
}
.form-success p { font-size: 1.0625rem; color: var(--ink-soft); margin: 0; }

/* ---------- Freebie cards (library) ---------- */
.freebie-card { text-align: left; }
.freebie-card .emoji { font-size: 2rem; line-height: 1; }
.freebie-card h3 { font-size: 1.5rem; margin: 16px 0 10px; }
.freebie-card p { font-size: 0.9375rem; }
.freebie-card p em { color: var(--text-muted); }

/* ---------- Pull-quote ---------- */
.pull-quote {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 40px 40px;
  text-align: center;
}
.pull-quote .qmark {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--accent);
  display: block;
  margin-bottom: -18px;
}
.pull-quote blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.35;
  color: var(--ink);
}

/* ---------- Notice / aside card ---------- */
.notice {
  background: var(--cream-300);
  border-radius: var(--radius-md);
  padding: 22px 28px;
  font-size: 0.9375rem;
}

/* ---------- Reading pages (about, legal) ---------- */
.article { padding: 88px 0 96px; }
.article header { text-align: center; margin-bottom: 56px; }
.article header .eyebrow { margin-bottom: 16px; }
.article h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin: 2.2em 0 0.6em; }
.article h3 { font-size: 1.5rem; margin: 1.8em 0 0.5em; }
.article ul { margin: 1em 0 1em 1.3em; }
.article li { margin-bottom: 0.6em; }
.article li::marker { color: var(--accent); }

.legal-updated { font-size: 0.875rem; color: var(--text-muted); }

mark {
  background: var(--terracotta-50);
  color: var(--terracotta-600);
  border-radius: 4px;
  padding: 0 6px;
  font-weight: 700;
}

/* ---------- Divider flourish ---------- */
.flourish { display: flex; justify-content: center; margin: 0 auto; }
.flourish svg { height: 26px; stroke: var(--sage-400); }

/* ---------- Cookie consent banner (D19) ---------- */
.cookie-banner {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 200;
  max-width: 420px;
  background: var(--cream-50);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px 28px;
}
.cookie-banner p { font-size: 0.9375rem; line-height: 1.6; color: var(--ink-soft); }
.cookie-actions { display: flex; gap: 10px; margin-top: 20px; }
.cookie-banner .btn { padding: 10px 26px; font-size: 0.875rem; }

@media (max-width: 600px) {
  .cookie-banner { left: 14px; right: 14px; bottom: 14px; max-width: none; padding: 22px; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--forest);
  color: var(--cream-100);
  padding: 88px 0 44px;
  margin-top: 0;
}

.footer .wordmark { color: var(--cream-100); font-size: 1.75rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.footer p { font-size: 0.9375rem; color: var(--sage-200); margin-top: 18px; max-width: 380px; }
.footer p a { color: var(--terracotta-200); font-weight: 700; }
.footer p a:hover { color: var(--terracotta-100); }

.footer h4 {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-300);
  margin-bottom: 18px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--cream-100); font-size: 0.9375rem; font-weight: 600; }
.footer-links a:hover { color: var(--terracotta-200); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255, 251, 246, 0.16);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--sage-200);
}
.footer-bottom a { color: var(--sage-100); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero .polaroid.p3, .hero .polaroid.p4 { display: none; }
  .hero .polaroid { width: 150px; }
}

@media (max-width: 900px) {
  section { padding: 72px 0; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .hero .peri { position: static; margin: 44px auto 0; }
  .photo-band img { height: 260px; }
  .photo-large img { height: 240px; }
  .post-hero { padding: 36px 28px 150px; }
  .post-hero h1 { max-width: 100%; }
  .post-hero .peri-thumb { width: 170px; right: 12px; }
  .post-card h3 { max-width: 100%; }
  .feature-card { grid-template-columns: 1fr; }
  .feature-body { padding: 40px 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero .polaroid { display: none; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--cream-100);
    border-bottom: 1px solid var(--border-card);
    padding: 28px 32px 32px;
    gap: 22px;
    box-shadow: var(--shadow-soft);
  }
}

@media (max-width: 600px) {
  .grid-3, .grid-2, .stats { grid-template-columns: 1fr; }
  .container, .reading, .nav-inner { padding-left: 22px; padding-right: 22px; }
  .form-row input { max-width: none; }
  .nav .btn { display: none; }
}
