:root {
  --bg1: #f8fafc;
  --bg2: #e0e7ef;
  --card-bg: rgba(255, 255, 255, 0.95);
  --text: #222;
  --text-soft: #4a5a6a;
  --text-faint: #7b8794;
  --accent: #2563eb;
  --accent2: #38bdf8;
  --track-bg: #eef2f7;
  --shadow: rgba(60, 60, 120, 0.08);
  --border: rgba(37, 99, 235, 0.12);
  --code-bg: #eef2f7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg1: #181c20;
    --bg2: #232b36;
    --card-bg: rgba(30, 36, 44, 0.97);
    --text: #e5e7eb;
    --text-soft: #b6c2d1;
    --text-faint: #8b98a8;
    --accent: #60a5fa;
    --accent2: #38bdf8;
    --track-bg: #1c2733;
    --shadow: rgba(20, 20, 40, 0.22);
    --border: rgba(96, 165, 250, 0.18);
    --code-bg: #1c2733;
  }
}
* {
  box-sizing: border-box;
}
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 100%);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  padding: 1.5rem 1rem 3rem;
}
.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}
.back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-faint);
  text-decoration: none;
  margin-bottom: 0.75rem;
}
.back:hover {
  color: var(--accent);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
}
.crumbs a {
  color: var(--text-faint);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--accent);
}

.cta-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  box-shadow: 0 8px 32px var(--shadow);
  padding: 1.25rem 1.4rem;
  margin: 1.6rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.cta-card .emoji {
  font-size: 2.1rem;
  line-height: 1;
}
.cta-card .body {
  flex: 1;
}
.cta-card .body b {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 0.15rem;
}
.cta-card .body span {
  font-size: 0.85rem;
  color: var(--text-soft);
}
.cta-card a.btn {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 100%);
  padding: 0.6rem 0.95rem;
  border-radius: 0.7rem;
  white-space: nowrap;
}

/* ---------- Article prose ---------- */
#article-root {
  background: var(--card-bg);
  border-radius: 1.25rem;
  box-shadow: 0 8px 32px var(--shadow);
  padding: 1.75rem 1.6rem;
  line-height: 1.65;
}
#article-root h1 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 0.6rem;
  line-height: 1.2;
}
#article-root h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.8rem 0 0.6rem;
}
#article-root h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.4rem 0 0.5rem;
}
#article-root p {
  margin: 0 0 1rem;
  color: var(--text-soft);
}
#article-root ul,
#article-root ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
  color: var(--text-soft);
}
#article-root li {
  margin-bottom: 0.4rem;
}
#article-root a {
  color: var(--accent);
  text-decoration: underline;
}
#article-root strong {
  color: var(--text);
}
#article-root blockquote {
  margin: 1rem 0;
  padding: 0.2rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text-faint);
  font-style: italic;
}
#article-root code {
  background: var(--code-bg);
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
  font-size: 0.9em;
}
#article-root hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}
#article-root table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}
#article-root th,
#article-root td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.6rem;
  text-align: left;
}
.byline {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-top: 1.5rem;
}
.footer-links a {
  color: var(--text-faint);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--accent);
}
