/* Herbal Home Remedies — shared stylesheet
   One file, all pages. Change here, changes everywhere. */

:root {
  --ink: #1e2328;
  --ink-soft: #3d4650;
  --muted: #6b7480;
  --bg: #fbfaf6;
  --card: #ffffff;
  --accent: #2f6b3f;
  --accent-ink: #24552f;
  --accent-soft: #eef4ee;
  --rule: #e7e4dc;
  --warn-soft: #fdf6e9;
  --warn-line: #c9a227;
  --radius: 10px;
  --max: 46rem;
  --step: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9e7e1;
    --ink-soft: #cfcdc6;
    --muted: #a2a49f;
    --bg: #16181a;
    --card: #1d2023;
    --accent: #7fc08f;
    --accent-ink: #9ed3aa;
    --accent-soft: #223028;
    --rule: #2c3034;
    --warn-soft: #2a2519;
    --warn-line: #b8912a;
  }
}

*, *::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: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.7;
  padding: 0 1.25rem 4rem;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--max); margin: 0 auto; }

/* ---------- header ---------- */
.site-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 0 0.9rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.1rem;
}
.site-head .brand {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.site-head nav { font-size: 0.94rem; }
.site-head nav a { color: var(--muted); text-decoration: none; margin-right: 0.9rem; }
.site-head nav a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- article ---------- */
main { max-width: var(--max); margin: 0 auto; }
h1 {
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.15rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: 1.6rem 0 0.6rem;
}
h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2.6rem 0 0.7rem;
  padding-top: 0.2rem;
}
h3 { font-size: 1.06rem; margin: 1.9rem 0 0.35rem; }
p { margin: 0 0 1.05rem; }
p.lede { font-size: 1.08rem; color: var(--ink-soft); }

a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

ul, ol { padding-left: 1.25rem; margin: 0 0 1.15rem; }
li { margin: 0.4rem 0; }
li::marker { color: var(--accent); }

strong { color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.3rem 0; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td { padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { background: var(--accent-soft); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg) 60%, var(--card)); }

/* ---------- callouts ---------- */
.note {
  background: var(--warn-soft);
  border-left: 4px solid var(--warn-line);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 1.8rem 0;
}
.note a { color: inherit; }

.cta {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 2rem 0 1rem;
}
.cta a { font-weight: 700; }

/* ---------- ad slot: reserved height prevents layout shift ---------- */
.ad-slot {
  min-height: 100px;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ad-slot ins { display: block; width: 100%; }

/* ---------- footer ---------- */
.site-foot {
  max-width: var(--max);
  margin: 3.5rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
}
.site-foot a { color: var(--muted); }

/* ---------- mobile ---------- */
@media (max-width: 620px) {
  body { font-size: 17px; padding: 0 1rem 3rem; }
  h1 { margin-top: 1.2rem; }
  h2 { margin-top: 2.1rem; }
  table { font-size: 0.9rem; }
  th, td { padding: 0.5rem 0.6rem; }
  .site-head { padding-top: 0.9rem; }
  .site-head nav a { margin-right: 0.75rem; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-head nav, .ad-slot, .site-foot { display: none; }
  a { color: #000; text-decoration: none; }
  h2 { page-break-after: avoid; }
  table { font-size: 10pt; }
}

/* ---------- guide list (hub) ---------- */
.guide-list { list-style: none; padding: 0; }
.guide-list li { margin: 0 0 1.1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--rule); }
.guide-list li:last-child { border-bottom: 0; }
.guide-list a { text-decoration: none; font-size: 1.04rem; }
.guide-list a:hover { text-decoration: underline; }
.guide-list .d { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 0.15rem; }

/* ---------- interactive calculators ---------- */
.calc { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin: 1.8rem 0; }
.calc-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.7rem; flex-wrap: wrap; }
.calc-row label { flex: 0 0 9rem; color: var(--ink-soft); font-size: 0.95rem; }
.calc-row input, .calc-row select { font: inherit; font-size: 1rem; padding: 0.4rem 0.55rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg); color: var(--ink); width: 7rem; }
.calc-row select { width: auto; }
.calc-btn { font: inherit; font-size: 1rem; padding: 0.5rem 1.1rem; border: 0; border-radius: 6px; background: var(--accent); color: #fff; cursor: pointer; margin-top: 0.3rem; }
.calc-btn:hover { background: var(--accent-ink); }
.calc-out { margin-top: 1.1rem; }
.calc-out table { margin: 0; }
.calc-out th { width: 40%; }
@media (max-width: 620px) {
  .calc-row label { flex: 0 0 100%; }
  .calc-row input { width: 100%; }
}
