@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

:root {
  --ink: #14171c;
  --paper: #ece7db;
  --accent: #d68f52;
  --accent-deep: #c96a5c;
  --mute: #948d7c;
  --line: rgba(236, 231, 219, 0.14);
  --panel: #1b1f26;
  --focus: #e8ac6f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

html, body {
  background: var(--ink);
  color: var(--paper);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  line-height: 1.65;
  font-size: 16px;
}

body {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 100px;
}

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  color: var(--paper);
  text-wrap: balance;
  margin: 0 0 8px;
}

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 200;
}

header.masthead {
  border-bottom: 1px solid var(--line);
  padding-bottom: 26px;
  margin-bottom: 36px;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

header.masthead h1 {
  font-size: clamp(30px, 5.2vw, 42px);
  line-height: 1.12;
  margin-bottom: 14px;
}

.dek {
  color: var(--mute);
  font-size: 15.5px;
  max-width: 60ch;
}

nav.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 44px;
}

nav.toc a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

nav.toc a:hover,
nav.toc a.active {
  color: var(--paper);
  border-color: var(--accent);
  background: rgba(214, 143, 82, 0.1);
}

nav.toc a .dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent-deep);
  flex-shrink: 0;
}

article section {
  margin-bottom: 46px;
  scroll-margin-top: 24px;
}

.story-eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 8px;
}

article h2 {
  font-size: 26px;
  margin-bottom: 14px;
}

article p {
  font-size: 16px;
  line-height: 1.75;
  max-width: 68ch;
  margin: 0 0 16px;
}

article p:last-child { margin-bottom: 0; }

.take {
  border-left: 3px solid var(--accent-deep);
  padding-left: 16px;
  margin-top: 18px;
}

.take .label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}

.take p {
  font-size: 15px;
  color: var(--paper);
  max-width: 62ch;
  margin: 0;
}

.takeaway-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px 28px;
}

.takeaway-box p {
  max-width: none;
  color: var(--paper);
}

.sources h2 { font-size: 22px; }

.source-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.source-list li {
  border-bottom: 1px solid var(--line);
}

.source-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 2px;
  font-size: 14px;
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
}

.source-list a:hover { color: var(--accent); }
.source-list a:hover .ext-icon { transform: translate(2px, -2px); }

.source-list .outlet {
  color: var(--mute);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.source-list .headline {
  flex: 1;
}

.ext-icon {
  flex-shrink: 0;
  color: var(--mute);
  transition: transform 0.15s ease;
}

.cta-final {
  text-align: center;
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 40px 28px;
  background: radial-gradient(circle at 50% 0%, rgba(214, 143, 82, 0.14), transparent 70%);
  margin-top: 12px;
}

.cta-final .eyebrow { justify-content: center; display: flex; }
.cta-final h2 { font-size: 26px; margin-bottom: 10px; }
.cta-final p { max-width: 46ch; margin: 0 auto 20px; color: var(--mute); font-size: 14.5px; }

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.cta-btn:hover { background: var(--focus); transform: translateY(-1px); }

footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--mute);
  font-size: 12px;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
}

.to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: rgba(214, 143, 82, 0.12); }

@media (max-width: 600px) {
  header.masthead h1 { font-size: 28px; }
  article h2 { font-size: 22px; }
}
