/* theme: nocturne — The mecha palette. Dark-first, violet accent, amber for anything called out. */
:root {
  color-scheme: light dark;
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 8px;
  --ground: #ffffff;
  --surface: #f7f7fa;
  --text: #1a1a22;
  --muted: #5a5a68;
  --line: #dcdce4;
  --accent: #5d5294;
  --on-accent: #ffffff;
  --ring: #9184d9;
  --signal: #96601f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #12141f;
    --surface: #161826;
    --text: #e9e9ed;
    --muted: #9a9aa8;
    --line: #2b2741;
    --accent: #b5abfc;
    --on-accent: #12141f;
    --ring: #9184d9;
    --signal: #e8a24a;
  }
}
:root[data-theme="light"] {
  --ground: #ffffff;
  --surface: #f7f7fa;
  --text: #1a1a22;
  --muted: #5a5a68;
  --line: #dcdce4;
  --accent: #5d5294;
  --on-accent: #ffffff;
  --ring: #9184d9;
  --signal: #96601f;
}
:root[data-theme="dark"] {
  --ground: #12141f;
  --surface: #161826;
  --text: #e9e9ed;
  --muted: #9a9aa8;
  --line: #2b2741;
  --accent: #b5abfc;
  --on-accent: #12141f;
  --ring: #9184d9;
  --signal: #e8a24a;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--text); line-height: 1.6;
       font-family: var(--font-sans); }
main { max-width: 46rem; margin: 0 auto; padding: 2.5rem 1.25rem 5rem; }
h1, h2, h3 { line-height: 1.25; margin: 2rem 0 .6rem; }
h1 { font-size: 1.75rem; margin-top: 0; }
h2 { font-size: 1.3rem; border-bottom: 1px solid var(--line); padding-bottom: .3rem; }
h3 { font-size: 1.05rem; }
p, ul, ol, blockquote, table { margin: .8rem 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
blockquote { margin-left: 0; padding-left: 1rem; border-left: 3px solid var(--line);
             color: var(--muted); }
code { background: var(--surface); padding: .1rem .3rem; border-radius: var(--radius);
       font-family: var(--font-mono); font-size: .9em; }
pre { background: var(--surface); padding: .8rem 1rem; border-radius: var(--radius);
      overflow-x: auto; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: .4rem .6rem; text-align: left; }
th { background: var(--surface); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
img { max-width: 100%; height: auto; }
