:root {
  color-scheme: dark;
  --bg: #0f1115; --card: #171a21; --line: #262b36;
  --fg: #e6e9ef; --muted: #8b93a7; --accent: #4c8dff; --danger: #ff5c68;
  --ok: #46d38a;
}
* { box-sizing: border-box; }
body {
  margin: 0; padding: 24px; background: var(--bg); color: var(--fg);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 17px; margin: 0 0 4px; }
header { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.sub { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 22px; }
.narrow { max-width: 360px; margin: 10vh auto; }
label { display: block; margin: 12px 0; font-size: 13px; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 8px; color: var(--fg); }
input, textarea { width: 100%; margin-top: 4px; padding: 9px 10px;
  border-radius: 7px; border: 1px solid var(--line); background: #0d0f14;
  color: var(--fg); font: inherit; }
textarea { font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px; resize: vertical; }
input[type=checkbox] { width: auto; margin: 0; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button { padding: 9px 14px; border-radius: 7px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; font: inherit; cursor: pointer; }
button:hover:not(:disabled) { filter: brightness(1.1); }
button:disabled { opacity: .55; cursor: progress; }
button.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px;
  border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase;
  letter-spacing: .04em; }
td.mono { font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; color: var(--muted); }
td.actions-cell { display: flex; gap: 6px; }
td.actions-cell button { padding: 5px 10px; font-size: 13px; }
tr.off td { opacity: .42; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; border: 1px solid var(--line); color: var(--muted); }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pill.bad { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.err { color: var(--danger); font-size: 13px; min-height: 1.2em; margin: 8px 0 0; }
dialog { background: var(--card); color: var(--fg); border: 1px solid var(--line);
  border-radius: 12px; padding: 22px; width: min(460px, 94vw); }
dialog::backdrop { background: rgba(0,0,0,.6); }
#links-dlg { width: min(760px, 94vw); }
.dlg-head { display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 6px; }
@media (max-width: 720px) {
  body { padding: 14px; }
  th:nth-child(2), td:nth-child(2), th:nth-child(4), td:nth-child(4) { display: none; }
}