:root {
  color-scheme: light;
  --ch-bg: #f3f5f8;
  --ch-panel: #ffffff;
  --ch-panel-soft: #f7f9fc;
  --ch-line: #d7dfe9;
  --ch-line-soft: #e7ecf2;
  --ch-ink: #172231;
  --ch-muted: #718096;
  --ch-faint: #95a3b5;
  --ch-blue: #2f6df6;
  --ch-blue-dark: #1856df;
  --ch-green: #08a66c;
  --ch-red: #f04444;
  --ch-orange: #e89a24;
  --ch-teal: #11a6a1;
  --ch-sky: #76a8ea;
  --ch-shadow: 0 7px 20px rgba(29, 43, 62, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ch-bg);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--ch-bg);
  color: var(--ch-ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
input {
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(47, 109, 246, 0.55);
}

.ch-app {
  width: min(1760px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 30px 0 22px;
}

.ch-topbar,
.ch-suitebar,
.ch-panel,
.ch-progress-panel {
  border: 1px solid var(--ch-line);
  border-radius: 8px;
  background: var(--ch-panel);
  box-shadow: var(--ch-shadow);
}

.ch-topbar {
  min-height: 86px;
  display: grid;
  grid-template-columns: 280px minmax(540px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 26px;
}

.ch-brand {
  color: var(--ch-ink);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.ch-browser-tabs {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.ch-browser-tabs button {
  position: relative;
  width: 138px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid #ccd6e4;
  border-radius: 8px;
  background: #fff;
  color: #273241;
  font-weight: 650;
  cursor: pointer;
}

.ch-browser-tabs button::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 3px;
  background: transparent;
}

.ch-browser-tabs button[aria-pressed="true"] {
  border-color: var(--ch-blue);
  color: var(--ch-ink);
  font-weight: 800;
}

.ch-browser-tabs button[aria-pressed="true"]::after {
  background: var(--ch-red);
}

.ch-main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.ch-main-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  color: var(--ch-muted);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.ch-main-nav a[aria-current="page"] {
  color: var(--ch-blue);
}

.ch-settings-icon {
  font-size: 16px;
  line-height: 1;
}

.ch-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  display: inline-block;
  border-radius: 50%;
  background: var(--ch-muted);
}

i.ch-dot {
  margin-right: 7px;
}

.ch-dot-blue { background: var(--ch-blue); }
.ch-dot-green { background: var(--ch-green); }
.ch-dot-red { background: var(--ch-red); }
.ch-dot-orange { background: var(--ch-orange); }
.ch-dot-teal { background: var(--ch-teal); }
.ch-dot-sky { background: var(--ch-sky); }
.ch-dot-muted { background: #9cadc2; }

.ch-suitebar {
  min-height: 58px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  margin-top: 13px;
  padding: 0 26px;
}

.ch-suitebar nav {
  display: flex;
  align-items: stretch;
  gap: 30px;
}

.ch-suitebar a {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--ch-muted);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.ch-suitebar a[aria-current="page"] {
  color: var(--ch-red);
}

.ch-suitebar a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--ch-red);
}

.ch-suitebar > span {
  align-self: center;
  color: var(--ch-faint);
  font-size: 12px;
}

.ch-main {
  padding-top: 34px;
}

.ch-page-intro {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 10px;
}

.ch-page-intro > * {
  min-width: 0;
}

.ch-kicker {
  margin: 0 0 6px;
  color: var(--ch-red);
  font-size: 13px;
  font-weight: 750;
}

.ch-page-intro h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}

.ch-page-intro p:not(.ch-kicker) {
  margin: 7px 0 0;
  color: var(--ch-muted);
  font-size: 15px;
}

.ch-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 128px);
  gap: 10px;
}

.ch-stat {
  min-height: 62px;
  padding: 9px 15px;
  border: 1px solid var(--ch-line);
  border-radius: 8px;
  background: #fff;
}

.ch-stat span {
  display: flex;
  align-items: center;
  color: var(--ch-muted);
  font-size: 12px;
}

.ch-stat strong {
  display: block;
  margin-top: 2px;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.ch-resource-actions,
.ch-run-toolbar,
.ch-settings-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ch-resource-actions {
  min-height: 34px;
  justify-content: flex-end;
  margin-bottom: 8px;
  color: var(--ch-faint);
  font-size: 12px;
}

.ch-button,
.ch-icon-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ch-line);
  border-radius: 7px;
  background: #fff;
  color: var(--ch-ink);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.ch-button {
  padding: 0 16px;
}

.ch-icon-button {
  width: 38px;
  padding: 0;
  font-size: 19px;
}

.ch-button-primary {
  border-color: var(--ch-blue);
  background: var(--ch-blue);
  color: #fff;
}

.ch-button-primary:hover {
  border-color: var(--ch-blue-dark);
  background: var(--ch-blue-dark);
}

.ch-button-outline {
  border-color: var(--ch-blue);
  color: var(--ch-blue);
}

.ch-button-danger {
  border-color: var(--ch-red);
  color: var(--ch-red);
}

.ch-button-quiet {
  color: #5c6a7c;
}

.ch-button:disabled,
.ch-icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ch-panel {
  min-width: 0;
  overflow: hidden;
}

.ch-resource-panel {
  margin-bottom: 24px;
}

.ch-panel-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 19px;
  border-bottom: 1px solid var(--ch-line);
}

.ch-panel-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.ch-panel-head > span {
  color: var(--ch-faint);
  font-size: 12px;
}

.ch-panel-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
}

.ch-tag {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.ch-tag-local { background: #fff0f2; color: var(--ch-red); }
.ch-tag-baseline { background: #eaf2ff; color: var(--ch-blue); }
.ch-tag-waiting { background: #fff3dd; color: #b56c00; }
.ch-tag-success { background: #e8f8f0; color: var(--ch-green); }
.ch-tag-error { background: #fff0f0; color: var(--ch-red); }

.ch-table-wrap {
  width: 100%;
  min-width: 0;
  padding: 14px 18px 17px;
  overflow: auto;
}

.ch-table {
  width: 100%;
  min-width: 820px;
  table-layout: fixed;
  border-collapse: collapse;
}

.ch-table th,
.ch-table td {
  height: 52px;
  padding: 8px 18px;
  border-right: 1px solid var(--ch-line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.ch-table th:last-child,
.ch-table td:last-child {
  border-right: 0;
}

.ch-table th {
  height: 42px;
  background: #edf2f7;
  color: var(--ch-muted);
  font-size: 12px;
  font-weight: 650;
}

.ch-table thead th:first-child {
  border-radius: 7px 0 0 7px;
}

.ch-table thead th:last-child {
  border-radius: 0 7px 7px 0;
}

.ch-table tbody tr:nth-child(even) {
  background: #f7f9fb;
}

.ch-resource-table th:nth-child(1),
.ch-resource-table td:nth-child(1) { width: 45%; }
.ch-resource-table th:nth-child(2),
.ch-resource-table td:nth-child(2) { width: 12%; }
.ch-resource-table th:nth-child(3),
.ch-resource-table td:nth-child(3) { width: 14%; }
.ch-resource-table th:nth-child(4),
.ch-resource-table td:nth-child(4) { width: 18%; }
.ch-resource-table th:nth-child(5),
.ch-resource-table td:nth-child(5) { width: 11%; }

.ch-resource-link,
.ch-path-main {
  color: #1265dc;
  font-weight: 750;
  text-decoration: none;
}

.ch-resource-link:hover,
.ch-path-main:hover {
  text-decoration: underline;
}

.ch-path-cell {
  min-width: 0;
}

.ch-path-cell small {
  display: block;
  margin-top: 3px;
  color: var(--ch-faint);
  font-size: 11px;
}

.ch-type {
  min-width: 58px;
  display: inline-flex;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 7px;
  background: #fff0e4;
  color: #d45c00;
  font-size: 12px;
  font-weight: 800;
}

.ch-type-js {
  background: #fff6cf;
  color: #a26b00;
}

.ch-status {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 999px;
  background: #edf1f6;
  color: #69788b;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.ch-status::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: currentColor;
}

.ch-status.pass,
.ch-status.succeeded,
.ch-status.completed { background: #e8f8f0; color: var(--ch-green); }
.ch-status.fail,
.ch-status.failed,
.ch-status.crash,
.ch-status.timeout,
.ch-status.harness_error { background: #fff0f0; color: var(--ch-red); }
.ch-status.running,
.ch-status.leased { background: #eaf2ff; color: var(--ch-blue); }
.ch-status.queued,
.ch-status.paused { background: #fff3dd; color: #bf790b; }
.ch-status.unsupported,
.ch-status.skipped,
.ch-status.cancelled { background: #f3edf9; color: #74528d; }

.ch-row-action {
  min-width: 96px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--ch-blue);
  border-radius: 7px;
  background: #fff;
  color: var(--ch-blue);
  font-weight: 750;
  cursor: pointer;
}

.ch-empty {
  color: var(--ch-faint);
  text-align: center !important;
}

.ch-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 24px;
  color: var(--ch-muted);
}

.ch-pager button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--ch-line);
  border-radius: 7px;
  background: #fff;
  color: var(--ch-blue);
  font-size: 21px;
  cursor: pointer;
}

.ch-pager button:disabled {
  color: var(--ch-faint);
  cursor: not-allowed;
}

.ch-dialog {
  width: min(780px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--ch-line);
  border-radius: 8px;
  background: #fff;
  color: var(--ch-ink);
  box-shadow: 0 20px 50px rgba(18, 31, 48, 0.22);
}

.ch-dialog::backdrop {
  background: rgba(19, 31, 49, 0.45);
}

.ch-dialog form {
  margin: 0;
}

.ch-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--ch-line);
}

.ch-dialog-head h2 {
  margin: 0;
  font-size: 20px;
}

.ch-dialog-head .ch-kicker {
  margin-bottom: 2px;
}

.ch-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  padding: 20px;
}

.ch-form-grid > label,
.ch-form-grid fieldset {
  min-width: 0;
}

.ch-form-grid > label:not(.ch-check) {
  display: grid;
  gap: 7px;
  color: var(--ch-muted);
  font-size: 12px;
  font-weight: 700;
}

.ch-form-grid input:not([type="checkbox"]),
.ch-form-grid select {
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #c7d1df;
  border-radius: 7px;
  background: #fff;
  color: var(--ch-ink);
}

.ch-form-grid fieldset {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.ch-form-grid legend {
  margin-bottom: 4px;
  color: var(--ch-muted);
  font-size: 12px;
  font-weight: 700;
}

.ch-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #47566a;
}

.ch-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--ch-blue);
}

.ch-form-span {
  grid-column: 1 / -1;
}

.ch-estimate {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--ch-line);
  border-bottom: 1px solid var(--ch-line);
  background: var(--ch-panel-soft);
}

.ch-estimate div {
  padding: 12px 18px;
  border-right: 1px solid var(--ch-line);
}

.ch-estimate div:last-child {
  border-right: 0;
}

.ch-estimate dt {
  color: var(--ch-muted);
  font-size: 12px;
}

.ch-estimate dd {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 800;
}

.ch-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
}

.ch-form-error {
  margin: 0;
  padding: 12px 18px;
  border: 1px solid #ffd0d0;
  background: #fff5f5;
  color: #c72e2e;
  font-weight: 650;
}

/* Monitor */
.ch-monitor-intro,
.ch-settings-intro {
  margin-bottom: 16px;
}

.ch-monitor-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ch-run-state {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border-radius: 999px;
  background: #eaf8f1;
  color: var(--ch-green);
  font-weight: 750;
}

.ch-run-state.is-paused { background: #fff3dd; color: #b56c00; }
.ch-run-state.is-terminal { background: #edf1f6; color: #68778a; }
.ch-run-state.is-error { background: #fff0f0; color: var(--ch-red); }

.ch-run-toolbar {
  justify-content: space-between;
  margin-bottom: 12px;
}

.ch-run-toolbar form {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ch-run-toolbar label {
  color: var(--ch-muted);
  font-weight: 650;
}

.ch-run-toolbar select {
  width: min(520px, 55vw);
  min-height: 38px;
  padding: 6px 34px 6px 10px;
  border: 1px solid var(--ch-line);
  border-radius: 7px;
  background: #fff;
  color: var(--ch-ink);
}

.ch-run-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 10px;
  border: 1px solid var(--ch-line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--ch-line);
}

.ch-run-meta > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 10px 18px;
  background: var(--ch-bg);
}

.ch-run-meta span {
  color: var(--ch-faint);
  font-size: 12px;
}

.ch-run-meta strong {
  overflow: hidden;
  color: #4f5f73;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-progress-panel {
  min-height: 78px;
  display: grid;
  grid-template-columns: 210px minmax(220px, 1fr) 74px 240px;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 12px 22px;
}

.ch-progress-panel > div:first-child span,
.ch-progress-panel > div:first-child strong {
  display: block;
}

.ch-progress-panel > div:first-child span {
  color: var(--ch-muted);
  font-size: 12px;
}

.ch-progress-panel > div:first-child strong {
  margin-top: 5px;
  font-size: 18px;
}

.ch-progress-panel b {
  font-weight: 800;
}

.ch-progress-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4ebf3;
}

.ch-progress-track i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--ch-blue);
  transition: width 180ms ease;
}

.ch-progress-percent {
  color: var(--ch-blue);
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.ch-progress-legend {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  color: var(--ch-muted);
  font-size: 12px;
}

.ch-progress-legend span {
  white-space: nowrap;
}

.ch-progress-legend b {
  display: block;
  margin-top: 3px;
  color: var(--ch-ink);
  text-align: center;
}

.ch-monitor-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.ch-monitor-content {
  min-width: 0;
  display: grid;
  gap: 24px;
}

.ch-worker-panel {
  position: sticky;
  top: 12px;
}

.ch-worker-usage {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 15px 18px 12px;
  color: var(--ch-muted);
  font-size: 12px;
}

.ch-worker-usage strong {
  color: #4f5d70;
}

.ch-worker-usage > div {
  height: 10px;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 999px;
  background: #e4ebf3;
}

.ch-worker-usage i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--ch-blue);
}

.ch-worker-legend {
  display: flex;
  gap: 28px;
  padding: 0 18px 12px;
  border-bottom: 1px solid var(--ch-line);
  color: var(--ch-muted);
  font-size: 12px;
}

.ch-worker-list {
  max-height: 495px;
  padding: 10px 10px 3px;
  overflow: auto;
}

.ch-worker-item {
  min-height: 61px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--ch-line-soft);
}

.ch-worker-item:nth-child(even) {
  border-radius: 7px;
  background: #f7f9fb;
}

.ch-worker-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-worker-item strong .ch-dot {
  margin-right: 8px;
}

.ch-worker-item small {
  min-width: 0;
  grid-column: 1;
  overflow: hidden;
  color: var(--ch-faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-worker-item em {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--ch-green);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.ch-worker-item.is-waiting em { color: #b56c00; }
.ch-worker-item.is-error em { color: var(--ch-red); }

.ch-worker-panel > footer {
  min-height: 44px;
  padding: 12px 18px;
  border-top: 1px solid var(--ch-line);
  color: var(--ch-faint);
  font-size: 11px;
}

.ch-pending-table th:nth-child(1),
.ch-pending-table td:nth-child(1) { width: 48%; }
.ch-pending-table th:nth-child(2),
.ch-pending-table td:nth-child(2) { width: 10%; }
.ch-pending-table th:nth-child(3),
.ch-pending-table td:nth-child(3) { width: 15%; }
.ch-pending-table th:nth-child(4),
.ch-pending-table td:nth-child(4) { width: 12%; }
.ch-pending-table th:nth-child(5),
.ch-pending-table td:nth-child(5) { width: 15%; }

.ch-results-table {
  min-width: 1020px;
}

.ch-results-table th:nth-child(1),
.ch-results-table td:nth-child(1) { width: 34%; }
.ch-results-table th:nth-child(2),
.ch-results-table td:nth-child(2) { width: 12%; }
.ch-results-table th:nth-child(3),
.ch-results-table td:nth-child(3) { width: 12%; }
.ch-results-table th:nth-child(4),
.ch-results-table td:nth-child(4) { width: 10%; }
.ch-results-table th:nth-child(5),
.ch-results-table td:nth-child(5) { width: 12%; }
.ch-results-table th:nth-child(6),
.ch-results-table td:nth-child(6) { width: 20%; }

.ch-error-text {
  color: var(--ch-red);
  font-size: 12px;
}

/* Settings */
.ch-settings-state {
  min-width: 210px;
  display: grid;
  gap: 4px;
  justify-items: end;
}

.ch-settings-state strong {
  color: var(--ch-green);
}

.ch-settings-state span {
  color: var(--ch-faint);
  font-size: 12px;
}

.ch-settings-state.is-dirty strong,
.ch-settings-state.is-dirty span {
  color: #b56c00;
}

.ch-settings-state.is-error strong {
  color: var(--ch-red);
}

.ch-settings-form {
  display: grid;
  gap: 18px;
}

.ch-settings-band {
  min-width: 0;
  border-top: 1px solid var(--ch-line);
  border-bottom: 1px solid var(--ch-line);
  background: #fff;
}

.ch-settings-band > header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--ch-line-soft);
}

.ch-settings-band h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0;
}

.ch-settings-band header p {
  margin: 4px 0 0;
  color: var(--ch-muted);
  font-size: 12px;
}

.ch-settings-band header > span {
  color: var(--ch-green);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.ch-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 20px;
}

.ch-settings-grid label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #4b596b;
  font-size: 13px;
  font-weight: 700;
}

.ch-settings-grid input,
.ch-settings-grid select {
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #c7d1df;
  border-radius: 7px;
  background: #fff;
  color: var(--ch-ink);
}

.ch-settings-grid small {
  color: var(--ch-faint);
  font-size: 11px;
  font-weight: 500;
}

.ch-settings-wide {
  grid-column: span 2;
}

.ch-change-badge {
  color: var(--ch-green) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

[data-restart-required="true"] + small + .ch-change-badge,
[data-restart-required="true"] + .ch-change-badge {
  color: #b56c00 !important;
}

.ch-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--ch-line-soft);
}

.ch-health-grid > div {
  min-width: 0;
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 15px 20px;
  background: #fff;
}

.ch-health-grid span,
.ch-health-grid small {
  overflow: hidden;
  color: var(--ch-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-health-grid strong {
  color: var(--ch-green);
  font-size: 17px;
}

.ch-settings-actions {
  justify-content: flex-end;
  padding-bottom: 8px;
}

.ch-footer {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 20px;
  margin-top: 46px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--ch-line);
  color: var(--ch-faint);
  font-size: 11px;
}

.ch-footer strong {
  font-size: 11px;
}

.ch-footer span:last-child {
  text-align: right;
}

@media (max-width: 1260px) {
  .ch-topbar {
    grid-template-columns: 230px minmax(480px, 1fr);
  }

  .ch-main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    border-top: 1px solid var(--ch-line-soft);
    padding-top: 8px;
  }

  .ch-topbar {
    padding-top: 15px;
    padding-bottom: 10px;
  }

  .ch-browser-tabs button {
    width: min(130px, 22vw);
  }

  .ch-monitor-grid {
    grid-template-columns: 330px minmax(0, 1fr);
  }

  .ch-progress-panel {
    grid-template-columns: 190px minmax(180px, 1fr) 70px 200px;
  }
}

@media (max-width: 980px) {
  .ch-app {
    width: min(100% - 20px, 1760px);
    padding-top: 10px;
  }

  .ch-topbar {
    grid-template-columns: 1fr;
  }

  .ch-browser-tabs {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .ch-browser-tabs button {
    width: 128px;
    flex: 0 0 128px;
  }

  .ch-main-nav {
    grid-column: auto;
  }

  .ch-page-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .ch-stat-row {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ch-progress-panel {
    grid-template-columns: 1fr 72px;
  }

  .ch-progress-panel > div:first-child,
  .ch-progress-legend {
    grid-column: 1 / -1;
  }

  .ch-progress-legend {
    justify-content: flex-start;
  }

  .ch-monitor-grid {
    grid-template-columns: 1fr;
  }

  .ch-worker-panel {
    position: static;
  }

  .ch-worker-list {
    max-height: 330px;
  }

  .ch-run-meta,
  .ch-settings-grid,
  .ch-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .ch-topbar,
  .ch-suitebar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .ch-brand {
    font-size: 20px;
  }

  .ch-browser-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .ch-browser-tabs button {
    width: 100%;
    min-width: 0;
    flex: none;
  }

  .ch-main-nav {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    overflow-x: auto;
  }

  .ch-main-nav a {
    font-size: 12px;
  }

  .ch-suitebar {
    min-height: 54px;
  }

  .ch-suitebar nav {
    gap: 20px;
    overflow-x: auto;
  }

  .ch-suitebar > span {
    display: none;
  }

  .ch-main {
    padding-top: 24px;
  }

  .ch-page-intro h1 {
    font-size: 25px;
  }

  .ch-stat-row {
    grid-template-columns: 1fr;
  }

  .ch-stat {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .ch-stat strong {
    margin: 0;
  }

  .ch-panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 12px;
  }

  .ch-panel-head h2 {
    font-size: 17px;
  }

  .ch-table-wrap {
    padding: 10px;
  }

  .ch-form-grid,
  .ch-estimate,
  .ch-run-meta,
  .ch-settings-grid,
  .ch-health-grid {
    grid-template-columns: 1fr;
  }

  .ch-estimate div {
    border-right: 0;
    border-bottom: 1px solid var(--ch-line);
  }

  .ch-estimate div:last-child {
    border-bottom: 0;
  }

  .ch-form-span,
  .ch-settings-wide {
    grid-column: auto;
  }

  .ch-monitor-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .ch-run-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ch-run-toolbar form {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .ch-run-toolbar label {
    grid-column: 1 / -1;
  }

  .ch-run-toolbar select {
    width: 100%;
  }

  .ch-progress-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ch-progress-panel > div:first-child,
  .ch-progress-legend {
    grid-column: auto;
  }

  .ch-progress-percent {
    font-size: 22px;
  }

  .ch-settings-band > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .ch-settings-state {
    justify-items: start;
  }

  .ch-settings-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .ch-footer {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
  }

  .ch-footer span:last-child {
    text-align: left;
  }
}
