:root {
  --bg: #f6f7f2;
  --card: #ffffff;
  --fg: #23291f;
  --muted: #6b7363;
  --accent: #4f7a3a;
  --accent-soft: #e5eedd;
  --line: #e2e5da;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.6;
}
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }
.wrap.narrow { max-width: 760px; }

/* header */
header.site { padding: 22px 0; border-bottom: 1px solid var(--line); background: rgba(246,247,242,.9); position: sticky; top: 0; backdrop-filter: blur(6px); z-index: 5; }
header.site .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand.small { font-size: 15px; }
nav a { color: var(--muted); text-decoration: none; margin-left: 24px; font-size: 15px; }
nav a:hover { color: var(--accent); }

/* hero */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; padding: 48px 0 30px; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 12px; font-weight: 600; }
.hero h1 { font-family: var(--serif); font-size: 44px; line-height: 1.1; margin: 0 0 14px; font-weight: 600; letter-spacing: -.01em; }
.hero .sub { color: var(--muted); margin: 0 0 20px; font-size: 17px; max-width: 520px; }
.newest { display: inline-block; background: var(--fg); color: var(--bg); text-decoration: none; padding: 10px 18px; border-radius: 30px; font-size: 14px; font-weight: 600; }
.newest:hover { background: var(--accent); }
.shelf { width: 100%; max-width: 340px; justify-self: end; }

/* tools */
.tools { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 10px 0 22px; }
#q { flex: 1 1 280px; max-width: 380px; padding: 11px 16px; font-size: 15px; border: 1px solid var(--line); border-radius: 30px; background: var(--card); color: var(--fg); outline: none; }
#q:focus { border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--muted); padding: 7px 14px; border-radius: 30px; font-size: 14px; cursor: pointer; font-family: inherit; }
.chip:hover { color: var(--fg); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--fg); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(35,41,31,.08); }
.card[hidden] { display: none; }
.thumb { height: 120px; display: flex; align-items: center; justify-content: center; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.tag { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.card h3 { margin: 4px 0 6px; font-size: 18px; line-height: 1.3; }
.card p { margin: 0 0 14px; color: var(--muted); font-size: 14px; flex: 1; }
.meta { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.meta span::before { content: "◷ "; }
.meta span + span::before { content: "♨ "; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* recipe page */
.crumbs { font-size: 14px; color: var(--muted); padding: 24px 0 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 6px; }
.recipe-head { background: var(--tint); border-radius: 18px; padding: 34px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.recipe-head h1 { font-family: var(--serif); font-size: 40px; line-height: 1.12; margin: 0 0 10px; font-weight: 600; }
.recipe-head .lead { margin: 0 0 22px; max-width: 600px; color: #3d4437; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.facts div { background: rgba(255,255,255,.7); border-radius: 10px; padding: 8px 14px; min-width: 88px; }
.facts small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts b { font-size: 15px; }
.print { font-family: inherit; font-size: 14px; border: 1px solid var(--ink); color: var(--ink); background: transparent; padding: 8px 16px; border-radius: 30px; cursor: pointer; }
.print:hover { background: var(--ink); color: #fff; }
.rh-art { padding-right: 10px; }

.recipe-body { display: grid; grid-template-columns: 320px 1fr; gap: 28px; margin-top: 28px; align-items: start; }
.ingredients { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 16px; position: sticky; top: 92px; }
.ingredients h2, .method h2 { font-size: 20px; margin: 0 0 14px; }
.ingredients ul { list-style: none; padding: 0; margin: 0; }
.ingredients li { border-bottom: 1px dashed var(--line); }
.ingredients li:last-child { border-bottom: 0; }
.ingredients label { display: flex; gap: 10px; padding: 8px 0; cursor: pointer; font-size: 15px; }
.ingredients input { accent-color: var(--accent); margin-top: 5px; }
.ingredients input:checked + span { text-decoration: line-through; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.method { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px 28px; }
.method ol { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.method li { counter-increment: s; position: relative; padding: 0 0 18px 48px; }
.method li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.tip { background: var(--accent-soft); border-radius: 10px; padding: 14px 18px; margin-top: 6px; font-size: 15px; }
.added { font-size: 13px; color: var(--muted); margin: 18px 0 0; }

.related { margin-top: 44px; }
.related h2 { font-size: 20px; margin: 0 0 14px; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mini { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; color: var(--fg); }
.mini:hover { border-color: var(--accent); }
.mini-ic { width: 54px; height: 54px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mini b { display: block; font-size: 15px; line-height: 1.3; }
.mini small { color: var(--muted); font-size: 13px; }

/* generic page */
.page { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 36px; margin-top: 30px; }
.page.center { text-align: center; }
.page h1 { font-family: var(--serif); font-weight: 600; font-size: 36px; margin: 0 0 14px; }
.page h2 { font-size: 20px; margin: 28px 0 10px; }

/* footer */
footer.site { border-top: 1px solid var(--line); margin-top: 64px; padding: 36px 0 30px; color: var(--muted); font-size: 14px; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.foot p { margin: 8px 0 0; max-width: 320px; }
.foot h4 { margin: 0 0 8px; color: var(--fg); font-size: 14px; }
.foot a { display: block; color: var(--muted); text-decoration: none; margin-bottom: 4px; }
.foot a:hover { color: var(--accent); }
.legal { margin-top: 26px; font-size: 12px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; }
  .shelf { display: none; }
  .hero h1 { font-size: 34px; }
  .recipe-head { grid-template-columns: 1fr; padding: 24px; }
  .recipe-head h1 { font-size: 32px; }
  .rh-art { display: none; }
  .recipe-body { grid-template-columns: 1fr; }
  .ingredients { position: static; }
  .method { padding: 22px; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > div:first-child { grid-column: 1 / -1; }
  nav a { margin-left: 16px; }
}

@media print {
  header.site, footer.site, .crumbs, .related, .print, .hint, .rh-art { display: none !important; }
  body { background: #fff; }
  .recipe-head { background: none !important; padding: 0; }
  .recipe-body { grid-template-columns: 1fr; }
  .ingredients, .method { border: 0; padding: 0; position: static; }
  .facts div { background: none; padding: 0 12px 0 0; }
}
.allergens { font-size: 13px; margin: 14px 0 0; padding: 10px 12px; background: #fbecd3; border-radius: 8px; color: #5c4317; }
.note { background: #fde2d8; border-radius: 10px; padding: 12px 18px; margin-top: 10px; font-size: 15px; color: #6b2e17; }
.legal a { color: var(--muted); }
