:root {
  --bg: #ffffff; --text: #1c2333; --muted: #5b6478; --line: #e3e7ef; --accent: #2f6bff; --panel: #f5f7fb;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #070c1a; --text: #e8ecf5; --muted: #98a2b8; --line: #1e2840; --accent: #6f9bff; --panel: #0e1528; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #070c1a; --text: #e8ecf5; --muted: #98a2b8; --line: #1e2840; --accent: #6f9bff; --panel: #0e1528; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
header { border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
nav a { color: var(--muted); text-decoration: none; }
nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.wrap { max-width: 780px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
main { padding-top: 36px; padding-bottom: 56px; }
h1 { font-size: 32px; line-height: 1.2; margin: 0 0 6px; }
.updated { color: var(--muted); margin: 0 0 28px; font-size: 14px; }
h2 { font-size: 20px; margin: 36px 0 8px; }
h3 { font-size: 16px; margin: 22px 0 4px; }
p, li { color: var(--text); }
ul { padding-left: 22px; }
li { margin: 4px 0; }
a { color: var(--accent); }
.note { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 20px 0; }
.caps { text-transform: uppercase; font-size: 14px; letter-spacing: .01em; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { padding-top: 20px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
footer a { color: var(--muted); }
/* Inside the app (?app=1) the app has its own title bar. */
.in-app header, .in-app footer { display: none; }
.in-app main { padding-top: 8px; }
.in-app main > h1 { display: none; }
@media (max-width: 520px) { h1 { font-size: 26px; } header .wrap { flex-direction: column; align-items: flex-start; gap: 8px; } }
