/* ---------------------------------------------------------------
   Site stylesheet. Mobile first.
   Change the color values in :root to restyle the whole site.
   --------------------------------------------------------------- */

:root {
  --bg:        #FAF8F4;
  --surface:   #FFFFFF;
  --ink:       #16150F;
  --ink-soft:  #4A4740;
  --ink-faint: #75726A;
  --line:      #E4DFD5;
  --accent:    #2C5545;
  --accent-lt: #EAF1ED;
  --warm:      #B4501F;
  --warm-lt:   #FBEDE5;
  --gold:      #F0E3C8;
  --radius:    14px;
  --shadow:    0 1px 2px rgba(22,21,15,.06), 0 6px 20px rgba(22,21,15,.05);
  --sans:      ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif:     "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand, .stat b, .result .big {
  font-family: var(--serif);
  font-weight: 700;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--warm); }

/* ---------- layout ---------- */

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */

.site-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-head-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding-top: 12px;
  padding-bottom: 10px;
}
.brand {
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
  white-space: nowrap;
}
.brand span {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: .02em;
  margin-left: 8px;
}

.nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font-family: var(--sans);
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav a:hover { background: var(--accent-lt); color: var(--accent); }
.nav a.on { background: var(--accent); color: #fff; }

/* ---------- hero ---------- */

.hero { padding-top: 40px; padding-bottom: 30px; }
.hero h1 {
  font-size: 2.1rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.hero p { font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 10px; max-width: 34em; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 28px 0 0;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--sans);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.stat span {
  font-family: var(--sans);
  font-size: .72rem;
  line-height: 1.3;
  color: var(--ink-faint);
  display: block;
  margin-top: 3px;
}

/* ---------- section headings ---------- */

.sec { padding-top: 34px; padding-bottom: 10px; }
.sec h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.sec p.lede { color: var(--ink-soft); margin: 0 0 18px; font-size: 1rem; }

/* ---------- cards ---------- */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 8px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(22,21,15,.07), 0 12px 28px rgba(22,21,15,.09); }

.card-img { aspect-ratio: 2 / 1; width: 100%; object-fit: cover; background: var(--gold); }

/* Placeholder tile used until a real photo is dropped in /images */
.card-ph {
  aspect-ratio: 2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: rgba(255,255,255,.55);
}

.card-body { padding: 15px 17px 17px; flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 1.16rem; line-height: 1.25; margin: 0 0 6px; letter-spacing: -0.01em; }
.card p { margin: 0 0 12px; color: var(--ink-soft); font-size: .95rem; flex: 1; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
}
.pill {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 3px 9px;
  border-radius: 999px;
}
.pill-cost { background: var(--accent-lt); border-color: #CFE0D7; color: var(--accent); }
.pill-warm { background: var(--warm-lt); border-color: #F2DACB; color: var(--warm); }

/* ---------- filters ---------- */

.filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 16px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filters button {
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
}
.filters button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- article / recipe ---------- */

.article { padding-top: 28px; padding-bottom: 10px; }
.eyebrow {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--warm);
  margin: 0 0 10px;
}
.article h1 { font-size: 2rem; line-height: 1.14; letter-spacing: -0.025em; margin: 0 0 12px; }
.article .intro { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 22px; }

.hero-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); margin-bottom: 22px; }
.hero-ph { aspect-ratio: 16/9; border-radius: var(--radius); margin-bottom: 22px; display:flex; align-items:center; justify-content:center; font-family: var(--sans); font-size:3.2rem; font-weight:800; color:rgba(255,255,255,.5); }

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 26px;
}
.fact { background: var(--surface); padding: 13px 14px; }
.fact span {
  display: block;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 3px;
}
.fact b {
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.fact.hi { background: var(--accent-lt); }
.fact.hi b { color: var(--accent); }

.savings {
  background: var(--warm-lt);
  border: 1px solid #F2DACB;
  border-radius: var(--radius);
  padding: 15px 17px;
  margin-bottom: 26px;
  font-size: .97rem;
}
.savings b { color: var(--warm); }

.block { margin-bottom: 30px; }
.block h2 {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--warm);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
  margin: 0 0 16px;
}
.block h3 {
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--ink);
}

ul.ing { list-style: none; padding: 0; margin: 0; }
ul.ing li {
  padding: 9px 0 9px 30px;
  border-bottom: 1px solid var(--line);
  position: relative;
  cursor: pointer;
  font-size: 1rem;
}
ul.ing li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 15px;
  height: 15px;
  border: 2px solid var(--line);
  border-radius: 4px;
}
ul.ing li.done { color: var(--ink-faint); text-decoration: line-through; }
ul.ing li.done::before { background: var(--accent); border-color: var(--accent); }

ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
ol.steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 22px 44px;
  font-size: 1.02rem;
}
ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 1px;
  width: 30px;
  height: 30px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 700;
}

.swap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--warm);
  border-radius: 10px;
  padding: 13px 15px;
  margin-bottom: 11px;
  font-size: .97rem;
}
.swap b { display: block; font-family: var(--sans); font-size: .82rem; color: var(--warm); margin-bottom: 4px; }

.note {
  background: var(--accent-lt);
  border-radius: var(--radius);
  padding: 15px 17px;
  font-size: .97rem;
}

ul.plain { padding-left: 20px; margin: 0; }
ul.plain li { margin-bottom: 8px; }

/* prose (guides) */
.prose h2 { font-size: 1.3rem; letter-spacing: -0.015em; margin: 32px 0 10px; }
.prose h3 { font-size: 1.08rem; margin: 24px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose strong { font-weight: 700; }

/* ---------- calculator ---------- */

.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--sans);
  font-size: .86rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.field small { display:block; font-family: var(--sans); font-size:.78rem; color: var(--ink-faint); font-weight:400; margin-top:2px;}
.field input[type=range] { width: 100%; accent-color: var(--accent); }
.field .val {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
}
.result { background: var(--accent); color: #fff; border-radius: var(--radius); padding: 22px; text-align: center; margin-top: 22px; }
.result .big { font-family: var(--sans); font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.result .sub { font-size: .95rem; opacity: .9; margin-top: 6px; }
.bars { margin-top: 20px; }
.bar-row { margin-bottom: 14px; }
.bar-row .lbl { font-family: var(--sans); font-size:.82rem; font-weight:600; display:flex; justify-content:space-between; margin-bottom:5px;}
.bar { height: 22px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; }

/* ---------- footer ---------- */

.site-foot {
  margin-top: 50px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 30px 0;
  font-size: .9rem;
  color: var(--ink-faint);
}
.site-foot a { color: var(--ink-soft); }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; font-family: var(--sans); font-size:.86rem; font-weight:600; }

.back {
  display: inline-block;
  font-family: var(--sans);
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-faint);
  text-decoration: none;
  margin: 20px 0 0;
}

/* ---------- wider screens ---------- */

@media (min-width: 620px) {
  .card-img, .card-ph { aspect-ratio: 16 / 10; }
  .site-head-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .hero h1 { font-size: 2.7rem; }
  .article h1 { font-size: 2.5rem; }
  .facts { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media print {
  .site-head, .site-foot, .filters, .back { display: none; }
  body { font-size: 12pt; background: #fff; }
}
