/**
 * EdgeThink Design System
 * Quant terminal palette • Restrained typography • 8px spacing • 12-col grid
 */

:root {
  /* --- Color: Quant Terminal Palette --- */
  --color-bg: #121417;
  --color-surface: #1A1E23;
  --color-surface-hover: #22272E;

  --color-text: #E7EBEF;
  --color-text-secondary: #9AA3AD;
  --color-text-tertiary: #6E7681;

  --color-accent: #2F81F7;

  --color-positive: #3FB950;
  --color-negative: #F85149;
  --color-neutral: #8B949E;

  --color-border: #30363D;
  --color-border-subtle: #21262D;

  /* --- Typography --- */
  --font-display: "Playfair Display", Georgia, serif;
  --font-ui: "Fira Code", ui-monospace, "Cascadia Code", monospace;

  --text-size-xs: 0.75rem;    /* 12px */
  --text-size-sm: 0.8125rem; /* 13px */
  --text-size-base: 0.875rem;/* 14px */
  --text-size-md: 1rem;      /* 16px */
  --text-size-lg: 1.125rem;  /* 18px */
  --text-size-xl: 1.25rem;   /* 20px */
  --text-size-2xl: 1.5rem;  /* 24px */
  --text-size-hero: clamp(1.5rem, 3.5vw, 2rem);

  --line-height-tight: 1.25;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.6;

  /* --- Spacing (base 8px) --- */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;

  /* --- Grid --- */
  --grid-max: 1200px;
  --grid-margin: 64px;
  --grid-gap: 24px;
  --grid-cols: 12;

  /* --- Interaction --- */
  --transition-fast: 100ms ease;
  --transition-base: 120ms ease;
  --outline-focus: 1px solid var(--color-accent);
  --outline-offset: 2px;

  /* --- Radii (restrained) --- */
  --radius-sm: 2px;
  --radius-base: 4px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: var(--text-size-base);
  font-weight: 400;
  line-height: var(--line-height-base);
}

/* --- Focus (keyboard / a11y) --- */
:focus {
  outline: none;
}

:focus-visible {
  outline: var(--outline-focus);
  outline-offset: var(--outline-offset);
}

/* --- Links: subtle hover only --- */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-text);
  filter: brightness(1.08);
}

a:focus-visible {
  outline: var(--outline-focus);
  outline-offset: var(--outline-offset);
}

/* --- Display font (Playfair) — section titles, key statements --- */
.font-display {
  font-family: var(--font-display);
  font-weight: 400;
}

/* --- UI font (Fira Code) — body, lists, labels, data --- */
.font-ui {
  font-family: var(--font-ui);
}

/* --- Layout container: 12-col grid, max 1200px, 64px margins --- */
.layout {
  width: 100%;
  max-width: var(--grid-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--grid-margin);
  padding-right: var(--grid-margin);
}

/* --- Panel (dashboard-style surface) --- */
.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  padding: var(--space-4);
  min-height: 0;
}

.panel:hover {
  background: var(--color-surface-hover);
  transition: background var(--transition-base);
}
