:root {
  --paper: #faf6f0;
  --card: #fffdf8;
  --ink: #221c17;
  --muted: #7a7167;
  --line: #e4dcd0;
  --line-faint: #eee7db;
  --blue: #4a5c6b;
  --blue-soft: #dae0e4;
  --sand: #f1ece2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
button, select { font: inherit; }
.site-header { max-width: 980px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 28px 0; display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; }
.brand-name { font: italic 400 .94rem Georgia, serif; letter-spacing: .02em; color: var(--muted); }
.header-controls { display: grid; grid-template-columns: auto minmax(190px, auto); align-items: center; justify-items: end; gap: 4px 10px; }
.header-controls label { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.header-controls select { min-width: 220px; padding: 8px 34px 8px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--card); cursor: pointer; }
.day, .section-label { margin: 0; color: var(--blue); letter-spacing: .14em; font-size: .73rem; font-weight: 800; }
.header-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.4; text-align: right; }
.tabs { display: flex; gap: 6px; max-width: 980px; margin: 0 auto; padding: 14px 24px 16px; overflow-x: auto; border: 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; color: var(--ink); background: transparent; border-radius: 2px; flex: 0 0 auto; min-width: 116px; text-align: left; padding: 10px 18px; font-weight: 600; font-size: .81rem; cursor: pointer; transition: background .15s, color .15s; }
.tab span { display: block; margin-bottom: 3px; color: var(--muted); font-size: .62rem; letter-spacing: .12em; }
.tab.is-active { border-color: var(--ink); color: white; background: var(--ink); }
.tab.is-active span { color: #dcd6ce; }
.tab:not(.is-active):hover { background: var(--line-faint); }
.tab-grocery { min-width: 108px; }
.content { max-width: 980px; min-height: 670px; margin: 0 auto; padding: 8px 32px 56px; }
.recipe-heading { border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 24px; }
.recipe-heading h2 { max-width: 700px; margin: 8px 0 7px; font: 700 clamp(2rem, 5vw, 2.5rem)/1.12 Georgia, serif; letter-spacing: 0; }
.subtitle { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.5; }
.quick-facts { margin: 0; display: flex; flex: 0 0 auto; flex-direction: column; align-items: end; text-align: right; }
.quick-facts div { min-width: 77px; }
.quick-facts dt, .grocery-count span { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.quick-facts dd { margin: 4px 0 0; color: var(--blue); font: 700 1.625rem Georgia, serif; }
.portions-note { margin: 8px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; white-space: nowrap; }
.portions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 26px 0 34px; }
.ratio-block { margin: -15px 0 30px; padding: 12px 16px; border-left: 3px solid var(--blue); background: #eef1f2; color: var(--blue); }
.ratio-block p { margin: 0 0 4px; font-size: .68rem; letter-spacing: .1em; font-weight: 800; text-transform: uppercase; }
.ratio-block strong { font: 700 .94rem/1.5 Georgia, serif; }
.portion-card { padding: 14px 18px; border-left: 3px solid var(--blue); background: var(--sand); border-radius: 2px; }
.portion-card.eric { border-left-color: var(--muted); background: #f5f0e6; }
.portion-card h3 { margin: 0 0 5px; font: 700 1.04rem Georgia, serif; }
.portion-card p { margin: 0; font-size: .9rem; line-height: 1.52; }
.recipe-grid { display: grid; grid-template-columns: minmax(260px, .95fr) minmax(340px, 1.3fr); gap: 58px; }
.section-label { margin-bottom: 11px; }
.ingredient-group { margin-bottom: 24px; }
.ingredient-group h3 { margin: 0 0 7px; color: var(--blue); font-size: .83rem; letter-spacing: .06em; text-transform: uppercase; }
.ingredient-group ul { list-style: none; padding: 0; margin: 0; }
.ingredient-group li { padding: 5px 0; border-bottom: 1px solid var(--line-faint); font-size: .906rem; line-height: 1.65; }
.method ol { list-style: none; padding: 0; margin: 0; counter-reset: steps; }
.method li { counter-increment: steps; position: relative; min-height: 36px; padding: 2px 0 20px 46px; font-size: .938rem; line-height: 1.62; }
.method li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; top: -2px; color: rgba(74, 92, 107, .35); font: 700 1.375rem Georgia, serif; }
.aftercare { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; margin-top: 17px; }
.note { padding: 16px 18px; background: var(--sand); border-radius: 2px; }
.note.storage { background: transparent; padding: 16px 0; }
.note h3 { margin: 0 0 6px; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.note p { margin: 0; font-size: .86rem; line-height: 1.48; }
.macros { margin-top: 34px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.macros summary { cursor: pointer; display: flex; justify-content: space-between; padding: 14px 0; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.macros summary span { font-weight: 500; letter-spacing: 0; text-transform: none; }
.macro-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 0 18px; gap: 10px; }
.macro-content p { margin: 0; font-size: .9rem; line-height: 1.5; }
.macro-content strong { font-family: Georgia, serif; }
.macrofactor { margin-top: 26px; }
.macrofactor code { display: block; color: var(--muted); font: .77rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: normal; }
.grocery-count { min-width: 120px; text-align: right; }
.grocery-count strong { display: block; margin-top: 4px; color: var(--blue); font: 700 1.8rem Georgia, serif; }
.grocery-count button { margin-top: 5px; padding: 0; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .75rem; }
.grocery-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; margin-top: 30px; }
.grocery-section { break-inside: avoid; }
.grocery-section h3 { color: var(--blue); margin: 0 0 8px; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.reminder-section { grid-column: 1 / -1; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.grocery-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 9px 4px; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line-faint); cursor: pointer; color: var(--ink); }
.check { display: grid; flex: 0 0 19px; width: 19px; height: 19px; margin-top: 1px; border: 1.5px solid #a9b3aa; border-radius: 4px; place-items: center; color: white; font-size: .75rem; }
.grocery-item.checked { color: var(--muted); text-decoration: line-through; }
.grocery-item.checked .check { border-color: var(--blue); background: var(--blue); }
.grocery-item-copy { display: block; min-width: 0; }
.grocery-item-label { display: block; font-size: .91rem; line-height: 1.38; }
.grocery-item-note { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; line-height: 1.42; text-decoration: none; }
.grocery-item.checked .grocery-item-note { color: inherit; }
footer { padding: 19px 24px calc(19px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .72rem; }
@media (min-width: 691px) and (hover: hover) and (pointer: fine) {
  .tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(88px, .75fr); overflow: visible; }
  .tab { min-width: 0; padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 690px) {
  .site-header { padding-left: 20px; padding-right: 20px; }
  .header-controls { grid-template-columns: 1fr; justify-items: end; }
  .header-controls label, .header-note { display: none; }
  .header-controls select { min-width: 190px; max-width: 68vw; }
  .tabs { padding-left: 16px; padding-right: 16px; }
  .content { padding: 24px 20px 42px; }
  .recipe-heading { display: block; }
  .quick-facts { margin-top: 19px; align-items: start; text-align: left; }
  .quick-facts div { min-width: 100px; }
  .portions, .recipe-grid, .aftercare, .grocery-sections { grid-template-columns: 1fr; }
  .recipe-grid { gap: 22px; }
  .grocery-count { margin-top: 20px; text-align: left; }
}
