:root {
  --cream: #fbf6ee;
  --paper: #fffdf9;
  --ink: #3b2f2a;
  --muted: #7a6a60;
  --accent: #b5532f;
  --accent-dark: #8f3f22;
  --line: #eadfd2;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.6 var(--sans); }
a { color: var(--accent-dark); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: .6em 0 .3em; }
h2 { font-size: 1.5rem; margin: 1.6em 0 .6em; }
h3 { font-size: 1.1rem; margin: 1em 0 .3em; color: var(--accent-dark); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }

.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.35rem var(--serif); color: var(--ink); text-decoration: none; }
.brand-mark { font-size: 1.6rem; }
.search { flex: 1 1 260px; max-width: 420px; }
.search input { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: var(--cream); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.intro { text-align: center; padding: 28px 0 8px; }
.intro p { color: var(--muted); font-size: 1.1rem; }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; padding: 10px 22px; border-radius: 999px; font-weight: 600; }
.btn:hover { background: var(--accent-dark); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(59, 47, 42, .1); }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--line); }
.card-t { display: block; padding: 10px 12px 12px; font-weight: 600; line-height: 1.3; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tile { position: relative; border-radius: 12px; overflow: hidden; color: #fff; text-decoration: none; }
.tile img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; filter: brightness(.62); }
.tile span { position: absolute; left: 12px; right: 12px; bottom: 10px; font: 700 1.05rem var(--serif); }
.tile em { font-style: normal; font-weight: 400; opacity: .85; font-size: .85rem; }

.cats { columns: 3 220px; padding: 0; list-style: none; }
.cats li { padding: 4px 0; break-inside: avoid; }
.count { color: var(--muted); font: .9rem var(--sans); }

.crumbs { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.recipe { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 8px 28px 24px; margin-top: 10px; }
.lede { font-size: 1.15rem; color: var(--muted); margin-top: 0; }
.hero { margin: 16px 0 8px; }
.hero img { border-radius: 12px; width: 100%; max-height: 560px; object-fit: cover; }
.cols { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 32px; }
.ing { padding-left: 1.1em; }
.ing li { margin: 4px 0; }
.dir { padding-left: 1.3em; }
.dir li { margin: 0 0 12px; padding-left: 4px; }
.tags span { display: inline-block; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; margin: 2px; font-size: .85rem; color: var(--muted); }
.related { margin-top: 10px; }

.foot { margin-top: 48px; padding: 24px 0 36px; border-top: 1px solid var(--line); background: var(--paper); font-size: .95rem; }
.foot p { margin: 4px 0; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .cols { grid-template-columns: 1fr; gap: 0; }
  .recipe { padding: 4px 16px 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}
@media print {
  .top, .foot, .related, .crumbs, .tags { display: none; }
  .recipe { border: 0; padding: 0; }
  body { background: #fff; }
}
