:root {
  color-scheme: light;
  --paper: #f8f4ef;
  --white: #fffdf9;
  --ink: #26201a;
  --muted: #60544b;
  --line: #ddccbc;
  --accent: #a73722;
  --accent-deep: #7d2919;
  --green: #23573d;
  --green-tint: #e9f2eb;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
img { display: block; max-width: 100%; }
h1, h2, h3, .brand { font-family: Georgia, serif; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .32em; font-size: clamp(2.35rem, 6.3vw, 4.65rem); line-height: 1.03; letter-spacing: -.045em; }
h2 { margin-bottom: .3em; font-size: clamp(1.55rem, 3.35vw, 2.25rem); line-height: 1.14; letter-spacing: -.025em; }
h3 { margin-bottom: .4em; font-size: 1.36rem; line-height: 1.21; }
a { color: var(--accent-deep); text-underline-offset: .15em; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid #356244; outline-offset: 3px; }
[hidden] { display: none !important; }
:target { scroll-margin-top: 1.25rem; }
.wrap { width: min(1110px, calc(100% - 36px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 3; top: 8px; left: 8px; padding: .65rem; background: var(--white); }
.site-header { position: sticky; top: 0; z-index: 2; background: var(--white); border-bottom: 1px solid var(--line); }
.header-content .brand { margin-inline-end: auto; }
#ingredients, #meal-plan { scroll-margin-top: 90px; }
.header-content, .footer-content { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .82rem; flex-wrap: wrap; }
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; font-weight: bold; font-size: 1.4rem; line-height: 1.1; }
.brand img { border-radius: 11px; }
nav { display: flex; gap: clamp(.7rem, 3vw, 1.8rem); align-items: center; min-height: 32px; flex-wrap: wrap; }
nav a { color: var(--ink); text-decoration: none; font-weight: 650; }
nav a:hover, .text-button:hover { text-decoration: underline; }
.hero { display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; background: #f2e7d9; border: 1px solid var(--line); border-radius: 25px; overflow: hidden; margin-block: 2.35rem 1.5rem; }
.hero-copy { padding: clamp(1.5rem, 4.8vw, 3.75rem); }
.hero-copy p { max-width: 32rem; font-size: 1.17rem; color: var(--muted); margin-bottom: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid transparent; padding: .58rem 1rem; border-radius: 10px; font-weight: 700; text-decoration: none; line-height: 1.23; white-space: normal; }
.primary { background: var(--accent); color: white; }
.primary:hover { background: var(--accent-deep); }
.outline { background: var(--white); border-color: var(--line); color: var(--accent-deep); }
.outline:hover { border-color: var(--accent); }
.text-button { color: var(--accent-deep); background: transparent; padding-inline: .5rem; }
.hero-photo { display: block; align-self: stretch; min-width: 0; position: relative; background: #cab59c; min-height: 290px; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-photo span { display: block; position: absolute; bottom: 0; left: 0; right: 0; color: white; background: linear-gradient(transparent, rgba(27,19,14,.92)); padding: 2.7rem 1rem .8rem; font-weight: 650; }
.hero-photo span span { display: inline; position: static; padding: 0; background: none; }
.picker, .weekly { background: var(--white); border: 1px solid var(--line); border-radius: 19px; padding: clamp(1rem, 3.7vw, 2rem); }
.picker-heading, .section-heading { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .5rem 1rem; }
.picker-heading p, .section-heading p { margin-bottom: .8rem; color: var(--muted); }
#ingredient-form label { display: block; font-size: .93rem; font-weight: 650; margin-bottom: .3rem; }
.input-row { display: flex; gap: .55rem; max-width: 760px; }
#ingredient-text { min-width: 0; flex: 1; border: 1px solid #bba994; border-radius: 10px; background: #fff; padding: .65rem .85rem; min-height: 46px; color: var(--ink); }
#ingredient-text::placeholder { color: #76685c; }
.input-feedback { color: var(--muted); font-size: .92rem; margin: .4rem 0 0; }
.input-feedback:empty { display: none; }
.ingredient-chips { display: flex; flex-wrap: wrap; gap: .48rem; margin-top: 1rem; }
.ingredient-chip { color: var(--ink); background: #f8f2e9; border: 1px solid #d8c8b7; border-radius: 999px; padding: .46rem .88rem; min-height: 42px; font-weight: 600; }
.ingredient-chip[aria-pressed="true"] { background: var(--accent); color: white; border-color: var(--accent); }
.ingredient-chip[aria-pressed="false"]:hover { border-color: var(--accent); }
.beans-tip, .plan-note { margin-block: .85rem 0; color: var(--muted); font-size: .94rem; }
.matches, .weekly { margin-block: 1.8rem; }
.match-status { margin-bottom: 1rem; color: var(--muted); }
.recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.recipe-card { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--white); border-radius: 16px; overflow: hidden; }
.recipe-card img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; background: #eadccd; }
.recipe-card-body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.recipe-card h3 a { color: var(--ink); text-decoration: none; }
.recipe-card h3 a:hover { text-decoration: underline; }
.recipe-card p { margin-bottom: .65rem; font-size: .94rem; }
.match-ready { padding: .4rem .55rem; color: var(--green); background: var(--green-tint); font-weight: 700; border-radius: 6px; }
.match-needed { color: var(--ink); }
.recipe-link { margin-top: auto; align-self: flex-start; font-weight: 700; min-height: 34px; display: inline-flex; align-items: center; }
.meal-table { border-collapse: collapse; width: 100%; margin-top: .8rem; table-layout: fixed; }
.meal-table th, .meal-table td { padding: .68rem .64rem; text-align: left; vertical-align: top; border-bottom: 1px solid #eadfd2; overflow-wrap: anywhere; }
.meal-table thead th { background: var(--accent-deep); color: white; }
.meal-table thead th:first-child { width: 80px; }
.meal-table tbody th { white-space: nowrap; }
.meal-table tbody tr:nth-child(odd) { background: #f8f1e7; }
.meal-table tbody td a { font-weight: 650; }
.mobile-label { display: none; }
.stretch { margin-top: 1rem; border: 1px solid var(--line); border-radius: 10px; padding: .72rem 1rem; background: #fbf6ee; }
.stretch summary { font-weight: 750; cursor: pointer; }
.stretch p { margin: .6rem 0; }
.stretch ul { margin-block: .45rem .3rem; padding-left: 1.2rem; }
.stretch li + li { margin-top: .3rem; }
.footer { border-top: 1px solid var(--line); background: var(--white); }
.footer a { font-weight: 650; }
@media (max-width: 800px) {
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr 40%; margin-block-start: 1.1rem; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 24px); }
  .header-content { gap: .55rem; }
  #ingredients, #meal-plan { scroll-margin-top: 125px; }
  .hero { grid-template-columns: 1fr; border-radius: 16px; }
  .hero-photo { min-height: 190px; max-height: 230px; }
  .hero-copy p { font-size: 1.02rem; }
  .input-row { flex-wrap: wrap; }
  #ingredient-text { flex-basis: 100%; }
  .recipe-grid { grid-template-columns: 1fr; }
  .meal-table, .meal-table tbody { display: block; }
  .meal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .meal-table tr { display: grid; grid-template-columns: 1fr; margin-bottom: .65rem; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  .meal-table th, .meal-table td { display: block; border: 0; padding: .39rem .68rem; }
  .meal-table tbody th { background: #eee1d1; }
  .mobile-label { display: inline; font-weight: 700; margin-right: .38rem; }
}
