:root {
  color-scheme: light;
  --ink: #273b32;
  --muted: #7c847c;
  --paper: #f7f5ef;
  --white: #fffefa;
  --green: #355d49;
  --green-dark: #244334;
  --lime: #d8e4a8;
  --line: #e6e4dc;
  --orange: #d7784d;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { height: 82px; max-width: 1280px; padding: 0 6.2%; margin: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(39, 59, 50, .1); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.6px; }
.brand-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--white); background: var(--green); font-size: 19px; }
.brand-light { font-weight: 400; }
.header-nav { display: flex; align-items: center; gap: 28px; }
.header-link { color: var(--green); font-size: 13px; font-weight: 600; }
.header-link span { margin-left: 8px; color: var(--orange); font-size: 17px; }

.hero { display: flex; align-items: center; min-height: 430px; max-width: 1280px; margin: 0 auto; padding: 65px 10.3% 76px; }
.hero-copy { max-width: 510px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: 1.7px; }
.eyebrow-line { width: 24px; height: 1px; background: var(--orange); }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -1.9px; }
h1 { margin-bottom: 18px; font-size: clamp(58px, 7.5vw, 90px); line-height: .99; }
h1 em, h2 em { color: var(--green); font-weight: 600; }
.hero-description { max-width: 365px; margin-bottom: 27px; color: #68746b; font-size: 15px; line-height: 1.8; }
.hero-cta { display: inline-flex; align-items: center; gap: 16px; padding: 12px 0; color: var(--green); font-size: 12px; font-weight: 700; border-bottom: 1px solid #b9c5af; }
.hero-cta span { color: var(--orange); font-size: 18px; }
.recipe-section { padding: 82px max(6.2%, calc((100% - 1120px) / 2)) 100px; background: var(--white); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; max-width: 1120px; margin: 0 auto 34px; }
.section-heading .eyebrow { margin-bottom: 13px; }
h2 { margin-bottom: 0; font-size: clamp(34px, 4.5vw, 48px); line-height: 1.12; }
.recipe-count { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.filters { display: flex; gap: 10px; max-width: 1120px; margin: 0 auto 34px; }
.search-box { flex: 1; min-width: 200px; height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.search-box:focus-within { border-color: #91a18c; }
.search-icon { color: var(--green); font-size: 25px; line-height: 1; }
.search-box input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-box input::placeholder { color: #9b9f98; }
kbd { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid var(--line); border-radius: 3px; color: #969b93; font-family: var(--sans); font-size: 11px; }
.select-label { position: relative; }
.select-label::after { position: absolute; top: 16px; right: 13px; color: var(--green); content: "⌄"; pointer-events: none; }
select { height: 48px; min-width: 160px; padding: 0 34px 0 13px; appearance: none; border: 1px solid var(--line); border-radius: 4px; outline: 0; color: var(--ink); background: var(--white); font-size: 12px; }
select:focus { border-color: #91a18c; }
.favorites-filter { height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--white); font-size: 12px; }
.favorites-filter span { margin-right: 5px; color: var(--orange); font-size: 17px; vertical-align: -1px; }
.favorites-filter[aria-pressed="true"] { border-color: var(--green); color: var(--white); background: var(--green); }
.favorites-filter[aria-pressed="true"] span { color: var(--lime); }
.recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 1120px; margin: 0 auto; }
.recipe-card { position: relative; min-height: 255px; padding: 25px 24px 22px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid #e9e8e1; border-radius: 5px; background: var(--white); }
.card-topline { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.category-pill { display: inline-block; padding: 6px 9px; border-radius: 99px; color: var(--green); background: #edf1e4; font-size: 10px; font-weight: 700; }
.favorite-button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #b5b8ae; background: transparent; font-size: 22px; line-height: 1; }
.favorite-button.is-favorite { color: var(--orange); }
.favorite-button.is-favorite { font-size: 19px; }
.recipe-card h3 { margin: 0 0 9px; font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -.5px; line-height: 1.2; }
.recipe-card .card-description { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.card-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; color: #727c73; font-size: 11px; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta-icon { color: var(--orange); font-size: 14px; }
.card-open { position: absolute; inset: 0; z-index: 0; border: 0; background: transparent; text-indent: -9999px; }
.recipe-card > :not(.card-open) { position: relative; z-index: 1; pointer-events: none; }
.recipe-card .favorite-button { pointer-events: auto; }
.recipe-card .favorite-button { position: relative; z-index: 2; }
.status-message { grid-column: 1 / -1; padding: 48px 20px; color: var(--muted); text-align: center; }
.empty-state { grid-column: 1 / -1; padding: 52px 20px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--ink); font-family: var(--serif); font-size: 23px; }

.site-footer { min-height: 88px; max-width: 1280px; margin: auto; padding: 20px 6.2%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { font-size: 14px; }
.footer-brand .brand-mark { width: 25px; height: 25px; font-size: 16px; }
.site-footer p, .back-top { margin: 0; color: var(--muted); font-size: 11px; }
.back-top { color: var(--green); font-weight: 600; }

.recipe-dialog { position: fixed; width: min(680px, calc(100% - 32px)); max-height: min(88vh, 900px); padding: 0; overflow: auto; border: 0; border-radius: 8px; color: var(--ink); background: var(--white); }
.recipe-dialog::backdrop { background: rgba(20, 34, 26, .52); }
.dialog-content { padding: 42px clamp(24px, 7vw, 58px) 52px; }
.dialog-close { position: sticky; z-index: 2; top: 14px; float: right; width: 35px; height: 35px; margin: 14px 14px -49px 0; border: 1px solid var(--line); border-radius: 50%; color: var(--green); background: var(--white); font-size: 23px; line-height: 1; }
.dialog-content .category-pill { margin-bottom: 15px; }
.dialog-content h2 { margin: 0 35px 12px 0; font-size: clamp(34px, 7vw, 48px); }
.dialog-description { margin-bottom: 22px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 0 0 32px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #68746b; font-size: 12px; }
.dialog-content h3 { margin: 0 0 15px; font-family: var(--serif); font-size: 23px; font-weight: 600; }
.ingredient-list { display: grid; gap: 0; margin: 0 0 32px; padding: 0; list-style: none; }
.ingredient-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #efeee8; color: #4e5e52; font-size: 13px; line-height: 1.5; }
.ingredient-list li::before { color: var(--orange); content: "✳"; font-size: 12px; }
.step-list { display: grid; gap: 17px; margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.step-list li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: #4e5e52; font-size: 13px; line-height: 1.7; counter-increment: steps; }
.step-list li::before { content: counter(steps, decimal-leading-zero); color: var(--orange); font-size: 11px; font-weight: 700; }
.recipe-notes { margin: 28px 0 0; padding: 15px 17px; border-radius: 4px; color: #526449; background: #f0f2e8; font-size: 12px; line-height: 1.6; }

@media (max-width: 850px) {
  .site-header { height: 72px; }
  .hero { min-height: 400px; padding-left: 7%; }
  .recipe-section { padding-right: 6%; padding-left: 6%; }
  .filters { flex-wrap: wrap; }
  .search-box { flex-basis: 100%; }
  .select-label { flex: 1; }
  .select-label select { width: 100%; }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 560px) {
  .site-header { padding: 0 5%; }
  .header-nav { gap: 12px; }
  .header-link { font-size: 10px; }
  .hero { min-height: 390px; align-items: center; padding: 56px 7%; }
  .hero-copy { max-width: 100%; }
  h1 { font-size: clamp(58px, 17vw, 76px); }
  .hero-description { max-width: 310px; font-size: 13px; }
  .recipe-section { padding: 62px 5% 70px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 24px; }
  .section-heading .eyebrow { margin-bottom: 10px; }
  h2 { font-size: 36px; }
  .filters { gap: 8px; margin-bottom: 22px; }
  .select-label { flex-basis: calc(50% - 4px); }
  select { min-width: 0; font-size: 11px; }
  .favorites-filter { flex: 1; }
  .recipe-grid { grid-template-columns: 1fr; gap: 12px; }
  .recipe-card { min-height: 220px; padding: 20px; }
  .card-topline { margin-bottom: 19px; }
  .recipe-card h3 { font-size: 22px; }
  .site-footer { padding: 22px 5%; flex-wrap: wrap; }
  .back-top { margin-left: auto; }
}
