:root {
  color-scheme: light;
  --ink: #302420;
  --muted: #725d50;
  --paper: #f8f2e8;
  --white: #fffdfa;
  --plum: #522431;
  --deep-plum: #3f1b27;
  --gold: #f7c66c;
  --line: #e7d9c7;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #28755f; outline-offset: 4px; }
.shell { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.masthead { background: #fffaf2; border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 700 24px/1.05 var(--serif); color: var(--plum); }
.brand img { border-radius: 13px; }
.brand small { display: block; margin-top: 6px; font: 700 9px/1 var(--sans); letter-spacing: .16em; color: #7e5a4e; }
.masthead nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 650; }
.masthead nav a { text-decoration: none; padding: 12px 0; }
.masthead nav a:hover, .back-link:hover { text-decoration: underline; }
.masthead nav .book-link { padding: 11px 16px; color: var(--plum); border: 1px solid #dcc8b8; border-radius: 8px; }
.hero { margin-top: 36px; display: grid; grid-template-columns: 1.12fr 1fr; overflow: hidden; border-radius: 20px; background: var(--plum); box-shadow: 0 14px 35px #56332619; }
.hero-copy { padding: clamp(32px,5.5vw,75px); color: #fff6eb; background: radial-gradient(ellipse at 12% 100%, #722e3f 0%, transparent 70%), var(--deep-plum); }
.eyebrow { margin: 0 0 13px; color: #8d4931; font-size: 11px; line-height: 1.5; font-weight: 800; letter-spacing: .17em; }
.hero .eyebrow { color: var(--gold); display: flex; align-items: center; gap: 10px; }
.hero .eyebrow span { width: 23px; height: 1px; background: var(--gold); }
h1, h2, h3 { font-family: var(--serif); }
.hero h1 { font-size: clamp(43px,6vw,83px); letter-spacing: -.05em; font-weight: 400; line-height: .99; margin: 0; }
.hero h1 em { color: var(--gold); }
.hero-copy > p:not(.eyebrow) { max-width: 420px; font-size: clamp(15px,1.7vw,19px); line-height: 1.6; color: #f6e2d5; margin: 22px 0 27px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; border: 1px solid transparent; border-radius: 8px; font-weight: 750; font-size: 14px; text-decoration: none; }
.button.gold { color: #382318; background: var(--gold); }
.button.outline { color: var(--plum); background: transparent; border-color: #d4bbae; }
.hero .button.outline { color: #fff6eb; border-color: #b18489; }
.button.dark { color: #fff9ee; background: var(--plum); }
.button:hover { filter: brightness(.93); }
.hero-photo { position: relative; min-height: 100%; isolation: isolate; background: #955127; text-decoration: none; }
.hero-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { position: absolute; inset: 30% 0 0; content: ''; background: linear-gradient(transparent,#261308d9); pointer-events: none; }
.hero-caption { position: absolute; z-index: 1; bottom: 0; inset-inline: 0; display: flex; justify-content: space-between; align-items: end; gap: 10px; padding: clamp(18px,3vw,36px); color: #fff9ee; }
.hero-caption small { display: block; margin-bottom: 5px; color: #ffe1a4; font-weight: 800; font-size: 10px; letter-spacing: .13em; }
.hero-caption strong { font: 500 clamp(21px,3vw,33px)/1.15 var(--serif); }
.hero-caption > span { display: grid; place-items: center; flex: 0 0 41px; height: 41px; background: #fff4e8; color: var(--plum); border-radius: 50%; }
.collection { margin-top: clamp(44px,6vw,78px); scroll-margin-top: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.section-head h2, .heritage h2 { font-size: clamp(34px,4vw,56px); letter-spacing: -.042em; line-height: 1.07; font-weight: 500; margin: 0; }
.search { display: flex; align-items: center; gap: 10px; min-height: 50px; width: min(100%,370px); padding: 0 14px; border: 1px solid #d6c4af; border-radius: 8px; background: var(--white); }
.search svg { flex: 0 0 20px; width: 20px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; }
.search input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 11px 0; font-size: 16px; color: var(--ink); }
.search:focus-within { outline: 2px solid #28755f; outline-offset: 2px; }
.search input:focus { outline: none; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.filters button { min-height: 44px; padding: 8px 14px; border-radius: 100px; border: 1px solid #dbcab5; background: #fff9ee; color: #65493e; font-weight: 700; font-size: 13px; }
.filters button[aria-pressed=true] { background: var(--plum); color: white; border-color: var(--plum); }
.filters button:hover:not([aria-pressed=true]) { background: #f0e4d2; }
.collection-status { margin: 20px 0 13px; color: var(--muted); font-size: 14px; }
.recipe-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.recipe-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 13px; text-decoration: none; box-shadow: 0 4px 14px #593c2e0a; transition: transform .18s, box-shadow .18s; }
.recipe-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px #593c2e1c; }
.card-photo { width: 100%; aspect-ratio: 1.66; object-fit: cover; background: #eddbc4; }
.card-no-photo { display: grid; place-items: center; background: radial-gradient(ellipse at 50% 25%,#faead0,#ecd2b6); }
.card-no-photo img { width: 77px; border-radius: 22px; }
.card-content { flex: 1; padding: 19px 20px 20px; }
.badge { display: inline-block; border-radius: 30px; padding: 5px 9px; background: #f2decc; color: #82482e; font-weight: 800; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
[data-category='Vegetables'] .badge, [data-category='Side dishes'] .badge { background: #e4ecd9; color: #415e35; }
[data-category='Desserts'] .badge { background: #f2dce5; color: #80394e; }
[data-category='Breakfast'] .badge { background: #f7e5b9; color: #785310; }
[data-category='Pasta'] .badge { background: #edd9ce; color: #8a3f28; }
[data-category='Lunch'] .badge, [data-category='Pantry'] .badge { background: #e1ebe5; color: #395e4e; }
.card-content h3 { font-size: clamp(20px,2.25vw,28px); font-weight: 500; line-height: 1.13; letter-spacing: -.023em; margin: 11px 0 8px; }
.card-credit { color: var(--muted); font-size: 13px; margin: 0; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin: 0 20px; padding: 12px 0; border-top: 1px solid #f0e6db; color: var(--plum); font-size: 13px; font-weight: 750; }
.heritage { display: flex; gap: clamp(22px,6vw,64px); align-items: center; margin-block: 60px; padding: clamp(24px,5vw,54px); border-radius: 16px; background: #efe1cf; border: 1px solid #e1cfb9; }
.heritage > img { width: clamp(85px,16vw,160px); height: auto; border: 2px solid #4a2f25; border-radius: 5px; box-shadow: 6px 8px 0 #b68d66; }
.heritage p:not(.eyebrow) { color: #614a3d; line-height: 1.6; margin: 12px 0 20px; }
.site-footer { padding: 27px 0; background: #41262b; color: #f9e9d9; }
.site-footer > div { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.site-footer span { font: 20px var(--serif); }
.site-footer a { font-size: 13px; }
.cook { padding: 27px 0 110px; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; margin-bottom: 12px; text-decoration: none; color: var(--plum); font-weight: 700; font-size: 14px; }
.cook-heading { display: grid; grid-template-columns: 1.3fr 1fr; border-radius: 16px; overflow: hidden; background: var(--plum); color: #fff6e8; }
.cook-heading.no-photo { grid-template-columns: 1fr; }
.cook-intro { padding: clamp(24px,5vw,57px); }
.cook-heading .eyebrow { color: var(--gold); }
.cook-heading h1 { font-size: clamp(37px,5vw,66px); line-height: 1.02; font-weight: 400; letter-spacing: -.047em; margin: 0; }
#cookAuthor { font-size: 16px; color: #f5dfd2; margin: 15px 0; }
.source-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: #ffe0a1; text-underline-offset: 4px; }
#cookPhoto { width: 100%; height: 100%; max-height: 420px; object-fit: cover; }
.cook-layout { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.25fr); gap: 24px; align-items: start; margin-top: 24px; }
.cook-panel { padding: clamp(20px,3vw,32px); background: var(--white); border: 1px solid var(--line); border-radius: 13px; }
.cook-panel.ingredients { background: #fff8e6; border-color: #ead9b9; }
.cook-panel h2 { margin: 0 0 16px; font-size: 30px; font-weight: 500; letter-spacing: -.03em; }
.cook-panel h3 { font: 750 15px var(--sans); color: var(--plum); margin: 20px 0 10px; }
.cook-panel p, .cook-panel li, .ingredient-line { font-size: clamp(16px,1.65vw,19px); line-height: 1.62; }
.ingredient-line { display: flex; align-items: start; min-height: 44px; gap: 11px; padding: 9px 0; border-bottom: 1px solid #eadfc9; cursor: pointer; }
.ingredient-line input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: #3f6b54; margin: 5px 0 0; }
.ingredient-line:has(input:checked) span { text-decoration: line-through; color: #735c4a; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid #eee2d3; }
.step-number { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #f2dfd7; color: var(--plum); font-size: 13px; font-weight: 800; }
.cook-dock { position: fixed; z-index: 3; bottom: max(12px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 5px; padding: 6px; background: var(--plum); color: white; border-radius: 40px; box-shadow: 0 8px 28px #3f1b2752; }
.cook-dock > * { white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; padding: 7px 17px; border: 0; border-radius: 28px; background: transparent; color: inherit; font-size: 14px; font-weight: 750; text-decoration: none; }
.cook-dock > *:hover { background: #783e4c; }
#shareDialog { width: min(520px, calc(100% - 26px)); padding: 23px; background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 20px 60px #32151d42; }
#shareDialog::backdrop { background: #331b25a0; }
.share-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; }
.share-heading h2 { margin: 0; font-size: 27px; }
.share-heading button { border: 0; border-radius: 50%; background: #f4e6d7; color: var(--plum); width: 44px; height: 44px; font-size: 26px; }
#recipeLink { width: 100%; padding: 10px; margin: 7px 0 12px; background: #faf2e8; border: 1px solid #d3bea8; border-radius: 6px; font-size: 16px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.muted { font-size: 13px; color: var(--muted); }
@media(max-width: 950px) {
  .shell { width: calc(100% - 36px); }
  .recipe-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
  .hero-copy { padding: 34px 28px; }
}
@media(max-width: 650px) {
  .shell { width: calc(100% - 28px); }
  .masthead-inner { min-height: 67px; }
  .brand { font-size: 20px; gap: 8px; }
  .brand img { width: 37px; height: 37px; border-radius: 9px; }
  .brand small { font-size: 8px; }
  .masthead nav { gap: 0; }
  .masthead nav a:first-child { display: none; }
  .masthead nav .book-link { padding: 10px; font-size: 12px; }
  .hero { grid-template-columns: 1fr; margin-top: 15px; border-radius: 14px; }
  .hero-copy { padding: 28px 22px; }
  .hero-photo { min-height: 230px; }
  .hero-copy > p:not(.eyebrow) { margin: 15px 0 19px; }
  .section-head { display: block; }
  .search { margin-top: 15px; width: 100%; }
  .filters { margin-top: 14px; gap: 6px; }
  .filters button { padding-inline: 11px; }
  .card-content { padding: 12px; }
  .card-footer { margin-inline: 12px; }
  .card-content h3 { font-size: 20px; }
  .card-credit { font-size: 12px; }
  .card-no-photo img { width: 48px; border-radius: 12px; }
  .heritage { margin-block: 36px; padding: 20px; }
  .heritage h2 { font-size: 28px; }
  .cook-heading { grid-template-columns: 1fr; }
  #cookPhoto { max-height: 275px; aspect-ratio: 1.8; }
  .cook-layout { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
}
@media(prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  :root { background: white; color: black; }
  .masthead,.site-footer,.back-link,.cook-dock,dialog { display: none !important; }
  .cook { padding: 0; width: 100%; }
  .cook-heading { color: black; background: white; display: block; }
  .cook-intro { padding: 0 0 12px; }
  .cook-heading .eyebrow,#cookAuthor,.source-link { color: black; }
  #cookPhoto { width: auto; max-height: 35mm; }
  .cook-layout { display: block; }
  .cook-panel,.cook-panel.ingredients { padding: 12px 0; background: white; border: 0; }
  .ingredient-line,.steps li { min-height: 0; padding: 3px 0; break-inside: avoid; }
}
