:root {
  color-scheme: light dark;
  --bg: light-dark(#f5f6f8, #13171e);
  --surface: light-dark(#fff, #1d242e);
  --text: light-dark(#192633, #e5eaf2);
  --muted: light-dark(#5a6978, #aab7c7);
  --line: light-dark(#dfe5eb, #34404f);
  --accent: light-dark(#2359cf, #9fbfff);
  --button: light-dark(#2359cf, #99b9fc);
  --button-text: light-dark(#fff, #152646);
  --green: light-dark(#167050, #85d3b4);
  --red: light-dark(#b43e3e, #ffa5a5);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.55 system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
}
header {
  padding: 20px max(24px, calc((100vw - 1100px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  gap: 20px;
  flex-wrap: wrap;
}
.brand {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.7px;
  text-decoration: none;
  color: var(--text);
}
.brand span {
  font-size: 15px;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--muted);
}
#connection {
  color: var(--muted);
  font-size: 13px;
}
main {
  max-width: 1148px;
  margin: auto;
  padding: 36px 24px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--accent);
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin: 6px 0;
}
h2 {
  font-size: 18px;
  font-weight: 650;
  margin: 0;
}
p {
  color: var(--muted);
  margin: 6px 0;
}
.tag {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
}
section {
  margin-bottom: 28px;
}
.launch {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.launch > div {
  max-width: 780px;
}
form {
  margin-top: 20px;
}
form label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 600;
}
.form-row {
  display: flex;
  gap: 12px;
}
select,
button {
  font: inherit;
  min-height: 44px;
  border-radius: 7px;
}
select {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}
button {
  padding: 10px 18px;
  border: 1px solid transparent;
  background: var(--button);
  color: var(--button-text);
  font-weight: 600;
  cursor: pointer;
}
button span {
  margin-left: 20px;
}
.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
  padding: 7px 12px;
}
.danger {
  color: var(--red);
}
button:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:hover:not(:disabled) {
  filter: brightness(0.94);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.hint {
  font-size: 13px;
  margin-top: 12px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.active-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}
.status {
  display: inline-block;
  padding: 3px 9px;
  background: var(--bg);
  border-radius: 5px;
  font-size: 12px;
  color: var(--muted);
}
.status.passed {
  color: var(--green);
}
.status.failed,
.status.interrupted {
  color: var(--red);
}
.status.running,
.status.starting,
.status.stopping {
  color: var(--accent);
}
.run-head {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.meta {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-top: 6px;
}
.counts {
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}
progress {
  width: 100%;
  height: 8px;
  margin-top: 12px;
  accent-color: var(--accent);
}
.history-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 16px;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  align-items: center;
}
.history-row:first-child {
  border-radius: 9px 9px 0 0;
}
.history-row:last-child {
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 9px 9px;
}
.history-row:only-child {
  border-radius: 9px;
}
.history-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
a {
  color: var(--accent);
}
.pagination {
  display: flex;
  gap: 8px;
}
.check {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
}
.logs pre {
  height: 320px;
  overflow: auto;
  background: light-dark(#17222e, #0e1218);
  color: #e0e7ef;
  border-radius: 9px;
  padding: 20px;
  font:
    12px/1.7 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0;
}
#log-description {
  font-size: 13px;
}
#error {
  background: var(--surface);
  border-left: 4px solid var(--red);
  padding: 14px;
  color: var(--red);
  margin-bottom: 20px;
}
footer {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 30px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 650px) {
  main {
    padding: 24px 16px;
  }
  header {
    padding: 16px;
  }
  .intro {
    align-items: flex-start;
  }
  .tag {
    display: none;
  }
  h1 {
    font-size: 27px;
  }
  .launch {
    padding: 18px;
  }
  .form-row {
    flex-direction: column;
  }
  .history-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .history-actions {
    justify-content: flex-start;
  }
  .logs pre {
    height: 280px;
  }
  .brand span {
    display: none;
  }
}
