:root {
  color-scheme: light;
  --bg: #f5f7f9;
  --panel: #ffffff;
  --ink: #18212f;
  --muted: #657286;
  --line: #dce2ea;
  --blue: #2563eb;
  --green: #16845b;
  --amber: #b46a00;
  --red: #c5362f;
  --violet: #6d4aff;
  --shadow: 0 18px 45px rgba(21, 31, 46, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: 100%;
  min-height: 100vh;
  padding: 24px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 18px;
  max-width: 1500px;
  margin: 0 auto;
}

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

.controls {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.15;
}

.brand p,
.topbar p,
.empty-state p,
.note,
small {
  color: var(--muted);
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #2a3444;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd4df;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.secret-row,
.model-row,
.actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

button {
  min-height: 42px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  filter: brightness(0.96);
}

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

.secondary,
.icon-button {
  background: #fff;
  color: var(--ink);
  border-color: #cbd4df;
}

.icon-button {
  width: 48px;
  padding: 0;
}

.note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  font-size: 13px;
  line-height: 1.45;
}

.main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 86px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topbar h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.scorebox {
  display: grid;
  place-items: center;
  min-width: 96px;
  min-height: 64px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.scorebox span {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.status {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f6;
  color: #405067;
  padding: 11px 14px;
}

.status.running {
  background: #edf4ff;
  color: #1d4ed8;
  border-color: #bdd4ff;
}

.status.error {
  background: #fff0ef;
  color: var(--red);
  border-color: #ffc9c4;
}

.status.done {
  background: #eefaf4;
  color: var(--green);
  border-color: #bce8d3;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metrics div {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.metrics span {
  display: block;
  font-size: 24px;
  font-weight: 800;
}

.model-panel {
  padding: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h3 {
  font-size: 17px;
}

.section-head span {
  color: var(--muted);
  font-weight: 700;
}

.models {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-chip {
  border: 1px solid #ccd7e5;
  border-radius: 7px;
  background: #f8fafc;
  color: #223047;
  padding: 7px 10px;
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.results {
  display: grid;
  gap: 14px;
}

.results.empty {
  min-height: 360px;
  border: 1px dashed #cbd4df;
  border-radius: 8px;
  place-items: center;
  background: rgba(255, 255, 255, 0.55);
}

.empty-state {
  text-align: center;
  display: grid;
  gap: 8px;
  padding: 20px;
}

.group {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.group-title h3 {
  font-size: 18px;
}

.rows {
  display: grid;
}

.row {
  display: grid;
  grid-template-columns: 220px 110px minmax(180px, 1.2fr) minmax(220px, 1.5fr);
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid #edf1f5;
  align-items: start;
}

.row:last-child {
  border-bottom: 0;
}

.probe-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #3f4d63;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  height: 28px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
}

.pass {
  background: #e8f7ef;
  color: var(--green);
}

.warn {
  background: #fff4df;
  color: var(--amber);
}

.fail {
  background: #ffe9e7;
  color: var(--red);
}

.skip,
.info {
  background: #eef2f7;
  color: #506074;
}

.summary {
  font-weight: 700;
  line-height: 1.4;
}

.evidence {
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hidden {
  display: none;
}

@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .controls {
    position: static;
  }

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

@media (max-width: 640px) {
  .shell {
    padding: 12px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .scorebox {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 14px 0 0;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .secret-row,
  .model-row,
  .actions {
    grid-template-columns: 1fr;
  }

  .icon-button {
    width: 100%;
  }
}
