/* ============================================================
   ARTICULATE HOUSE CSS — TIER-1 CANON
   The single source of truth for every new doc / microsite / client surface.
   Derived verbatim from the Addictions microsite (Articulate/microsites/addictions/addictions.css),
   the gold-standard house pattern. DO NOT INVENT CSS — link this file and use its classes.
   Structure: header.topbar · .layout(nav.toc · main · aside.related) · footer.doc.
   Accent red is #E63946. Body is SANS. Charter serif is for mastheads & pull-quotes only.
   ============================================================ */
:root { color-scheme: light; --ink:#1a1a1a; --bg:#fafafa; --red:#E63946; --red-deep:#c0182a;
        --blue:#2E2E85; --green:#1F6B3F; --line:#ececec; --muted:#888; --serif:"Charter","Iowan Old Style",Georgia,"Times New Roman",serif; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Inter", Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.62; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* top bar — cross-page nav */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(250,250,250,0.96);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line);
  padding: 12px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; font-size: 13px; }
.topbar .brand { font-weight: 600; color: var(--ink); margin-right: 16px; letter-spacing: -0.01em; }
.topbar .brand .dot { color: var(--red); }
.topbar a { color: #555; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.topbar a:hover { color: var(--red); border-bottom-color: var(--red); }
.topbar a.current { color: var(--ink); border-bottom-color: var(--red); }

/* layout — three columns: left TOC · main · right related rail */
.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr) 220px; max-width: 1320px; margin: 0 auto; }

nav.toc { position: sticky; top: 52px; align-self: start; max-height: calc(100vh - 52px); overflow-y: auto;
  padding: 28px 20px 28px 28px; border-right: 1px solid var(--line); font-size: 13px; }
nav.toc .masthead { font-weight: 600; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
nav.toc .meta { color: var(--muted); font-size: 11px; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.06em; }
nav.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
nav.toc li { margin: 0; }
nav.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent;
  color: #555; text-decoration: none; font-size: 12.5px; line-height: 1.45; }
nav.toc a:hover { color: var(--red); border-left-color: var(--red); }
nav.toc a.h3 { padding-left: 24px; font-size: 12px; color: var(--muted); }

aside.related { position: sticky; top: 52px; align-self: start; max-height: calc(100vh - 52px); overflow-y: auto;
  padding: 28px 28px 28px 22px; border-left: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; }
aside.related h4 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 8px; }
aside.related h4:not(:first-child) { margin-top: 22px; }
aside.related ul { list-style: none; padding: 0; margin: 0; }
aside.related li { margin: 0 0 10px; }
aside.related a { color: var(--ink); text-decoration: none; font-weight: 500; border-bottom: 1px solid transparent; }
aside.related a:hover { color: var(--red); border-bottom-color: var(--red); }
aside.related .rationale { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; margin-top: 2px; line-height: 1.45; }

/* content */
main { padding: 56px 56px 120px 56px; min-width: 0; }
header.doc { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
header.doc .kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--red); font-weight: 600; margin-bottom: 12px; }
header.doc h1 { font-size: 38px; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 14px 0; font-weight: 600; }
header.doc .desc { color: #555; font-size: 16px; max-width: 68ch; }

main h1, main h2, main h3, main h4 { letter-spacing: -0.015em; font-weight: 600; scroll-margin-top: 80px; }
main h1 { font-size: 28px; margin: 48px 0 18px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
main h2 { font-size: 22px; margin: 44px 0 14px; color: #111; }
main h3 { font-size: 17px; margin: 32px 0 10px; color: #333; }
main h4 { font-size: 15px; margin: 24px 0 8px; color: #444; }
main h2::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--red); border-radius: 50%; margin-right: 12px; vertical-align: middle; transform: translateY(-3px); }
main p { margin: 0 0 16px 0; max-width: 70ch; }
main a { color: var(--red-deep); text-decoration: none; border-bottom: 1px solid rgba(192,24,42,0.25); padding-bottom: 1px; }
main a:hover { color: var(--red); border-bottom-color: var(--red); }
main strong { color: #111; font-weight: 600; }
main em { color: #444; }
main blockquote { margin: 22px 0; padding: 6px 0 6px 20px; border-left: 3px solid var(--red); color: #333; font-size: 17px; line-height: 1.55; }
main ul, main ol { margin: 0 0 18px 0; padding-left: 24px; }
main li { margin: 4px 0; max-width: 68ch; }
main hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* tables */
main table { width: 100%; border-collapse: collapse; margin: 18px 0 26px; font-size: 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
main thead { background: #f5f5f5; }
main th, main td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
main th:last-child, main td:last-child { border-right: 0; }
main tbody tr:last-child td { border-bottom: 0; }
main th { font-weight: 600; color: #222; font-size: 13px; }
main td { color: #333; }

/* callout — red / cool (blue) / green */
.callout { background: #fff3f4; border: 1px solid #f5c4c9; border-left: 3px solid var(--red); padding: 14px 18px; border-radius: 6px; margin: 22px 0; font-size: 14.5px; }
.callout.cool { background: #f0f5ff; border-color: #c9d8f5; border-left-color: var(--blue); }
.callout.green { background: #f0f6f1; border-color: #c9dfcc; border-left-color: var(--green); }

/* thesis — dark emphasis block */
.thesis { background: #1a1a1a; color: #fafafa; padding: 28px 32px; border-radius: 10px; margin: 28px 0; }
.thesis .kicker { color: #ff7a85; font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; margin-bottom: 10px; }
.thesis h2 { color: #fff; margin: 0 0 8px; border: 0; font-size: 24px; }
.thesis h2::before { background: #ff7a85; }
.thesis p { color: #d9d9d9; margin: 0 0 10px; max-width: 64ch; }
.thesis p:last-child { margin-bottom: 0; }
.thesis strong { color: #fff; }
.thesis em { color: #c9c9c9; }
.thesis a { color: #ff9ca4; border-bottom-color: rgba(255,156,164,0.4); }

/* evidence-grid — stat cards */
.evidence-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0; }
.evidence-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.evidence-card .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.evidence-card .stat { font-size: 26px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; margin: 4px 0; }
.evidence-card .body { font-size: 13.5px; color: #444; line-height: 1.5; }
.evidence-card .src { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* panel-grid — 3-up cards */
.panel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px 0; }
.panel-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.panel-card .role { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--red); font-weight: 600; }

/* entry-quick — serif intro with drop-cap (Charter, accent typography) */
.entry-quick { margin: 0 0 48px; max-width: 64ch; }
.entry-quick p { font-family: var(--serif); font-size: 19px; line-height: 1.55; color: var(--ink); margin: 0 0 12px; }
.entry-quick p:first-child::first-letter { font-family: var(--serif); font-size: 56px; line-height: 0.9; float: left; color: var(--red); font-weight: 700; padding: 4px 10px 0 0; margin: 2px 0 0; }

footer.doc { margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
footer.doc a { color: var(--muted); border-bottom-color: rgba(136,136,136,0.3); }
footer.doc .related { margin-top: 12px; }
footer.doc .related a { margin-right: 16px; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 230px minmax(0, 1fr); }
  aside.related { grid-column: 1 / -1; position: static; max-height: none; border-left: none; border-top: 1px solid var(--line); padding: 32px 56px 48px; background: #f5f5f5; }
}
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  nav.toc { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
  main { padding: 32px 24px 80px; }
  header.doc h1 { font-size: 28px; }
  .panel-grid, .evidence-grid { grid-template-columns: 1fr; }
}

/* charts — Chart.js cards */
.charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 20px 0 28px; }
.chart { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px 12px; }
.chart .ct { font-size: 13px; font-weight: 600; color: #111; margin: 0 0 4px; }
.chart .cv { position: relative; height: 190px; }
.chart .cap { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.4; }
@media (max-width: 760px) { .charts { grid-template-columns: 1fr; } }
