/* addictions microsite — Articulate house pattern, evolved from April/Zeba */
:root { color-scheme: light; }
* { 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: #1a1a1a;
  background: #fafafa;
  -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 #ececec;
  padding: 12px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  font-size: 13px;
}
.topbar .brand {
  font-weight: 600;
  color: #1a1a1a;
  margin-right: 16px;
  letter-spacing: -0.01em;
}
.topbar .brand .dot { color: #E63946; }
.topbar a {
  color: #555;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.topbar a:hover { color: #E63946; border-bottom-color: #E63946; }
.topbar a.current { color: #1a1a1a; border-bottom-color: #E63946; }

/* layout */
.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  max-width: 1180px;
  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 #ececec;
  font-size: 13px;
}
nav.toc .masthead { font-weight: 600; color: #1a1a1a; font-size: 14px; margin-bottom: 4px; }
nav.toc .meta { color: #888; 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 #ececec; }
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: #E63946; border-left-color: #E63946; }
nav.toc a.h3 { padding-left: 24px; font-size: 12px; color: #888; }

/* content */
main {
  padding: 56px 56px 120px 56px;
  min-width: 0;
}
header.doc { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid #ececec; }
header.doc .kicker {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  color: #E63946; 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 #ececec; }
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: #E63946; 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: #c0182a; text-decoration: none;
  border-bottom: 1px solid rgba(192,24,42,0.25); padding-bottom: 1px;
}
main a:hover { color: #E63946; border-bottom-color: #E63946; }
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 #E63946; color: #333;
  font-size: 17px; line-height: 1.55;
}
main blockquote.steel {
  border-left-color: #2E2E85;
  background: #f5f5fb;
  padding: 14px 18px 14px 22px;
  border-radius: 4px;
  font-style: italic;
  color: #2E2E85;
}
main blockquote.steel cite {
  display: block; margin-top: 10px;
  font-size: 13px; font-style: normal; color: #555;
}
main blockquote p:last-child { margin-bottom: 0; }
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 #ececec; margin: 40px 0; }

main table {
  width: 100%; border-collapse: collapse;
  margin: 18px 0 26px; font-size: 14px;
  background: #fff; border: 1px solid #ececec; 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 #ececec; border-right: 1px solid #ececec;
}
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 {
  background: #fff3f4; border: 1px solid #f5c4c9; border-left: 3px solid #E63946;
  padding: 14px 18px; border-radius: 6px; margin: 22px 0; font-size: 14.5px;
}
.callout.cool {
  background: #f0f5ff; border-color: #c9d8f5; border-left-color: #2E2E85;
}
.callout.green {
  background: #f0f6f1; border-color: #c9dfcc; border-left-color: #1F6B3F;
}

.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 a { color: #ff9ca4; border-bottom-color: rgba(255,156,164,0.4); }

.panel-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px 0;
}
.panel-card {
  background: #fff; border: 1px solid #ececec; border-radius: 10px;
  padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px;
}
.panel-card .portrait {
  width: 100%; aspect-ratio: 4/5; border-radius: 8px;
  background-color: #1a1a1a;
  background-size: 130%;
  background-repeat: no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 0;
  margin-bottom: 6px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.panel-card .portrait.medical {
  background-image: url("portraits/marcus.png");
  background-position: center 38%;
}
.panel-card .portrait.policy  {
  background-image: url("portraits/eleanor.png");
  background-position: center 22%;
}
.panel-card .portrait.harm    {
  background-image: url("portraits/ines.png");
  background-position: center 18%;
}

/* TIME-cover hero — homepage only */
.hero-cover {
  position: relative;
  width: 100%;
  background: #0a0a0a;
  overflow: hidden;
  border-bottom: 6px solid #c0182a;
}
.hero-cover .hero-image {
  width: 100%;
  height: 100vh;
  background-image: url("portraits/hero.png");
  background-size: cover;
  background-position: center 22%;
  background-color: #0a0a0a;
}
.hero-cover.america .hero-image {
  background-image: url("portraits/america.png");
  background-position: center 50%;
}

/* dialogue portraits — inline voice cards on america.html */
.voice-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  margin: 24px 0 32px;
  align-items: start;
}
.voice-card .voice-portrait {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 8px;
  background-color: #1a1a1a;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.voice-card .voice-portrait.shellenberger {
  background-image: url("portraits/sanfransicko.jpg");
  background-position: center center;
  background-color: #1a1a1a;
}
.voice-card .voice-portrait.shellenberger .name,
.voice-card .voice-portrait.shellenberger .role,
.voice-card .voice-portrait.shellenberger .book { display: none; }
.voice-card .voice-portrait.activist {
  background-image: url("portraits/activist.png");
  background-position: center 25%;
}
.voice-card .voice-meta { font-size: 13px; color: #555; line-height: 1.5; }
.voice-card .voice-meta strong { color: #1a1a1a; }
@media (max-width: 700px) {
  .voice-card { grid-template-columns: 1fr; }
  .voice-card .voice-portrait { aspect-ratio: 16/10; }
}
.hero-cover .hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 32px 40px 24px;
  background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0) 100%);
  color: #fff;
}
.hero-cover .masthead {
  font-family: "Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 38px; line-height: 1; font-weight: 700; letter-spacing: -0.02em;
  color: #c0182a;
  margin: 0 0 4px;
}
.hero-cover .masthead .dot { color: #fff; }
.hero-cover .issue {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.7); margin: 0 0 4px;
}
.hero-cover .deck {
  font-size: 12px; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.75); max-width: 32ch; margin: 0;
}
.hero-cover .hero-foot {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 40px 36px;
  background: linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0) 100%);
  color: #fff;
}
.hero-cover h1.cover-title {
  font-family: "Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(36px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  color: #fff;
  max-width: 18ch;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55);
}
.hero-cover .cover-sub {
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.45;
  color: rgba(255,255,255,0.88);
  max-width: 52ch;
  margin: 0 0 14px;
}
.hero-cover .cover-byline {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
@media (max-width: 700px) {
  .hero-cover .hero-overlay { padding: 22px 22px 14px; }
  .hero-cover .hero-foot { padding: 20px 22px 24px; }
  .hero-cover .masthead { font-size: 28px; }
}
.panel-card .name { font-weight: 600; font-size: 17px; color: #111; }
.panel-card .role { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: #E63946; font-weight: 600; }
.panel-card .blurb { font-size: 14px; color: #444; line-height: 1.55; }
.panel-card a.more { font-size: 13px; color: #c0182a; margin-top: auto; }

.evidence-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0;
}
.evidence-card {
  background: #fff; border: 1px solid #ececec; border-radius: 8px; padding: 16px 18px;
}
.evidence-card .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #888; font-weight: 600; }
.evidence-card .stat { font-size: 26px; font-weight: 600; color: #1a1a1a; 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: #888; margin-top: 8px; }

/* comments — page-level (Giscus) + invitation to inline (Hypothesis) */
section.comments {
  margin: 60px 0 0; padding: 28px 0 0;
  border-top: 1px solid #ececec;
}
section.comments h2 { margin-top: 0; }
section.comments .intro {
  font-size: 14.5px; color: #555; max-width: 64ch;
  margin-bottom: 22px;
}
section.comments .intro strong { color: #1a1a1a; }
section.comments .intro code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em; background: #f1f1f1; color: #b3162a;
  padding: 1px 6px; border-radius: 4px;
}
section.comments .giscus { min-height: 200px; }
section.comments .giscus-frame { width: 100% !important; }

footer.doc {
  margin-top: 60px; padding-top: 24px;
  border-top: 1px solid #ececec; color: #888; font-size: 12.5px;
}
footer.doc a { color: #888; 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: 880px) {
  .layout { grid-template-columns: 1fr; }
  nav.toc { position: static; max-height: none; border-right: 0; border-bottom: 1px solid #ececec; }
  main { padding: 32px 24px 80px; }
  header.doc h1 { font-size: 28px; }
  .panel-grid { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr; }
}
