/* Help / documentation page — self-contained (does not load the app's layout
   stylesheet, so it scrolls freely). Reuses the app's theme palette. */
:root {
  --bg: #07090f; --bg2: #0b0e17; --panel: #0e1220; --card: #121729;
  --line: #1e2540; --text: #d7ddee; --muted: #7a86a8;
  --accent: #ffb347; --accent2: #ff6a00; --blue: #4da3ff; --green: #3ddc97; --red: #ff5470;
  --font: "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #0d1322 0%, var(--bg) 60%);
  color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.65;
  min-height: 100%;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* top bar */
.help-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px; background: rgba(7, 9, 15, .82); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.help-top .sun { width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffe08a, var(--accent) 45%, var(--accent2) 100%);
  box-shadow: 0 0 14px rgba(255, 140, 0, .6); flex: none; }
.help-top h1 { font-size: 15px; letter-spacing: 2px; color: var(--accent); font-weight: 700; }
.help-top .back { margin-left: auto; font-size: 12px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); }
.help-top .back:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* layout */
.wrap { display: flex; gap: 36px; max-width: 1100px; margin: 0 auto; padding: 28px 22px 80px; align-items: flex-start; }
nav.toc { position: sticky; top: 70px; width: 210px; flex: none; font-size: 12.5px; }
nav.toc .toc-title { color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-size: 10px; margin-bottom: 8px; }
nav.toc ol { list-style: none; counter-reset: t; }
nav.toc li { counter-increment: t; margin: 2px 0; }
nav.toc a { color: var(--muted); display: block; padding: 3px 8px; border-left: 2px solid transparent; border-radius: 0 4px 4px 0; }
nav.toc a::before { content: counter(t) ". "; opacity: .6; }
nav.toc a:hover { color: var(--text); border-left-color: var(--accent); background: rgba(255,255,255,.03); text-decoration: none; }
main.doc { flex: 1; min-width: 0; max-width: 780px; }

/* typography */
.doc section { padding-top: 18px; scroll-margin-top: 64px; margin-bottom: 30px; }
.doc h2 { font-size: 19px; color: var(--text); margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.doc h2 .n { color: var(--accent); margin-right: 8px; font-weight: 700; }
.doc h3 { font-size: 14px; color: var(--accent); margin: 18px 0 6px; letter-spacing: .3px; }
.doc p { margin: 8px 0; color: #c3cbe2; }
.doc .lead { font-size: 15px; color: var(--text); }
.doc ul { margin: 8px 0 8px 4px; list-style: none; }
.doc ul li { position: relative; padding-left: 18px; margin: 5px 0; color: #c3cbe2; }
.doc ul li::before { content: "▸"; position: absolute; left: 2px; color: var(--accent); opacity: .7; }
.doc strong, .doc b { color: var(--text); }
.doc code { background: #0a0f1e; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; color: var(--accent); }
.muted { color: var(--muted); }

/* reusable example chips/badges (mirror the live app) */
.legend-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { display: inline-flex; align-items: baseline; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; font-size: 12px; }
.chip .k { font-weight: 700; }
.chip .r { color: var(--muted); font-size: 10.5px; }
.badge { display: inline-block; font-size: 10px; letter-spacing: .5px; font-weight: 700; padding: 2px 7px; border: 1px solid currentColor; border-radius: 5px; }
.badge.hit { color: var(--red); } .badge.glance { color: var(--accent); }
.badge.miss { color: var(--muted); } .badge.pending { color: var(--blue); }

/* tables */
table.ref { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12.5px; }
table.ref th, table.ref td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ref th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: .5px; }
table.ref td:first-child { white-space: nowrap; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }

kbd {
  background: #0a0f1e; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 7px; font-size: 12px; color: var(--text);
}

/* callouts */
.callout { border-left: 3px solid var(--accent); background: rgba(255,179,71,.06); padding: 10px 14px; border-radius: 0 6px 6px 0; margin: 14px 0; font-size: 13px; }
.callout.warn { border-left-color: var(--red); background: rgba(255,84,112,.07); }
.callout b { color: var(--text); }

dl.glossary dt { color: var(--accent); font-weight: 700; margin-top: 12px; }
dl.glossary dd { color: #c3cbe2; margin: 2px 0 0; }

.foot { max-width: 1100px; margin: 0 auto; padding: 24px 22px 60px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

@media (max-width: 880px) {
  .wrap { flex-direction: column; gap: 14px; }
  nav.toc { position: static; width: 100%; columns: 2; }
}
