:root {
  color-scheme: light;
  --page: #f7f3ed;
  --ink: #2d2a25;
  --muted: #5f564a;
  --rule: #d2c7ba;
  --plum: #512a55;
  --serif: "Iowan Old Style", Baskerville, Georgia, serif;
  --sans: "Avenir Next", Avenir, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  width: min(68rem, calc(100% - clamp(2rem, 8vw, 7rem)));
  margin: auto;
  color: var(--ink);
  background: var(--page);
  font: 1rem/1.6 var(--sans);
}
h1, h2, h3, p, figure { margin: 0; }
.masthead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: var(--plum);
  font: 1.7rem/1 Baskerville, Georgia, serif;
}
.label { color: var(--muted); font-size: .875rem; }
.title-block { max-width: 42rem; padding-block: clamp(1.5rem, 5vw, 3.5rem); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1.05; letter-spacing: -.04em; }
.title-block p { margin-top: .6rem; color: var(--muted); }
.collection h2 { padding-bottom: .55rem; border-bottom: 1px solid var(--rule); font-size: 1.65rem; }
.recipes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1.1rem, 3vw, 2.25rem);
  margin-top: 1rem;
}
@media (min-width: 54rem) {
  .recipes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.artwork { aspect-ratio: 3 / 2; }
.artwork img { display: block; width: 100%; height: 100%; object-fit: contain; }
.artwork .illustration { padding: .6rem; }
.recipe-body { margin-top: .65rem; padding-top: .65rem; border-top: 1px solid var(--rule); }
.recipe h3 { font-size: clamp(1.2rem, 2.1vw, 1.55rem); line-height: 1.2; }
.recipe p { margin-top: .25rem; color: var(--muted); font-size: .9375rem; }
footer { margin-top: 2rem; padding-block: 1rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .875rem; }

.style-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .85rem;
  padding: .75rem 0;
  margin-bottom: 1.35rem;
  border-block: 1px solid var(--rule);
  font-size: .9rem;
}
.style-picker select {
  min-height: 2.5rem;
  padding: .3rem .5rem;
  border: 1px solid var(--muted);
  border-radius: 3px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
}
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
:root:has(#cookbook-style option[value="modern"]:checked) {
  --page: #faf8fb;
  --serif: "Helvetica Neue", Arial, sans-serif;
}
:root:has(#cookbook-style option[value="modern"]:checked) h1 { font-weight: 300; }
:root:has(#cookbook-style option[value="heirloom"]:checked) {
  --page: #edf2e8;
  --ink: #344335;
  --muted: #4a594a;
  --rule: #aab5a3;
  --serif: Baskerville, "Palatino Linotype", Georgia, serif;
  --sans: Georgia, serif;
}
:root:has(#cookbook-style option[value="heirloom"]:checked) .recipe {
  padding: .75rem;
  border: 4px double var(--rule);
  background: #f8faf5;
}
:root:has(#cookbook-style option[value="heirloom"]:checked) .recipe h3 { font-style: italic; }
:root:has(#cookbook-style option[value="playful"]:checked) {
  --page: #edf5fc;
  --ink: #20364a;
  --muted: #405970;
  --rule: #a7c7e0;
  --serif: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
}
:root:has(#cookbook-style option[value="playful"]:checked) .recipe {
  padding: .85rem;
  border: 2px solid #456d91;
  border-radius: 1.15rem;
  background: #f7fbff;
}
