/* ============================================================
   ARTICLE CONTENT
   ============================================================ */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.article-title {
  font-size: var(--step-5);
  margin: 0 0 0.9rem;
}

.article-intro {
  font-size: var(--step-1);
  color: var(--ink-muted);
  margin: 0 0 3rem;
  max-width: 60ch;
}

.article-section {
  margin: 3.2rem 0;
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.article-section h2 {
  font-size: var(--step-3);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.article-section h2 .section-num {
  font-family: var(--font-mono);
  color: var(--blue);
  font-size: 0.62em;
}

.article-section h3 {
  font-size: var(--step-2);
  margin: 1.6rem 0 0.7rem;
}

.article-section p {
  margin: 0 0 1.1rem;
  max-width: 66ch;
}

.article-section ul,
.article-section ol {
  max-width: 66ch;
  padding-left: 1.3rem;
  margin: 0 0 1.2rem;
}

.article-section li {
  margin-bottom: 0.4rem;
}

.article-section strong {
  color: var(--ink);
}

.article-section em.term {
  font-style: normal;
  color: var(--blue);
  border-bottom: 1px dotted var(--border-strong);
}

/* ---------- Code blocks ---------- */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.4rem 0;
  overflow: hidden;
}

.code-block-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
}

.code-block pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--ink);
}

.code-inline {
  font-family: var(--font-mono);
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.08em 0.35em;
  font-size: 0.88em;
}

/* ---------- Diagram container ---------- */
.diagram-container {
  background: var(--diagram-bg);
  border: 1px solid var(--diagram-border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  margin: 1.6rem 0;
  overflow-x: auto;
}

.diagram-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 1rem;
  letter-spacing: 0.02em;
}

.diagram-container svg text {
  font-family: var(--font-mono);
}

/* ---------- Step list ---------- */
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.step-item {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}

.step-item:last-child {
  border-bottom: 1px solid var(--border);
}

.step-item::before {
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--blue);
  border: 1px solid var(--border-strong);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-top: 0.1rem;
}

.step-item p {
  margin: 0;
}

/* ---------- Key takeaway ---------- */
.key-takeaway {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--blue);
  padding: 1.2rem 1.4rem;
  background: var(--paper-raised);
  margin: 1.6rem 0;
}

.key-takeaway-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.key-takeaway p {
  margin: 0;
  color: var(--ink);
}

/* ---------- Related concepts ---------- */
.related-concepts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.related-concepts a {
  border: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.84rem;
  color: var(--ink);
}

.related-concepts a:hover {
  border-color: var(--blue);
  color: var(--blue);
  text-decoration: none;
}

/* ---------- Prev / Next nav ---------- */
.prev-next-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.nav-link {
  display: flex;
  flex-direction: column;
  max-width: 48%;
}

.nav-link.next {
  text-align: right;
  margin-left: auto;
}

.nav-link .nav-dir {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.nav-link .nav-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}

.nav-link:hover .nav-title {
  color: var(--blue);
  text-decoration: none;
}

/* ---------- Mental model callout ---------- */
.mental-model {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink);
  border-left: 3px solid var(--border-strong);
  padding-left: 1.2rem;
  margin: 1.4rem 0 1.8rem;
}

/* ---------- Stub / coming soon page ---------- */
.stub-box {
  border: 1px dashed var(--border-strong);
  padding: 2rem 1.75rem;
  text-align: left;
  color: var(--ink-muted);
  margin-top: 1rem;
}

.stub-box p {
  margin: 0 0 0.9rem;
}

@media (max-width: 560px) {
  .article-title { font-size: var(--step-4); }
  .prev-next-nav { flex-direction: column; }
  .nav-link, .nav-link.next { max-width: 100%; text-align: left; margin-left: 0; }
}
