:root {
  color-scheme: light;
  --paper: #f6f2e9;
  --ink: #292820;
  --muted: #6d695e;
  --rust: #a03e25;
  --rule: #d5cdbf;
  --serif: Georgia, "Times New Roman", serif;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.6; }
a { color: inherit; text-underline-offset: .2em; }
button, input { font: inherit; }
button { cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
::selection { background: #e7c9b8; color: var(--ink); }
[hidden] { display: none !important; }
.page-header, .index-page, .recipe-page { width: min(1180px, calc(100% - 96px)); margin-inline: auto; }
.page-header { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 29px 0 24px; border-bottom: 1px solid var(--ink); }
.wordmark { font: bold 1.35rem var(--serif); text-decoration: none; letter-spacing: -.04em; }
.wordmark a { text-decoration: none; }
.skip-link { position: absolute; top: 8px; left: 16px; padding: 10px 16px; background: var(--ink); color: var(--paper); transform: translateY(-180%); z-index: 1; }
.skip-link:focus { transform: translateY(0); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(3rem, 5.8vw, 5.2rem); line-height: 1.04; letter-spacing: -.055em; margin: 0; }
.index-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 64px; padding: 34px 0 80px; }
.filter-panel { border-right: 1px solid var(--rule); padding-right: 30px; }
.filter-panel h2 { margin: 0 0 25px; font-size: 1.7rem; letter-spacing: -.035em; line-height: 1.2; }
label { display: block; margin-bottom: 8px; font-size: .75rem; font-weight: 650; }
input[type="search"] { display: block; width: 100%; min-height: 46px; border: 1px solid #a79c8c; border-radius: 0; padding: 11px 10px; background: #fcfaf5; color: var(--ink); font-size: .82rem; }
input::placeholder { color: #716b61; opacity: 1; }
input[aria-invalid="true"] { border-color: var(--rust); }
.help { color: var(--muted); font-size: .75rem; line-height: 1.7; margin: 12px 0 17px; }
.help b { font-size: .7rem; font-weight: 650; }
.example { white-space: nowrap; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.apply-button { min-height: 44px; padding: 10px 15px; background: var(--rust); color: #fffaf1; border: 1px solid var(--rust); border-radius: 0; font-size: .78rem; }
.apply-button:hover { background: #80301c; }
.text-button { border: 0; padding: 10px 0; background: transparent; text-decoration: underline; text-underline-offset: 4px; font-size: .75rem; color: var(--muted); min-height: 44px; }
.filter-error { color: var(--rust); font-size: .8rem; line-height: 1.6; }
.filter-error:empty { display: none; }
.tag-section { margin-top: 33px; padding-top: 22px; border-top: 1px solid var(--rule); }
.tag-section h3 { font-size: 1.2rem; margin: 0 0 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { border: 1px solid var(--rule); border-radius: 2px; background: transparent; padding: 9px 11px; min-height: 40px; color: var(--ink); font-size: .72rem; overflow-wrap: anywhere; }
.tag:hover { color: var(--rust); border-color: var(--rust); background: #eee5d9; }
.index-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.index-heading h2 { margin: 0; font-size: 1.7rem; letter-spacing: -.035em; }
#filter-status { color: var(--muted); font-size: .72rem; text-align: right; margin: 0; }
.recipe-list { list-style: none; padding: 0; margin: 0; counter-reset: recipe; }
.recipe { counter-increment: recipe; display: flex; align-items: baseline; gap: 22px; border-bottom: 1px solid var(--rule); }
.recipe::before { content: counter(recipe, decimal-leading-zero); font-size: .65rem; font-variant-numeric: tabular-nums; color: var(--rust); flex: 0 0 20px; }
.recipe > a { flex: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 23px 0; font: 1.5rem/1.3 var(--serif); letter-spacing: -.025em; text-decoration: none; overflow-wrap: anywhere; min-width: 0; }
.recipe > a::after { content: "\2197"; font: 1rem/1 sans-serif; color: var(--rust); flex-shrink: 0; transition: transform .15s; }
.recipe > a:hover { color: var(--rust); }
.recipe > a:hover::after { transform: translate(2px, -2px); }
.recipe-summary { display: block; min-width: 0; }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 6px 12px; font: .7rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; color: var(--muted); }
.recipe-tags:not(:empty) { margin-top: 10px; }

/* Recipe pages share the same paper, type, and measured reading width. */
.recipe-page { max-width: 780px; padding-block: 32px 80px; }
.breadcrumb { color: var(--muted); font-size: .8rem; margin-bottom: 36px; }
.breadcrumb a:hover { color: var(--rust); }
.recipe-content { overflow-wrap: anywhere; }
.recipe-content h1 { font-size: clamp(2.7rem, 6vw, 4.4rem); margin: 24px 0 32px; }
.recipe-content h2 { font-size: 1.8rem; line-height: 1.2; margin: 40px 0 20px; padding-top: 23px; border-top: 1px solid var(--rule); }
.recipe-content h3 { font-size: 1.35rem; margin: 28px 0 12px; }
.recipe-content p, .recipe-content li { line-height: 1.85; }
.recipe-content ul, .recipe-content ol { padding-left: 1.5rem; }
.recipe-content li { padding-left: .35rem; margin-block: 8px; }
.recipe-content li::marker { color: var(--rust); }
.recipe-content a { color: var(--rust); }
.recipe-content img { max-width: 100%; height: auto; display: block; margin-block: 24px; }
.recipe-content blockquote { border-left: 2px solid var(--rust); margin: 24px 0; padding-left: 22px; color: var(--muted); font-style: italic; }
.recipe-content table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; }
.recipe-content th, .recipe-content td { border-bottom: 1px solid var(--rule); padding: 10px 16px 10px 0; text-align: left; }
.recipe-content pre { overflow-x: auto; padding: 16px; background: #ece6da; }
.recipe-content hr { border: 0; border-top: 1px solid var(--rule); margin-block: 32px; }
.recipe-columns > section { min-width: 0; }

@media (min-width: 900px) {
  .recipe-page:has(.recipe-columns) { max-width: 1100px; }
  .recipe-columns { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: 64px; margin-top: 40px; align-items: start; }
  .recipe-columns > section > h2:first-child { margin-top: 0; }
}

@media (max-width: 850px) {
  .page-header, .index-page, .recipe-page { width: calc(100% - 48px); }
  .index-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 30px; }
  .filter-panel { padding-right: 24px; }
  .recipe > a { font-size: 1.3rem; }
}

@media (max-width: 620px) {
  .page-header, .index-page, .recipe-page { width: calc(100% - 40px); }
  .page-header { padding-block: 20px; }
  .index-layout { display: block; padding-top: 25px; padding-bottom: 45px; }
  .filter-panel { border-right: 0; padding-right: 0; }
  .filter-panel h2 { margin-bottom: 20px; }
  input[type="search"] { font-size: 1rem; }
  .tag-section { margin-top: 23px; padding-top: 18px; }
  .recipe-index { margin-top: 35px; border-top: 1px solid var(--ink); padding-top: 23px; }
  .recipe { gap: 12px; }
  .recipe > a { padding-block: 20px; }
  .recipe-page { padding-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  @page { margin: 18mm; }
  :root { background: white; color: black; font-size: 11pt; }
  body { background: white; }
  .page-header, .index-page, .recipe-page { width: 100%; max-width: none; }
  .page-header { padding: 0 0 12pt; }
  .skip-link, .filter-panel, .breadcrumb, .recipe > a::after, .recipe-content button { display: none; }
  .recipe-content h1 { font-size: 32pt; color: black; }
  .index-layout { display: block; padding: 16pt 0 0; }
  .recipe-index { margin: 0; border: 0; padding: 0; }
  .recipe > a { padding-block: 10pt; font-size: 14pt; }
  a, .recipe-content a, .recipe::before { color: black; }
  .recipe-page { padding: 0; }
  .recipe-columns { display: block; margin-top: 0; }
  .recipe-content h2, .recipe-content h3 { break-after: avoid; }
  .recipe-content h2 { margin-top: 20pt; padding-top: 12pt; }
  .recipe, .recipe-content li, .recipe-content img, .recipe-content blockquote { break-inside: avoid; }
  .recipe-content p { orphans: 3; widows: 3; }
  .recipe-content pre { white-space: pre-wrap; }
}
