/* Facet Performance Benchmarking - Shared Design System */

@font-face {
  font-family: 'Iosevka FTL';
  src: url('/fonts/IosevkaFtl-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Iosevka FTL';
  src: url('/fonts/IosevkaFtl-Bold.ttf') format('truetype');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --mono: 'Iosevka FTL', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Surfaces */
  --bg:     light-dark(#fbfbfc, #0b0e14);
  --panel:  light-dark(#ffffff, #0f1420);
  --panel2: light-dark(#f6f7f9, #0c111b);

  /* Text */
  --text:  light-dark(#0e1116, #e7eaf0);
  --muted: light-dark(#656d76, #7d8590);
  --faint: light-dark(#66738a, #77839a);

  /* Lines */
  --border:  light-dark(rgba(0,0,0,0.08), rgba(255,255,255,0.08));
  --border2: light-dark(rgba(0,0,0,0.14), rgba(255,255,255,0.14));

  /* Semantic colors - Design System */
  --accent: light-dark(#2457f5, #7aa2f7);
  --good:   light-dark(#1a7f37, #3fb950);  /* Improvement / Faster */
  --bad:    light-dark(#cf222e, #f85149);  /* Regression / Slower */
  --neutral: var(--muted);                 /* No change / Reference */
  --warn:   light-dark(#9a6700, #f2cc60);

  /* Chart colors */
  --chart:  light-dark(#223047, #a3b2cc);
  --chart-fade: light-dark(rgba(34,48,71,0.25), rgba(163,178,204,0.20));

  /* Spacing system */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 32px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  text-rendering: geometricPrecision;
}

/* Typography hierarchy */
h1 {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 18px;
  font-weight: 650;
}

h3 {
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}

a:hover {
  opacity: 0.8;
}

/* Speed indicators with text labels */
.speedup, .neutral, .slowdown {
  font-weight: 650;
}

.speedup {
  color: var(--good);
}

.neutral {
  color: var(--neutral);
}

.slowdown {
  color: var(--bad);
}

.speed-label {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  margin-left: 6px;
}

/* Error presentation */
tr.errored {
  opacity: 0.5;
}

tr.errored td:first-child {
  border-left: 3px solid var(--bad);
  padding-left: 9px;
}

td.error {
  color: var(--bad);
  font-style: italic;
}

/* Tier indicators for JIT targets */
.tier-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  margin-left: 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 650;
  background: light-dark(rgba(0,0,0,0.04), rgba(255,255,255,0.06));
  transition: background 0.15s;
}

.tier-indicator:hover {
  background: light-dark(rgba(0,0,0,0.06), rgba(255,255,255,0.08));
}

/* Visualization mode selector */
.viz-mode-selector {
  display: flex;
  gap: var(--s2);
  margin-bottom: var(--s4);
}

.viz-mode-btn {
  font-family: var(--mono);
  font-size: 12px;
  padding: var(--s2) var(--s3);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.viz-mode-btn:hover {
  background: var(--panel2);
  color: var(--text);
}

.viz-mode-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
