@import url('/fonts/unbounded/700.css');
@import url('/fonts/instrument-sans/latin-400.css');
@import url('/fonts/instrument-sans/latin-ext-400.css');
@import url('/fonts/instrument-sans/latin-500.css');
@import url('/fonts/instrument-sans/latin-ext-500.css');
@import url('/fonts/instrument-sans/latin-600.css');
@import url('/fonts/instrument-sans/latin-ext-600.css');
@import url('/fonts/jetbrains-mono/latin-400.css');
@import url('/fonts/jetbrains-mono/latin-500.css');

:root {
  --bg: #070820; --s1: #0e0f33; --s2: #15174a;
  --line: rgba(244,242,255,.14); --line2: rgba(244,242,255,.08);
  --ink: #f4f2ff; --muted: #a9a6d6; --faint: #8f8cc2;
  --brand: #c13bff; --brand2: #8a2be2;
  --good: #0ca30c; --warn: #fab219; --bad: #d03b3b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.disp { font-family: "Unbounded", "Arial Black", sans-serif; font-weight: 700; letter-spacing: -.03em; }
.mono { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 3px;
}

#net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- shell ---------- */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100dvh; }
.side {
  position: sticky; top: 0; height: 100dvh; background: var(--s1); border-right: 1px solid var(--line2);
  padding: 24px 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.brand .t { display: flex; flex-direction: column; line-height: 1.15; }
.brand .t b { font-size: 15px; }
.brand .t span { font-size: 13px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; }
.nav a, .nav .off {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 500;
}
.nav a:hover { background: rgba(244,242,255,.06); }
.nav a[aria-current="page"] { background: rgba(193,59,255,.16); color: var(--ink); }
.nav a[aria-current="page"] svg { stroke: var(--brand); }
.nav .off { opacity: .7; color: var(--faint); }
.tag { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-weight: 400; }
.userbox { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(244,242,255,.03); }
.userrow { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 4px; margin: -4px; border-radius: 10px; }
a.userrow:hover { background: rgba(244,242,255,.05); }
a.userrow[aria-current="page"] { background: rgba(193,59,255,.16); }
.userrow .who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.userrow .who b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userrow .who span { font-size: 12px; color: var(--faint); }
.linkbtn { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; padding: 6px 4px; border: 0; border-radius: 8px; background: none; text-align: left; width: 100%; }
.linkbtn:hover { background: rgba(244,242,255,.05); }
.linkbtn[aria-current="page"] { background: rgba(193,59,255,.16); color: var(--ink); }
.linkbtn[aria-current="page"] svg { stroke: var(--brand); }
.ver { font-size: 11px; color: var(--faint); padding: 2px 4px 0; }

.avatar { position: relative; overflow: hidden; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 600; background: linear-gradient(135deg, var(--brand2), var(--brand)); box-shadow: 0 0 0 1px var(--line); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.s36 { width: 36px; height: 36px; }
.avatar.s56 { width: 56px; height: 56px; font-size: 22px; }
.avatar.s84 { width: 96px; height: 96px; font-size: 30px; }

.topbar { display: none; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: rgba(14,15,51,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line2); }
.topbar .brand { padding: 0; }
.topbar .brand img { width: 32px; height: 32px; }
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: rgba(14,15,51,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line2); justify-content: space-around;
}
.tabbar a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 12px; font-size: 12px; color: var(--muted); min-height: 48px; justify-content: center; }
.tabbar a[aria-current="page"] { color: var(--ink); background: rgba(193,59,255,.16); }
.tabbar a[aria-current="page"] svg { stroke: var(--brand); }

.main { padding: 32px clamp(16px, 3vw, 40px) 64px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head h1 { font-size: clamp(24px, 4vw, 32px); line-height: 1.1; }
.page-head p { margin-top: 8px; color: var(--muted); }

/* ---------- primitives ---------- */
.card { background: var(--s1); border: 1px solid var(--line); border-radius: 20px; padding: 24px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.card h2 { font-size: 18px; font-weight: 600; }
.card h3 { font-size: 15px; font-weight: 600; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: stretch; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 500; border: 1px solid var(--line); background: rgba(244,242,255,.045); }
.btn:hover { border-color: rgba(193,59,255,.65); }
.btn.p { border: 0; background: linear-gradient(100deg, var(--brand2), var(--brand)); color: #fff; }
.btn.p:hover { filter: brightness(1.12); }
.btn.d { border-color: rgba(208,59,59,.55); background: transparent; }
.btn.d:hover { background: rgba(208,59,59,.12); border-color: var(--bad); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; border: 1px solid var(--line); white-space: nowrap; }
.chip.admin { border-color: rgba(193,59,255,.65); background: rgba(193,59,255,.16); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--s1); }
.seg button { padding: 6px 14px; border: 0; border-radius: 8px; background: none; color: var(--muted); min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--s2); color: var(--ink); font-weight: 500; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--s1); font-weight: 500; color: var(--ink); }
.pill[aria-pressed="true"] { border-color: rgba(193,59,255,.65); background: rgba(193,59,255,.16); }
.pill .n { font-size: 12px; color: var(--muted); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty b { color: var(--ink); font-size: 17px; font-weight: 600; }
.note { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(244,242,255,.04); font-size: 14px; line-height: 1.45; color: var(--muted); }
.note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.rows { display: flex; flex-direction: column; border-top: 1px solid var(--line2); }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.kv > :first-child { color: var(--muted); flex: none; }
.kv > :last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* status shapes: always a shape plus a label */
.st { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--good); }
.st[data-s="slow"] { width: 12px; height: 11px; border-radius: 0; background: var(--warn); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.st[data-s="down"] { border-radius: 2px; background: var(--bad); }
.st[data-s="unknown"], .st[data-s="paused"] { background: transparent; box-shadow: inset 0 0 0 2px var(--faint); }
.st[data-s="paused"] { box-shadow: inset 0 0 0 2px var(--faint), inset 0 0 0 5px var(--s1); }
.stl { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; white-space: nowrap; }

/* day strip */
.strip { display: flex; align-items: flex-end; gap: 1px; height: 24px; width: 100%; max-width: 150px; }
.strip i { flex: 1 1 0; height: 100%; border-radius: 1.5px; background: var(--good); }
.strip i[data-d="s"] { background: var(--warn); height: 66%; }
.strip i[data-d="d"] { background: var(--bad); height: 33%; }
.strip i[data-d="-"] { background: rgba(244,242,255,.14); height: 100%; }
.strip.lg { height: 40px; gap: 3px; max-width: none; }
.strip.lg i { border-radius: 3px; }

/* logos: one colour, from the brand */
.tile { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); }
.tile.s28 { width: 28px; height: 28px; border-radius: 9px; }
.tile.s32 { width: 32px; height: 32px; }
.tile.s48 { width: 48px; height: 48px; border-radius: 14px; }
.glyph { display: block; width: 58%; height: 58%; background: var(--brand); -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.letter { color: var(--brand); font-weight: 700; line-height: 1; font-size: 15px; }
.tile.s48 .letter { font-size: 20px; }

/* meters / stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; flex: 1 1 360px; }
.stat { padding: 16px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(244,242,255,.03); display: flex; flex-direction: column; gap: 4px; }
.stat .v { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.15; font-weight: 600; white-space: nowrap; }
.stat .l { font-size: 13px; color: var(--muted); }

/* hero */
.hero { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 24px; padding: 28px; }
.hero .msg { flex: 1 1 280px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hero .msg h2 { font-size: clamp(22px, 3.4vw, 28px); line-height: 1.15; display: flex; align-items: center; gap: 14px; }
.hero .msg h2 .st { width: 16px; height: 16px; }
.hero .msg h2 .st[data-s="slow"] { width: 20px; height: 18px; }
.hero .acts { display: flex; flex-wrap: wrap; gap: 12px; }

/* list rows */
.list { display: flex; flex-direction: column; }
.list a.item, .list .item { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 12px; border-radius: 12px; }
.list a.item:hover { background: rgba(244,242,255,.05); }
.item .grow { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.item .right { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.35; }
.item .right b { font-weight: 500; font-size: 14px; }
.events { display: flex; flex-direction: column; gap: 14px; }
.ev { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.45; }
.ev .tm { flex: none; width: 70px; font-size: 12px; color: var(--muted); padding-top: 3px; }
.ev .st { margin-top: 6px; }

/* services table */
.table { container: table / inline-size; background: var(--s1); border: 1px solid var(--line); border-radius: 20px; padding: 8px; min-width: 0; }
.trow { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1.6fr) 76px 64px 84px 150px 72px; gap: 12px; align-items: center; width: 100%; padding: 12px; border: 0; border-radius: 12px; background: none; text-align: left; }
.trow.head { color: var(--faint); font-size: 13px; border-bottom: 1px solid var(--line2); border-radius: 0; padding-bottom: 12px; cursor: default; }
.trow:not(.head):hover { background: rgba(244,242,255,.05); }
.trow[data-sel="true"] { background: rgba(193,59,255,.14); }
/* The whole row is one link; the Local and Public icons sit above it. */
.rowlink { display: block; min-width: 0; }
.rowlink::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.rowlink b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowlink:focus-visible { outline: none; }
.rowlink:focus-visible::after { outline: 2px solid var(--ink); outline-offset: -2px; }
.lnks { display: flex; align-items: center; gap: 6px; }
.lnk { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); background: rgba(244,242,255,.03); }
.lnk:hover { border-color: rgba(193,59,255,.65); color: var(--ink); }
.lnk.public svg { stroke: var(--brand); }
.trow .nm { display: flex; align-items: center; gap: 12px; min-width: 0; }
.trow .nm .tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.trow .nm .tx b, .trow .nm .tx .rowlink b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .nm .tx span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r { text-align: right; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 24px; align-items: start; }
.panel { position: sticky; top: 24px; }
.backlink { display: none; align-items: center; gap: 8px; color: var(--muted); padding: 4px 0; border: 0; background: none; font-size: 14px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.search { position: relative; flex: 1 1 240px; max-width: 360px; }
.search svg { position: absolute; left: 14px; top: 14px; }
.search input { padding-left: 40px; }

/* service map: hosts on the left, their services in a wide grid on the right */
.node { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--s2); border: 1px solid var(--line); border-radius: 12px; white-space: nowrap; min-width: 0; }
.node.slow { border-color: rgba(250,178,25,.7); }
.node.down { border-color: rgba(208,59,59,.8); }
.node.host { border-color: rgba(193,59,255,.6); border-radius: 14px; }
.node .ms { font-size: 12px; color: var(--muted); margin-left: auto; padding-left: 8px; }
.node .name { overflow-wrap: anywhere; font-weight: 500; }
.map2 { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 26px clamp(80px, 9vw, 140px); align-items: start; position: relative; }
.mrail { padding-top: 14px; min-width: 0; }
.mframe { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; padding: 12px; border: 1px dashed rgba(193,59,255,.35); border-radius: 18px; min-width: 0; }
.mframe.none { visibility: hidden; padding: 0; border: 0; height: 0; }
.node.chip { padding: 10px 12px; }
a.node.chip:hover { border-color: rgba(193,59,255,.65); }
.node .hn { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.node .hn .sub { font-size: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.lpill { position: absolute; transform: translate(-50%, -50%); padding: 2px 10px; border-radius: 999px; border: 1px solid #ffe01a; background: var(--s1); font-size: 12px; color: var(--ink); white-space: nowrap; }
.mmap { display: none; flex-direction: column; gap: 10px; }
.mnet { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 2px 2px 4px; }
.msrv { border: 1px solid rgba(193,59,255,.5); border-radius: 14px; background: var(--s2); }
.msrv.slow { border-color: rgba(250,178,25,.7); }
.msrv.down { border-color: rgba(208,59,59,.8); }
.msrv summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; min-height: 48px; }
.msrv summary::-webkit-details-marker { display: none; }
.msrv summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -3px 2px 0 4px; flex: none; }
.msrv[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.msrv .mh { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.msrv .mh .sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.msrv .cnt { flex: none; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; }
.mchips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
.mchip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--s1); min-width: 0; font-size: 14px; }
.mchip.slow { border-color: rgba(250,178,25,.7); }
.mchip.down { border-color: rgba(208,59,59,.8); }
.mchip .name { overflow-wrap: anywhere; }
.mlinks { margin: 4px 0 0; padding: 0; list-style: none; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); display: flex; }
.mlinks b { color: var(--ink); font-weight: 500; }
.stabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--s1); scrollbar-width: none; }
.stabs a { flex: none; padding: 8px 16px; border-radius: 10px; color: var(--muted); min-height: 40px; display: flex; align-items: center; font-weight: 500; }
.stabs a:hover { color: var(--ink); }
.stabs a[aria-current="page"] { background: var(--s2); color: var(--ink); }
.srow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--line2); }
.srow .grow { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.srow .acts { display: flex; flex-wrap: wrap; gap: 8px; }
[hidden] { display: none !important; }
.map2 .tunnel { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.flow { stroke-dasharray: 8 8; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -16; } }
@media (prefers-reduced-motion: reduce) { .flow { animation: none; } }

/* chart */
.chart { position: relative; height: 220px; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; touch-action: pan-y; }
.chart .tip { position: absolute; top: 0; background: var(--s2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; pointer-events: none; white-space: nowrap; z-index: 2; }
.chart .tip b { display: block; font-size: 18px; }
.chart .tip span { font-size: 12px; color: var(--muted); }
.xl { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-top: 6px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lab { font-size: 14px; font-weight: 500; }
.field .hint { font-size: 13px; color: var(--muted); }
.field > label.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.iconpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; max-height: 232px; overflow-y: auto; padding: 6px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(244,242,255,.03); }
.ip { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border: 1px solid transparent; border-radius: 12px; background: none; color: var(--muted); font-size: 12px; min-width: 0; }
.ip span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip:hover { background: rgba(244,242,255,.05); }
.ip[aria-checked="true"] { border-color: rgba(193,59,255,.65); background: rgba(193,59,255,.16); color: var(--ink); }
.log { border-top: 1px solid var(--line2); padding: 12px 0; }
.log summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.log ul { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }
.input, .select, textarea.input {
  width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--s1); color: var(--ink);
}
textarea.input { padding: 10px 14px; min-height: 88px; }
.input::placeholder { color: var(--faint); }
.input:focus-visible, .select:focus-visible { outline-offset: 1px; border-color: var(--brand); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 19px, calc(100% - 15px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.switch .tx { display: flex; flex-direction: column; min-width: 0; }
.switch .tx span { font-size: 13px; color: var(--muted); }
.tg { position: relative; flex: none; width: 44px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: rgba(244,242,255,.16); }
.tg[aria-checked="true"] { background: var(--brand2); }
.tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: left .15s; }
.tg[aria-checked="true"]::after { left: 21px; }
.err { color: #ff9b9b; font-size: 14px; }
.ok { color: #7fe07f; font-size: 14px; }
.formbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--s1); color: var(--ink); overflow: hidden; }
dialog::backdrop { background: rgba(3,4,16,.7); backdrop-filter: blur(4px); }
dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
dialog .dh { padding: 22px 24px 12px; }
dialog .dh h2 { font-size: 20px; }
dialog .db { padding: 8px 24px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
dialog .df { padding: 16px 24px 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; border-top: 1px solid var(--line2); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--s2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.4); }

/* member home */
.avatars { display: flex; gap: 12px; flex-wrap: wrap; }
.avatars button { width: 64px; height: 64px; padding: 0; border-radius: 50%; border: 2px solid var(--line); background-size: cover; background-position: center; color: var(--ink); font-weight: 600; font-size: 22px; background-color: var(--s2); }
.avatars button[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(193,59,255,.3); }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.app { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--s1); }
a.app:hover { border-color: rgba(193,59,255,.65); background: var(--s2); }
.app b { font-size: 16px; font-weight: 600; }
.home-cols { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }

.loading { color: var(--muted); padding: 24px 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.open .listcol { display: none; }
  .split:not(.open) .panel { display: none; }
  .split.open .backlink { display: inline-flex; }
  .panel { position: static; }
  .home-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar { display: flex; }
  .main { padding: 20px 16px 48px; gap: 20px; }
  .card { padding: 18px; border-radius: 18px; }
  .toast { bottom: 24px; }
}
@media (max-width: 720px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 20px; }
  .map2 { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-right: 26px; }
  .mrail { padding-top: 0; }
  .mframe { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; margin-left: 34px; margin-bottom: 14px; }
  .mframe.folded { display: none; }
  .node.fold { cursor: pointer; padding-right: 36px; position: relative; }
  .node.fold::after { content: ''; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
  .node.fold[aria-expanded="true"]::after { transform: translateY(-30%) rotate(-135deg); }
  .mframe { margin-bottom: 4px; }
  .mframe .node.chip { padding: 8px; gap: 6px; }
  .node.host { white-space: normal; }
  .node.host .ms { white-space: nowrap; }
  .node .hn .sub { white-space: normal; overflow: visible; }
  .mframe .node.chip .ms { display: none; }
  .hero .msg h2 { font-size: 20px; gap: 10px; }
  .hero .msg h2 .st { width: 12px; height: 12px; }
  .hero .acts .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex-basis: 100%; }
  .stat { padding: 12px 10px; }
  .stat .v { font-size: 18px; }
  .stat .l { font-size: 12px; }
  .lnk { width: 36px; height: 36px; }
  dialog .dh, dialog .db, dialog .df { padding-left: 18px; padding-right: 18px; }
  .page-head .btn { width: 100%; }
}

[hidden] { display: none !important; }

.trow.u { grid-template-columns: minmax(0, 1.6fr) minmax(120px, 1fr) 120px; }

/* The list adapts to its own width, so it also works next to the detail panel. */
@container table (max-width: 780px) {
  .trow { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "nm nm st" "strip lnk up"; row-gap: 10px; }
  .trow.head { display: none; }
  .trow > .c-host, .trow > .c-ms { display: none; }
  .trow > .c-st { grid-area: st; }
  .trow > .nm { grid-area: nm; }
  .trow > .c-strip { grid-area: strip; }
  .trow > .c-open { grid-area: lnk; }
  .trow > .c-up { grid-area: up; }
  .trow .strip { max-width: 190px; }
  .trow.u { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nm last" "grp grp"; }
  .trow.u > .c-last { grid-area: last; }
  .trow.u > .c-grp { grid-area: grp; }
}

@media (max-width: 720px) {
  .apps { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .app { padding: 16px; gap: 12px; }
}

.tag.upd { margin-left: 8px; border-color: rgba(255,224,26,.7); color: #ffe01a; vertical-align: middle; }

/* server stats */
.res { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.rbox { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 14px 16px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.rbox.stale { opacity: .6; }
.rh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.rh .faint { font-size: 12px; margin-left: auto; }
.rbig { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rrow { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ring { --p: 0; --c: var(--good); width: 52px; height: 52px; flex: none; border-radius: 50%; position: relative; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line2) 0); }
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--s1); }
.ring b { position: relative; font: 500 12px 'JetBrains Mono', ui-monospace, monospace; }
.ring.mid { --c: var(--warn); }
.ring.hi { --c: var(--bad); }
.rt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rt > span { color: var(--muted); font-size: 13px; }
.rt > b { font: 400 11px 'JetBrains Mono', ui-monospace, monospace; color: var(--muted); overflow-wrap: anywhere; }
.rdisks { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rd { display: grid; grid-template-columns: minmax(48px, 92px) minmax(40px, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.rd b { font-weight: 500; overflow-wrap: anywhere; line-height: 1.2; }
.rd .n { font-size: 11px; color: var(--muted); white-space: nowrap; text-align: right; }
.rd .bar { height: 6px; border-radius: 3px; background: var(--line2); overflow: hidden; display: block; }
.rd .bar i { display: block; height: 100%; background: var(--good); }
.rd .bar.mid i { background: var(--warn); }
.rd .bar.hi i { background: var(--bad); }
.rchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.rchip { font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line2); color: var(--muted); }
@media (max-width: 420px) { .rbig { grid-template-columns: 1fr; } .rd { grid-template-columns: 1fr auto; } .rd .bar { grid-column: 1 / -1; grid-row: 2; } }
pre.code { margin: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(0, 0, 0, .25); color: var(--ink); font: 12px/1.5 'JetBrains Mono', ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }

/* motion: a page builds itself in, gauges and bars fill, dialogs pop. Nothing loops except the live dot. */
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes fadein { from { opacity: 0; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes growy { from { transform: scaleY(0); } }
@keyframes ringfill { from { --p: 0; } }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(12, 163, 12, .5); } 70%, 100% { box-shadow: 0 0 0 9px rgba(12, 163, 12, 0); } }
@media (prefers-reduced-motion: no-preference) {
  .enter .ring { animation: ringfill 1.1s cubic-bezier(.2, .7, .2, 1) .35s backwards; }
  .enter .rd .bar i { transform-origin: left; animation: grow .9s cubic-bezier(.2, .7, .2, 1) .4s backwards; }
  .enter .strip i { transform-origin: bottom; animation: growy .5s cubic-bezier(.2, .7, .2, 1) backwards; }
  .enter .strip i:nth-child(n) { animation-delay: .35s; }
  .enter .strip i:nth-child(5n+1) { animation-delay: .4s; }
  .enter .strip i:nth-child(5n+2) { animation-delay: .45s; }
  .enter .strip i:nth-child(5n+3) { animation-delay: .5s; }
  .enter .strip i:nth-child(5n+4) { animation-delay: .55s; }
  .enter .tunnel { animation: fadein .7s .55s backwards; }
  .hero .msg h2 .st[data-s="ok"] { animation: beat 2.6s ease-out infinite; }
  [data-panel]:not([hidden]) { animation: rise .35s cubic-bezier(.2, .7, .2, 1); }
  dialog[open] { animation: pop .24s cubic-bezier(.2, .8, .2, 1); }
  dialog[open]::backdrop { animation: fadein .24s ease-out; }
  .nav a, .tabbar a { transition: background-color .2s, color .2s, transform .2s; }
  .nav a:hover { transform: translateX(3px); }
  .btn { transition: transform .15s, background-color .2s, border-color .2s; }
  .btn:active { transform: scale(.97); }
  .list a.item { transition: background-color .2s, transform .2s; }
  .list a.item:hover { transform: translateX(3px); }
  .rbox, .stat { transition: border-color .25s, background-color .25s; }
  .rbox:hover { border-color: var(--line); background: rgba(255, 255, 255, .035); }
}
.list a.item[data-sel="true"] { background: rgba(193,59,255,.14); }

/* overview board: tiles in two columns, order and width chosen by the person */
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.bt { position: relative; grid-column: span var(--span, 2); }
.acts-head { display: flex; gap: 12px; flex-wrap: wrap; }
.bt.editing { outline: 2px dashed rgba(193, 59, 255, .45); outline-offset: 6px; cursor: grab; }
.bt.editing.dragging { opacity: .45; }
.bt.editing.over { outline-color: #ffe01a; }
.bt.editing > *:not(.tbar) { pointer-events: none; }
.tbar { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; gap: 6px; align-items: center; padding: 6px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); }
.tbar .grip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 0 6px; }
.stat.go { text-decoration: none; color: inherit; }
.stat.go:hover { background: rgba(244, 242, 255, .07); }
.stat.t-warn { border-color: rgba(250, 178, 25, .6); background: rgba(250, 178, 25, .08); }
.stat.t-warn .v { color: var(--warn); }
.stat.t-good { border-color: rgba(31, 191, 79, .45); background: rgba(31, 191, 79, .07); }
.stat.t-good .v { color: #3fd16d; }
.stat.t-bad { border-color: rgba(208, 59, 59, .65); background: rgba(208, 59, 59, .1); }
.stat.t-bad .v { color: #ff6b6b; }
/* uptime, one box per server like the service map */
.ugroups { display: flex; flex-direction: column; gap: 14px; }
.ugroup { border: 1px dashed rgba(193, 59, 255, .35); border-radius: 16px; padding: 8px 14px 6px; min-width: 0; }
.uh { display: flex; align-items: center; gap: 10px; padding: 6px 0 8px; font-size: 14px; }
.urow { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line2); min-width: 0; }
.urow .un { flex: 1 1 90px; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.urow .ub { flex: 0 1 150px; min-width: 70px; display: flex; }
.urow .up { flex: none; width: 64px; text-align: right; font-size: 13px; }
@media (max-width: 1000px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .bt { grid-column: auto; }
  .acts-head { display: none; }
}
.bt.editing { padding-top: 70px; }
.bt.editing .tbar { top: 12px; left: 12px; right: auto; }
.node.chip { min-width: 0; }
@media (min-width: 721px) { .mframe { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); } }
@media (max-width: 600px) {
  .urow { flex-wrap: wrap; }
  .urow .un { flex: 1 1 100px; }
  .urow .ub { order: 3; flex: 1 1 100%; }
  .stat .v { white-space: normal; overflow-wrap: anywhere; }
}
.stat { min-width: 0; }
.stats { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.stat .v { font-size: clamp(17px, 1.5vw, 22px); }
.bt.half .node.chip .ms { display: none; }
.bt.half .map2 { column-gap: clamp(40px, 5vw, 70px); }
.bt.half .mframe { grid-template-columns: minmax(0, 1fr); }
.stat { padding: 14px 12px; }
.stat .v { font-size: clamp(16px, 1.4vw, 20px); }
.node.chip { overflow: hidden; }
.node.chip { flex-wrap: wrap; }
.node.chip .cu { flex: 1 1 100%; display: flex; align-items: center; gap: 10px; padding-left: 38px; min-width: 0; }
.node.chip .cu > :first-child { flex: 1 1 auto; min-width: 40px; }
.node.chip .cu .mono { flex: none; font-size: 12px; color: var(--muted); }
@media (max-width: 720px) { .node.chip .cu { padding-left: 0; } .node.chip .cu .mono { display: none; } }

/* status card */
.hero { flex-direction: column; align-items: stretch; gap: 20px; position: relative; overflow: hidden; --tint: 193, 59, 255; }
.hero[data-state="ok"] { --tint: 31, 191, 79; }
.hero[data-state="slow"] { --tint: 250, 178, 25; }
.hero[data-state="down"] { --tint: 208, 59, 59; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(520px 220px at 0% 0%, rgba(var(--tint), .16), transparent 70%); }
.hero > * { position: relative; }
.hero { border-color: rgba(var(--tint), .35); }
.htop { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; }
.badge { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: rgb(var(--tint)); background: rgba(var(--tint), .12); box-shadow: inset 0 0 0 2px rgba(var(--tint), .55), 0 0 28px rgba(var(--tint), .25); }
.badge[data-s="ok"] { --tint: 31, 191, 79; }
.badge[data-s="slow"] { --tint: 250, 178, 25; }
.badge[data-s="down"] { --tint: 208, 59, 59; }
.badge[data-s="unknown"] { --tint: 160, 160, 190; }
.hero .msg { flex: 1 1 260px; }
.hx svg { transition: transform .25s; }
.hx[aria-expanded="true"] svg { transform: rotate(180deg); }
.issues { border-top: 1px solid var(--line2); padding-top: 8px; }
@media (max-width: 600px) { .badge { width: 48px; height: 48px; } .badge svg { width: 22px; height: 22px; } }
.hero { flex-wrap: nowrap; padding: 18px 24px; gap: 14px; }
.htop { align-content: center; gap: 14px 20px; }
.hero .msg { gap: 6px; }
.badge { width: 52px; height: 52px; }
.badge svg { width: 26px; height: 26px; }
.stat { padding: 10px 12px; }
.nav a.dragging { opacity: .4; }
.nav a.over-top { box-shadow: 0 -2px 0 0 var(--brand); }
.nav a.over-bottom { box-shadow: 0 2px 0 0 var(--brand); }
/* server stats fill the card */
.res { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); flex: 1; grid-auto-rows: 1fr; }
.rbox .rchips { margin-top: auto; }

/* backups page: status on one side, settings on the other */
.cols2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
@media (max-width: 1000px) { .cols2 { grid-template-columns: minmax(0, 1fr); } }

/* side menu marker */
.nav { position: relative; }
.nav a { position: relative; z-index: 1; }
.navpill { position: absolute; left: 0; right: 0; top: 0; z-index: 0; border-radius: 12px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(193, 59, 255, .24), rgba(193, 59, 255, .10)); box-shadow: inset 0 0 0 1px rgba(193, 59, 255, .38), 0 0 24px rgba(193, 59, 255, .2); }
.nav a[aria-current="page"] { background: transparent; }
.nav a.dragging { cursor: grabbing; }

/* page changes */
.main { view-transition-name: page; }
html.busy::after { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9999; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--brand), #ffe01a, transparent); background-size: 40% 100%; background-repeat: no-repeat; }
@keyframes sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@keyframes appear { to { opacity: 1; } }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); filter: blur(4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }
@keyframes swap { from { opacity: 0; transform: translateX(26px); filter: blur(5px); } }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(193, 59, 255, .55); } 100% { box-shadow: 0 0 0 14px rgba(193, 59, 255, 0); } }
@media (prefers-reduced-motion: no-preference) {
  .navpill.on { transition: transform .55s cubic-bezier(.3, 1.35, .4, 1), height .3s, opacity .3s; }
  html.busy::after { animation: appear .2s .35s forwards, sweep 1s linear infinite; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  ::view-transition-old(page) { animation: vt-out .16s ease-in both; }
  ::view-transition-new(page) { animation: vt-in .42s cubic-bezier(.2, .8, .2, 1) both; }
  .enter .rv { animation: rise .7s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
  .panel.swap { animation: swap .45s cubic-bezier(.2, .8, .2, 1); }
  .card { transition: border-color .3s, box-shadow .3s, transform .3s; }
  .card:hover { border-color: rgba(193, 59, 255, .32); box-shadow: 0 10px 40px -18px rgba(193, 59, 255, .45); }
  .nav a svg { transition: transform .3s cubic-bezier(.3, 1.5, .4, 1); }
  .nav a:hover svg { transform: scale(1.18) rotate(-6deg); }
  .nav a:hover { transform: none; }
  .tabbar a[aria-current="page"] svg { animation: pop .4s cubic-bezier(.3, 1.5, .4, 1); }
  .stat { transition: transform .25s cubic-bezier(.3, 1.5, .4, 1), background-color .25s, border-color .25s; }
  .stat:hover { transform: translateY(-3px); }
  a.node.chip { transition: transform .25s cubic-bezier(.3, 1.5, .4, 1), border-color .25s; }
  a.node.chip:hover { transform: translateY(-2px) scale(1.015); }
  .st[data-s="ok"] { animation: glow 2.8s ease-out infinite; }
  .list a.item[data-sel="true"] { box-shadow: inset 3px 0 0 var(--brand); }
  .toast { animation: rise .35s cubic-bezier(.2, .8, .2, 1); }
}
.htop .stats { flex: 3 1 420px; }
.htop .msg { flex: 2 1 260px; }
.cols2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) { .cols2.even { grid-template-columns: minmax(0, 1fr); } }
.seg { flex-wrap: wrap; }

/* Phones. The bars keep their own place while a page changes, and nothing moves or resizes under a finger. */
.topbar { view-transition-name: topbar; }
.side { view-transition-name: side; }
::view-transition-group(topbar), ::view-transition-group(side) { z-index: 2; animation: none; }
::view-transition-old(topbar), ::view-transition-old(side) { display: none; }
::view-transition-new(topbar), ::view-transition-new(side) { animation: none; }
.stat .v, .ring b { font-variant-numeric: tabular-nums; }
@keyframes riseflat { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) and (max-width: 860px) {
  .enter .rv { animation: riseflat .45s ease-out backwards; animation-delay: calc(var(--i, 0) * 35ms); }
  [data-panel]:not([hidden]) { animation: fadein .25s ease-out; }
}
/* Hover effects that grow or lift things are for a mouse. A tap must not leave a tile enlarged. */
@media (hover: none) {
  .stat:hover, a.node.chip:hover, .btn:hover, .nav a:hover, .nav a:hover svg { transform: none; }
  .card:hover { box-shadow: none; }
}

.nodebar { margin: 0; padding: 10px 24px; font-size: 14px; color: var(--muted); background: rgba(193, 59, 255, .1); border-bottom: 1px solid var(--line2); }
.nodebar[data-active="1"] { color: var(--ink); background: rgba(208, 59, 59, .18); border-bottom-color: rgba(208, 59, 59, .5); }
@media (max-width: 860px) { .nodebar { padding: 10px 16px; font-size: 13px; } }

.nav a[hidden], .tabbar a[hidden] { display: none !important; }
.htop .stats { flex: 1 1 100%; }
.ghead { display: flex; align-items: baseline; gap: 10px; padding: 14px 12px 6px; font-size: 13px; letter-spacing: .02em; }
.ghead a { color: var(--ink); font-weight: 500; }
.ghead:first-child { padding-top: 6px; }

/* Topology: an organization is a box with its servers inside. The columns are shared with the map, so all servers line up. */
.morg { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; row-gap: 26px; padding: 14px 14px 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.02); min-width: 0; }
.morg.slow { border-color: rgba(250,178,25,.55); }
.morg.down { border-color: rgba(208,59,59,.65); }
.morg-h { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin-left: 34px; min-width: 0; flex-wrap: wrap; }
.morg-h .on { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; flex: 1 1 200px; }
.morg-h .on a { font-weight: 600; font-size: 16px; }
.morg-h .sub { font-size: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.morg-h .cnt { flex: none; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; }
.morg-e { grid-column: 1 / -1; margin-left: 34px; font-size: 14px; }
@media (max-width: 720px) { .morg { padding: 10px 8px 12px; row-gap: 8px; border-radius: 16px; } .morg-h { margin-left: 34px; } }

/* Phones: the menu opens from a burger button. */
.burger { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: -8px; border: 0; background: none; color: var(--ink); border-radius: 12px; cursor: pointer; flex: none; }
.burger:hover, .burger[aria-expanded="true"] { background: rgba(193,59,255,.16); }
.drawer { position: fixed; inset: 0; z-index: 40; display: none; }
.drawer:not([hidden]) { display: block; }
.drawer .scrim { position: absolute; inset: 0; background: rgba(5,6,26,.6); }
.drawer .sheet { position: absolute; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); display: flex; flex-direction: column; gap: 12px; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); background: var(--s1); border-right: 1px solid var(--line2); overflow-y: auto; box-shadow: 10px 0 40px rgba(0,0,0,.45); }
.dnav { display: flex; flex-direction: column; gap: 2px; }
.dnav a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; color: var(--muted); font-size: 16px; min-height: 48px; }
.dnav a:hover { color: var(--ink); }
.dnav a[aria-current="page"] { color: var(--ink); background: rgba(193,59,255,.16); }
.dnav a[aria-current="page"] svg { stroke: var(--brand); }
.dnav a[hidden] { display: none !important; }
.dfoot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line2); }
.dfoot .userrow { display: flex; align-items: center; gap: 12px; padding: 6px 4px; }
.dfoot .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.dfoot .who .mono { font-size: 12px; color: var(--muted); }
.dfoot .ver { font-size: 12px; color: var(--faint); padding-left: 4px; }
body.menu-open { overflow: hidden; }
@media (min-width: 861px) { .drawer { display: none !important; } }
@media (prefers-reduced-motion: no-preference) { .drawer:not([hidden]) .sheet { animation: sheetin .22s ease-out; } @keyframes sheetin { from { transform: translateX(-24px); opacity: 0; } } }

/* History graph of a service */
.hchart { position: relative; }
.hsvg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.hgrid { stroke: var(--line2); stroke-width: 1; }
.hlab { fill: var(--faint); font-size: 11px; }
.hline { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.hdot { fill: var(--brand); stroke: var(--s1); stroke-width: 2; }
.hfail { fill: var(--bad); }
.hcross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.htip { position: absolute; top: -4px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); font-size: 13px; pointer-events: none; white-space: nowrap; z-index: 2; }
.htip .tfail { color: #ff8a8a; }
