/* Colours match ui/src/app.css, so the in-app help looks like the app. */
:root {
  --bg: #0e0f12;
  --surface: #17191e;
  --border: #2a2d35;
  --text: #e6e8ec;
  --text-muted: #8b909c;
  --accent: #4da3ff;
  color-scheme: dark;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
}
body { margin: 0; }
a { color: var(--accent); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--border); }
.site-header a { color: var(--text); font-weight: 600; text-decoration: none; }
.site-header nav { display: flex; gap: 18px; font-size: 14px; }
.site-header nav a { color: var(--text-muted); font-weight: 400; }
.site-header nav a:hover { color: var(--text); }
.layout { display: flex; align-items: flex-start; max-width: 1100px; margin: 0 auto; }
aside {
  position: sticky; top: 0; flex: 0 0 220px; max-height: 100vh; overflow-y: auto;
  padding: 20px 16px; border-right: 1px solid var(--border); font-size: 13px;
}
aside .home { display: block; margin-bottom: 14px; color: var(--text); font-weight: 600; text-decoration: none; }
aside h2 { margin: 16px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
aside ul { margin: 0; padding: 0; list-style: none; }
aside li a { display: block; padding: 3px 0; color: var(--text-muted); text-decoration: none; }
aside li a:hover, aside li a[aria-current] { color: var(--text); }
aside li a[aria-current] { font-weight: 600; }
main { flex: 1; min-width: 0; padding: 20px 32px 60px; line-height: 1.6; }
main h1 { margin-top: 0; }
main h2 { margin-top: 2em; padding-top: 0.4em; border-top: 1px solid var(--border); }
figure { margin: 1.5em 0; }
img { max-width: 100%; border: 1px solid var(--border); border-radius: 6px; }
figcaption { margin-top: 6px; font-size: 13px; color: var(--text-muted); }
table { border-collapse: collapse; margin: 1em 0; }
th, td { padding: 5px 12px; border: 1px solid var(--border); text-align: left; }
th { background: var(--surface); }
code { padding: 1px 5px; border-radius: 3px; background: var(--surface); font-size: 0.9em; }
pre { padding: 10px 14px; overflow-x: auto; border-radius: 6px; background: var(--surface); }
pre code { padding: 0; background: none; }
blockquote { margin: 1em 0; padding: 2px 16px; border-left: 3px solid var(--accent); background: var(--surface); }
.pager { display: flex; justify-content: space-between; margin-top: 3em; padding-top: 1em; border-top: 1px solid var(--border); }
/* Built-in help is a narrow pane: the contents fold up above the page. */
body.help .layout { display: block; }
body.help aside { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--border); }
body.help aside .home { display: inline-block; margin: 0 16px 0 0; }
body.help summary { display: inline-block; cursor: pointer; color: var(--text-muted); }
body.help main { padding: 16px 20px 40px; }
@media (max-width: 700px) {
  .layout { display: block; }
  aside { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--border); }
  main { padding: 16px; }
}
