/* Пульт котельной: светлая эмаль щита, графит, латунь для действий. Одна яркая деталь — огонёк
   вердикта; остальное — спокойные плоские панели без теней. */
:root {
  --enamel: #edefea;
  --panel: #f7f8f5;
  --ink: #1f2522;
  --muted: #69716c;
  --rule: #d8dcd5;
  --brass: #94661c;
  --ok: #2f7a4e;
  --warn: #b27b12;
  --bad: #b9442a;
  --drawer-h: 42vh;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --enamel: #161a18;
    --panel: #1d2220;
    --ink: #e3e7e1;
    --muted: #8f978f;
    --rule: #2d3430;
    --brass: #d3a24f;
    --ok: #5dbb86;
    --warn: #e2ad48;
    --bad: #e7795c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--enamel);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}
body.drawer-open { padding-bottom: var(--drawer-h); }
h1, h2 { margin: 0; line-height: 1.2; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }

/* --- кнопки --- */
.btn {
  font: inherit; font-size: 14px; color: var(--ink); cursor: pointer;
  background: transparent; border: 1px solid var(--rule); border-radius: 8px;
  padding: 5px 12px; line-height: 1.3; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-primary { border-color: var(--brass); color: var(--brass); font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: var(--brass); color: var(--panel); border-color: var(--brass); }
.btn-quiet { border-color: transparent; color: var(--muted); }
.btn-quiet:hover:not(:disabled) { color: var(--ink); border-color: var(--rule); }
.btn-small { font-size: 13px; padding: 2px 9px; border-radius: 6px; }
.btn.armed, .btn.armed:hover { background: var(--bad); border-color: var(--bad); color: #fff; }

/* --- шапка --- */
.top {
  display: flex; align-items: center; gap: 16px;
  max-width: 1180px; margin: 0 auto; padding: 14px 20px 0;
}
.brand { font-weight: 700; font-size: 16px; letter-spacing: .01em; }
.envtabs { display: inline-flex; gap: 4px; }
.envtab {
  font-weight: 700; font-size: 16px; text-decoration: none; padding: 3px 12px;
  border: 1px solid var(--rule); border-radius: 8px; color: var(--muted);
}
.envtab[aria-current] { border-color: var(--brass); color: var(--brass); }
a.envtab:hover { color: var(--ink); }
.updated { color: var(--muted); font-size: 13px; margin-left: auto; }
.top form { margin: 0; }

.overview { max-width: 1180px; margin: 0 auto; padding: 12px 20px 40px; }

/* --- вердикт: единственная яркая деталь --- */
.verdict {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 26px 28px; border-radius: 16px;
  background: color-mix(in srgb, var(--ok) 9%, var(--panel));
}
.verdict-warn { background: color-mix(in srgb, var(--warn) 12%, var(--panel)); }
.verdict-bad { background: color-mix(in srgb, var(--bad) 13%, var(--panel)); }
.verdict h1 { font-size: 34px; font-weight: 750; letter-spacing: -.015em; }
.verdict-text { min-width: 0; }
.verdict-note { margin: 8px 0 0; color: var(--muted); }
.pilot {
  flex: none; width: 22px; height: 22px; margin-top: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 18%, transparent),
              0 0 22px 4px color-mix(in srgb, var(--ok) 45%, transparent);
}
.pilot-warn { background: var(--warn); --glow: var(--warn); animation: flicker 2.4s ease-in-out infinite; }
.pilot-bad { background: var(--bad); --glow: var(--bad); animation: flicker 1.1s ease-in-out infinite; }
.pilot-warn, .pilot-bad {
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--glow) 20%, transparent),
              0 0 24px 6px color-mix(in srgb, var(--glow) 50%, transparent);
}
@keyframes flicker { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .pilot { animation: none !important; } }
.issues { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.issues li { padding-left: 18px; position: relative; }
.issues li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%;
}
.issue-bad::before { background: var(--bad); }
.issue-warn::before { background: var(--warn); }
.busy { margin: 12px 0 0; font-weight: 600; color: var(--warn); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* --- машина --- */
.machine {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 28px;
  margin: 26px 4px 0;
}
.gauge { min-width: 0; }
.gauge-head { display: flex; align-items: baseline; justify-content: space-between; }
.gauge-label { color: var(--muted); font-size: 14px; }
.gauge-percent { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.gauge-bar { display: block; width: 100%; height: 6px; margin: 6px 0 6px; }
.gauge-bar .track { fill: var(--rule); }
.gauge-bar .fill { fill: var(--ok); }
.gauge-bar .mark { stroke: var(--panel); stroke-width: .8; }
.gauge-warn .fill { fill: var(--warn); } .gauge-warn .gauge-percent { color: var(--warn); }
.gauge-bad .fill { fill: var(--bad); } .gauge-bad .gauge-percent { color: var(--bad); }
.gauge-foot { display: grid; gap: 4px; }
.gauge-value { color: var(--muted); font-size: 13px; }
.spark { display: block; width: 100%; height: 26px; }
.spark polyline { fill: none; stroke: var(--muted); stroke-width: 1.3; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.gauge-warn .spark polyline { stroke: var(--warn); }
.gauge-bad .spark polyline { stroke: var(--bad); }
.machine-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 13px; }

/* --- кто ест ресурсы --- */
.procs { margin: 24px 4px 0; }
.procs-summary {
  display: flex; align-items: baseline; gap: 4px 14px; flex-wrap: wrap;
  cursor: pointer; list-style: none; padding: 4px 0;
}
.procs-summary::-webkit-details-marker { display: none; }
.procs-summary::before {
  content: "▸"; color: var(--muted); font-size: 13px; width: 10px; transition: transform .15s;
}
.procs[open] > .procs-summary::before { transform: rotate(90deg); }
.procs-summary:hover h2 { color: var(--brass); }
.procs h2 { font-size: 17px; }
.procs-lead { color: var(--muted); font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.procs-lead b { color: var(--ink); font-weight: 600; }
.procs-body { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; min-width: 0; }
.procs-head { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.segmented .btn[aria-pressed="true"] { border-color: var(--brass); color: var(--brass); font-weight: 600; }
.procs-span { color: var(--muted); font-size: 13px; }
.procs-custom { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; font-size: 14px; }
.procs-custom[hidden] { display: none; }
.procs-custom label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.procs-custom input {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--enamel);
  border: 1px solid var(--rule); border-radius: 8px; padding: 3px 8px;
}
.procs-hint { color: var(--muted); font-size: 13px; }
.procs-empty { margin: 0; color: var(--muted); font-size: 14px; }
.procs-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.procs-foot .machine-note { margin: 0; }

/* Таблица процессов — как в htop: одна на всё, отличается только сортировка. */
.table-scroll { overflow-x: auto; min-width: 0; position: relative; }  /* relative — скрытые подписи не раздвигают страницу */
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th {
  text-align: left; font-weight: 400; color: var(--muted); font-size: 13px;
  padding: 4px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap;
}
.ptable td { padding: 4px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; white-space: nowrap; }
.ptable th:first-child, .ptable td:first-child { padding-left: 0; }
.ptable .num { text-align: right; font-variant-numeric: tabular-nums; }
.ptable th.sorted, .ptable th.sorted .th-sort { color: var(--brass); font-weight: 600; }
.ptable td.cmd { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ptable .muted, .ptable td.muted { color: var(--muted); }
.ptable td.muted { font-size: 13px; }
.ptable .col-graph { width: 110px; }
.ptable .col-graph .spark { width: 110px; height: 22px; }
.ptable .col-actions { text-align: right; }
.ptable .col-actions .btn + .btn { margin-left: 4px; }
.th-sort {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px;
}
.th-sort::after { content: " ↓"; visibility: hidden; }
.sorted .th-sort::after { visibility: visible; }
.ptable tr.signalled td { opacity: .45; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- плитки проектов --- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.tile {
  background: var(--panel); border-radius: 14px; padding: 18px 20px 16px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.tile-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tile-head h2 { font-size: 19px; font-weight: 700; }
.tile-link { color: var(--muted); font-size: 13px; margin-left: auto; overflow-wrap: anywhere; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--muted); }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-bad { background: var(--bad); }
.tile-head .dot { width: 11px; height: 11px; }
.tile-error { margin: 0; color: var(--bad); }
.version { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.pr { color: var(--muted); margin-right: 2px; }
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; font-size: 14px; }
.facts div { display: contents; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.service {
  display: grid; grid-template-columns: auto minmax(70px, max-content) 1fr auto; align-items: center;
  gap: 4px 10px; padding: 7px 0; border-bottom: 1px solid var(--rule);
}
.service-name { font-weight: 600; }
.service-state { color: var(--muted); font-size: 13px; min-width: 0; }
.service-actions { display: flex; gap: 6px; justify-content: flex-end; }
.tile-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }

/* --- очередь проверок (runq): свёртка и заголовок — как у «Процессов» --- */
.ptable tr.queue-running td:nth-child(2) b { color: var(--brass); }
/* «Где и что»: worktree жирным, команда серым; не влезло — многоточие, целиком — в подсказке. */
.ptable td.queue-what { min-width: 160px; }
.ptable td.queue-what b { font-weight: 600; }
.ptable .queue-cmd { color: var(--muted); font-size: 13px; }
.ptable .queue-kind { display: none; color: var(--muted); }
.ptable tr.bumped td { opacity: .45; }
/* ход бегущей задачи (runq 1.2, `RUNQ_PROGRESS`): тонкая шкала под словом «идёт» */
.job-progress { display: block; width: 100%; min-width: 120px; height: 4px; margin-top: 5px; border-radius: 2px; }
.job-progress .track { fill: var(--rule); }
.job-progress .fill { fill: var(--ok); }
/* этап бегущей задачи (runq 1.3): одной строкой, длинный — с многоточием, полный — в title */
.job-stage { display: inline-block; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* --- последние действия --- */
.jobs { margin-top: 32px; }
.jobs h2 { font-size: 17px; margin-bottom: 8px; }
.job-list { list-style: none; margin: 0; padding: 0; }
.job {
  display: grid; grid-template-columns: 110px 1fr auto auto; gap: 12px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 14px;
}
.job-when { color: var(--muted); }

/* --- нижняя панель: логи и вывод задач --- */
.drawer {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--drawer-h); z-index: 10;
  display: flex; flex-direction: column;
  background: var(--panel); border-top: 1px solid var(--rule);
  box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .35);
}
.drawer[hidden] { display: none; }
.drawer-grip { height: 10px; cursor: ns-resize; flex: none; position: relative; touch-action: none; }
.drawer-grip::after {
  content: ""; position: absolute; left: 50%; top: 3px; width: 44px; height: 4px; margin-left: -22px;
  border-radius: 2px; background: var(--rule);
}
.drawer-head {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding: 0 20px 10px; border-bottom: 1px solid var(--rule);
}
.drawer-title { font-size: 16px; font-weight: 700; }
.drawer-state { font-size: 14px; }
.filters { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; flex: 1; }
.filters[hidden] { display: none; }
.filters select, .filters input[type="search"] {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--enamel);
  border: 1px solid var(--rule); border-radius: 8px; padding: 4px 8px;
}
.filters input[type="search"] { width: 220px; max-width: 100%; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.drawer-body {
  flex: 1; margin: 0; overflow: auto; padding: 12px 20px;
  font: 12.5px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink);
  white-space: pre;
}
.drawer-body.wrap { white-space: pre-wrap; word-break: break-word; }
.drawer-body .l-bad { color: var(--bad); }
.drawer-body .l-warn { color: var(--warn); }
.drawer-body mark { background: color-mix(in srgb, var(--brass) 35%, transparent); color: inherit; border-radius: 2px; }
.drawer-foot { padding: 6px 20px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--rule); }

/* --- вход --- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-form { width: min(340px, 100%); display: grid; gap: 14px; }
.login-form h1 { font-size: 24px; margin-bottom: 6px; }
.login-form label { display: grid; gap: 5px; color: var(--muted); font-size: 14px; }
.login-form input {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px;
}
.login-form .btn { padding: 10px; font-size: 15px; }
.login-error { margin: 0; color: var(--bad); }
.login-lead { margin: 0; color: var(--muted); font-size: 14px; }
.login-form a.btn { text-align: center; }

/* --- настройки (.env) --- */
a.btn { text-decoration: none; display: inline-block; }
a.brand { text-decoration: none; }
.crumb { color: var(--muted); font-size: 14px; }
a.crumb { text-decoration: none; }
a.crumb:hover { color: var(--ink); }
.top-end { margin-left: auto !important; }
.page { max-width: 1180px; margin: 0 auto; padding: 16px 20px 40px; display: grid; gap: 16px; }
.page-note { margin: 0; color: var(--muted); font-size: 14px; }
.env-path { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.env-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.env-files { list-style: none; margin: 0; padding: 0; }
.env-files li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.env-name { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 600; }
.env-meta { color: var(--muted); font-size: 13px; }
.env-form { display: grid; gap: 10px; }
.env-text {
  width: 100%; min-height: 50vh; resize: vertical; padding: 12px 14px;
  font: 13px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink);
  background: var(--panel); border: 1px solid var(--rule); border-radius: 10px;
  white-space: pre; overflow-wrap: normal; overflow: auto; tab-size: 4;
}
.env-text:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.env-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.env-hint { color: var(--muted); font-size: 13px; }
.env-backups h2 { font-size: 15px; margin-bottom: 6px; }
.env-backups ul { margin: 0; padding-left: 18px; font-size: 14px; columns: 3 180px; }
/* --- своя страница проекта: панель visa-watch --- */
.vw-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vw-lead { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
/* «Делаю — последний итог — дальше» под фазой: подпись мелко, значение в строку. */
.vw-flow { margin: 10px 0 0; display: grid; gap: 4px; }
.vw-flow div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; }
.vw-flow dt { color: var(--muted); font-size: 13px; padding-top: 2px; }
.vw-flow dd { margin: 0; overflow-wrap: anywhere; }
.vw .machine-note { margin: 0; }
.vw > * { min-width: 0; }  /* элемент сетки .page не растягивается по широкой таблице журнала */
/* Лестница неуспехов: ступени по две в ряд (плитка — половина страницы); пройденные — бледные,
   текущая — с рамкой состояния. */
.vw-ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.vw-rung { border: 1px solid var(--rule); border-radius: 8px; padding: 6px 8px; display: grid; gap: 2px; min-width: 0; }
.vw-rung-name { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.vw-rung-count { color: var(--muted); font-size: 13px; }
.vw-rung-done { opacity: .45; }
.vw-rung-current { border-color: var(--warn); }
.vw-rung-current .vw-rung-count { color: var(--warn); }
.vw-rung-blocked { opacity: 1; border-color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, var(--panel)); }
.vw-shot { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 8px; }
/* Живой экран (noVNC): холст RFB вписывается в рамку с пропорциями окна Chromium (1280×900). */
.vw-screen .procs-body { display: grid; gap: 10px; }
.vw-screen-bar { flex: none; }
.vw-screen-password { display: flex; flex-wrap: wrap; gap: 8px; }
.vw-screen-password[hidden] { display: none; }
.vw-screen-password input[type="password"] {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--enamel);
  border: 1px solid var(--rule); border-radius: 8px; padding: 4px 8px; width: 260px; max-width: 100%;
}
.vw-screen-view { width: 100%; aspect-ratio: 1280 / 900; background: var(--enamel); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.vw-url { margin: 0; color: var(--muted); font-size: 13px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
/* Полоса проверок: штрих на проверку, линии — границы часов. SVG, а не style: его запрещает CSP. */
.vw-strip { display: block; width: 100%; height: 24px; }
.vw-strip .track { fill: var(--enamel); }
.vw-strip .mark { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.vw-strip .tick-ok { fill: var(--ok); }
.vw-strip .tick-warn { fill: var(--warn); }
.vw-text {
  margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--panel);
  font: 13px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere;
}
/* Журнал событий машины: фильтры — как у логов; строка по нажатию раскрывается целиком. */
.vw-filters { flex: none; }
.vw-filters select, .vw-filters input[type="search"] {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--enamel);
  border: 1px solid var(--rule); border-radius: 8px; padding: 4px 8px;
}
.vw-events tbody tr { cursor: pointer; }
.vw-events tbody tr:hover td { background: color-mix(in srgb, var(--rule) 35%, transparent); }
.vw-events td.cmd { min-width: 140px; }
.vw-events tr.expanded td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.vw-events tr.expanded td.cmd { max-width: none; }
.vw-events tr.vw-start td { border-top: 2px solid var(--rule); font-weight: 600; }  /* перезапуск visa-watch */
.vw-reply { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.vw-reply-text { white-space: pre-line; overflow-wrap: anywhere; min-width: 0; }
.notice { margin: 0; padding: 12px 16px; border-radius: 10px; display: grid; gap: 8px; }
.notice p, .notice ul, .notice form { margin: 0; }
.notice-ok { background: color-mix(in srgb, var(--ok) 12%, var(--panel)); }
.notice-warn { background: color-mix(in srgb, var(--warn) 14%, var(--panel)); }
.notice-bad { background: color-mix(in srgb, var(--bad) 14%, var(--panel)); }

/* --- узкие экраны --- */
@media (max-width: 900px) {
  .machine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles, .env-groups, .vw-grid { grid-template-columns: minmax(0, 1fr); }
  .ptable .col-user { display: none; }
}
@media (max-width: 560px) {
  .top, .overview, .page { padding-left: 16px; padding-right: 16px; }
  .top { flex-wrap: wrap; gap: 8px 12px; }
  .verdict { padding: 20px 18px; gap: 14px; }
  .verdict h1 { font-size: 26px; }
  .pilot { width: 18px; height: 18px; margin-top: 5px; }
  .machine { gap: 14px 18px; }
  .service { grid-template-columns: auto 1fr; }
  .service-state { grid-column: 2; }
  .service-actions { grid-column: 1 / -1; justify-content: flex-start; padding-left: 19px; }
  /* На телефоне — только главное: имя, цифры, кнопки; полная команда — во всплывающей подсказке. */
  .ptable .col-where, .ptable .col-graph { display: none; }
  .ptable td.cmd .muted { display: none; }
  .ptable td.cmd { min-width: 110px; }  /* имя не сжимается до трёх букв; лишнее — прокруткой */
  /* Очередь: состояние в две строки, worktree — своей строкой над командой, чтобы «где» было видно без прокрутки. */
  .ptable td.queue-state { white-space: normal; min-width: 80px; }
  .ptable td.queue-what b { display: block; white-space: normal; overflow-wrap: anywhere; }
  .ptable .queue-kind { display: inline; }
  .job { grid-template-columns: 1fr auto; }
  .job-when { grid-column: 1 / -1; font-size: 12px; }
  .vw-reply { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .drawer-head { padding: 0 16px 10px; }
  .drawer-body { padding: 10px 16px; }
  body { --drawer-h: 60vh; }
}
