/* Shared styles for the guide pages (compost-insert-for-trash-can.html,
   rev-a-shelf-compost-insert.html, sb-1383-kitchen-composting.html,
   countertop-compost-bin-alternative.html). Header and palette match
   press.html; keep them in step. */
:root {
  --bg:        #FAF8F3;
  --bg-2:      #F2EEE4;
  --ink:       #1F2420;
  --ink-2:     #3B4038;
  --muted:     #6A6F66;
  --sage:      #6B7F5E;
  --sage-dk:   #566849;
  --stone:     #E8E3D8;
  --border:    #E1DBCB;
  --ease:      cubic-bezier(.4,.0,.2,1);
  --shadow-sm: 0 1px 2px rgba(31,36,32,.05), 0 2px 6px rgba(31,36,32,.04);
  --maxw:      760px;
  --pad:       clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }

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

/* ---------- Site header (same as press.html) ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 243, 0.82);
  backdrop-filter: saturate(1.1) blur(14px);
  -webkit-backdrop-filter: saturate(1.1) blur(14px);
  border-bottom: 1px solid var(--border);
}
header .wrap { max-width: 1240px; }
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 44px; width: auto; display: block; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  padding: 8px 12px; color: var(--ink-2); font-size: 15px; border-radius: 6px;
  text-decoration: none; transition: background .2s var(--ease);
}
.nav-links a:hover { background: var(--stone); color: var(--ink-2); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--stone); }
@media (max-width: 820px) { .nav-links a:not(.nav-cta) { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 500; letter-spacing: -0.01em;
  white-space: nowrap; text-decoration: none;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.btn-sage, .nav-links a.btn-sage { background: var(--sage-dk); color: var(--bg); box-shadow: var(--shadow-sm); padding: 10px 18px; font-size: 14.5px; }
.btn-sage:hover, .nav-links a.btn-sage:hover { background: var(--ink); color: var(--bg); transform: translateY(-1px); }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn .arrow { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
[id] { scroll-margin-top: 96px; }

/* ---------- Article ---------- */
main { padding: clamp(28px, 4vw, 48px) 0 clamp(60px, 8vw, 100px); }

.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 24px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { margin: 0; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border); }
.crumbs a { color: var(--muted); }

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(30px, 4.6vw, 44px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.12;
  margin: 0 0 14px; color: var(--ink);
}
.dek { font-size: clamp(18px, 2vw, 20px); color: var(--ink-2); margin: 0 0 14px; }
.updated { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted); margin-bottom: 32px; display: block; }

h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 2.6vw, 27px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25;
  margin: 48px 0 14px; color: var(--ink);
}
h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px; font-weight: 600; letter-spacing: -0.015em;
  margin: 28px 0 10px; color: var(--ink);
}
p, li { margin: 0 0 16px; color: var(--ink-2); }
ul, ol { padding-left: 24px; margin: 0 0 18px; }
li { margin-bottom: 10px; }
strong, b { color: var(--ink); }

/* --sage is under 4.5:1 on cream; --sage-dk clears WCAG AA. */
a { color: var(--sage-dk); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.answer {
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--sage);
  border-radius: 10px; padding: 18px 22px; margin: 0 0 28px;
}
.answer p:last-child { margin-bottom: 0; }

.toc { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 16px 22px; margin: 0 0 8px; font-size: 15.5px; }
.toc b { display: block; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.toc ol { margin: 0; }
.toc li { margin-bottom: 4px; }

figure { margin: 26px 0; }
figure img { border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.fig-pair { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 26px 0; }
.fig-pair figure { margin: 0; }
@media (min-width: 640px) { .fig-pair { grid-template-columns: 1fr 1fr; } }

.table-scroll { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--ink-2); }
thead th { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--ink); background: var(--bg-2); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; color: var(--ink); }

.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 28px 14px 0; position: relative;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 17.5px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 22px; color: var(--sage-dk); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; }

.cta {
  background: var(--ink); color: var(--bg); border-radius: 16px;
  padding: clamp(24px, 4vw, 36px); margin: 48px 0 0;
}
.cta h2 { color: var(--bg); margin: 0 0 10px; }
.cta p { color: rgba(250,248,243,.8); }
.cta .btn-sage { background: var(--sage); }
.cta .btn-sage:hover { background: var(--bg); color: var(--ink); }

.related { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--border); }
.related ul { list-style: none; padding: 0; }
.related li { margin-bottom: 8px; }

/* ---------- Footer ---------- */
footer {
  background: var(--bg-2); border-top: 1px solid var(--border);
  padding: 28px 0; text-align: center; font-size: 14px; color: var(--muted);
}
footer a { display: inline-block; padding: 10px 4px; color: var(--muted); margin: 0 8px; }
address { font-style: normal; }
footer address { margin-bottom: 10px; line-height: 1.6; }
