:root {
  --bg: #f6f7f9; --card: #fff; --text: #1d2330; --muted: #667085; --line: #e3e6eb;
  --primary: #1f6feb; --primary-text: #fff; --danger: #c62828; --ok: #1b7f3b; --warn: #a15c00;
  --radius: 8px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11151c; --card: #1a1f29; --text: #e6e9ef; --muted: #98a2b3; --line: #2b3240; --primary: #4c8dff; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; overflow: auto; white-space: pre-wrap; word-break: break-all; }
pre.log { max-height: 60vh; }
pre.small { max-height: 14rem; margin: 0; }
.top { display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.25rem; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--text); }
.top nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.top nav a { padding: .35rem .6rem; border-radius: 6px; color: var(--muted); }
.top nav a.on { background: var(--bg); color: var(--text); font-weight: 600; }
.who { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .85rem; }
main { max-width: 1200px; margin: 1.5rem auto; padding: 0 1rem; }
main.narrow { max-width: 420px; margin-top: 12vh; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.stack > * { margin: 0; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.grid3 .card, .grid2 .card { margin: 0; }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.row-between h1, .row-between h2 { margin: 0; }
.actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.row-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: 0; }
.row-form input:not([type=hidden]) { flex: 1 1 14rem; }
.row-form.compact select { flex: 1 1 8rem; }
label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .9rem; }
label.inline { flex-direction: row; align-items: center; gap: .45rem; font-weight: 400; }
label small, label .muted { font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
legend { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.inline-list { display: flex; gap: 1.25rem; flex-wrap: wrap; }
input, select, textarea { font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: .45rem .6rem; width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; }
textarea { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .45rem .9rem; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn.small { padding: .25rem .6rem; font-size: .85rem; }
.btn.block { width: 100%; }
button.link { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }
.savebar { display: flex; justify-content: flex-end; gap: .5rem; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
td.actions { justify-content: flex-end; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.dim td { opacity: .55; }
.muted { color: var(--muted); }
.badge { display: inline-block; font-size: .75rem; padding: .05rem .45rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.badge.ok { color: var(--ok); } .badge.err { color: var(--danger); } .badge.warn { color: var(--warn); }
.notice { padding: .7rem .9rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid var(--line); background: var(--card); }
.notice.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.notice.err { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); }
.notice.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.tile-head { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin-bottom: .25rem; }
.dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--muted); }
.dot.up { background: var(--ok); } .dot.down { background: var(--danger); }
.copy { display: flex; gap: .5rem; }
.copy input { font-family: ui-monospace, Menlo, monospace; }
.login h1 { margin-bottom: .25rem; }
.login .dev { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
#map { height: 60vh; min-height: 360px; border-radius: var(--radius); border: 1px solid var(--line); }
.notes h2 { margin-top: 1.25rem; } .notes h2:first-child { margin-top: 0; }
[hidden] { display: none !important; }
