/* tuimote.org/docs — shared stylesheet for the docs pages (hand-written
   index.html and the generated cli.html). Palette matches ../index.html. */
:root {
  --bg: #ffffff;
  --fg: #1c1c24;
  --muted: #6a6a74;
  --link: #b34700;
  --accent: #ff7200;
  --codebg: #f4f3f6;
  --border: #d9d8de;
  --warn: #c0392b;
  --warnbg: #fdf0ee;
  --warnbd: #f2c9c2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0b1c;
    --fg: #e8e6f0;
    --muted: #9a97ab;
    --link: #ff8a33;
    --accent: #ff7200;
    --codebg: #1a1730;
    --border: #2c2947;
    --warn: #ff6b5b;
    --warnbg: #2a1420;
    --warnbd: #4a2432;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  max-width: 46rem;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui, sans-serif;
}
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--accent); color: #fff; }

header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.25rem; }
header img { width: 44px; height: 44px; border-radius: 9px; }
h1 {
  font: 700 1.7rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 0;
}
h1 a { color: var(--fg); text-decoration: none; }
h1 a:hover { color: var(--accent); }
h1 .crumb { font-size: 1.05rem; font-weight: 400; color: var(--muted); }
h1 .crumb a { color: var(--muted); }

h2 {
  font: 700 1.05rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 2.25rem 0 0.75rem;
}
h2::before { content: "## "; color: var(--accent); }
h3 {
  font: 700 0.95rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 1.75rem 0 0.5rem;
}
h3::before { content: "### "; color: var(--accent); }
h4 {
  font: 700 0.9rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 1.5rem 0 0.5rem;
}
h4::before { content: "#### "; color: var(--accent); }
h2 code, h3 code, h4 code { background: none; padding: 0; font-size: inherit; }
section { scroll-margin-top: 1rem; }
h2, h3, h4 { scroll-margin-top: 1rem; }

ul, ol { padding-left: 1.3rem; }
li { margin: 0.35rem 0; }
li b { font-weight: 600; }

pre, code {
  font: 0.85rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--codebg);
}
code { padding: 0.1em 0.35em; border-radius: 4px; }
pre { padding: 0.9rem 1rem; border-radius: 6px; overflow-x: auto; margin: 0.5rem 0; }
pre code { padding: 0; background: none; }

kbd {
  font: 0.8rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--codebg);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.1em 0.4em;
  white-space: nowrap;
}

table { border-collapse: collapse; width: 100%; margin: 0.75rem 0; font-size: 0.92rem; }
th, td { border: 1px solid var(--border); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
th { background: var(--codebg); font-weight: 600; }
.tablewrap { overflow-x: auto; }

.warn {
  margin: 1.25rem 0 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  color: var(--fg);
  background: var(--warnbg);
  border: 1px solid var(--warnbd);
  border-left: 3px solid var(--warn);
  border-radius: 6px;
}
.warn b { color: var(--warn); }

/* docs landing TOC + the generated CLI reference */
nav.toc {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--codebg);
  border-radius: 8px;
  font-size: 0.92rem;
}
nav.toc ul { margin: 0; padding-left: 1.1rem; }
nav.toc li { margin: 0.25rem 0; }
.toc-verbs { color: var(--muted); }
.toc-verbs a { color: var(--link); text-decoration: none; }
.toc-verbs a:hover { text-decoration: underline; }
.toc-about { color: var(--muted); }

.cmd-about { color: var(--muted); margin: 0.25rem 0 0.5rem; }
dl.args { margin: 0.5rem 0 1rem; }
dl.args dt { margin-top: 0.5rem; }
dl.args dd { margin: 0.1rem 0 0 1.5rem; font-size: 0.95rem; }
dl.args dd:empty::after { content: "—"; color: var(--muted); }
.arg-meta { color: var(--muted); font-size: 0.88em; }

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
footer a { color: var(--muted); }
