:root {
  --cream: #faf6ef; --paper: #fffdf9; --ink: #20302a; --muted: #6b7167;
  --green: #2f6d4f; --green-deep: #1f4d37; --terracotta: #c8643c; --olive: #7d8b3a;
  --line: #e8e1d4; --shadow: 0 1px 2px rgba(31,77,55,.06), 0 8px 24px rgba(31,77,55,.06);
  --radius: 14px; --maxw: 1120px;
  --serif: "Fraunces", Georgia, serif; --sans: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--green-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .4em; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(250,246,239,.88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { font-family: var(--serif); font-size: 1.28rem; font-weight: 600; color: var(--green-deep); display: flex; align-items: center; gap: 9px; }
.brand .leaf { width: 26px; height: 26px; }
.nav { margin-left: auto; display: flex; gap: 22px; font-size: .95rem; }
.nav a { color: var(--ink); }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 64px 0 56px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.hero .kicker { color: var(--terracotta); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; margin-bottom: 14px; }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 46ch; }
.hero-img { aspect-ratio: 4/3; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-stats { display: flex; gap: 28px; margin-top: 26px; }
.hero-stats b { font-family: var(--serif); font-size: 1.7rem; color: var(--green); display: block; }
.hero-stats span { font-size: .82rem; color: var(--muted); }

.btn { display: inline-block; background: var(--green); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 600; margin-top: 26px; transition: background .15s; }
.btn:hover { background: var(--green-deep); text-decoration: none; }

/* Section heading */
.section { padding: 26px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; border-bottom: 2px solid var(--line); padding-bottom: 10px; }
.section-head h2 { font-size: 1.7rem; margin: 0; }
.section-head .ch-num { font-family: var(--serif); color: var(--terracotta); font-size: .9rem; font-weight: 600; }
.section-head .blurb { color: var(--muted); font-size: .92rem; text-align: right; max-width: 40ch; }

/* Filter bar */
.filters { position: sticky; top: 64px; z-index: 40; background: var(--cream); padding: 16px 0; border-bottom: 1px solid var(--line); }
.filters .wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#search { flex: 1; min-width: 220px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: .95rem; font-family: inherit; color: var(--ink); }
#search:focus { outline: 2px solid var(--green); border-color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; font-size: .85rem; font-family: inherit; color: var(--muted); transition: all .12s; }
.chip:hover { border-color: var(--green); color: var(--green); }
.chip.active { background: var(--green); color: #fff; border-color: var(--green); }
.count { color: var(--muted); font-size: .85rem; margin-left: auto; }

/* Card grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 22px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(31,77,55,.1), 0 16px 40px rgba(31,77,55,.1); text-decoration: none; }
.card a.card-link { color: inherit; display: flex; flex-direction: column; height: 100%; }
.card a.card-link:hover { text-decoration: none; }
.thumb { position: relative; aspect-ratio: 3/2; display: grid; place-items: center; overflow: hidden; }
.thumb::after { content: attr(data-emoji); font-size: 3.2rem; opacity: .85; filter: saturate(.9); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb.c1 { background: linear-gradient(135deg, #e7f0e4, #cfe0cd); }
.thumb.c2 { background: linear-gradient(135deg, #f3ead9, #e6d3b3); }
.thumb.c3 { background: linear-gradient(135deg, #e9efd6, #d7e3b8); }
.thumb.c4 { background: linear-gradient(135deg, #f5e8de, #ecd2bf); }
.thumb.c5 { background: linear-gradient(135deg, #f7e3d6, #f0c9b0); }
.thumb.c6 { background: linear-gradient(135deg, #ece6dc, #dcd3c2); }
.thumb.c7 { background: linear-gradient(135deg, #e3ede9, #c9ded3); }
.card-body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-body h3 { font-size: 1.12rem; margin: 0; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .8rem; color: var(--muted); margin-top: auto; }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* Confidence badge */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; width: fit-content; }
.badge.hi { background: #e3f0e6; color: #246b41; }
.badge.mid { background: #f0efd9; color: #6f7a23; }
.badge.lo { background: #f7e9da; color: #a85b2c; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Recipe page */
.recipe-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; padding: 36px 0 12px; }
.recipe-hero .thumb { border-radius: 18px; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.recipe-hero .thumb::after { font-size: 5rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.recipe-hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.facts { display: flex; flex-wrap: wrap; gap: 18px; margin: 20px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { font-size: .9rem; }
.facts b { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--green); }
.facts span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }

.recipe-body { display: grid; grid-template-columns: 0.9fr 1.4fr; gap: 44px; padding: 30px 0 10px; align-items: start; }
.recipe-body h2 { font-size: 1.4rem; margin-bottom: 14px; }
.ingredients { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); position: sticky; top: 84px; }
.ing-group { margin-bottom: 16px; }
.ing-group h4 { font-family: var(--sans); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--terracotta); margin: 0 0 8px; }
.ing-group ul { list-style: none; margin: 0; padding: 0; }
.ing-group li { padding: 7px 0 7px 24px; border-bottom: 1px dashed var(--line); position: relative; font-size: .94rem; }
.ing-group li::before { content: "›"; position: absolute; left: 6px; color: var(--green); font-weight: 700; }
.ing-group li:last-child { border-bottom: none; }
ol.method { counter-reset: step; list-style: none; margin: 0; padding: 0; }
ol.method li { counter-increment: step; position: relative; padding: 0 0 20px 52px; min-height: 36px; }
ol.method li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; background: var(--green); color: #fff; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; }
ol.method li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: 6px; width: 2px; background: var(--line); }
.note { background: #f3efe5; border-left: 4px solid var(--olive); border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 22px 0; }
.note h4 { margin: 0 0 6px; font-family: var(--sans); font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; color: var(--olive); }
.note p { margin: 0; font-size: .96rem; }
.note.recon { border-left-color: var(--terracotta); }
.note.recon h4 { color: var(--terracotta); }
.xref { margin: 26px 0; }
.xref h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 10px; }
.xref a { display: inline-flex; align-items: center; gap: 7px; background: var(--paper); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; margin: 0 8px 8px 0; font-size: .88rem; }
.xref a:hover { border-color: var(--green); text-decoration: none; }

/* About */
.prose { max-width: 70ch; margin: 0 auto; padding: 40px 0; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }
.prose p, .prose li { font-size: 1.02rem; color: #2c3b34; }
.prose .lead { font-size: 1.18rem; color: var(--muted); }

/* Footer */
.site-foot { margin-top: 60px; background: var(--green-deep); color: #dce8df; padding: 44px 0; font-size: .9rem; }
.site-foot a { color: #fff; }
.site-foot .disc { color: #a9c2b2; font-size: .82rem; margin-top: 14px; max-width: 70ch; }
.site-foot .foot-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }

.hidden { display: none !important; }
.empty-msg { padding: 40px 0; color: var(--muted); text-align: center; grid-column: 1/-1; }

@media (max-width: 820px) {
  .hero-grid, .recipe-hero, .recipe-body { grid-template-columns: 1fr; gap: 26px; }
  .ingredients { position: static; }
  .section-head { flex-direction: column; }
  .section-head .blurb { text-align: left; }
  .recipe-hero .thumb { order: -1; }
}

/* ───────── v2: meal-prep restructure (cards as links, bases, dual nav) ───────── */
.card { color: inherit; text-decoration: none; }
.card:hover { text-decoration: none; }
.card-body { gap: 7px; }

/* emoji shows ONLY on placeholders, never over a real photo */
.thumb:has(img)::after { content: none; }
.base-thumb { background: linear-gradient(135deg, #eaf0e6, #d3e2cf); }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #eef1e9; color: #5a6b3f; width: fit-content; }
.tag.store-freeze { background: #e2eef6; color: #2b6a8f; }
.tag.store-fridge { background: #e7f0ec; color: #3f7159; }
.tag.store-pantry { background: #f4 ead9; color: #8a6a2f; }
.tag.store-pantry { background: #f4ebda; color: #8a6a2f; }
.base-short { font-size: .85rem; color: var(--muted); margin: 2px 0 0; line-height: 1.45; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-cta .btn { margin-top: 0; }
.btn.ghost { background: transparent; color: var(--green-deep); border: 1.5px solid var(--green); }
.btn.ghost:hover { background: var(--green); color: #fff; }

.how .steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step3 { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
.step3 .n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: #fff; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; margin-bottom: 12px; }
.step3 h3 { margin: 0 0 6px; font-size: 1.15rem; }
.step3 p { margin: 0; color: var(--muted); font-size: .94rem; }

.seelink { margin-left: auto; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.pagehead { padding: 38px 0 8px; }
.pagehead h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: .2em; }
.pagehead p { color: var(--muted); font-size: 1.05rem; margin: 0; max-width: 60ch; }

.filters.sub { position: static; border-bottom: none; padding: 8px 0; background: transparent; }
.filters.sub .wrap { align-items: flex-start; }
.flabel { font-size: .82rem; color: var(--muted); font-weight: 600; padding-top: 9px; }

.prep-banner { background: #eef4ee; border: 1px solid #d6e4d6; border-radius: 14px; padding: 16px 20px; margin: 20px 0 4px; font-size: .96rem; }
.prep-banner .xref { margin: 10px 0 0; }
.store-note { margin-top: 16px; font-size: .92rem; color: #3c4b40; background: #f3efe5; padding: 11px 15px; border-radius: 10px; }
.ing-note { font-size: .82rem; color: var(--muted); margin: 0 0 12px; }
.lead { font-size: 1.12rem; color: var(--muted); }

.ingredients ul { list-style: none; margin: 0; padding: 0; }
.ingredients > ul > li { padding: 7px 0 7px 22px; border-bottom: 1px dashed var(--line); position: relative; font-size: .92rem; }
.ing-name { text-transform: capitalize; }
.ingredients > ul > li::before { content: "›"; position: absolute; left: 4px; color: var(--green); font-weight: 700; }
.ingredients > ul > li:last-child { border-bottom: none; }

.recon { color: #a07a3c; font-style: italic; }
.recon-note { margin-top: 18px; background: #f7efe2; border-left: 4px solid #c8943c; border-radius: 0 10px 10px 0; padding: 12px 16px; font-size: .9rem; color: #6b5733; }

/* tweaks: button spacing, base highlight in method */
.hero-cta { gap: 28px; row-gap: 14px; }
.base-ref { color: var(--green-deep); font-weight: 600; text-decoration: underline; text-decoration-color: var(--olive); text-underline-offset: 2px; background: #edf3ed; padding: 0 4px; border-radius: 4px; white-space: nowrap; }
.base-ref:hover { background: #ddeadd; text-decoration: none; }
.method-legend { font-size: .85rem; color: var(--muted); margin-top: 16px; font-style: italic; }

/* quantities + unit toggle */
.u-us { display: none; }
body[data-units="us"] .u-us { display: inline; }
body[data-units="us"] .u-m { display: none; }
.qty { font-weight: 600; color: var(--ink); }
.unit-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-left: 4px; }
.unit-switch button { border: none; background: var(--paper); color: var(--muted); font: inherit; font-size: .78rem; padding: 5px 11px; cursor: pointer; transition: background .12s; }
.unit-switch button.active { background: var(--green); color: #fff; }
.nav { align-items: center; }

/* Base / Add fresh sections in the ingredients card */
.ing-sub { font-family: var(--sans); text-transform: uppercase; letter-spacing: .07em; font-size: .74rem; color: var(--terracotta); font-weight: 600; margin: 18px 0 10px; }
.ingredients .ing-sub:first-child { margin-top: 0; }
.ing-hint { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.base-list { list-style: none; margin: 0 0 4px; padding: 0; }
.base-list li { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-weight: 600; }
.base-list li:last-child { border-bottom: none; }
.base-list a { color: var(--green-deep); }
.store-mini { margin-left: auto; font-size: .66rem; color: var(--muted); font-weight: 500; background: #eef1e9; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }

.freeze-note { background: #e9f2f7; color: #2b5566; }
