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

:root {
  --bg: #0D0D0F;
  --text: #F2F0EB;
  --text-secondary: #C7C5BF;
  --text-muted: #8B8A86;
  --accent-yellow: #E8B931;
  --brand-red: #CC1010;
  --pov-orange: #D9822B;
  --pov-blue: #4A7FB5;
  --hairline: rgba(255, 255, 255, .14);
  --hairline-soft: rgba(255, 255, 255, .10);
  --hairline-grid: rgba(255, 255, 255, .12);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}

a:hover {
  color: var(--brand-red);
}

.page-shell {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 0 56px 64px;
}

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 18px;
  border-bottom: 3px solid var(--text);
}

.masthead-brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.masthead-logo {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.masthead-logo span {
  color: var(--brand-red);
}

.masthead-by,
.masthead-date,
.rail-title,
.kicker,
.summary-label,
.version-badge,
.audio-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.masthead-by,
.masthead-date,
.rail-title {
  color: var(--text-muted);
}

.masthead-nav {
  display: flex;
  gap: 32px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
}

.masthead-nav a {
  color: var(--text-secondary);
}

/* Compatibility for already-published pages that still use the previous markup. */
.header {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 28px 56px 18px;
  border-bottom: 3px solid var(--text);
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.header-logo {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.header-logo::after {
  content: ".";
  color: var(--brand-red);
}

.header-by {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
}

.header-nav a {
  color: var(--text-secondary);
}

.article-shell {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 44px 32px 52px;
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  padding: 44px 0 52px;
  border-bottom: 1px solid var(--hairline);
}

.story-main {
  min-width: 0;
}

.kicker,
.article-kicker {
  color: var(--accent-yellow);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.article-title {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(40px, 5.1vw, 58px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.06;
  max-width: 860px;
  margin: 0 0 20px;
  text-wrap: pretty;
}

.article-lead {
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 0 32px;
  text-wrap: pretty;
}

.article-meta,
.topic-meta,
.version-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.story-rail {
  border-left: 1px solid var(--hairline);
  padding-left: 32px;
  min-width: 0;
}

.rail-section {
  padding: 0 0 24px;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--hairline-soft);
}

.rail-section:last-child {
  border-bottom: 0;
}

.rail-title {
  margin: 0 0 6px;
}

.rail-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.rail-item:last-child {
  border-bottom: 0;
}

.rail-heading {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 8px;
}

.rail-meta,
.rail-text {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.rail-link {
  color: var(--accent-yellow);
  font-weight: 600;
}

.topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: baseline;
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.topic-links a {
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, .25);
}

.topic-link-label {
  color: var(--text-muted);
}

.rail-empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px 0 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--hairline-grid);
  border: 1px solid var(--hairline-grid);
  margin: 36px 0 42px;
}

.summary-item {
  background: var(--bg);
  padding: 22px 24px;
}

.summary-label {
  color: var(--text-muted);
  margin: 0 0 8px;
}

.summary-value {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.2;
}

.content {
  max-width: 820px;
}

.content h2,
.content h3 {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
}

.content h2 {
  font-size: 28px;
  margin: 3rem 0 1rem;
}

.content h3 {
  font-size: 21px;
  margin: 2rem 0 .75rem;
}

.content p {
  margin: 0 0 1.2rem;
}

.content ul,
.content ol {
  margin: 0 0 1.4rem 1.25rem;
}

.content li {
  margin-bottom: .55rem;
  padding-left: .25rem;
}

.content strong {
  color: var(--text);
  font-weight: 600;
}

.note {
  color: var(--text-muted);
  border-left: 3px solid var(--pov-orange);
  padding: .15rem 0 .15rem 1rem;
  margin: 1.5rem 0;
  font-size: 14px;
}

.audio-panel {
  display: none;
  margin: 28px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--hairline-soft);
}

.audio-panel.is-visible {
  display: block;
}

.audio-panel audio {
  display: block;
  width: 100%;
}

.audio-label {
  color: var(--accent-yellow);
  margin: 0 0 .65rem;
}

.audio-caption {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: .65rem;
}

.diagram {
  border: 1px solid var(--hairline);
  padding: 1.25rem;
  overflow-x: auto;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 1rem;
}

.diagram.has-diagram {
  cursor: zoom-in;
}

.diagram-section {
  max-width: 900px;
  margin-top: 3rem;
}

.diagram-section .diagram {
  padding: 1.5rem;
}

.diagram svg {
  display: block;
  min-width: 780px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.diagram-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  background: rgba(5, 5, 7, .94);
  padding: 24px;
}

.diagram-fullscreen.is-open {
  display: block;
}

.diagram-fullscreen-content {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(1400px, 96vw);
  height: min(900px, 90vh);
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--hairline);
  padding: 24px;
  cursor: grab;
  transform: translate(-50%, -50%);
}

.diagram-fullscreen-content svg {
  display: block;
  width: max-content;
  min-width: 100%;
  height: auto;
  margin: 0 auto;
}

.diagram-fullscreen-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1001;
  width: 42px;
  height: 42px;
  border: 1px solid var(--hairline);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  line-height: 1;
}

.topic-version {
  border-top: 1px solid var(--hairline);
  padding: 2rem 0;
}

.topic-version--latest {
  border-top: 0;
}

.version-badge {
  color: var(--accent-yellow);
}

.version-prompt {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 1.25rem;
}

details.topic-version summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  list-style-position: inside;
}

details.topic-version[open] summary {
  margin-bottom: 1rem;
}

.sources li {
  color: var(--text-muted);
  font-size: 14px;
}

.source-meta {
  color: var(--text-secondary);
  font-size: 13px;
}

.footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 3px solid var(--text);
}

.footer-brand {
  color: var(--text-secondary);
  font-size: 15px;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
}

.footer-links a {
  color: var(--accent-yellow);
  border-bottom: 1px solid var(--accent-yellow);
}

@media (max-width: 1024px) {
  .page-shell {
    padding: 0 32px 56px;
  }

  .story-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .story-rail {
    border-left: 0;
    border-top: 1px solid var(--hairline);
    padding: 32px 0 0;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 0 20px 44px;
  }

  .masthead {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .masthead-nav {
    flex-wrap: wrap;
    gap: 18px;
  }

  .article-title {
    font-size: clamp(34px, 10vw, 42px);
  }

  .article-lead {
    font-size: 16px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
