/* guide.css — public /guide page (templates/guide.html).
 *
 * Loads AFTER styles.css (brand tokens + .btn/.card) and landing.css
 * (lp-nav / lp-footer / section primitives). This file adds only the guide's
 * own layout: a sticky table of contents beside a prose column. All classes
 * are .gd- prefixed; anchors get scroll-margin + a :target flash so arriving
 * from a landing tile or an in-app "learn more" link visibly lands somewhere.
 */

.gd-layout {
  position: relative; z-index: 10;
  max-width: 1120px; margin: 0 auto; padding: 2rem 1.5rem 4rem;
  display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem;
  align-items: start;
}

/* ── Table of contents ────────────────────────────────────────────────── */
.gd-toc {
  position: sticky; top: 1.5rem;
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 1rem 0.5rem;
}
.gd-toc-title {
  margin: 0 0 0.5rem; padding: 0 0.6rem;
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
}
.gd-toc a {
  padding: 0.3rem 0.6rem; border-radius: 5px;
  font-size: 0.82rem; color: var(--text-muted); text-decoration: none;
  border-left: 2px solid transparent;
}
.gd-toc a:hover { color: var(--gold-light); background: rgba(212, 169, 85, 0.06); }

/* ── Prose ────────────────────────────────────────────────────────────── */
.gd-body { min-width: 0; max-width: 46rem; }
.gd-body h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.75rem); font-weight: 800;
  color: var(--gold-light); margin: 0 0 2rem;
}
.gd-body h2 {
  font-family: 'Cinzel', serif; letter-spacing: 0.02em;
  font-size: 1.45rem; font-weight: 700; color: var(--gold-light);
  margin: 2.75rem 0 0.9rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.gd-body h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
  margin: 1.9rem 0 0.5rem;
}
.gd-body p { margin: 0 0 0.9rem; font-size: 0.92rem; line-height: 1.7; color: var(--text-muted); }
.gd-body em { color: var(--text); font-style: normal; font-weight: 600; }
.gd-body strong { color: var(--gold-light); }

/* "Limits, plainly" paragraphs — the honesty voice gets its own quiet look. */
.gd-limits {
  padding-left: 0.9rem; border-left: 1px solid var(--border-gold);
  font-size: 0.85rem !important; color: var(--text-dim) !important;
}
/* "Where to find it" locator lines. */
.gd-locator { font-size: 0.8rem !important; color: var(--text-dim) !important; }
.gd-locator strong { color: var(--gold); }

/* Screenshot figures (M4 captures). */
.gd-figure {
  margin: 1.1rem 0 1.4rem;
  border: 1px solid var(--border-gold); border-radius: 8px; overflow: hidden;
  background: var(--bg-2);
}
.gd-figure img { display: block; width: 100%; }
.gd-figure figcaption {
  padding: 0.55rem 0.9rem; font-size: 0.75rem; color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* ── Anchor behavior ──────────────────────────────────────────────────── */
.gd-body [id] { scroll-margin-top: 1.5rem; }
.gd-body :target > h2, .gd-body :target > h3 { animation: gd-flash 1.6s ease-out 1; }
@keyframes gd-flash {
  0%   { color: var(--gold); }
  100% { }
}

/* ── Small screens ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .gd-layout { grid-template-columns: 1fr; gap: 1rem; }
  /* The ToC becomes a plain link block at the top — sticky sidebars and
     phones don't mix. */
  .gd-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 0.35rem; }
  .gd-toc-title { width: 100%; }
  .gd-toc a { border: 1px solid var(--border); border-left-width: 1px; font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gd-body :target > h2, .gd-body :target > h3 { animation: none; }
}
