:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #1b1f24; --muted: #5b6470; --line: #e2e5ea;
  --accent: #2f6fde; --on-accent: #ffffff; --ok: #1f9d55; --bad: #d64545; --wait: #9aa3ad;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216; --surface: #171b21; --text: #e6e9ee; --muted: #98a2ae; --line: #262c34;
    --accent: #6b9cff; --on-accent: #0b1020; --ok: #3ccf7d; --bad: #ff6b6b; --wait: #6b7480;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
a { color: var(--accent); }
.top { display: flex; align-items: center; justify-content: space-between; max-width: 960px; margin: 0 auto; padding: 16px; }
.brand { font-weight: 700; letter-spacing: .02em; color: var(--text); text-decoration: none; }
.ghost-link { font-size: 14px; color: var(--muted); text-decoration: none; }
.ghost-link:hover { color: var(--text); }
main { max-width: 960px; margin: 0 auto; padding: 0 16px 48px; }
.hero { padding: 48px 0 32px; }
.hero h1 { font-size: 40px; line-height: 1.2; margin: 0 0 8px; }
.lead { font-size: 20px; margin: 0 0 8px; }
.sub { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 6px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.foot { max-width: 960px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.wide { grid-column: 1 / -1; }
.login { max-width: 360px; margin: 48px auto; }
.login h1 { font-size: 20px; margin: 0 0 16px; }
form label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
input {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; padding: 10px 16px; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 6px 12px; font-size: 14px; }
button.small { padding: 4px 10px; font-size: 13px; }
.msg { color: var(--bad); font-size: 14px; min-height: 1.4em; margin: 8px 0 0; }
.rows, .links { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .val { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.row .val.bad { color: var(--bad); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--wait); }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.link a { overflow-wrap: anywhere; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.inline input { flex: 1 1 160px; width: auto; margin: 0; }
