/* ============================================================
   alexneff.dev/course/starter — long-form article styles
   ============================================================ */

.article {
  position: relative;
}
.article-wrap {
  max-width: 760px;
  padding: 80px 28px 96px;
}
@media (max-width: 720px) {
  .article-wrap { padding: 56px 22px 72px; }
}

/* table of contents — sticky on desktop, inline on mobile */
.toc {
  position: fixed;
  left: 28px; top: 100px;
  width: 220px;
  z-index: 4;
  display: none;
}
@media (min-width: 1300px) {
  .toc { display: block; }
}
.toc-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.toc ol {
  list-style: none;
  counter-reset: toc;
  padding: 0;
}
.toc ol li {
  counter-increment: toc;
  margin-bottom: 10px;
  padding-left: 28px;
  position: relative;
}
.toc ol li::before {
  content: "0" counter(toc);
  position: absolute;
  left: 0; top: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.toc ol li a {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
  display: block;
  transition: color .2s ease;
}
.toc ol li a:hover { color: var(--accent); }

/* article sections */
.art {
  margin-bottom: 64px;
  scroll-margin-top: 100px;
}
.art-num {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--sans);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.2;
}
.art-num span {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.art-h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 28px 0 12px;
}
.art p {
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.art p strong { color: var(--text); font-weight: 600; }
.art p em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text);
}
.art p code, .art li code {
  background: var(--bg-elev);
  padding: 1px 7px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  border: 1px solid var(--border);
}
.art-list {
  list-style: none;
  margin: 14px 0 22px;
}
.art-list li {
  padding: 6px 0 6px 22px;
  position: relative;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}
.art-list li::before {
  content: "→";
  position: absolute; left: 0; top: 6px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
}
.art-list li strong { color: var(--text); }

ol.numbered {
  margin: 14px 0 22px;
  padding-left: 0;
  list-style: none;
  counter-reset: ord;
}
ol.numbered li {
  counter-increment: ord;
  padding: 8px 0 8px 38px;
  position: relative;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}
ol.numbered li::before {
  content: counter(ord);
  position: absolute; left: 0; top: 7px;
  width: 24px; height: 24px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
ol.numbered li strong { color: var(--text); }

/* callout box */
.callout {
  border-left: 2px solid var(--accent);
  background: var(--bg-elev);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.65;
}
.callout strong { color: var(--accent); font-weight: 600; }
.callout.small { font-size: 13.5px; padding: 14px 18px; }

/* prompt box — student types this */
.prompt-box {
  border: 1px dashed color-mix(in oklab, var(--accent) 70%, var(--border-strong));
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--accent) 4%, var(--bg-card));
  padding: 22px 24px 18px;
  margin: 28px 0;
}
.prompt-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.prompt-text {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
}

/* terminals (article variant uses .terminal.small for compact) */
.terminal.small {
  margin: 18px 0;
  box-shadow: 0 12px 36px -18px rgba(0,0,0,0.7);
}
.terminal.small .terminal-body {
  padding: 14px 18px;
  font-size: 12.5px;
  line-height: 1.7;
}

/* "where to go from here" */
.next-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.next-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 22px 22px 18px;
  display: flex; flex-direction: column;
  transition: border-color .2s ease, transform .2s ease;
}
.next-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.next-card.highlight {
  border-color: var(--accent);
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 6%, var(--bg-card)) 0%, var(--bg-card) 80%);
}
.next-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.005em;
}
.next-card p {
  color: var(--text-dim);
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  margin-bottom: 14px !important;
  flex-grow: 1;
}
.next-card .btn-primary, .next-card .btn-secondary {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

/* agent anatomy grid */
.agent-anatomy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 22px 0 28px;
}
.anatomy-piece {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 18px 18px 16px;
}
.anatomy-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.anatomy-piece p {
  color: var(--text-dim);
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  margin-bottom: 0 !important;
}

/* final closer */
.art-final {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 56px;
  margin-top: 72px;
}
