/* facade web UI. Colours follow the reference data-viz palette: surfaces, text
   inks, series blue, and the reserved status colours (always paired with an icon
   and a label). */

:root {
  color-scheme: light;
  --bg: #f4f4f2;
  --surface-1: #fcfcfb;
  --surface-2: #f0efec;
  --border: #e2e1dc;
  --border-strong: #cfcec7;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #7a7974;
  --accent: #2a78d6;
  --accent-hover: #256abf;
  --accent-soft: #e6f0fc;
  --series-1: #2a78d6;
  --series-1-area: rgba(42, 120, 214, 0.12);
  --good: #0ca30c;
  --good-text: #006300;
  --good-soft: #e5f5e5;
  --warning: #fab219;
  --critical: #d03b3b;
  --critical-text: #b42f2f;
  --critical-soft: #fbeaea;
  --busy-soft: #e6f0fc;
  --shadow: 0 1px 2px rgba(20, 20, 18, 0.06), 0 4px 16px rgba(20, 20, 18, 0.05);
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #121211;
    --surface-1: #1a1a19;
    --surface-2: #232321;
    --border: #2e2e2b;
    --border-strong: #3d3d39;
    --text-primary: #f0efec;
    --text-secondary: #c3c2b7;
    --text-muted: #8f8e86;
    --accent: #3987e5;
    --accent-hover: #5598e7;
    --accent-soft: #1b2b40;
    --series-1: #3987e5;
    --series-1-area: rgba(57, 135, 229, 0.16);
    --good-text: #4ec44e;
    --good-soft: #15291a;
    --critical-text: #f07a7a;
    --critical-soft: #3a1d1d;
    --busy-soft: #1b2b40;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
h1 { font-size: 22px; font-weight: 650; margin: 0; letter-spacing: -0.01em; }
h2, h3 { margin: 0; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 12px; }

.muted { color: var(--text-muted); }
.small { font-size: 12.5px; }
.lead { margin: -8px 0 20px; max-width: 720px; }

/* ---------------------------------------------------------------- layout */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 216px;
  flex-shrink: 0;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
  padding: 4px 10px 18px;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); font-size: 18px; }

.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--text-secondary);
  font-weight: 500;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text-primary); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav-count {
  background: var(--critical);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 0 7px;
  line-height: 18px;
}
.nav-logout {
  margin-top: auto;
  background: none;
  border: 0;
  color: var(--text-muted);
  text-align: left;
  padding: 7px 10px;
  font: inherit;
  cursor: pointer;
  border-radius: 7px;
}
.nav-logout:hover { background: var(--surface-2); color: var(--text-primary); }

.content { flex: 1; min-width: 0; }
.page { padding: 28px 36px 64px; max-width: 1240px; }
.page-narrow { max-width: 860px; }
.page > section, .page > .card { margin-bottom: 24px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.title-row { display: flex; align-items: center; gap: 12px; }
.subtitle { margin-top: 4px; }
.crumb { display: inline-block; font-size: 12.5px; color: var(--text-muted); margin-bottom: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}

@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; flex-direction: row; align-items: center; padding: 10px; }
  .brand { padding: 4px 10px; }
  .nav { flex-direction: row; overflow-x: auto; }
  .nav-logout { margin: 0 0 0 auto; }
  .page { padding: 20px 16px 48px; }
  .shell-banner { padding: 16px 16px 0; }
  .page-head { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------- cards */

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.node-wrap { display: flex; flex-direction: column; }
.node-wrap .card { flex: 1; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.node-wrap .card:only-child { border-radius: var(--radius); }
.card-actions {
  display: flex;
  gap: 16px;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface-2);
}
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 24px; }
.danger-zone .section-title { margin-bottom: 4px; }
.danger-zone p { margin: 0; }

/* ---------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 1px 9px 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 20px;
}
.badge-icon { font-size: 10px; }
.badge-good { background: var(--good-soft); color: var(--good-text); }
.badge-good .badge-icon { color: var(--good); }
.badge-critical { background: var(--critical-soft); color: var(--critical-text); }
.badge-critical .badge-icon { color: var(--critical); }
.badge-busy { background: var(--busy-soft); color: var(--accent); }
.badge-neutral { background: var(--surface-2); color: var(--text-secondary); }
.badge-muted { background: var(--surface-2); color: var(--text-muted); }

/* ---------------------------------------------------------------- meters & tiles */

.meters { display: flex; flex-direction: column; gap: 12px; }
.meter-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.meter-label { color: var(--text-secondary); font-weight: 500; }
.meter-value { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.meter-warn { color: var(--critical); }
.meter-track { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.meter-fill { height: 100%; background: var(--series-1); border-radius: 3px; transition: width 0.4s ease; }
.meter-fill-high { background: var(--critical); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 16px; }
.tile {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tile-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.tile-value { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tile-sub { font-size: 12px; color: var(--text-muted); }

/* ---------------------------------------------------------------- sparklines */

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 24px; }
.spark {
  margin: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 12px;
}
.spark-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.spark-title { font-size: 12.5px; color: var(--text-secondary); font-weight: 500; }
.spark-now { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.spark-plot { position: relative; height: 120px; cursor: crosshair; }
.spark-plot svg { width: 100%; height: 100%; display: block; overflow: visible; }
.spark-base { stroke: var(--border-strong); stroke-width: 1; }
.spark-area { fill: var(--series-1-area); }
.spark-line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-cross { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.spark-dot { fill: var(--series-1); stroke: var(--surface-1); stroke-width: 2; }
.spark-tip {
  position: absolute;
  top: -6px;
  transform: translate(-50%, -100%);
  background: var(--text-primary);
  color: var(--surface-1);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  display: flex;
  gap: 8px;
}
.spark-tip span { opacity: 0.75; }
.spark-scale { position: absolute; top: 0; left: 0; font-size: 11px; color: var(--text-muted); pointer-events: none; }
.spark-empty { height: 120px; display: grid; place-items: center; color: var(--text-muted); font-size: 12.5px; }

/* ---------------------------------------------------------------- tables */

.table-wrap {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.table td { padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strong-link { font-weight: 600; color: var(--text-primary); }
.domains { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions .link-button + .link-button { margin-left: 14px; }
.env-value code { word-break: break-all; }

/* ---------------------------------------------------------------- forms & buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-weight: 550;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.button:hover { background: var(--surface-2); text-decoration: none; }
.button:disabled { opacity: 0.5; cursor: not-allowed; }
.button-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-danger { background: var(--critical); border-color: var(--critical); color: #fff; }
.button-danger:hover { background: var(--critical-text); }
.button-danger-quiet { color: var(--critical-text); }
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
}
.link-button:hover { text-decoration: underline; }
.link-button.danger { color: var(--critical-text); }
.icon-button {
  background: none;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 6px;
}
.icon-button:hover { background: var(--surface-2); color: var(--text-primary); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form { display: flex; flex-direction: column; gap: 14px; }
.form-section { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 12px; }
.form-section legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  padding: 0;
}
.form-section + .form-section { border-top: 1px solid var(--border); padding-top: 18px; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.form-row > .field { flex: 1 1 200px; }
.form-row > .grow { flex: 2 1 300px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12.5px; font-weight: 550; color: var(--text-secondary); }
.field small { color: var(--text-muted); font-size: 12px; }
input[type="text"], input[type="password"], input[type="url"], input[type="number"], select, textarea {
  font: inherit;
  color: var(--text-primary);
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 7px 10px;
  width: 100%;
}
textarea { resize: vertical; min-height: 38px; }
input:disabled, textarea:disabled { background: var(--surface-2); color: var(--text-muted); }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; padding-top: 26px; }
.toolbar .check, .modal .check { padding-top: 0; }
.inline-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.inline-field select { width: auto; padding: 4px 8px; }

.segmented {
  display: inline-flex;
  background: var(--surface-2);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
  align-self: flex-start;
}
.segment {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 550;
  color: var(--text-secondary);
  padding: 5px 14px;
  border-radius: 7px;
  cursor: pointer;
}
.segment.active { background: var(--surface-1); color: var(--text-primary); box-shadow: var(--shadow); }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.push-right { margin-left: auto; }

/* ---------------------------------------------------------------- notes, banners, toasts */

.note {
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--surface-2);
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 13px;
  white-space: pre-wrap;
}
.note-error { background: var(--critical-soft); color: var(--critical-text); }
.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.banner:hover { text-decoration: none; filter: brightness(0.98); }
.banner-critical { background: var(--critical-soft); color: var(--critical-text); }
.empty {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
}
.page > .empty, .page .empty { margin-bottom: 24px; }
.empty p { margin-bottom: 12px; }
.empty p:last-child { margin: 0; }
.loading { color: var(--text-muted); padding: 24px 0; }

.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 260px;
  max-width: 420px;
  background: var(--text-primary);
  color: var(--surface-1);
  border-radius: 9px;
  padding: 10px 10px 10px 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  animation: rise 0.18s ease-out;
}
.toast-error { background: var(--critical); color: #fff; }
.toast-text { flex: 1; }
.toast .icon-button { color: inherit; opacity: 0.7; padding: 0 4px; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* ---------------------------------------------------------------- modal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 9, 0.45);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 16px;
}
.modal {
  background: var(--surface-1);
  border-radius: 12px;
  padding: 20px 22px;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h2 { font-size: 17px; }

.copy-field {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}
.copy-field code {
  flex: 1;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 8px 10px;
  word-break: break-all;
  max-height: 120px;
  overflow: auto;
}

/* ---------------------------------------------------------------- app page */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  font: inherit;
  font-weight: 550;
  color: var(--text-secondary);
  padding: 8px 14px;
  cursor: pointer;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.details { margin-top: 8px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--text-secondary); font-size: 13px; }
.kv dd { margin: 0; word-break: break-word; }

.logs {
  background: #121211;
  color: #e6e5e0;
  border-radius: var(--radius);
  font: 12.5px/1.55 var(--mono);
  padding: 12px 0;
  height: calc(100vh - 330px);
  min-height: 320px;
  overflow: auto;
}
.log-line { display: flex; gap: 12px; padding: 0 16px; white-space: pre-wrap; word-break: break-word; }
.log-line:hover { background: rgba(255, 255, 255, 0.04); }
.log-time { color: #8f8e86; flex-shrink: 0; user-select: none; }
.logs-empty { color: #8f8e86; padding: 4px 16px; }

.split { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.deploy-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.deploy-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  text-align: left;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.deploy-item .muted { grid-column: 2; }
.deploy-item.active { border-color: var(--accent); background: var(--accent-soft); }
.deploy-rev { font-weight: 600; }
.deploy-detail { min-width: 0; }
.deploy-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.deploy-log {
  margin: 0;
  background: #121211;
  color: #e6e5e0;
  border-radius: var(--radius);
  font: 12px/1.55 var(--mono);
  padding: 12px 16px;
  height: calc(100vh - 380px);
  min-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------------------------------------------------------------- alerts & settings */

.alert-list { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}
.alert-item.firing { border-color: var(--critical); }
.alert-item.resolved .alert-message { color: var(--text-secondary); }
.alert-message { flex: 1; }
.report { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }

/* ---------------------------------------------------------------- login */

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.login-brand { justify-content: center; padding-bottom: 6px; font-size: 22px; }

/* ---------------------------------------------------------------- source: upload & scan */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); outline: none; }
.dropzone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone-main { font-weight: 600; }
.dropzone-sub { font-size: 12.5px; color: var(--text-muted); }

.repo-row { align-items: flex-end; }
.scan-button { margin-bottom: 1px; }
.repo-row .field small { display: none; }

.scan { display: flex; flex-direction: column; gap: 8px; }
.candidates { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.candidate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 10px 12px;
  cursor: pointer;
}
.candidate:hover { border-color: var(--accent); }
.candidate.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.candidate-kind {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.candidate-title { font-weight: 600; word-break: break-word; }
.candidate-detail { font-size: 12.5px; color: var(--text-secondary); word-break: break-word; }
.candidate-env { font-size: 12px; color: var(--text-muted); font-family: var(--mono); word-break: break-word; }
.candidate-note { font-size: 12px; color: var(--critical-text); word-break: break-word; }

.build-details { border: 1px solid var(--border); border-radius: var(--radius); }
.build-details summary {
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-weight: 550;
  list-style: none;
}
.build-details summary::-webkit-details-marker { display: none; }
.build-details summary::before { content: "▸"; color: var(--text-muted); }
.build-details[open] summary::before { content: "▾"; }
.build-details-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 12px; }

/* ---------------------------------------------------------------- domains */

.domain-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.domain-row {
  display: grid;
  grid-template-columns: minmax(200px, 1.1fr) 1.5fr 1.5fr;
  gap: 16px;
  align-items: start;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
@media (max-width: 900px) { .domain-row { grid-template-columns: 1fr; } }
.domain-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.domain-name { font-weight: 600; word-break: break-all; color: var(--text-primary); }
.domain-check { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; color: var(--text-secondary); min-width: 0; word-break: break-word; }
.app-domains { margin-bottom: 16px; }
.app-backups { margin-top: 24px; }
.shell-banner { padding: 20px 36px 0; max-width: 1240px; }
.shell-banner .banner { margin-bottom: 0; }
.push-left { justify-content: flex-start; }
.check-field { display: flex; flex-direction: column; gap: 4px; }
.cap-card .meters { max-width: 560px; }
.access-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.access-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 420px; }
.form-row > select { flex: 1 1 200px; }
.update-check { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.update-check .toolbar { margin-bottom: 8px; }
.commit-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.commit { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.commit-subject { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.update-check { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.commit-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.commit { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.commit-subject { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-ports { margin-top: 28px; }
.node-ports .section-title { margin: 0; }
.provider-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.ports-editor { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.port-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.port-row input[type="number"] { width: 6.5em; }
.port-row .segmented { flex-shrink: 0; }
.port-count { min-width: 5em; }

/* ---------------------------------------------------------------- amount sliders */

.slider-row { display: flex; align-items: center; gap: 10px; }
.slider-track { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.slider-track input[type="range"] { width: 100%; margin: 0; accent-color: var(--accent); }
.slider-mark {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  margin-left: -1px;
  background: var(--warning);
  border-radius: 1px;
  pointer-events: none;
}
.field input.slider-number { width: 96px; flex: none; }
.slider-none { padding-top: 0; }
.limits-row > .field { flex: 1 1 260px; }
.field small.slider-label.over { color: var(--critical-text); }
