/* ───────────────────────────────────────────────────────────────
   Shared article styles for /news/[slug] pages.
   Same DA as /archon: dark canvas, italic-serif display, Inter
   body, JetBrains Mono labels, generous reading line-height.
   ─────────────────────────────────────────────────────────────── */

:root {
  --bg: #0A0A0A;
  --bg-soft: #141414;
  --bg-tile: #1A1A1A;
  --fg: #FAFAFA;
  --fg-muted: rgba(250, 250, 250, 0.72);
  --fg-subtle: rgba(250, 250, 250, 0.44);
  --fg-faint: rgba(250, 250, 250, 0.22);
  --rule: rgba(250, 250, 250, 0.10);
  --rule-strong: rgba(250, 250, 250, 0.18);
  --accent: #4ADE80;
  --nav-bg: rgba(10, 10, 10, 0.72);
  --cta-fg: #0A0A0A;
  --cta-hover-bg: #E5E5E5;
}
[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-soft: #F7F7F7;
  --bg-tile: #FAFAFA;
  --fg: #0A0A0A;
  --fg-muted: rgba(10, 10, 10, 0.72);
  --fg-subtle: rgba(10, 10, 10, 0.44);
  --fg-faint: rgba(10, 10, 10, 0.22);
  --rule: rgba(10, 10, 10, 0.10);
  --rule-strong: rgba(10, 10, 10, 0.20);
  --accent: #16A34A;
  --nav-bg: rgba(255, 255, 255, 0.78);
  --cta-fg: #FFFFFF;
  --cta-hover-bg: #262626;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: opacity 120ms ease, color 120ms ease; }
button { font: inherit; cursor: pointer; }

/* ─── NAV ────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
/* Theme toggle button — same look as homepage. */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--fg);
  transition: border-color 180ms ease, background 180ms ease;
  padding: 0;
}
.theme-toggle:hover { border-color: var(--rule-strong); background: var(--bg-soft); }
.theme-toggle svg { width: 15px; height: 15px; display: block; }
.theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }
.nav-row {
  max-width: 1400px; margin: 0 auto;
  padding: 14px 40px;
  display: flex; align-items: center; gap: 28px;
}
@media (max-width: 760px) { .nav-row { padding: 12px 22px; gap: 14px; } }
.brand {
  font-family: 'Inter', sans-serif;
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fg);
}
.nav-links {
  display: inline-flex; align-items: center; gap: 22px;
  font-size: 13.5px; color: var(--fg);
}
.nav-links a { color: var(--fg); }
.nav-links a:hover { opacity: 0.6; }
@media (max-width: 760px) { .nav-links { display: none; } }
.nav-right { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.nav-login {
  font-size: 13.5px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
}
.nav-login:hover { background: var(--bg-tile); }
.nav-cta {
  font-size: 13.5px; font-weight: 500;
  color: var(--bg);
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--fg);
  display: inline-flex; align-items: center; gap: 4px;
}
.nav-cta:hover { background: var(--cta-hover-bg); transform: translateY(-1px); }
.nav-cta .arr { font-size: 12px; margin-top: -1px; }

/* ─── Article ────────────────────────────────────────────── */
.article { max-width: 720px; margin: 0 auto; padding: 0 28px; }
.article-wide { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

.back-link {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-muted);
  margin: 40px 0 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.back-link:hover { color: var(--fg); }

.article-head { padding: 24px 0 32px; }
@media (max-width: 760px) { .article-head { padding: 20px 0 24px; } }

.article-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-subtle);
  margin: 0 0 28px;
  display: inline-flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
}
.article-eyebrow .sep {
  width: 4px; height: 4px; border-radius: 999px;
  background: var(--fg-faint);
  display: inline-block;
}
.article-eyebrow .cat { color: var(--fg); }

.article-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-style: italic;
  font-size: clamp(40px, 5.4vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.022em;
  color: var(--fg);
  margin: 0 0 22px;
  max-width: 22ch;
}
.article-title em { font-style: italic; }

.article-subtitle {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-style: italic;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.3;
  letter-spacing: -0.014em;
  color: var(--fg-muted);
  margin: 0 0 36px;
  max-width: 38ch;
}

.byline {
  display: flex; gap: 14px; align-items: center;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.byline-avatar {
  width: 34px; height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FBCFE8 0%, #DDD6FE 50%, #C7D2FE 100%);
  flex-shrink: 0;
}
.byline-meta { display: flex; flex-direction: column; gap: 2px; }
.byline-name { font-family: 'Inter', sans-serif; font-size: 13.5px; font-weight: 500; color: var(--fg); }
.byline-org {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-subtle);
}

/* ─── Hero image — Archon DA (matches the news card thumbnails on /).
   Sober dark base with a subtle hue tint in one corner, hairline
   border, and a small icon (not the previous chonky 22%-width one). */
.article-hero-image { margin: 40px 0 48px; }
.hero-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule);
  /* No universal background here — each article's <div class="hero-card grad-N">
     gets its specific .grad-N background (brain photo for memory, sober tint
     for the others). Previously .hero-card had a universal ink-in-water
     background which won by source order and overrode every per-article
     identity. Reverted 2026-05-20. */
}
.hero-card svg.icon {
  width: 7%; height: auto; max-width: 56px; min-width: 28px;
  color: var(--fg); opacity: 0.92;
}
.hero-card svg.icon.wide { width: 10%; max-width: 110px; }
.hero-card svg.logo {
  width: 9%; max-width: 110px;
  color: var(--fg); opacity: 0.95;
}

/* Sober dark backgrounds matching the news card thumbnails on /.
   No vibrant gradients (those felt amateur SaaS). Identity comes
   from the article content, not the cover. grad-1 keeps the brain
   photo because it's the only literal cover image we use. */
.grad-1 { background:
  url('/img/news/brain.jpg') center/cover no-repeat,
  #0F0F0F; }
.grad-2 { background:
  radial-gradient(ellipse 55% 45% at 95% 95%, rgba(245, 158, 11, 0.22) 0%, transparent 70%),
  linear-gradient(135deg, #0F0F0F 0%, #1A1A1A 100%); }
.grad-3 { background:
  radial-gradient(ellipse 55% 45% at 95% 95%, rgba(99, 91, 255, 0.24) 0%, transparent 70%),
  linear-gradient(135deg, #0F0F0F 0%, #1A1A1A 100%); }
.grad-4 { background:
  radial-gradient(ellipse 55% 45% at 95% 95%, rgba(10, 102, 194, 0.26) 0%, transparent 70%),
  linear-gradient(135deg, #0F0F0F 0%, #1A1A1A 100%); }
.grad-5 { background:
  radial-gradient(ellipse 55% 45% at 95% 95%, rgba(20, 184, 166, 0.22) 0%, transparent 70%),
  linear-gradient(135deg, #0F0F0F 0%, #1A1A1A 100%); }
.grad-6 { background:
  radial-gradient(ellipse 55% 45% at 95% 95%, rgba(220, 38, 38, 0.20) 0%, transparent 70%),
  linear-gradient(135deg, #0F0F0F 0%, #1A1A1A 100%); }

/* Light theme overrides — same single-hue corner tint approach on
   a near-white surface. grad-1 (brain photo) stays dark in both
   themes as a deliberate accent. */
[data-theme="light"] .grad-2 { background:
  radial-gradient(ellipse 55% 45% at 95% 95%, rgba(245, 158, 11, 0.18) 0%, transparent 70%),
  linear-gradient(135deg, #FAFAFA 0%, #F0F0F0 100%); }
[data-theme="light"] .grad-3 { background:
  radial-gradient(ellipse 55% 45% at 95% 95%, rgba(99, 91, 255, 0.18) 0%, transparent 70%),
  linear-gradient(135deg, #FAFAFA 0%, #F0F0F0 100%); }
[data-theme="light"] .grad-4 { background:
  radial-gradient(ellipse 55% 45% at 95% 95%, rgba(10, 102, 194, 0.20) 0%, transparent 70%),
  linear-gradient(135deg, #FAFAFA 0%, #F0F0F0 100%); }
[data-theme="light"] .grad-5 { background:
  radial-gradient(ellipse 55% 45% at 95% 95%, rgba(20, 184, 166, 0.18) 0%, transparent 70%),
  linear-gradient(135deg, #FAFAFA 0%, #F0F0F0 100%); }
[data-theme="light"] .grad-6 { background:
  radial-gradient(ellipse 55% 45% at 95% 95%, rgba(220, 38, 38, 0.16) 0%, transparent 70%),
  linear-gradient(135deg, #FAFAFA 0%, #F0F0F0 100%); }

.image-caption {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-subtle);
  margin: 14px 0 0;
  text-align: center;
}

/* ─── Body ───────────────────────────────────────────────── */
.body p {
  font-family: 'Inter', sans-serif;
  font-size: clamp(16.5px, 1.25vw, 18.5px);
  line-height: 1.75;
  color: var(--fg-muted);
  margin: 0 0 24px;
}
.body p:last-child { margin-bottom: 0; }
.body p em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  color: var(--fg);
}
.body p strong { color: var(--fg); font-weight: 500; }
.body p a {
  color: var(--fg);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
}
.body p a:hover { border-color: var(--fg); }

.body h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic; font-weight: 400;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 48px 0 18px;
}
.body h2 em { font-style: italic; }

.body ul, .body ol {
  margin: 0 0 24px;
  padding-left: 0;
  list-style: none;
  font-family: 'Inter', sans-serif;
  font-size: clamp(16.5px, 1.25vw, 18.5px);
  line-height: 1.65;
  color: var(--fg-muted);
}
.body ul li, .body ol li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 10px;
}
.body ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--fg-faint);
}
.body ol { counter-reset: bul; }
.body ol li { counter-increment: bul; }
.body ol li::before {
  content: counter(bul, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--fg-subtle);
  top: 2px;
}
.body li em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  color: var(--fg);
}
.body li strong { color: var(--fg); font-weight: 500; }

/* Pull quote */
.pullquote {
  margin: 36px 0;
  padding: 0 0 0 26px;
  border-left: 2px solid var(--fg);
}
.pullquote p {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic; font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.3;
  letter-spacing: -0.014em;
  color: var(--fg);
  margin: 0;
}
.pullquote cite {
  font-style: normal;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-subtle);
  display: block;
  margin-top: 12px;
}

/* ─── Inline figure ─────────────────────────────────────── */
.figure {
  margin: 36px 0;
  padding: 28px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 16px;
}
.figure svg {
  width: 100%; height: auto;
  max-height: 280px;
  color: var(--fg);
  display: block;
}
/* Text sitting on a filled (currentColor) SVG shape — inverts with
   the theme so it stays readable in both light and dark. Replaces
   the old hardcoded fill="#0A0A0A" pattern. */
.figure svg .invert-fill { fill: var(--bg); }
.figure-caption {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-subtle);
  margin: 16px 0 0;
  text-align: center;
}
.figure-caption .num { color: var(--fg); margin-right: 8px; }

/* ─── CTA card ───────────────────────────────────────────── */
.cta {
  margin: 56px 0;
  padding: 36px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 18px;
}
@media (max-width: 760px) { .cta { padding: 24px; } }
.cta h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic; font-weight: 400;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.018em;
  color: var(--fg);
  margin: 0 0 10px;
}
.cta p {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0 0 20px;
  max-width: 44ch;
}
.cta .actions { display: inline-flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 500;
  border: 1px solid transparent;
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-primary:hover { background: var(--cta-hover-bg); }
.btn-ghost {
  background: transparent; color: var(--fg);
  border-color: var(--rule-strong);
}
.btn-ghost:hover { border-color: var(--fg); }

/* ─── Article foot ───────────────────────────────────────── */
.article-foot {
  margin: 48px 0 72px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.article-foot p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--fg-muted);
  margin: 0 0 8px;
}
.article-foot p em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  color: var(--fg);
}
.article-foot p a {
  color: var(--fg);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
}
.article-foot p a:hover { border-color: var(--fg); }
.article-foot .links {
  margin-top: 14px;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-subtle);
  display: inline-flex; gap: 18px;
}
.article-foot .links a { color: var(--fg-muted); }
.article-foot .links a:hover { color: var(--fg); }

/* ─── Footer ─────────────────────────────────────────────── */
footer.site {
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding: 56px 0 32px;
}
.footer-top {
  max-width: 1400px; margin: 0 auto;
  padding: 0 40px 36px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 36px;
}
@media (max-width: 980px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; padding: 0 22px 28px; }
}
.footer-top .brand { font-size: 18px; }
.footer-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px; line-height: 1.5;
  color: var(--fg-muted);
  margin: 12px 0 0;
  max-width: 30ch;
}
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--fg);
  margin: 0 0 14px;
}
.footer-col ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px;
}
.footer-col li a {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px; color: var(--fg-muted);
}
.footer-col li a:hover { color: var(--fg); }
.footer-bottom {
  max-width: 1400px; margin: 0 auto;
  padding: 24px 40px 0;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: var(--fg-subtle);
}
@media (max-width: 980px) { .footer-bottom { padding: 24px 22px 0; } }

::selection { background: var(--fg); color: var(--bg); }
