@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --background: 0 0% 0%;
  --foreground: 0 0% 98%;
  --muted: 240 5% 14%;
  --muted-foreground: 240 5% 70%;
  --popover: 240 4% 8%;
  --popover-foreground: 0 0% 98%;
  --card: 240 4% 7%;
  --card-foreground: 0 0% 98%;
  --border: 240 4% 16%;
  --input: 240 4% 16%;
  --primary: 0 0% 98%;
  --primary-foreground: 240 6% 10%;
  --secondary: 240 4% 14%;
  --secondary-foreground: 0 0% 98%;
  --accent: 240 4% 14%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;
  --ring: 240 5% 80%;
  --target: 217.2 91.2% 59.9%;
  --decoy: 0 84.2% 60.2%;
  --ion-a: 24 95% 53%;
  --ion-b: 217.2 91.2% 59.9%;
  --ion-c: 142 70% 45%;
  --ion-x: 276 71% 66%;
  --ion-y: 0 84.2% 60.2%;
  --ion-z: 173 58% 39%;
  --radius: 0.625rem;
}

[data-theme='dark'] {
  --background: 0 0% 0%;
  --foreground: 0 0% 98%;
  --muted: 240 5% 14%;
  --muted-foreground: 240 5% 70%;
  --popover: 240 4% 8%;
  --popover-foreground: 0 0% 98%;
  --card: 240 4% 7%;
  --card-foreground: 0 0% 98%;
  --border: 240 4% 16%;
  --input: 240 4% 16%;
  --primary: 0 0% 98%;
  --primary-foreground: 240 6% 10%;
  --secondary: 240 4% 14%;
  --secondary-foreground: 0 0% 98%;
  --accent: 240 4% 14%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;
  --ring: 240 5% 80%;
  --target: 217.2 91.2% 59.9%;
  --decoy: 0 84.2% 60.2%;
  --ion-a: 24 95% 53%;
  --ion-b: 217.2 91.2% 59.9%;
  --ion-c: 142 70% 45%;
  --ion-x: 276 71% 66%;
  --ion-y: 0 84.2% 60.2%;
  --ion-z: 173 58% 39%;
  --radius: 0.625rem;
}

[data-theme='light'] {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --muted: 210 40% 96.2%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --primary: 222.2 47.4% 11.2%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.2%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --accent: 213.3 96.5% 88%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 72.2% 50.6%;
  --destructive-foreground: 210 40% 98%;
  --ring: 215 20.2% 65.1%;
  --target: 217.2 91.2% 45.3%;
  --decoy: 0 84.2% 60.2%;
  --ion-a: 24 95% 53%;
  --ion-b: 217 91% 45%;
  --ion-c: 142 70% 35%;
  --ion-x: 276 71% 52%;
  --ion-y: 0 72% 46%;
  --ion-z: 173 58% 28%;
  --radius: 0.625rem;
}

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

::selection {
  background-color: hsl(var(--primary) / 0.2);
  color: hsl(var(--primary-foreground));
}

html,
body {
  border-color: hsl(var(--border));
  outline-color: hsl(var(--ring));
}

body {
  margin: 0;
  min-height: 100vh;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family:
    'Inter',
    'Segoe UI',
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#status {
  color: hsl(var(--muted-foreground));
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  line-height: 1.25;
}

p {
  margin: 0;
}

.app-shell {
  max-width: 78rem;
}

.shadcn-panel {
  border-radius: calc(var(--radius) + 0.05rem);
  border-color: hsl(var(--border));
  background: hsl(var(--card));
  box-shadow:
    0 0 0 1px hsl(var(--border) / 0.45),
    0 8px 24px hsl(var(--background) / 0.8);
}

.shadcn-accordion summary {
  border-bottom: 1px solid transparent;
  list-style: none;
  cursor: pointer;
  min-height: 2.5rem;
}

.shadcn-accordion summary::-webkit-details-marker {
  display: none;
}

.shadcn-accordion summary::marker {
  display: none;
  content: '';
}

.shadcn-accordion-trigger {
  position: relative;
}

.shadcn-accordion[open] .accordion-chevron {
  transform: rotate(45deg);
}

.accordion-chevron {
  width: 0.6rem;
  height: 0.6rem;
  border-right: 1.5px solid hsl(var(--muted-foreground));
  border-bottom: 1.5px solid hsl(var(--muted-foreground));
  transform: rotate(-45deg);
  transition: transform 140ms ease;
}

.shadcn-result-card {
  border-left-width: 4px;
  border-left-color: hsl(var(--primary) / 0.55);
  background:
    linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--card) / 0.9) 100%);
}

.shadcn-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
}

.shadcn-table-head {
  font-weight: 600;
  letter-spacing: 0.01em;
  background: hsl(var(--secondary));
  border-bottom: 1px solid hsl(var(--border));
}

.shadcn-table tbody td {
  color: hsl(var(--foreground));
}

.shadcn-table-row {
  border-bottom: 1px solid hsl(var(--border));
  transition:
    background-color 120ms ease,
    box-shadow 120ms ease;
}

.shadcn-table-row:hover {
  background: hsl(var(--accent) / 0.24);
}

.shadcn-table-row-active {
  background: hsl(var(--secondary) / 0.4) !important;
  box-shadow: inset 3px 0 0 hsl(var(--primary));
}

.shadcn-control,
.shadcn-input,
.shadcn-select,
.shadcn-textarea {
  border-color: hsl(var(--input));
  background: hsl(var(--background));
  border-radius: calc(var(--radius) - 2px);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    background-color 120ms ease;
}

.shadcn-input:focus-visible,
.shadcn-select:focus-visible,
.shadcn-textarea:focus-visible {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.22);
  outline: none;
}

.shadcn-range {
  width: 100%;
  height: 0.4rem;
  appearance: none;
  background: hsl(var(--muted));
  border-radius: 9999px;
  accent-color: hsl(var(--primary));
  cursor: pointer;
}

.shadcn-range:focus-visible {
  outline: none;
}

.shadcn-range::-webkit-slider-thumb {
  appearance: none;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  border: 2px solid hsl(var(--background));
  background: hsl(var(--primary));
}

.shadcn-range::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  border: 2px solid hsl(var(--background));
  background: hsl(var(--primary));
  box-shadow: 0 0 0 1px hsl(var(--ring) / 0.2);
}

.shadcn-checkbox-group label,
.shadcn-checkbox {
  cursor: pointer;
}

.spectrum-svg {
  width: 100%;
  min-height: 340px;
  height: auto;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid hsl(var(--border));
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--background)) 100%);
}

.baseline {
  stroke: hsl(var(--muted));
  stroke-width: 1;
}

.peak-stick {
  stroke: hsl(var(--foreground));
  stroke-width: 2;
}

.axis-label {
  fill: hsl(var(--muted-foreground));
  font-size: 11px;
}

.axis-tick {
  stroke: hsl(var(--border));
  stroke-width: 1;
}

.ion-annotation-group {
  pointer-events: none;
}

.ion-a-line {
  stroke: hsl(var(--ion-a));
  stroke-width: 2;
}

.ion-b-line {
  stroke: hsl(var(--ion-b));
  stroke-width: 2;
}

.ion-c-line {
  stroke: hsl(var(--ion-c));
  stroke-width: 2;
}

.ion-x-line {
  stroke: hsl(var(--ion-x));
  stroke-width: 2;
}

.ion-y-line {
  stroke: hsl(var(--ion-y));
  stroke-width: 2;
}

.ion-z-line {
  stroke: hsl(var(--ion-z));
  stroke-width: 2;
}

.ion-a-label,
.ion-b-label,
.ion-c-label,
.ion-x-label,
.ion-y-label,
.ion-z-label {
  font-size: 10px;
}

.ion-a-label {
  fill: hsl(var(--ion-a));
}

.ion-b-label {
  fill: hsl(var(--ion-b));
}

.ion-c-label {
  fill: hsl(var(--ion-c));
}

.ion-x-label {
  fill: hsl(var(--ion-x));
}

.ion-y-label {
  fill: hsl(var(--ion-y));
}

.ion-z-label {
  fill: hsl(var(--ion-z));
}

.inline-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid hsl(var(--muted));
  border-top-color: hsl(var(--primary));
  border-radius: 9999px;
  display: inline-block;
  animation: spin 0.75s linear infinite;
  margin-right: 0.45rem;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

code {
  background: hsl(var(--muted));
  padding: 0.15rem 0.35rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    'Liberation Mono',
    'Courier New',
    monospace;
}
