/* ==========================================================
   DonaTrainer — Handbook layout (sits on top of home.css tokens)
   ========================================================== */

.guide-shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 36px 20px 100px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 44px;
  align-items: start;
}

/* ---------- Sidebar: gate-directory nav ---------- */
.guide-nav {
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 8px;
}
.guide-nav .gn-head {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.guide-nav a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: var(--muted);
}
.guide-nav a .gn-num { font-family: var(--font-mono); font-size: 0.74rem; color: var(--brand); flex-shrink: 0; }
.guide-nav a:hover { background: var(--panel-2); color: var(--text); }
.guide-nav a.active { background: var(--brand-light); color: var(--text); }

/* ---------- Content ---------- */
.guide-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  color: #fff;
  margin-bottom: 10px;
}
.guide-content .lede { color: var(--muted); font-size: 1.05rem; max-width: 62ch; margin-bottom: 8px; }

.chapter { padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.chapter:first-of-type { border-top: none; margin-top: 0; }
.chapter .ch-eyebrow { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--amber); }
.chapter h2 { text-align: left; font-size: 1.5rem; margin: 6px 0 14px; }
.chapter p { color: var(--text); line-height: 1.75; }
.chapter p.muted { color: var(--muted); }
.chapter ul.tick-list { margin: 14px 0; }
.chapter ul.tick-list li { position: relative; padding-left: 22px; margin-bottom: 8px; color: var(--text); line-height: 1.6; }
.chapter ul.tick-list li::before { content: "›"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

/* Command syntax panels */
.cmd-block {
  background: #06110B;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-strong);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0;
}
.cmd-block .syntax { font-family: var(--font-mono); color: var(--brand); font-weight: 600; font-size: 0.92rem; display: block; }
.cmd-block .desc { color: var(--muted); font-size: 0.86rem; margin-top: 8px; line-height: 1.6; }
.cmd-block .desc code { background: var(--panel-2); }

/* Two-up command grid for compact examples */
.cmd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
@media (max-width: 700px) { .cmd-grid { grid-template-columns: 1fr; } }

/* Quick reference table */
.ref-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 16px 0; }
table.ref-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.ref-table th {
  text-align: left; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--muted); background: var(--panel-2); padding: 10px 14px; position: sticky; top: 0;
}
table.ref-table td { padding: 9px 14px; border-top: 1px solid var(--line); vertical-align: top; }
table.ref-table td:first-child { font-family: var(--font-mono); color: var(--brand); white-space: normal; min-width: 140px; }
table.ref-table tr:nth-child(even) td { background: rgba(255,255,255,0.015); }

.callout {
  background: var(--brand-light);
  border: 1px solid rgba(53,226,140,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text);
  margin: 16px 0;
}
.callout strong { color: var(--brand); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .guide-shell { grid-template-columns: 1fr; }
  .guide-nav { position: static; max-height: none; }
}
