/* AB Steward panel. Tokens first; components below. Light theme only.
   Fonts: Geist, self-hosted from static/fonts (licence next to the files),
   with the system stack behind it. */
@font-face {
  font-family: "Geist";
  src: url("/static/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/static/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f2f3f5;
  --surface-3: #e4e6ea;
  --border: #e4e6ea;
  --border-strong: #cfd3d9;
  --field-border: #8b8f97;
  --text: #141414;
  --text-2: #565a61;
  --text-3: #62666d;
  --accent: #141414;
  --accent-hover: #2e2f33;
  --accent-soft: #eceef1;
  --accent-text: #ffffff;
  --focus: #141414;
  --shadow-card: 0 1px 2px rgba(20, 20, 20, 0.05);
  --ok: #1f6e40;
  --ok-bg: #e6f3ea;
  --warn: #8a5300;
  --warn-bg: #fbefd9;
  --bad: #b3261e;
  --bad-bg: #fbe9e6;
  --sidebar-text: #565a61;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
pre.command:focus-visible, .tech:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: -8px; }
/* One frame: a field's own grey border steps aside for the ring, so it is never a double line. */
input:not([type=checkbox]):not([type=radio]):focus-visible, select:focus-visible, textarea:focus-visible { border-color: transparent; }
h1 { font-size: 22px; line-height: 1.25; margin: 0; letter-spacing: -0.015em; font-weight: 600; }
h2 { font-size: 15px; margin: 0; font-weight: 600; }
p { margin: 0 0 10px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.sub { color: var(--text-2); }
.muted { color: var(--text-3); }

/* ------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--bg); color: var(--sidebar-text); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-menu { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
.menu-btn { display: none; font: inherit; font-weight: 500; font-size: 13px; padding: 5px 12px; min-height: 32px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.brand { display: flex; align-items: center; color: var(--text); font-weight: 600; font-size: 18px; padding: 2px 8px 18px; letter-spacing: -0.03em; white-space: nowrap; text-decoration: none; }
.brand:hover { text-decoration: none; }
.side-top .brand { padding-bottom: 2px; }
.brand-ab, .brand-mark { font-weight: 500; color: var(--text-2); margin-right: 4px; }
.nav-label { font-size: 12.5px; color: var(--text-3); padding: 14px 10px 6px; }
.side-nav a { display: flex; align-items: center; gap: 10px; color: var(--sidebar-text); padding: 7px 10px; border: 1px solid transparent; border-radius: 10px; font-weight: 500; text-decoration: none; }
.side-nav a:hover { color: var(--text); text-decoration: none; }
.side-nav a.active { background: var(--surface); border-color: var(--border); color: var(--text); font-weight: 600; }
.side-foot { margin-top: auto; padding: 14px 0 0; position: relative; }
.account-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 5px 8px; border: 0; border-radius: 10px; background: none; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.account-btn:hover, .side-foot.open .account-btn { background: var(--surface); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); color: var(--text); display: grid; place-items: center; font-size: 11.5px; font-weight: 600; flex: none; }
.account-btn .who { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu { display: grid; gap: 10px; padding: 12px; margin-top: 6px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-card); }
.account-menu .org-name { font-size: 13px; font-weight: 500; color: var(--text); }
.account-menu .email { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu .btn.link { color: var(--text-2); font-size: 13px; min-height: 24px; }
.account-menu form { margin: 0; }
/* Without the script the button does nothing, so the menu stays open and the button is not shown. */
.account-btn { display: none; }
html.js .account-btn { display: flex; }
html.js .account-menu { display: none; position: absolute; left: 0; right: 0; bottom: 100%; margin: 0 0 6px; }
html.js .side-foot.open .account-menu { display: grid; }
/* Server switcher: a menu button with the current server, a menu of the organisation's servers. */
.side-top { flex-wrap: wrap; }
.switch { position: relative; flex: 1 1 100%; order: 3; margin: 14px 0; min-width: 0; }
.switch-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 5px 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font: inherit; font-weight: 500; color: var(--text); cursor: pointer; text-align: left; }
.switch-btn::after { content: ""; margin-left: auto; flex: none; width: 6px; height: 6px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: translateY(-2px) rotate(45deg); }
.switch-btn[aria-expanded=true]::after { transform: translateY(1px) rotate(225deg); }
.sw-name { position: relative; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sw-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text-3); }
.sw-dot.online { background: var(--ok); }
.sw-dot.offline, .sw-dot.paused { background: var(--warn); }
.sw-dot.revoked { background: var(--bad); }
.switch-menu { display: grid; gap: 2px; padding: 6px; margin-top: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.switch-menu a { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.switch-menu a:hover { background: var(--surface-3); text-decoration: none; }
.switch-menu a[aria-current=true] { font-weight: 600; }
.sw-sep { height: 1px; margin: 4px 6px; background: var(--border); }
/* Without the script the menu stays open in the page and needs no button. */
.switch-btn { display: none; }
html.js .switch-btn { display: flex; }
html.js .switch-menu { display: none; position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 4px; }
html.js .switch.open .switch-menu { display: grid; }
/* A long list of servers scrolls inside the menu, so every item stays on screen. */
html.js .switch-menu { max-height: calc(100vh - 130px); overflow-y: auto; overscroll-behavior: contain; align-content: start; }
.ov-sections { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 16px; }
.ov-sections a[aria-current=page] { font-weight: 600; color: var(--text); }
.ov-section { margin: 0 0 20px; }
.ov-section:focus { outline: none; }
.ov-section > h2, #activity-h { margin: 0 0 12px; }
main { min-width: 0; padding: 28px 36px 64px; max-width: 1240px; width: 100%; }

/* ------------------------------------------------------------ page head */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { margin: 6px 0 0; }
.head-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 8px; color: var(--text-2); font-size: 13px; }
/* When the line wraps, a "|" is left alone at an edge; the gap between the items does the separating. */
.head-meta .sep { display: none; }
.head-meta { column-gap: 16px; }
.crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.crumbs a { color: var(--text-2); }
/* On a desktop the server's name is in the switcher of the sidebar: the breadcrumb is not drawn and the heading is kept for screen readers only, so the name is not on the screen three times (#393). A phone keeps both. */
@media (min-width: 861px) {
  .crumbs.srv-crumbs { display: none; }
  h1.srv-name { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

/* ------------------------------------------------------------ cards */
.card { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-card); margin-bottom: 16px; overflow: hidden; }
.card-body { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; }
.card-head .count { color: var(--text-3); font-weight: 500; margin-left: 6px; }
.card-head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.empty { text-align: center; padding: 44px 20px; color: var(--text-2); }
.empty h2 { color: var(--text); margin-bottom: 6px; }
.empty .btn { margin-top: 10px; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.layout-2 > *, .grid-2 > * { min-width: 0; }

/* ------------------------------------------------------------ tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.tile .label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.tile .value { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; line-height: 1.2; }
.tile .value small { font-size: 13px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.tile .hint { font-size: 12px; color: var(--text-3); margin-top: 4px; overflow-wrap: anywhere; }
.tile.crit .value { color: var(--bad); }
.tile.warn .value { color: var(--warn); }
.tile.ok .value { color: var(--ok); }
.meter { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.meter span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; }
.meter span.hot { background: var(--bad); }
.meter span.warm { background: var(--warn); }

/* ------------------------------------------------------------ tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 20px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12.5px; color: var(--text-2); font-weight: 600; padding-top: 12px; padding-bottom: 8px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td .sub, td .muted { font-size: 12.5px; }
table.compact th, table.compact td { padding: 7px 14px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; max-width: 100%; border-left: 4px solid transparent; border-right: 4px solid transparent; }
/* A table wider than its card says so: an edge appears on the side that has more.
   The border space is always there, so the cue never moves the table. */
.table-scroll.can-right { border-right-color: var(--border-strong); }
.table-scroll.can-left { border-left-color: var(--border-strong); }
.security-list td.package { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.security-pages { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 16px 0; }
td .mono, td.mono, td .muted, td .sub { overflow-wrap: anywhere; }

/* ------------------------------------------------------------ badges, chips, levels */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.online { color: var(--ok); background: var(--ok-bg); }
.badge.watching { color: var(--warn); background: var(--warn-bg); }
.badge.offline { color: var(--warn); background: var(--warn-bg); }
.badge.revoked { color: var(--bad); background: var(--bad-bg); }
.badge.pending, .badge.quiet { color: var(--text-2); background: var(--surface-2); }
.lvl { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.lvl.warn { background: var(--warn-bg); color: var(--warn); }
.lvl.crit { background: var(--bad-bg); color: var(--bad); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex: none; margin-top: 6px; }
.dot.warn { background: var(--warn); }
.dot.crit { background: var(--bad); }
.row-wait { margin-top: 2px; font-size: 13px; font-weight: 600; }
.row-wait a { display: inline-flex; align-items: center; gap: 6px; color: var(--bad); }
.row-wait .dot { margin-top: 0; }
.chip { display: inline-flex; align-items: center; font-size: 12px; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.chip.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip.accent { background: var(--accent-soft); color: var(--text); border-color: transparent; }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
a.chip { text-decoration: none; }
a.chip:hover { text-decoration: none; border-color: var(--border-strong); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.state.failed { color: var(--bad); font-weight: 600; }
.state.active { color: var(--ok); font-weight: 500; }
.token { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 4px; padding: 0 4px; cursor: help; }

/* ------------------------------------------------------------ buttons, forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 500; font-size: 13px;
  padding: 7px 13px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; line-height: 1.3; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.small { padding: 4px 10px; font-size: 12.5px; min-height: 26px; }
.btn.link { border: 0; background: none; color: var(--text-2); padding: 4px 0; font-weight: 500; }
.btn.link:hover { background: none; color: var(--text); text-decoration: underline; }
form.stack { display: grid; gap: 14px; max-width: 460px; }
form.stack > p { margin: 0; }
label { display: grid; gap: 5px; font-size: 13px; font-weight: 500; }
label .hint { font-weight: 400; color: var(--text-3); font-size: 12px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], select, textarea {
  font: inherit; font-size: 13.5px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--field-border); background: var(--surface); color: var(--text); width: 100%; min-width: 0; }
/* Lists, boxes and round buttons are drawn here, not by the browser. */
select { appearance: none; padding-right: 34px; background: var(--surface) url("/static/chevron.svg") no-repeat right 11px center / 14px 14px; cursor: pointer; }
select:disabled { cursor: default; opacity: 0.6; }
input[type=checkbox], input[type=radio] { appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--field-border); background: var(--surface) no-repeat center / 16px 16px; cursor: pointer; }
input[type=checkbox] { border-radius: 6px; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:checked { background-color: var(--accent); background-image: url("/static/check.svg"); border-color: var(--accent); }
input[type=radio]:checked { background-color: var(--accent); background-image: url("/static/radio.svg"); border-color: var(--accent); }
input[type=checkbox]:disabled, input[type=radio]:disabled { cursor: default; opacity: 0.5; }
::placeholder { color: var(--text-3); opacity: 1; }
textarea { resize: vertical; }
label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
label.check input { margin-top: 0; flex: none; }
label.check .hint { display: block; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input[type=text] { width: auto; }
.inline form { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; align-items: end; }
.form-actions { display: flex; gap: 8px; align-items: center; }

.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid transparent; }
.alert:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.alert.error { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.alert.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert.info { background: var(--accent-soft); color: var(--text); border-color: var(--border-strong); }

/* ------------------------------------------------------------ tabs, filters */
.tabs { --tabs-arrow: 28px; display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-snap-type: x mandatory; scroll-padding-left: var(--tabs-arrow); }
.tabs::-webkit-scrollbar { display: none; }
/* On a phone the bar scrolls: an arrow stays at the edge that has more tabs.
   An arrow takes no room of its own (the negative margin takes back its width
   and the gap), so tabs do not move when it appears. Tabs snap to the edge
   next to the left arrow, and a soft edge under the right arrow keeps a cut
   tab from being readable. */
.tabs.can-left::before, .tabs.can-right::after { content: "\2039"; content: "\2039" / ""; position: sticky; z-index: 1; flex: none; align-self: stretch; display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: var(--tabs-arrow); background: var(--bg); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.tabs.can-left::before { left: 0; margin-right: calc(-1 * var(--tabs-arrow) - 4px); }
.tabs.can-right::after { content: "\203A"; content: "\203A" / ""; right: 0; margin-left: calc(-1 * var(--tabs-arrow) - 4px); box-shadow: -14px 0 12px 2px var(--bg); }
.tabs a { scroll-snap-align: start; padding: 9px 12px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; text-decoration: none; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs .n { font-size: 11px; background: var(--surface-3); color: var(--text-2); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.tabs .n.crit { background: var(--bad-bg); color: var(--bad); }
.tabs .n.warn { background: var(--warn-bg); color: var(--warn); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.filters-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.filters-bar input[type=text] { width: 220px; }
.filters-bar select { width: auto; }

/* ------------------------------------------------------------ recommendations */
.rec-group-head { display: flex; align-items: center; gap: 8px; padding: 14px 20px 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
details.rec, details.group { border-top: 1px solid var(--border); }
details.rec > summary, details.group > summary { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px 20px; cursor: pointer; align-items: start; }
details.rec > summary::-webkit-details-marker, details.group > summary::-webkit-details-marker { display: none; }
details.rec > summary:hover, details.group > summary:hover { background: var(--surface-2); }
details.rec[open] > summary { background: var(--surface-2); }
.rec-title { font-weight: 600; }
.rec-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The open body carries the plain lead; keep the summary's copy for closed cards. */
details.rec[open] > summary .rec-sub { display: none; }
.rec-body .rec-tech { margin: 0 0 12px; font-size: 12.5px; overflow-wrap: anywhere; }
.rec-recommend { font-size: 12.5px; color: var(--text-2); margin-top: 2px; white-space: normal; overflow-wrap: anywhere; }
.rec-progress { font-size: 12.5px; color: var(--text-2); margin-top: 2px; white-space: normal; overflow-wrap: anywhere; }
.rec-meta { display: flex; gap: 8px; align-items: center; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.rec-body { padding: 2px 20px 16px 41px; background: var(--surface-2); }
.rec-body .rec-plain { margin: 0 0 10px; overflow-wrap: anywhere; }
.rec-details { margin: 0 0 12px; }
.rec-details > summary { cursor: pointer; color: var(--text-2); }
.rec-details[open] > summary { margin-bottom: 10px; }
.rec-body .body { white-space: pre-line; margin: 0 0 12px; overflow-wrap: anywhere; }
.rec-body blockquote { margin: 0 0 10px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.rec-body .opts { display: flex; gap: 8px; flex-wrap: wrap; }
.chat-decide { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 12px; }
.rec-body .decision { color: var(--text-2); font-size: 13px; margin: 0; }
/* A decision changes in place: the line takes the height of the buttons it replaces (script sets min-height). */
.rec-inplace { display: flex; align-items: center; font-weight: 600; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
/* The buttons already hold the room the longest line needs, so the swap moves nothing. */
.rec-body form[data-decide] { min-height: 3rem; align-content: center; }
@media (max-width: 600px) {
  .rec-body form[data-decide] { min-height: 6rem; align-content: start; }
  /* Three buttons never leave one alone on a second row: the main one takes the first row, the other two share the second. */
  .rec-body form[data-decide] { display: grid; grid-template-columns: 1fr 1fr; }
  .rec-body form[data-decide] > .btn.primary, .rec-body form[data-decide] > .why, .rec-body form[data-decide] > .chip { grid-column: 1 / -1; }
}
.rec-inplace:focus, .rec-inplace:focus-visible, .rec-snoozed:focus, .rec-snoozed:focus-visible { outline: none; }
.rec-snoozed { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; color: var(--text-2); font-size: 13px; }
.rec-snoozed .btn.link { text-decoration: underline; }
/* A card put off with "Not now" stays readable, only dimmed; its buttons give way to the status line. */
details.rec.snoozed > summary, details.rec.snoozed .rec-body { background: var(--surface-2); }
details.rec.snoozed .rec-title { color: var(--text-2); }
details.rec.snoozed .dot { opacity: 0.5; }
/* The level pill dims in its background only: its text keeps full contrast (axe, #361). */
details.rec.snoozed .lvl.warn, details.rec.settled .lvl.warn { background: color-mix(in srgb, var(--warn-bg) 50%, var(--surface-2)); }
details.rec.snoozed .lvl.crit, details.rec.settled .lvl.crit { background: color-mix(in srgb, var(--bad-bg) 50%, var(--surface-2)); }
details.rec.decided .rec-title { color: var(--text-2); font-weight: 500; }
/* A decision that ended in "Done" dims its card the same way, in place. */
details.rec.settled > summary, details.rec.settled .rec-body { background: var(--surface-2); }
details.rec.settled .rec-title { color: var(--text-2); }
details.rec.settled .dot { opacity: 0.5; }
/* A card that is done or put off, and a group of such cards, is not urgent any more: no urgency pill (#428).
   The pill keeps its space, so the title does not rewrap and the next card does not move (#361). */
details.rec.snoozed .lvl, details.rec.settled .lvl, details.group.all-set > summary .lvl { visibility: hidden; }
details.group > .group-items details.rec > summary { padding-left: 41px; }
details.group > .group-items details.rec .rec-body { padding-left: 62px; }
.caret { width: 14px; height: 14px; color: var(--text-3); transition: transform 0.15s; }
details[open] > summary .caret { transform: rotate(90deg); }
.ai-summary { padding: 14px 20px; display: flex; gap: 12px; background: var(--accent-soft); border-bottom: 1px solid var(--border); }
.ai-summary .icon { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 700; }
.ai-summary p { margin: 0; }
.ai-summary .sub { font-size: 12px; margin-top: 4px; }

/* ------------------------------------------------------------ events */
ul.events { list-style: none; margin: 0; padding: 0; }
li.event { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
li.event:last-child { border-bottom: 0; }
li.event p { margin: 3px 0 0; color: var(--text-2); overflow-wrap: anywhere; }
li.event .rule { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
li.event .when { color: var(--text-3); font-size: 12px; white-space: nowrap; text-align: right; }

/* ------------------------------------------------------------ facts, logs, misc */
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13px; }
dl.facts dt { color: var(--text-2); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
pre.logtext { font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2);
  border-radius: 8px; padding: 12px 14px; margin: 0; max-height: 560px; overflow-y: auto; }
.command { max-width: 100%; font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; overflow-x: auto; white-space: pre; margin: 0 0 12px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
ul.plain li:last-child { border-bottom: 0; }
.bar-cell { display: grid; grid-template-columns: minmax(80px, 160px) auto; gap: 10px; align-items: center; }
.bar-cell .meter { margin: 0; }
.metric-group + .metric-group { margin-top: 14px; }
.metric-group h3 { font-size: 12.5px; color: var(--text-2); margin: 0 0 4px; font-weight: 600; }
.star-form { margin: 0; }
button.star { border: 0; background: none; cursor: pointer; font-size: 17px; color: var(--field-border); padding: 0 2px; line-height: 1; min-width: 24px; min-height: 24px; }
button.star.on, button.star:hover { color: #b87500; }
details.fn { border-top: 1px solid var(--border); }
details.fn:first-of-type { border-top: 0; }
details.fn > summary { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; cursor: pointer; }
details.fn > summary::-webkit-details-marker { display: none; }
details.fn > summary:hover { background: var(--surface-2); }
details.fn[open] > summary { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.fn-form { padding: 18px 20px 20px; display: grid; gap: 16px; }
details.sub-details summary { cursor: pointer; color: var(--text-2); font-size: 13px; font-weight: 500; }
details.sub-details[open] summary { margin-bottom: 12px; }
.status-on { color: var(--ok); font-weight: 600; font-size: 12.5px; }
.status-off { color: var(--text-3); font-weight: 600; font-size: 12.5px; }
p.desc { margin-top: 12px; }

/* ------------------------------------------------------------ login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 380px; }
.login .brand { color: var(--text); justify-content: center; padding-bottom: 22px; font-size: 20px; }
.login .card { padding: 24px; }
.login h2 { margin-bottom: 16px; font-size: 17px; }
.login form.stack { max-width: none; }
.login .btn.primary { padding: 9px; }
.login .login-alt { margin: 14px 0 0; text-align: center; font-size: 13px; }
.login p.sub { margin-bottom: 14px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .layout-2 { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  /* Rows take their own height: otherwise the spare viewport height goes to the sidebar row as an empty band. */
  .shell { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .card { overflow-x: auto; }
  .sidebar { position: static; height: auto; padding: 10px 16px; border-bottom: 1px solid var(--border); }
  .brand { padding: 0; }
  /* On a phone the switcher sits in the top bar between the name and Menu; its menu spans the bar. */
  .side-top { position: relative; flex-wrap: nowrap; }
  .switch { position: static; order: 0; flex: 1 1 0; margin: 0; }
  .switch-btn { min-height: 36px; }
  html.js .switch-menu { left: 0; right: 0; top: 100%; margin-top: 8px; }
  /* The navigation is folded behind the Menu button only once the script that
     opens it has run; without it the navigation stays in the page. */
  .menu-btn { display: none; }
  html.js .menu-btn { display: inline-flex; align-items: center; }
  html.js .side-menu { display: none; }
  html.js .shell.nav-open .side-menu { display: flex; padding-top: 10px; overflow-y: visible; }
  .side-nav a { padding: 9px 10px; }
  .side-foot { margin-top: 10px; }
  html.js .account-menu { position: static; margin: 6px 0 0; }
  main { padding: 20px 16px 48px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  th, td { padding: 9px 14px; }
  .card-head, .toolbar, .filters-bar, .card-body { padding-left: 14px; padding-right: 14px; }
  details.rec > summary, details.group > summary, details.fn > summary { padding-left: 14px; padding-right: 14px; }
  .rec-body { padding-left: 14px; padding-right: 14px; }
  details.group > .group-items details.rec > summary, details.group > .group-items details.rec .rec-body { padding-left: 24px; }
  details.fn > summary { grid-template-columns: auto minmax(0, 1fr) auto; }
  details.fn > summary .fn-model { display: none; }
  .hide-sm { display: none; }
  .filters-bar input[type=text] { width: 100%; }
  dl.facts { grid-template-columns: 1fr; gap: 2px; }
  dl.facts dd { margin-bottom: 8px; }
}
@media (max-width: 520px) {
  .tiles { gap: 8px; }
  .tile { padding: 12px; }
  .tile .value { font-size: 18px; }
  .rec-sub { white-space: normal; }
  /* The level badge goes under the title, so the title keeps the width. */
  details.rec > summary, details.group > summary { grid-template-columns: auto minmax(0, 1fr); }
  details.rec > summary > .rec-meta, details.group > summary > .rec-meta { grid-column: 2; }
  /* A group's chevron stays on the title row; the title wraps instead. */
  details.group > summary { grid-template-columns: auto minmax(0, 1fr) auto; }
  details.group > summary > .rec-meta { grid-column: 3; }
  .rec-meta .when { display: none; }
  /* Tables marked "rows" become one block per row: no squeezed columns, nothing outside the card. */
  table.rows thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.rows, table.rows tbody, table.rows tr, table.rows td { display: block; }
  table.rows td.hide-sm { display: none; }
  table.rows tr { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  table.rows tbody tr:last-child { border-bottom: 0; }
  table.rows td { padding: 3px 0; border: 0; overflow-wrap: anywhere; }
  table.rows td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--text-2); }
  table.security-list tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
  table.security-list td[data-label]::before { display: none; }
  table.security-list td:nth-child(2), table.security-list td:nth-child(6) { text-align: right; }
  table.security-list td.package { grid-column: 1; grid-row: 2; overflow-x: auto; }
  table.security-list td:nth-child(6) { grid-column: 2; grid-row: 2; }
  table.rows td.num { text-align: left; }
  table.rows tbody tr:hover td { background: none; }
}

.metric-group table.compact th, .metric-group table.compact td { padding: 4px 0; border-bottom-color: transparent; font-size: 13px; }
.metric-group table.compact th { padding-top: 0; }
.metric-group table.compact tbody tr:hover td { background: none; }
.metric-group td.num { width: 64px; }
input.toggle { margin: 2px 0 0; }
table.models td:first-child { width: 44px; }
.fn-head, .fn-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.35fr) 130px minmax(0, 1fr); gap: 16px; padding: 14px 20px; align-items: start; }
.fn-head { font-size: 12.5px; color: var(--text-2); font-weight: 600; padding-top: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.fn-head .right, .fn-op { text-align: right; }
.fn-row { border-bottom: 1px solid var(--border); margin: 0; }
.fn-row:last-child { border-bottom: 0; }
.fn-row:hover { background: var(--surface-2); }
.fn-row .sub { font-size: 12.5px; margin-top: 3px; }
.fn-row.planned .fn-name strong { color: var(--text-2); }
.fn-op { font-size: 13px; }
.fn-op .muted { font-size: 12px; margin-top: 2px; }
.fn-more { grid-column: 1 / -1; }
.fn-more .form-grid { margin-bottom: 12px; }
@media (max-width: 860px) {
  .fn-head { display: none; }
  .fn-row { grid-template-columns: 1fr; gap: 8px; padding: 14px; }
  .fn-op { text-align: left; }
}
form.stack.wide { max-width: none; }
details.script-card > summary { list-style: none; cursor: pointer; }
details.script-card > summary::-webkit-details-marker { display: none; }
details.script-card:not([open]) > summary { border-bottom: 0; }
.token[data-reveal] { cursor: pointer; }
.token[data-reveal]:hover { border-color: var(--accent); }
.token.revealed { border-style: solid; border-color: var(--warn); background: var(--warn-bg); cursor: text; }
.fleet-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); }
.fleet-row:first-of-type { border-top: 0; }
.fleet-row .chips { margin-top: 6px; }
.chat-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.chat-list .chat-link { display: block; padding: 9px 20px; color: var(--text); border-top: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; text-decoration: none; }
.chat-list .chat-link:hover { background: var(--surface-2); text-decoration: none; }
.chat-list .chat-link.active { background: var(--accent-soft); font-weight: 600; }
.chat-messages { padding: 18px 20px; display: grid; gap: 14px; max-height: 64vh; overflow-y: auto; }
.msg { display: grid; gap: 4px; max-width: 86%; }
.msg.user { justify-self: end; }
.msg .bubble { padding: 10px 14px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--accent); color: var(--accent-text); border-bottom-right-radius: 4px; }
.msg.assistant .bubble { background: var(--surface-2); border-bottom-left-radius: 4px; }
.msg.user .when { text-align: right; }
.msg .when { font-size: 11.5px; }
.msg .tools { font-size: 12px; color: var(--text-3); }
.msg .cut-note { font-size: 12px; color: var(--text-3); }
.ov-cut-note { font-size: 12px; color: var(--hero-sub); justify-self: start; }
.plan { border: 1px solid var(--border-strong); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.plan.proposed { border-color: var(--accent); }
.plan.plan-changed { border-color: var(--warn); }
.plan-changed-note { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.approve-all:has(.plan-changed-note) { flex-wrap: wrap; }
.approve-all .plan-changed-note { flex-basis: 100%; }
.plan-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.plan ol { margin: 10px 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.chat-form { padding: 14px 20px; border-top: 1px solid var(--border); }
.chat-err { margin: 0 20px 12px; }
@media (max-width: 860px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-messages, .chat-form { padding-left: 14px; padding-right: 14px; }
  .msg { max-width: 100%; }
}
.msg.assistant .bubble code { background: var(--surface); }
.msg .bubble code, .rec-body code, .report code, .review code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.msg.user .bubble code { background: transparent; border-color: currentColor; }
.msg.assistant.pending .bubble { color: var(--text-3); }
.typing { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 6px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: typing 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.type-cursor { display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: text-bottom; background: var(--text-3); animation: type-cursor 1s steps(2) infinite; }
@keyframes type-cursor { 50% { opacity: 0; } }
.chat-fail { color: var(--bad); }
@media (prefers-reduced-motion: reduce) { .typing i, .type-cursor { animation: none; } }
.md-table { overflow-x: auto; margin: 4px 0; white-space: normal; }
.md-table table { border-collapse: collapse; font-size: 13px; }
.md-table th, .md-table td { border: 1px solid var(--border-strong); padding: 4px 9px; text-align: left; vertical-align: top; }
.md-table th { background: var(--surface); font-weight: 600; }
.rule-rows { display: grid; }
.rule-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 20px; border-top: 1px solid var(--border); }
.rule-row.locked { background: var(--surface-2); }
.rule-row .rule-pattern { font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-row .rule-label { font-size: 13px; }
.rule-row input.mono { font-family: var(--mono); font-size: 12px; }
.rule-err { grid-column: 1 / -1; color: var(--bad); font-size: 12px; }
@media (max-width: 860px) { .rule-row { grid-template-columns: 1fr auto; } .rule-row .rule-label, .rule-row input[name=label] { grid-column: 1; } }
.chat-list .pad { padding: 12px 20px 16px; margin: 0; }
.autonomy { display: grid; gap: 8px; }
.autonomy .choice { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.autonomy .choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.autonomy .choice > span { display: grid; gap: 2px; }
.autonomy .choice input { margin-top: 3px; }
.tools-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.tools-head input.short { width: 70px; display: inline-block; margin: 0 4px; }
.legend .chip { margin: 0 2px; }
.chips-edit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; border-top: 1px solid var(--border); }
.chips-edit h3 { margin: 0; font-size: 13px; }
.chips-edit h3.ok { color: var(--ok); }
.chips-edit h3.bad { color: var(--bad); }
.chips-edit .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-edit .chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.chips-edit .chip button { min-width: 24px; min-height: 24px; }
.chips-edit .chip.re { border-style: dashed; }
.chips-edit .chip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 2px; font-size: 14px; line-height: 1; }
.guard-help p { margin: 0; }
.guard-rows { display: grid; }
.guard-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 20px; border-top: 1px solid var(--border); }
.guard-row input.short { width: 70px; display: inline-block; margin-left: 6px; }
@media (max-width: 860px) { .guard-row { grid-template-columns: 1fr auto; } .guard-row .mono { display: none; } }
.guard-note { margin: 0 0 10px; }
.revoked-list > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; }
.revoked-list > summary::-webkit-details-marker { display: none; }
.revoked-list table td { opacity: .75; }
table.plans th { vertical-align: top; min-width: 130px; }
/* The feature names stay readable and in view while the packages scroll sideways. */
table.plans th:first-child, table.plans td:first-child { min-width: 140px; position: sticky; left: 0; z-index: 1; background: var(--surface); }
table.plans tbody tr:hover td:first-child { background: var(--surface-2); }
table.plans .short-name { width: 120px; }
table.plans input.short { width: 70px; }
td.center { text-align: center; }
.msg.result { max-width: 100%; justify-self: stretch; border: 1px dashed var(--border-strong); border-radius: 10px; padding: 8px 12px; }
.msg.result summary { cursor: pointer; font-size: 13px; color: var(--text-2); }
.msg.result pre { margin: 8px 0 0; max-height: 320px; overflow: auto; }
.chat-waiting { font-size: 13px; color: var(--text-3); padding: 4px 0; }
.msg.interim .bubble { background: transparent; padding: 0 2px; font-size: 13px; color: var(--text-3); }
.msg.interim .when { display: none; }
.chat-main, .chat-messages, .plan, .plan ol, .plan li, .msg { min-width: 0; }
.plan .mono, .plan-head strong, .plan .sub { overflow-wrap: anywhere; word-break: break-word; }
.plan pre.logtext { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-messages { overflow-x: hidden; }
.approve-all { position: sticky; top: 0; z-index: 2; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 12px; border: 1px solid var(--accent); border-radius: 10px; background: var(--surface); }
/* "Show details": the button opens the block it controls. Without the script the block stays open and the button is not shown. */
.more-btn { display: none; }
html.js .more-btn { display: inline-flex; }
html.js .more[hidden] { display: none; }
.more { margin-top: 6px; }
/* Admin tables: names and descriptions wrap between words; a select keeps the room its longest option needs. */
table.fit td, table.fit th { overflow-wrap: normal; word-break: normal; }
table.fit td .sub, table.fit td .muted, table.fit td .mono { overflow-wrap: normal; }
table.fit td select { width: auto; min-width: 11em; max-width: 100%; }
table.fit td input[type=text] { width: 6em; }
.feature-chips { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.badge.paused { background: var(--warn-bg); color: var(--warn); }
.badge.paused::before { background: var(--warn); }

/* ------------------------------------------------------------ server overview */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* The top of Overview is one dark card: the state is the coloured band along
   its top edge, the title, the sentence and the chat sit below. Every pair of
   colours here is at least 4.5:1 (white on #b3261e 6.5, on #1f6e40 6.1, on
   #2f5fb8 6.4; #141414 on #f0b04a 9.6); the focus ring is light on the dark. */
.ov-hero { --hero: #17181b; --hero-2: #26282d; --hero-line: #4a4d55; --hero-text: #ffffff; --hero-sub: #c9ccd2; --hero-focus: #9dbcff;
  background: var(--hero); color: var(--hero-text); border-radius: var(--radius); margin: 0 0 24px; overflow: hidden; }
.ov-band { margin: 0; padding: 8px 20px; background: #2f5fb8; color: #ffffff; font-size: 13px; font-weight: 600; }
.ov-hero.crit .ov-band { background: #b3261e; }
.ov-hero.warn .ov-band { background: #f0b04a; color: #141414; }
.ov-hero.ok .ov-band { background: #1f6e40; }
.ov-band-label { display: inline-block; }
.ov-hero-in { padding: 18px 20px 0; display: grid; gap: 10px; }
.ov-hero-in:last-child { padding-bottom: 20px; }
.ov-hero a { color: var(--hero-text); }
.ov-hero a:focus-visible, .ov-hero button:focus-visible, .ov-hero summary:focus-visible, .ov-hero select:focus-visible { outline: 2px solid var(--hero-focus); outline-offset: 2px; }
.ov-title { font-size: 26px; line-height: 1.25; font-weight: 600; margin: 0; color: var(--hero-text); }
/* The title and the greeting keep room for the longest wording, so a new state does not move the list below. */
.ov-title { min-height: 2.5em; }
/* A longer title can come next: the wrapper also holds, unseen, every title of the other urgent items in the same cell, so it is as tall as the tallest of them as rendered. */
.ov-title-wrap { display: grid; }
.ov-title-wrap > .ov-title { grid-area: 1 / 1; }
.ov-title-wrap > .ov-title-room { grid-area: 1 / 1; visibility: hidden; pointer-events: none; font-size: 26px; line-height: 1.25; font-weight: 600; }
#ov-greeting { min-height: 3em; }
@media (max-width: 600px) {
  .ov-title-wrap > .ov-title-room { font-size: 22px; }
  .ov-title { min-height: 3.75em; }
  #ov-greeting { min-height: 6em; }
}
.ov-sentence { color: var(--hero-sub); font-size: 15px; margin: 0; }
/* The sentence changes with the state too (for example "2 decisions are waiting…" to "Nothing changes…"): it keeps room for two lines, three on a phone. */
.ov-sentence { line-height: 1.4; min-height: 2.8em; }
@media (max-width: 600px) {
  .ov-sentence { min-height: 4.2em; }
  .fleet-hero .ov-title, .fleet-hero .ov-sentence, .fleet-hero #ov-greeting { min-height: 0; }
  .fleet-hero .ov-hero-in + .ov-hero-in { padding-top: 8px; }
}
/* Script moves focus here so the status is announced; it is not a field, so no frame (#345 H2). */
.ov-sentence:focus, .ov-sentence:focus-visible { outline: none; }
.ov-chat { display: grid; gap: 10px; padding: 0 0 20px; }
.ov-line { max-width: 640px; overflow-wrap: anywhere; }
.ov-you { justify-self: end; background: var(--hero-text); color: #141414; padding: 8px 14px; border-radius: 12px; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ov-bot { background: var(--hero-2); color: var(--hero-text); padding: 8px 14px; border-radius: 12px; border-bottom-left-radius: 4px; justify-self: start; }
.ov-bot.pending { color: var(--hero-sub); }
/* The servers list's chat names the sender above Steward's text. */
.ov-from { display: block; font-size: 12px; font-weight: 600; color: var(--hero-sub); margin-bottom: 2px; }
.ov-bot.failed { color: #ffb4ab; }
.ov-hero .token { background: #3a3d44; color: #ffffff; border-color: #8b8f97; }
.ov-hero .token.revealed { background: #3a3d44; color: #ffffff; border-color: #f0b04a; }
.ov-hero .md-table tbody tr:hover td { background: #3a3d44; }
#ov-chat-log { display: grid; gap: 10px; }
/* The one composer (Overview and Assistant tab): a light one-line pill with the black Send button inside. */
.composer { display: flex; align-items: center; gap: 8px; background: #f2f3f5; border-radius: 999px; padding: 4px 4px 4px 18px; }
.composer input[type=text] { flex: 1 1 auto; width: auto; min-width: 0; min-height: 40px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #141414; font-size: 15px; resize: none; }
.composer input[type=text]::placeholder { color: #5b5f66; }
.composer input[type=text]:focus-visible { outline: none; }
.composer:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.composer .btn.primary { flex: none; width: auto; min-height: 40px; padding-left: 20px; padding-right: 20px; border-radius: 999px; background: #141414; border-color: #141414; color: #ffffff; }
.composer .btn.primary:hover { background: #2b2d31; border-color: #2b2d31; }
.ov-hero .composer:focus-within { outline-color: var(--hero-focus); }
.ov-hero .composer .btn.primary { background: #141414; border-color: #141414; color: #ffffff; }
.ov-hero .composer .btn.primary:hover { background: #2b2d31; border-color: #2b2d31; }
.ov-hero .btn { background: transparent; border-color: var(--hero-line); color: var(--hero-text); }
.ov-hero .btn:hover { background: var(--hero-2); }
.ov-hero .btn.primary, .ov-hero .btn.danger { background: var(--hero-text); border-color: var(--hero-text); color: #141414; }
.ov-hero .btn.danger { color: #b3261e; }
.ov-hero .btn.primary:hover, .ov-hero .btn.danger:hover { background: #e4e6ea; }
.ov-hero .chip.bad { background: #ffffff; color: #b3261e; }
.ov-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-q { font: inherit; font-size: 13px; padding: 5px 12px; min-height: 28px; border-radius: 999px; border: 1px solid var(--hero-line); background: transparent; color: var(--hero-text); cursor: pointer; }
.ov-q:hover { background: var(--hero-2); }
.ov-more-link { margin: 0; font-size: 13px; }
.ov-more-link:empty { display: none; }
.ov-decide[hidden], .ov-card-link[hidden] { display: none; }
/* Links to the servers an answer of the servers list's chat names. */
.ov-open { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ov-open a { display: inline-flex; align-items: center; min-height: 32px; }
.rec-body .ov-offline { margin: 4px 0 0; }
.ov-sent { font-weight: 600; }
.ov-sent:focus, .ov-sent:focus-visible { outline: none; }
.ov-none { margin: 0 0 14px; color: var(--text-2); }
.why { flex-basis: 100%; }
.why summary { cursor: pointer; font-size: 13px; color: var(--text-2); min-height: 24px; }
.why select { margin-top: 6px; max-width: 100%; }
li.did-auto { display: block; }
li.did-auto p { margin: 0 0 6px; }
li.did-auto .opts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; flex-wrap: wrap; }
.sh h2 { font-size: 18px; }
.ov-waiting details.rec[open] > summary { background: var(--surface-2); }
.did-empty { margin: 0; padding: 14px 20px; }
.card-head h3 { font-size: 15px; margin: 0; font-weight: 600; }
.did-list { list-style: none; margin: 0; padding: 0; }
.did-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 20px; border-top: 1px solid var(--border); }
/* "Show details" sits at the bottom of the last card; its chevron follows aria-expanded. */
.ov-details-bar { padding: 10px 20px 12px; border-top: 1px solid var(--border); }
#ov-more { padding: 4px 0; }
#ov-more::after { content: ""; width: 7px; height: 7px; margin: -3px 0 0 4px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg); }
#ov-more[aria-expanded=true]::after { margin: 3px 0 0 4px; transform: rotate(-135deg); }
.ov-details { margin-top: 14px; }
/* "Did" and "Noticed" are badges, so "Did Restarted the web server" does not read as one sentence. */
.act-kind { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.details-sec { margin-top: 22px; }
.details-sec > .sec-h { font-size: 18px; margin: 0 0 10px; }
html.js .ov-details:not(.open) { display: none; }
html:not(.js) .ov-details-bar { display: none; }
@media (max-width: 860px) {
  .ov-title { font-size: 22px; }
  .ov-band { padding-left: 14px; padding-right: 14px; }
  .ov-hero-in { padding-left: 14px; padding-right: 14px; }
  .did-empty, .did-list li { padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) { .ov-hero * { animation: none; transition: none; } }

/* ------------------------------------------------------------ visual fixes after the round 7 review */
/* A command that wraps inside its block instead of scrolling. */
.command.wrap { white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: visible; }
/* MAC, IP and fingerprint values stay on one line; on phone each scrolls inside its own cell. */
.tech, td .tech { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
@media (max-width: 520px) {
  /* width 0 keeps a long value out of the column sizing; min-width fills the cell it gets. */
  .tech, td .tech { display: block; overflow-x: auto; width: 0; min-width: 100%; }
  td.addrs { width: 60%; }
}
/* An e-mail address is one piece; it breaks only when it is longer than the line. */
.email { display: inline-block; max-width: 100%; overflow-wrap: anywhere; vertical-align: bottom; }
/* Space between a form's last button and the line under it. */
.login form.stack + p, .login form.stack + p.login-alt { margin-top: 18px; }
/* Room above Show details in a card of facts. */
.card-body > dl.facts + p { margin-top: 16px; }
@media (max-width: 520px) {
  /* The badge and its time share a row; the text goes under them. */
  .did-list li:not(.did-auto), li.did-auto > p { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
  .did-list .did-text { order: 3; flex: 1 0 100%; }
  .did-list li > .sub, li.did-auto > p > .sub { order: 2; margin-left: auto; white-space: nowrap; }
  /* Severity and time go under the description, which gets the card's whole width. */
  li.event { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px; }
  li.event > .dot { display: none; }
  li.event .when { text-align: left; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
  /* A card title keeps the full width above its description. */
  .card-head:has(> h2 + .sub) { flex-wrap: wrap; }
  .card-head:has(> h2 + .sub) > h2 { flex: 1 1 100%; }
}
