/* Tutorial-specific styles  (loaded after main + readiness/project styles) */

.tutorial-page {
  max-width: 820px;
}

.tutorial-page section {
  margin-top: 3.5rem;
}

.tutorial-page h2 {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: clamp(1.3rem, 2vw, 1.5rem);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule-strong);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  letter-spacing: 0;
}

.tutorial-page p {
  max-width: none;
}

.tutorial-page p code,
.tutorial-page li code {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  padding: 0.1em 0.4em;
  background: var(--bg-alt);
  border-radius: 3px;
  color: var(--ink);
  border: 1px solid var(--rule);
}

/* ─── code blocks (Prism) ──────────────────────────────────────────────── */

.tutorial-page pre {
  background: #1f1d1b;
  color: #f4f1ea;
  border-radius: 6px;
  padding: 1.1rem 1.3rem;
  margin: 1.1rem 0 1.4rem;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(28,25,23,0.08), inset 0 0 0 1px rgba(255,255,255,0.04);
}

.tutorial-page pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
}

/* Prism overrides — soften the tomorrow theme to fit our warm palette */
.tutorial-page .token.comment,
.tutorial-page .token.prolog,
.tutorial-page .token.doctype,
.tutorial-page .token.cdata { color: #8a8278; font-style: italic; }
.tutorial-page .token.string,
.tutorial-page .token.attr-value,
.tutorial-page .token.regex { color: #c4a075; }
.tutorial-page .token.keyword,
.tutorial-page .token.boolean,
.tutorial-page .token.builtin { color: #d97757; }
.tutorial-page .token.function,
.tutorial-page .token.class-name { color: #f0b896; }
.tutorial-page .token.number { color: #b8a780; }
.tutorial-page .token.operator,
.tutorial-page .token.punctuation { color: #c8c0b3; }
.tutorial-page .token.variable,
.tutorial-page .token.parameter { color: #e8dfd0; }
.tutorial-page .token.decorator { color: #d97757; }

/* ─── callout / aside boxes ──────────────────────────────────────────── */

.callout {
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  margin: 2rem 0 0;
}
.callout p { margin: 0 0 0.5rem; color: var(--ink-2); }
.callout p:last-child { margin-bottom: 0; }
.callout pre { margin: 0.6rem 0; }

.aside {
  margin: 0.8rem 0 0;
  padding: 0.55rem 0 0.55rem 1rem;
  border-left: 2px solid var(--rule-strong);
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  background: transparent;
}
.aside strong { color: var(--ink-2); }

/* ─── table of contents ──────────────────────────────────────────────── */

.toc {
  margin: 2rem 0 3rem;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.toc-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.7rem;
}
.toc ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  columns: 2;
  column-gap: 2rem;
  counter-reset: toc;
}
@media (max-width: 640px) { .toc ol { columns: 1; } }

.toc li {
  counter-increment: toc;
  padding: 0.25rem 0;
  font-size: 0.96rem;
  break-inside: avoid;
}
.toc li::before {
  content: counter(toc, decimal-leading-zero) " · ";
  color: var(--ink-faint);
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.toc a {
  color: var(--ink-2);
  border-bottom: 0;
}
.toc a:hover { color: var(--accent); border-bottom: 1px solid var(--accent); }

/* ─── small tweaks ───────────────────────────────────────────────────── */

.tutorial-page .findings li {
  margin-bottom: 0.55rem;
}

.tutorial-page .source p code {
  white-space: nowrap;
}
