:root { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --bg: #0b0d12; --fg: #e8eaf0; --muted: #8a93a6; --card: #141824; --line: #232a3b; --accent: #7aa2ff; --ok: #5bd69a; --bad: #ff7a7a; font-family: ui-sans-serif, system-ui, sans-serif; }
@media (prefers-color-scheme: light) { :root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --bg: #f7f8fb; --fg: #121520; --muted: #5b6475; --card: #fff; --line: #dfe3ec; --accent: #2f5bd8; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); line-height: 1.5; }
a { color: var(--accent); }
header { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
header .brand { font-weight: 700; letter-spacing: .02em; text-decoration: none; color: var(--fg); }
header nav { display: flex; gap: 12px; flex-wrap: wrap; }
header .spacer { flex: 1; }
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
button { padding: 8px 14px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
button.secondary { background: transparent; color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.muted { color: var(--muted); }
.ok { color: var(--ok); } .bad { color: var(--bad); }
.row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.row > button { flex: 0 0 auto; }
.inbox li { padding: 6px 0; border-bottom: 1px solid var(--line); list-style: none; }
.inbox { padding: 0; margin: 0; max-height: 420px; overflow: auto; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { background: transparent; color: var(--fg); border-color: var(--line); }
.tabs button.active { border-color: var(--accent); color: var(--accent); }
[hidden] { display: none !important; }
/* docs (apps/site/build.mjs) */
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.docs.single { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.docs .sidebar { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow: auto; padding: 20px 0; font-size: 14px; }
.docs .sidebar ul { list-style: none; margin: 0 0 12px; padding: 0; }
.docs .sidebar li a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--fg); text-decoration: none; }
.docs .sidebar li a:hover { background: var(--card); }
.docs .sidebar li a[aria-current="page"] { background: var(--card); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }
.docs .sidebar p { margin: 14px 8px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
main.doc { max-width: 860px; margin: 0; padding: 20px 0 60px; }
main.doc h1, main.doc h2, main.doc h3 { line-height: 1.25; }
main.doc h2 { margin-top: 2em; padding-top: .4em; border-top: 1px solid var(--line); }
main.doc .anchor { color: inherit; text-decoration: none; }
main.doc .anchor:hover::after { content: " #"; color: var(--muted); }
main.doc blockquote { margin: 1em 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--card); border-radius: 0 6px 6px 0; }
main.doc table { margin: 1em 0; display: block; overflow-x: auto; }
main.doc :not(pre) > code { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; }
figure.code { margin: 1em 0; }
figure.code .code-title { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 4px 10px; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--card); }
figure.code .code-title a { color: var(--muted); text-decoration: none; }
figure.code .code-title + pre { margin-top: 0; border-radius: 0 0 6px 6px; }
.edit { margin-top: 3em; font-size: 13px; }
footer.site { max-width: 1100px; margin: 0 auto; padding: 16px; font-size: 13px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs .sidebar { position: static; max-height: none; padding-bottom: 0; border-bottom: 1px solid var(--line); }
  .docs .sidebar ul { display: flex; flex-wrap: wrap; gap: 2px; }
}
/* tools (src/web.ts) */
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 12px; }
.formgrid small { display: block; font-size: 12px; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.summary { margin-top: 12px; }
a.tile { display: block; color: inherit; text-decoration: none; }
a.tile:hover { border-color: var(--accent); }
a.tile h3 { color: var(--accent); margin-top: 0; }
.scroll { overflow-x: auto; }
@media (max-width: 760px) { .formgrid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
/* usage chart (console/usage-chart.js) */
.usage-head { margin-bottom: 6px; }
.usage-total { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.legend .key i, .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.usage-plot { position: relative; }
.usage-plot svg { width: 100%; height: auto; display: block; }
.usage-plot .grid { stroke: var(--line); stroke-width: 1; }
.usage-plot .axis { stroke: var(--muted); stroke-width: 1; }
.usage-plot .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.usage-plot .tip { position: absolute; top: 0; pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 13px; box-shadow: 0 2px 8px rgb(0 0 0 / .2); white-space: nowrap; }
.usage-plot .tip .num { float: right; margin-left: 16px; font-variant-numeric: tabular-nums; }
.usage-plot .tip .tip-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
details > summary { cursor: pointer; color: var(--accent); margin: 8px 0; }
details table { margin-bottom: 10px; }
/* status page */
.status-banner { font-size: 18px; }
.status-banner.ok { border-color: var(--ok); }
.status-banner.bad { border-color: var(--bad); }
.state { white-space: nowrap; }
.state-ok { color: var(--ok); } .state-bad { color: var(--bad); } .state-off { color: var(--muted); }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 8px 0; padding: 6px 10px; }
fieldset legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
label.check { display: inline-flex; align-items: center; gap: 6px; margin: 4px 14px 4px 0; color: var(--fg); }
label.check input { width: auto; }
