:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --tint: #f5f8f4;
  --ink: #1d2621;
  --muted: #56645b;
  --basil: #2c5a40;
  --basil-soft: #e3ece4;
  --saffron: #f0a93b;
  --line: #d9e1d8;
  --pin: #bd081c;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--basil); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, 46rem); margin-inline: auto; }
.wrap-wide { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

/* Header & footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--serif); font-size: 1.55rem; color: var(--ink); text-decoration: none; line-height: 1; }
.logo-mark { width: 2.4rem; height: 2.4rem; flex: none; }
.logo span { padding-top: .15em; }
.footer-brand { display: flex; align-items: center; gap: .5rem; }
.footer-brand .logo-mark { width: 1.6rem; height: 1.6rem; }
.site-header nav { display: flex; gap: 1.25rem; }
.site-header nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-header nav a[aria-current="page"], .site-header nav a:hover { color: var(--basil); text-decoration: underline; text-underline-offset: 5px; }
.site-footer { margin-top: 5rem; padding-block: 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.site-footer p { margin: .25rem 0; }

/* Buttons & chips */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .7rem 1.2rem; border-radius: 999px;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font: 500 1rem var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--basil-soft); }
.btn-primary { background: var(--basil); border-color: var(--basil); color: #fff; }
.btn-primary:hover { background: #224a34; }
.btn-pin { border-color: var(--pin); color: var(--pin); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 500 .95rem var(--sans);
  text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--basil); }
.chip[aria-pressed="true"] { background: var(--basil); border-color: var(--basil); color: var(--paper); }

/* Home feature */
.feature {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; padding-block: clamp(2rem, 5vw, 4rem);
}
.feature-img img { border-radius: var(--radius); aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.today {
  display: inline-block; margin: 0 0 1rem; padding: .25rem .8rem;
  background: var(--saffron); color: #2a1d05; border-radius: 999px; font-weight: 700; font-size: .9rem;
}
.feature h1 a { color: var(--ink); text-decoration: none; }
.feature h1 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.lede { font-size: 1.2rem; color: var(--muted); margin: 0 0 1rem; }
.feature-meta { font-weight: 500; margin-bottom: 1.5rem; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 1rem 0 1.5rem; }
.browse { margin-top: 4rem; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 2rem 1.5rem; }
.card { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; }
.card img { border-radius: var(--radius); aspect-ratio: 3/2; object-fit: cover; width: 100%; margin-bottom: .8rem; }
.card-cat { color: var(--basil); font-weight: 700; font-size: .9rem; }
.card h3 { margin: .2rem 0 .3rem; font-size: 1.35rem; }
.card:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.card-time { margin: 0; color: var(--muted); font-size: .95rem; }
.card[hidden] { display: none; }

/* Listing */
.listing h1 { margin-top: 2.5rem; }
.filters { display: grid; gap: 1rem; margin-bottom: 2rem; }
.search input {
  width: 100%; max-width: 32rem; padding: .8rem 1.1rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 1rem var(--sans);
}
.search input:focus { border-color: var(--basil); outline: none; box-shadow: 0 0 0 3px var(--basil-soft); }
.empty { color: var(--muted); }

/* Recipe page */
.recipe-head { padding-top: clamp(2rem, 5vw, 3.5rem); }
.cat { font-weight: 700; text-decoration: none; }
.recipe-head h1 { margin-top: .4rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.facts { background: var(--tint); }
.facts div { flex: 1 1 6rem; padding: .8rem 1rem; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.byline { color: var(--muted); font-size: .95rem; margin-top: 1.25rem; }
.hero-img { margin-block: 2rem; }
.hero-img img { width: 100%; border-radius: var(--radius); aspect-ratio: 3/2; object-fit: cover; }
.prose { font-size: 1.1rem; }
.prose p { margin: 0 0 1.2em; }
.prose img { border-radius: var(--radius); margin-block: 1.5rem; }

.recipe-card {
  margin-block: 3rem; padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--surface); border: 2px solid var(--basil); border-radius: calc(var(--radius) + 6px);
  scroll-margin-top: 1rem;
}
.recipe-card h2 { margin-bottom: .2rem; }
.card-meta { color: var(--muted); margin: 0 0 1.5rem; }
.card-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; }
.hint { color: var(--muted); font-size: .9rem; margin: -.3rem 0 .6rem; }
.ingredients { list-style: none; padding: 0; margin: 0; }
.ingredients li { border-bottom: 1px dashed var(--line); }
.ingredients label { display: flex; gap: .7rem; padding: .55rem 0; cursor: pointer; align-items: flex-start; }
.ingredients input { margin-top: .35rem; accent-color: var(--basil); width: 1.05rem; height: 1.05rem; flex: none; }
.ingredients input:checked + span { text-decoration: line-through; color: var(--muted); }
.steps { padding: 0; margin: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.1rem 2.8rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--saffron); color: #2a1d05; font-weight: 700; font-size: .95rem;
}
.notes { margin-top: 1rem; padding: 1rem 1.2rem; background: var(--basil-soft); border-radius: var(--radius); }
.notes p { margin: 0; }

.faq { margin-block: 3rem; }
.faq details { border-bottom: 1px solid var(--line); padding: .3rem 0; }
.faq summary {
  cursor: pointer; padding: .8rem 2rem .8rem 0; font-weight: 700; font-size: 1.08rem;
  list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .2rem; top: .55rem; font-size: 1.5rem; color: var(--basil); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1rem; color: var(--muted); }
.more { margin-top: 4rem; }

@media (max-width: 760px) {
  .feature, .card-grid { grid-template-columns: 1fr; }
  .facts div { flex-basis: 50%; border-bottom: 1px solid var(--line); }
}

@media print {
  .site-header, .site-footer, .actions, .hero-img, .story, .faq, .more, .hint { display: none !important; }
  body { background: #fff; color: #000; }
  .recipe-card { border: 0; padding: 0; }
}

.logo, .site-header nav a { white-space: nowrap; }
@media (max-width: 480px) { .bar { gap: .6rem; } .logo { font-size: 1.1rem; gap: .4rem; } .logo-mark { width: 1.7rem; height: 1.7rem; } .site-header nav { gap: .7rem; } .site-header nav a { font-size: .9rem; } }
@media (max-width: 360px) { .site-header nav a[target="_blank"] { display: none; } }
