/* Cookbook stores (Weeknight Table / Protein Prep Club). Brand tokens come from build.py (:root --bg --ink --pri --acc --hi --head).
   Rules borrowed from Packed & Co. (ai-dropshipping/store/site/DESIGN.md): flat, hairlines not shadows, pills for actions,
   mobile is the designed state, glass only on things that float. The product (cover + page photos) brings the colour. */
:root {
  --paper: #fff; --muted: color-mix(in srgb, var(--ink) 62%, #fff); --line: color-mix(in srgb, var(--ink) 14%, #fff);
  --soft: color-mix(in srgb, var(--bg) 70%, #fff);
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px); --max: 1180px; --r: 12px; --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--sans); overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); font-weight: var(--head-w); line-height: 1.04; letter-spacing: -0.015em; margin: 0 0 .45em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
:focus-visible { outline: 2.5px solid var(--pri); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 12px; top: 12px; z-index: 60; background: #fff; padding: 8px 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.eyebrow { font: 700 .76rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--pri); margin: 0 0 12px; }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.2rem); color: color-mix(in srgb, var(--ink) 82%, #fff); }
.muted { color: var(--muted); } .fine { font-size: .84rem; color: var(--muted); } .center { text-align: center; }

/* announce + header */
.announce { background: var(--pri); color: #fff; font-size: .8rem; text-align: center; padding: 8px var(--gutter); font-weight: 500; }
.announce span + span::before { content: "·"; margin: 0 .6em; opacity: .7; }
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, #fff 82%, transparent); backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6); border-bottom: 1px solid var(--line); }
@supports not (backdrop-filter: blur(1px)) { .top { background: #fff; } }
.top-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { font-family: var(--head); font-weight: var(--head-w); font-size: 1.3rem; text-decoration: none; color: var(--pri); white-space: nowrap; letter-spacing: -0.01em; }
.top nav { display: flex; gap: clamp(14px, 3vw, 26px); font-size: .93rem; font-weight: 500; }
.top nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.top nav a:hover { border-bottom-color: var(--pri); }
@media (max-width: 899px) { .gallery .slides li { flex-basis: 64%; } }
@media (max-width: 560px) { .nav-long { display: none !important; } }
@media (max-width: 430px) { .brand { font-size: 1.05rem; } .top nav { gap: 12px; font-size: .86rem; } .top-in { gap: 10px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 700 1rem/1 var(--sans); text-decoration: none; background: var(--pri); color: #fff; border: 2px solid var(--pri); cursor: pointer;
  transition: transform .15s var(--ease), filter .2s var(--ease); }
.btn:hover { filter: brightness(1.08); } .btn:active { transform: scale(.985); }
.btn.ghost { background: transparent; color: var(--pri); }
.btn.light { background: var(--hi); border-color: var(--hi); color: var(--ink); }
.btn.wide { width: 100%; }
.btn.is-off { background: var(--line); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 14px; }
.link-arrow { font-weight: 700; color: var(--pri); text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 1px; white-space: nowrap; }

/* hero */
.hero { background: var(--bg); padding: clamp(36px, 7vw, 84px) 0; overflow: hidden; }
.hero-in { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero-in { grid-template-columns: 1.05fr .95fr; } .fan-wrap .fan { width: 46%; } }
.hero h1 { color: var(--pri); }
.fan-wrap { position: relative; height: clamp(300px, 52vw, 470px); }
.fan-wrap .fan { position: absolute; width: 38%; max-width: 270px; border-radius: 8px; box-shadow: 0 22px 40px -18px rgba(0,0,0,.45); top: 50%; left: 50%; }
.fan-wrap .fan:nth-child(1) { transform: translate(-118%, -50%) rotate(-8deg); }
.fan-wrap .fan:nth-child(2) { transform: translate(-50%, -54%); z-index: 2; }
.fan-wrap .fan:nth-child(3) { transform: translate(18%, -50%) rotate(8deg); }
.fan-wrap.small { height: clamp(260px, 40vw, 380px); }
.fan-wrap.small .fan { width: 36%; }

/* facts */
.facts { border-bottom: 1px solid var(--line); }
.facts ul { list-style: none; margin: 0; padding: 18px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; font-size: .95rem; }
@media (min-width: 760px) { .facts ul { grid-template-columns: repeat(4, 1fr); text-align: center; } }
.facts b { color: var(--pri); }

/* sections */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section.soft { background: var(--soft); }
.band-pri { background: var(--pri); color: #fff; }
.band-pri .eyebrow { color: var(--hi); } .band-pri h2 { color: #fff; } .band-pri .lede { color: rgba(255,255,255,.88); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; margin-bottom: 26px; }
.section-head h2 { margin: 0; }
.split { display: grid; gap: 36px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
.price-big { font-family: var(--head); font-weight: var(--head-w); font-size: 2.4rem; margin: 8px 0 18px; }
.price-big small { display: block; font: 500 .95rem var(--sans); opacity: .85; margin-top: 4px; }

/* cards */
.cards { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(3, 1fr); } .cards.two { grid-template-columns: repeat(2, 1fr); max-width: 780px; } }
.card { display: flex; flex-direction: column; text-decoration: none; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; transition: transform .25s var(--ease); }
.card:hover { transform: translateY(-3px); }
.card-img { background: var(--bg); padding: 22px 22px 0; display: grid; place-items: end center; }
.card-img img { width: 72%; border-radius: 6px 6px 0 0; box-shadow: 0 14px 30px -16px rgba(0,0,0,.4); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { color: var(--pri); }
.card-body p { color: var(--muted); font-size: .95rem; }
.card-price { margin-top: auto; font-weight: 700; font-size: 1.1rem; }
.card-price small { font-weight: 500; color: var(--muted); font-size: .85rem; }

/* look inside strip */
.strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.strip img { flex: 0 0 auto; width: min(62vw, 250px); scroll-snap-align: start; border-radius: 6px; border: 1px solid var(--line); }

/* recipe lists */
.three { display: grid; gap: 28px; } @media (min-width: 900px) { .three { grid-template-columns: repeat(3, 1fr); } }
.three h3 { color: var(--pri); font-size: 1.15rem; }
.rlist { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rlist li { counter-increment: r; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.rlist li span::before { content: counter(r, decimal-leading-zero) "  "; color: var(--pri); font-weight: 700; }
.rlist em { font-style: normal; color: var(--muted); font-size: .85rem; }

/* sampler */
.sampler-cover { width: min(78%, 360px); margin: 0 auto; border-radius: 8px; box-shadow: 0 24px 46px -20px rgba(0,0,0,.45); transform: rotate(-3deg); }
.signup label { font-weight: 700; display: block; margin: 8px 0 6px; }
.signup-row { display: flex; flex-wrap: wrap; gap: 10px; }
.signup input { flex: 1 1 220px; min-height: 52px; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 20px; font: 500 1rem var(--sans); background: #fff; }
.signup input:focus { border-color: var(--pri); outline: none; }
.signup-err { color: #b3261e; font-weight: 600; }
.signup-done h3 { font-size: 1.6rem; color: var(--pri); }
.upsell { margin-top: 22px; padding: 20px; border-radius: var(--r); background: var(--bg); color: var(--ink); }
.upsell h3 { color: var(--pri); }

/* product page */
/* mobile: title, price and Buy first (Leffler: "keep add-to-cart visible in the mobile scroll"), then pages, then details */
.pdp { display: grid; gap: 22px; padding-top: 18px; padding-bottom: 40px; grid-template-areas: "head" "gallery" "more"; }
.pdp-head { grid-area: head; } .gallery { grid-area: gallery; } .pdp-more { grid-area: more; }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.1fr .9fr; grid-template-areas: "gallery head" "gallery more"; column-gap: 56px; row-gap: 0; padding-top: 40px; align-items: start; } .gallery { position: sticky; top: 90px; } }
.pdp-head h1 { color: var(--pri); font-size: clamp(1.9rem, 4.6vw, 2.9rem); margin-bottom: .25em; }
.pay-line { font-size: .82rem; color: var(--muted); text-align: center; margin: 8px 0 2px; }
.try-free { text-align: center; margin: 4px 0 0; font-size: .92rem; } .try-free a { color: var(--pri); font-weight: 700; text-decoration: none; }
.came-from { background: var(--hi); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-size: .92rem; font-weight: 500; margin-bottom: 12px; }
.rlist li.hit { background: color-mix(in srgb, var(--hi) 35%, #fff); border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.pop-cover { width: 110px; margin: 0 auto 10px; border-radius: 6px; box-shadow: 0 12px 24px -12px rgba(0,0,0,.45); transform: rotate(-3deg); }
.pop .signup-row { flex-direction: column; } .pop .signup input { flex-basis: auto; }
.gallery { background: var(--bg); border-radius: var(--r); padding: 18px; }
.slides { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides li { flex: 0 0 82%; scroll-snap-align: center; }
@media (min-width: 900px) { .slides li { flex-basis: 70%; } }
.slides img { border-radius: 6px; box-shadow: 0 16px 34px -18px rgba(0,0,0,.4); }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; } .crumbs a { text-decoration: none; }
.buybox h1 { color: var(--pri); font-size: clamp(2rem, 4.6vw, 2.9rem); }
.price-row { display: flex; align-items: baseline; gap: 12px; }
.price { font-family: var(--head); font-weight: var(--head-w); font-size: 2.1rem; }
.trust { list-style: none; padding: 0; margin: 16px 0 18px; display: grid; gap: 8px; font-size: .9rem; }
.trust li { display: flex; align-items: center; gap: 10px; }
.trust svg { width: 20px; height: 20px; color: var(--pri); flex: none; }
.band-pri .trust svg { color: var(--hi); }
.acc { border-top: 1px solid var(--line); } .acc:last-of-type { border-bottom: 1px solid var(--line); }
.acc summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 700; display: flex; justify-content: space-between; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; color: var(--pri); font-size: 1.3rem; line-height: 1; }
.acc[open] summary::after { content: "–"; }
.acc-body { padding: 0 0 16px; }
.sticky-buy { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; border-radius: 999px; background: color-mix(in srgb, #fff 70%, transparent); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--line); box-shadow: 0 10px 30px -12px rgba(0,0,0,.3); transform: translateY(140%); transition: transform .35s var(--ease); }
@supports not (backdrop-filter: blur(1px)) { .sticky-buy { background: #fff; } }
.sticky-buy.on { transform: none; }
.sticky-buy div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sticky-buy strong { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-buy span { font-size: .8rem; color: var(--muted); }
.sticky-buy .btn { min-height: 44px; padding: 0 20px; flex: none; }
@media (min-width: 900px) { .sticky-buy { display: none; } }

/* offer dialog */
.offer { border: 0; border-radius: 20px; padding: 26px 22px 22px; width: min(440px, calc(100vw - 24px)); text-align: center; color: var(--ink); }
.offer::backdrop { background: rgba(10,10,10,.55); backdrop-filter: blur(3px); }
.offer h2 { color: var(--pri); font-size: 1.9rem; }
.offer .btn { margin-top: 10px; }
.offer-covers { position: relative; height: 150px; margin-bottom: 12px; }
.offer-covers .fan { position: absolute; width: 96px; border-radius: 5px; top: 50%; left: 50%; box-shadow: 0 12px 24px -12px rgba(0,0,0,.45); }
.offer-covers .fan:nth-child(1) { transform: translate(-120%, -50%) rotate(-8deg); }
.offer-covers .fan:nth-child(2) { transform: translate(-50%, -54%); z-index: 2; }
.offer-covers .fan:nth-child(3) { transform: translate(20%, -50%) rotate(8deg); }
.offer-x { position: absolute; right: 10px; top: 8px; } .offer-x button { border: 0; background: none; font-size: 1.8rem; cursor: pointer; color: var(--muted); }

/* download page */
.thanks { padding-top: 56px; padding-bottom: 72px; max-width: 640px; }
.thanks h1 { color: var(--pri); }
.downloads { list-style: none; padding: 0; display: grid; gap: 10px; margin: 20px 0; }

/* prose + footer */
.prose h1 { color: var(--pri); } .prose p { max-width: 68ch; }
.has-sticky .foot { padding-bottom: 110px; }
.foot { background: var(--ink); color: color-mix(in srgb, #fff 82%, var(--ink)); padding: 56px 0 26px; font-size: .92rem; }
.foot .brand { color: #fff; }
.foot-in { display: grid; gap: 28px; } @media (min-width: 760px) { .foot-in { grid-template-columns: 2fr 1fr 1fr; } }
.foot h2 { font: 700 .76rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 12px; }
.foot nav { display: grid; gap: 8px; } .foot nav a { text-decoration: none; overflow-wrap: anywhere; } .foot nav a:hover { text-decoration: underline; }
.foot-base { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); font-size: .8rem; opacity: .8; }

/* reveal */
.js .rv { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .rv { opacity: 1; transform: none; transition: none; } .card, .btn, .sticky-buy { transition: none; } }

/* inline single-vs-bundle choice (buy box) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.choose { border: 0; padding: 0; margin: 14px 0 12px; display: grid; gap: 10px; }
.opt { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; padding: 14px 16px 14px 46px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.opt input { position: absolute; left: 16px; top: 17px; width: 20px; height: 20px; margin: 0; accent-color: var(--pri); }
.opt:has(input:checked) { border-color: var(--pri); background: color-mix(in srgb, var(--bg) 55%, #fff); box-shadow: 0 0 0 1px var(--pri) inset; }
.opt-t { font-weight: 700; } .opt-p { font-family: var(--head); font-weight: var(--head-w); font-size: 1.3rem; }
.opt-s { grid-column: 1 / -1; font-size: .86rem; color: var(--muted); } .opt-s s { opacity: .8; }
.opt .pill { position: absolute; top: -10px; right: 14px; font-style: normal; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--hi); color: var(--ink); padding: 3px 10px; border-radius: 999px; }
.was { font: 500 1.2rem var(--sans); opacity: .7; margin-left: 4px; }
/* gallery counter + zoom */
.zoom { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; }
.gal-count { text-align: center; font-size: .82rem; color: var(--muted); margin: 10px 0 0; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100dvh; }
.lightbox::backdrop { background: rgba(10,10,10,.85); }
.lightbox img { width: 100%; height: 100%; object-fit: contain; touch-action: pinch-zoom; }
.lightbox form { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 12px; }
.lightbox button { background: #fff; border: 0; border-radius: 999px; width: 44px; height: 44px; font-size: 1.6rem; cursor: pointer; }
/* dish thumbs in recipe lists */
.rlist li { align-items: center; }
.rlist .dish { width: 40px; height: 50px; object-fit: cover; border-radius: 6px; flex: none; order: -1; margin-right: 2px; }
.rlist li span { flex: 1; min-width: 0; }

/* grid items must be allowed to shrink (fieldset + scroll-snap gallery otherwise force min-content width) */
.pdp > * { min-width: 0; }
.choose { min-width: 0; }
