/* Agent Relay dashboard and sign-in page. Dark only. The presentation deck has its own app.css. */
:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --panel: #141415;
  --inset: #1b1b1d;
  --raise: #232326;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #ededee;
  --muted: #9a9aa2;
  --faint: #62626b;
  --live: #8ea2ff;
  --ok: #4fc48d;
  --warn: #f0a63a;
  --bad: #f2636a;
  --claude: #e58a5c;
  --codex: #d9d9de;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --r: 18px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 13px/1.4 var(--sans); font-feature-settings: 'cv11', 'ss01'; letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: left; }
em { font-style: normal; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }
svg { display: block; }

@keyframes in { from { opacity: 0; filter: blur(5px); transform: translateY(4px); } }
@keyframes fade { from { opacity: 0; filter: blur(4px); } }
@keyframes run { to { stroke-dashoffset: -12; } }
@keyframes pulse { from { stroke-dashoffset: -100; opacity: 1; } 80% { opacity: 1; } to { stroke-dashoffset: 12; opacity: 0; } }
@keyframes blink { 0%, 100% { opacity: 0.16; } 40% { opacity: 1; } }
@keyframes halo { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); } to { box-shadow: 0 0 0 7px transparent; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* buttons, inputs, small parts */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 13px;
  border-radius: 10px; background: var(--raise); border: 1px solid var(--line); color: var(--text);
  font-weight: 500; white-space: nowrap; text-decoration: none; transition: background 0.15s, border-color 0.15s, transform 0.15s var(--ease);
}
.btn:hover { background: #2b2b2f; border-color: var(--line-2); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: #f2f2f3; color: #0b0b0c; border-color: transparent; }
.btn-primary:hover { background: #fff; border-color: transparent; }
.btn-quiet { background: none; border-color: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--text); }
.btn-sm { height: 28px; padding: 0 10px; border-radius: 9px; font-size: 12px; }
.btn-icon { width: 28px; padding: 0; color: var(--muted); }
.btn-icon:hover { color: var(--text); }
.btn-danger { background: color-mix(in srgb, var(--bad) 18%, var(--raise)); border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: #ffb3b6; }
.input {
  width: 100%; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-2);
  outline: none; transition: border-color 0.15s;
}
.input:focus { border-color: color-mix(in srgb, var(--live) 70%, transparent); }
.input::placeholder { color: var(--faint); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; display: inline-block; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 7px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap; background: var(--raise); color: var(--muted);
}
.pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.pill.live { color: var(--live); background: color-mix(in srgb, var(--live) 15%, transparent); }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.pill.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 15%, transparent); }
.pill.note { color: var(--text); }
.pill.quiet { background: none; padding: 0; color: var(--faint); }
.pill .dot { width: 6px; height: 6px; background: currentColor; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.chip i, .agents .a { width: 7px; height: 7px; border-radius: 2px; background: var(--codex); flex: none; display: inline-block; }
.chip.claude i, .agents .a.claude { background: var(--claude); }
.agents { display: inline-flex; gap: 3px; align-items: center; }
.ring { width: 18px; height: 18px; flex: none; }
.ring circle { fill: none; stroke-width: 2.4; }
.ring .bg { stroke: rgba(255, 255, 255, 0.1); }
.ring .fg { stroke: var(--text); stroke-linecap: round; transition: stroke-dasharray 0.5s var(--ease); }
.ring.warn .fg { stroke: var(--warn); }
.ring.bad .fg { stroke: var(--bad); }
.seg { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--inset); border: 1px solid var(--line); }
.seg button {
  height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--muted);
  display: inline-flex; align-items: center; gap: 5px; transition: background 0.18s, color 0.18s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-checked='true'] { background: var(--raise); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.seg .n { color: var(--faint); font-size: 11px; }
.none { color: var(--faint); padding: 10px 2px 4px; }

/* frame */
.app { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.top { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; margin-right: 4px; }
.brand h1, .brand .name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.mark { width: 20px; height: 20px; }
.mark path { stroke-width: 2.6; stroke-linecap: round; fill: none; }
.mark .out { stroke: var(--text); }
.mark .back { stroke: var(--live); }
.status {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 99px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 12px;
}
.status.on .dot { background: var(--ok); }
.status.off .dot { background: var(--warn); }
.status .sep { color: var(--faint); }
.grow { flex: 1; }
.work { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 12px; padding: 12px 16px 16px; min-height: 0; }
.map, .side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); min-height: 0; }
.boot { height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }

/* map */
.map { position: relative; display: grid; grid-template-columns: minmax(200px, 270px) minmax(150px, 1fr) minmax(220px, 300px); padding: 16px; overflow: hidden; }
.map::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 50%, rgba(142, 162, 255, 0.055), transparent 70%);
}
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wire path { fill: none; }
.wire { transition: opacity 0.25s; }
.wire .base { stroke: rgba(255, 255, 255, 0.09); stroke-width: 1; transition: stroke 0.25s; }
.wire.warm .base { stroke: rgba(255, 255, 255, 0.34); stroke-width: var(--w); }
.wire.expired .base { stroke: rgba(255, 255, 255, 0.3); stroke-dasharray: 2 5; }
.wire.live .base { stroke: color-mix(in srgb, var(--live) 30%, transparent); stroke-width: var(--w); }
.wire .run { stroke: var(--live); stroke-width: calc(var(--w) + 0.75px); stroke-dasharray: 0.1 11.9; stroke-linecap: round; animation: run 0.9s linear infinite; }
.wire .pulse { stroke: #fff; stroke-width: 2px; stroke-linecap: round; stroke-dasharray: 9 200; stroke-dashoffset: 12; opacity: 0; animation: pulse 0.8s var(--ease) forwards; }
.wire.dim { opacity: 0.25; }
.wire.dim .run, .wire.dim .pulse { display: none; }

.col { position: relative; display: flex; flex-direction: column; min-height: 0; gap: 10px; }
.col-head { display: flex; align-items: center; gap: 7px; height: 24px; color: var(--muted); font-size: 12px; font-weight: 500; border-radius: 6px; }
.col-head:hover { color: var(--text); }
.col-head .n { color: var(--faint); }
.col-head .live-n { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--live); }
.col-head .live-n .dot { background: var(--live); width: 6px; height: 6px; }
.col-d .col-head { flex-direction: row; }
.col-body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.col-body.is-grid { overflow: auto; scrollbar-width: none; }
.node {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-radius: 13px; flex: none; width: 100%;
  background: var(--inset); border: 1px solid var(--line);
  transition: opacity 0.25s, background 0.2s, border-color 0.2s, filter 0.25s; animation: fade 0.35s var(--ease) backwards;
}
.node:hover { background: var(--raise); border-color: var(--line-2); }
.node.picked { background: var(--raise); border-color: rgba(255, 255, 255, 0.4); }
.node.dim, .cell.dim { opacity: 0.3; filter: saturate(0.4); }
.node.dim:hover, .cell.dim:hover { opacity: 0.75; }
.who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.who b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who em { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who em.flagged { color: var(--warn); }
.count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center;
  background: color-mix(in srgb, var(--live) 18%, transparent); color: var(--live); font-size: 11.5px; font-weight: 600; animation: fade 0.25s;
}
.t-ok > .dot { background: var(--ok); }
.t-live > .dot { background: var(--live); animation: halo 1.6s ease-out infinite; }
.t-warn > .dot { background: var(--warn); }
.t-bad > .dot { background: var(--bad); }
.t-off > .dot { background: none; box-shadow: inset 0 0 0 1.5px var(--faint); }
.slot {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 13px; width: 100%;
  border: 1px dashed var(--line-2); color: var(--muted); transition: color 0.15s, border-color 0.15s;
}
.slot:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.slot svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.cells { display: grid; grid-template-columns: repeat(auto-fill, 26px); gap: 5px; justify-content: center; padding: 12px; border-radius: 16px; background: var(--inset); border: 1px solid var(--line); margin: auto 0; }
.cell { width: 26px; height: 26px; border-radius: 7px; background: rgba(255, 255, 255, 0.045); display: grid; place-items: center; transition: opacity 0.25s, background 0.25s, box-shadow 0.2s; }
.cell:hover { background: rgba(255, 255, 255, 0.12); }
.cell i { width: 6px; height: 6px; border-radius: 2px; background: var(--faint); transition: background 0.25s, transform 0.3s var(--ease); }
.cell.t-ok i { background: color-mix(in srgb, var(--ok) 75%, transparent); }
.cell.t-live { background: color-mix(in srgb, var(--live) 22%, transparent); }
.cell.t-live i { background: var(--live); transform: scale(1.5); }
.cell.t-warn i { background: var(--warn); }
.cell.t-bad i { background: var(--bad); }
.cell.t-off i { background: none; box-shadow: inset 0 0 0 1.5px var(--faint); }
.cell.picked { box-shadow: 0 0 0 1.5px #fff; }
.cell.linked { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); }

.hub-wrap { display: grid; place-items: center; position: relative; }
.hub {
  width: 148px; padding: 16px 12px 14px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  background: var(--inset); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  transition: border-color 0.2s, background 0.2s;
}
.hub:hover { background: var(--raise); }
.hub > b { font-weight: 600; margin-top: 10px; }
.hub > em { font-size: 11.5px; color: var(--faint); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-stats { display: flex; flex-direction: column; gap: 1px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); width: 100%; font-size: 11.5px; color: var(--muted); }
.hub-stats b { color: var(--text); font-weight: 600; }
.hub-stats .warn, .hub-stats .warn b { color: var(--warn); }
.matrix { display: grid; grid-template-columns: repeat(5, 4px); gap: 2px; }
.matrix i { width: 4px; height: 4px; background: var(--text); opacity: 0.16; border-radius: 0.5px; }
.matrix i:nth-child(3n + 1) { opacity: 0.4; }
.hub.busy .matrix i, .matrix.on i { animation: blink 1.5s steps(4, end) infinite; animation-delay: calc(var(--i) * -60ms); }

/* inspector */
.side { display: flex; flex-direction: column; overflow: hidden; }
.pane { display: flex; flex-direction: column; min-height: 0; flex: 1; animation: in 0.32s var(--ease); }
.pane-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line); min-height: 60px; }
.title { min-width: 0; flex: 1; }
.title .kind { display: block; font-size: 11.5px; color: var(--faint); }
.title h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.012em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acts { display: inline-flex; gap: 6px; align-items: center; flex: none; }
.pane-body { flex: 1; min-height: 0; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.block { background: var(--inset); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 10px; }
.block.grow { flex: 1 0 auto; }
.block > header { display: flex; align-items: center; gap: 8px; min-height: 24px; margin-bottom: 6px; flex-wrap: wrap; }
.block h3 { font-size: 12px; font-weight: 500; color: var(--muted); margin-right: auto; }
.block .sub { font-size: 11.5px; color: var(--faint); margin-left: auto; }
.block h3 + .sub { margin-left: 0; }
.block.share { display: flex; flex-direction: column; gap: 9px; }
.block.share > header { margin-bottom: 0; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; flex: none; }
.kpis > div { background: var(--inset); padding: 11px 13px 12px; display: flex; flex-direction: column; min-width: 0; }
.kpis span { font-size: 11.5px; color: var(--muted); }
.kpis b { font-size: 21px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.3; }
.kpis b.good, .hit.good { color: var(--ok); }
.kpis em { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; flex: none; }
.facts > div { background: var(--inset); padding: 9px 11px 10px; min-width: 0; }
.facts dt { font-size: 11px; color: var(--faint); }
.facts dd { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facts dd span { color: var(--faint); font-weight: 400; }
.facts dd.warn { color: var(--warn); }
.meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.meter-top em { color: var(--faint); margin-left: 7px; font-size: 11.5px; }
.meter-top b { color: var(--text); font-weight: 500; }
.track { position: relative; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.track i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 99px; transition: width 0.5s var(--ease), left 0.5s var(--ease); }
.track .own { background: rgba(255, 255, 255, 0.2); border-radius: 99px 0 0 99px; }
.track .given { background: var(--live); }
.track.warn .given { background: var(--warn); }
.track.full .given { background: var(--bad); }
.track .cap { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, 0.55); }

.rels, .feed, .flags { display: flex; flex-direction: column; margin: 0 -6px; }
.rels li, .feed li, .flags li { animation: in 0.3s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 22ms); }
.rel { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 5px 6px; border-radius: 9px; transition: background 0.15s; }
.rel:hover { background: rgba(255, 255, 255, 0.05); }
.rel .when { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.rel .when b { color: var(--live); font-weight: 500; }
.rel.live > .dot { background: var(--live); animation: halo 1.6s ease-out infinite; }
.rel.warm > .dot { background: var(--text); }
.rel.expired > .dot { background: none; box-shadow: inset 0 0 0 1.5px var(--faint); }
.rel.expired .who b { color: var(--muted); }
.rels .more { color: var(--faint); padding: 6px 6px 2px; font-size: 12px; }
.feed li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 38px 34px; align-items: center; gap: 8px; min-height: 32px; padding: 0 6px; border-radius: 8px; }
.feed li:hover { background: rgba(255, 255, 255, 0.035); }
.feed time { color: var(--faint); font-size: 11.5px; }
.feed .path { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.feed .path > span:not(.chip):not(.times) { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.feed .path .chip, .feed .path .times { flex: none; }
.feed .arrow { color: var(--faint); font-style: normal; }
.feed .times { color: var(--text); font-size: 11.5px; font-weight: 600; padding: 0 6px; height: 18px; border-radius: 6px; background: var(--raise); display: inline-grid; place-items: center; }
.feed .tok, .feed .hit { text-align: right; font-size: 12px; color: var(--muted); }
.flags li { display: flex; align-items: center; gap: 9px; min-height: 30px; padding: 0 6px; }
.flags .dot { background: var(--warn); }
.flags span { flex: 1; }
.flags time, .flags em { color: var(--faint); font-size: 11.5px; }
.search { position: relative; display: block; flex: none; }
.search svg { position: absolute; left: 11px; top: 11px; width: 14px; height: 14px; fill: none; stroke: var(--faint); stroke-width: 1.5; stroke-linecap: round; }
.search .input { padding-left: 32px; background: var(--inset); border-color: var(--line); }

/* setup dialogs */
dialog.wizard { width: min(560px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 20px; background: var(--panel); color: var(--text); box-shadow: 0 40px 100px -20px #000; overflow: hidden; }
dialog.wizard[open] { animation: in 0.3s var(--ease); }
dialog.wizard::backdrop { background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(6px); }
.wz { position: relative; display: flex; flex-direction: column; }
.wz-top { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.wz-top h2 { font-size: 15px; font-weight: 600; flex: 1; letter-spacing: -0.012em; }
.steps { display: flex; gap: 14px; font-size: 12px; color: var(--faint); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); opacity: 0.5; }
.steps li.on { color: var(--text); }
.steps li.on::before { background: var(--text); opacity: 1; }
.steps li.done::before { background: var(--ok); opacity: 1; }
.wz-body { padding: 18px 20px 6px; display: flex; flex-direction: column; gap: 14px; min-height: 190px; animation: fade 0.25s; }
.lede, .oneline { color: var(--muted); font-size: 13px; }
.oneline b { color: var(--text); font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); }
.hint { font-size: 12px; color: var(--faint); }
.hint.err { color: var(--bad); }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset { padding: 12px; border-radius: 13px; background: var(--inset); border: 1px solid var(--line); transition: border-color 0.15s, background 0.15s; }
.preset:hover { border-color: var(--line-2); }
.preset[aria-checked='true'] { border-color: rgba(255, 255, 255, 0.45); background: var(--raise); }
.p-val { font-size: 22px; font-weight: 600; letter-spacing: -0.025em; }
.p-unit { font-size: 13px; color: var(--muted); margin-left: 2px; font-weight: 500; }
.p-sub { font-size: 11.5px; color: var(--faint); }
.agents:has(.agent-row) { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.agent-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.agent-row.off { opacity: 0.45; }
.agent-row .a-name { color: var(--text); font-weight: 500; width: 92px; font-size: 13px; }
.agent-row .input { width: 62px; height: 30px; text-align: right; padding: 0 9px; }
.switch { width: 30px; height: 18px; border-radius: 99px; background: var(--raise); border: 1px solid var(--line-2); position: relative; flex: none; transition: background 0.18s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: transform 0.2s var(--ease), background 0.18s; }
.switch[aria-checked='true'] { background: var(--text); }
.switch[aria-checked='true']::after { transform: translateX(12px); background: var(--bg); }
.limits { display: flex; flex-direction: column; gap: 8px; }
.limit { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.limit .in { display: inline-flex; align-items: center; gap: 7px; }
.limit .input { width: 92px; height: 32px; text-align: right; }
.limit em { width: 14px; color: var(--faint); }
.cmds { display: flex; flex-direction: column; gap: 6px; }
.cmd { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line); }
.cmd code { flex: 1; min-width: 0; font: 12px/1.5 var(--mono); color: var(--text); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.copy.done { color: var(--ok); }
.secret { border-radius: 13px; background: color-mix(in srgb, var(--warn) 7%, var(--inset)); border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.s-head { display: flex; justify-content: space-between; font-size: 12px; }
.s-head b { font-weight: 500; }
.s-head span { color: var(--warn); }
.wz-foot { display: flex; align-items: center; gap: 8px; padding: 14px 20px 18px; }
.wz-foot .left { flex: 1; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.wz-foot .left .dot { background: var(--warn); animation: halo 1.6s ease-out infinite; }
.wz-foot .left.ok { color: var(--ok); }
.wz-foot .left.ok .dot { background: var(--ok); animation: none; }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; border-top-color: transparent; animation: spin 0.7s linear infinite; }
.pool { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(8px); padding: 20px; }
.pool-card { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; animation: in 0.3s var(--ease); }
.pool-card .ring { width: 28px; height: 28px; color: var(--warn); }
.pool-card h3 { font-size: 15px; font-weight: 600; }
.pool-card p { color: var(--muted); }
.pool-card .row { display: flex; justify-content: flex-end; margin-top: 6px; }
.meter-row .meter-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.meter-row .track i { background: var(--warn); }

/* sign-in */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(360px, 100%); padding: 24px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; animation: in 0.4s var(--ease); }
.login-card .brand { margin-bottom: 18px; }
.login-card h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.login-card .btn { height: 36px; }

@media (max-width: 1080px) {
  .app { height: auto; min-height: 100dvh; }
  .work { grid-template-columns: minmax(0, 1fr); }
  .map { height: 460px; }
  .side { min-height: 420px; }
  .top { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .map { grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr); padding: 10px; }
  .hub { width: 92px; padding: 12px 6px; }
  .hub > em, .node .ring, .node .agents { display: none; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .wire.live .base { stroke: var(--live); }
}

/* invite page (join.html) */
.login.join { grid-template-columns: minmax(0, 1fr); padding: 16px; }
.join-card { width: min(480px, 100%); min-width: 0; justify-self: center; gap: 10px; }
@media (max-width: 480px) { .join-card { padding: 20px 16px; } }
.j-more summary { cursor: pointer; color: var(--muted); font-size: 12px; padding: 4px 0; }
.j-more[open] summary { margin-bottom: 6px; }
.j-more .j-downloads { margin-top: 2px; }
.join-card .brand { margin-bottom: 10px; }
.join-card .lede { line-height: 1.5; }
.j-invite { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--inset); border: 1px solid var(--line); }
.j-for { font-weight: 500; }
.j-roles { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.j-roles li { padding-left: 14px; position: relative; }
.j-roles li::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 2px; background: var(--live); }
.j-gone { padding: 12px 14px; border-radius: 14px; color: #ffb3b6; background: color-mix(in srgb, var(--bad) 12%, var(--inset)); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.j-step { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); }
.j-step h2 { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.j-n { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; background: var(--raise); color: var(--muted); }
.j-downloads { display: flex; flex-direction: column; gap: 6px; }
.join-card .j-dl { height: auto; padding: 9px 13px; flex-direction: column; align-items: flex-start; gap: 1px; }
.j-dl b { font-weight: 500; }
.j-dl em { font-size: 11.5px; color: var(--faint); font-weight: 400; }
.j-dl.btn-primary em { color: #55555c; }
.j-open { height: 38px; }

/* people, settings (people.js) */
.btn.on { background: #2b2b2f; border-color: var(--line-2); }
.people .use { display: flex; flex-direction: column; align-items: flex-end; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.who em.bad { color: var(--bad); }
.rel.t-ok > .dot { background: var(--ok); }
.rel.t-live > .dot { background: var(--live); }
.rel.t-warn > .dot { background: var(--warn); }
.rel.t-bad > .dot { background: var(--bad); }
.rel.t-note > .dot { background: var(--muted); }
.rel.t-off > .dot { background: none; box-shadow: inset 0 0 0 1.5px var(--faint); }
div.rel { cursor: default; }
div.rel:hover { background: none; }
.block.device { display: flex; flex-direction: column; gap: 9px; }
.block.device > header { margin-bottom: 0; flex-wrap: nowrap; }
.dev-logs { display: flex; flex-direction: column; gap: 6px; }
.dev-logs .rels { margin: 0; }
.block.device .dev-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; margin-right: auto; }
.block.device .dev-name { color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block.device .host { color: var(--faint, var(--muted)); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block.device > header .dot.on { background: var(--ok); }
.facts dd.bad { color: var(--bad); }
.facts.three { grid-template-columns: repeat(3, 1fr); }
.alert { padding: 8px 10px; border-radius: 10px; font-size: 12px; }
.alert.bad { color: #ffb3b6; background: color-mix(in srgb, var(--bad) 12%, transparent); }
.alert.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.shares-now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.shares-now > span { display: inline-flex; align-items: center; gap: 8px; }
.shares-now .btn { margin-left: auto; }
.row-acts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.row-acts.left { justify-content: flex-start; }
.row-acts .hint { margin-right: auto; }
.row-acts .input { flex: 1; min-width: 0; height: 30px; }
.row-acts .input.ver { flex: 0 0 84px; }
.links { display: flex; gap: 4px; margin: -2px -6px -4px; }
.pane-sub { font-size: 12px; font-weight: 500; color: var(--muted); padding: 6px 4px 0; }
.models { display: flex; flex-direction: column; margin: 0 -4px; }
.models li { display: grid; grid-template-columns: minmax(0, 1fr) 54px 72px; align-items: center; gap: 8px; min-height: 28px; padding: 0 4px; border-radius: 7px; font-size: 12px; }
.models li:hover { background: rgba(255, 255, 255, 0.035); }
.models .num { text-align: right; color: var(--muted); }
.models .when { text-align: right; color: var(--faint); font-size: 11.5px; }
.models .model { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.models code { font: 12px var(--mono); }
.models li.refused code { color: var(--faint); text-decoration: line-through; }
.role { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 13px; background: var(--inset); border: 1px solid var(--line); }
.role-head { display: flex; align-items: center; gap: 10px; }
.role-head b { font-weight: 600; }
.role-head .hint { margin-left: auto; }
.progress { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
.progress li { display: inline-flex; align-items: center; gap: 6px; }
.progress li.on { color: var(--text); }
.progress li.on .dot { background: var(--ok); }
.wz-body .cmd code { white-space: nowrap; }
