/* ObservAI Anomaly Test Suite — brand tokens (copied; not imported from SPA) */

:root,
[data-theme="dark"] {
  --background: 222 32% 7%;
  --foreground: 220 25% 96%;
  --card: 225 28% 12%;
  --card-foreground: 220 25% 96%;
  --primary: 266 52% 62%;
  --primary-foreground: 220 28% 97%;
  --secondary: 225 16% 18%;
  --secondary-foreground: 220 28% 97%;
  --muted: 223 16% 16%;
  --muted-foreground: 220 14% 72%;
  --accent: 45 62% 54%;
  --accent-foreground: 222 32% 7%;
  --destructive: 356 70% 52%;
  --destructive-foreground: 220 28% 97%;
  --success: 146 50% 45%;
  --success-foreground: 220 28% 97%;
  --warning: 38 85% 55%;
  --warning-foreground: 222 32% 7%;
  --border: 225 12% 22%;
  --input: 225 14% 20%;
  --ring: 266 52% 62%;
  --radius: 0.75rem;
  --logo-bone: #ebe4f4;
  --logo-violet: #b288f9;
  --suite-tp: var(--success);
  --suite-tn: var(--success);
  --suite-fp: var(--destructive);
  --suite-fn: var(--destructive);
  --suite-timeout: var(--warning);
  --suite-excluded: var(--muted-foreground);
  /* Outcome chip text on muted surfaces (AA normal text) */
  --suite-outcome-fp: 356 70% 66%;
  --suite-outcome-timeout: 38 85% 55%;
}

[data-theme="light"] {
  --background: 220 33% 98%;
  --foreground: 222 32% 12%;
  --card: 0 0% 100%;
  --card-foreground: 222 32% 12%;
  --primary: 266 52% 48%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 20% 94%;
  --secondary-foreground: 222 32% 16%;
  --muted: 220 16% 94%;
  --muted-foreground: 220 10% 38%;
  --accent: 45 62% 42%;
  --accent-foreground: 222 32% 10%;
  --destructive: 356 70% 46%;
  --destructive-foreground: 0 0% 100%;
  --success: 146 50% 36%;
  --success-foreground: 0 0% 100%;
  --warning: 38 85% 42%;
  --warning-foreground: 222 32% 10%;
  --border: 220 14% 86%;
  --input: 220 16% 96%;
  --ring: 266 52% 48%;
  --logo-bone: #2a2438;
  --logo-violet: #7c5cbf;
  --suite-outcome-fp: 356 70% 42%;
  --suite-outcome-timeout: 38 85% 28%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  background-image:
    radial-gradient(900px 600px at 20% 80%, hsl(var(--primary) / 0.1) 0%, transparent 60%),
    radial-gradient(600px 400px at 80% 20%, hsl(var(--accent) / 0.08) 0%, transparent 65%),
    radial-gradient(800px 500px at 50% 0%, hsl(220 20% 10% / 0.35) 0%, transparent 70%);
}

[data-theme="light"] body {
  background-image:
    radial-gradient(900px 600px at 20% 80%, hsl(var(--primary) / 0.08) 0%, transparent 60%),
    radial-gradient(600px 400px at 80% 20%, hsl(var(--accent) / 0.06) 0%, transparent 65%),
    radial-gradient(800px 500px at 50% 0%, hsl(220 20% 90% / 0.45) 0%, transparent 70%);
}

h1,
h2,
h3,
.suite-heading {
  font-family: "Playfair Display", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  letter-spacing: 0.2px;
  font-weight: 600;
}

.suite-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
  box-sizing: border-box;
}

.suite-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  max-width: 100%;
}

.suite-brand-mark {
  height: 2.25rem;
  width: auto;
  max-width: min(220px, 55vw);
}

.suite-brand-mark svg {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
}

.suite-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.suite-brand-title {
  margin: 0;
  font-size: 1.05rem;
}

.suite-brand-sub {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
}

.suite-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.suite-header-actions #theme-toggle {
  margin-left: auto;
}

.suite-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.suite-panel {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.suite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.6rem 1.1rem;
  border-radius: calc(var(--radius) - 0.15rem);
  border: 1px solid transparent;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  background: hsl(var(--secondary));
}

.suite-btn:focus-visible,
.suite-slider:focus-visible,
.suite-brand:focus-visible,
.suite-form-row input:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.suite-btn:disabled,
.suite-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.suite-btn-primary {
  /* Both gradient stops ≥4.5:1 vs primary-foreground (dark + light themes) */
  background: linear-gradient(135deg, hsl(266 55% 48%), hsl(266 55% 40%));
  color: hsl(var(--primary-foreground));
}

[data-theme="light"] .suite-btn-primary {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(266 55% 40%));
}

.suite-btn-danger {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.suite-btn-ghost {
  background: transparent;
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

.suite-lab h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.suite-lab-lead {
  margin: 0 0 1rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
}

.suite-lab-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.suite-lab-controls > * {
  flex: 1 1 12rem;
}

.suite-mix {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 12rem;
}

.suite-mix-ends {
  display: flex;
  justify-content: space-between;
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
}

.suite-slider {
  width: 100%;
  height: 2.75rem;
  accent-color: hsl(var(--primary));
  background: transparent;
}

.suite-status {
  margin: 0;
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
}

.suite-status[data-state="streaming"] {
  color: hsl(var(--success));
}

.suite-note {
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
}

.suite-helper {
  margin: 0.75rem 0 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
}

.suite-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.suite-badge.ad {
  border-left: 3px solid hsl(var(--primary));
}

.suite-badge.pipe {
  border-left: 3px solid hsl(var(--accent));
}

.suite-table-wrap {
  overflow-x: auto;
}

.suite-table {
  width: 100%;
  border-collapse: collapse;
  background: hsl(var(--card));
}

.suite-table th,
.suite-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid hsl(var(--border));
  font-size: 0.9rem;
}

.suite-table th {
  color: hsl(var(--muted-foreground));
  font-weight: 600;
}

.suite-outcome {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: hsl(var(--muted));
}

.suite-outcome.TP,
.suite-outcome.TN {
  background: hsl(var(--suite-tp) / 0.18);
  color: hsl(var(--suite-tp));
}

.suite-outcome.FP,
.suite-outcome.FN {
  background: hsl(var(--suite-fp) / 0.18);
  color: hsl(var(--suite-outcome-fp));
}

.suite-outcome.TIMEOUT {
  background: hsl(var(--suite-timeout) / 0.2);
  color: hsl(var(--suite-outcome-timeout));
}

.suite-outcome.excluded {
  color: hsl(var(--suite-excluded));
}

.suite-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.suite-summary-cell {
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 0.2rem);
  padding: 0.75rem;
  text-align: center;
}

.suite-summary-cell .label {
  display: block;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.25rem;
}

.suite-summary-cell .value {
  font-size: 1.25rem;
  font-weight: 700;
}

.suite-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-top: 0.75rem;
}

.suite-form-row label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
}

.suite-form-row input {
  min-height: 2.5rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.4rem;
  background: hsl(var(--input));
  color: hsl(var(--foreground));
}

h2 {
  font-size: 1.15rem;
  margin-top: 0;
}

@media (max-width: 767px) {
  .suite-lab-controls {
    flex-direction: column;
  }

  .suite-lab-controls > * {
    flex: 1 1 auto;
    width: 100%;
  }

  .suite-btn,
  .suite-slider {
    min-height: 44px;
  }

  .suite-header {
    padding: 1rem;
  }
}
