:root {
  --bg: #fbfaf6;
  --surface: #ffffff;
  --ink: #16201b;
  --muted: #5b665f;
  --line: #e6e3da;
  --brand: #0e3b2c;
  --accent: #157a55;
  --accent-soft: #e5f3ec;
  --gold: #b7862a;
  --serif: "Iowan Old Style", "Charter", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1412; --surface: #161d1a; --ink: #e8ece9; --muted: #9aa69f; --line: #26302b;
    --brand: #7ee2b0; --accent: #6fd6a3; --accent-soft: #1b2b24; --gold: #e2b35a;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--brand); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 740px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 20px/1 var(--serif); color: var(--ink); text-decoration: none; }
.logo img { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 760px) {
  .site-header { position: static; }
  .site-header .wrap { padding-top: 12px; padding-bottom: 8px; }
  .nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .nav a { white-space: nowrap; }
}

/* Hero */
.hero { padding: 56px 0 36px; }
.hero h1 { font: 700 clamp(34px, 5vw, 54px)/1.08 var(--serif); margin: 0 0 14px; letter-spacing: -0.01em; max-width: 780px; }
.hero p { color: var(--muted); font-size: 19px; max-width: 640px; margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--accent); margin: 0 0 10px; }

/* Cards */
.grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.06); color: inherit; }
.card img { aspect-ratio: 1200/630; object-fit: cover; width: 100%; }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font: 700 21px/1.25 var(--serif); margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .meta { font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 6px; }
.tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; }
.feature img { height: 100%; aspect-ratio: auto; }
.feature .card-body { padding: 28px 30px; justify-content: center; }
.feature h3 { font-size: 30px; }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } .feature img { aspect-ratio: 1200/630; } .feature h3 { font-size: 24px; } }

.section { padding: 28px 0 44px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; border-top: 2px solid var(--ink); padding-top: 14px; }
.section-head h2 { font: 700 26px/1.2 var(--serif); margin: 0; }
.section-head a { font-size: 14px; font-weight: 600; text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; font-size: 14px; text-decoration: none; color: var(--ink); }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* Article */
.breadcrumb { font-size: 14px; color: var(--muted); padding-top: 28px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.article-header h1 { font: 700 clamp(32px, 4.6vw, 46px)/1.12 var(--serif); margin: 14px 0 14px; letter-spacing: -0.01em; }
.article-header .dek { font-size: 20px; color: var(--muted); margin: 0 0 16px; }
.byline { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cover { margin: 26px 0 8px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 26px 0; font-size: 15px; }
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 4px 0; }
.toc a { text-decoration: none; }

.prose { font-size: 18px; }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose ul, .prose ol, .prose table, .prose blockquote { margin-bottom: 0; }
.prose h2 { font: 700 29px/1.25 var(--serif); margin: 1.8em 0 0; scroll-margin-top: 80px; }
.prose h3 { font: 700 22px/1.3 var(--serif); margin: 1.5em 0 0; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose .lead { font-size: 20px; }
.prose blockquote, .prose .formula { margin-left: 0; margin-right: 0; border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 10px 10px 0; font-weight: 600; }
.prose .callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.prose .callout > :first-child { margin-top: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--accent-soft); }
.prose .note { font-size: 14px; color: var(--muted); }
.takeaways { background: var(--accent-soft); border-radius: var(--radius); padding: 20px 24px; }
.takeaways h2 { margin-top: 0 !important; font-size: 23px !important; }

.disclaimer { margin: 40px 0 0; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--muted); background: var(--surface); }
.author-box { display: flex; gap: 16px; align-items: flex-start; margin: 28px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.author-box img { width: 48px; height: 48px; flex: none; }
.author-box strong { color: var(--ink); }

/* Pages */
.page h1 { font: 700 clamp(32px, 4.6vw, 44px)/1.15 var(--serif); margin: 36px 0 8px; }
.page .updated { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
form.contact { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-top: 24px; }
form.contact label { font-size: 14px; font-weight: 600; display: grid; gap: 6px; }
form.contact input, form.contact textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 12px 20px; font: 600 16px var(--sans); cursor: pointer; text-decoration: none; }
@media (prefers-color-scheme: dark) { .btn { color: #0f1412; } }

/* Footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--muted); }
.site-footer .wrap { padding-top: 36px; padding-bottom: 36px; display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr; }
.site-footer h4 { color: var(--ink); margin: 0 0 10px; font-size: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .fine { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; font-size: 13px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* Lead capture */
.lead-box { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; margin: 40px 0 8px; padding: 28px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--line); }
.lead-box h2 { font: 700 26px/1.2 var(--serif); margin: 0 0 10px; }
.lead-box p { margin: 0 0 12px; color: var(--muted); }
.lead-box ul { margin: 0; padding-left: 1.2em; font-size: 15px; }
.lead-box li + li { margin-top: 4px; }
.lead-form { display: grid; gap: 12px; background: var(--surface); padding: 20px; border-radius: 12px; border: 1px solid var(--line); }
.lead-form label { display: grid; gap: 5px; font-size: 14px; font-weight: 600; }
.lead-form .opt { font-weight: 400; color: var(--muted); }
.lead-form input[type=email], .lead-form input[name=name] { font: inherit; font-size: 16px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.lead-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.lead-form input.valid { border-color: var(--accent); }
.lead-form input.invalid { border-color: #c2412d; }
.lead-form .hint { font-weight: 400; font-size: 13px; color: #c2412d; min-height: 0; }
.lead-form .hint:has(.linkish) { color: var(--muted); }
.lead-form .linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.lead-form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13px; color: var(--muted); line-height: 1.45; }
.lead-form .consent input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.lead-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lead-form .btn { width: 100%; padding: 13px; font-size: 16px; }
.lead-form .btn[disabled] { opacity: .7; cursor: wait; }
.lead-status { margin: 0; font-size: 14px; }
.lead-status.error { color: #c2412d; }
.lead-success strong { display: block; font: 700 22px var(--serif); color: var(--accent); margin-bottom: 6px; }
.lead-success p { margin: 0 0 8px; color: var(--ink); }
.lead-success .note { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .lead-box { grid-template-columns: 1fr; padding: 20px; gap: 18px; } }
.prose .small { font-size: 14px; color: var(--muted); }
