:root {
  color-scheme: dark;
  --page: #101613;
  --panel: #18201b;
  --panel-hover: #1c261f;
  --inset: #121a15;
  --text: #f0efe5;
  --muted: #9aa69e;
  --faint: #849187;
  --line: #2b362e;
  --accent: #c4e5a3;
  --accent-hover: #d2efb5;
  --accent-ink: #26351f;
  --accent-tint: #263626;
  --danger: #e8a99b;
  --danger-tint: #382723;
  --ui: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --editorial: "DM Serif Display", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* The results list keeps the page still itself while it adds and removes cards (see app.js). */
html { scroll-behavior: smooth; scrollbar-gutter: stable; overflow-anchor: none; }
body { margin: 0; min-width: 320px; background: var(--page); color: var(--text); font: 400 15px/1.55 var(--ui); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
a { color: inherit; }
button { border: 0; }
::selection { background: #c4e5a340; color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
button, a, input, select, textarea { transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease; }
.icon { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 20px; top: -80px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 12px 20px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 16px; }

/* The everyday kitchen, with a little room to breathe. */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { width: min(1240px, calc(100% - 96px)); min-height: 88px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; color: var(--text); text-decoration: none; font-size: 31px; line-height: 1; font-weight: 650; letter-spacing: -1.4px; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 38px; margin-right: 9px; color: var(--accent); }
.brand-mark .icon { width: 29px; height: 29px; stroke-width: 1.65; }
.brand-dot { color: var(--accent); }
.main-nav { display: flex; align-self: stretch; align-items: stretch; gap: 32px; margin-left: 52px; }
.nav-tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; padding: 0 1px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 550; white-space: nowrap; }
.nav-tab:hover, .nav-tab.is-active { color: var(--text); }
.nav-tab.is-active::after { content: ""; position: absolute; height: 2px; background: var(--accent); inset: auto 0 -1px; }
.nav-tab .icon { width: 16px; height: 16px; }
.nav-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; background: #253129; border-radius: 5px; color: var(--muted); font-size: 11px; line-height: 1; }
.header-right { display: flex; align-items: center; gap: 19px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px; background: transparent; color: var(--muted); }
.icon-button:hover { color: var(--text); background: #ffffff08; }
.icon-button .icon { width: 18px; height: 18px; }
.page-shell { width: min(1160px, calc(100% - 96px)); margin-inline: auto; }
.hero { display: grid; grid-template-columns: 1fr 320px; align-items: center; gap: 32px; padding: 61px 0 47px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; color: var(--accent); font-size: 11px; line-height: 1.4; font-weight: 550; letter-spacing: 1.65px; }
.status-dot { display: inline-block; flex-shrink: 0; width: 5px; height: 5px; border-radius: 100%; background: var(--accent); }
h1 { margin: 0; font: 400 clamp(42px, 4.25vw, 59px)/1.1 var(--editorial); letter-spacing: -1.6px; }
h1 em { color: var(--accent); font-weight: 400; }
.hero-description { margin: 19px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.hero-art { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 2px; transform: rotate(-4deg); }
.hero-art > svg { display: block; width: min(100%, 290px); height: auto; }
.art-note { display: block; margin: -8px 0 0 63px; text-align: center; color: var(--faint); font: italic 14px/1.3 var(--editorial); transform: rotate(2deg); }

/* Ingredient search */
.search-panel { position: relative; border: 1px solid var(--line); border-radius: 17px; padding: 26px 28px 0; background: var(--panel); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.panel-heading > div { display: flex; align-items: center; gap: 10px; }
.section-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 6px; color: var(--accent); border: 1px solid #46563c; font-size: 11px; font-weight: 500; }
.panel-heading h2 { margin: 0; font-size: 16px; font-weight: 550; letter-spacing: -.2px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 5px 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; }
.text-button:hover { color: var(--accent); }
.text-button .icon { width: 15px; height: 15px; }
.ingredient-entry { display: flex; align-items: center; position: relative; min-height: 61px; gap: 14px; padding: 6px 6px 6px 19px; background: var(--inset); border: 1px solid #3c493e; border-radius: 9px; }
.ingredient-entry:focus-within { border-color: #9ab67e; box-shadow: 0 0 0 3px #c4e5a30b; }
.entry-icon { width: 19px; height: 19px; color: #7d8c80; }
#ingredient-input { display: block; flex: 1 1 auto; min-width: 0; min-height: 30px; max-height: 128px; resize: vertical; padding: 4px 0; line-height: 24px; background: transparent; border: 0; outline: 0; font-size: 14px; }
.entry-mode { display: flex; align-items: center; align-self: center; border-left: 1px solid var(--line); margin-left: auto; padding-left: 10px; }
.entry-mode select { width: 98px; padding: 8px 5px; border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
select option { color: var(--text); background: var(--panel); }
.primary-button { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 21px; min-height: 46px; border: 1px solid transparent; border-radius: 6px; padding: 11px 18px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 650; }
.primary-button:hover { background: var(--accent-hover); }
.primary-button .icon { width: 17px; height: 17px; }
.input-help { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 9px; color: var(--faint); font-size: 12px; }
.input-help p { margin: 0; }
.keyboard-hint { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
kbd { display: inline-grid; place-items: center; min-width: 19px; height: 18px; padding-inline: 3px; border: 1px solid #374138; border-radius: 3px; color: var(--muted); font: 11px/1 var(--ui); }
.suggestions { position: absolute; z-index: 20; top: calc(100% + 7px); left: 0; width: min(470px, 100%); max-height: 310px; overflow: auto; margin: 0; padding: 6px; list-style: none; border: 1px solid #485541; background: #1d2820; border-radius: 9px; box-shadow: 0 16px 36px #0005; }
.suggestions .caption, .suggestion-caption { padding: 8px 11px 7px; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.suggestion { display: flex; justify-content: space-between; align-items: center; gap: 15px; border-radius: 5px; padding: 10px 12px; font-size: 13px; cursor: pointer; }
.suggestion:hover, .suggestion[aria-selected="true"] { background: #31412d; color: var(--accent); }
.suggestion > span { display: inline-flex; align-items: center; gap: 8px; }
.suggestion > span .icon { width: 14px; height: 14px; }
.suggestion b { color: var(--accent); font-weight: 600; }
.suggestion .count, .suggestion-count { color: var(--faint); font-size: 12px; }
.suggestion .no { color: var(--danger); }
.selected-ingredients { padding-top: 18px; }
.ingredient-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ingredient-chip { display: inline-flex; align-items: center; gap: 3px; border: 1px solid #4a603d; border-radius: 6px; background: #283723; color: var(--accent); }
.chip-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 31px; padding: 5px 5px 5px 10px; background: transparent; color: inherit; font-size: 12px; font-weight: 500; }
.chip-toggle .icon { width: 13px; height: 13px; }
.chip-toggle small, .chip-count { color: #9daf90; font-size: 11px; font-weight: 400; }
.chip-remove { display: grid; place-items: center; width: 27px; height: 29px; padding: 6px; border-radius: 0 5px 5px 0; background: transparent; color: inherit; }
.chip-remove .icon { width: 12px; height: 12px; }
.chip-remove:hover { background: #c4e5a31a; }
.ingredient-chip.is-out { background: var(--danger-tint); color: var(--danger); border-color: #67463e; }
.ingredient-chip.is-out .chip-count, .ingredient-chip.is-out small { color: #ba8e84; }
.chip-hint { margin: 7px 0 0; color: var(--faint); font-size: 11px; }
.search-options { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.match-control { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.search-filter-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.only-control { padding-left: 24px; border-left: 1px solid var(--line); }
.only-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 35px; padding: 7px 12px; border: 1px solid #45523d; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; }
.only-toggle .icon { width: 14px; height: 14px; opacity: .35; }
.only-toggle:hover:not(:disabled) { border-color: #9ab67e; color: var(--accent); }
.only-toggle[aria-pressed="true"] { color: var(--accent); background: #2b3727; border-color: #718a59; }
.only-toggle[aria-pressed="true"] .icon { opacity: 1; }
.only-hint { margin: 5px 0 0; color: var(--faint); font-size: 11px; line-height: 1.5; }
.segmented { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 6px; padding: 3px; background: var(--inset); }
.segmented button { padding: 6px 10px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--faint); font-size: 11px; font-weight: 500; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-checked="true"] { border-color: #45523d; background: #2b3727; color: var(--accent); }
.live-label { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 11px; white-space: nowrap; }
.live-label .status-dot { width: 4px; height: 4px; background: #859e70; }
.starter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 17px 0 0 4px; color: var(--faint); font-size: 11px; }
.starter-row > span { margin-right: 5px; }
.starter-row button { display: inline-flex; align-items: center; gap: 13px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font-size: 11px; }
.starter-row button:hover { color: var(--accent); border-color: #687e52; background: #c4e5a305; }
.starter-row .icon { width: 11px; height: 11px; }

/* A collection to browse, rather than a wall of results. */
.results-section { padding-top: 50px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.results-heading .eyebrow { margin-bottom: 7px; font-size: 11px; color: var(--faint); letter-spacing: 1.45px; }
.results-heading h2 { margin: 0; font: 400 32px/1.2 var(--editorial); letter-spacing: -.55px; }
#count { margin: 8px 0 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
#count.is-error { color: var(--danger); }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 13px; border: 1px solid #3b493d; border-radius: 6px; background: transparent; color: var(--text); font-size: 12px; font-weight: 500; }
.secondary-button:hover { background: #ffffff06; border-color: #73816b; }
.secondary-button .icon { width: 14px; height: 14px; color: var(--muted); }
.results-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.name-filter { display: flex; align-items: center; gap: 8px; width: min(330px, 65%); }
.name-filter .icon { width: 15px; height: 15px; color: var(--faint); }
#name { width: 100%; min-width: 0; padding: 8px 0; border: 0; border-radius: 0; background: transparent; font-size: 13px; outline-offset: 2px; }
.toolbar-selects { display: flex; align-items: center; gap: 18px; }
.sort-control { display: flex; align-items: center; gap: 9px; color: var(--faint); font-size: 11px; white-space: nowrap; }
.sort-control select { max-width: 150px; padding: 7px 19px 7px 4px; border: 0; border-radius: 4px; background-color: transparent; color: var(--text); font-size: 12px; cursor: pointer; }
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 20; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 15px 8px 12px; border: 1px solid #3b493d; border-radius: 999px; background: var(--panel); color: var(--text); font-size: 12px; font-weight: 500; box-shadow: 0 8px 24px #0008; transition: opacity .2s, transform .2s; }
.to-top:hover { border-color: #73816b; background: var(--panel-hover); }
.to-top .icon { width: 14px; height: 14px; transform: rotate(-90deg); color: var(--muted); }
.to-top.is-hidden { opacity: 0; transform: translateY(10px); pointer-events: none; }
.recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 16px; margin: 0; padding: 0; list-style: none; }
.recipe-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 226px; padding: 19px 22px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); transition: background .18s, border-color .18s, transform .18s; }
.recipe-card:hover { border-color: #657755; background: var(--panel-hover); transform: translateY(-2px); }
.card-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; z-index: 2; }
.card-category { display: inline-flex; align-items: center; gap: 6px; color: #9fa993; font-size: 11px; line-height: 1.3; font-weight: 500; letter-spacing: .5px; text-transform: uppercase; }
.card-category .icon { width: 13px; height: 13px; color: #a4b58e; }
.save-button { width: 27px; height: 27px; margin-right: -5px; margin-top: -5px; }
.save-button .icon { width: 15px; height: 15px; }
.save-button[aria-pressed="true"] { color: var(--accent); }
.save-button[aria-pressed="true"] .icon { fill: #c4e5a330; }
.card-link { display: flex; flex-direction: column; flex: 1 1 auto; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.card-link:focus-visible { outline: 0; }
.recipe-card:has(.card-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.card-title { margin: 4px 0 14px; color: var(--text); font: 400 25px/1.16 var(--editorial); letter-spacing: -.3px; overflow-wrap: anywhere; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-bottom: 17px; color: var(--muted); font-size: 12px; }
.card-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta .icon { width: 12px; height: 12px; }
.card-matches { display: flex; flex-wrap: wrap; gap: 5px; margin: -2px 0 17px; }
.match-tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 6px; border-radius: 4px; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.match-tag.hit { background: #2b3926; color: #bfd7a6; }
.match-tag.miss { background: #252c26; color: #889387; }
.match-tag .icon { width: 10px; height: 10px; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding: 12px 0; border-top: 1px solid var(--line); }
.match-summary { color: var(--faint); font-size: 11px; }
.match-summary strong, .match-summary.is-match, .match-summary.has-match { color: #b8ca9e; font-weight: 400; }
.card-bottom > .icon { width: 16px; height: 16px; color: #9fad98; transition: transform .18s; }
.recipe-card:hover .card-bottom > .icon { transform: translateX(3px); color: var(--accent); }
.load-more-wrap { display: flex; flex-direction: column; align-items: center; gap: 9px; padding-top: 28px; }
#page-count { margin: 0; color: var(--faint); font-size: 11px; }
.empty-state { grid-column: 1 / -1; padding: 55px 20px; text-align: center; border: 1px dashed #3b493b; border-radius: 10px; color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 17px; background: var(--accent-tint); border-radius: 14px; color: var(--accent); }
.empty-icon .icon { width: 24px; height: 24px; }
.empty-title { margin: 0 0 7px; color: var(--text); font: 400 28px/1.2 var(--editorial); }
.empty-state p { max-width: 430px; margin: 10px auto 20px; font-size: 13px; line-height: 1.7; }
.empty-state .text-button { color: var(--accent); }
.loading-card { min-height: 226px; border: 1px solid var(--line); border-radius: 10px; padding: 25px 23px; background: var(--panel); }
.loading-card span, .loading-card div { display: block; height: 10px; width: 42%; margin-bottom: 22px; background: #2a352c; border-radius: 3px; animation: breathe 1.5s ease-in-out infinite; }
.loading-card span:nth-child(2), .loading-card div:nth-child(2) { width: 83%; height: 20px; margin-bottom: 10px; }
.loading-card span:nth-child(3), .loading-card div:nth-child(3) { width: 62%; height: 20px; }
@keyframes breathe { 50% { opacity: .4; } }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 15px 25px; margin-top: 58px; padding: 25px 0 30px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11px; }
.footer-brand { color: #a5b096; text-decoration: none; font-size: 20px; font-weight: 600; letter-spacing: -.8px; }
.site-footer p { margin: 0; margin-right: auto; }

/* A calm, usable space to cook in. */
body:has(dialog[open]) { overflow: hidden; }
dialog { color: var(--text); }
dialog::backdrop { background: #080e0bc9; backdrop-filter: blur(5px); }
.recipe-dialog { width: min(980px, calc(100% - 64px)); max-height: calc(100dvh - 64px); margin: auto; padding: 0; border: 1px solid #46513f; border-radius: 15px; background: var(--page); box-shadow: 0 28px 110px #0008; overscroll-behavior: contain; }
.recipe-topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 28px; border-bottom: 1px solid var(--line); background: var(--page); }
.recipe-topbar .text-button { color: var(--muted); font-size: 12px; }
.recipe-topbar .text-button .icon { transform: rotate(180deg); }
.recipe-head { padding: 32px 38px 27px; }
.recipe-head .eyebrow { margin-bottom: 12px; font-size: 11px; }
.recipe-title:focus { outline: none; }
.recipe-title { max-width: 700px; margin: 0 0 18px; font: 400 clamp(30px, 3.5vw, 43px)/1.13 var(--editorial); letter-spacing: -.8px; text-wrap: balance; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 9px 22px; color: var(--muted); font-size: 12px; }
.recipe-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.recipe-meta .icon { width: 14px; height: 14px; }
.recipe-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 23px; }
.recipe-actions .secondary-button { color: var(--muted); }
.recipe-actions .secondary-button[aria-pressed="true"] { color: var(--accent); border-color: #647b4e; background: #273723; }
.recipe-actions a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; font-size: 12px; }
.recipe-body { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(0, 1.65fr); gap: 35px; align-items: start; padding: 7px 38px 34px; }
.section-heading { display: flex; align-items: center; gap: 8px; margin: 0 0 19px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 550; }
.section-heading > span { margin-left: auto; color: var(--faint); font-size: 12px; font-weight: 400; }
.section-heading .icon { width: 17px; height: 17px; color: var(--accent); }
.ingredient-list, .method-list { list-style: none; margin: 0; padding: 0; }
.ingredient-list li { border-bottom: 1px solid var(--line); }
.ingredient-list label { display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: 10px; position: relative; padding: 12px 0; color: #cbd1c6; font-size: 14px; line-height: 1.65; cursor: pointer; }
.ingredient-list .ing-text { grid-column: 2; }
.ingredient-list input[type="checkbox"] { appearance: none; display: grid; place-items: center; width: 15px; height: 15px; margin: 3px 0 0; border: 1px solid #56654d; border-radius: 4px; background: transparent; cursor: pointer; }
.ingredient-list input[type="checkbox"]:checked { border-color: var(--accent); background: var(--accent); }
.ingredient-list input[type="checkbox"]:checked::after { content: ""; width: 7px; height: 4px; margin-top: -2px; border: solid var(--accent-ink); border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); }
.ingredient-list .is-match .ing-text { color: var(--accent); }
.have-label { display: block; grid-column: 2; justify-self: start; padding-top: 3px; color: #859d71; font-size: 11px; }
.ingredient-list li:has(input:checked) .ing-text { color: var(--faint); text-decoration: line-through; text-decoration-color: #75847b80; }
.step { border-bottom: 1px solid var(--line); }
.step:last-child { border: 0; }
.step label { position: relative; display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 13px; padding: 0 0 23px; margin-top: 22px; cursor: pointer; }
.step:first-child label { margin-top: 0; }
.step input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.step label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 4px; }
.step-number { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #43513b; background: #202c21; border-radius: 50%; color: var(--accent); font-size: 12px; font-weight: 500; }
.step-text { padding-top: 1px; color: #cbd1c6; font-size: 15px; line-height: 1.8; }
.step:has(input:checked) .step-number { background: #526c3b; border-color: #526c3b; color: var(--accent); }
.step:has(input:checked) .step-text { color: var(--faint); }
.recipe-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 38px 30px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11px; line-height: 1.7; }
.recipe-loading, .recipe-error { padding: 70px 35px; text-align: center; }
.recipe-loading p, .recipe-error p { color: var(--muted); font-size: 13px; }
.recipe-error h2 { font: 400 30px/1.2 var(--editorial); }
.help-dialog { position: relative; width: min(530px, calc(100% - 40px)); max-height: calc(100dvh - 40px); margin: auto; padding: 38px; border: 1px solid #46513f; border-radius: 14px; background: var(--panel); box-shadow: 0 28px 100px #0008; }
.dialog-close { position: absolute; right: 15px; top: 14px; }
.help-dialog .eyebrow { font-size: 11px; margin-top: 4px; }
.help-dialog h2 { margin: 0 0 27px; font: 400 36px/1.2 var(--editorial); letter-spacing: -.5px; }
.help-steps { counter-reset: help; display: grid; gap: 24px; margin: 0; padding: 0; list-style: none; }
.help-steps li { counter-increment: help; position: relative; padding-left: 34px; font-size: 13px; }
.help-steps li::before { content: counter(help, decimal-leading-zero); position: absolute; left: 0; top: 2px; color: var(--accent); font-size: 12px; }
.help-steps strong { font-weight: 550; }
.help-steps p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.help-note { margin: 26px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; line-height: 1.7; }
.toast.dialog-toast { max-width: min(620px, calc(100vw - 64px)); }
.toast { position: fixed; z-index: 100; bottom: 28px; left: 50%; max-width: calc(100% - 32px); transform: translateX(-50%); padding: 12px 21px; border: 1px solid #62784b; border-radius: 8px; color: var(--text); background: #2a3926; box-shadow: 0 7px 30px #0005; font-size: 12px; text-align: center; }

@media (min-width: 1500px) {
  .hero { padding-top: 73px; padding-bottom: 59px; }
}
@media (max-width: 1100px) {
  .header-inner, .page-shell { width: calc(100% - 64px); }
  .header-right { gap: 9px; }
  .main-nav { margin-left: 0; }
  .hero { grid-template-columns: 1fr 260px; gap: 20px; }
  h1 { font-size: 50px; }
  .recipe-card { padding-inline: 19px; }
  .card-title { font-size: 23px; }
}
@media (max-width: 800px) {
  .header-inner { min-height: 76px; }
  .hero { grid-template-columns: 1fr 210px; padding: 43px 0 35px; gap: 15px; }
  h1 { font-size: 42px; letter-spacing: -1.2px; }
  .hero-description { font-size: 12px; }
  .hero-art { margin-right: -9px; }
  .art-note { font-size: 12px; margin-top: -3px; margin-left: 25px; }
  .hero .eyebrow { font-size: 10px; letter-spacing: 1.3px; }
  .search-panel { padding: 23px 22px 0; }
  .ingredient-entry { gap: 10px; padding-left: 13px; }
  .entry-mode { padding-left: 4px; }
  .entry-mode select { width: 85px; font-size: 12px; }
  .primary-button { gap: 11px; padding-inline: 13px; font-size: 12px; }
  #ingredient-input { font-size: 14px; }
  .live-label { display: none; }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-title { font-size: 26px; }
  .recipe-dialog { width: calc(100% - 32px); max-height: calc(100dvh - 32px); }
  .recipe-head { padding: 28px; }
  .recipe-body { padding: 0 28px 28px; gap: 27px; grid-template-columns: minmax(190px, .85fr) minmax(0, 1.5fr); }
  .recipe-note { margin-inline: 28px; }
  .site-footer > span { width: 100%; }
}
@media (max-width: 600px) {
  html { scrollbar-gutter: auto; }
  .header-inner, .page-shell { width: calc(100% - 36px); }
  .header-inner { min-height: 73px; gap: 10px; }
  .brand { font-size: 26px; letter-spacing: -1.2px; }
  .brand-mark { width: 25px; margin-right: 5px; }
  .brand-mark .icon { width: 25px; height: 25px; }
  .main-nav { gap: 13px; margin-left: auto; }
  .nav-tab { font-size: 12px; gap: 5px; }
  .nav-tab .icon { display: none; }
  .nav-count { min-width: 17px; height: 17px; font-size: 11px; }
  .header-right { display: flex; gap: 0; }
  .header-right .icon-button { width: 27px; height: 30px; }
  .hero { grid-template-columns: 1fr; position: relative; padding: 36px 0 31px; }
  .hero-copy { position: relative; z-index: 1; }
  .hero .eyebrow { font-size: 10px; letter-spacing: 1.2px; margin-bottom: 17px; }
  h1 { font-size: clamp(35px, 8.8vw, 48px); line-height: 1.1; letter-spacing: -.9px; }
  .hero-description { margin-top: 17px; font-size: 12px; line-height: 1.8; }
  .hero-art { display: none; }
  .search-panel { padding: 19px 16px 0; border-radius: 12px; }
  .panel-heading { margin-bottom: 16px; }
  .panel-heading > div { gap: 8px; }
  .panel-heading h2 { font-size: 14px; }
  .section-number { width: 22px; height: 22px; font-size: 11px; }
  .panel-heading .text-button { font-size: 11px; }
  .ingredient-entry { display: grid; grid-template-columns: 17px minmax(0, 1fr) auto; gap: 7px; min-height: auto; padding: 10px; border-radius: 7px; }
  .entry-icon { width: 17px; height: 17px; align-self: center; }
  #ingredient-input { grid-column: 2; padding: 5px 0; font-size: 16px; min-height: 34px; }
  .entry-mode { border: 0; padding: 0; grid-column: 3; }
  .entry-mode select { width: 77px; padding-inline: 0; font-size: 11px; }
  .primary-button { grid-column: 1 / -1; width: 100%; min-height: 39px; gap: 9px; margin-top: 3px; padding: 8px 13px; border-radius: 4px; }
  .primary-button .icon { width: 15px; height: 15px; }
  .input-help { margin-top: 9px; font-size: 12px; line-height: 1.6; }
  .keyboard-hint { display: none; }
  .suggestions { top: 52px; width: 100%; }
  .selected-ingredients { padding-top: 15px; }
  .ingredient-chips { gap: 6px; }
  .chip-hint { font-size: 11px; line-height: 1.6; }
  .search-options { margin-top: 15px; padding: 13px 0; }
  .match-control { justify-content: space-between; gap: 7px; width: 100%; font-size: 11px; }
  .search-filter-controls { width: 100%; flex-direction: column; align-items: stretch; gap: 13px; }
  .only-control { padding: 13px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .only-toggle { width: 100%; min-height: 39px; justify-content: center; }
  .only-hint { text-align: center; }
  .segmented { padding: 2px; gap: 0; }
  .segmented button { font-size: 11px; padding: 6px 7px; }
  .starter-row { gap: 6px; padding: 13px 0 0; }
  .starter-row > span { width: 100%; margin-bottom: 2px; font-size: 11px; }
  .starter-row button { gap: 6px; padding: 5px 7px; font-size: 11px; }
  .starter-row .icon { width: 10px; height: 10px; }
  .results-section { padding-top: 34px; }
  .results-heading { gap: 14px; align-items: flex-start; margin-bottom: 17px; }
  .results-heading .eyebrow { font-size: 10px; letter-spacing: 1.2px; }
  .results-heading h2 { font-size: 27px; max-width: 240px; letter-spacing: -.5px; }
  #count { font-size: 11px; max-width: 230px; line-height: 1.6; }
  .results-heading .secondary-button { margin-top: 19px; min-height: 32px; font-size: 11px; white-space: nowrap; padding: 7px 9px; gap: 5px; }
  .results-heading .secondary-button .icon { width: 12px; height: 12px; }
  .results-toolbar { flex-wrap: wrap; gap: 6px 12px; margin-bottom: 14px; }
  .name-filter { width: auto; flex: 1 1 100%; gap: 6px; }
  .toolbar-selects { flex-wrap: wrap; gap: 4px 12px; }
  #name { font-size: 11px; }
  .name-filter .icon { width: 13px; height: 13px; }
  .sort-control { gap: 4px; font-size: 11px; }
  .sort-control select { font-size: 11px; max-width: 104px; padding-right: 0; }
  .recipe-grid { grid-template-columns: 1fr; gap: 12px; }
  .recipe-card { min-height: 217px; padding: 18px 20px 0; }
  .card-top { margin-bottom: 5px; }
  .card-title { max-width: 100%; font-size: 28px; margin-bottom: 14px; }
  .card-meta { font-size: 11px; }
  .card-bottom { margin-top: auto; padding-block: 12px; }
  .match-summary { font-size: 11px; }
  .card-category { font-size: 11px; }
  .card-matches { margin-top: -2px; }
  .match-tag { font-size: 11px; }
  .empty-state { padding: 40px 18px; }
  .empty-state p { font-size: 12px; }
  .empty-title { font-size: 26px; }
  .load-more-wrap { padding-top: 22px; }
  .site-footer { margin-top: 39px; padding-top: 23px; gap: 8px 14px; }
  .site-footer p { font-size: 11px; }
  .site-footer > span { font-size: 11px; }
  .recipe-dialog { width: 100%; max-width: 100%; max-height: 100dvh; height: 100dvh; border: 0; border-radius: 0; }
  .recipe-topbar { padding: 12px 18px; }
  .recipe-head { padding: 26px 22px 25px; }
  .recipe-title { font-size: 35px; }
  .recipe-meta { font-size: 11px; gap: 8px 14px; }
  .recipe-actions { gap: 8px; margin-top: 20px; }
  .recipe-actions .secondary-button { padding: 7px 10px; font-size: 11px; }
  .recipe-body { grid-template-columns: 1fr; gap: 29px; padding: 0 22px 28px; }
  .section-heading { font-size: 16px; margin-bottom: 15px; }
  .ingredient-list label { font-size: 14px; padding-block: 12px; }
  .ingredient-list input[type="checkbox"] { width: 17px; height: 17px; }
  .ingredient-list label { grid-template-columns: 17px minmax(0, 1fr); }
  .step-text { font-size: 15px; }
  .recipe-note { margin-inline: 22px; }
  .help-dialog { padding: 32px 25px; }
  .help-dialog h2 { font-size: 31px; }
  .toast.dialog-toast { max-width: calc(100vw - 36px); }
  .toast { bottom: 17px; width: max-content; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .recipe-card:hover { transform: none; }
}






