/* AIOAT docs — static site for docs-aioat.imjia.dk.
   Dark-first (matches the app), light theme via prefers-color-scheme. */

:root {
  --bg: #0e1116;
  --panel: #151b23;
  --ink: #e6edf3;
  --muted: #8b96a5;
  --line: #242c37;
  --accent: #6e93ff;
  --mint: #3fd0b0;
  --amber: #e8c07d;
  --chip: #1d2530;
  --code-bg: #10151c;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f5f9;
    --panel: #ffffff;
    --ink: #1b2330;
    --muted: #5c6675;
    --line: #dce2ec;
    --accent: #3a5fd0;
    --mint: #178f76;
    --amber: #a96e12;
    --chip: #e9edf5;
    --code-bg: #eef1f7;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.65 "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell { display: flex; min-height: 100vh; max-width: 1160px; margin: 0 auto; }

/* left nav */
.nav {
  width: 230px;
  flex-shrink: 0;
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-weight: 700; font-size: 18px; color: var(--ink);
  margin-bottom: 4px;
}
.brand:hover { text-decoration: none; }
.brand .tile {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
}
.brand-sub {
  font: 500 10.5px/1.3 "IBM Plex Mono", Consolas, monospace;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 18px 38px;
}
.nav ul { list-style: none; margin: 0 0 14px; padding: 0; }
.nav .sect {
  font: 500 10px/1 "IBM Plex Mono", Consolas, monospace;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 16px 0 6px 2px;
}
.nav li a {
  display: block; padding: 5px 9px; border-radius: 7px;
  color: var(--ink); font-size: 13.5px;
}
.nav li a:hover { background: var(--chip); text-decoration: none; }
.nav li a.here {
  background: var(--chip); color: var(--ink);
  box-shadow: inset 2px 0 0 var(--accent); font-weight: 600;
}

/* content */
main { flex: 1; min-width: 0; padding: 34px 44px 90px; }
h1 {
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-size: 34px; font-weight: 700; line-height: 1.15;
  letter-spacing: -0.01em; margin: 6px 0 6px; text-wrap: balance;
}
.lede { font-size: 16.5px; color: var(--muted); max-width: 62ch; margin: 0 0 26px; }
h2 {
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-size: 22px; font-weight: 700; margin: 40px 0 8px;
  padding-top: 8px; border-top: 1px solid var(--line);
}
h3 { font-size: 16px; font-weight: 600; margin: 22px 0 4px; }
p, li { max-width: 70ch; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
strong { font-weight: 600; }

kbd {
  font: 500 12px "IBM Plex Mono", Consolas, monospace;
  background: var(--chip); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px;
  white-space: nowrap;
}
code {
  font: 400 13px "IBM Plex Mono", Consolas, monospace;
  background: var(--code-bg); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px;
}
pre {
  background: var(--code-bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; overflow-x: auto;
  max-width: 78ch;
}
pre code { background: none; border: 0; padding: 0; }

.note {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 8px;
  padding: 10px 14px; margin: 14px 0; max-width: 74ch;
}
.note.warn { border-left-color: var(--amber); }
.note.ok { border-left-color: var(--mint); }

table { border-collapse: collapse; margin: 12px 0; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: 6px 12px; text-align: left; font-size: 14px; }
th { background: var(--chip); font-weight: 600; }

.pager {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 56px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 14px;
}
footer.colophon {
  margin-top: 26px; color: var(--muted); font-size: 12.5px;
}

@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .nav { position: static; width: 100%; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
  main { padding: 24px 20px 70px; }
}
