:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --band: #f3ede5;
  --ink: #1d1a17;
  --ink-2: #4a443e;
  --muted: #776f66;
  --line: #e6ddd2;
  --accent: #12443b;
  --accent-ink: #12443b;
  --accent-soft: #e2ece7;
  --amber: #e39b2d;
  --amber-ink: #8a5710;
  --counter: #2f5d7c;
  --counter-soft: #e6eef4;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121816; --surface: #1a221f; --band: #161d1a; --ink: #f1ebe4; --ink-2: #cfc6bc;
    --muted: #9d948a; --line: #2c3733; --accent: #8fd0bd; --accent-ink: #8fd0bd; --accent-soft: #1d322c; --amber: #eaa63d; --amber-ink: #f0b65a;
    --counter: #8cbbe0; --counter-soft: #1d2a35;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 720px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo { height: 60px; width: auto; color: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.nav a:hover { background: var(--band); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }

/* Hero */
.hero { padding: 72px 0 64px; border-bottom: 1px solid var(--line); background:
  radial-gradient(900px 300px at 85% 0%, var(--accent-soft), transparent 70%); }
.hero-inner { max-width: 860px; margin-left: max(20px, calc((100% - 1120px) / 2 + 20px)); padding: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); margin: 0 0 14px; }
.eyebrow a { text-decoration: none; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); }
.hero h1 em { color: var(--accent); text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 5px; text-underline-offset: 8px; text-decoration-skip-ink: none; }
.lede { font-size: 19px; color: var(--ink-2); max-width: 660px; margin: 18px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15.5px; border: 1.5px solid var(--line); color: var(--ink); background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0e1a16; } }
.btn:hover { filter: brightness(.96); }

/* Sections */
.section { padding: 56px 20px; }
.section.tight { padding-top: 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.section-head h2 { font-size: 30px; }
.section-head a { font-weight: 600; text-decoration: none; font-size: 15px; white-space: nowrap; }
.band { background: var(--band); border-block: 1px solid var(--line); }
.grid { display: grid; gap: 20px; }

/* Article cards */
.articles-grid { grid-template-columns: 1.4fr 1fr 1fr; }
.articles-grid.list { grid-template-columns: repeat(3, 1fr); }
.articles-grid.two { grid-template-columns: 1fr 1fr; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -18px rgba(60, 20, 10, .35); }
.thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--accent-soft), var(--band)); position: relative; }
.thumb::after { content: ""; position: absolute; inset: 0; background: url("/ahs-mark.svg") center / 64px no-repeat; opacity: .35; }
.thumb:has(img)::after { display: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { font-size: 21px; }
.card.big h3 { font-size: 26px; }
.summary { margin: 0; color: var(--ink-2); font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0; font-size: 13.5px; color: var(--muted); }
.tag { background: var(--accent-soft); color: var(--accent-ink); padding: 2px 10px; border-radius: 999px; font-weight: 600; font-size: 12.5px; }

/* Topics */
.topics-grid { grid-template-columns: repeat(3, 1fr); }
.topic { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); position: relative; }
.topic:hover { border-color: var(--accent); }
.topic h3 { font-size: 20px; margin-right: 40px; }
.topic p { color: var(--ink-2); font-size: 15px; margin: 8px 0 0; }
.topic .count { position: absolute; top: 18px; right: 18px; font-family: var(--serif); font-size: 22px; color: var(--amber-ink); font-weight: 600; }

/* Doctor block */
.doctor { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.doctor h2 { font-size: 30px; margin-bottom: 12px; }
.doctor p { color: var(--ink-2); margin: 0; }
.questions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: q; }
.questions li { counter-increment: q; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 52px; position: relative; font-weight: 500; }
.questions li::before { content: counter(q); position: absolute; left: 16px; top: 13px; width: 24px; height: 24px; border-radius: 50%; background: var(--amber); color: var(--bg); font-size: 13px; display: grid; place-items: center; font-weight: 700; }

/* Page heads */
.page-head { padding-top: 56px; padding-bottom: 24px; }
.page-head h1 { font-size: clamp(34px, 5vw, 50px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chips a { text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 500; }
.chips a span { color: var(--muted); margin-left: 4px; }
.chips a:hover { border-color: var(--accent); }

/* Evidence */
.topic-section { padding-top: 40px; padding-bottom: 24px; scroll-margin-top: 80px; }
.topic-head { border-top: 2px solid var(--ink); padding-top: 18px; margin-bottom: 22px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; }
.topic-head h2 { font-size: 28px; }
.topic-head p { margin: 0; color: var(--ink-2); }
.studies { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.study { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 10px; padding: 20px 22px; }
.study.counter { border-left-color: var(--counter); }
.kind { margin: 0 0 6px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--amber-ink); }
.study.counter .kind { color: var(--counter); }
.study h3 { font-size: 20px; }
.cite { font-size: 13.5px; color: var(--muted); margin: 8px 0 12px; font-style: italic; }
.study dl { margin: 0; font-size: 15.5px; }
.study dt { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-top: 10px; }
.study dd { margin: 3px 0 0; }
.study-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; font-size: 14.5px; font-weight: 600; }
.study-links a { text-decoration: none; }
.study-links a:hover { text-decoration: underline; }

/* Article page */
.post-head { padding-top: 56px; padding-bottom: 28px; }
.post-head h1 { font-size: clamp(32px, 5vw, 48px); margin-top: 14px; }
.post-image { max-width: 960px; margin-bottom: 36px; }
.post-image img { border-radius: var(--radius); width: 100%; max-height: 520px; object-fit: cover; }
.prose { font-size: 18.5px; line-height: 1.7; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: 27px; margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose blockquote { margin: 1.5em 0; padding-left: 18px; border-left: 3px solid var(--amber); color: var(--ink-2); }
.video { position: relative; aspect-ratio: 16 / 9; margin: 28px 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.related-studies { margin-top: 24px; }
.related-studies h2 { font-size: 22px; margin-bottom: 14px; }
.callout { margin-top: 28px; margin-bottom: 8px; background: var(--accent-soft); border-radius: 12px; padding: 18px 20px; font-size: 16px; }

/* Footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--band); padding: 32px 0 40px; font-size: 14.5px; color: var(--ink-2); }
.disclaimer { margin: 0 0 18px; font-size: 15.5px; color: var(--ink); }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-row p { margin: 0; }
.footer-row nav { display: flex; gap: 16px; }
.footer-row a { color: var(--ink-2); }

/* Responsive */
@media (max-width: 900px) {
  .articles-grid, .articles-grid.list, .topics-grid { grid-template-columns: 1fr 1fr; }
  .articles-grid .card.big { grid-column: 1 / -1; }
  .studies { grid-template-columns: 1fr; }
  .doctor, .topic-head { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .wrap, .section { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 48px 0 44px; }
  .hero-inner { margin-left: 16px; margin-right: 16px; }
  .lede { font-size: 17.5px; }
  .articles-grid, .articles-grid.list, .articles-grid.two, .topics-grid { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; padding-top: 10px; padding-bottom: 6px; gap: 4px; }
  .logo { height: 42px; }
  .nav { margin-left: -12px; }
  .section-head h2, .doctor h2 { font-size: 25px; }
  .prose { font-size: 17.5px; }
  .site-header { position: static; }
}
