:root {
  color-scheme: light dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: Canvas;
  color: CanvasText;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 28px 0;
}

main {
  width: min(1040px, calc(100vw - 32px));
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.card {
  border: 1px solid color-mix(in srgb, CanvasText 18%, transparent);
  border-radius: 20px;
  padding: 28px;
  background: color-mix(in srgb, Canvas 92%, CanvasText 8%);
  box-shadow: 0 24px 80px color-mix(in srgb, CanvasText 12%, transparent);
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  opacity: 0.7;
}

h1,
h2 {
  margin: 0 0 12px;
  line-height: 1.05;
}

h1 {
  font-size: clamp(36px, 7vw, 72px);
}

p {
  max-width: 720px;
  line-height: 1.6;
  opacity: 0.82;
}

label {
  display: block;
  margin: 18px 0 8px;
  font-weight: 800;
}

select,
input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid color-mix(in srgb, CanvasText 18%, transparent);
  border-radius: 14px;
  padding: 12px 14px;
  background: Canvas;
  color: CanvasText;
  font: inherit;
}

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  margin-top: 18px;
  margin-right: 10px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: CanvasText;
  color: Canvas;
}

#streamButton {
  border: 1px solid CanvasText;
  background: Canvas;
  color: CanvasText;
}

.secondary-button {
  margin-top: 0;
  border: 1px solid CanvasText;
  background: Canvas;
  color: CanvasText;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.section-header h2 {
  margin-bottom: 0;
}

.status {
  margin-top: 18px;
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  background: color-mix(in srgb, CanvasText 10%, transparent);
}

.status.pass {
  background: color-mix(in srgb, #008a45 30%, transparent);
}

.status.fail {
  background: color-mix(in srgb, #c21f39 30%, transparent);
}

.metrics {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.metrics div {
  border: 1px solid color-mix(in srgb, CanvasText 14%, transparent);
  border-radius: 16px;
  padding: 16px;
  background: color-mix(in srgb, Canvas 96%, CanvasText 4%);
}

dt {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
}

dd {
  margin: 0;
  font: 700 24px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

#isolationMetric,
#sabMetric,
#workerMetric,
#modeMetric {
  font-size: 16px;
}

.run-log {
  height: min(320px, 45vh);
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, CanvasText 14%, transparent);
  border-radius: 16px;
  padding: 14px;
  background: color-mix(in srgb, Canvas 96%, CanvasText 4%);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.stream-document {
  height: min(420px, 55vh);
  overflow: auto;
  border: 1px solid color-mix(in srgb, CanvasText 14%, transparent);
  border-radius: 16px;
  padding: 14px;
  background: color-mix(in srgb, Canvas 96%, CanvasText 4%);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.yaml-key {
  color: #4f8cff;
  font-weight: 700;
}

.yaml-punctuation,
.yaml-marker {
  color: #b66cff;
  font-weight: 700;
}

.yaml-comment {
  color: #708090;
  font-style: italic;
}

.yaml-string {
  color: #138a36;
}

.yaml-number {
  color: #b36b00;
}

.yaml-literal {
  color: #c21f39;
  font-weight: 700;
}

.log-entry {
  padding: 6px 0;
  border-bottom: 1px solid color-mix(in srgb, CanvasText 8%, transparent);
  overflow-wrap: anywhere;
}

.log-entry:last-child {
  border-bottom: 0;
}

.log-entry.muted {
  opacity: 0.65;
}

.log-entry.error {
  color: #c21f39;
  font-weight: 700;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
