/* Microbiome Recipes — base styles
   Palette (all text pairs meet WCAG 2.1 AA 4.5:1):
   ink #17211C, muted #4A5650, accent #1E6B4E, accent-dark #14503A,
   tint #E3EFE8, ground-alt #F4F6F3, line #DDE3DE, photo placeholder #EDE6DA */

:root {
  --ink: #17211C;
  --muted: #4A5650;
  --accent: #1E6B4E;
  --accent-dark: #14503A;
  --tint: #E3EFE8;
  --alt: #F4F6F3;
  --line: #DDE3DE;
  --border: #7C8A82;
  --photo: #EDE6DA;
  --warn-bg: #FBF3E6;
  --warn-ink: #4A3A20;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Manrope, Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: #fff; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.01em; margin: 0; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 20px; }
.brand:hover { color: var(--ink); }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-weight: 500; }
.main-nav a { color: var(--ink); text-decoration: none; }
.main-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 600 16px var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: #C9D2CC; }
.btn-secondary:hover { color: var(--ink); border-color: var(--border); }
.btn-light { background: #fff; color: var(--ink); }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid #C9D2CC; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* Common */
.eyebrow { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.lede { font-size: 20px; line-height: 1.55; color: var(--muted); margin: 0; }
.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; text-decoration: none; }
.tag-pillar { color: var(--accent-dark); background: var(--tint); }
.tag-plain { color: #3D4A43; background: #F0F2EF; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.photo { margin: 0; background: var(--photo); border-radius: 16px; display: flex; align-items: flex-end; padding: 16px; }
.photo figcaption { font-size: 14px; color: #4A4236; background: rgba(255,255,255,0.88); padding: 6px 10px; border-radius: 6px; }
.section { padding: 72px 0; }
.section-title { font-weight: 700; font-size: 34px; }
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Home */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding: 72px 0 56px; }
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-weight: 800; font-size: clamp(38px, 5vw, 60px); line-height: 1.05; letter-spacing: -0.02em; }
.hero .photo { flex: 1 1 440px; min-width: 0; height: 480px; border-radius: 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-bottom: 56px; }
.quick h2 { font-size: 22px; font-weight: 700; }
.quick nav { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--border); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; }
.chip:hover { color: var(--ink); background: var(--alt); }

.pillars { background: var(--alt); }
.pillar-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.pillar-card:hover { color: var(--ink); border-color: var(--border); }
.pillar-card strong { font-family: var(--display); font-size: 20px; }
.pillar-card span { color: var(--muted); font-size: 15px; }
.pillar-card .more { color: var(--accent); font-weight: 600; }

.recipe-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.recipe-card:hover { color: var(--ink); }
.recipe-card .photo { height: 240px; }
.recipe-card .meta { font-size: 13px; color: var(--muted); font-weight: 500; }
.recipe-card .title { font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.3; }

.dark { background: var(--ink); color: #fff; }
.dark .eyebrow { color: #9FD3B8; }
.dark p { color: #D5DDD8; }
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split > * { flex: 1 1 420px; min-width: 0; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-top: 1px solid #3A4740; padding: 18px 0; }
.link-list li:last-child { border-bottom: 1px solid #3A4740; }
.link-list a { color: #fff; text-decoration: none; font-size: 19px; font-weight: 600; }
.link-list a:hover { text-decoration: underline; }

.book-cover { flex: 0 1 320px !important; height: 410px; border-radius: 12px; background: var(--tint); justify-content: center; align-items: center; }

.newsletter { background: var(--tint); text-align: center; }
.newsletter form { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: flex-end; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; flex: 1 1 300px; max-width: 380px; }
.field label { font-weight: 600; font-size: 15px; }
.field input { height: 50px; border: 1px solid var(--border); border-radius: 10px; padding: 0 14px; font: 16px var(--sans); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.site-footer p { margin: 8px 0 0; font-size: 14px; color: var(--muted); max-width: 420px; }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 48px; font-size: 15px; }

/* Article */
.breadcrumb { font-size: 14px; color: var(--muted); padding-top: 40px; }
.article { padding: 24px 0 72px; display: flex; flex-direction: column; gap: 28px; }
.article h1 { font-weight: 800; font-size: clamp(34px, 4.5vw, 48px); line-height: 1.1; letter-spacing: -0.02em; }
.byline { font-size: 15px; color: var(--muted); margin: 0; }
.summary { background: var(--alt); border-radius: 16px; padding: 28px; }
.summary h2 { font-size: 20px; margin-bottom: 12px; }
.summary ul { margin: 0; padding-left: 22px; font-size: 17px; line-height: 1.55; display: grid; gap: 10px; }
.prose { font-size: 18px; line-height: 1.7; display: flex; flex-direction: column; gap: 20px; }
.prose h2 { font-size: 28px; line-height: 1.25; margin-top: 8px; }
.prose p { margin: 0; }
.mini-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.mini-card:hover { color: var(--ink); border-color: var(--border); }
.mini-card span { font-size: 14px; color: var(--muted); }
.sources { border-top: 1px solid var(--line); padding-top: 28px; }
.sources ol { padding-left: 22px; font-size: 15px; line-height: 1.55; color: #3D4A43; display: grid; gap: 8px; }

/* Recipe */
.recipe-hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 24px 0 40px; }
.recipe-hero > div { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.recipe-hero h1 { font-weight: 800; font-size: clamp(32px, 4.2vw, 46px); line-height: 1.1; letter-spacing: -0.02em; }
.recipe-hero .photo { flex: 1 1 440px; min-width: 0; height: 460px; border-radius: 24px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 700; font-size: 18px; }
.recipe-body { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-bottom: 56px; }
.ingredients { flex: 1 1 340px; min-width: 0; background: var(--alt); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.ingredients-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.servings { display: flex; align-items: center; gap: 10px; }
.servings button { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--border); background: #fff; font-size: 20px; cursor: pointer; }
.servings output { font-weight: 600; min-width: 92px; text-align: center; }
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-list li { border-top: 1px solid var(--line); padding: 12px 0; }
.ing-list label { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; cursor: pointer; }
.ing-list input { width: 22px; height: 22px; accent-color: var(--accent); margin: 2px 0 0; flex: none; }
.shop { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.shop h3 { font-size: 19px; }
.shop p { margin: 0; font-size: 15px; color: var(--muted); }
.shop .fine { font-size: 13px; }
.placeholder-btn { min-height: 52px; border-radius: 10px; border: 2px dashed var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: #3D4A43; text-align: center; padding: 0 12px; }
.method { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; counter-reset: step; }
.steps li { display: flex; gap: 18px; align-items: flex-start; counter-increment: step; }
.steps li::before { content: counter(step); flex: none; width: 40px; height: 40px; border-radius: 20px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--display); }
.steps p { margin: 8px 0 0; font-size: 18px; line-height: 1.6; }
.note { border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.note h2 { font-size: 20px; margin-bottom: 10px; }
.note p { margin: 0; font-size: 17px; line-height: 1.65; }
.care { background: var(--warn-bg); border-radius: 16px; padding: 22px 24px; }
.care h2 { font-size: 18px; color: #5A3B0E; margin-bottom: 8px; }
.care p { margin: 0; color: var(--warn-ink); line-height: 1.6; }
.disclaimer { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; margin: 0; }

@media print {
  .site-header, .site-footer, .shop, .actions, .servings, .related { display: none !important; }
  .recipe-hero .photo { display: none; }
}
