/* ═══════════════════════════════════════════════════════════════════════════════
   HORIZON — Design System
   An editorial, terminal-grade interface for AI-native sales operations.
   Built on three voices: ink, instrument, signal.
   ═══════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;450;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Foundation Tokens ─────────────────────────────────────────────────────── */
:root {
  /* INK — the substrate. Deep, warm-shifted near-black with subtle steps. */
  --ink-0: #08080a;          /* page floor */
  --ink-1: #0c0c0f;          /* canvas */
  --ink-2: #111114;          /* panel base */
  --ink-3: #16161a;          /* panel raised */
  --ink-4: #1c1c21;          /* surface elevated */
  --ink-5: #232329;          /* surface highest */
  --ink-6: #2c2c33;          /* hover/active wash */
  --ink-popover: #18181c;
  --ink-overlay: rgba(8, 8, 10, 0.78);

  /* PAPER — text & marks. Warm, slightly creamy white scale. */
  --paper-1: #f1f0ec;        /* primary text — slight warm shift */
  --paper-2: #b8b6ae;        /* body text */
  --paper-3: #7a7872;        /* secondary */
  --paper-4: #54524d;        /* tertiary / hint */
  --paper-5: #3a3935;        /* faintest */

  /* HAIR — borders & dividers. Always 1px. Always subtle. */
  --hair-1: rgba(255, 250, 235, 0.04);
  --hair-2: rgba(255, 250, 235, 0.07);
  --hair-3: rgba(255, 250, 235, 0.11);
  --hair-4: rgba(255, 250, 235, 0.18);

  /* SIGNAL — the single confident accent. Electric lime / chartreuse. */
  --signal: #c5f43d;
  --signal-bright: #d6ff52;
  --signal-soft: rgba(197, 244, 61, 0.16);
  --signal-wash: rgba(197, 244, 61, 0.07);
  --signal-glow: rgba(197, 244, 61, 0.32);
  --signal-ink: #1a2400;     /* text on signal background */

  /* WARMTH — secondary accent for contrast. Honey amber. */
  --warmth: #f5b94a;
  --warmth-soft: rgba(245, 185, 74, 0.12);
  --warmth-wash: rgba(245, 185, 74, 0.06);

  /* SEMANTIC — sage/rose/sky/sand for dataviz neutrality */
  --good: #6cd28b;
  --good-soft: rgba(108, 210, 139, 0.12);
  --good-wash: rgba(108, 210, 139, 0.06);

  --warn: #f5b94a;
  --warn-soft: rgba(245, 185, 74, 0.12);
  --warn-wash: rgba(245, 185, 74, 0.06);

  --bad: #f08a7c;
  --bad-soft: rgba(240, 138, 124, 0.12);
  --bad-wash: rgba(240, 138, 124, 0.06);

  --info: #88a8e8;
  --info-soft: rgba(136, 168, 232, 0.12);
  --info-wash: rgba(136, 168, 232, 0.06);

  --plum: #c198e8;
  --plum-soft: rgba(193, 152, 232, 0.12);

  /* Spatial — 4px base, generous editorial rhythm */
  --s-1: 0.25rem;   /*  4px */
  --s-2: 0.5rem;    /*  8px */
  --s-3: 0.75rem;   /* 12px */
  --s-4: 1rem;      /* 16px */
  --s-5: 1.25rem;   /* 20px */
  --s-6: 1.5rem;    /* 24px */
  --s-8: 2rem;      /* 32px */
  --s-10: 2.5rem;   /* 40px */
  --s-12: 3rem;     /* 48px */
  --s-16: 4rem;     /* 64px */
  --s-20: 5rem;     /* 80px */
  --s-24: 6rem;     /* 96px */
  --s-32: 8rem;     /* 128px */

  /* Radius — restrained, intentional */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-xl: 14px;
  --r-2xl: 18px;
  --r-3xl: 24px;
  --r-pill: 999px;

  /* Elevation — layered, atmospheric */
  --lift-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --lift-2: 0 4px 12px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.2);
  --lift-3: 0 10px 28px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
  --lift-4: 0 24px 56px rgba(0, 0, 0, 0.55), 0 6px 16px rgba(0, 0, 0, 0.3);

  /* Motion — physical, deliberate */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 140ms;
  --t-base: 220ms;
  --t-slow: 380ms;
  --t-slower: 600ms;

  /* Layout */
  --rail-w: 64px;
  --canvas-max: 1440px;
  --reader-max: 1120px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background: var(--ink-0);
  color: var(--paper-1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings: 'cv02', 'cv11', 'ss01', 'ss03';
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Atmospheric backdrop — barely there, but sets the mood */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 8% -10%, rgba(197, 244, 61, 0.025), transparent 55%),
    radial-gradient(ellipse 60% 40% at 95% 95%, rgba(245, 185, 74, 0.015), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Scrollbar — thin, restrained ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 250, 235, 0.06);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 250, 235, 0.14); background-clip: content-box; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 250, 235, 0.08) transparent; }

/* ══════════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY — three voices
   ══════════════════════════════════════════════════════════════════════════════ */

/* Display — editorial, serif italic for luxury */
.t-display {
  font-family: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.025em;
  line-height: 0.96;
  color: var(--paper-1);
}
.t-display-xl { font-size: clamp(2.5rem, 5.5vw, 4.5rem); }
.t-display-lg { font-size: clamp(2rem, 4vw, 3.25rem); }

/* Heading — Inter, confident */
.t-h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.6875rem;        /* 27px */
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--paper-1);
}
.t-h2 {
  font-weight: 600;
  font-size: 1.0625rem;        /* 17px */
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--paper-1);
}
.t-h3 {
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  color: var(--paper-1);
}

/* Eyebrow — small caps, mono-tracked, the system's secondary voice */
.t-eyebrow {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 0.6875rem;        /* 11px */
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-3);
}
.t-eyebrow-bright { color: var(--paper-2); }

/* Body */
.t-body { color: var(--paper-2); font-size: 0.875rem; line-height: 1.55; }
.t-meta { color: var(--paper-3); font-size: 0.75rem; line-height: 1.45; }
.t-hint { color: var(--paper-4); font-size: 0.75rem; }

/* Mono — instrument voice, for data, IDs, time */
.t-mono {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-feature-settings: 'tnum', 'zero', 'ss01';
  letter-spacing: -0.015em;
  font-size: 0.8125rem;
  font-weight: 500;
}
.t-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* Headline body for h1, h2, h3 native tags */
h1 { font: inherit; }
h1, h2, h3, h4, h5, h6 { color: var(--paper-1); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════════════════
   APP SHELL — icon rail + canvas
   ══════════════════════════════════════════════════════════════════════════════ */

.shell {
  display: flex;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ── Rail (compressed icon sidebar, expands on hover) ────────────────────── */
.rail-slot {
  width: var(--rail-w);
  flex-shrink: 0;
  position: relative;
  z-index: 50;
}

.rail {
  width: var(--rail-w);
  height: 100vh;
  background: var(--ink-1);
  border-right: 1px solid var(--hair-2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: var(--s-4) 10px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  overflow: hidden;
  transition: width var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out);
}

.rail:hover {
  width: 220px;
  box-shadow: var(--lift-3);
  border-right-color: var(--hair-3);
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--s-6);
  padding: 0 2px;
  flex-shrink: 0;
  position: relative;
  text-decoration: none;
}

.rail__brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--signal);
  color: var(--signal-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  position: relative;
  flex-shrink: 0;
}

.rail__brand-mark::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--signal-glow);
  filter: blur(10px);
  opacity: 0.4;
  z-index: -1;
}

.rail__brand-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-base) var(--ease-out);
  white-space: nowrap;
  pointer-events: none;
}
.rail:hover .rail__brand-label { opacity: 1; transform: translateX(0); transition-delay: 60ms; }

.rail__brand-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--paper-1);
  letter-spacing: -0.01em;
  line-height: 1;
}
.rail__brand-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--paper-4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}

.rail__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  align-items: stretch;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.rail__nav::-webkit-scrollbar { display: none; }

.rail__divider {
  width: 24px;
  height: 1px;
  background: var(--hair-2);
  margin: var(--s-3) 8px;
  transition: width var(--t-base) var(--ease-out);
}
.rail:hover .rail__divider { width: calc(100% - 16px); }

.rail__link {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  color: var(--paper-3);
  border-radius: var(--r-md);
  position: relative;
  transition: color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
  flex-shrink: 0;
  text-decoration: none;
  overflow: hidden;
}

.rail__link > svg { flex-shrink: 0; }

.rail__link-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-base) var(--ease-out);
  pointer-events: none;
}
.rail:hover .rail__link-label { opacity: 1; transform: translateX(0); transition-delay: 80ms; }

.rail__link:hover { color: var(--paper-1); background: var(--ink-3); }

.rail__link.is-active {
  color: var(--paper-1);
  background: var(--ink-4);
}

.rail__link.is-active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--signal);
  border-radius: 0 2px 2px 0;
}

/* Tooltip on hover — disabled, labels are now inline */
.rail__link::after { display: none; }

.rail__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px;
  margin-top: var(--s-3);
  cursor: pointer;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  border-radius: var(--r-md);
  transition: background var(--t-fast) var(--ease-out);
}
.rail__user:hover { background: var(--ink-3); }

.rail__user-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--ink-4);
  border: 1px solid var(--hair-2);
  color: var(--paper-2);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  transition: border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.rail__user:hover .rail__user-avatar { border-color: var(--hair-4); color: var(--paper-1); }

.rail__user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-base) var(--ease-out);
  pointer-events: none;
  flex: 1;
}
.rail:hover .rail__user-info { opacity: 1; transform: translateX(0); transition-delay: 80ms; }

.rail__user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--paper-1);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.rail__user-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--paper-4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}

.rail__user-menu {
  position: fixed;
  bottom: 12px;
  left: calc(var(--rail-w) + 12px);
  width: 240px;
  background: var(--ink-popover);
  border: 1px solid var(--hair-3);
  border-radius: var(--r-lg);
  box-shadow: var(--lift-4);
  padding: var(--s-3);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.97);
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out), left var(--t-base) var(--ease-out);
}
.rail:hover ~ .rail__user-menu,
.rail:hover .rail__user-menu { left: calc(220px + 12px); }
.rail__user-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.rail__user-menu-head {
  padding: var(--s-3) var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--hair-2);
  margin-bottom: var(--s-2);
}

.rail__user-menu-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--paper-2);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.rail__user-menu-item:hover { background: var(--ink-4); color: var(--paper-1); }

/* ── Canvas — main content area ─────────────────────────────────────────── */
.canvas {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  margin-left: var(--rail-w);
}

/* ── Topbar — context strip with breadcrumb + tools ─────────────────────── */
.topbar {
  height: 56px;
  flex-shrink: 0;
  background: var(--ink-1);
  border-bottom: 1px solid var(--hair-2);
  display: flex;
  align-items: center;
  padding: 0 var(--s-8);
  gap: var(--s-5);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px) saturate(1.2);
  background: rgba(12, 12, 15, 0.78);
}

.topbar__crumb {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--paper-3);
  font-size: 13px;
  font-weight: 500;
}
.topbar__crumb-sep { color: var(--paper-5); }
.topbar__crumb-current { color: var(--paper-1); font-weight: 600; }

.topbar__spacer { flex: 1; }

.topbar__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--paper-1);
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-align: center;
}

.topbar__tool {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  height: 32px;
  padding: 0 var(--s-3);
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--paper-3);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.topbar__tool:hover { background: var(--ink-3); color: var(--paper-1); }
.topbar__tool kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 1px 5px;
  background: var(--ink-4);
  border: 1px solid var(--hair-2);
  border-radius: 4px;
  color: var(--paper-3);
}

.topbar__pulse {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 11px;
  color: var(--paper-3);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}
.topbar__pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good-soft);
  animation: hb 2s ease-in-out infinite;
}
@keyframes hb {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

/* ── Page — the actual screen content ────────────────────────────────────── */
.page {
  padding: var(--s-10) var(--s-8) var(--s-16);
  max-width: var(--canvas-max);
  width: 100%;
  margin: 0 auto;
}

.page--reader { max-width: var(--reader-max); }

/* Page header — editorial masthead */
.masthead {
  margin-bottom: var(--s-10);
  position: relative;
}
.masthead__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  flex-wrap: wrap;
}
.masthead__title-block {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  flex: 1;
  min-width: 0;
}
.masthead__eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
}
.masthead__title {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 0.98;
  color: var(--paper-1);
}
.masthead__sub {
  font-size: 14px;
  color: var(--paper-3);
  max-width: 56ch;
  line-height: 1.5;
}
.masthead__actions {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  flex-shrink: 0;
}
.masthead__bar {
  height: 1px;
  background: linear-gradient(90deg, var(--hair-3) 0%, transparent 100%);
  margin-top: var(--s-8);
}

/* ══════════════════════════════════════════════════════════════════════════════
   PANEL — the new card primitive
   ══════════════════════════════════════════════════════════════════════════════ */

.panel {
  background: var(--ink-2);
  border: 1px solid var(--hair-2);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease-out);
}
.panel:hover { border-color: var(--hair-3); }

.panel__head {
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--hair-2);
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: 60px;
}
.panel__head-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--paper-1);
  letter-spacing: -0.005em;
}
.panel__head-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--paper-4);
  letter-spacing: 0.03em;
}
.panel__head-actions {
  margin-left: auto;
  display: flex;
  gap: var(--s-2);
  align-items: center;
}

.panel__body { padding: var(--s-6); }
.panel__body--flush { padding: 0; }

.panel__foot {
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--hair-2);
  background: var(--ink-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

/* Panel head accent: the eyebrow tick */
.panel__tick {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--paper-4);
  flex-shrink: 0;
}
.panel__tick--signal { background: var(--signal); box-shadow: 0 0 6px var(--signal-glow); }
.panel__tick--good { background: var(--good); }
.panel__tick--warn { background: var(--warn); }
.panel__tick--bad { background: var(--bad); }
.panel__tick--info { background: var(--info); }
.panel__tick--plum { background: var(--plum); }

/* ══════════════════════════════════════════════════════════════════════════════
   METRIC — replaces the stat-card. Editorial, vertical.
   ══════════════════════════════════════════════════════════════════════════════ */

.metric {
  background: var(--ink-2);
  border: 1px solid var(--hair-2);
  border-radius: var(--r-xl);
  padding: var(--s-5) var(--s-6);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  min-height: 124px;
  transition: border-color var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.metric:hover { border-color: var(--hair-3); }

.metric__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  /* color: var(--paper-3); */
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.metric__icon {
  width: 14px;
  height: 14px;
  color: var(--paper-4);
}

.metric__value {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;             /* 32px */
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--paper-1);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
}
.metric__value-suffix {
  font-size: 1rem;
  font-weight: 500;
  color: var(--paper-4);
  letter-spacing: -0.02em;
}

.metric__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  font-size: 11px;
  color: var(--paper-3);
  font-family: 'JetBrains Mono', monospace;
  margin-top: auto;
}

.metric__delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.005em;
}
.metric__delta--up { background: var(--good-soft); color: var(--good); }
.metric__delta--down { background: var(--bad-soft); color: var(--bad); }
.metric__delta--flat { background: var(--ink-4); color: var(--paper-3); }

.metric--featured {
  background: linear-gradient(180deg, var(--ink-3) 0%, var(--ink-2) 100%);
  border-color: var(--hair-3);
}
.metric--featured .metric__value { color: var(--signal); }

.metric--clickable { cursor: pointer; }
.metric--clickable:hover { transform: translateY(-1px); border-color: var(--hair-4); }
.metric--active {
  border-color: var(--signal-soft);
  background: linear-gradient(180deg, rgba(197, 244, 61, 0.04) 0%, var(--ink-2) 100%);
}
.metric--active .metric__label { color: var(--signal); }

/* ══════════════════════════════════════════════════════════════════════════════
   MARK — badges, pills, status tags
   ══════════════════════════════════════════════════════════════════════════════ */

.mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  white-space: nowrap;
  line-height: 1.4;
  border: 1px solid;
}
.mark--good   { background: var(--good-soft);   color: var(--good);   border-color: rgba(108, 210, 139, 0.18); }
.mark--warn   { background: var(--warn-soft);   color: var(--warn);   border-color: rgba(245, 185, 74, 0.18); }
.mark--bad    { background: var(--bad-soft);    color: var(--bad);    border-color: rgba(240, 138, 124, 0.18); }
.mark--info   { background: var(--info-soft);   color: var(--info);   border-color: rgba(136, 168, 232, 0.18); }
.mark--plum   { background: var(--plum-soft);   color: var(--plum);   border-color: rgba(193, 152, 232, 0.18); }
.mark--signal { background: var(--signal-soft); color: var(--signal); border-color: rgba(197, 244, 61, 0.22); }
.mark--mute   { background: rgba(255,250,235,0.04); color: var(--paper-3); border-color: var(--hair-2); }

.mark__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.mark__dot--pulse {
  animation: pulse-dot 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 0 currentColor;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   BUTTONS — reduced, deliberate set
   ══════════════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 34px;
  padding: 0 var(--s-4);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); transition-duration: 80ms; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.btn--primary {
  background: var(--signal);
  color: var(--signal-ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 0 0 0 var(--signal-glow);
}
.btn--primary:hover {
  background: var(--signal-bright);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 4px var(--signal-soft);
}

.btn--secondary {
  background: var(--ink-3);
  color: var(--paper-1);
  border-color: var(--hair-3);
}
.btn--secondary:hover { background: var(--ink-4); border-color: var(--hair-4); }

.btn--ghost {
  background: transparent;
  color: var(--paper-2);
}
.btn--ghost:hover { background: var(--ink-3); color: var(--paper-1); }

.btn--danger {
  background: transparent;
  color: var(--bad);
  border-color: rgba(240, 138, 124, 0.25);
}
.btn--danger:hover { background: var(--bad-soft); border-color: rgba(240, 138, 124, 0.4); }

.btn--sm { height: 28px; padding: 0 var(--s-3); font-size: 12px; }
.btn--lg { height: 40px; padding: 0 var(--s-5); font-size: 13px; }

.btn--icon {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  color: var(--paper-3);
  border: 1px solid transparent;
}
.btn--icon:hover { background: var(--ink-3); color: var(--paper-1); border-color: var(--hair-2); }

.btn-link {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--signal);
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: color var(--t-fast) var(--ease-out);
}
.btn-link:hover { color: var(--signal-bright); }
.btn-link--mute { color: var(--paper-3); }
.btn-link--mute:hover { color: var(--paper-1); }
.btn-link--danger { color: var(--bad); }
.btn-link--danger:hover { color: #f5a59a; }

/* ══════════════════════════════════════════════════════════════════════════════
   FORM CONTROLS
   ══════════════════════════════════════════════════════════════════════════════ */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.field__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}
.field__hint {
  font-size: 11px;
  color: var(--paper-4);
}

body input[type=text],
body input[type=email],
body input[type=password],
body input[type=number],
body input[type=search],
body input[type=tel],
body input[type=url],
body select,
body textarea,
.input {
  background: var(--ink-1);
  border: 1px solid var(--hair-2);
  color: var(--paper-1);
  border-radius: var(--r-md);
  padding: 10px 13px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  width: 100%;
  outline: none;
  transition: all var(--t-fast) var(--ease-out);
}
body input:hover, body select:hover, body textarea:hover { border-color: var(--hair-3); }
body input:focus, body select:focus, body textarea:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-wash);
  background: var(--ink-2);
}
body input::placeholder, body textarea::placeholder {
  color: var(--paper-4);
  font-weight: 400;
}

body select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%237a7872' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}

body select option {
  background: var(--ink-popover);
  color: var(--paper-1);
}

.input--inline {
  background: var(--ink-3) !important;
  padding: 5px 9px !important;
  font-size: 12px !important;
  width: auto !important;
  border-color: var(--hair-2) !important;
}

.input--search {
  padding-left: 36px;
}

.search-shell { position: relative; }
.search-shell__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--paper-4);
  pointer-events: none;
}

.checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--hair-3);
  border-radius: 4px;
  background: var(--ink-2);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all var(--t-fast) var(--ease-out);
}
.checkbox:checked {
  background: var(--signal);
  border-color: var(--signal);
}
.checkbox:checked::after {
  content: '';
  width: 8px;
  height: 8px;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath fill='none' stroke='%231a2400' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 4l3 3 5-6'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ══════════════════════════════════════════════════════════════════════════════
   TABLE — sticky header, refined rows
   ══════════════════════════════════════════════════════════════════════════════ */

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tbl thead th {
  background: var(--ink-1);
  border-bottom: 1px solid var(--hair-2);
  padding: 10px var(--s-5);
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.tbl tbody td {
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--hair-1);
  vertical-align: middle;
  color: var(--paper-2);
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr {
  transition: background var(--t-fast) var(--ease-out);
}
.tbl tbody tr:hover { background: rgba(255, 250, 235, 0.018); }

.tbl__primary { color: var(--paper-1); font-weight: 500; }
.tbl__num {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 500;
}
.tbl__id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--paper-3);
  letter-spacing: -0.01em;
}

.tbl__empty {
  text-align: center;
  padding: var(--s-16) var(--s-5);
  color: var(--paper-4);
  font-size: 13px;
}

.tbl-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--hair-2);
  background: var(--ink-1);
}
.tbl-pager__info {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--paper-3);
}

/* ══════════════════════════════════════════════════════════════════════════════
   PROGRESS — slim bars, minimal chrome
   ══════════════════════════════════════════════════════════════════════════════ */

.bar {
  height: 4px;
  background: var(--ink-4);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.bar__fill {
  height: 100%;
  border-radius: inherit;
  transition: width var(--t-slow) var(--ease-out);
  background: var(--signal);
}
.bar__fill--good { background: var(--good); }
.bar__fill--warn { background: var(--warn); }
.bar__fill--bad { background: var(--bad); }
.bar__fill--info { background: var(--info); }
.bar__fill--plum { background: var(--plum); }

.bar--mini { height: 3px; max-width: 60px; }

.score {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.score__bar {
  width: 50px;
  height: 4px;
  background: var(--ink-4);
  border-radius: 999px;
  overflow: hidden;
}
.score__bar-fill {
  height: 100%;
  border-radius: inherit;
}
.score__num {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  min-width: 22px;
  text-align: right;
}

/* ══════════════════════════════════════════════════════════════════════════════
   TABS — segment-style
   ══════════════════════════════════════════════════════════════════════════════ */

.tabs {
  display: inline-flex;
  padding: 3px;
  background: var(--ink-2);
  border: 1px solid var(--hair-2);
  border-radius: var(--r-md);
  gap: 2px;
}

.tab {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--paper-3);
  cursor: pointer;
  border: none;
  background: transparent;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease-out);
}
.tab:hover { color: var(--paper-1); }
.tab.is-active {
  background: var(--ink-4);
  color: var(--paper-1);
  box-shadow: var(--lift-1);
}

/* ══════════════════════════════════════════════════════════════════════════════
   PULSE / STATUS DOTS
   ══════════════════════════════════════════════════════════════════════════════ */

.pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.pulse--active { background: var(--good); }
.pulse--processing { background: var(--warn); }
.pulse--idle { background: var(--paper-4); }
.pulse--error { background: var(--bad); }

.pulse--active::after,
.pulse--processing::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: inherit;
  opacity: 0.4;
  animation: ring 2s ease-out infinite;
}
@keyframes ring {
  0% { transform: scale(0.7); opacity: 0.6; }
  100% { transform: scale(2); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   SKELETON — loading state
   ══════════════════════════════════════════════════════════════════════════════ */

.skel {
  background: linear-gradient(90deg,
    var(--ink-3) 0%,
    var(--ink-4) 40%,
    var(--ink-3) 80%);
  background-size: 280% 100%;
  animation: skel-sweep 1.6s ease-in-out infinite;
  border-radius: var(--r-sm);
  display: block;
}
@keyframes skel-sweep {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--hair-3);
  border-top-color: var(--signal);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}
.spinner--lg { width: 28px; height: 28px; border-width: 2.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════════════════
   TOAST — minimal & cinematic
   ══════════════════════════════════════════════════════════════════════════════ */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 10px 14px 10px 12px;
  border-radius: var(--r-md);
  background: var(--ink-popover);
  border: 1px solid var(--hair-3);
  color: var(--paper-1);
  font-size: 13px;
  font-weight: 500;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  box-shadow: var(--lift-3);
  backdrop-filter: blur(20px);
  animation: toast-in 0.35s var(--ease-spring) both;
}
.toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
  transition: all var(--t-base) var(--ease-out);
}
.toast__bar {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  flex-shrink: 0;
}
.toast--info    .toast__bar { background: var(--info); }
.toast--success .toast__bar { background: var(--signal); }
.toast--error   .toast__bar { background: var(--bad); }
.toast--warning .toast__bar { background: var(--warn); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* ══════════════════════════════════════════════════════════════════════════════
   POPOVER / TOOLTIP CARD
   ══════════════════════════════════════════════════════════════════════════════ */

.popover {
  background: var(--ink-popover);
  border: 1px solid var(--hair-3);
  border-radius: var(--r-md);
  box-shadow: var(--lift-3);
  padding: var(--s-4);
  animation: pop 0.18s var(--ease-out) forwards;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(4px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ══════════════════════════════════════════════════════════════════════════════
   GRID HELPERS
   ══════════════════════════════════════════════════════════════════════════════ */

.row { display: flex; }
.col { display: flex; flex-direction: column; }
.center { display: flex; align-items: center; justify-content: center; }

.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; }
}

/* Spacer utility */
.gap-sm { gap: var(--s-2); }
.gap-md { gap: var(--s-4); }
.gap-lg { gap: var(--s-6); }

/* ══════════════════════════════════════════════════════════════════════════════
   CHART CONTAINER
   ══════════════════════════════════════════════════════════════════════════════ */

.chart-wrap { position: relative; height: 280px; }

/* ══════════════════════════════════════════════════════════════════════════════
   FADE-IN ENTRANCE (staggered)
   ══════════════════════════════════════════════════════════════════════════════ */

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 0.5s var(--ease-out) both; }
.rise-1 { animation-delay: 40ms; }
.rise-2 { animation-delay: 90ms; }
.rise-3 { animation-delay: 140ms; }
.rise-4 { animation-delay: 190ms; }
.rise-5 { animation-delay: 240ms; }

/* ══════════════════════════════════════════════════════════════════════════════
   FOCUS / SELECTION
   ══════════════════════════════════════════════════════════════════════════════ */

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--signal);
  color: var(--signal-ink);
}

/* ══════════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════════════════ */

.empty {
  padding: var(--s-16) var(--s-6);
  text-align: center;
  color: var(--paper-4);
}
.empty__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto var(--s-4);
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--ink-3);
  border: 1px solid var(--hair-2);
  color: var(--paper-4);
}
.empty__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--paper-2);
  margin-bottom: var(--s-1);
}
.empty__sub {
  font-size: 12px;
  color: var(--paper-4);
}

/* ══════════════════════════════════════════════════════════════════════════════
   LIST ITEMS — for activity feeds, alerts
   ══════════════════════════════════════════════════════════════════════════════ */

.list { display: flex; flex-direction: column; }
.list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--hair-1);
  transition: background var(--t-fast) var(--ease-out);
}
.list__item:last-child { border-bottom: 0; }
.list__item:hover { background: rgba(255, 250, 235, 0.018); }
.list__item-tick {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}
.list__item-body { flex: 1; min-width: 0; }
.list__item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--paper-1);
  letter-spacing: -0.005em;
}
.list__item-meta {
  font-size: 11px;
  color: var(--paper-4);
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
}
.list__item-side {
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--paper-4);
}
.list__item-unread {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  margin-top: 9px;
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--signal-glow);
}

/* ══════════════════════════════════════════════════════════════════════════════
   AGENT / CREW CARDS — specialized
   ══════════════════════════════════════════════════════════════════════════════ */

.agent-card {
  background: var(--ink-2);
  border: 1px solid var(--hair-2);
  border-radius: var(--r-xl);
  padding: var(--s-5);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  transition: all var(--t-base) var(--ease-out);
}
.agent-card:hover { border-color: var(--hair-3); transform: translateY(-1px); }

.agent-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
}
.agent-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--paper-1);
  letter-spacing: -0.01em;
}
.agent-card__sub {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: 6px;
  font-size: 11px;
  color: var(--paper-4);
  font-family: 'JetBrains Mono', monospace;
}

.stat-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
  border-top: 1px solid var(--hair-2);
  padding-top: var(--s-4);
}
.stat-trio__cell {
  text-align: center;
}
.stat-trio__num {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--paper-1);
}
.stat-trio__lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-4);
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   CONTROL BAR — filters + search
   ══════════════════════════════════════════════════════════════════════════════ */

.controls {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--hair-1);
}
.controls > .controls__spacer { flex: 1; }

.controls__count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--paper-4);
  letter-spacing: 0.02em;
}

.controls select, .controls .input-mini {
  height: 32px;
  padding: 0 var(--s-3);
  font-size: 12px;
  width: auto;
  min-width: 130px;
  background: var(--ink-2);
}
.controls .search-shell input {
  height: 32px;
  padding: 0 var(--s-3) 0 32px;
  font-size: 12.5px;
  min-width: 220px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .topbar { padding: 0 var(--s-5); }
  .page { padding: var(--s-6) var(--s-5) var(--s-12); }
  .masthead { margin-bottom: var(--s-6); }
  .masthead__title { font-size: 2rem; }
}

@media (max-width: 640px) {
  .rail { width: 56px; }
  :root { --rail-w: 56px; }
  .topbar { padding: 0 var(--s-4); height: 48px; }
  .page { padding: var(--s-5) var(--s-4) var(--s-10); }
}