/* Sites Manager: tool-specific rules on top of pswd-ui. Tokens only, no literal colours. */

/* ---------- Shell ---------- */
.btn--icon { padding: 0; width: var(--control-h); }
.btn--sm.btn--icon { width: 28px; min-height: 28px; }
.topbar__end form { display: contents; }
/* Nav count of things that need attention: solid warning fill, as in Incident Monitor; number plus hidden words for screen readers. */
.nav a { display: inline-flex; align-items: center; gap: 6px; }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 4px; background: var(--accent); color: var(--accent-fg); font-size: var(--fs-xs); font-weight: 650;
  font-variant-numeric: tabular-nums; line-height: 1; }

/* ---------- Favicons ---------- */
.favicon { display: block; flex: none; border-radius: var(--r-sm); object-fit: contain; }
/* A real favicon sits on white: it is the icon's own canvas (most are drawn for white), not a UI colour. */
.favicon--real { background: #fff; padding: 2px; box-shadow: inset 0 0 0 1px var(--border); }
.site-cell { display: flex; align-items: flex-start; gap: var(--s3); min-width: 0; }
.site-cell .favicon { margin-top: 1px; }
.site-cell > div { min-width: 0; }

/* ---------- Chips ---------- */
/* Solid fill for the most urgent tier (down, end-of-life, two majors behind), so it stands out from other red chips. */
.chip--solid.chip--error { background: var(--error); color: var(--surface); }
.chip--solid.chip--warning { background: var(--warning); color: var(--surface); }
.cms { display: inline-flex; align-items: center; gap: 3px; }
.cms__delta { font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
a.cms:hover .chip { text-decoration: underline; }
.cms-framework:not(.cell-sub) { margin-left: var(--s2); }
.table .cms-framework.cell-sub { white-space: nowrap; }
.monitor-flag { color: var(--warning); margin-left: var(--s1); vertical-align: middle; cursor: help; }
.row-toggle.chip { font-size: var(--fs-xs); }

/* ---------- Sites list ---------- */
.summary { margin-bottom: var(--s5); }
a.stat { color: inherit; text-decoration: none; border-radius: var(--r-sm); }
a.stat:hover dt { color: var(--accent-text); text-decoration: underline; }
.views { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.views__count { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.views .btn[aria-current] .views__count { color: inherit; }
.sites-table td.is-primary { min-width: 16rem; }
.sites-table .cell-sub { -webkit-line-clamp: 1; }

/* ---------- Dialogs ---------- */
.dialog {
  width: min(30rem, calc(100vw - 2 * var(--s4))); padding: 0;
  color: var(--fg); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
}
.dialog::backdrop { background: color-mix(in srgb, var(--fg) 35%, transparent); }
.dialog__body { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5); }
.dialog__body h2 { font-size: var(--fs-lg); }
.dialog--wide { width: min(46rem, calc(100vw - 2 * var(--s4))); }
.dialog__scroll { max-height: min(60vh, 34rem); overflow-y: auto; }
.page-actions .btn .count { margin-left: 0.2em; }
.bulk-dialog__h { font-size: var(--fs-md); margin-bottom: var(--s2); }
.bulk-dialog__table th[scope="row"] { font-weight: 500; text-align: left; }
.bulk-dialog__table td:last-child:not(.cell-shrink) { min-width: 12rem; }

/* ---------- Quick jump (⌘K) ---------- */
.quick-jump-open kbd { margin-left: var(--s1); font-size: var(--fs-xs, 0.75rem); color: var(--muted); }
.quick-jump { width: min(36rem, calc(100vw - 2 * var(--s4))); margin-top: 12vh; }
.quick-jump__field { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
.quick-jump__field .ph { color: var(--muted); }
.quick-jump__field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: var(--fs-lg); }
.quick-jump__results { list-style: none; margin: 0; padding: var(--s1); max-height: min(24rem, 55vh); overflow-y: auto; }
.quick-jump__results:empty { display: none; }
.quick-jump__results li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-sm); cursor: pointer; }
.quick-jump__results li[aria-selected="true"] { background: var(--accent-soft); }
.quick-jump__results .ph { color: var(--muted); flex: none; }
.quick-jump__text { display: flex; flex-direction: column; min-width: 0; }
.quick-jump__title, .quick-jump__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-jump__sub { font-size: var(--fs-sm); color: var(--muted); }
.quick-jump__results .chip { margin-left: auto; flex: none; }
.quick-jump__empty { padding: var(--s3) var(--s4); color: var(--muted); }
.quick-jump__hint { margin: 0; padding: var(--s2) var(--s4); border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--muted); }
.quick-jump__hint kbd { margin-right: 2px; }
@media (max-width: 40rem) { .quick-jump-open kbd, .quick-jump__hint { display: none; } }

/* ---------- Busy buttons ---------- */
.btn[aria-busy="true"] { pointer-events: none; opacity: 0.75; }
.btn[aria-busy="true"] .ph { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Login ---------- */
.page--login { max-width: 26rem; padding-top: var(--s7); }
.login h1 { font-size: var(--fs-xl); }
.host-link { position: relative; z-index: 1; color: inherit; text-decoration: none; }
.host-link .ph { position: absolute; margin-left: 3px; font-size: 0.9em; opacity: 0; transition: opacity var(--t) var(--ease); }
.host-link:hover { color: var(--accent-text); text-decoration: underline; }
.host-link:hover .ph, .host-link:focus-visible .ph { opacity: 1; }
abbr[title] { text-decoration: none; }

/* ---------- Site detail ---------- */
.record-head__mark--favicon { background: var(--surface); border-color: var(--border); }
.record-head__mark--favicon .favicon { width: 40px; height: 40px; border-radius: var(--r-sm); }
.record-head__mark--favicon .favicon--real { padding: 3px; }
.record-head__sub a { color: inherit; text-decoration: none; }
.record-head__sub a:hover { color: var(--accent-text); text-decoration: underline; }
.record-head__meta a.chip { text-decoration: none; }
.page-actions form { display: contents; }

/* A small "More" menu from a details element */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__list {
  position: absolute; right: 0; top: calc(100% + var(--s1)); z-index: 20; min-width: 14rem;
  display: flex; flex-direction: column; padding: var(--s1);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md);
}
.menu__list form { display: block; }
.menu__list button, .menu__list a {
  display: flex; align-items: center; gap: var(--s2); width: 100%; padding: var(--s2) var(--s3);
  font: inherit; font-size: var(--fs-sm); text-align: left; color: var(--fg); text-decoration: none;
  background: transparent; border: 0; border-radius: var(--r-sm); cursor: pointer;
}
.menu__list button:hover, .menu__list a:hover { background: var(--surface-2); }
.menu__list .is-danger { color: var(--error); }

.setup-todo__mark { color: var(--muted); font-size: 1.1rem; margin-top: 1px; }
.setup-todo .favicon { margin-top: 2px; }
.issue { grid-template-columns: 5.5rem minmax(0, 1fr); align-items: baseline; }
.issue > span:last-child { display: none; }
.issue .chip { justify-self: start; }
.issue__detail { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; overflow-wrap: anywhere; }

/* Fact tables: a row header, then values */
.facts-table th[scope="row"] { font-weight: 550; white-space: nowrap; width: 1%; padding-left: var(--s4); }
.facts-table thead th:first-child { padding-left: var(--s4); }
.facts-table td:last-child, .facts-table th:last-child { padding-right: var(--s4); }
.facts-table tr:last-child > * { border-bottom: 0; }
.facts-table td, .facts-table th[scope="row"] { vertical-align: baseline; }
.packages-table { margin-top: var(--s2); }
.packages-table td { padding-block: 3px; font-size: var(--fs-xs); }
.dl--wide { grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); }
.stat__none { font-size: var(--fs-md); font-weight: 400; }
.stat dd .chip { font-size: var(--fs-sm); }
.ssl-expiry, .dmarc-next { margin-top: var(--s3); }
.probe-errors { margin-top: var(--s4); }
.probe-errors span { display: block; overflow-wrap: anywhere; }
.provenance-value { overflow-wrap: anywhere; max-width: 22rem; }
.notes { font-size: var(--fs-sm); }

/* "Where each fact comes from": a collapsible panel */
.sources > summary { cursor: pointer; list-style: none; padding-bottom: var(--s4); }
.sources > summary::-webkit-details-marker { display: none; }
.sources > summary h2::after { content: var(--ph-caret-down); font-family: "Phosphor", "pswd-icons"; font-weight: normal; font-size: 0.8em; margin-left: var(--s2); color: var(--muted); display: inline-block; transition: transform var(--t) var(--ease); }
.sources[open] > summary h2::after { transform: rotate(180deg); }
.sources[open] > summary { padding-bottom: var(--s3); }
.sources > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--r-md); }

/* ---------- Forms ---------- */
.site-form, .stack-form { display: flex; flex-direction: column; gap: var(--s5); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4) var(--s5); }
@media (min-width: 700px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .field--full { grid-column: 1 / -1; }
}
.form-grid .input, .form-grid .select-wrap { max-width: none; }
.field--full .input { max-width: 40rem; }
.checks { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.check-help { margin-top: calc(-1 * var(--s3)); padding-left: calc(16px + var(--s2)); }
.check-block .check-help { margin-top: var(--s1); }
.monitor-boxes { gap: var(--s2) var(--s5); }
.mono-input { font-family: var(--font-mono); font-size: var(--fs-sm); }
.field__help code { font-size: 1em; }
.textarea { max-width: none; }
.panel__head h2 label { font: inherit; }
.form-bar {
  position: sticky; bottom: 0; z-index: 5;
  margin-inline: calc(-1 * var(--s1)); padding: var(--s3) var(--s1);
  background: var(--bg); border-top: 1px solid var(--border);
}
.form-bar__end { margin-left: auto; }
.btn--danger-text { color: var(--error); }
.btn--danger-text:hover { background: var(--error-soft); }
.mono-input::placeholder { font-family: var(--font-body); font-size: var(--fs-sm); }

/* ---------- Priority ---------- */
.top-pick { margin-bottom: var(--s5); }
.top-pick__body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4) var(--s6); padding-top: var(--s4); }
.top-pick__name { font-size: var(--fs-xl); margin-top: 2px; }
.top-pick__name a { color: inherit; text-decoration: none; }
.top-pick__name a:hover { color: var(--accent-text); text-decoration: underline; }
.top-pick__figure { max-width: 24rem; text-align: right; }
.top-pick__figure .stats { justify-content: flex-end; }
.top-pick__figure .stat dd { font-size: var(--fs-2xl); }
.top-pick__figure p { margin-top: var(--s1); }
@media (max-width: 40rem) { .top-pick__figure { text-align: left; } .top-pick__figure .stats { justify-content: flex-start; } }
.text-error { color: var(--error); }
.text-success { color: var(--success); }
.text-info { color: var(--info); }
.text-accent { color: var(--accent-text); }
.text-neutral { color: var(--muted); }
.empty__icon { font-size: 28px; color: var(--success); }
.table--clickable tbody tr input { position: relative; z-index: 1; }
.note-cell { min-width: 12rem; }
.note-input { min-height: 28px; font-size: var(--fs-sm); border-color: transparent; background: transparent; padding-inline: var(--s2); }
.note-input:hover { border-color: var(--border-strong); }
.note-input:focus { border-color: var(--focus); background: var(--surface); }
.note-input.is-saved { border-color: var(--success); }
.note-input.is-error { border-color: var(--error); }
.note-input { margin-block: -4px; }

/* ---------- Email ---------- */
.filter-chips { margin: 0; padding: 0 var(--s4) var(--s3); }
.mx-cell { max-width: 15rem; }
.mx-cell .mono { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Servers ---------- */
.server-tag .row-link { color: inherit; }
.server-dot { display: inline-block; width: 8px; height: 8px; margin-right: var(--s2); border-radius: 50%; background: currentColor; vertical-align: 1px; }
.servers-table .row-link { font-weight: 650; }
.servers-table__php .row { gap: 4px; }
.servers-table__sys span { display: block; }
.servers-table__sys span + span { color: var(--muted); }
@media (min-width: 768px) {
  .servers-table { table-layout: fixed; }
  .servers-table__host { width: 7.5rem; } .servers-table__system { width: 10rem; } .servers-table__status { width: 11rem; } .servers-table__ip { width: 8.5rem; }
  .servers-table__sites { width: 4rem; } .servers-table__borg { width: 9.5rem; } .servers-table__phpcol { width: 10.5rem; } .servers-table__synced { width: 6rem; }
  .servers-table td.cell-shrink { width: auto; }
}
.form--panel { padding-top: var(--s4); }
.tag-picker { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tag-picker label { cursor: pointer; }
.tag-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tag-picker .chip { padding: 6px 9px; border: 1px solid transparent; }
.tag-picker input:checked + .chip { border-color: currentColor; }
.tag-picker input:focus-visible + .chip { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Key/value rows ---------- */
.kv { display: flex; flex-direction: column; gap: var(--s2); }
.kv__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--s2); }
.kv__row .input { max-width: none; }
.page--narrow .form { max-width: 52rem; }
.chip .row-link { color: inherit; }

/* ---------- Settings ---------- */
.settings-form { max-width: 52rem; }
.input-unit { display: flex; align-items: center; gap: var(--s2); }
.input-unit .input { max-width: 9rem; font-variant-numeric: tabular-nums; }
.input-unit span { color: var(--muted); font-size: var(--fs-sm); }
.is-copied { color: var(--success); }
.redirect-uri { margin: var(--s2) 0 var(--s5); }
.page-head + .views, .views + .banner { margin-top: 0; }
.views + .banner { margin-bottom: var(--s2); }

/* ---------- Phones ---------- */
@media (max-width: 40rem) {
  /* Saved views scroll sideways rather than stacking into a wall of buttons */
  .views { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--s4)); padding-inline: var(--s4); scrollbar-width: none; }
  .views .btn { flex: none; }
  .software-table th:nth-child(4), .software-table td:nth-child(4) { display: none; }
  .issue { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
}

/* A filter bar opening a panel (no panel head above it) needs the same air on top as below */
.panel > .table-filters:first-child,
.panel > .visually-hidden:first-child + .table-filters { padding-top: var(--s3); }

/* ---------- Visual weight ----------
   pswd-ui outlines every control in --border-strong while panels sit on a 1px --border over a
   near-white page. With a dozen view buttons and four filters above one panel, the controls
   outweighed the content. Quieten the repeated controls to the panel's own edge weight and
   give the strong edge back only on hover and focus. */
.views .btn { border-color: var(--border); background: var(--surface); color: var(--muted); }
.views .btn:hover { border-color: var(--border-strong); color: var(--fg); background: var(--surface); }
.views .btn[aria-current] { border-color: var(--accent-text); color: var(--accent-text); background: var(--accent-soft); }
.panel .table-filters .input, .panel .table-filters .select { border-color: var(--border); background: var(--row-hover); }
.panel .table-filters .input:hover, .panel .table-filters .select:hover { border-color: var(--border-strong); }
.panel .table-filters .input:focus-visible { border-color: var(--focus); background: var(--surface); }
.panel .table-filters__select.is-set .select { background: var(--accent-soft); border-color: var(--accent-text); }
/* The header band sits flush under the filters; a hairline keeps the two from merging. */
.panel .table-filters + .panel__body thead th, .panel .table-filters + .chip-line + .panel__body thead th { border-top: 1px solid var(--border); }

/* ---------- Light-mode neutrals ----------
   A touch darker page and borders than pswd-ui's plum default, so white panels and table
   rules stand off the page. Same recipe the accent presets use (5-12% of the accent mixed
   into a neutral grey), with the brand plum. Dark mode keeps pswd-ui's values: its
   :root:not([data-theme="light"]) and [data-theme="dark"] rules are more specific. */
:root {
  --bg: color-mix(in srgb, #5F1069 4%, #f4f4f6);
  --surface-2: color-mix(in srgb, #5F1069 5%, #f0f0f2);
  --row-hover: color-mix(in srgb, #5F1069 3%, #fafafb);
  --surface-3: color-mix(in srgb, #5F1069 7%, #e8e8eb);
  --border: color-mix(in srgb, #5F1069 10%, #dcdce0);
}
/* Table header band: lighter than the page, a step off the white rows. */
.table thead th { background: var(--row-hover); }

/* ---------- Sites list: summary figures that are also the views ----------
   One row instead of a stat line plus a wall of view buttons. Each figure links to the
   list filtered to it; the current one carries a plum rule underneath, like a tab. */
.summary-views {
  display: flex; flex-wrap: wrap; gap: 0 var(--s2);
  margin: 0 0 var(--s5); border-bottom: 1px solid var(--border);
}
.summary-view {
  display: flex; align-items: baseline; gap: 6px;
  padding: var(--s2) var(--s3) var(--s3); margin-bottom: -1px;
  color: var(--fg); text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color var(--t) var(--ease);
}
.summary-view:first-child { padding-left: 0; }
.summary-view:hover { border-bottom-color: var(--border-strong); }
.summary-view[aria-current], .summary-view[aria-selected="true"] { border-bottom-color: var(--accent-text); }
/* The same row as tabs (Billing): buttons, so drop their chrome. */
button.summary-view { background: none; border-top: 0; border-left: 0; border-right: 0; border-radius: 0; font: inherit; cursor: pointer; }
.summary-view__figure {
  font-family: var(--font-display); font-stretch: var(--display-stretch);
  font-size: var(--fs-lg); font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums;
}
.summary-view__label { font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }
.summary-view:hover .summary-view__label { color: var(--fg); }
.summary-view[aria-current] .summary-view__label, .summary-view[aria-selected="true"] .summary-view__label { color: var(--accent-text); font-weight: 550; }
.summary-view--error .summary-view__figure { color: var(--error); }
.summary-view--warning .summary-view__figure { color: var(--warning); }
.summary-view:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.archived-link { display: inline-flex; align-items: center; gap: var(--s1); font-size: var(--fs-xs); color: var(--muted); text-decoration: none; white-space: nowrap; }
.archived-link:hover { color: var(--accent-text); text-decoration: underline; }
.table-filters__count + .archived-link { margin-left: var(--s3); }
.view-note { display: flex; gap: var(--s3); align-items: baseline; padding: 0 var(--s4) var(--s3); font-size: var(--fs-sm); color: var(--muted); }
.view-note strong { color: var(--fg); }

@media (max-width: 40rem) {
  .summary-views { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--s4)); padding-inline: var(--s4); scrollbar-width: none; }
  .summary-view { flex: none; }
}

/* ---------- Hosting accounts ---------- */
.row--end { justify-content: flex-end; flex-wrap: nowrap; }
.row--end form { display: contents; }

/* ---------- Invoice picker preview ---------- */
.invoice-preview { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s2); padding: var(--s3);
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.invoice-preview__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s2); }
.invoice-preview__items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.invoice-preview__items li { display: flex; justify-content: space-between; gap: var(--s3); padding-top: var(--s2); border-top: 1px solid var(--border); }
.invoice-preview__desc { white-space: pre-line; font-size: var(--fs-sm); min-width: 0; }
.invoice-preview__qty { flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.invoice-preview__total { display: flex; justify-content: flex-end; align-items: baseline; gap: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--border); }
.invoice-preview.is-loading .ph { animation: spin 0.9s linear infinite; }
.invoice-picker { display: flex; gap: var(--s2); }
.invoice-picker .select { flex: 1; min-width: 0; }
.invoice-picker .btn { flex: none; }
/* A Maintenance plan todo's hosting invoice lines, to show which plan they pay for. */
.todo-invoice { display: flex; flex-direction: column; gap: var(--s1); margin-top: var(--s2); padding-left: var(--s3); border-left: 2px solid var(--border); }
.todo-invoice__item { white-space: pre-line; }
.invoice-amount { display: flex; flex-direction: column; gap: var(--s1); margin-top: var(--s3); }
.invoice-amount .input { max-width: 12rem; }

/* Sites: unbilled hosting pinned above the summary views, under a solid error-red header */
.billing-alert { margin-bottom: var(--s5); border-color: var(--error); }
.billing-alert .panel__head { align-items: center; padding-block: var(--s3); background: var(--error); color: var(--surface); border-radius: calc(var(--r-md) - 1px) calc(var(--r-md) - 1px) 0 0; }
.billing-alert .panel__head h2 { display: flex; align-items: center; gap: var(--s2); color: inherit; }
.billing-alert .panel__head .chip { background: var(--surface); color: var(--error); }
.billing-alert .table thead th { background: var(--error-soft); color: var(--error); border-bottom-color: color-mix(in oklch, var(--error) 30%, transparent); }

/* Billing */
.stat__unit { font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
.billing-table tr.billing-row--look > td:first-child { box-shadow: inset 3px 0 0 var(--error); }
.billing-page > .panel + .panel { margin-top: var(--s5); }
.billing-table .has-tip { cursor: help; }

/* Live sections ([data-poll]): the "Updating live" chip, and the progress banner for queued work. */
.panel__head-end { display: inline-flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.live-indicator .ph { display: none; }
.live-indicator::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; animation: live-pulse 2s ease-in-out infinite; }
.live-indicator[data-state="checking"]::before, .live-indicator[data-state="paused"]::before { display: none; }
.live-indicator[data-state="checking"] .ph { display: inline-block; animation: spin 0.9s linear infinite; }
.live-indicator[data-state="paused"] { color: var(--warning); background: var(--warning-soft); }
.live-indicator[data-state="paused"] .ph { display: inline-block; }
.live-indicator[data-state="paused"] .ph::before { content: var(--ph-pause); }
@keyframes live-pulse { 50% { opacity: 0.3; } }
.background-work { margin-bottom: var(--s4); }
.background-work__body { flex: 1; min-width: 0; display: grid; gap: var(--s2); }
.background-work__body p { margin: 0; }
.background-work__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.background-work__head strong { display: inline; }
.background-work__progress { width: 100%; max-width: 32rem; height: 6px; accent-color: var(--info); }

/* Upgrade progress: stages not reached yet are quiet; the current one already gets the timeline's filled ring. */
.upgrade-progress .timeline > li.is-pending::before { border-color: var(--border-strong); }
.upgrade-progress .timeline > li.is-pending .timeline__title { color: var(--muted); font-weight: 450; }

/* Upgrades screen: the figures with the live chip beside them, and steppers that wrap in narrow cells. */
.upgrades-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.upgrades-table .stepper { flex-wrap: wrap; row-gap: var(--s1); }
.upgrades-table__stage .cell-sub { margin-top: var(--s1); }
.upgrades-table__label { display: none; }
/* Every row is at least as tall as one with a small button, so a row doesn't jump when its button
   comes or goes as an upgrade starts in place (td height is a minimum, border-box: padding + border). */
@media (min-width: 40.0625rem) {
  .upgrades-table td.cell-end { height: calc(26px + 2 * (var(--s3) + 3px) + 1px); }
}
@media (max-width: 40rem) { .upgrades-table__label { display: inline; } }

/* Changes made through MCP (site and server pages): one line per changed field under each write. */
.mcp-changes__fields { list-style: none; margin: var(--s1) 0; padding: 0; overflow-wrap: anywhere; }
.mcp-changes__fields li + li { margin-top: 2px; }
