:root {
  --paper: #FAFAF8;
  --ink: #1D1D1F;
  --ink-soft: #6E6E73;
  --pine: #2C5F4F;
  --pine-soft: #E4ECE8;
  --amber: #C4622D;
  --amber-soft: #F5E4D9;
  --line: #E8E6DE;
  --line-strong: #D8D5CB;
  --white: #FFFFFF;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-soft: 0 1px 2px rgba(29,29,31,0.04), 0 8px 24px rgba(29,29,31,0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ===== TOPBAR (shared shell, matches the tool) ===== */
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.topbar__mark { color: var(--pine); width: 26px; height: 26px; flex-shrink: 0; }
.topbar__name { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.topbar__actions { display: flex; align-items: center; gap: 6px; }

.btn { font-size: 14px; font-weight: 600; border-radius: 100px; border: none; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; text-decoration: none; transition: background 0.15s, color 0.15s, opacity 0.15s; }
.btn--primary { background: var(--ink); color: var(--white); padding: 10px 18px; }
.btn--primary:hover { opacity: 0.88; }
.btn--ghost { background: none; color: var(--ink-soft); padding: 9px 14px; }
.btn--ghost:hover { background: var(--paper); color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.btn--current { color: var(--pine); background: var(--pine-soft); }

/* ===== ARTICLE LAYOUT ===== */
.article-shell { max-width: 700px; margin: 0 auto; padding: 56px 24px 80px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--pine);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

.article-shell h1 {
  font-family: var(--font-display); font-size: 38px; line-height: 1.15;
  font-weight: 600; letter-spacing: -0.01em; margin: 0 0 14px;
  color: var(--ink);
}
.article-dek {
  font-size: 18px; line-height: 1.55; color: var(--ink-soft);
  margin: 0 0 36px; font-weight: 400;
}

.article-shell h2 {
  font-family: var(--font-display); font-size: 25px; font-weight: 600;
  margin: 44px 0 16px; letter-spacing: -0.005em; color: var(--ink);
}
.article-shell h3 {
  font-family: var(--font-body); font-size: 16.5px; font-weight: 700;
  margin: 28px 0 10px; color: var(--ink);
}
.article-shell p {
  font-size: 16.5px; line-height: 1.7; color: var(--ink); margin: 0 0 20px;
}
.article-shell ul, .article-shell ol {
  font-size: 16.5px; line-height: 1.7; color: var(--ink);
  margin: 0 0 20px; padding-left: 22px;
}
.article-shell li { margin-bottom: 8px; }
.article-shell strong { font-weight: 700; }
.article-shell a { color: var(--pine); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.article-shell a:hover { text-decoration-color: var(--pine); }
.article-shell a.hub-card,
.article-shell a.btn,
.article-shell .hub-card a,
.article-shell .cta-card a,
.article-shell .article-nav__link {
  text-decoration: none;
}
.article-shell a.btn--primary { color: var(--white); }
.article-shell a.btn--ghost { color: var(--ink-soft); }

.pull-note {
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 28px 0;
  font-size: 15.5px;
  line-height: 1.6;
}
.pull-note p:last-child { margin-bottom: 0; }

.diagram-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: 24px;
  margin: 28px 0;
  box-shadow: var(--shadow-soft);
}
.diagram-card__caption {
  font-size: 13px; color: var(--ink-soft); text-align: center; margin-top: 12px;
}

.cta-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 40px 0;
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.cta-card h3 { margin-top: 0; font-family: var(--font-display); font-size: 19px; }
.cta-card p { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 18px; }

.article-nav {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line);
}
.article-nav__link { font-size: 14px; color: var(--pine); text-decoration: none; font-weight: 600; }
.article-nav__link:hover { text-decoration: underline; }

.disclaimer {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  background: var(--white);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-align: center;
}
.disclaimer strong { color: var(--ink); }

/* ===== LEARN HUB GRID ===== */
.hub-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0 12px;
}
.hub-card {
  display: block; padding: 22px; border: 1px solid var(--line);
  border-radius: var(--radius-md); background: var(--white);
  text-decoration: none; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s;
}
.hub-card:hover { border-color: var(--pine); box-shadow: var(--shadow-soft); }
.hub-card__tag { font-size: 11.5px; font-weight: 700; color: var(--pine); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; display: block; }
.hub-card h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 18.5px; }
.hub-card p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }

@media (max-width: 640px) {
  .article-shell { padding: 36px 18px 60px; }
  .article-shell h1 { font-size: 28px; }
  .article-dek { font-size: 16px; }
  .topbar { padding: 0 14px; }
  .topbar__name { display: none; }
  .topbar__actions .btn--ghost { padding: 8px 10px; font-size: 12.5px; }
  .hub-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
