/* ==========================================================================
   BrewRatio — warm specialty-coffee editorial theme
   ========================================================================== */
:root {
  --bg: #FAF7F2;
  --paper: #FFFDF9;
  --ink: #1E1B18;
  --ink-soft: #4A433C;
  --muted: #6E655C;
  --line: #E6DFD5;
  --line-strong: #D6CCBE;
  --accent: #C86D51;
  --accent-strong: #A34A2F;   /* AA contrast for text & buttons */
  --accent-wash: #F6E7E0;
  --ok: #4F6B3A;
  --warn-wash: #FBF0DC;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(30, 27, 24, .05), 0 8px 24px -12px rgba(30, 27, 24, .18);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --wrap: 1160px;
  --touch: 52px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 1.6em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: .35em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: 72ch; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: rgba(250, 247, 242, .94); position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.2) blur(8px); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: .55rem; font: 700 1.2rem/1 var(--serif); color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo svg { width: 30px; height: 30px; color: var(--accent); }
.site-nav { margin-left: auto; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a { display: block; padding: .55rem .8rem; border-radius: 999px; color: var(--ink-soft); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--accent-wash); color: var(--accent-strong); }
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 0; padding-top: .5rem; }
  .site-nav { margin-left: -.8rem; width: calc(100% + 1.6rem); }
  .site-nav a { padding: .6rem .8rem; }
}

/* ---------- Page scaffolding ---------- */
main { display: block; padding-bottom: 3rem; }
.hero { padding: 2.25rem 0 1.25rem; }
.eyebrow { display: inline-block; font: 600 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: .9rem; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 68ch; }
.breadcrumb { font-size: .875rem; color: var(--muted); padding-top: 1.25rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .35rem; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); }
.section { padding: 1rem 0; }
.cols-2 { display: grid; gap: 1.25rem; }
@media (min-width: 800px) { .cols-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.15rem; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .98rem/1.1 var(--sans); cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: #8a3c25; color: #fff; }
.btn-outline { background: transparent; color: var(--accent-strong); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--accent-strong); color: var(--accent-strong); background: var(--accent-wash); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-lg { min-height: 56px; padding: .9rem 1.6rem; font-size: 1.08rem; }
.btn-sm { min-height: 36px; padding: .4rem .8rem; font-size: .88rem; }

/* ==========================================================================
   Calculator
   ========================================================================== */
.calc { margin: .5rem 0 2rem; }
.calc-grid { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 960px) {
  .calc-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 1.75rem; }
  .recipe-card { position: sticky; top: 84px; }
}
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.calc-inputs { padding: 1.25rem; }
@media (min-width: 600px) { .calc-inputs { padding: 1.6rem; } }
.calc fieldset { border: 0; padding: 0; margin: 0 0 1.35rem; min-width: 0; }
.calc legend, .field-label {
  display: flex; justify-content: space-between; align-items: baseline; width: 100%;
  font: 600 .8rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; padding: 0;
}
.field { margin-bottom: 1.35rem; }
.field-label output, .field-label .val { font: 700 1.15rem/1 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); }
.hint { font-size: .85rem; color: var(--muted); margin: .45rem 0 0; }

/* Method chips & segmented controls (radio inputs) */
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 520px) { .chips { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.chip, .seg label { position: relative; }
.chip input, .seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: var(--touch);
  padding: .5rem .6rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
  font-weight: 600; font-size: .93rem; line-height: 1.2; color: var(--ink-soft); transition: all .15s;
}
.chip input:hover + span { border-color: var(--line-strong); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 4px; gap: 4px; background: var(--bg); }
.seg label span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 46px; padding: .35rem .4rem;
  border-radius: 6px; font-weight: 600; font-size: .92rem; line-height: 1.15; text-align: center; color: var(--ink-soft); transition: all .15s;
}
.seg label small { font-weight: 400; font-size: .74rem; color: var(--muted); margin-top: 2px; }
.seg input:checked + span { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(30, 27, 24, .15); }
.seg input:checked + span small { color: var(--accent-strong); }

/* Dose / water steppers */
.pair { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.35rem; }
@media (min-width: 520px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair .field { margin: 0; }
.stepper { display: grid; grid-template-columns: var(--touch) 1fr var(--touch); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.stepper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.stepper button {
  border: 0; background: var(--bg); color: var(--ink); font: 500 1.6rem/1 var(--sans); cursor: pointer; min-height: 60px;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.stepper button:hover { background: var(--accent-wash); color: var(--accent-strong); }
.stepper button:active { background: var(--accent); color: #fff; }
.stepper input {
  width: 100%; min-width: 0; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  text-align: center; font: 700 1.6rem/1 var(--serif); color: var(--ink); background: #fff; padding: 0 .25rem; -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }
.lock-tag { font: 600 .68rem/1 var(--sans); letter-spacing: .06em; color: var(--accent-strong); background: var(--accent-wash); border-radius: 999px; padding: .25rem .5rem; text-transform: uppercase; }

/* Range sliders — large thumbs for wet hands */
input[type="range"] {
  --fill: 50%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 40px; background: transparent; cursor: pointer; margin: 0; touch-action: pan-y;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 10px; border-radius: 999px;
  background: linear-gradient(to right, var(--accent) 0, var(--accent) var(--fill), var(--line) var(--fill), var(--line) 100%);
}
input[type="range"]::-moz-range-track { height: 10px; border-radius: 999px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 10px; border-radius: 999px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; margin-top: -12px;
  background: #fff; border: 3px solid var(--accent-strong); box-shadow: 0 2px 6px rgba(30, 27, 24, .25);
}
input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--accent-strong); box-shadow: 0 2px 6px rgba(30, 27, 24, .25); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px var(--accent-wash), 0 2px 6px rgba(30, 27, 24, .25); }
.range-ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: .15rem; }

select {
  width: 100%; min-height: var(--touch); padding: .6rem 2.6rem .6rem .9rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  font: 500 1rem/1.2 var(--sans); color: var(--ink); -webkit-appearance: none; appearance: none; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23A34A2F' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 1rem center;
}
select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }

.recipe-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; background: var(--accent-wash); border-radius: var(--radius-sm); padding: .7rem 1rem; margin-bottom: 1.35rem; font-size: .95rem; }
.recipe-banner strong { color: var(--accent-strong); }
.recipe-banner .btn { margin-left: auto; }

/* ---------- Live recipe card ---------- */
.recipe-card { padding: 1.25rem; background: var(--ink); color: #F3EDE4; border-color: var(--ink); }
@media (min-width: 600px) { .recipe-card { padding: 1.6rem; } }
.recipe-card h2 { color: #fff; font-size: 1.35rem; margin: 0 0 .2rem; }
.recipe-card .sub { color: #BFB4A6; font-size: .9rem; margin: 0 0 1.1rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .1rem 1rem; margin: 0 0 1rem; }
.stat { padding: .65rem 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.stat dt { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: #BFB4A6; }
.stat dd { margin: .15rem 0 0; font: 700 1.35rem/1.15 var(--serif); color: #fff; }
.stat.wide { grid-column: 1 / -1; }
.stat .em { color: #F2B49F; }
.grind-box { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius-sm); padding: 1rem; margin: .25rem 0 1rem; }
.grind-box .label { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: #BFB4A6; }
.grind-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .6rem; margin: .2rem 0; }
.grind-main strong { font: 700 2.1rem/1.05 var(--serif); color: #F2B49F; }
.grind-main span { color: #E6DCCF; font-size: .92rem; }
.grind-meta { font-size: .9rem; color: #D9CEC0; margin: 0; }
.grind-meta b { color: #fff; font-weight: 600; }
.caffeine { display: flex; justify-content: space-between; gap: 1rem; align-items: center; background: rgba(255, 255, 255, .06); border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: 1rem; }
.caffeine strong { font: 700 1.35rem/1 var(--serif); color: #fff; display: block; }
.caffeine .small { color: #BFB4A6; }
.caffeine.is-high { box-shadow: inset 3px 0 0 #F2B49F; }
.advice { list-style: none; padding: 0; margin: 0 0 1.1rem; font-size: .92rem; color: #E6DCCF; }
.advice li { position: relative; padding-left: 1.2rem; margin-bottom: .55rem; line-height: 1.5; }
.advice li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.card-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.recipe-card .btn-primary { background: var(--accent); color: #1E1B18; }
.recipe-card .btn-primary:hover { background: #E08467; }
.recipe-card .btn-ghost { color: #F3EDE4; border-color: rgba(255, 255, 255, .25); }
.recipe-card .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.share-status { display: block; min-height: 1.4em; font-size: .85rem; color: #F2B49F; margin-top: .5rem; }

/* ---------- Brew timer ---------- */
.timer { margin-top: 1.5rem; padding: 1.25rem; transition: box-shadow .3s; }
@media (min-width: 600px) { .timer { padding: 1.6rem; } }
.timer-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.timer-head h2 { margin: 0; font-size: 1.4rem; }
.timer-layout { display: grid; gap: 1.25rem; }
@media (min-width: 860px) { .timer-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.timer-display { text-align: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1rem; }
.timer-clock { font: 700 clamp(3.2rem, 12vw, 4.75rem)/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
.timer-phase { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; align-items: baseline; margin-top: .6rem; font: 700 1.25rem/1.2 var(--serif); }
.timer-phase [data-t="left"] { font: 500 .95rem/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.timer-target { font: 700 1.1rem/1.3 var(--sans); color: var(--accent-strong); min-height: 1.4em; margin-top: .3rem; }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: .9rem 0; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.timer-instruction { color: var(--ink-soft); min-height: 3.2em; margin: 0; }
.timer-controls { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1rem; }
.timer-controls [data-act="toggle"] { min-width: 10rem; }
.timer-controls [data-act="toggle"].is-running { background: var(--ink); }
.timer.flash { animation: flash 0.7s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(200, 109, 81, .7), var(--shadow); } 100% { box-shadow: 0 0 0 18px rgba(200, 109, 81, 0), var(--shadow); } }
@media (prefers-reduced-motion: reduce) { .timer.flash { animation: none; outline: 3px solid var(--accent); } .progress span { transition: none; } }
.phases { list-style: none; padding: 0; margin: 0; counter-reset: ph; }
.phase { position: relative; counter-increment: ph; padding: .75rem .9rem .75rem 3rem; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .5rem; background: var(--paper); transition: background .2s, border-color .2s; }
.phase::before { content: counter(ph); position: absolute; left: .85rem; top: .8rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line-strong); font: 700 .82rem/1 var(--sans); color: var(--muted); }
.phase-head { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.phase-name { font-weight: 700; }
.phase-time { font: 500 .85rem/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.phase-target { font-size: .85rem; font-weight: 600; color: var(--accent-strong); margin-top: .15rem; }
.phase-text { margin: .25rem 0 0; font-size: .92rem; color: var(--ink-soft); }
.phase.is-active { border-color: var(--accent); background: var(--accent-wash); }
.phase.is-active::before { background: var(--accent-strong); color: #fff; border-color: var(--accent-strong); }
.phase.is-done { opacity: .6; }
.phase.is-done::before { content: "✓"; background: var(--ok); color: #fff; border-color: var(--ok); }

/* ---------- Gear cards ---------- */
.gear-wrap { margin-top: 1.75rem; }
.gear-wrap h2 { font-size: 1.35rem; margin: 0 0 .25rem; }
.gear-note { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.gear-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .gear-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gear-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; min-height: 210px; }
.gear-cat { align-self: flex-start; font: 600 .7rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-strong); background: var(--accent-wash); padding: .35rem .55rem; border-radius: 999px; }
.gear-name { font-size: 1.08rem; margin: .7rem 0 .35rem; }
.gear-blurb { font-size: .9rem; color: var(--ink-soft); flex: 1; margin-bottom: .9rem; }
.gear-btn { align-self: flex-start; }
.region-badge { font: 700 .66rem/1 var(--sans); letter-spacing: .06em; padding: .22rem .38rem; border-radius: 4px; background: var(--line); color: var(--ink-soft); }

/* ---------- Ad slots (CLS-safe: fixed min-height) ---------- */
.ad-slot { display: block; margin: 2rem auto; max-width: 970px; min-height: 280px; text-align: center; overflow: hidden; contain: layout; }
.ad-slot .ad-label { display: block; font: 600 .66rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.ad-slot ins { display: block; min-height: 250px; }
.ad-slot--placeholder .ad-box { min-height: 250px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); font-size: .85rem; background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(230, 223, 213, .35) 10px, rgba(230, 223, 213, .35) 20px); }
@media (min-width: 768px) { .ad-slot { min-height: 120px; } .ad-slot ins, .ad-slot--placeholder .ad-box { min-height: 90px; } .ad-slot--rect { min-height: 280px; } .ad-slot--rect ins, .ad-slot--rect .ad-box { min-height: 250px; } }

/* ---------- Content components ---------- */
.card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 1rem 0 0; padding: 0; list-style: none; }
.card-grid li { margin: 0; }
.link-card { display: flex; flex-direction: column; height: 100%; padding: 1.1rem 1.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.link-card:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }
.link-card .k { font: 600 .72rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: .5rem; }
.link-card strong { font: 600 1.15rem/1.25 var(--serif); margin-bottom: .35rem; }
.link-card span:last-child { font-size: .9rem; color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin: 1rem 0 1.5rem; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
caption { text-align: left; padding: .9rem 1rem .3rem; font-size: .85rem; color: var(--muted); }
th, td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font: 600 .74rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--bg); position: sticky; top: 0; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:hover { background: #FCF8F2; }
td.num, th.num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag { display: inline-block; font-size: .78rem; padding: .1rem .45rem; margin: .1rem .2rem .1rem 0; border-radius: 999px; background: var(--accent-wash); color: var(--accent-strong); white-space: nowrap; }

.steps { counter-reset: st; list-style: none; padding: 0; margin: 1rem 0; }
.steps > li { counter-increment: st; position: relative; padding: 0 0 1.25rem 3.25rem; margin: 0; }
.steps > li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 700 1rem/1 var(--serif); }
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 1.1rem; top: 2.4rem; bottom: .2rem; width: 1px; background: var(--line-strong); }
.steps h3 { margin: .2rem 0 .3rem; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--ink-soft); }

.trouble { border-radius: var(--radius); padding: 1.2rem 1.3rem; border: 1px solid var(--line); background: var(--paper); }
.trouble h3 { display: flex; align-items: center; gap: .5rem; }
.trouble--sour { border-top: 4px solid #D9A93F; }
.trouble--bitter { border-top: 4px solid #6B4A35; }
.trouble ul { margin: 0; padding-left: 1.1rem; }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin: 1rem 0 1.5rem; padding: 0; }
.quick div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; }
.quick dt { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.quick dd { margin: .2rem 0 0; font: 700 1.1rem/1.25 var(--serif); }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: .25rem 0; }
.faq summary { cursor: pointer; list-style: none; padding: .9rem 2rem .9rem 0; position: relative; font: 600 1.08rem/1.35 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .7rem; font: 400 1.5rem/1 var(--sans); color: var(--accent-strong); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1rem; color: var(--ink-soft); max-width: 72ch; }

.callout { background: var(--warn-wash); border-left: 4px solid #D9A93F; padding: 1rem 1.2rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.5rem 0; font-size: .95rem; }
.credit { font-size: .88rem; color: var(--muted); font-style: italic; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #F3EEE6; padding: 2.5rem 0 2rem; font-size: .92rem; color: var(--ink-soft); }
.footer-cols { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1.75rem; }
.footer-cols h2 { font: 600 .78rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: .45rem; }
.footer-cols a { color: var(--ink-soft); text-decoration: none; }
.footer-cols a:hover { color: var(--accent-strong); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.disclosure { font-size: .82rem; color: var(--muted); max-width: 70ch; margin: 0 0 1.25rem; }
.region-toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--muted); }
.region-toggle button { font: 600 .78rem/1 var(--sans); padding: .45rem .7rem; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-soft); cursor: pointer; min-height: 32px; }
.region-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 4rem 0 2rem; }
.notfound .big { font: 700 clamp(4rem, 16vw, 8rem)/1 var(--serif); color: var(--accent); }

@media print {
  .site-header, .site-footer, .ad-slot, .gear-wrap, .timer-controls, .card-actions { display: none !important; }
  body { background: #fff; }
  .recipe-card { background: #fff; color: #000; border: 1px solid #000; }
}
