:root {
  --bg: #f3eee4;
  --bg-deep: #e8e0d0;
  --paper: #fffdf8;
  --ink: #1d1914;
  --ink-soft: #5a5348;
  --ink-faint: #8a8173;
  --rule: #d8cfc0;
  --terracotta: #9a4d2e;
  --terracotta-dark: #753821;
  --olive: #3f4d38;
  --olive-soft: #5d6b54;
  --highlight: #f0d9b5;
  --max: 72rem;
  --measure: 42rem;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
}

a { color: var(--terracotta-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--terracotta); }
img { max-width: 100%; height: auto; }
svg { display: block; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.site-header {
  border-bottom: 1px solid var(--rule);
  background: rgba(243, 238, 228, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.header-inner, .site-footer .footer-inner, .wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 2.1rem; height: 2.1rem; flex: none; }
.brand-text {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  line-height: 1.15;
}
.brand-text span {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.1rem;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.95rem;
}
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

.hero {
  padding: 3.4rem 0 2.6rem;
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(1200px 280px at 10% 0%, rgba(154, 77, 46, 0.08), transparent 60%),
    var(--bg);
}
.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 0.9rem;
}
.hero h1, .page-hero h1, .article-header h1 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 1rem;
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 4rem); max-width: 16ch; }
.lede {
  font-size: 1.25rem;
  color: var(--ink-soft);
  max-width: 38rem;
  margin: 0 0 1.6rem;
}
.hero-actions, .cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.98rem;
  border: 1px solid transparent;
}
.btn-primary { background: var(--terracotta); color: #fffaf4; }
.btn-primary:hover { background: var(--terracotta-dark); color: #fffaf4; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.section { padding: 3rem 0; }
.section h2, .prose h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  font-weight: 560;
  margin: 0 0 1rem;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 1.4rem;
}
.muted { color: var(--ink-soft); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 1rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 1rem;
  padding: 1.2rem 1.25rem 1.3rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 120ms ease, border-color 120ms ease;
}
a.card:hover { transform: translateY(-2px); border-color: #c4b49a; color: inherit; }
.card .meta { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--olive-soft); font-weight: 700; margin: 0 0 0.55rem; }
.card h3 {
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.25;
  margin: 0 0 0.55rem;
  letter-spacing: -0.02em;
}
.card p { margin: 0; color: var(--ink-soft); font-size: 1rem; flex: 1; }

.panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 1.15rem;
  padding: 1.4rem 1.5rem;
}
.kit {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--olive);
  color: #f6f1e6;
  border-radius: 1.25rem;
  padding: 1.7rem 1.8rem;
}
.kit h2 { color: #fff; }
.kit p { color: #d9d3c4; }
.kit .btn-primary { background: #f0d9b5; color: var(--olive); }
.kit .btn-primary:hover { background: #fff; color: var(--olive); }
.note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--terracotta);
  padding: 0.15rem 0 0.15rem 0.9rem;
}

.page-hero, .article-header { padding: 2.4rem 0 1.4rem; }
.page-hero h1, .article-header h1 { font-size: clamp(2rem, 4.4vw, 3.15rem); max-width: 20ch; }
.article-header .meta { color: var(--ink-faint); font-size: 0.95rem; margin-bottom: 0.8rem; }
.prose { max-width: var(--measure); padding-bottom: 3rem; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 {
  font-family: var(--serif);
  font-size: 1.28rem;
  margin: 1.7rem 0 0.6rem;
}
.prose p, .prose li { color: #2a261f; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin: 0.35rem 0; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
  margin: 1.2rem 0 1.5rem;
  background: var(--paper);
}
.prose th, .prose td {
  border: 1px solid var(--rule);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}
.prose th { background: var(--bg-deep); font-size: 0.88rem; letter-spacing: 0.03em; }
.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid var(--olive);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.2rem;
}
.disclosure-box, .aff-box, .product-cta {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0.9rem;
  padding: 0.95rem 1.05rem;
  margin: 1.3rem 0;
  font-size: 0.98rem;
}
.aff-link, .aff-pending {
  display: inline-block;
  margin: 0.15rem 0.25rem 0.15rem 0;
  padding: 0.18rem 0.55rem;
  border: 1px dashed var(--terracotta);
  border-radius: 999px;
  text-decoration: none;
  color: var(--terracotta-dark);
  font-size: 0.92rem;
  font-weight: 650;
}
.aff-pending { cursor: help; }
figure { margin: 1.4rem 0; }
figcaption { color: var(--ink-faint); font-size: 0.88rem; margin-top: 0.45rem; }
.diagram {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 1rem;
  padding: 1rem;
}

.related { border-top: 1px solid var(--rule); padding: 2rem 0 3rem; }
.related h2 { font-size: 1.5rem; }

.site-footer {
  background: #1d1914;
  color: #d8d0c4;
  padding: 2.2rem 0 2.6rem;
  font-size: 0.95rem;
}
.site-footer a { color: #f0d9b5; }
.footer-inner { display: grid; gap: 1.2rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.7rem 1.1rem; }
.tiny { color: #9b9286; font-size: 0.88rem; }

@media (max-width: 720px) {
  .header-inner { align-items: flex-start; flex-direction: column; }
  .kit { grid-template-columns: 1fr; }
  .hero { padding-top: 2.2rem; }
}
