:root {
  --ink:#070c14; --steel:#0e1828; --steel-2:#132136; --rule:#1d2c42; --frost:#d4e6f3; --mist:#8aa0b8;
  --arc:#6fd3f7; --ok:#5bd6a0; --alert:#ff6b5e; --warn:#f2b544;
  --text:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,sans-serif;
  color-scheme: dark;
}
* { box-sizing:border-box; }
html, body { margin:0; background:var(--ink); color:var(--frost); }
body { font:16px/1.5 var(--text); min-height:100vh; padding-bottom:env(safe-area-inset-bottom);
  background:radial-gradient(900px 500px at 20% -10%, #0f2238 0%, transparent 60%), var(--ink); }
button, input, textarea { font:inherit; color:inherit; }
button { background:transparent; border:1px solid var(--rule); border-radius:999px; padding:9px 16px; cursor:pointer; min-height:44px; }
button:hover { border-color:var(--arc); }
button:disabled { opacity:.5; cursor:default; }
button.go { border-color:#1f5a45; color:var(--ok); }
button.stop { border-color:#5c2622; color:var(--alert); }
button.ghost { border-color:transparent; color:var(--mist); padding:6px 10px; min-height:36px; }
:focus-visible { outline:2px solid var(--arc); outline-offset:2px; }
input, textarea { width:100%; background:var(--steel-2); border:1px solid var(--rule); border-radius:10px; padding:10px 12px; }
.top { display:flex; align-items:center; gap:12px; padding:14px 16px; border-bottom:1px solid var(--rule); position:sticky; top:0;
  background:rgba(7,12,20,.92); backdrop-filter:blur(8px); z-index:2; }
.brand { font-weight:600; letter-spacing:.32em; display:flex; align-items:center; gap:10px; }
.dot { width:10px; height:10px; border-radius:50%; background:var(--mist); box-shadow:0 0 0 0 transparent; }
.dot.on { background:var(--ok); box-shadow:0 0 12px var(--ok); }
.dot.off { background:var(--alert); }
.conn { color:var(--mist); font-size:14px; flex:1; }
main { max-width:760px; margin:0 auto; padding:16px; display:flex; flex-direction:column; gap:16px; }
.card { background:var(--steel); border:1px solid var(--rule); border-radius:16px; padding:16px; }
h1 { margin:0 0 6px; font-size:22px; }
h2 { margin:0; font-size:17px; font-weight:600; }
.dim { color:var(--mist); }
.row { display:flex; gap:10px; align-items:center; }
.row.wrap { flex-wrap:wrap; margin-top:12px; }
.between { justify-content:space-between; }
#login-form { display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.msg { color:var(--alert); min-height:1.5em; margin:0; }
.facts { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:10px 16px; margin:12px 0 0; }
.facts div { display:flex; flex-direction:column; }
.facts dt { color:var(--mist); font-size:13px; }
.facts dd { margin:0; font-size:15px; }
.ask { display:flex; gap:10px; margin-top:12px; align-items:flex-end; }
.ask textarea { flex:1; resize:vertical; }
.chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.chips button { font-size:14px; padding:6px 12px; min-height:36px; color:var(--mist); }
.replies { display:flex; flex-direction:column; gap:10px; margin-top:14px; }
.bubble { border-left:2px solid var(--arc); padding:4px 0 4px 12px; }
.bubble .q { color:var(--mist); font-size:14px; }
.bubble .a { white-space:pre-wrap; }
.bubble.pending .a { color:var(--mist); }
.bubble.err { border-left-color:var(--alert); }
.list { display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.item { border:1px solid var(--rule); border-radius:12px; padding:12px; }
.item .t { font-weight:600; }
.item .s { color:var(--mist); font-size:14px; }
.bar { height:6px; border-radius:3px; background:var(--steel-2); overflow:hidden; margin:8px 0; }
.bar i { display:block; height:100%; background:var(--ok); }
.ms-form { display:flex; flex-direction:column; gap:8px; margin-top:16px; border-top:1px solid var(--rule); padding-top:14px; }
.ms-form label { color:var(--mist); font-size:14px; }
@media (max-width:520px) { .ask { flex-direction:column; align-items:stretch; } }
@media (prefers-reduced-motion:no-preference) { .dot.on { transition:box-shadow .4s; } }
