:root {
  color: #233323;
  background: #f7f1e6;
  font: 16px/1.5 system-ui, sans-serif;
  --paper: #f7f1e6;
  --sage: #dce1ce;
  --ink: #233323;
  --green: #30452e;
  --rust: #9e3b24;
  --line: #a7ad97;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
body { margin: 0; }
.wrap { width: min(94%, 1370px); margin-inline: auto; }
a { color: inherit; text-underline-offset: .25em; }
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 65px;
  border-bottom: 1px solid var(--ink);
}
.wordmark { font: bold clamp(1.6rem, 3vw, 2.5rem)/1 var(--serif); letter-spacing: -.05em; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: clamp(12px, 3vw, 42px); }
nav a { font-weight: 600; text-decoration: none; }
nav a:hover, .wordmark:hover { text-decoration: underline; }
.skip { position: absolute; top: -10rem; left: 1rem; padding: 10px; background: var(--paper); z-index: 1; }
.skip:focus { top: 1rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr);
  gap: clamp(28px, 4vw, 68px);
  align-items: center;
  padding-block: 14px 22px;
}
h1, h2, h3 { margin: 0; font-family: var(--serif); line-height: 1.03; letter-spacing: -.045em; }
h1 { font-size: clamp(2.85rem, 5.65vw, 5.6rem); }
h2 { font-size: clamp(2.2rem, 3.8vw, 4rem); }
h3 { font-size: clamp(1.4rem, 2.3vw, 2.2rem); }
p { margin: .75em 0; }
.hero p { max-width: 32ch; margin-block: 18px 22px; font: clamp(1.2rem, 1.9vw, 1.65rem)/1.25 var(--serif); }
figure { margin: 0; }
.hero img { display: block; width: 100%; height: auto; aspect-ratio: 2.18; object-fit: cover; object-position: center 54%; }
figcaption, .privacy { color: #46513e; font-size: .875rem; }
figcaption { padding-top: 5px; text-align: right; }

button, select, input { font: inherit; color: inherit; }
button, .action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .55rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--green);
  color: white;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.action { padding-inline: 1.5rem; background: var(--rust); }
.secondary { background: transparent; color: var(--green); border-color: var(--green); }
button:hover, .action:hover { filter: brightness(.9); }
.secondary:hover { background: #cdd5bd; }
:focus-visible { outline: 3px solid #8b3a23; outline-offset: 3px; }

.panel { background: var(--sage); padding-block: clamp(24px, 3vw, 42px); }
.pantry, .catalog { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 2fr); gap: clamp(22px, 3vw, 44px); }
.pantry > :first-child { border-right: 1px solid var(--line); padding-right: clamp(14px, 2vw, 28px); }
.pantry p, .catalog p { max-width: 32ch; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend, label { font-weight: 640; }
#ingredients { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 16px; margin-block: 6px 16px; }
.ingredient {
  display: grid;
  grid-template-columns: minmax(0,1fr) 4rem;
  align-items: center;
  column-gap: 6px;
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
}
.ingredient label { display: flex; align-items: center; gap: 6px; min-height: 38px; cursor: pointer; }
.ingredient small { grid-column: 2; font-size: .74rem; }
input[type=checkbox] { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--green); }
input[type=number], select { min-width: 0; width: 100%; border: 1px solid #707b62; border-radius: 4px; background: #fffdf6; padding: 5px 7px; }
input[type=number]:disabled { background: #e8ebde; opacity: .8; }
select { min-height: 44px; }
.form-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 24px; }
.method { flex: 1 1 180px; }
.method label { display: block; margin-bottom: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.privacy { margin-bottom: 0; }
.privacy small { font-size: inherit; }
#status:empty, #results:empty { display: none; }
#status { margin-top: 20px; font-weight: 650; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cards .card { padding: clamp(12px, 2vw, 22px); background: #f9f6ec; border-top: 3px solid var(--green); }
.card { min-width: 0; overflow-wrap: anywhere; }
.card summary { cursor: pointer; font-weight: 650; padding-block: 5px; }
.card li + li { margin-top: .35rem; }

.collection { background: #fffdf9; padding-block: clamp(28px, 4vw, 54px); }
#all .card { padding-block: 13px; border-bottom: 1px solid var(--line); }
#all .card:first-child { padding-top: 0; }
#all h3 { margin-bottom: 7px; }
#all details { max-width: 62ch; }
footer { padding-block: 16px 26px; }
footer summary { cursor: pointer; }

@media (max-width: 1040px) {
  #ingredients { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .hero, .pantry, .catalog, .cards { grid-template-columns: minmax(0, 1fr); }
  .hero { gap: 18px; padding-block: 23px 15px; }
  .hero img { aspect-ratio: 1.7; }
  .hero p { margin-block: 11px 15px; }
  .pantry > :first-child { border: 0; padding: 0; }
  .pantry, .catalog { gap: 14px; }
  .pantry p { margin-bottom: 0; }
  .pantry .privacy { margin-top: 12px; }
}
@media (max-width: 410px) {
  #ingredients { grid-template-columns: minmax(0, 1fr); }
  .masthead { align-items: center; }
  nav { font-size: .9rem; }
}

.wordmark { flex: 0 1 clamp(136px, 20vw, 260px); min-width: 0; }
.wordmark img { display: block; width: 100%; height: auto; }
.card h3 a { text-decoration: none; }
.card h3 a:hover, .card h3 a:focus-visible { text-decoration: underline; }
.reading { max-width: 720px; margin: auto; padding-block: 35px; }
.reading h1 { margin-block: 16px; font-size: clamp(2.6rem, 6vw, 4.7rem); }
.reading h2 { margin-top: 1.6rem; font-size: clamp(1.65rem, 3vw, 2.2rem); }
.reading li + li { margin-top: .5rem; }
.reading .lead { font: 1.45rem/1.35 var(--serif); }
.footer-links { gap: .55rem 1.25rem; margin-bottom: .75rem; }
.footer-links a { font-size: .9rem; text-decoration: underline; }
.reading dt { font-weight: 650; }
.reading dd { margin: 0 0 .7rem; }
.reading a { overflow-wrap: anywhere; }
