/* AuthorityOS articles hub.
   The site header, nav, buttons, and footer come from the app's own compiled
   stylesheet (linked ahead of this file by scripts/build-articles.mjs), so the
   chrome on these static pages is identical to every React route. This file
   only styles what is unique to an article: the reading column, long-form
   typography, the author box, and the index cards.

   Use the app's semantic tokens from src/styles/tokens.css. Never redefine
   them here: an earlier version shipped its own :root block that redefined
   --white as near-black, which turned the header CTA's label unreadable. */
@font-face {
  font-family: "Lexend Deca";
  src: url("/fonts/LexendDeca-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Lexend Deca", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

/* ── Article layout ──────────────────────────────────────────── */
.article-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.breadcrumbs {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 28px;
}
.breadcrumbs a { color: var(--text-faint); text-decoration: none; }
.breadcrumbs a:hover { color: var(--signal-300); }
.article-header h1 {
  color: var(--text-strong);
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.article-header .standfirst {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 24px;
}
.byline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
  font-size: 14px;
  color: var(--text-muted);
}
.byline strong { color: var(--text-emph); font-weight: 600; }
.byline time { color: var(--text-faint); }

/* ── Article body typography ─────────────────────────────────── */
.article-body h2 {
  color: var(--text-strong);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 620;
  letter-spacing: -0.015em;
  margin: 48px 0 16px;
  scroll-margin-top: 80px;
}
.article-body h3 {
  color: var(--text-strong);
  font-size: 20px;
  font-weight: 600;
  margin: 36px 0 12px;
  scroll-margin-top: 80px;
}
.article-body p { margin: 0 0 18px; }
.article-body a { color: var(--signal-300); text-decoration-color: var(--accent-line); }
.article-body a:hover { color: var(--signal-200); }
.article-body strong { color: var(--text-emph); }
.article-body ul, .article-body ol { padding-left: 26px; margin: 0 0 18px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  margin: 28px 0;
  padding: 4px 22px;
  border-left: 3px solid var(--signal-400);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  color: var(--text-emph);
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}
.article-body code {
  background: var(--surface-deep);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 14px;
}
.article-body pre {
  background: var(--surface-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  overflow-x: auto;
}
.article-body pre code { background: none; border: none; padding: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 24px; }
.article-body table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}
.article-body th {
  text-align: left;
  color: var(--text-strong);
  font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
  padding: 10px 14px 10px 0;
}
.article-body td {
  border-bottom: 1px solid var(--border);
  padding: 10px 14px 10px 0;
  vertical-align: top;
}

/* ── Author box ──────────────────────────────────────────────── */
.author-box {
  margin-top: 56px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.author-box h2 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--text-strong);
  font-weight: 620;
}
.author-box p { margin: 0; font-size: 14.5px; color: var(--text-muted); }
.author-box a { color: var(--signal-300); }

/* ── Index page ──────────────────────────────────────────────── */
.index-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.index-wrap > h1 {
  color: var(--text-strong);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.index-intro { color: var(--text-muted); font-size: 17px; max-width: 640px; margin: 0 0 44px; }
.cluster-heading {
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 40px 0 14px;
}
.article-card {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 14px;
  transition: border-color 0.15s ease;
}
.article-card:hover { border-color: var(--accent-line); }
.article-card h2 {
  margin: 0 0 6px;
  color: var(--text-strong);
  font-size: 19px;
  font-weight: 620;
  line-height: 1.3;
}
.article-card p { margin: 0 0 10px; color: var(--text-muted); font-size: 14.5px; }
.article-card .card-meta { color: var(--text-faint); font-size: 13px; }
.article-card--pillar { border-color: var(--accent-line); background: var(--accent-soft); }
