/* Pgrancer — palette and feel from Design/6a-gold-hero-winner.png */
:root {
  --bg: #f1eee8;
  --panel: #f7f5f0;
  --card: #fdfcfa;
  --ink: #1c1b1f;
  --ink-2: #4a4750;
  --muted: #74707a;
  --line: #d9d4ca;
  --gold: #e9ab27;
  --gold-ink: #3a2706;
  --teal: #22a094;
  --mauve: #9a76a0;
  --sage: #8dc4ac;
  --radius: 18px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.125rem/1.6 var(--sans);
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Top stripe: one segment per category, sized by its recipe count */
.stripe { display: flex; height: 12px; }
.stripe span { display: block; flex-grow: 0; flex-shrink: 1; }

/* Header */
.site-head { padding-top: 18px; }
.head-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.brand { text-decoration: none; font: italic 900 2rem/1 var(--serif); letter-spacing: -0.01em; display: flex; flex-direction: column; }
.brand-sub { font: 400 0.72rem/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.head-search { flex: 1 1 260px; max-width: 420px; }
input[type=search] {
  width: 100%; font: 400 1.05rem/1.2 var(--sans); color: var(--ink);
  padding: 13px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
input[type=search]:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

.chips { display: flex; gap: 10px; overflow-x: auto; padding-top: 18px; padding-bottom: 18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; text-decoration: none; font: 500 1rem/1 var(--sans); color: var(--ink-2);
  padding: 11px 18px; border: 1px solid #c9c3b8; border-radius: 999px; background: transparent;
}
.chip:hover { background: var(--card); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }

main { padding-bottom: 48px; }

/* Home: gold hero + cards */
.hero-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 8px; }
.hero {
  display: flex; flex-direction: column; gap: 14px; text-decoration: none;
  background: var(--gold); color: var(--gold-ink); border-radius: var(--radius); padding: 26px 26px 22px;
}
.hero .eyebrow { color: rgba(58, 39, 6, .72); }
.hero-title { font: italic 900 clamp(2.1rem, 7vw, 2.8rem)/1.04 var(--serif); letter-spacing: -0.01em; color: #2b1d03; }
.hero-text { font-size: 1.05rem; line-height: 1.6; }
.hero-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font: 400 .85rem/1.4 var(--mono); margin-top: auto; padding-top: 6px; }
.hero:hover .hero-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

.eyebrow { font: 400 .74rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--c, var(--teal)); margin: 0; }
.eyebrow a { text-decoration: none; }
.card {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--c, var(--teal));
  border-radius: var(--radius); padding: 18px 20px 20px;
}
.card:hover { border-color: var(--c); }
.card-title { font: 700 1.2rem/1.3 var(--sans); }
.card-meta { color: var(--muted); font-size: .92rem; }

.section-h { font: italic 800 1.6rem/1.2 var(--serif); margin: 44px 0 16px; }
.page-h { font: italic 900 clamp(2rem, 7vw, 2.8rem)/1.1 var(--serif); margin: 12px 0 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.page-h .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); flex: none; }
.count { font: 500 .9rem/1 var(--mono); color: var(--muted); font-style: normal; letter-spacing: .05em; }
.lede { color: var(--ink-2); max-width: 46em; }

.cat-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.cat {
  display: flex; flex-direction: column; gap: 6px; height: 100%; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--c);
  border-radius: 14px; padding: 16px 16px 18px;
}
.cat:hover { border-color: var(--c); }
.cat-name { font: 700 1.1rem/1.25 var(--sans); }
.cat-count { font: 400 .8rem/1 var(--mono); color: var(--muted); }

/* Lists */
.rows { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rows li + li { border-top: 1px solid #ebe7df; }
.rows a { display: flex; flex-direction: column; gap: 2px; padding: 15px 20px; text-decoration: none; }
.rows a:hover { background: #f6f3ec; }
.row-title { font-weight: 500; font-size: 1.12rem; }
.row-meta { color: var(--muted); font-size: .9rem; }
.row-meta:empty { display: none; }

.people { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.people a { text-decoration: none; }
.people li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 500; }
.person { scroll-margin-top: 16px; }
.person h2 { font: 700 1.3rem/1.3 var(--sans); margin: 28px 0 10px; }

/* Recipe page — kitchen-readable */
.recipe { max-width: 760px; margin: 0 auto; }
.recipe-head { border-top: 6px solid var(--c, var(--teal)); background: var(--card); border-radius: var(--radius); padding: 22px 22px 18px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.recipe-title { font: italic 900 clamp(2.1rem, 8vw, 3.1rem)/1.06 var(--serif); margin: 10px 0 16px; letter-spacing: -0.01em; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; }
.facts dt { font: 400 .72rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.facts a { text-decoration-color: var(--c); text-underline-offset: 3px; }
.tools { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn { font: 500 1rem/1 var(--sans); padding: 12px 18px; border-radius: 999px; border: 1px solid #c9c3b8; background: transparent; color: var(--ink); cursor: pointer; }
.btn[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.photo { margin: 32px 0 0; }
.photo figcaption { font: 400 .78rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.photo img { border-radius: var(--radius); width: 100%; max-height: 70vh; object-fit: contain; background: #e7e2d8; }
.recipe-body { font-size: 1.25rem; line-height: 1.65; }
.recipe-body .intro { margin-top: 22px; color: var(--ink-2); }
.sec { margin-top: 30px; }
.sec h2 { font: italic 800 1.7rem/1.2 var(--serif); margin: 0 0 12px; }
.sec h3 { font: 700 1.1rem/1.3 var(--sans); margin: 22px 0 8px; color: var(--ink-2); }
.sec-ingredients ul { list-style: none; padding: 0; margin: 0; }
.sec-ingredients li { padding: 10px 0 10px 30px; border-bottom: 1px dashed var(--line); position: relative; }
.sec-ingredients li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--teal)); }
.sec-steps ol { padding-left: 0; margin: 0; list-style: none; counter-reset: step; }
.sec-steps ol > li { counter-increment: step; position: relative; padding: 4px 0 18px 54px; }
.sec-steps ol > li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 1.05rem/38px var(--sans); text-align: center; }
.sec-notes { background: #f7f2e3; border-radius: 14px; padding: 18px 20px; font-size: 1.1rem; }
.sec-notes h2 { font-size: 1.35rem; }
.sec-notes ul { padding-left: 1.2em; margin: 0; }
.recipe-body p { margin: 0 0 12px; }
.see-also { margin-top: 28px; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag { text-decoration: none; font: 400 .85rem/1 var(--mono); padding: 8px 12px; border-radius: 999px; background: #e8e3d9; color: var(--ink-2); }

.big-search input { font-size: 1.25rem; padding: 16px 22px; }
.site-foot { color: var(--muted); font-size: .95rem; padding-bottom: 40px; }

@media (min-width: 720px) {
  .hero-grid { grid-template-columns: 1.1fr 1fr 1fr; grid-template-rows: auto auto; }
  .hero { grid-row: span 2; padding: 30px 30px 26px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .rows a { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 20px; }
  .row-meta { text-align: right; flex: 0 1 45%; }
  .recipe-head { padding: 30px 32px 24px; }
}

@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .stripe, .site-head, .site-foot, .no-print, .tools, .tags, .see-also { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .recipe-head { border: 0; padding: 0; background: none; }
  .recipe-title { font-size: 24pt; margin: 4pt 0 8pt; }
  .facts { grid-template-columns: repeat(3, auto); }
  .photo img { max-height: 55mm; width: auto; object-fit: contain; background: none; }
  .recipe-body { font-size: 12pt; line-height: 1.45; }
  .sec { margin-top: 12pt; break-inside: auto; }
  .sec h2 { font-size: 15pt; }
  .sec-ingredients li { padding: 2pt 0 2pt 14pt; border: 0; break-inside: avoid; }
  .sec-ingredients li::before { width: 5pt; height: 5pt; top: 7pt; background: #000; }
  .sec-steps ol > li { padding: 0 0 6pt 22pt; break-inside: avoid; }
  .sec-steps ol > li::before { width: auto; height: auto; background: none; color: #000; font: 700 12pt/1.45 var(--sans); content: counter(step) "."; }
  .sec-notes { background: none; padding: 0; }
  a { text-decoration: none; }
}
