:root {
  color-scheme: light;
  --paper: #f8f2e7;
  --ink: #29271e;
  --green: #244335;
  --line: #d8cbb8;
  --serif: Georgia, 'Times New Roman', serif;
  font: 100%/1.55 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #ad3d34; outline-offset: 4px; }
.wrap { width: min(90%, 78rem); margin-inline: auto; }
.masthead, footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.2rem; }
.masthead { border-bottom: 1px solid var(--line); }
.wordmark { font: bold 1.45rem var(--serif); text-decoration: none; color: var(--green); }
.wordmark span { color: #a43a31; margin-right: .32em; }
.cover { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; margin-block: 1.65rem 4.4rem; background: #efd8bd; }
.cover-copy { padding: clamp(1.6rem, 4.5vw, 4.5rem); align-self: center; }
.cover img { width: 100%; height: 100%; min-height: 23rem; object-fit: cover; }
.kicker { margin: 0 0 .9rem; color: var(--green); font-size: .875rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.2vw, 5.4rem); line-height: .98; letter-spacing: -.066em; }
h1 em { color: #883329; }
h2 { font-size: clamp(2.15rem, 4vw, 3.75rem); line-height: 1.04; letter-spacing: -.05em; }
.cover-copy > p:not(.kicker) { margin-block: 1.4rem; }
.button { display: inline-block; background: var(--green); color: white; padding: .72rem 1.2rem; font-weight: 650; text-decoration: none; border-radius: .2rem; }
.button:hover { background: #152d23; }
.index { margin-bottom: 5rem; }
.index-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.2rem; padding-bottom: 1.45rem; border-bottom: 1px solid var(--line); }
.index-heading label { display: grid; gap: .35rem; font-size: .875rem; font-weight: 650; }
input { width: min(18rem, 100%); border: 1px solid #9c8d79; border-radius: .25rem; background: #fffbf4; color: var(--ink); padding: .55rem .7rem; font-size: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.25rem; }
.filters button, .dialog-bar button { border: 1px solid #95836c; border-radius: 100vw; padding: .43rem .9rem; color: var(--ink); background: transparent; }
.filters button[aria-pressed="true"], .filters button:hover, .dialog-bar button:hover { background: var(--green); border-color: var(--green); color: white; }
.count { color: #625a4c; font-size: .875rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { border: 1px solid var(--line); text-align: left; padding: 0; color: inherit; background: #fffbf4; display: flex; flex-direction: column; }
.card:hover { border-color: #874b3b; }
.card-image { display: grid; place-items: center; grid-template-rows: minmax(0, 1fr); background: #faf1e3; width: 100%; aspect-ratio: 1.8; overflow: hidden; }
.card-image img { display: block; width: auto; height: 100%; max-width: 100%; min-height: 0; object-fit: contain; mix-blend-mode: multiply; }
.card-copy { padding: 1rem 1.2rem 1.25rem; }
.card-copy strong { display: block; font: 1.44rem/1.2 var(--serif); }
.card-copy small { display: block; color: #625a4c; margin-bottom: .3rem; font-size: .875rem; }
footer { border-top: 1px solid var(--line); }
dialog { width: min(94%, 58rem); max-height: 90dvh; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 0; }
dialog::backdrop { background: rgb(28 26 20 / 63%); }
.dialog-bar { position: sticky; top: 0; padding: .7rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); text-align: right; z-index: 1; }
.recipe-body { padding: clamp(1rem, 4vw, 2.5rem); }
#pages { display: grid; gap: 1.3rem; margin-top: 1.7rem; }
#pages figure { margin: 0; }
#pages img { display: block; max-width: 100%; max-height: 65vh; object-fit: contain; margin: 0 auto .55rem; }
#pages figcaption { text-align: center; }
@media (max-width: 54rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 42rem) {
  .cover { grid-template-columns: 1fr; margin-bottom: 2.7rem; }
  .cover img { min-height: 0; max-height: 23rem; }
  .index-heading { align-items: start; flex-direction: column; }
}
@media (max-width: 25rem) { .cards { grid-template-columns: 1fr; } }
.recipe-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 2rem; margin-top: 1.8rem; }
.recipe-text h3 { font-size: 1.65rem; margin-bottom: .5rem; }
.recipe-text h4 { margin: 1.05rem 0 .25rem; }
.recipe-text ul { padding-left: 1.2rem; margin-top: .35rem; }
.recipe-text li + li { margin-top: .4rem; }
.recipe-directions p { margin: .5rem 0 .9rem; }
.batch { display: flex; gap: .38rem; border: 0; padding: 0; margin: .65rem 0 1rem; }
.batch legend { font-size: .875rem; font-weight: 650; margin-bottom: .25rem; }
.batch label { position: relative; cursor: pointer; }
.batch input, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.batch span { display: block; min-width: 2.7rem; text-align: center; border: 1px solid var(--line); padding: .35rem .6rem; border-radius: 100vw; }
.batch input:checked + span { background: var(--green); color: white; border-color: var(--green); }
.batch input:focus-visible + span { outline: 3px solid #ad3d34; outline-offset: 2px; }
.batch-note, #recipe-note { color: #625a4c; font-size: .9rem; }
#source-scans { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: .9rem; }
#source-scans summary { cursor: pointer; font-weight: 650; }
@media (max-width: 42rem) { .recipe-text { grid-template-columns: 1fr; gap: 1rem; } }

.source-link { display: inline-block; margin-top: .8rem; color: var(--green); }
#source-scans summary { scroll-margin-top: 4rem; }
