/* Help & guides (docs/help.md): index, articles, editor. Tokens from theme.css only. */

.help-search { display: flex; gap: 0.6rem; align-items: center; max-width: 44rem; margin-top: 1.2rem; }
.help-search .input { font-size: 1.05rem; padding: 0.8em 1em; }
.help-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 0.9rem; margin-bottom: 1.6rem; }
.help-quick a { display: flex; flex-direction: column; gap: 0.35rem; color: inherit; text-decoration: none; height: 100%; }
.help-quick b { font-family: var(--font-ui); font-size: 1.08rem; letter-spacing: 0.03em; color: var(--text); }
.help-quick small { color: var(--text-muted); font-size: 0.84rem; line-height: 1.45; }
.help-quick .hud-label { color: var(--cyan); }

.help-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.1rem; align-items: start; }
.help-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.help-list a { display: block; padding: 0.5rem 0.6rem; color: inherit; text-decoration: none; border-left: 2px solid transparent; transition: background var(--fast), border-color var(--fast); }
.help-list a:hover, .help-list a:focus-visible { background: var(--glass-hover); border-left-color: var(--cyan); outline: none; }
.help-list b { display: block; font-family: var(--font-ui); font-size: 1.02rem; letter-spacing: 0.02em; color: var(--text); }
.help-list small { display: block; color: var(--text-muted); font-size: 0.82rem; line-height: 1.45; margin-top: 0.1rem; }
.help-list .chip { margin-left: 0.4rem; vertical-align: middle; }
.help-results { max-width: 52rem; }
.help-results .help-list a { padding: 0.75rem 0.8rem; }
.help-results .help-cat { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); }

.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: 1.2rem; align-items: start; }
.help-side { display: flex; flex-direction: column; gap: 1.1rem; position: sticky; top: 5.5rem; }
@media (max-width: 960px) { .help-layout { grid-template-columns: 1fr; } .help-side { position: static; } }
.help-lead { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; max-width: 46rem; margin: 0.8rem 0 0; }
.help-toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.88rem; }
.help-toc a { color: var(--text-muted); text-decoration: none; }
.help-toc a:hover { color: var(--cyan); }
.help-toc .lvl3 { padding-left: 0.9rem; font-size: 0.82rem; }
.help-meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; margin-top: 1.4rem; padding-top: 0.9rem; border-top: 1px solid var(--line); color: var(--text-dim); font-size: 0.8rem; }
.help-stuck p { margin: 0 0 0.8rem; color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; }

/* the article text */
.help-prose { line-height: 1.7; font-size: 1rem; max-width: 50rem; }
.help-prose > :first-child { margin-top: 0; }
.help-prose h2 { font-family: var(--font-ui); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.04em; margin: 2rem 0 0.7rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--line); scroll-margin-top: 5.5rem; }
.help-prose h3 { font-family: var(--font-ui); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.03em; margin: 1.5rem 0 0.5rem; color: var(--cyan); scroll-margin-top: 5.5rem; }
.help-prose h4 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); margin: 1.3rem 0 0.4rem; }
.help-prose p { margin: 0 0 0.9rem; }
.help-prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong); }
.help-prose a:hover { text-decoration-color: var(--cyan); }
.help-prose strong { color: var(--text); }
.help-prose ul { margin: 0 0 1rem; padding-left: 1.3rem; }
.help-prose li { margin: 0.25rem 0; }
.help-prose li::marker { color: var(--cyan); }
/* numbered lists are step-by-step guides: a numbered badge per step */
.help-prose ol { list-style: none; counter-reset: step; margin: 0 0 1.1rem; padding: 0; }
.help-prose ol > li { counter-increment: step; position: relative; padding: 0.15rem 0 0.15rem 2.6rem; margin: 0.55rem 0; }
.help-prose ol > li::before { content: counter(step); position: absolute; left: 0; top: 0.1rem; width: 1.8rem; height: 1.6rem; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); background: rgba(54, 227, 255, 0.1); border: 1px solid var(--line-strong);
  clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm)); }
.help-prose code { font-family: var(--font-mono); font-size: 0.86em; padding: 0.1em 0.35em; background: rgba(54, 227, 255, 0.08); border: 1px solid var(--line); color: var(--text); }
.help-prose pre { padding: 0.8rem 1rem; background: rgba(5, 10, 24, 0.7); border: 1px solid var(--line); overflow-x: auto; }
.help-prose pre code { padding: 0; border: 0; background: none; }
/* quotes are tips and warnings */
.help-prose blockquote { margin: 1rem 0; padding: 0.7rem 1rem; border-left: 3px solid var(--cyan); background: rgba(54, 227, 255, 0.06); color: var(--text); }
.help-prose blockquote p:last-child { margin-bottom: 0; }
.help-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.1rem; font-size: 0.92rem; }
.help-prose th { text-align: left; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--line-strong); padding: 0.45rem 0.6rem; }
.help-prose td { border-bottom: 1px solid var(--line); padding: 0.45rem 0.6rem; vertical-align: top; }
.help-prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.6rem 0; }
.help-prose img { max-width: 100%; height: auto; border: 1px solid var(--line); }

/* editor */
.help-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 1100px) { .help-editor { grid-template-columns: 1fr; } }
.help-editor textarea { font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.55; min-height: 34rem; resize: vertical; }
.help-preview { max-height: 46rem; overflow-y: auto; }
.help-cheats { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 0.9rem; font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.help-cheats dt { font-family: var(--font-mono); color: var(--text); }
.help-cheats dd { margin: 0; }
.help-rev { border-top: 1px solid var(--line); padding: 0.8rem 0; }
.help-rev-head { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; }

/* the Help link in the top bar */
.nav .nav-help { display: inline-flex; align-items: center; gap: 0.4rem; }
.nav .nav-help .q { display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; border: 1px solid currentColor; border-radius: 50%; font-size: 0.7rem; line-height: 1; }
