/* ═══════════════════════════════════════════════════
   guide.css — Step-by-Step Guide page (rendered from Tutorial.md)
   Reuses the design tokens defined in styles.css (:root).
   ═══════════════════════════════════════════════════ */

.guide-body { background: var(--bg); padding-top: var(--nav-h); }  /* clear the fixed nav */

/* ── Toolbar under the nav: kicker + View PDF ── */
.guide-toolbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  background: var(--nav-2);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.guide-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.guide-kicker {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.btn--sm { padding: 8px 16px; font-size: 0.85rem; gap: 7px; }
.btn--sm svg { stroke: currentColor; stroke-width: 1.4; fill: none; }

/* ── Article shell ── */
.guide-page { padding: 48px 0 96px; }
.guide {
  max-width: 800px;
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.75;
}

/* ── Paragraphs & inline ── */
.guide p { margin: 0 0 1.2em; }
.guide strong { color: #f3f6fc; font-weight: 600; }
.guide em { color: var(--text); }
.guide a { color: var(--blue); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s; }
.guide a:hover { border-bottom-color: var(--blue); }

/* ── Headings: strong vertical rhythm so nothing runs together ── */
.guide h2 {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--text);
  margin: 3.6rem 0 1.3rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-mid);
}
.guide h3 {
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  margin: 2.8rem 0 0.85rem;
}
.guide h4 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--blue);
  margin: 2rem 0 0.7rem;
}
.guide h2 + p, .guide h3 + p, .guide h4 + p { margin-top: 0; }

/* Code used AS a heading (appendix class names like `UJSSaveGameWorldProxy`) */
.guide h2 code, .guide h3 code {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.9em;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  color: var(--gold-light);
}
/* give each appendix class entry a clear top divider */
.guide h3:has(code) {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}

/* ── Inline code & code blocks ── */
.guide code {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.85em;
  background: var(--surface-2);
  color: var(--code);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
}
.guide pre {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 1.4rem 0;
  box-shadow: var(--shadow);
}
.guide pre code { background: none; border: none; padding: 0; color: var(--code); font-size: 0.85rem; line-height: 1.6; }

/* ── Lists ── */
.guide ul, .guide ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.guide li { margin: 0.5em 0; line-height: 1.7; }
.guide li > p { margin: 0.4em 0; }
.guide ul li::marker { color: var(--gold); }
.guide ol li::marker { color: var(--gold); font-weight: 600; }
.guide li strong { color: #fff; }
.guide li > ul, .guide li > ol { margin: 0.55em 0 0.2em; }

/* ── Tables ── */
.guide table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.94rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.guide th, .guide td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.guide th { background: var(--surface-2); color: var(--text); font-weight: 600; letter-spacing: 0.02em; }
.guide tr:last-child td { border-bottom: none; }
.guide td code { background: var(--surface-3); }

/* ── Images (editor screenshots) ── */
.guide img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.8rem auto;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ── Callouts (blockquotes) ── */
.guide blockquote {
  margin: 1.7rem 0;
  padding: 1.1rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
}
.guide blockquote > :first-child { margin-top: 0; }
.guide blockquote > :last-child { margin-bottom: 0; }
.guide blockquote p { margin: 0.55em 0; }
.guide blockquote strong { color: var(--gold-light); }
.guide blockquote table { margin: 0.8rem 0; background: var(--bg-alt); }
.guide blockquote td strong, .guide blockquote th { color: var(--text); }

/* ── Rules ── */
.guide hr { border: none; border-top: 1px solid var(--border); margin: 2.6rem 0; }

/* page-break marker from the markdown is a no-op on screen */
.guide .page-break { display: none; }

/* TOC anchor jumps must clear the fixed nav + sticky toolbar */
.guide h1, .guide h2, .guide h3, .guide h4 { scroll-margin-top: calc(var(--nav-h) + 64px); }

@media (max-width: 720px) {
  .guide { font-size: 1rem; }
  .guide h2 { font-size: 1.45rem; margin-top: 2.6rem; }
  .guide h3 { font-size: 1.2rem; }
}
