
:root {
  --page: #FBF6EF; --surface: #FFFFFF; --sand: #F3EADD; --ink: #2B211B; --ink-muted: #5C4E43; --ink-subtle: #6B5A4C;
  --line: #EADFD0; --line-input: #D9CBB9; --line-control: #8F7E6C; --line-ad: #CDBCA8;
  --accent: #A8472E; --accent-text: #8C3A25; --accent-hover: #963F28; --accent-pressed: #7F3522; --hover-tint: #F0E4D4;
  --strip-sage: #7E9A6E; --strip-butter: #D9B84A; --strip-slate: #5E7F92;
  --placeholder: #766657; --notice-bg: #FFF7EC; --disabled-bg: #E8DED1;
  --tag-dish-bg: #E6ECDF; --tag-dish-text: #34502E; --tag-method-bg: #F0E4D4; --tag-method-text: #6B3B28;
  --tag-cuisine-bg: #E3E9EC; --tag-cuisine-text: #2F4652; --tag-ingredient-bg: #F4ECCB; --tag-ingredient-text: #5E4B14;
  --tag-occasion-bg: #F3E1DC; --tag-occasion-text: #7A3A2E; --tag-meal-bg: #F3EADD; --tag-meal-text: #5C4E43;
  --display: Fraunces, Georgia, serif; --body: Figtree, system-ui, sans-serif;
  --pad: 16px; --max: 1200px; --gap-x: 14px; --gap-y: 24px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 16px/1.5 var(--body); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* header (round 9: design/warm-pantry/round9-notes.md). Height 69 px on desktop, 65 px on phones, including the 3 px strip.
   The phone's search box and menu are driven by two hidden checkboxes (#toggle-search, #toggle-menu) that precede the header row,
   so no script is needed; from 640 px they are not used. */
.site-header { position: relative; background: var(--page); }
.toggle { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.logo { display: flex; align-items: center; gap: 8px; margin-right: auto; text-decoration: none; }
.logo-mark { display: block; width: 32px; height: 32px; }
/* The SOFT axis (100) rounds Fraunces' corners; it needs the font loaded with that axis (Layout.tsx). "ific" is in the accent colour. */
.wordmark { font: 700 24px/1 var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -0.02em; color: var(--ink); }
.wordmark span { color: var(--accent); }
.round-btn, .search-go { display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; }
.round-btn { width: 44px; height: 44px; }
.round-btn:hover, .search-go:hover { background: var(--accent-hover); }
.burger { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.burger span, .burger span::before, .burger span::after { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--ink); }
.burger span { position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -7px; }
.burger span::after { top: 7px; }
.toggle:focus-visible ~ .header-row .search-open, .toggle:focus-visible ~ .header-row .burger { outline: 3px solid var(--accent); outline-offset: 2px; }
/* the search form: a sand pill with the round button inside its right edge */
.search { display: none; position: relative; flex: 1 1 auto; min-width: 0; }
.search input { width: 100%; min-height: 44px; padding: 0 52px 0 18px; border: 1.5px solid var(--line-control); border-radius: 999px; background: var(--sand); font: 400 16px var(--body); color: var(--ink); }
.search input::placeholder { color: var(--placeholder); }
.search-go { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; }
.site-nav { display: none; font: 500 15px var(--body); color: var(--ink-muted); }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2.5px; text-underline-offset: 8px; }
.strip { display: flex; height: 3px; }
.strip span { flex: 2; }
.strip span:nth-child(1) { flex: 4; background: var(--accent); }
.strip span:nth-child(2) { background: var(--strip-sage); }
.strip span:nth-child(3) { background: var(--strip-butter); }
.strip span:nth-child(4) { background: var(--strip-slate); }
/* phones: search open = mark only plus a full-width box; menu open = a panel under the header listing every link */
@media (max-width: 639.98px) {
  #toggle-search:checked ~ .header-row .search { display: block; }
  #toggle-search:checked ~ .header-row .wordmark, #toggle-search:checked ~ .header-row .search-open { display: none; }
  #toggle-search:checked ~ .header-row .logo { margin-right: 0; }
  #toggle-menu:checked ~ .header-row .site-nav { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; z-index: 30; padding: 8px var(--pad) 16px; background: var(--page); border-bottom: 1px solid var(--line); box-shadow: 0 8px 16px rgba(43, 33, 27, 0.08); }
  #toggle-menu:checked ~ .header-row .site-nav a { padding: 12px 0; font-size: 17px; }
}

/* headings and text */
.crumbs { margin: 18px 0 6px; font: 400 13px var(--body); color: var(--ink-subtle); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
h1 { margin: 6px 0 4px; font: 400 30px/1.1 var(--display); letter-spacing: -0.02em; }
.count { margin: 0 0 14px; color: var(--ink-subtle); font: 400 15px var(--body); }
.count strong { color: var(--ink); font-weight: 600; }

/* pills, chips, buttons */
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.pill, .chip, .btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; font: 600 15px var(--body); text-decoration: none; white-space: nowrap; }
.pill { border: 1px solid var(--line-control); background: var(--surface); color: var(--ink); }
.pill:hover { background: var(--hover-tint); }
.pill[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.includes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font: 400 14px var(--body); color: var(--ink-subtle); }
.includes .pill { min-height: 36px; padding: 0 12px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 8px; }
.chip { min-height: 36px; padding: 0 6px 0 14px; background: var(--tag-meal-bg); color: var(--tag-meal-text); font-size: 14px; }
.chip a { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; text-decoration: none; }
.chip a:hover { background: rgba(0, 0, 0, 0.08); }
.chip.cuisine { background: var(--tag-cuisine-bg); color: var(--tag-cuisine-text); }
.chip.dish { background: var(--tag-dish-bg); color: var(--tag-dish-text); }
.chip.method { background: var(--tag-method-bg); color: var(--tag-method-text); }
.chip.ingredient { background: var(--tag-ingredient-bg); color: var(--tag-ingredient-text); }
.chip.occasion { background: var(--tag-occasion-bg); color: var(--tag-occasion-text); }
.chip.excluded { background: transparent; border: 1px dashed var(--line-control); color: var(--tag-ingredient-text); }
.clear-all { color: var(--accent-text); font: 600 14px var(--body); margin-left: 4px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.btn { border-radius: 12px; border: 1px solid var(--line-control); background: var(--surface); color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

/* sort control: a <details> popover, no script */
.sort { position: relative; }
.sort summary { list-style: none; cursor: pointer; }
.sort summary::-webkit-details-marker { display: none; }
.sort-list { position: absolute; right: 0; z-index: 5; margin-top: 6px; min-width: 190px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.sort-list a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; font: 500 15px var(--body); }
.sort-list a:hover { background: var(--hover-tint); }
.sort-list a[aria-current="true"] { font-weight: 700; }

/* card grid: 2 columns on a phone, 3 then 4 wider; 36 recipes fill every row at every width */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-y) var(--gap-x); margin: 10px 0 24px; padding: 0; list-style: none; }
.card { display: flex; flex-direction: column; min-width: 0; }
.card-photo { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: #EBD9C6; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; left: 8px; bottom: 8px; padding: 2px 10px; border-radius: 999px; background: var(--surface); font: 600 13px var(--body); }
.card-src { margin: 8px 0 2px; font: 400 13px var(--body); letter-spacing: 0.02em; color: var(--ink-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title { margin: 0; font: 600 17px/1.25 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.tags { display: flex; gap: 6px; margin-top: 8px; height: 24px; overflow: hidden; }
.tag { padding: 0 10px; border-radius: 999px; font: 600 12.5px/24px var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tag:first-child { flex: none; max-width: 100%; }
.tag.dish { background: var(--tag-dish-bg); color: var(--tag-dish-text); }
.tag.cuisine { background: var(--tag-cuisine-bg); color: var(--tag-cuisine-text); }
.tag.method { background: var(--tag-method-bg); color: var(--tag-method-text); }
.tag.meal { background: var(--tag-meal-bg); color: var(--tag-meal-text); }

/* messages and removal rows (zero results) */
.notice { margin: 8px 0 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--notice-bg); }
.notice h2 { margin: 0 0 4px; font: 600 20px/1.25 var(--display); }
.notice p { margin: 0; color: var(--ink-muted); }
.removals { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; max-width: 520px; }
.removals a { display: flex; justify-content: space-between; gap: 12px; min-height: 48px; align-items: center; padding: 0 16px; border: 1px solid var(--line-control); border-radius: 12px; background: var(--surface); text-decoration: none; font-weight: 500; }
.removals a:hover { background: var(--hover-tint); }
.removals span { color: var(--ink-subtle); font-weight: 400; }
.links { display: flex; gap: 16px; margin: 0 0 24px; }
.links a { color: var(--accent-text); }
/* a button inside .links keeps its own white text: the ".links a" rule above is more specific than .btn-primary and would turn it terracotta on terracotta */
.links a.btn-primary { color: #fff; }

/* text pages (FAQ, Privacy): a readable column, FAQ questions as <details> */
.prose { max-width: 720px; padding-bottom: 24px; }
.prose h2 { margin: 28px 0 8px; font: 600 22px/1.25 var(--display); }
.prose .faq-group { margin-top: 32px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.prose p, .prose li { margin: 0 0 12px; color: var(--ink-muted); }
.prose ul { margin: 0 0 12px; padding-left: 22px; }
.prose a { color: var(--accent-text); }
.prose code { padding: 1px 6px; border-radius: 6px; background: var(--sand); font-size: 0.92em; }
.prose .code { margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--sand); font: 500 15px/1.5 ui-monospace, Consolas, monospace; overflow-x: auto; }
.faq-q { border-bottom: 1px solid var(--line); }
.faq-q summary { display: block; padding: 14px 28px 14px 0; position: relative; cursor: pointer; list-style: none; font: 600 17px/1.3 var(--body); }
.faq-q summary::-webkit-details-marker { display: none; }
.faq-q summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 22px; color: var(--accent-text); }
.faq-q[open] summary::after { content: "−"; }
.faq-q summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.faq-a { padding: 0 0 6px; }

/* the A-Z site directory */
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 20px; }
.letters a, .letters span { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line-control); background: var(--surface); text-decoration: none; font: 600 15px var(--body); }
.letters a:hover { background: var(--hover-tint); }
.letters a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.letters .off { color: var(--ink-subtle); border-color: var(--line); background: transparent; }
.letter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.letter-grid a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-decoration: none; }
.letter-grid a:hover { background: var(--hover-tint); }
.letter-big { font: 600 28px/1.1 var(--display); }
.letter-n { color: var(--ink-subtle); font: 400 14px var(--body); }
.site-list { columns: 1; column-gap: 28px; margin: 0 0 24px; padding: 0; list-style: none; }
.site-list li { display: flex; flex-direction: column; break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--line); }
.site-list a { color: var(--accent-text); font-weight: 500; overflow-wrap: anywhere; }
.site-list span { color: var(--ink-subtle); font: 400 13px var(--body); }
@media (min-width: 640px) { .site-list { columns: 2; } }
@media (min-width: 1024px) { .site-list { columns: 3; } }

/* the add / remove a site form and its messages */
.include-form { display: grid; gap: 8px; max-width: 520px; margin: 16px 0 28px; }
.include-form label { font: 600 15px var(--body); }
.include-form input[type="text"] { min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line-control); border-radius: 12px; background: var(--surface); font: 400 16px var(--body); color: var(--ink); }
.include-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.include-buttons .btn { cursor: pointer; }
.include-buttons .btn:disabled, .include-form-inline .btn:disabled { opacity: 0.6; cursor: progress; }
.include-status { min-height: 1.5em; margin: 0; color: var(--ink-subtle); font: 400 14px var(--body); }
.include-form-inline { margin: 4px 0 12px; }
.include-form-inline .btn { cursor: pointer; }
.include-challenge { margin: 4px 0; }
.include-msg { margin: 8px 0 20px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--notice-bg); }
.include-msg h2 { margin: 0 0 6px; font: 600 20px/1.25 var(--display); }
.include-msg p { margin: 0 0 10px; }
.include-msg.good { background: var(--tag-dish-bg); border-color: #C9D8C0; }
.include-msg.bad { background: var(--tag-occasion-bg); border-color: #E6C7BF; }

/* pager */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 24px 0 40px; flex-wrap: wrap; }
.pager a, .pager span { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-control); background: var(--surface); text-decoration: none; font: 600 15px var(--body); }
.pager a:hover { background: var(--hover-tint); }
.pager .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .gap { border-color: transparent; background: transparent; }
.pager .off { color: var(--ink-subtle); border-color: var(--line); }
.pager .run { display: none; }
.pager .here { border: 0; background: transparent; min-width: 0; }

/* footer */
.site-footer { margin-top: 40px; padding: 28px 0 36px; background: var(--sand); border-top: 1px solid var(--line); color: var(--ink-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer strong { display: block; font: 600 20px var(--display); color: var(--ink); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; font: 500 15px var(--body); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---- recipe page (docs/recipe-page.md) ---- */
[hidden] { display: none !important; }
.tag.occasion { background: var(--tag-occasion-bg); color: var(--tag-occasion-text); }
.recipe-top { display: grid; gap: 16px; margin: 8px 0 20px; }
.rphoto-wrap { margin: 0; }
/* the frame keeps the photo's own shape, is as tall as the photo up to a cap, and never taller than the photo itself (--h), so a
   small photo is never enlarged; the average colour shows around a photo that does not fill it */
.rphoto { --cap: 460px; position: relative; width: 100%; aspect-ratio: var(--ar); max-height: min(var(--cap), var(--h)); border-radius: 20px; overflow: hidden; }
.rphoto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.rphoto-wrap figcaption { margin-top: 8px; font: 400 13px var(--body); color: var(--ink-subtle); }
.photo-missing { position: absolute; inset: 0; display: grid; place-items: center; font: 600 14px var(--body); color: var(--ink-muted); }
.recipe-head h1 { margin: 4px 0 8px; }
.source { margin: 0 0 8px; font: 400 15px var(--body); color: var(--ink-muted); }
.blog-link { color: var(--accent-text); font-weight: 600; text-underline-offset: 3px; }
.rating { margin: 0 0 4px; font: 400 14px var(--body); color: var(--ink-muted); }
.stars { color: var(--accent); letter-spacing: 1px; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 0; margin: 12px 0; padding: 12px 0; border-block: 1px solid var(--line); }
.facts div { padding-right: 20px; margin-right: 20px; border-right: 1px solid var(--line); }
.facts div:last-child { padding-right: 0; margin-right: 0; border-right: 0; }
.facts dt { font: 600 11px var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-subtle); }
.facts dd { margin: 0; font: 600 17px var(--body); }
.ptags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.ptags .tag { display: inline-block; padding: 0 14px; font-size: 14px; line-height: 34px; text-decoration: none; }
.ptags .tag:hover { text-decoration: underline; }
.description { margin: 12px 0 0; color: var(--ink-muted); font-size: 17px; }

/* ad slots: reserved space, labelled; drawn only with AD_PLACEHOLDERS (no ad network yet) */
.ad { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; max-width: 336px; min-height: 100px; margin: 24px auto; border: 1px dashed var(--line-ad); border-radius: 12px; background: var(--sand); color: var(--ink-subtle); font: 400 12px var(--body); }
.ad-label { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.ad-c { min-height: 250px; margin-top: 40px; }
.ad-b-cell { display: none; }
/* an ad cell in a listing grid: as wide as a card, with a 4:3 box like a card's photo (reserved size, so nothing shifts) */
.ad-card-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; aspect-ratio: 4 / 3; border: 1px dashed var(--line-ad); border-radius: 20px; background: var(--sand); color: var(--ink-subtle); font: 400 12px var(--body); }

.recipe-body { display: block; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 8px; }
.section-head h2, .instructions h2, .related h2 { margin: 0; font: 600 26px/1.2 var(--display); }
.copy { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.tip { font: 500 13px var(--body); color: var(--ink-muted); }
.igroup { margin: 20px 0 2px; font: 600 17px var(--display); }
.ilist { margin: 0; padding: 0; list-style: none; }
.ilist li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); }
.ilist li::before { content: ""; position: absolute; left: 4px; top: 1.1em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.instructions { margin-top: 36px; }
.instructions h2 { margin-bottom: 12px; }
.method-card { max-width: 728px; margin-inline: auto; text-align: center; padding: 20px 22px; border: 1px solid var(--line-control); border-radius: 20px; background: var(--surface); }
.method-card p { margin: 0 0 14px; }
.more-from { margin: 14px 0 0; text-align: center; font: 500 15px var(--body); }
.more-from a { color: var(--accent-text); text-underline-offset: 3px; }
.method-card .note { margin: 10px 0 0; font-size: 13px; color: var(--ink-subtle); }
.btn-method { width: 100%; max-width: 420px; margin-inline: auto; justify-content: center; min-height: 52px; padding: 8px 20px; font-size: 17px; white-space: normal; text-align: center; }
.related { margin-top: 24px; }
.related h2 { margin-bottom: 4px; }
.related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.housekeeping { display: flex; flex-wrap: wrap; gap: 20px; margin: 28px 0 8px; font: 400 14px var(--body); }
.housekeeping a { color: var(--ink-subtle); text-underline-offset: 3px; }
/* enhancement: a phone-only bar, shown by script while the ingredients are on screen */
.method-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--page); border-top: 1px solid var(--line); }
.method-bar .btn { width: 100%; justify-content: center; }

@media (min-width: 640px) {
  .header-row { gap: 24px; min-height: 66px; }
  .logo { margin-right: 0; gap: 8px; }
  .logo-mark { width: 36px; height: 36px; }
  .wordmark { font-size: 28px; }
  .search { display: block; flex: 0 1 520px; }
  .search-open, .burger { display: none; }
  .site-nav { display: flex; gap: 28px; margin-left: auto; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
  .pager .run { display: inline-grid; }
  .pager .here { display: none; }
}
@media (min-width: 1024px) {
  :root { --pad: 32px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  h1 { font-size: 44px; }
  .card-title { font-size: 19px; }
}
/* recipe page, wider screens (after the listing's media rules so the related row wins) */
@media (min-width: 640px) {
  .ad-a, .ad-c { max-width: 728px; min-height: 90px; }
  .btn-method { width: auto; }
}
@media (min-width: 900px) {
  .recipe-top { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
  .rphoto { --cap: 640px; }
  .related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .method-bar { display: none; }
}
@media (min-width: 1100px) {
  .recipe-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 40px; align-items: start; }
  .ingredients { grid-column: 1; }
  /* Instructions spans both columns so its box is centred on the same line as the banner ad below (the ad is centred on the page) */
  .instructions { grid-column: 1 / -1; }
  /* the sticky ad sits beside the ingredients only and ends before Instructions (it is in row 1, Instructions in row 2) */
  .ad-b-cell { display: block; grid-column: 2; grid-row: 1; align-self: stretch; padding-top: 28px; }
  .ad-b { position: sticky; top: 16px; width: 300px; min-height: 250px; margin: 0; }
}

/* ---- home page (src/web/views/Home.tsx; design/shuffle-20261112-0325-48883) ---- */
/* the header's search box is hidden on the home page: the hero has its own */
.site-header.home .search, .site-header.home .search-open { display: none !important; }
.hero { background: linear-gradient(180deg, #FFF3E6 0%, var(--page) 100%); padding: 28px 0 36px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.eyebrow-pill { display: inline-block; margin: 0 0 14px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--accent-text); font: 700 12px var(--body); letter-spacing: 0.08em; text-transform: uppercase; }
.hero h1 { margin: 0 0 14px; font-size: 40px; line-height: 1.05; }
.hero-lede { margin: 0 0 20px; max-width: 560px; color: var(--ink-muted); font-size: 17px; }
.hero-search { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.hero-search input { flex: 1 1 240px; min-width: 0; min-height: 52px; padding: 0 18px; border: 1.5px solid var(--line-control); border-radius: 14px; background: var(--surface); font: 400 16px var(--body); color: var(--ink); }
.hero-search input::placeholder { color: var(--placeholder); }
.hero-search .btn { min-height: 52px; padding: 0 24px; border-radius: 14px; font-size: 16px; cursor: pointer; }
.popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; color: var(--ink-subtle); font: 400 14px var(--body); }
/* filled, bordered and bold so they read as buttons (a plain outline looked like decoration); they darken on hover */
.popular .pill { min-height: 38px; padding: 0 16px; border: 1.5px solid var(--accent); background: var(--sand); color: var(--accent-text); font-size: 14px; font-weight: 600; }
.popular .pill:hover { background: var(--accent); color: #fff; }
.hero-stats { display: flex; gap: 0; margin: 26px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); max-width: 360px; }
.hero-stats div { flex: 1; padding-right: 20px; margin-right: 20px; border-right: 1px solid var(--line); }
.hero-stats div:last-child { margin-right: 0; padding-right: 0; border-right: 0; }
.hero-stats dt { font: 600 11px var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-subtle); }
.hero-stats dd { margin: 0; font: 600 26px var(--display); }
.hero-feature { position: relative; }
.hero-photo { position: relative; display: block; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 28px; box-shadow: 0 24px 50px rgba(43, 33, 27, 0.18); background: #EBD9C6; text-decoration: none; color: #fff; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* a dark fade under the caption keeps the white text readable on any photo */
.hero-caption { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 4px; padding: 64px 20px 18px; background: linear-gradient(180deg, rgba(20, 14, 10, 0) 0%, rgba(20, 14, 10, 0.78) 100%); }
.hero-kicker { font: 700 12px var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: #F4D77A; }
.hero-title { font: 600 24px/1.2 var(--display); }
.hero-meta { font: 500 14px var(--body); opacity: 0.92; }
.hero-note { display: flex; flex-direction: column; margin: -26px 12px 0 auto; position: relative; width: max-content; max-width: 90%; padding: 10px 16px; border-radius: 14px; background: var(--surface); box-shadow: 0 10px 24px rgba(43, 33, 27, 0.16); font: 400 13px var(--body); color: var(--ink-muted); }
.hero-note strong { color: var(--ink); font-weight: 600; font-size: 15px; }
.home-section { margin-top: 48px; }
.home-section h2 { margin: 0 0 6px; font: 600 32px/1.15 var(--display); letter-spacing: -0.02em; }
.eyebrow { margin: 0 0 6px; color: var(--accent-text); font: 700 12px var(--body); letter-spacing: 0.1em; text-transform: uppercase; }
.section-lede { margin: 0 0 18px; max-width: 560px; color: var(--ink-subtle); }
.home-section .links { margin-top: 8px; flex-wrap: wrap; }
.home-section .links a.btn { color: var(--ink); }
.home-section .links a.btn-primary { color: #fff; }
/* "How Fooderific works": a dark panel beside a terracotta one holding a real sample recipe */
.how { display: grid; overflow: hidden; border-radius: 28px; background: var(--ink); color: #F6EDE2; }
.how-copy { padding: 32px 24px; }
.how h2 { color: #fff; }
.how h2 em { color: #F4D77A; font-style: italic; }
.eyebrow-light { color: #F4D77A; }
.how-lede { margin: 0 0 20px; color: #E3D6C8; }
.steps { margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.step-n { flex: none; color: #F4D77A; font: 600 22px var(--display); }
.steps strong { display: block; color: #fff; font-weight: 600; }
.steps p { margin: 2px 0 0; color: #D8C9BA; font-size: 15px; }
.how-sample { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 24px; background: var(--accent); }
.sample-card { padding: 14px; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22); }
.sample-photo { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 14px; background: #EBD9C6; }
.sample-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sample-card h3 { margin: 12px 0 4px; font: 600 20px/1.25 var(--display); }
.sample-card h3 a { text-decoration: none; }
.sample-card h3 a:hover { text-decoration: underline; }
.sample-facts { margin: 0 0 12px; color: var(--ink-subtle); font: 400 13px var(--body); }
.sample-label { margin: 0 0 6px; padding-top: 10px; border-top: 1px solid var(--line); font: 700 11px var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-subtle); }
.sample-method { display: block; padding: 12px 14px; border: 1px solid var(--line-control); border-radius: 12px; background: #FFF7EC; color: var(--accent-text); font: 600 14px var(--body); }
.how-foot { margin: 0; color: #FBE9DD; font-size: 14px; }
.how-foot a { color: #fff; }
.directory { display: grid; gap: 20px; }
.az { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.az a, .az .off { display: grid; place-items: center; min-height: 44px; border: 1px solid var(--line-control); border-radius: 12px; background: var(--surface); text-decoration: none; font: 600 16px var(--display); }
.az a:hover { background: var(--hover-tint); }
.az .off { color: var(--ink-subtle); border-color: var(--line); background: transparent; }
@media (min-width: 640px) {
  .az { grid-template-columns: repeat(9, minmax(0, 1fr)); }
  .hero h1 { font-size: 48px; }
}
@media (min-width: 900px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
  .hero h1 { font-size: 56px; }
  .how { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .how-copy { padding: 44px 40px; }
  .how-sample { padding: 36px; }
  .directory { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: 48px; }
}

/* ---- cookie consent (src/web/analyticsScript.ts builds this banner; it exists only when analytics is configured) ---- */
/* a labelled bar fixed to the bottom of the viewport: it covers no layout (fixed) and takes no focus. Accept and Decline share one
   style, so neither is more prominent than the other */
.consent { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50; max-width: 720px; margin: 0 auto; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; background: var(--surface); border: 1px solid var(--line-control); border-radius: 16px; box-shadow: 0 6px 24px rgba(43, 33, 27, 0.18); color: var(--ink); font: 400 15px/1.45 var(--body); }
.consent p { flex: 1 1 260px; margin: 0; }
.consent-actions { display: flex; gap: 10px; }
.consent-btn { min-height: 44px; min-width: 96px; padding: 0 18px; border: 2px solid var(--accent); border-radius: 999px; background: var(--surface); color: var(--accent-text); font: 600 15px var(--body); cursor: pointer; }
.consent-btn:hover { background: var(--hover-tint); }
/* the footer's "Cookie settings" button looks like the footer links beside it */
.consent-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.consent-link:hover { text-decoration: underline; }
