/* =========================================================
   Cook with Deanna — brand + layout
   ========================================================= */
:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-2: #F2EDE4;
  --ink: #1E2420;
  --ink-2: #3A423C;
  --muted: #687068;
  --line: #E7E1D6;
  --brand: #2F4A3A;
  --brand-ink: #FAF7F2;
  --brand-soft: #E5ECE4;
  --accent: #B9502C;
  --accent-ink: #FFFFFF;
  --accent-soft: #F6E5DB;
  --warn: #8A5300;
  --warn-soft: #FCEFD6;
  --radius: 16px;
  --radius-sm: 10px;
  --font-head: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 1px 2px rgba(30, 36, 32, .05), 0 8px 24px -12px rgba(30, 36, 32, .18);
  --gutter: 16px;
  --max: 1200px;
  color-scheme: light;
}
@media (min-width: 760px) { :root { --gutter: 28px; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111512; --surface: #191E1A; --surface-2: #212822; --ink: #EEF0EA; --ink-2: #D2D7CF; --muted: #A2AA9F;
    --line: #2B332C; --brand: #A7C7AE; --brand-ink: #111512; --brand-soft: #1E2A21; --accent: #E58460; --accent-ink: #1A110D;
    --accent-soft: #3A241B; --warn: #F3C574; --warn-soft: #33290F; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111512; --surface: #191E1A; --surface-2: #212822; --ink: #EEF0EA; --ink-2: #D2D7CF; --muted: #A2AA9F;
  --line: #2B332C; --brand: #A7C7AE; --brand-ink: #111512; --brand-soft: #1E2A21; --accent: #E58460; --accent-ink: #1A110D;
  --accent-soft: #3A241B; --warn: #F3C574; --warn-soft: #33290F; color-scheme: dark;
}

/* Kids view: rounder, bigger, brighter — same brand family. */
[data-view="kids"] {
  --bg: #FFF8E8; --surface-2: #FFEFCF; --line: #F1E2BC; --ink: #23264A; --ink-2: #33366A; --muted: #5E6190;
  --brand: #2C6E62; --brand-soft: #DDF1EC; --accent: #E2552F; --accent-soft: #FFE3D7;
  --radius: 24px; --radius-sm: 16px;
  --font-head: 'Fredoka', system-ui, sans-serif; --font-body: 'Fredoka', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root[data-view="kids"]:not([data-theme="light"]) {
    --bg: #1B1C33; --surface: #25274A; --surface-2: #2E3159; --ink: #FFF6E0; --ink-2: #F1E6CF; --muted: #C6C4E8;
    --line: #3A3D6B; --brand: #7FDCC6; --brand-ink: #1B1C33; --brand-soft: #1F3A3E; --accent: #FF8A68; --accent-soft: #43293A;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font-body); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
[data-view="kids"] body { font-size: 18px; line-height: 1.55; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -.015em; text-wrap: balance; }
[data-view="kids"] h1, [data-view="kids"] h2, [data-view="kids"] h3 { font-weight: 600; letter-spacing: 0; line-height: 1.15; }
h1 em, h2 em { font-style: italic; color: var(--brand); }
[data-view="kids"] h1 em, [data-view="kids"] h2 em { font-style: normal; color: var(--accent); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.ic { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex-shrink: 0; }
svg.lucide { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.eyebrow { font: 600 12px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
[data-view="kids"] .eyebrow { letter-spacing: .04em; font-size: 14px; }
[data-view="kids"] .a, [data-view="adult"] .k { display: none !important; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; min-height: 46px; line-height: 1.2;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 38px; padding: 8px 15px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
[data-view="kids"] .btn { font-size: 18px; min-height: 52px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; min-height: 40px; color: var(--ink-2);
  transition: border-color .15s, background-color .15s;
}
.chip:hover { border-color: var(--ink-2); }
.chip .ic, .chip svg { color: var(--brand); }
.chip[aria-current="page"], .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip[aria-current="page"] svg, .chip[aria-pressed="true"] svg { color: var(--bg); }
[data-view="kids"] .chip { font-size: 16px; font-weight: 600; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; line-height: 1;
  padding: 5px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand);
}
.badge svg { width: 13px; height: 13px; }
.badge.kid { background: var(--accent-soft); color: var(--accent); }

/* ---------- Header ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px var(--gutter); padding-top: max(10px, env(safe-area-inset-top)); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-word { font: 500 22px/1 var(--font-head); letter-spacing: -.01em; white-space: nowrap; }
.brand-word em { font-style: italic; color: var(--brand); }
[data-view="kids"] .brand-word { font-family: 'Newsreader', Georgia, serif; }
.mainnav { display: none; gap: 4px; margin-left: 12px; }
.mainnav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; color: var(--ink-2); font-size: 15px; }
.mainnav a:hover { background: var(--surface-2); }
.mainnav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
@media (min-width: 900px) { .mainnav { display: flex; } }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; text-decoration: none; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); }
.view-toggle { display: flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.view-toggle button { border: 0; background: transparent; border-radius: 999px; padding: 6px 13px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted); min-height: 34px; }
[data-view="adult"] .view-toggle [data-set-view="adult"],
[data-view="kids"] .view-toggle [data-set-view="kids"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.catnav { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--gutter) 10px; max-width: var(--max); margin: 0 auto; scrollbar-width: none; }
.catnav::-webkit-scrollbar { display: none; }
.catnav .divider { width: 1px; background: var(--line); flex-shrink: 0; margin: 6px 2px; }
@media (min-width: 900px) { .catnav .tool, .catnav .divider.first { display: none; } }

@media (max-width: 420px) {
  .brand-mark { width: 30px; height: 30px; }
  .brand-word { font-size: 19px; }
  .topbar-in { gap: 8px; }
  .view-toggle button { padding: 6px 10px; font-size: 13px; }
}

main { display: block; outline: none; padding-bottom: 56px; }

/* ---------- Home ---------- */
.hero { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 8px; display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 1fr; padding-top: 56px; gap: 56px; } }
.hero h1 { font-size: clamp(42px, 10vw, 76px); margin: 12px 0 0; }
.hero .lede { color: var(--muted); font-size: 18px; max-width: 44ch; margin-top: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-art { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; aspect-ratio: 5 / 4; }
.hero-art > div { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.hero-art > div:first-child { grid-row: span 2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-note {
  position: absolute; left: -10px; bottom: 18px; background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow);
  display: flex; gap: 10px; align-items: center; font-size: 14px; max-width: 250px;
}
.hero-note b { display: block; font-family: var(--font-head); font-size: 22px; font-weight: 500; line-height: 1; }
@media (max-width: 899px) { .hero-note { left: 10px; } }

.search { position: relative; max-width: 520px; margin-top: 24px; }
.search input {
  width: 100%; padding: 15px 18px 15px 48px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 16px; box-shadow: var(--shadow);
}
.search input:focus { outline: none; border-color: var(--brand); }
.search .ic, .search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.section { max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(30px, 6vw, 42px); }
.section-head p { color: var(--muted); margin-top: 6px; max-width: 52ch; }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); text-decoration: none; white-space: nowrap; font-size: 15px; }
.see-all:hover { text-decoration: underline; text-underline-offset: 3px; }

.meal-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .meal-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1100px) { .meal-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.meal-tile { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: #fff; background: var(--surface-2); }
.meal-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.meal-tile:hover img { transform: scale(1.04); }
.meal-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(10,14,11,.78)); }
.meal-tile span { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; }
.meal-tile b { display: block; font: 500 24px/1.1 var(--font-head); }
[data-view="kids"] .meal-tile b { font-weight: 600; }
.meal-tile small { font-size: 13px; opacity: .85; }

.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 74%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 8px; scroll-padding-left: var(--gutter); scrollbar-width: none;
}
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }
@media (min-width: 600px) { .row { grid-auto-columns: 42%; } }
@media (min-width: 1000px) { .row { grid-auto-columns: calc((100% - 3 * 18px) / 4); gap: 18px; margin: 0; padding: 2px 0 8px; } }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Recipe card ---------- */
.card { display: flex; flex-direction: column; text-decoration: none; min-width: 0; }
.card-img { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-img .flag { position: absolute; left: 10px; top: 10px; }
.card-body { padding: 12px 2px 4px; display: flex; flex-direction: column; gap: 6px; }
.card .eyebrow { font-size: 11px; }
.card h3 { font-size: 21px; line-height: 1.15; }
.card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
[data-view="kids"] .card h3 { font-size: 20px; }
.meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.need { font-size: 13.5px; color: var(--accent); font-weight: 600; display: flex; gap: 6px; align-items: flex-start; }
.need.ok { color: var(--brand); }
@media (max-width: 520px) { .card h3 { font-size: 18px; } .card .badges { display: none; } }

.noimg { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-soft), var(--surface-2)); color: var(--brand); }
.noimg svg, .noimg .ic { width: 38%; height: 38%; stroke-width: 1.2; opacity: .55; }

/* Feature band */
.band { background: var(--brand); color: var(--brand-ink); border-radius: calc(var(--radius) + 8px); padding: 36px 24px; display: grid; gap: 28px; }
@media (min-width: 900px) { .band { grid-template-columns: 1fr 1.2fr; padding: 56px; align-items: center; } }
.band h2 { font-size: clamp(32px, 6vw, 48px); }
.band h2 em { color: inherit; opacity: .8; }
.band p { opacity: .85; margin-top: 12px; max-width: 46ch; }
.band .feats { display: grid; gap: 12px; }
@media (min-width: 600px) { .band .feats { grid-template-columns: 1fr 1fr; } }
.feat { display: flex; flex-direction: column; gap: 10px; background: color-mix(in srgb, var(--brand-ink) 10%, transparent); border-radius: var(--radius); padding: 20px; text-decoration: none; color: inherit; border: 1px solid color-mix(in srgb, var(--brand-ink) 16%, transparent); transition: background-color .15s; }
.feat:hover { background: color-mix(in srgb, var(--brand-ink) 16%, transparent); }
.feat .ic, .feat svg { width: 28px; height: 28px; }
.feat b { font: 500 22px/1.1 var(--font-head); }
.feat span { font-size: 14.5px; opacity: .85; }
.feat .go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; opacity: 1; margin-top: auto; }

.diet-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .diet-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.diet-tile { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, transform .15s; }
.diet-tile:hover { border-color: var(--brand); transform: translateY(-2px); }
.diet-tile .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.diet-tile b { font: 500 22px/1.1 var(--font-head); display: block; }
[data-view="kids"] .diet-tile b { font-weight: 600; }
.diet-tile span { color: var(--muted); font-size: 14px; }

.about { display: grid; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px); overflow: hidden; }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1.1fr; } }
.about .about-img { aspect-ratio: 4 / 3; height: 100%; background: var(--surface-2); }
.about .about-img img { width: 100%; height: 100%; object-fit: cover; }
.about .about-txt { padding: 8px 24px 32px; }
@media (min-width: 900px) { .about .about-txt { padding: 40px 48px 40px 8px; } }
.about h2 { font-size: clamp(30px, 5vw, 40px); margin: 10px 0 12px; }
.about p { color: var(--ink-2); max-width: 52ch; }
.about .btn { margin-top: 20px; }

/* ---------- List pages ---------- */
.page-head { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 18px; }
.page-head h1 { font-size: clamp(38px, 8vw, 60px); margin-top: 10px; }
.page-head p { color: var(--muted); margin-top: 10px; max-width: 60ch; font-size: 17px; }
.page-head a { color: var(--brand); }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 18px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.body { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.count { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.empty { padding: 48px 0; color: var(--muted); text-align: center; }

/* ---------- Recipe page ---------- */
.recipe { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 0; }
.r-top { display: grid; gap: 24px; margin-top: 14px; }
@media (min-width: 900px) { .r-top { grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; } }
.r-head h1 { font-size: clamp(38px, 8vw, 62px); margin-top: 10px; }
.r-head .desc { color: var(--ink-2); font-size: 18px; margin-top: 14px; max-width: 48ch; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; padding: 0; margin: 22px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts li { padding: 14px 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.facts li + li { padding-left: 16px; border-left: 1px solid var(--line); }
.facts b { color: var(--ink); font-size: 16px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.facts b svg { color: var(--brand); }
.r-head .badges { margin-top: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.r-hero { margin: 0 calc(-1 * var(--gutter)); }
@media (min-width: 600px) { .r-hero { margin: 0; } }
.r-hero .frame { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
@media (min-width: 600px) { .r-hero .frame { border-radius: calc(var(--radius) + 4px); } }
.r-hero img { width: 100%; height: 100%; object-fit: cover; }
.r-hero figcaption { font-size: 12.5px; color: var(--muted); padding: 8px var(--gutter) 0; }
@media (min-width: 600px) { .r-hero figcaption { padding: 8px 0 0; } }
.r-hero figcaption a { color: inherit; }
.kid-hello { display: none; margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); font-weight: 500; gap: 10px; align-items: flex-start; }
.kid-hello svg { color: var(--accent); margin-top: 3px; }
[data-view="kids"] .kid-hello { display: flex; }

.r-body { display: grid; gap: 36px; margin-top: 48px; }
@media (min-width: 900px) { .r-body { grid-template-columns: 360px 1fr; gap: 56px; align-items: start; } .ingredients { position: sticky; top: 96px; } }
.r-body h2 { font-size: 32px; margin-bottom: 16px; }
.ingredients { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.ingredients h2 { font-size: 28px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; cursor: pointer; }
.checklist input { appearance: none; width: 20px; height: 20px; margin: 2px 0 0; border: 1.5px solid var(--muted); border-radius: 6px; flex-shrink: 0; display: grid; place-items: center; cursor: pointer; background: var(--surface); }
.checklist input:checked { background: var(--brand); border-color: var(--brand); }
.checklist input:checked::after { content: ''; width: 10px; height: 6px; border: 2px solid var(--brand-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.checklist input:checked + span { text-decoration: line-through; color: var(--muted); }
[data-view="kids"] .checklist input { width: 26px; height: 26px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps .n { font: 400 34px/1 var(--font-head); color: var(--brand); }
.steps p { font-size: 17px; color: var(--ink-2); }
.safety { display: none; }
[data-view="kids"] .steps li { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 10px; grid-template-columns: 52px 1fr; }
[data-view="kids"] .steps .n { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 600 20px/1 var(--font-body); }
[data-view="kids"] .steps p { font-size: 19px; }
[data-view="kids"] .safety { display: grid; gap: 6px; list-style: none; margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--warn-soft); color: var(--ink); }
[data-view="kids"] .safety li { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; line-height: 1.4; font-weight: 500; }
[data-view="kids"] .safety svg { color: var(--warn); width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.cook-step .safety { margin-top: 18px; }
[data-view="kids"] .cook-step .safety li { font-size: 17px; }
.tip { margin-top: 24px; padding: 18px 20px; border-radius: var(--radius); background: var(--brand-soft); display: flex; gap: 14px; align-items: flex-start; }
.tip svg { color: var(--brand); width: 22px; height: 22px; margin-top: 2px; }
.tip b { display: block; font: 500 19px/1.2 var(--font-head); margin-bottom: 2px; }

/* ---------- My Kitchen + Meal plan ---------- */
.kit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h2 { font-size: 26px; margin-bottom: 14px; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.food[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip.food[aria-pressed="true"] svg { color: var(--brand-ink); }
.fgroup { border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup summary { display: flex; align-items: center; gap: 10px; padding: 16px 2px; cursor: pointer; list-style: none; min-height: 52px; font-weight: 600; }
.fgroup summary::-webkit-details-marker { display: none; }
.fgroup summary .n { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 14px; }
.fgroup summary .chev { transition: transform .2s; color: var(--muted); }
.fgroup[open] summary .chev { transform: rotate(180deg); }
.fgroup .chips-wrap { padding: 0 0 18px; }
.kit-layout { display: grid; gap: 28px; }
@media (min-width: 1000px) { .kit-layout { grid-template-columns: 380px 1fr; align-items: start; } .kit-side { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; } }

.plan-opts { display: flex; flex-direction: column; gap: 4px; }
.plan { display: grid; gap: 16px; }
@media (min-width: 760px) { .plan { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .plan { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pday { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 8px; }
.pday h2 { font-size: 24px; margin-bottom: 4px; }
.pslot { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; }
.pslot:first-of-type { border-top: 0; }
.pthumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }
.pslot .slot { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.pslot b { display: block; line-height: 1.25; font-weight: 600; }
.pslot:hover b { text-decoration: underline; text-underline-offset: 3px; }
.pmeta { font-size: 13px; color: var(--muted); }
.shop-layout { display: grid; gap: 24px; margin-top: 48px; }
@media (min-width: 900px) { .shop-layout { grid-template-columns: 1fr 1fr; } }
.shop-group { font: 600 12px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 20px 0 4px; }
.shop small { font-size: 13px; }

/* ---------- Cook mode ---------- */
.cook { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) var(--gutter) max(16px, env(safe-area-inset-bottom)); }
.cook-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 820px; margin: 0 auto; width: 100%; }
.cook-top h2 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { height: 4px; background: var(--surface-2); border-radius: 99px; margin: 16px auto; overflow: hidden; max-width: 820px; width: 100%; }
.progress i { display: block; height: 100%; background: var(--brand); transform-origin: left; transition: transform .25s ease; }
.cook-step { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 820px; margin: 0 auto; width: 100%; overflow-y: auto; }
.cook-step .count { font: 600 13px/1 var(--font-body); color: var(--brand); text-transform: uppercase; letter-spacing: .12em; }
.cook-step p { font: 400 clamp(26px, 6vw, 44px)/1.25 var(--font-head); margin-top: 14px; }
[data-view="kids"] .cook-step p { font-weight: 500; }
.cook-step .done { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); margin: 0 auto; }
.cook-step .done svg { width: 34px; height: 34px; }
.cook-nav { display: flex; gap: 10px; max-width: 820px; margin: 0 auto; width: 100%; }
.cook-nav .btn { flex: 1; min-height: 56px; font-size: 17px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 24px; background: var(--surface); }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 44px var(--gutter) 24px; display: grid; gap: 32px; }
@media (min-width: 900px) { .foot-in { grid-template-columns: 1.2fr 2fr; } }
.foot-brand p { color: var(--muted); margin-top: 12px; max-width: 36ch; font-size: 15px; }
.foot-brand a { color: inherit; }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (min-width: 700px) { .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.foot-cols h3 { font: 600 12px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.foot-cols a { display: block; text-decoration: none; padding: 4px 0; font-size: 15px; color: var(--ink-2); }
.foot-cols a:hover { color: var(--ink); text-decoration: underline; }
.foot-small { max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter) 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: grid; gap: 4px; }
.foot-small a { color: inherit; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Print ---------- */
@media print {
  .topbar, .catnav, .foot, .actions, .more, .crumbs, .kid-hello, .safety, .plan-opts, .kit-actions, [data-copy] { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .r-top { grid-template-columns: 1fr 1fr !important; }
  .r-hero .frame { max-height: 220px; aspect-ratio: auto; }
  .r-body { grid-template-columns: 1fr 1.6fr !important; margin-top: 20px; }
  .ingredients { position: static; border: 0; padding: 0; }
  .checklist input { display: none; }
  .pday { break-inside: avoid; }
}

/* ---------- Ads ---------- */
.ad-slot { max-width: var(--max); margin: 24px auto; padding: 0 var(--gutter); display: flex; justify-content: center; }
.recipe .ad-slot, .body .ad-slot, .grid .ad-slot, .steps .ad-slot, .r-body .ad-slot { padding: 0; }
.grid > .ad-slot.ad-span { grid-column: 1 / -1; margin: 6px 0; }
.r-body > .ad-slot { margin: 0; }
@media (min-width: 900px) { .r-body > .ad-slot[data-pos="sidebar"] { grid-column: 1; grid-row: 2; position: sticky; top: 96px; align-self: start; } .r-body .ingredients { position: static; } }
.steps > li.ad-li { display: block; padding: 8px 0; }
.ad { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 100%; }
.ad-label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ad-box { max-width: 100%; overflow: hidden; display: flex; justify-content: center; min-height: var(--ad-h, auto); }
.ad-box img { max-width: 100%; height: auto; border-radius: 8px; }
.ad-box ins.adsbygoogle { max-width: 100%; }
.ad-spot { width: 100%; min-height: 90px; display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: 12px; color: var(--accent); background: var(--accent-soft); font: 600 13px/1.3 var(--font-body); text-align: center; padding: 10px; }
.ad-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.08); padding: 6px 44px 6px 12px; padding-bottom: max(6px, env(safe-area-inset-bottom)); display: flex; justify-content: center; }
.ad-sticky .ad-spot { min-height: 50px; }
.ad-close { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; line-height: 1; color: var(--muted); }
body:has(.ad-sticky) .foot { padding-bottom: 110px; }
.prose p { margin: 0 0 14px; max-width: 70ch; }
.prose a { color: var(--brand); word-break: break-all; }
@media print { .ad-slot, .ad-sticky { display: none !important; } }

/* Let grid columns shrink to the screen; without this a sideways-scrolling filter bar
   widens its whole column and pushes the page off the right edge. */
.kit-layout > *, .r-top > *, .r-body > *, .shop-layout > *, .hero > * { min-width: 0; }
