@font-face {
  font-family: Inter;
  src: url("/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f3f5f9;
  --sidebar: #fbfcfe;
  --surface: #fff;
  --surface-raised: #f6f8fb;
  --surface-hover: #edf2f9;
  --border: #d8e0eb;
  --line: #e6ebf3;
  --text: #182338;
  --muted: #546279;
  --accent: #234eb9;
  --accent-bg: #eaf0ff;
  --accent-border: #c9d9fd;
  --primary: #294fbd;
  --primary-hover: #2143a4;
  --primary-ink: #fff;
  --ok: #116344;
  --ok-bg: #eaf6ef;
  --ok-border: #c9e7d7;
  --warn: #815000;
  --warn-bg: #fff4dd;
  --warn-border: #f3d89f;
  --bad: #a02b3a;
  --bad-bg: #fff0f1;
  --bad-border: #f0cbd0;
  --radius: 12px;
  --mono: "IBM Plex Mono", Consolas, "Liberation Mono", monospace;
  --shadow: 0 2px 4px #18233806, 0 10px 36px #1823380d;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-synthesis: weight;
  line-height: 1.5;
}

:root[data-theme="warm"] {
  --bg: #f5f1e9;
  --sidebar: #faf7f0;
  --surface: #fffdf8;
  --surface-raised: #f7f3e9;
  --surface-hover: #efeade;
  --border: #dfd6c7;
  --line: #ebe3d7;
  --text: #29251d;
  --muted: #625b4e;
  --accent: #13634f;
  --accent-bg: #e5f3eb;
  --accent-border: #bfdccd;
  --primary: #19634e;
  --primary-hover: #105341;
  --ok: #14603a;
  --ok-bg: #eaf3e8;
  --ok-border: #cddfc9;
  --warn: #785000;
  --warn-bg: #fdf2d9;
  --warn-border: #ead6a7;
  --bad: #a02d38;
  --bad-bg: #fbeeee;
  --bad-border: #ebc8c9;
  --shadow: 0 2px 4px #30271a06, 0 10px 36px #30271a12;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101725;
  --sidebar: #151e2e;
  --surface: #182232;
  --surface-raised: #1c293a;
  --surface-hover: #23324a;
  --border: #344358;
  --line: #29364a;
  --text: #ecf2fa;
  --muted: #a7b6ca;
  --accent: #abc4ff;
  --accent-bg: #253a61;
  --accent-border: #476292;
  --primary: #adc4ff;
  --primary-hover: #c5d5ff;
  --primary-ink: #16294f;
  --ok: #97e6b8;
  --ok-bg: #1c392f;
  --ok-border: #375849;
  --warn: #f6d28d;
  --warn-bg: #40351f;
  --warn-border: #66502b;
  --bad: #ffacb5;
  --bad-bg: #442833;
  --bad-border: #694251;
  --shadow: 0 2px 4px #0002, 0 10px 36px #0003;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 280px; margin: 0; color: var(--text); background: var(--bg); font-size: 14px; }
button, input, select { color: inherit; font: inherit; }
button, select, summary, input[type="checkbox"] { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent); }
h1, h2, p { margin: 0; }
noscript { display: block; padding: 16px; color: var(--bad); }
.mono { font-family: var(--mono); overflow-wrap: anywhere; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.035em;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  background: var(--primary);
  color: var(--primary-ink);
}

.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.brand-mark::after {
  inset: 14px;
  border: 0;
  background: currentColor;
}

.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px;
}

.login-form {
  display: grid;
  gap: 17px;
  width: min(100%, 376px);
  padding: clamp(20px, 5vw, 32px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-form h1 { margin-bottom: 8px; font-size: 23px; }
.login-form .button { width: 100%; min-height: 44px; margin-top: 3px; }
.login-form .field input { min-height: 44px; }

.icon { display: inline-grid; position: relative; width: 18px; height: 18px; place-items: center; color: currentColor; flex: 0 0 auto; }
.icon::before, .icon::after { content: ""; position: absolute; }
.icon--servers::before, .icon--servers::after { width: 16px; height: 6px; border: 1.5px solid currentColor; border-radius: 2px; }
.icon--servers::before { top: 2px; }
.icon--servers::after { bottom: 2px; }
.icon--monitor::before { width: 17px; height: 12px; border: 1.5px solid currentColor; border-radius: 3px; translate: 0 -2px; }
.icon--monitor::after { width: 8px; height: 1.5px; background: currentColor; border-radius: 1px; translate: 0 7px; }
.icon--compare::before { inset: 2px 1px; border: 1.5px solid currentColor; border-top: 0; border-right: 0; border-radius: 0 0 0 2px; }
.icon--compare::after { width: 2px; height: 7px; background: currentColor; translate: 1px 2px; box-shadow: 4px -3px currentColor, 8px -6px currentColor; left: 4px; }
.icon--settings::before { width: 13px; height: 13px; border: 1.5px solid currentColor; rotate: 45deg; border-radius: 3px; }
.icon--settings::after { width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; }
.icon--refresh::before { width: 13px; height: 13px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; rotate: -45deg; }
.icon--refresh::after { width: 5px; height: 5px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; translate: 5px -4px; }
.icon--play::before { width: 0; height: 0; border-block: 5px solid transparent; border-left: 8px solid currentColor; translate: 1px 0; }
.icon--search::before { width: 11px; height: 11px; border: 1.5px solid currentColor; border-radius: 50%; translate: -1px -1px; }
.icon--search::after { width: 6px; height: 1.5px; background: currentColor; rotate: 45deg; translate: 5px 5px; }
.icon--logout::before { width: 10px; height: 14px; border: 1.5px solid currentColor; border-right: 0; border-radius: 3px 0 0 3px; translate: -2px 0; }
.icon--logout::after { width: 7px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; rotate: 45deg; translate: 4px 0; }

.app { display: grid; grid-template-columns: 208px minmax(0, 1fr); min-height: 100vh; }

.skip {
  position: fixed;
  z-index: 10;
  top: 10px;
  left: 10px;
  padding: 9px 14px;
  transform: translateY(calc(-100% - 14px));
  border-radius: 8px;
  color: var(--primary-ink);
  background: var(--primary);
}

.skip:focus { transform: none; }

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: 18px 12px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
}

.sidebar .brand { margin-left: 9px; }
.nav { display: grid; gap: 4px; margin-top: 30px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.nav-item:hover { color: var(--text); background: var(--surface-hover); }
.nav-item[aria-current="page"], .nav-item.is-active, .nav-item.active {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-bg);
}

.main-column { min-width: 0; }

.sidebar-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 16px 0 0;
}

.theme-control { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
.theme-control > span { padding-inline-start: 6px; }
.theme-control select { min-height: 36px; width: auto; }
.sidebar-actions .button { min-height: 36px; }
.workspace { max-width: 1640px; min-width: 0; margin-inline: auto; padding: 24px clamp(16px, 2.6vw, 40px) 48px; }
.workspace:focus { outline: none; }
.page { min-width: 0; }

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.page-heading > div:first-child { min-width: 0; }
.page-heading h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; line-height: 1.16; letter-spacing: -.045em; overflow-wrap: anywhere; }
.page-heading p { margin-top: 5px; color: var(--muted); overflow-wrap: anywhere; }
.heading-actions, .local-actions, .settings-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.button:hover:not(:disabled) { background: var(--surface-hover); }
.button--quiet { border-color: var(--border); background: var(--surface); }
.button--quiet:hover:not(:disabled) { border-color: var(--accent-border); }
.button--primary { color: var(--primary-ink); background: var(--primary); }
.button--primary:hover:not(:disabled) { background: var(--primary-hover); }
.button--danger { color: var(--bad); border-color: var(--bad-border); background: var(--bad-bg); }
.button--danger:hover:not(:disabled) { color: var(--surface); border-color: var(--bad); background: var(--bad); }
.button--small { min-height: 32px; padding: 4px 9px; font-size: 12px; }
.button:disabled { opacity: .54; }

.surface { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.metric { min-width: 0; padding: 12px 16px; }
.metric + .metric { border-inline-start: 1px solid var(--line); }
.metric-info { display: flex; align-items: baseline; gap: 9px; justify-content: space-between; }
.metric-info > span { color: var(--muted); font-size: 13px; }
.metric-info > strong { font-size: 25px; font-weight: 700; letter-spacing: -.05em; line-height: 1.16; font-variant-numeric: tabular-nums; }
.metric--done strong { color: var(--ok); }

.run-progress { padding: 12px 16px 15px; margin-bottom: 16px; }
.run-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.run-progress-copy { min-width: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
progress { display: block; width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 10px; background: var(--line); accent-color: var(--primary); }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { border-radius: 10px; background: var(--primary); }
progress::-moz-progress-bar { border-radius: 10px; background: var(--primary); }

.surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px 9px;
}

.surface-title, .list-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.surface-title h2, .local-heading h2, .settings-section h2 { font-size: 17px; letter-spacing: -.02em; line-height: 1.3; }
.selection-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.list-selection { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-controls { padding: 5px 16px 13px; }

.search {
  display: flex;
  align-items: center;
  flex: 1 1 220px;
  gap: 8px;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search input { width: 100%; min-width: 0; padding: 7px 0; border: 0; outline: none; color: var(--text); background: transparent; }
input::placeholder { color: var(--muted); opacity: 1; }
.list-select { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.list-select select { min-height: 38px; min-width: 0; color: var(--text); font-size: 13px; }

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.pill::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
.pill--ok, .pill.ok { color: var(--ok); border-color: var(--ok-border); background: var(--ok-bg); }
.pill--bad, .pill.bad { color: var(--bad); border-color: var(--bad-border); background: var(--bad-bg); }
.pill--warn, .pill.warn { color: var(--warn); border-color: var(--warn-border); background: var(--warn-bg); }
.pill--active, .pill.active { color: var(--accent); border-color: var(--accent-border); background: var(--accent-bg); }

.table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.table-scroll:focus-visible { outline-offset: -3px; }
table { width: 100%; border-collapse: collapse; color: var(--text); text-align: left; }
.server-list > .table-scroll { max-height: min(66dvh, 810px); border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.server-table { border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.server-table th, .server-table td { padding: 9px 11px; text-align: left; vertical-align: middle; }
.server-table th { position: sticky; top: 0; z-index: 1; border-block: 1px solid var(--border); color: var(--muted); background: var(--surface-raised); font-size: 12px; font-weight: 700; }
.server-table td { border-bottom: 1px solid var(--line); }
.server-table tbody tr:last-child td { border-bottom: 0; }
.server-table tbody tr:hover { background: var(--surface-hover); }
.server-table tbody tr:has(input:checked) { background: var(--accent-bg); }
.server-table td:first-child, .server-table th:first-child { width: 43px; padding-inline: 16px 7px; }
.server-table td:last-child, .server-table th:last-child { width: 1%; padding-right: 16px; text-align: right; }
.select-all-label { display: inline-flex; align-items: center; min-height: 22px; gap: 8px; cursor: pointer; }
.mobile-select-caption { display: none; }
.server-name { font-weight: 700; overflow-wrap: anywhere; }
.server-transport, .server-checked { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.server-checked { white-space: nowrap; }
.server-table .button { color: var(--accent); white-space: nowrap; }
.server-table .report-cell-detail { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
input[type="checkbox"] { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); vertical-align: middle; flex: 0 0 17px; }
.empty { padding: 24px 16px; color: var(--muted); text-align: center; }
.empty:has(#subscription-empty[hidden]) { display: none; }

.local-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; max-width: 960px; padding: 20px; }
.local-heading h2 { margin-bottom: 6px; }
.local-facts { grid-column: 1 / -1; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-top: 15px; margin: 0; border-top: 1px solid var(--line); }
.local-facts dt { color: var(--muted); font-size: 12px; }
.local-facts dd { margin: 4px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.local-message { grid-column: 1 / -1; color: var(--muted); }
.local-message:empty { display: none; }
.back-button { margin-bottom: 12px; }

.settings { display: grid; gap: 13px; max-width: 900px; }
.settings-section { min-width: 0; padding: 17px; }
.settings-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.settings-section p { margin-top: 9px; color: var(--muted); font-size: 13px; }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 16px; }
.field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.field > label:first-child, .field > span:first-child { font-size: 13px; font-weight: 700; }
.field--wide { grid-column: 1 / -1; }
.field--switch { align-content: center; padding: 1px 0 0; }

.field input:not([type="checkbox"]), select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.field input:focus, select:focus { border-color: var(--accent); }
.field-note, .check-label { color: var(--muted); font-size: 12px; }
.check-label { display: inline-flex; align-items: center; min-height: 26px; gap: 7px; cursor: pointer; }
.field--switch .check-label { color: var(--text); }
.settings-details summary { min-height: 24px; font-size: 14px; font-weight: 700; }
.settings-details[open] .fields-grid { margin-top: 12px; }
.settings-actions { position: sticky; bottom: 8px; z-index: 2; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.form-message, .alert { color: var(--ok); font-size: 13px; overflow-wrap: anywhere; }
.form-message--error, .form-message[data-severity="error"], .alert { color: var(--bad); }
.alert { margin-bottom: 14px; padding: 10px 13px; border: 1px solid var(--bad-border); border-radius: 8px; background: var(--bad-bg); }
.alert[data-severity="success"] { color: var(--ok); border-color: var(--ok-border); background: var(--ok-bg); }

.compare-page { display: grid; gap: 13px; }
.compare-heading { margin-bottom: 1px; }
.compare-form { display: grid; gap: 11px; width: min(100%, 780px); padding: 15px 16px; }
.compare-form h2, .compare-results-card h2 { font-size: 16px; line-height: 1.35; }
.compare-paste textarea {
  display: block;
  width: 100%;
  min-width: 0;
  resize: vertical;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: 13px/1.45 var(--mono);
}
.compare-paste textarea:focus { border-color: var(--accent); }
.compare-input-actions, .compare-form-footer { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.compare-input-actions { justify-content: space-between; }
.compare-input-actions > .check-label { font-size: 13px; }
.compare-form-footer { padding-top: 10px; border-top: 1px solid var(--line); }
.compare-form-footer .button { margin-left: auto; }
.compare-rounds-field { display: flex; align-items: center; gap: 8px; }
.compare-rounds-field select { width: auto; min-height: 34px; }
.compare-sources { display: grid; gap: 8px; }
.compare-source-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; margin: 0; padding: 7px 9px 9px; border: 1px solid var(--line); border-radius: 8px; }
.compare-source-legend { padding-inline: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.compare-progress { margin: 0; }
.compare-progress-heading { display: grid; gap: 3px; min-width: 0; }
.compare-progress-heading h2 { font-size: 15px; }
.compare-progress .button { flex-shrink: 0; }
.compare-page .form-message[data-severity="neutral"] { color: var(--muted); }
.compare-result { display: grid; gap: 12px; min-width: 0; }
.compare-result:empty { display: none; }
.compare-results-card, .compare-controls, .compare-signals { min-width: 0; }
.compare-results-card > .surface-head { border-bottom: 1px solid var(--line); }
.compare-scroll { overscroll-behavior-x: contain; }
.compare-scroll:focus-visible { outline-offset: -2px; }
.compare-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 13px; }
.compare-table :is(th, td) { padding: 9px 11px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare-table thead th { background: var(--surface-raised); color: var(--muted); font-size: 12px; }
.compare-table tbody th { max-width: 165px; overflow-wrap: anywhere; }
.compare-table tbody tr:hover { background: var(--surface-hover); }
.compare-source-name { min-width: 110px; }
.compare-cell-value { font-weight: 650; font-variant-numeric: tabular-nums; }
.compare-cell-note { display: block; color: var(--muted); font-size: 12px; }
.compare-table [data-tone="warn"] { color: var(--warn); }
.compare-table [data-tone="bad"] { color: var(--bad); }
.compare-table [data-tone="ok"] { color: var(--ok); }
.compare-summary-note { margin: 8px 11px; }
.compare-controls, .compare-signals { padding: 12px 14px; }
.compare-controls-heading { display: flex; align-items: center; gap: 7px 10px; flex-wrap: wrap; margin-bottom: 5px; }
.compare-controls h3, .compare-signals h3 { margin: 0; font-size: 15px; }
.compare-controls-affected { margin-top: 7px; color: var(--warn); font-size: 13px; }
.compare-control-details { margin-top: 8px; }
.compare-control-details summary { color: var(--accent); font-size: 13px; }
.compare-control-details .compare-scroll { margin-top: 8px; border: 1px solid var(--line); border-radius: 7px; }
.compare-signal-list { display: grid; gap: 0; margin: 6px 0 0; padding: 0; list-style: none; }
.compare-signal-list li { display: flex; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13px; }

@media (max-width: 1000px) {
  .app { grid-template-columns: 184px minmax(0, 1fr); }
  .metric-info { display: grid; gap: 3px; }
  .metric-info > span { order: 2; }
}

@media (max-width: 820px) {
  .app { display: block; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; height: auto; padding: 10px 16px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar .brand { margin: 0; }
  .nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
  .nav-item { min-height: 38px; padding: 6px 8px; }
  .sidebar-actions { grid-column: 2; grid-row: 1; display: flex; gap: 6px; margin: 0; padding: 0; }
  .server-list > .table-scroll { max-height: none; }
  .server-table th { position: static; }
}

@media (max-width: 650px) {
  .metric { padding: 9px 10px; }
  .metric-info > span { font-size: 12px; }
  .metric-info > strong { font-size: 21px; }
  .list-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { grid-column: 1 / -1; }
  .list-select { display: grid; gap: 3px; }
  .server-table, .server-table thead, .server-table tbody { display: block; }
  .server-table thead tr { display: block; }
  .server-table thead th:not(:first-child) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .server-table thead th:first-child { display: block; width: auto; padding: 5px 16px; }
  .mobile-select-caption { display: inline; }
  .server-table tbody tr { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: start; gap: 4px 9px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .server-table tbody tr:last-child { border-bottom: 0; }
  .server-table td, .server-table td:first-child, .server-table td:last-child { display: block; width: auto; padding: 0; border: 0; }
  .server-table td:first-child { grid-column: 1; grid-row: 1; }
  .server-table td:nth-child(2) { grid-column: 2 / -1; grid-row: 1; }
  .server-table td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .server-table .server-checked { grid-column: 3; grid-row: 2; text-align: right; font-size: 11px; }
  .server-table .server-checked[data-empty="true"] { display: none; }
  .server-table td:nth-child(5) { grid-column: 2; grid-row: 3; align-self: center; }
  .server-table td:last-child { grid-column: 3; grid-row: 3; align-self: center; }
  .local-card { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .local-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-results-card .compare-table :is(thead th:first-child, .compare-source-name) { position: sticky; left: 0; border-inline-end: 1px solid var(--line); }
  .compare-results-card .compare-source-name { background: var(--surface); }
  .compare-results-card .compare-table tr:hover .compare-source-name { background: var(--surface-hover); }
}

@media (max-width: 440px) {
  .workspace { padding-inline: 12px; }
  .sidebar { padding-inline: 12px; }
  .theme-control > span, .logout-label { display: none; }
  .sidebar-actions .button { width: 36px; padding: 4px; }
  .nav { justify-content: space-between; }
  .nav-item { flex: 1 1 auto; justify-content: center; font-size: 12px; }
  .nav-item .icon { display: none; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1 1 auto; }
  .fields-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-actions { position: static; }
  .settings-actions .button { width: 100%; }
  .compare-form { padding: 12px; }
  .compare-form-footer .button { width: 100%; margin-left: 0; }
  .compare-source-fields { grid-template-columns: minmax(0, 1fr); }
}
