:root {
  color-scheme: light;
  --bg: #eef2f7; --panel: #dde4ed; --panel-hi: #e5eaf2; --raise: #d3dbe6;
  --line: #c3cdda; --line-hi: #aab6c8;
  --ink: #0f1b2d; --ink-2: #2f3f56; --muted: #50627a;
  --accent: #1560d6; --accent-ink: #ffffff; --accent-wash: rgba(21,96,214,.10);
  --ok: #0c8a5a; --ok-wash: rgba(16,160,106,.13);
  --warn: #b86e00; --warn-wash: rgba(201,123,0,.14);
  --bad: #d1344f; --bad-wash: rgba(209,52,79,.11);
  --info: #3b6fd1; --info-wash: rgba(59,111,209,.12);
  --side: #0c1a33; --side-hi: #14264a; --side-ink: #c9d6ea; --side-muted: #7f93b3; --side-line: #1a2c50;
  --shadow: 0 1px 2px rgba(15,27,45,.06), 0 4px 14px rgba(15,27,45,.05);
  --radius: 12px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1322; --panel: #1b2840; --panel-hi: #223250; --raise: #2a3b5c;
  --line: #2c3d5e; --line-hi: #3e5379;
  --ink: #eaf1fb; --ink-2: #c3d0e3; --muted: #8a9bb3;
  --accent: #5b9bff; --accent-ink: #04132b; --accent-wash: rgba(91,155,255,.15);
  --ok: #3ed39a; --ok-wash: rgba(62,211,154,.14);
  --warn: #f0b24a; --warn-wash: rgba(240,178,74,.15);
  --bad: #ff7a93; --bad-wash: rgba(255,122,147,.15);
  --info: #8ab4ff; --info-wash: rgba(138,180,255,.14);
  --side: #071020; --side-hi: #0f1d38; --side-line: #12213c;
  --shadow: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 20px; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg);
  font: 14.5px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8;
        stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto;
  padding: 18px 12px 14px; background: var(--side); color: var(--side-ink);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 16px; }
.brand img { width: 36px; height: 36px; flex: none; }
.brand b { display: block; font-size: 16px; letter-spacing: .01em; color: #fff; }
.brand span { display: block; font-size: 11px; color: var(--side-muted); letter-spacing: .14em; text-transform: uppercase; }
.signin .brand b { color: var(--ink); } .signin .brand span { color: var(--muted); }
/* The sidebar and sign-in show the shield large, centred above the name. */
.side .brand, .signin .brand { flex-direction: column; text-align: center; gap: 8px; }
.side .brand { padding: 8px 8px 20px; }
.side .brand img { width: 72px; height: 72px; }
.signin .brand img { width: 64px; height: 64px; }
.nav-group { margin: 14px 0 4px; padding: 0 10px; font-size: 11px; letter-spacing: .12em;
             text-transform: uppercase; color: var(--side-muted); }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 1px 0;
  border-radius: 8px; color: var(--side-ink); text-decoration: none; position: relative; font-size: 14px;
}
.nav-link:hover { background: var(--side-hi); color: #fff; text-decoration: none; }
.nav-link.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.nav-link .count { margin-left: auto; font-size: 12px; color: var(--side-muted); font-variant-numeric: tabular-nums; }
.nav-link .count.alert { background: var(--bad); color: #fff; padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--side-line); font-size: 12px; color: var(--side-muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 14px; padding: 10px 36px;
          background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar .grow { flex: 1; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.seg a { padding: 6px 14px; border-radius: 7px; color: var(--ink-2); font-size: 13.5px; text-decoration: none; }
.seg a:hover { color: var(--ink); text-decoration: none; }
.seg a.on { background: var(--panel); color: var(--ink); font-weight: 650; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 5px 13px; }
.iconbtn { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 10px; }
.me { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13px; }
.me form { margin: 0; }
.side .nav-toggle { display: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-wash);
          color: var(--accent); font-weight: 700; font-size: 12px; text-transform: uppercase; }
.tabs { display: flex; gap: 4px; margin: -6px 0 18px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 16px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; font-weight: 600; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.content { padding: 26px 36px 64px; min-width: 0; max-width: 1560px; width: 100%; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.page-head .lead { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.page-head .grow { flex: 1 1 320px; }
.page-actions > .actions { display: contents; }
td.pick, th.pick { width: 34px; padding-right: 0; }
input.pick, #pick-all { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.pickbar { position: sticky; top: 8px; z-index: 6; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; padding: 10px 14px;
           border: 1px solid var(--accent); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.pickbar[hidden] { display: none; }
.pickbar select { max-width: 220px; }
.groupbar { margin: 0 0 12px; align-items: center; display: flex; gap: 12px; flex-wrap: wrap; }
.chip.quiet { opacity: .75; }
.groups .pill { margin-right: 4px; }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 14px; margin: 4px 0 16px; }
.pickrow { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.pickrow:hover { border-color: var(--accent); }
.pickrow input { width: 16px; height: 16px; accent-color: var(--accent); }
.msgtext { white-space: pre-wrap; margin: 0; line-height: 1.55; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
          box-shadow: 0 0 0 0 var(--ok); animation: pulse 2.4s infinite; }
.live.stale i { background: var(--bad); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,160,106,.5); } 70% { box-shadow: 0 0 0 8px rgba(16,160,106,0); } 100% { box-shadow: 0 0 0 0 rgba(16,160,106,0); } }
@media (prefers-reduced-motion: reduce) { .live i { animation: none; } * { scroll-behavior: auto !important; } }

/* ---------- buttons and forms ---------- */
button, .btn {
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; gap: 8px; padding: 8px 15px; border-radius: 9px; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line-hi); line-height: 1.2;
  transition: border-color .15s, background .15s, transform .05s;
}
button:hover, .btn:hover { border-color: var(--accent); text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--ink-2); font-weight: 500; }
.btn-danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
button:disabled { opacity: .45; cursor: default; transform: none; }
form.inline { display: inline; margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-hi);
  border-radius: 10px; padding: 9px 12px; min-width: 0;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { width: 100%; min-height: 170px; resize: vertical; line-height: 1.5; }
.spaced-top { margin-top: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack > * + * { margin-top: 14px; }

/* ---------- cards, tiles ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.card-head .aside { margin-left: auto; color: var(--muted); font-size: 13px; }
.sub { color: var(--muted); font-size: 13px; }
.nick { color: var(--ink); font-size: 13px; font-style: italic; }
.nick-form { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 14px; }
.nick-form label { flex: 1 1 100%; }
.nick-form input { flex: 1 1 160px; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tile {
  display: block; padding: 15px 18px 14px; border-radius: var(--radius); color: var(--ink);
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow); position: relative; overflow: hidden; text-decoration: none;
}
a.tile:hover { border-color: var(--line-hi); text-decoration: none; }
a.tile.is-on { border-color: var(--accent); }
.tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--line-hi); }
.tile.tone-ok::before { background: var(--ok); }
.tile.tone-warn::before { background: var(--warn); }
.tile.tone-bad::before { background: var(--bad); }
.tile.tone-accent::before { background: var(--accent); }
.tile .big { display: block; font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tile.tone-ok .big { color: var(--ok); }
.tile.tone-warn .big { color: var(--warn); }
.tile.tone-bad .big { color: var(--bad); }
.tile .label { display: block; margin-top: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.tile .hint { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.split > .card { margin-top: 0 !important; }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-bottom: 18px; }
.products .card { margin-top: 0; }
.product-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.product-head .glyph { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
                       background: var(--accent-wash); color: var(--accent); }
.product-head h2 { margin: 0; font-size: 16px; }
.mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 14px; }
.mini div { padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.mini b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.mini span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.mini .bad b { color: var(--bad); } .mini .warn b { color: var(--warn); } .mini .ok b { color: var(--ok); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 0 1 340px; min-width: 220px; }
.search .icon { position: absolute; left: 12px; top: 50%; margin-top: -9px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; padding-left: 38px; }
.search kbd { position: absolute; right: 10px; top: 50%; margin-top: -10px; font: 11px/1 ui-monospace, Consolas, monospace;
              color: var(--muted); border: 1px solid var(--line-hi); border-radius: 5px; padding: 3px 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: 13px;
        font-weight: 600; color: var(--ink-2); background: var(--panel); border: 1px solid var(--line); text-decoration: none; }
.chip:hover { border-color: var(--line-hi); text-decoration: none; }
.chip.is-on { background: var(--accent-wash); border-color: var(--accent); color: var(--accent); }
.chip em { font-style: normal; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- table ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--panel); box-shadow: var(--shadow); }
/* On a screen wide enough for the side menu, a long table scrolls in its own box that fits the window, so its sideways scrollbar
   is always in view (not only below the last row) and its headings stay put. */
@media (min-width: 981px) { .table-wrap { max-height: calc(100vh - 100px); overflow: auto; } }
table.grid { width: 100%; border-collapse: collapse; min-width: 820px; }
table.grid th {
  position: sticky; top: 0; z-index: 1; text-align: left; padding: 12px 10px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--panel-hi);
  border-bottom: 1px solid var(--line);
}
table.grid th a.sorthead { color: inherit; text-decoration: none; }
table.grid th a.sorthead:hover { color: var(--ink); }
.techtoggle { margin: 0 0 12px; }
.techtoggle label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); }
.techtoggle input { width: 16px; height: 16px; accent-color: var(--accent); }
table.grid td { padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid tr:last-child td { border-bottom: none; }
table.grid tbody tr:hover td { background: var(--accent-wash); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num .sub { white-space: normal; max-width: 18ch; }
/* When space is short the menu drops under the button and a long email address wraps, rather than the table running off the side. */
td.act { text-align: right; }
td.act .btn, td.act button { white-space: nowrap; }
table.grid td > .sub { overflow-wrap: anywhere; }
.who { display: flex; align-items: flex-start; gap: 10px; }
.who .dot { margin-top: 7px; }
.who a.name { color: var(--ink); font-weight: 650; }
.who a.name:hover { color: var(--accent); text-decoration: none; }
.note-line { display: block; margin-top: 3px; max-width: 34ch; color: var(--muted); font-size: 12.5px; font-style: italic;
             overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--line-hi); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-wash); }
.empty { padding: 34px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line-hi); border-radius: var(--radius); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ---------- pills and meters ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px;
        font-weight: 600; background: var(--raise); color: var(--ink-2); border: 1px solid transparent; white-space: nowrap; }
.pill.ok { background: var(--ok-wash); color: var(--ok); }
.pill.warn { background: var(--warn-wash); color: var(--warn); }
.pill.bad { background: var(--bad-wash); color: var(--bad); }
.pill.info { background: var(--info-wash); color: var(--info); }
.pill.product { background: var(--accent-wash); color: var(--accent); }
a.pill.product { text-decoration: none; margin-right: 4px; }
.program-switch { align-items: center; margin-bottom: 12px; }
.program-switch a { display: inline-flex; align-items: center; gap: 6px; }
a.pill.product:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.pill.product .dot { width: 7px; height: 7px; box-shadow: none; }
td.act .also { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 6px; }
.issues { display: flex; flex-wrap: wrap; gap: 6px; }
td.health { white-space: nowrap; }
.health-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; vertical-align: middle; background: var(--line-hi); }
.health-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-wash); }
.health-dot.info { background: var(--info); box-shadow: 0 0 0 3px var(--info-wash); }
.health-dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-wash); }
.health-dot.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-wash); }
.health-btn { padding: 4px 10px; gap: 8px; border-radius: 999px; font-size: 13px; font-variant-numeric: tabular-nums; }
.health-btn[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-wash); }
table.grid tr.health-row td { padding-top: 0; }
table.grid tr:has(+ tr.health-row:not([hidden])) td { border-bottom: none; }
.meter { appearance: none; -webkit-appearance: none; width: 60px; height: 7px; border: 0; border-radius: 99px; overflow: hidden;
         background: var(--raise); vertical-align: middle; margin-right: 8px; }
.meter::-webkit-progress-bar { background: var(--raise); }
.meter::-webkit-progress-value { background: var(--ok); border-radius: 99px; }
.meter::-moz-progress-bar { background: var(--ok); }
.meter.warn::-webkit-progress-value { background: var(--warn); } .meter.warn::-moz-progress-bar { background: var(--warn); }
.meter.bad::-webkit-progress-value { background: var(--bad); } .meter.bad::-moz-progress-bar { background: var(--bad); }
.limit-form { flex-wrap: nowrap; gap: 6px; } .limit-form input[type=text] { width: 8ch; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }

/* ---------- row menu ---------- */
details.menu { position: relative; display: inline-block; vertical-align: middle; }
details.menu > summary { list-style: none; cursor: pointer; display: inline-grid; place-items: center; width: 34px; height: 34px;
                         border-radius: 9px; border: 1px solid var(--line); color: var(--ink-2); background: transparent; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary:hover, details.menu[open] > summary { border-color: var(--accent); color: var(--accent); }
.menu-pop { position: absolute; right: 0; top: 40px; z-index: 5; min-width: 210px; padding: 6px; text-align: left;
            background: var(--panel); border: 1px solid var(--line-hi); border-radius: 12px; box-shadow: 0 8px 28px rgba(15,27,45,.18); }
.menu-pop form { margin: 0; }
.menu-pop button, .menu-pop a.item { display: flex; width: 100%; background: transparent; border: 0; border-radius: 8px;
                                     font-weight: 500; padding: 8px 12px; color: var(--ink); text-decoration: none; }
.menu-pop button:hover, .menu-pop a.item:hover { background: var(--accent-wash); color: var(--accent); }
.menu-pop .danger { color: var(--bad); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }

/* ---------- one computer: the top block ---------- */
.hero { padding: 20px 24px 22px; margin-bottom: 18px; }
.hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-bottom: 18px; }
.hero-title { display: flex; align-items: center; gap: 14px; flex: 1 1 320px; min-width: 0; }
.hero-title .dot { width: 13px; height: 13px; }
.hero-title h1 { margin: 0; font-size: 24px; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
.hero-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hero-actions { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; align-items: stretch; }
.hero-actions form, .hero-actions form.inline { display: block; margin: 0; }
.hero-actions .btn, .hero-actions button { width: 100%; justify-content: center; text-align: center; min-height: 38px; }
.hero .glance { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* ---------- one computer ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin-bottom: 12px; }
.machine-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.machine-grid .card { margin-top: 0; }
.col > * + * { margin-top: 18px; }
dl.facts { display: grid; grid-template-columns: 150px minmax(0, 1fr); margin: 0; }
dl.facts dt { color: var(--muted); padding: 9px 0; border-bottom: 1px solid var(--line); }
dl.facts dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
dl.facts dt:last-of-type, dl.facts dd:last-of-type { border-bottom: 0; }
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.glance div { padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.glance b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.glance span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.report-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.report-row:last-child { border-bottom: 0; }
.report-row .grow { flex: 1; min-width: 0; }
.report-row .sum { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1 1 200px; min-width: 0; }
.list-row .issues { flex: 0 1 auto; max-width: 100%; }
.list-row a.name { color: var(--ink); font-weight: 650; }

/* ---------- licenses ---------- */
.switch { display: inline-flex; align-items: center; gap: 9px; padding: 4px 12px 4px 5px; border-radius: 999px; font-size: 13px;
          font-weight: 600; background: var(--raise); color: var(--muted); border: 1px solid var(--line); }
.switch::before { content: ""; width: 22px; height: 14px; border-radius: 99px; background: var(--line-hi);
                  box-shadow: inset 7px 0 0 0 var(--muted); margin-left: 2px; }
.switch.is-on { background: var(--ok-wash); color: var(--ok); border-color: transparent; }
.switch.is-on::before { background: var(--ok); box-shadow: inset -7px 0 0 0 #fff; }
.addform { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr) auto auto; gap: 10px; align-items: center; }
.crm-pick { position: relative; display: block; }
.crm-pick input { width: 100%; }
.crm-menu { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none;
            max-height: 340px; overflow-y: auto; overflow-x: hidden; background: var(--panel-hi); border: 1px solid var(--line-hi);
            border-radius: 10px; box-shadow: var(--shadow); font-weight: 400; }
.crm-menu li { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-radius: 7px; cursor: pointer; color: var(--ink); }
.crm-menu li span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.crm-menu li:hover, .crm-menu li.on { background: var(--accent-wash); }
.crm-menu li.new b { color: var(--accent); }
.crm-note { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin: 4px 0 0; }
.crm-note:empty { display: none; }
.letters { display: flex; flex-wrap: wrap; gap: 6px; }
.letters .chip { padding: 4px 0; min-width: 34px; justify-content: center; }
.letters .chip.quiet { opacity: .45; }
label.check { display: inline-flex; gap: 7px; align-items: center; color: var(--ink-2); }
.error { color: var(--bad); font-weight: 600; margin: 0 0 12px; }

/* ---------- sign in ---------- */
.signin-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.signin { width: min(400px, 100%); }
.signin .brand { padding: 0 0 18px; }
.signin form { margin-top: 6px; }
.signin input { width: 100%; }
.signin .row > * { flex: 1 1 100%; }


/* ---------- charts ---------- */
figure.chart { margin: 4px 0 14px; position: relative; }
figure.chart figcaption { font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 4px; }
figure.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
figure.chart svg:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ref { stroke: var(--warn); stroke-width: 1; opacity: .55; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .ref-label { fill: var(--muted); }
.chart .series { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--accent); opacity: .1; stroke: none; }
.chart .series.ok { stroke: var(--ok); } .chart .area.ok { fill: var(--ok); }
.chart .series.warn { stroke: var(--warn); } .chart .area.warn { fill: var(--warn); }
.chart .series.bad { stroke: var(--bad); } .chart .area.bad { fill: var(--bad); }
.chart .series.info { stroke: var(--info); } .chart .area.info { fill: var(--info); }
.chart .end { fill: var(--accent); } .chart .end.ok { fill: var(--ok); } .chart .end.warn { fill: var(--warn); }
.chart .end.bad { fill: var(--bad); } .chart .end.info { fill: var(--info); }
.chart .end-ring { fill: var(--panel); }
.chart .end-label { fill: var(--ink); font-size: 12px; font-weight: 650; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .cross-dot { fill: var(--ink); stroke: var(--panel); stroke-width: 2; }
.chart-tip { position: absolute; z-index: 3; pointer-events: none; padding: 7px 10px; border-radius: 9px; font-size: 12.5px;
             line-height: 1.35; white-space: nowrap; background: var(--panel-hi); border: 1px solid var(--line-hi);
             box-shadow: var(--shadow); transform: translate(-50%, -100%); }
.chart-tip b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.chart-tip span { color: var(--muted); }
details.chart-table { margin: -6px 0 16px; }
details.chart-table summary { cursor: pointer; font-size: 12.5px; color: var(--muted); padding: 2px 0; }
details.chart-table summary:hover { color: var(--accent); }
table.grid.small { min-width: 0; margin-top: 6px; }
table.grid.small th, table.grid.small td { padding: 6px 12px; position: static; }
svg.strip { display: block; width: 100%; height: auto; margin: 6px 0 10px; }
.strip-track { fill: var(--ok-wash); stroke: none; }
.strip-gap { fill: var(--bad); }
.strip .tick { fill: var(--muted); font-size: 11px; }
.reach { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.reach b { font-size: 30px; line-height: 1.1; letter-spacing: -.01em; }

/* ---------- forms and notices ---------- */
.notice { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; background: var(--raise); border: 1px solid var(--line); }
.notice.ok { background: var(--ok-wash); border-color: transparent; color: var(--ok); }
.notice.bad { background: var(--bad-wash); border-color: transparent; color: var(--bad); }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.card.notice { margin-top: 0; margin-bottom: 18px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 12px 0 6px; }
.field-grid label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.field-grid label.check { display: inline-flex; gap: 8px; font-weight: 500; }
.field-grid .wide { grid-column: 1 / -1; }
.stack-label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; max-width: 360px; }
.stack-label input { width: 100%; font-weight: 400; }
.side-foot .who { padding: 0 6px 8px; overflow-wrap: anywhere; }
.field-grid input[type=text], .field-grid input[type=password], .field-grid select { width: 100%; font-weight: 400; }
.card h3 { margin: 24px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.card > .empty, .card > div > .empty, .card .report-row + .empty { border: 0; background: transparent; padding: 22px 12px; }
.card form + form { margin-top: 12px; }
.page-head + .tabs { margin-top: 4px; }
select { appearance: auto; }

/* ---------- security ---------- */
ol.recovery { columns: 2; font: 16px/1.9 ui-monospace, Consolas, monospace; letter-spacing: .06em; padding-left: 30px; margin: 12px 0; }
ol.steps { padding-left: 22px; }
ol.steps li { margin-bottom: 20px; }
.key { display: inline-block; margin: 8px 0; padding: 10px 14px; border-radius: 10px; background: var(--bg);
       border: 1px solid var(--line-hi); font: 600 20px/1.5 ui-monospace, Consolas, monospace; letter-spacing: .12em; user-select: all; }
.qr-wrap { margin: 10px 0 6px; }
.qr { display: block; width: 200px; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line-hi); }
code { font: 13px ui-monospace, Consolas, monospace; background: var(--raise); padding: 1px 6px; border-radius: 5px; }
.stack { display: grid; gap: 10px; align-content: start; }
.stack label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
/* Tick boxes: the box sits directly to the left of what it ticks, on one line, wherever they are placed. */
.stack label.check, .field-grid label.check, label.check { display: flex; flex-direction: row; align-items: center; gap: 8px;
              font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
label.check input[type=checkbox] { flex: none; width: 17px; height: 17px; margin: 0; }
label.check .sub { font-weight: 400; }
fieldset.group { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 14px; margin: 0 0 14px; }
fieldset.group > legend { padding: 0 8px; }
fieldset.group > legend label.check { font-size: 14px; color: var(--ink); }
details.subcard { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; background: var(--panel); }
details.subcard > summary { cursor: pointer; font-weight: 650; color: var(--ink); }
details.subcard .tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 6px 0 12px; }
details.subcard .days { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 12px; }
details.subcard .options { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 6px; }
details.subcard h4 { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { min-width: 0; position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px;
          padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; flex: 1 1 auto; }
  .side .brand { flex-direction: row; text-align: left; gap: 11px; padding: 0; }
  .side .brand img { width: 36px; height: 36px; }
  .side-foot { display: none; }
  .topbar { padding: 8px 14px; flex-wrap: wrap; }
  .me .who-name { display: none; }
  /* The menu folds away behind a button, and opens as the full list under the brand. */
  .side .nav-toggle { display: inline-flex; flex: none; color: var(--side-ink); background: transparent; border-color: var(--side-line); }
  .side .nav-toggle:hover { border-color: var(--side-ink); }
  .side nav { order: 3; flex: 1 1 100%; display: none; padding: 6px 0 4px; }
  .side.nav-open nav { display: block; }
  .nav-group { padding-left: 12px; }
  .nav-link { padding: 11px 12px; margin: 1px 0; font-size: 15px; }
            .content { padding: 20px 16px 48px; }
  .split, .machine-grid { grid-template-columns: minmax(0, 1fr); }
  .addform { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  details.subcard .tasks { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .content { padding: 16px 14px 40px; }
  .page-head h1 { font-size: 22px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile .big { font-size: 24px; }
  .card { padding: 16px; }
  dl.facts { grid-template-columns: 112px minmax(0, 1fr); }
  .topbar { gap: 8px; padding: 8px 12px; flex-wrap: nowrap; }
  .seg a, .seg a.on { padding-left: 9px; padding-right: 9px; font-size: 13px; }
  .me .avatar, .me .lbl { display: none; }
  .me .btn { padding: 0; width: 36px; height: 36px; justify-content: center; }
}

/* On a phone each table row becomes a card of its own, every value beside its column's name (set by app.js from the
   header), so nothing has to be scrolled sideways. The row's first column (who or what it is) leads the card, unlabelled,
   and a tick box sits in its top corner. */
@media (max-width: 700px) {
  .table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; border-radius: 0; }
  table.grid { min-width: 0; display: block; }
  table.grid thead { display: none; }
  table.grid tbody { display: block; }
  table.grid tr { display: flow-root; margin: 0 0 10px; padding: 4px 14px; background: var(--panel); border: 1px solid var(--line);
                  border-radius: var(--radius); box-shadow: var(--shadow); }
  table.grid tr[hidden] { display: none; }
  table.grid tbody tr:hover td { background: transparent; }
  table.grid td { display: block; position: relative; padding: 7px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
  table.grid tr td:last-child { border-bottom: none; }
  table.grid td:empty { display: none; }
  table.grid td[data-label] { padding-left: 8.5em; min-height: 2.2em; }
  table.grid td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: 9px; width: 8em; font-size: 10.5px;
                                       font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  table.grid td.lead { padding: 10px 0 8px; font-size: 15px; }
  table.grid td.lead::before { content: none; }
  table.grid td:has(> input.pick) { float: right; border: 0; padding: 12px 0 0 10px; }
  .pill { white-space: normal; max-width: 100%; }
  .hero-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-actions .btn, .hero-actions button { padding: 8px 8px; font-size: 13.5px; white-space: normal; }
  td.act, td.num { text-align: left; white-space: normal; }
  td.num .sub { max-width: none; }
  .note-line { max-width: none; }
}