/* bruma.css: the one stylesheet of the hub, the admin page and the portal
   (SPEC §6.14, issue #77, look F). Served as /static/bruma.css by each of them,
   with a version query in the URL. No JavaScript anywhere: the theme comes from
   prefers-color-scheme, or from <html data-theme="light|dark"> when the theme
   cookie says so (POST /theme).

   Fonts: IBM Plex Sans, Plex Mono and Plex Serif (Latin subsets from
   Fontsource), SIL Open Font License 1.1, licence text next to them in fonts/.
   Served by the app itself from /static/fonts/; no external asset is ever loaded.

   Look F: cool blue-grey "fog" neutrals, the four status colours the only strong
   ones; flat pages on one surface, hairlines instead of cards, one heading
   level; a text-only sidebar with the theme, reload and sign-out at its foot.
   Every text colour against its background was checked for WCAG AA (4.5:1) in
   both schemes, every graphic (squares, bars, marks) for 3:1. The order below:
   tokens, base, frame, headings, the first screen, admin and portal, then the
   hub's pieces. */
@font-face { font-family:"IBM Plex Sans"; font-weight:400; font-display:swap; src:url("fonts/ibm-plex-sans-latin-400-normal.woff2?v=3b646991d300") format("woff2"); }
@font-face { font-family:"IBM Plex Sans"; font-weight:500; font-display:swap; src:url("fonts/ibm-plex-sans-latin-500-normal.woff2?v=0717336fb31f") format("woff2"); }
@font-face { font-family:"IBM Plex Sans"; font-weight:600; font-display:swap; src:url("fonts/ibm-plex-sans-latin-600-normal.woff2?v=8960851d691c") format("woff2"); }
@font-face { font-family:"IBM Plex Mono"; font-weight:400; font-display:swap; src:url("fonts/ibm-plex-mono-latin-400-normal.woff2?v=08949f728dc5") format("woff2"); }
@font-face { font-family:"IBM Plex Mono"; font-weight:600; font-display:swap; src:url("fonts/ibm-plex-mono-latin-600-normal.woff2?v=0d1f0b8d0722") format("woff2"); }
@font-face { font-family:"IBM Plex Serif"; font-weight:400; font-display:swap; src:url("fonts/ibm-plex-serif-latin-400-normal.woff2?v=cb2c5eee2c0a") format("woff2"); }
@font-face { font-family:"IBM Plex Serif"; font-weight:500; font-display:swap; src:url("fonts/ibm-plex-serif-latin-500-normal.woff2?v=677082fc2e9e") format("woff2"); }

/* ---- tokens: fog, light (default unless the system or the cookie says dark) ---- */
:root { color-scheme:light;
  --bg:#ffffff; --side:#f3f5f8; --tint:#f5f7fa; --hover:#eef1f5; --field:#ffffff; --field-line:#8994a3;
  --fg:#1b2531; --mut:#525f70; --faint:#5f6b7c; --line:#e1e6ec; --line2:#c9d1db;
  --ink:#1f2b39; --on-ink:#ffffff; --link:#1f4f86;
  --red:#b2392b; --yellow:#87580a; --green:#0b7350; --grey:#566373; --crit:#b2392b;
  --red-bg:rgba(201,85,67,.11); --yellow-bg:rgba(217,154,6,.14); --green-bg:rgba(16,170,120,.12);
  --grey-bg:rgba(110,128,150,.13);
  --c-red:#c95543; --c-yellow:#a87a00; --c-green:#0e9a6b; --c-grey:#7d8998; --c-none:#eef1f5;
  --code-bg:#17202b; --code-fg:#eef2f6;
  --stage:#ffffff; --stage-line:#e3e8ee; --band:#eef2f7; --s-free:#8994a3;
  --shadow:0 1px 2px rgba(23,34,48,.05), 0 12px 32px -12px rgba(23,34,48,.16);
  --mono:"IBM Plex Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  --sans:"IBM Plex Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --serif:"IBM Plex Serif",Georgia,"Times New Roman",serif; }
/* fog, dark: by system preference (unless the cookie says light), and by the cookie */
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { color-scheme:dark;
  --bg:#11161d; --side:#0d1217; --tint:#161d25; --hover:#1b232d; --field:#0d1217; --field-line:#5d6977;
  --fg:#e5eaf0; --mut:#a0abb8; --faint:#8a95a3; --line:#252f3a; --line2:#35414e;
  --ink:#e5eaf0; --on-ink:#11161d; --link:#9cc3f0;
  --red:#f3a397; --yellow:#fcd34d; --green:#6ee7b7; --grey:#a3afbd; --crit:#b23a2a;
  --red-bg:rgba(224,96,76,.2); --yellow-bg:rgba(245,158,11,.17); --green-bg:rgba(20,184,134,.18);
  --grey-bg:rgba(120,140,160,.2);
  --c-red:#e0604c; --c-yellow:#e5a50a; --c-green:#14b886; --c-grey:#6c7988; --c-none:#1a222b;
  --code-bg:#0a0e13; --code-fg:#e5eaf0;
  --stage:#151c24; --stage-line:#26313c; --band:#1c2530; --s-free:#6a7684;
  --shadow:0 1px 0 rgba(255,255,255,.03) inset, 0 18px 40px -16px rgba(0,0,0,.7); } }
:root[data-theme=dark] { color-scheme:dark;
  --bg:#11161d; --side:#0d1217; --tint:#161d25; --hover:#1b232d; --field:#0d1217; --field-line:#5d6977;
  --fg:#e5eaf0; --mut:#a0abb8; --faint:#8a95a3; --line:#252f3a; --line2:#35414e;
  --ink:#e5eaf0; --on-ink:#11161d; --link:#9cc3f0;
  --red:#f3a397; --yellow:#fcd34d; --green:#6ee7b7; --grey:#a3afbd; --crit:#b23a2a;
  --red-bg:rgba(224,96,76,.2); --yellow-bg:rgba(245,158,11,.17); --green-bg:rgba(20,184,134,.18);
  --grey-bg:rgba(120,140,160,.2);
  --c-red:#e0604c; --c-yellow:#e5a50a; --c-green:#14b886; --c-grey:#6c7988; --c-none:#1a222b;
  --code-bg:#0a0e13; --code-fg:#e5eaf0;
  --stage:#151c24; --stage-line:#26313c; --band:#1c2530; --s-free:#6a7684;
  --shadow:0 1px 0 rgba(255,255,255,.03) inset, 0 18px 40px -16px rgba(0,0,0,.7); }

/* ---- base ---- */
* { box-sizing:border-box; }
html, body { margin:0; }
body { background:var(--bg); color:var(--fg); font:400 14.5px/1.55 var(--sans);
  -webkit-font-smoothing:antialiased; }
a { color:var(--link); text-decoration:none; }
a:hover { text-decoration:underline; }
:focus-visible { outline:2px solid var(--link); outline-offset:2px; border-radius:3px; }
button, input, select, textarea { font-family:inherit; }
code { font:.92em var(--mono); background:var(--tint); border:1px solid var(--line);
  border-radius:3px; padding:0 3px; }
pre code { background:none; border:0; padding:0; }
pre.out, pre.code { overflow:auto; background:var(--code-bg); color:var(--code-fg); margin:0;
  padding:11px 13px; border-radius:6px; font:12.5px/1.55 var(--mono); white-space:pre-wrap;
  word-break:break-word; }
pre.out { max-height:520px; } pre.code { word-break:break-all; }
.mono { font-family:var(--mono); font-size:.92em; }
.num { font-variant-numeric:tabular-nums; }
.vh { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.hint { color:var(--mut); }
.faint { color:var(--faint); }
.empty { color:var(--mut); font-size:14px; padding:6px 0; }
.quiet { color:var(--green); font-size:14px; padding:6px 0; }
.notice { border-left:2px solid var(--c-red); background:var(--red-bg); color:var(--red);
  padding:9px 14px; font-size:13.5px; margin:0 0 18px; border-radius:0 4px 4px 0; }
.status-pending { color:var(--yellow); } .status-ok { color:var(--green); }
.status-failed { color:var(--red); font-weight:600; }
.pre-wrap { white-space:pre-wrap; word-break:break-word; }
.qr { background:#fff; padding:8px; border-radius:6px; width:220px; height:220px; }
.secret { font:600 17px/1.4 var(--mono); padding:12px 14px; background:var(--tint);
  border:1px solid var(--line2); border-radius:6px; word-break:break-all; }
.legal { white-space:pre-wrap; word-break:break-word; font-size:14px; }
.hp { position:absolute; left:-10000px; width:1px; height:1px; overflow:hidden; }
form.inline { display:inline-block; margin-right:8px; }
.spacer { flex:1; }
.tag { font:400 12px var(--mono); color:var(--mut); }

/* ---- buttons and fields ---- */
.btn { display:inline-block; font:500 13.5px/1 var(--sans); padding:9px 14px; border-radius:6px;
  border:1px solid var(--line2); background:var(--bg); color:var(--fg); cursor:pointer;
  text-decoration:none; }
.btn:hover { background:var(--hover); text-decoration:none; }
.btn.primary { background:var(--ink); color:var(--on-ink); border-color:var(--ink); }
.btn.primary:hover { opacity:.9; }
.btn.danger { color:var(--red); border-color:var(--red); }
.btn.danger:hover { background:var(--red-bg); }
.btn.sm { padding:6px 11px; font-size:12.5px; }
.btn.big { font-size:15px; padding:13px 20px; border-radius:9px; }
.linkbtn { background:none; border:0; padding:0; font:inherit; color:var(--mut); cursor:pointer;
  text-decoration:none; }
.linkbtn:hover { color:var(--fg); text-decoration:underline; }
.linkbtn.on { color:var(--fg); font-weight:600; }
input, select, textarea { font-size:14px; padding:7px 10px; border:1px solid var(--field-line);
  border-radius:6px; background:var(--field); color:var(--fg); }
input:focus, select:focus, textarea:focus { outline:2px solid var(--link); outline-offset:0; }
input[type=checkbox], input[type=radio] { accent-color:var(--ink); }
details > summary { cursor:pointer; }
.addform { display:flex; gap:8px; margin:10px 0 18px; flex-wrap:wrap; align-items:center; }
.addform input[name=name] { flex:1; min-width:200px; }
.nform { display:grid; gap:10px; max-width:420px; margin:12px 0 6px; }
.nform label { display:flex; flex-direction:column; gap:4px; font-size:13px; font-weight:500; color:var(--fg); }
.nform label.check, .nform label:has(> input[type=radio]) { flex-direction:row; align-items:center;
  gap:8px; font-weight:400; font-size:14px; }
.nform .hint { font-size:12.5px; font-weight:400; }
.nform textarea { min-height:80px; font:inherit; }
.nform .btn { justify-self:start; }
.nchan { margin-bottom:14px; }
details.nadd { margin-top:10px; }
details.nadd > .hint { color:var(--mut); font-size:13px; margin-top:6px; }
details.nadd:has(> summary.btn) { margin:0 0 18px; }
details.nadd > summary.btn { display:inline-block; list-style:none; }
details.nadd > summary.btn::-webkit-details-marker { display:none; }
label.check { display:flex; gap:8px; align-items:center; font-size:14px; }

/* ---- frame: a narrow text sidebar and one surface ---- */
.frame { display:grid; grid-template-columns:208px minmax(0,1fr); min-height:100vh;
  background:linear-gradient(to right, var(--side) 207px, var(--line) 207px 208px, var(--bg) 208px); }
.side { background:var(--side); border-right:1px solid var(--line); padding:18px 0;
  position:sticky; top:0; height:100vh; overflow-y:auto; display:flex; flex-direction:column; }
.brand { display:flex; align-items:center; gap:9px; color:var(--fg); text-decoration:none; }
.brand:hover { text-decoration:none; }
.side .brand { padding:0 18px 18px; }
.brand .bt { display:flex; flex-direction:column; line-height:1.2; }
.brand b { font-weight:600; font-size:15px; }
.brand small { font-size:12px; color:var(--mut); }
.logo { flex:none; } .logo-bg { fill:var(--ink); }
.logo .lg { fill:#14b886; } .logo .ly { fill:#f5b40b; } .logo .lr { fill:#e0604c; }
.side nav { display:flex; flex-direction:column; }
.side .grp { font-size:12px; color:var(--mut); padding:14px 18px 3px; }
.side nav a { display:flex; align-items:baseline; color:var(--mut); padding:4px 18px 4px 16px;
  border-left:2px solid transparent; font-size:14px; }
.side nav a:hover { color:var(--fg); text-decoration:none; background:var(--hover); }
.side nav a.on { color:var(--fg); font-weight:600; border-left-color:var(--fg); }
.side nav a .cnt { margin-left:auto; padding-left:8px; color:var(--red); font-weight:600; font-size:12.5px; }
.sidefoot { margin-top:auto; padding:14px 18px 0; border-top:1px solid var(--line); font-size:13px;
  color:var(--mut); display:flex; flex-direction:column; gap:6px; }
.sidefoot form, .top form { display:inline; margin:0; }
form.themes { display:flex; gap:10px; align-items:baseline; flex-wrap:wrap; }
.main { padding:30px 44px 64px; max-width:1180px; min-width:0; }

/* the top row: signed-out pages and the portal */
header.top { display:flex; align-items:center; gap:18px; padding:14px 32px; border-bottom:1px solid var(--line);
  font-size:13.5px; }
header.top .right { margin-left:auto; display:flex; gap:16px; align-items:baseline; color:var(--mut);
  flex-wrap:wrap; justify-content:flex-end; }
.gate { display:flex; justify-content:center; padding:56px 24px 64px; }
.gate .box { width:100%; max-width:420px; }
.gate.wide .box { max-width:600px; }
.gate .box > h1 { font:400 32px/1.15 var(--serif); letter-spacing:-.01em; margin:0 0 10px; }
.gate .box > p { color:var(--mut); font-size:14.5px; margin:0 0 18px; }
.gate form { margin:0 0 14px; }
.gate input { width:100%; margin-bottom:12px; }
.gate button { width:100%; }
.gate input[type=checkbox], .gate input[type=radio] { width:auto; margin:0; }
.gate label.check { display:block; margin:2px 0 14px; }
.gate label.check input { margin-right:8px; vertical-align:-1px; }
.gate .legal { margin-top:8px; }

/* ---- headings: one level, with a hairline ---- */
.titlebar { display:flex; align-items:baseline; gap:14px; flex-wrap:wrap; padding-bottom:14px;
  margin-bottom:22px; border-bottom:1px solid var(--line); }
.titlebar h1 { font-size:21px; font-weight:600; margin:0; }
.titlebar .meta { color:var(--faint); font-size:13px; }
.titlebar .right { margin-left:auto; color:var(--mut); font-size:13px; }
.phead { padding-bottom:16px; border-bottom:1px solid var(--line); margin-bottom:8px; }
.ptitle { font-size:21px; font-weight:600; margin:0; overflow-wrap:anywhere; }
.phead .sdesc { margin-top:6px; }
.pmeta { margin:6px 0 0; font-size:13px; color:var(--faint); }
.phead .pright { margin-top:8px; font-size:13px; }
h2, .stitle { font-size:15.5px; font-weight:600; margin:0; color:var(--fg); }
.shead { margin:34px 0 12px; }
.shead .stitle { padding-bottom:7px; border-bottom:1px solid var(--line); }
.sdesc { margin:8px 0 0; color:var(--mut); font-size:14px; max-width:75ch; }
section { margin-top:34px; }
section > h2 { display:flex; align-items:baseline; gap:12px; padding-bottom:7px; margin:0 0 10px;
  border-bottom:1px solid var(--line); }
h2 .meta { margin-left:auto; font-size:13px; font-weight:400; color:var(--faint); }
.lead { margin:10px 0 12px; color:var(--mut); max-width:75ch; font-size:14px; }

/* ---- the first screen: one sentence, one action, one picture ---- */
.kicker { margin:14px 0 14px; font-size:13px; color:var(--faint); }
h1.say { font:400 44px/1.12 var(--serif); letter-spacing:-.012em; margin:0; max-width:28ch;
  color:var(--fg); overflow-wrap:anywhere; }
h1.say.s2 { font-size:32px; max-width:30ch; }
h1.say .hot { color:var(--red); } h1.say .ok { color:var(--green); } h1.say .warn { color:var(--yellow); }
.say2 { margin:14px 0 0; font-size:16.5px; line-height:1.55; color:var(--mut); max-width:62ch; }
.say2 b { color:var(--fg); font-weight:600; }
.cta { display:flex; align-items:center; gap:22px; margin:24px 0 0; flex-wrap:wrap; }
.quietlink { color:var(--mut); font-size:14.5px; }
.quietlink:hover { color:var(--fg); }
figure.stage { margin:36px 0 0; background:var(--stage); border:1px solid var(--stage-line); border-radius:18px;
  box-shadow:var(--shadow); padding:20px 26px 22px; }
figure.stage figcaption { display:flex; justify-content:space-between; align-items:baseline; gap:16px;
  flex-wrap:wrap; font-size:13.5px; color:var(--mut); margin-bottom:8px; }
figure.stage figcaption > span:first-child { color:var(--fg); font-weight:500; }
.keys { display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--faint); flex-wrap:wrap; }
.keys .k { width:10px; height:10px; border-radius:3px; display:inline-block; margin-left:8px; }
.k.slot { background:var(--fg); opacity:.78; } .k.free { box-shadow:inset 0 0 0 1.5px var(--s-free); }

/* host slots: one square per host */
/* one square size on every row: the height is fixed, the width follows */
svg.slots { display:block; overflow:visible; height:22px; width:auto; }
.s-used { fill:var(--fg); opacity:.78; }
.s-used.s-red { fill:var(--c-red); opacity:1; } .s-used.s-yellow { fill:var(--c-yellow); opacity:1; }
.s-used.s-green { fill:var(--c-green); opacity:1; } .s-used.s-grey { fill:var(--c-grey); opacity:1; }
.s-free { fill:none; stroke:var(--s-free); stroke-width:1.5; }
.s-inf { fill:var(--faint); font:400 17px var(--sans); }

/* admin: every hub and its host slots */
/* one grid for all rows (the li are display:contents), so the columns line
   up and a row of 15 squares never shrinks the others */
ul.tenants { list-style:none; margin:0; padding:0; display:grid;
  grid-template-columns:minmax(110px,max-content) max-content max-content minmax(0,1fr); align-items:center; }
ul.tenants li { display:contents; }
ul.tenants li > * { padding:12px 22px 12px 0; border-top:1px solid var(--line); align-self:stretch;
  display:flex; align-items:center; }
ul.tenants li:first-child > * { border-top:0; }
ul.tenants li > :last-child { padding-right:0; }
.tn { color:var(--fg); font-weight:600; font-size:16px; overflow-wrap:anywhere; }
.tu { font-size:13.5px; color:var(--mut); font-variant-numeric:tabular-nums; }
.tnote { font-size:14px; color:var(--mut); }
.tnote.n-red { color:var(--red); font-weight:500; } .tnote.n-yellow { color:var(--yellow); }
.tnote.n-green { color:var(--green); }
/* marks: a square colour mark and a word */
.mark { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:500;
  padding:1px 7px 1px 6px; border-radius:3px; white-space:nowrap; }
.mark::before { content:""; width:7px; height:7px; border-radius:1.5px; background:currentColor; }
.mark.red { color:var(--red); background:var(--red-bg); } .mark.yellow { color:var(--yellow); background:var(--yellow-bg); }
.mark.green { color:var(--green); background:var(--green-bg); } .mark.grey { color:var(--grey); background:var(--grey-bg); }
.sub2 { display:block; font-size:12.5px; color:var(--faint); }
/* the maintenance page */
ul.plain { list-style:none; margin:8px 0 0; padding:0; font-size:14px; }
ul.plain li { padding:7px 0; border-bottom:1px solid var(--line); }
dl.kv { display:grid; grid-template-columns:200px minmax(0,1fr); gap:6px 16px; margin:12px 0 0; font-size:14px; }
dl.kv dt { color:var(--mut); } dl.kv dd { margin:0; overflow-wrap:anywhere; }

/* portal: a welcome, then the settings with section links */
.portal-main { max-width:1040px; margin:0 auto; padding:0 32px; }
.welcome { padding:44px 0 8px; }
.hostsline { display:flex; align-items:center; gap:14px; flex-wrap:wrap; font-size:14px; color:var(--mut); }
.hostsline b { color:var(--fg); font-weight:600; }
.welcome .hostsline { margin:22px 0 0; }
.note-ok { color:var(--green); font-size:13.5px; margin:14px 0 0; }
.settings { display:grid; grid-template-columns:190px minmax(0,1fr); gap:48px; padding:36px 0 64px; }
.toc { position:sticky; top:20px; align-self:start; font-size:13.5px; display:flex; flex-direction:column; }
.toc a { color:var(--mut); padding:4px 0 4px 12px; border-left:1px solid var(--line); }
.toc a:hover { color:var(--fg); border-left-color:var(--fg); text-decoration:none; }
.settings section:first-child { margin-top:0; }
.settings form { max-width:420px; }
.settings form label { display:block; font-size:13px; font-weight:500; margin:12px 0 4px; }
.settings form label.radio { display:flex; align-items:center; gap:6px; font-weight:400; font-size:14px; margin:6px 0 0; }
.settings form input:not([type=radio]):not([type=checkbox]) { width:100%; }
.settings form .btn { margin-top:14px; }
.settings .hint { font-size:13px; margin:8px 0 0; }
footer.legal-links { display:flex; gap:16px; font-size:12.5px; justify-content:center; padding:24px;
  border-top:1px solid var(--line); margin-top:32px; }
footer.legal-links a { color:var(--mut); }
.gate footer.legal-links { border-top:0; margin-top:24px; padding:8px 0 0; }

/* ---- the admin and portal leftovers: blocks of a page, a padded note ---- */
section.block { margin-top:34px; }
section.block > h2 { padding-bottom:7px; margin:0 0 10px; border-bottom:1px solid var(--line); }
.card-pad { padding:12px 0; border-bottom:1px solid var(--line); }
.card-pad > .hint { font-size:13px; }
.card-pad p { margin:4px 0; }

/* ---- tables ---- */
table { width:100%; border-collapse:collapse; font-size:14px; font-variant-numeric:tabular-nums; }
th { text-align:left; font-weight:500; font-size:12.5px; color:var(--faint); padding:8px 12px 6px 0;
  border-bottom:1px solid var(--line2); white-space:nowrap; }
td { padding:8px 12px 8px 0; border-bottom:1px solid var(--line); vertical-align:baseline; text-align:left; }
td.r, th.r { text-align:right; }
tr:hover > td { background:var(--tint); }
tr.flag > td:first-child { box-shadow:inset 2px 0 0 var(--c-red); padding-left:10px; }
td a { font-weight:600; }
td a.name { color:var(--fg); white-space:nowrap; }
td .zero { color:var(--faint); }
.tablewrap { overflow-x:auto; }
table.ports td.addr { color:var(--mut); font:12px var(--mono); word-break:break-all; }
table.legendtab td:first-child { white-space:nowrap; width:1%; }

/* ---- chips and lights (hub) ---- */
.chip { font-size:12px; font-weight:600; padding:1px 7px; border-radius:3px; white-space:nowrap; }
.chip.ok, .chip.resolved, .chip.green { color:var(--green); background:var(--green-bg); }
.chip.warn, .chip.high, .chip.red { color:var(--red); background:var(--red-bg); }
.chip.medium, .chip.yellow { color:var(--yellow); background:var(--yellow-bg); }
.chip.info, .chip.muted, .chip.low, .chip.grey { color:var(--grey); background:var(--grey-bg); }
.chip.critical { color:#fff; background:var(--crit); }
.chip.new { color:var(--fg); background:transparent; box-shadow:inset 0 0 0 1px var(--line2); }
.chip.state { font-family:var(--mono); }
.light { display:inline-block; width:10px; height:10px; border-radius:2.5px; flex:none; background:var(--c-grey); }
.light.red { background:var(--c-red); } .light.yellow { background:var(--c-yellow); }
.light.green { background:var(--c-green); }
.light.big { width:14px; height:14px; border-radius:3px; }
.pills { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.pill { font-size:12px; font-weight:600; padding:1px 8px; border-radius:3px; background:var(--grey-bg); color:var(--grey); }
.pill.ok { background:var(--green-bg); color:var(--green); }
.pill.info, .pill.yellow { background:var(--yellow-bg); color:var(--yellow); }
.pill.warn, .pill.red { background:var(--red-bg); color:var(--red); }

/* ---- hub: the catalog's cards, panels (admin-ui's tenant page) ---- */
.cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:0 28px; }
.hcard { display:block; padding:14px 0 14px 12px; border-bottom:1px solid var(--line); color:inherit;
  text-decoration:none; box-shadow:inset 2px 0 0 var(--line2); }
.hcard:hover { background:var(--tint); text-decoration:none; }
.hcard.red, .hcard.warn { box-shadow:inset 2px 0 0 var(--c-red); }
.hcard.yellow { box-shadow:inset 2px 0 0 var(--c-yellow); }
.hcard.green, .hcard.ok { box-shadow:inset 2px 0 0 var(--c-green); }
.hcard.grey, .hcard.silent, .hcard.pending, .hcard.revoked { box-shadow:inset 2px 0 0 var(--c-grey); }
.hcard .dtop { display:flex; align-items:center; gap:10px; }
.hcard .dname { font-weight:600; font-size:15px; overflow-wrap:anywhere; }
.hcard .dtag { margin-left:auto; font:12px var(--mono); color:var(--mut); }
.hcard .dsub { color:var(--mut); font-size:13px; margin:4px 0 8px; }
.hcard .since { margin-top:8px; font-size:12.5px; color:var(--fg); }
p.since { margin:14px 0 0; color:var(--mut); font-size:14px; }
.panel { border:1px solid var(--line); border-radius:10px; padding:18px 20px; background:var(--bg); }
.panel .shead { margin:0 0 12px; }
.panel + .panel { margin-top:16px; }
.cols { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.cols > .panel + .panel { margin-top:0; }
.kv2 .kvr { display:flex; justify-content:space-between; gap:16px; padding:8px 0; border-bottom:1px solid var(--line);
  font-size:13.5px; color:var(--mut); }
.kv2 .kvr b { font:500 13px var(--mono); color:var(--fg); text-align:right; overflow-wrap:anywhere; }
/* the issue timeline (a host's Issues tab): its numbers are a page of their own */
.fig { min-width:0; }
.cw .mob { display:none; }
.tline .grid { stroke:var(--line); stroke-width:1; vector-effect:non-scaling-stroke; }
.tline .ax { font:400 11px var(--sans); fill:var(--faint); }
.b.green { fill:var(--c-green); } .b.red, .b.critical, .b.high { fill:var(--c-red); }
.b.yellow, .b.medium { fill:var(--c-yellow); } .b.grey, .b.low, .b.info { fill:var(--c-grey); }
.b.done { opacity:.45; }
.tline { display:block; width:100%; height:auto; }
.tline .tl { font:500 12.5px var(--sans); fill:var(--fg); }
.tline .fixdot { fill:var(--c-green); stroke:var(--bg); stroke-width:2; }
.chartnote { margin:12px 0 0; font-size:12.5px; color:var(--mut); }
/* host header, run page, steps */
.hosthead { padding-bottom:16px; border-bottom:1px solid var(--line); }
.hosthead .row1 { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.hosthead .hname { font-size:21px; font-weight:600; overflow-wrap:anywhere; }
.hosthead .meta2 { color:var(--mut); font-size:13px; margin-top:6px; }
.runmeta { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:14px 22px;
  padding:14px 0; border-bottom:1px solid var(--line); }
.runmeta .k { font-size:12.5px; color:var(--faint); }
.runmeta .v { font-weight:600; font-size:14.5px; margin-top:2px; word-break:break-all; }
.runmeta .v.warn { color:var(--red); } .runmeta .v.ok { color:var(--green); }
.setup { counter-reset:step; }
.step { display:flex; gap:14px; padding:14px 0; }
.step + .step { border-top:1px solid var(--line); }
.step .num { counter-increment:step; flex:none; width:24px; height:24px; border-radius:5px; background:var(--ink);
  color:var(--on-ink); font:600 12px var(--sans); display:flex; align-items:center; justify-content:center; }
.step .num::before { content:counter(step); }
.step .body { flex:1; min-width:0; }
.step .body p { margin:2px 0 8px; }
.step .body .hint { font-size:13px; margin-top:8px; }
/* tools */
.toolstrip { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 4px; }
.tool { border:1px solid var(--line); border-radius:6px; padding:6px 12px; font-size:13.5px; display:flex;
  gap:8px; align-items:center; flex-wrap:wrap; }
.tool.off { border-style:dashed; color:var(--mut); }
.tool .tname { font-weight:600; }
.tool code { font-size:12px; }
/* issues: rows that open to the full text */
.issues { display:flex; flex-direction:column; }
.issue { padding:12px 0; border-bottom:1px solid var(--line); }
.issue .ihead { display:flex; align-items:baseline; gap:9px; flex-wrap:wrap; }
.issue .ititle { font-weight:600; font-size:15px; overflow-wrap:anywhere; }
.issue .isub { color:var(--faint); font:12px var(--mono); word-break:break-all; }
.issue .iwhy { margin:0 0 4px; font-size:14.5px; max-width:75ch; }
.issue .ifix { margin-top:10px; font-size:14px; padding-left:12px; border-left:2px solid var(--c-green); }
.issue .ifix p { margin:6px 0; max-width:75ch; }
.issue .ifix pre.code { margin:6px 0; }
.issue .ifoot { margin-top:10px; color:var(--faint); font-size:12.5px; }
.issue details { margin-top:10px; } .issue summary { color:var(--mut); font-size:13px; }
.issue details pre.out { margin-top:6px; max-height:240px; }
.issue.resolved .ititle { text-decoration:line-through; text-decoration-color:var(--mut); }
details.handle { margin-top:12px; }
details.handle > summary { color:var(--mut); font-size:13px; }
details.handle form { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
details.handle input[name=note] { flex:1; min-width:16em; }
details.handle .hint { font-size:12.5px; }
.handled { margin-top:12px; padding-top:9px; border-top:1px dashed var(--line2); }
.handled p { margin:0 0 4px; overflow-wrap:anywhere; }
.rows { display:flex; flex-direction:column; border-top:1px solid var(--line); }
details.irow { border-bottom:1px solid var(--line); }
details.irow > summary { list-style:none; display:flex; align-items:baseline; gap:10px; padding:8px 4px; flex-wrap:wrap; }
details.irow > summary:hover { background:var(--tint); }
details.irow > summary::-webkit-details-marker { display:none; }
details.irow > summary::before { content:"\25B8"; color:var(--faint); font-size:11px; }
details.irow[open] > summary::before { content:"\25BE"; }
details.irow[open] > summary .rtitle { font-weight:600; }
details.irow .rtitle { font-size:14.5px; overflow-wrap:anywhere; flex:1; min-width:12em; }
details.irow .rmeta { color:var(--faint); font-size:12.5px; white-space:nowrap; }
details.irow > .issue { border:0; padding:4px 0 16px 22px; }
details.irow > .issue .ihead { display:none; }
details.irow.resolved .rtitle { text-decoration:line-through; text-decoration-color:var(--mut); }
details.irow.grp > .gfix { padding:4px 0 2px 22px; font-size:14px; }
details.irow.grp > .gfix p { margin:4px 0 8px; }
details.irow.grp > .rows { margin:8px 0 10px 22px; }
details.quietgrp { margin-top:12px; }
details.quietgrp > summary { color:var(--mut); font-size:13px; padding:4px 0; }
details.quietgrp .issues, details.quietgrp .rows { margin-top:8px; }
.nothing { padding:14px 0 14px 12px; color:var(--green); font-size:16px; font-weight:600;
  box-shadow:inset 2px 0 0 var(--c-green); }
details.manage { margin-top:30px; }
details.manage summary { color:var(--mut); font-size:13px; }
details.manage .row { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; align-items:center; }
details.manage .hint { font-size:12.5px; margin-top:10px; max-width:70ch; }
details.manage pre.code { margin-top:8px; }
/* the colours page */
.colours .lrow { display:flex; gap:14px; align-items:flex-start; padding:14px 0; }
.colours .lrow + .lrow { border-top:1px solid var(--line); }
.colours .lrow .light { margin-top:6px; }
.colours .lrow ul, .colours .lrow p { margin:4px 0 0; padding-left:18px; font-size:14px; }
.colours .lrow p { padding-left:0; }
.reasons { margin:10px 0 0; padding-left:18px; font-size:13.5px; }

/* ---- look F, stage 2: the overview, to fix, one issue, hosts, history ---- */
.calm { padding-top:14px; }
.narrow { max-width:860px; }
h1.say .warm { color:var(--yellow); }
.say2 .sep, .sep { color:var(--line2); margin:0 8px; }
.say2 .sev { font-size:inherit; }
.btn .bpill { display:inline-block; margin-left:10px; padding:1px 8px; border-radius:20px;
  background:rgba(255,255,255,.18); font-size:13px; font-weight:600; }
:root[data-theme=dark] .btn .bpill { background:rgba(0,0,0,.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .btn .bpill { background:rgba(0,0,0,.12); } }
.crumb { font-size:13px; color:var(--faint); margin:0 0 12px; }
.crumb a { color:var(--mut); }
.keys > span { display:inline-flex; align-items:center; gap:6px; margin-left:12px; }
.keys .k { margin-left:0; }
/* the grid: one row per host, one square per day; today on a band */
ol.dgrid { list-style:none; margin:4px 0 0; padding:0; }
.drow, .dhead { display:grid; grid-template-columns:minmax(0,150px) auto minmax(0,1fr); gap:0 18px;
  align-items:center; }
.drow { padding:3px 0; }
.dcells { display:grid; grid-template-columns:repeat(14,38px); gap:0 6px; }
.dc { display:block; height:34px; border-radius:8px; }
.dhead .dcells b { font-size:12px; font-weight:400; color:var(--faint); white-space:nowrap; padding:4px 0 6px;
  overflow:visible; }
.dhead .dcells b.now { color:var(--fg); font-weight:600; text-align:center; background:var(--band);
  border-radius:8px; box-shadow:0 0 0 5px var(--band); }
.drow .dc:last-child { box-shadow:0 0 0 5px var(--band); }
.d-red { background:var(--c-red); } .d-yellow { background:var(--c-yellow); } .d-green { background:var(--c-green); }
.d-grey, .d-wait { background:var(--c-grey); }
.d-none { background:transparent; box-shadow:inset 0 0 0 1px var(--line2); }
.drow .dc.d-none:last-child { box-shadow:inset 0 0 0 1px var(--line2), 0 0 0 5px var(--band); }
.d-unk { background:repeating-linear-gradient(135deg, var(--line2) 0 3px, transparent 3px 7px); }
.dn { color:var(--fg); font-weight:500; font-size:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dn:hover { color:var(--link); }
.dnote { font-size:13.5px; font-weight:500; color:var(--mut); white-space:nowrap; overflow:hidden;
  text-overflow:ellipsis; }
.dnote.n-red { color:var(--red); } .dnote.n-yellow { color:var(--yellow); } .dnote.n-green { color:var(--green); }
.dnote.n-grey { color:var(--faint); font-weight:400; }
.dmore { padding:12px 0 2px; font-size:14px; }
.dmore a { color:var(--mut); border-bottom:1px solid var(--line2); }
.dmore a:hover { color:var(--fg); text-decoration:none; }
figure.stage .chartnote { margin-top:14px; }
/* "start here": at most three lines */
section.first { margin-top:30px; }
h2.soft { font-size:13.5px; font-weight:500; color:var(--faint); margin:0 0 6px; border:0; padding:0; }
.firsts { list-style:none; margin:0; padding:0; }
.firsts li { display:grid; grid-template-columns:minmax(0,130px) 76px minmax(0,1fr) auto; gap:14px;
  align-items:baseline; padding:10px 0; border-bottom:1px solid var(--line); font-size:15px; }
.firsts li:first-child { border-top:1px solid var(--line); }
.firsts .hn { color:var(--fg); font-weight:600; overflow-wrap:anywhere; }
.firsts .it { color:var(--fg); overflow-wrap:anywhere; }
.firsts .it:hover { color:var(--link); }
.firsts .go { font-size:13.5px; white-space:nowrap; }
.more-links { display:flex; gap:10px 22px; flex-wrap:wrap; margin:20px 0 0; font-size:14px; }
.more-links a { color:var(--mut); border-bottom:1px solid var(--line2); }
.more-links a:hover { color:var(--fg); text-decoration:none; border-color:var(--fg); }
.calm > p.since { margin-top:16px; }
/* severity as a word */
.sev { font-size:13px; font-weight:600; white-space:nowrap; color:var(--grey); }
.sev.critical, .sev.high { color:var(--red); } .sev.medium { color:var(--yellow); }
.sev.critical::after { content:" !"; }
.sev.muted { color:var(--faint); font-weight:500; }
/* to fix: a group per host */
.group { margin-top:26px; }
.group > header { display:flex; flex-wrap:wrap; align-items:baseline; gap:10px; padding:6px 0; }
.group > header a.host { font-weight:600; color:var(--fg); font-size:15px; overflow-wrap:anywhere; }
.group > header .mut { font-size:13px; color:var(--mut); }
ul.rows { list-style:none; margin:0; padding:0; border-top:1px solid var(--line); display:block; }
ul.rows > li { display:grid; grid-template-columns:76px minmax(0,1fr) auto; gap:14px; align-items:baseline;
  padding:8px 0; border-bottom:1px solid var(--line); font-size:14px; }
ul.rows > li:hover { background:var(--tint); }
ul.rows .what { min-width:0; overflow-wrap:anywhere; }
ul.rows .what a { color:var(--fg); font-weight:400; }
ul.rows .what a:hover { color:var(--link); }
ul.rows .where { color:var(--faint); font-size:12.5px; font-family:var(--mono); margin-left:8px; word-break:break-all; }
ul.rows .when { color:var(--faint); font-size:12.5px; white-space:nowrap; }
ul.rows > li.muted .what a { color:var(--faint); }
/* one issue */
.narrow > details.handle { margin-top:16px; }
.narrow > .handled { margin-top:16px; max-width:72ch; }
.prose { margin-top:26px; max-width:72ch; font-size:15px; line-height:1.6; }
.prose h2.soft { margin:26px 0 6px; font-size:14px; color:var(--mut); font-weight:600; }
.prose p { margin:6px 0; } .prose ul { padding-left:20px; } .prose li { margin:3px 0; }
.prose pre.out { margin-top:6px; }
.prose .ifoot { margin-top:22px; color:var(--faint); font-size:13px; }
.next { display:flex; justify-content:space-between; gap:20px; margin-top:32px; padding-top:14px;
  border-top:1px solid var(--line); font-size:14px; flex-wrap:wrap; }
/* tables of the hosts and history pages */
table.hosts td a.name { font-weight:600; }
table.hosts .sub2 { font-weight:400; max-width:32ch; }
td.bad { color:var(--red); font-weight:600; }
table.days { font-size:12.5px; }
table.days th, table.days td { padding-right:10px; }
table.narrowt { max-width:520px; }
table th[scope=row] { text-align:left; white-space:nowrap; font-weight:500; color:var(--fg); font-size:13px;
  border-bottom:1px solid var(--line); }
.cta details.nadd { margin:0; }
.cta details.nadd[open] { flex-basis:100%; }

/* ---- look F, stage 3: one host's page, its tabs as plain links ---- */
nav.tabs { display:flex; flex-wrap:wrap; gap:0 26px; margin:26px 0 0; border-bottom:1px solid var(--line);
  font-size:14.5px; }
nav.tabs a { color:var(--mut); padding:8px 0 10px; border-bottom:2px solid transparent; margin-bottom:-1px; }
nav.tabs a:hover { color:var(--fg); text-decoration:none; }
nav.tabs a.on { color:var(--fg); font-weight:600; border-bottom-color:var(--fg); }
.say3 { margin:10px 0 0; font-size:14.5px; max-width:62ch; color:var(--fg); }
/* the day tiles: state and things to fix at the end of each day; the numbers
   are 24 px (large text: 3:1) in --on-ink, white on the light tiles, ink on
   the dark ones */
ol.htiles { list-style:none; margin:10px 0 0; padding:0; display:grid;
  grid-template-columns:repeat(14,minmax(0,1fr)); gap:14px 8px; }
ol.htiles li { display:flex; flex-direction:column; align-items:center; gap:7px; min-width:0; }
ol.htiles b { display:flex; align-items:center; justify-content:center; width:100%; max-width:62px;
  aspect-ratio:1; border-radius:12px; font:500 24px/1 var(--sans); color:var(--on-ink);
  font-variant-numeric:tabular-nums; letter-spacing:-.02em; overflow:hidden; }
ol.htiles li.now b { box-shadow:0 0 0 5px var(--band); }
ol.htiles li.now b.d-none { box-shadow:inset 0 0 0 1px var(--line2), 0 0 0 5px var(--band); }
ol.htiles small { font-size:12px; color:var(--faint); white-space:nowrap; line-height:1; }
ol.htiles li.now small { color:var(--fg); font-weight:600; }
p.story { margin:16px 0 0; font-size:14px; color:var(--mut); max-width:75ch; }
.firsts.h li { grid-template-columns:76px minmax(0,1fr) auto; }
.factline { margin:28px 0 0; padding-top:14px; border-top:1px solid var(--line); font-size:13.5px;
  color:var(--mut); overflow-wrap:anywhere; }
h2.soft.big { font-size:15.5px; font-weight:600; color:var(--fg); padding-bottom:7px; margin:0 0 10px;
  border-bottom:1px solid var(--line); }
.tabbody .lead { margin:0 0 12px; font-size:14.5px; }
.tabbody > :first-child { margin-top:26px; }
.tabbody .crumb + h2.soft.big { margin-top:6px; }
.reach { font-size:13.5px; font-weight:500; color:var(--mut); }
.reach.red { color:var(--red); font-weight:600; } .reach.ok { color:var(--green); }
.addr { color:var(--mut); font:12px var(--mono); word-break:break-all; }
table.ports td a { font-weight:500; }
.hint.small { font-size:13px; }
p.row { display:flex; gap:8px; flex-wrap:wrap; }
section.tl { margin-top:36px; }
.keys.tlkeys { justify-content:flex-start; margin:0 0 10px; }
.keys.tlkeys > span:first-child { margin-left:0; }
.tabbody .nothing { margin-top:4px; }
.nothing.not { color:var(--fg); font-weight:500; box-shadow:inset 2px 0 0 var(--line2); }
ul.rows .fresh { margin-left:8px; font-size:12px; font-weight:600; color:var(--fg);
  padding:0 6px; border-radius:3px; box-shadow:inset 0 0 0 1px var(--line2); }
ul.rows .undo form { display:inline; margin-left:10px; }
ul.rows > li:has(.undo) { grid-template-columns:76px minmax(0,1fr) auto auto; }

/* ---- narrower screens ---- */
@media (max-width:1060px) {
  .cols { grid-template-columns:minmax(0,1fr); }
  ul.tenants { grid-template-columns:minmax(0,max-content) max-content minmax(0,1fr); }
  ul.tenants li .tnote { grid-column:2 / -1; padding-top:0; border-top:0; }
  ul.tenants li .tn { grid-row:span 2; align-self:start; } }
@media (max-width:820px) {
  .frame { grid-template-columns:minmax(0,1fr); align-content:start; background:var(--bg); }
  .side { position:static; height:auto; padding:12px 0 0; border-right:0; border-bottom:1px solid var(--line); overflow:visible; }
  .side .brand { padding:0 16px 10px; }
  .side nav { flex-direction:row; flex-wrap:wrap; padding:0 10px 8px; gap:2px 0; }
  .side .grp { display:none; }
  .side nav a { border-left:0; border-bottom:2px solid transparent; padding:5px 8px; font-size:13.5px; }
  .side nav a.on { border-bottom-color:var(--fg); }
  .side nav a .cnt { margin-left:4px; padding-left:0; }
  .sidefoot { flex-direction:row; flex-wrap:wrap; gap:6px 16px; padding:8px 16px 10px; }
  .main { padding:20px 16px 48px; }
  header.top { padding:12px 16px; flex-wrap:wrap; gap:10px; }
  header.top .right { gap:6px 14px; }
  .gate { padding:28px 16px 48px; }
  .gate .box > h1 { font-size:27px; }
  h1.say { font-size:31px; } h1.say.s2 { font-size:25px; }
  .say2 { font-size:15px; }
  figure.stage { padding:14px 14px 16px; border-radius:14px; }
  figure.stage { margin-top:26px; }
  ul.tenants { display:block; }
  ul.tenants li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; padding:12px 0;
    border-top:1px solid var(--line); }
  ul.tenants li:first-child { border-top:0; }
  ul.tenants li > *, ul.tenants li .tn { padding:0; border:0; grid-row:auto; }
  ul.tenants li .sl { grid-column:1 / -1; grid-row:2; }
  ul.tenants li .tnote { grid-column:1 / -1; }
  svg.slots { height:16px; }
  dl.kv { grid-template-columns:1fr; gap:0; } dl.kv dd { margin-bottom:8px; }
  .portal-main { padding:0 16px; }
  .welcome { padding-top:26px; }
  .settings { grid-template-columns:minmax(0,1fr); gap:0; padding-top:20px; }
  .toc { position:static; flex-direction:row; flex-wrap:wrap; gap:4px 14px; margin:0 0 22px; }
  .toc a { border-left:0; padding:2px 0; }
  .shead { margin:30px 0 10px; }
  .drow, .dhead { grid-template-columns:minmax(0,96px) minmax(0,1fr); gap:0 12px; }
  .dcells { grid-template-columns:repeat(7,minmax(0,1fr)); gap:0 6px; }
  .dcells > :nth-child(-n+7) { display:none; }
  .dc { height:40px; }
  .dnote, .dhead > span:last-child { display:none; }
  .dn { font-size:14px; }
  .keys > span { margin:0 12px 0 0; }
  .firsts li { grid-template-columns:76px minmax(0,1fr); gap:2px 10px; }
  .firsts .hn { grid-column:1 / -1; }
  .firsts .go { grid-column:2; }
  ul.rows > li { grid-template-columns:62px minmax(0,1fr); gap:0 10px; }
  ul.rows .when { grid-column:2; }
  ul.rows .where { display:block; margin-left:0; }
  .cta details.nadd[open] .addform input { min-width:0; width:100%; }
  table.hosts .opt { display:none; }
  table { display:block; overflow-x:auto; }
  th, td { padding-right:10px; }
  nav.tabs { gap:0 18px; font-size:14px; margin-top:20px; }
  ol.htiles { grid-template-columns:repeat(7,minmax(0,1fr)); gap:16px 6px; }
  ol.htiles b { border-radius:10px; }
  .firsts.h li { grid-template-columns:62px minmax(0,1fr); }
  .cw .desk { display:none; } .cw .mob { display:block; } }
