/* Ellery AI — design tokens. Monochrome editorial system:
   matte black canvas, soft white text, stone-gray structure, white accent. */
:root {
  /* Surfaces */
  --bg-0: #0b0b0c;
  --bg-1: #101012;
  --bg-2: #141416;
  --bg-3: #1a1a1c;
  --line: #2a2a2c;
  --line-soft: #1f1f21;

  /* Text. --text-3 carries most of the small labels (finding titles, evidence
     keys, metadata, nav at rest), so it has to clear WCAG AA 4.5:1 at 10–11px —
     the old #6e6e73 sat at 3.8:1 and was the hardest text in the product to
     read, which is a poor look for software about legible reasoning. */
  --text-1: #f5f5f7;
  --text-2: #a0a0a6;
  --text-3: #8b8b91;

  /* Single accent */
  --accent: #ffffff;
  /* Brand ember — the logo's orange. Used sparingly (caret, focus glow) so the
     editorial monochrome still leads and the mark isn't a stranger to the app. */
  --brand: #ff7a1e;

  /* Semantic (kept deliberately muted) */
  --danger: #c97a7a;
  --warn: #b3a17a;

  /* Visualization ramp — monochrome hierarchy */
  --viz-1: #ffffff;
  --viz-2: #9a9aa0;
  --viz-3: #5c5c62;

  /* Type */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --fs-2xs: 0.62rem;
  --fs-xs: 0.7rem;
  --fs-sm: 0.79rem;
  --fs-md: 0.875rem;
  --fs-lg: 1rem;
  --fs-xl: 1.25rem;
  --fs-hero: 1.6rem;
  --lh-body: 1.6;
  --lh-tight: 1.3;

  /* Spacing — a tight, even rhythm. Dense without crowding. */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 18px;
  --sp-5: 28px;
  --sp-6: 40px;
  --radius-sm: 5px;
  --radius-md: 7px;
  --radius-lg: 10px;

  /* Effects — quiet */
  --shadow-lift: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-modal: 0 24px 80px rgba(0, 0, 0, 0.66);
  --ring: 0 0 0 1px rgba(255, 255, 255, 0.16);

  --panel-w: 312px;
  --topbar-h: 52px;
}

* { box-sizing: border-box; }

/* Links inherit their surroundings by default — the app and site style anchors
   explicitly (brand, nav, in-prose links), never the UA blue/underline. */
a { color: inherit; text-decoration: none; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(255, 255, 255, 0.18); }

:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* No blue flash when you tap a control on mobile. */
html { -webkit-tap-highlight-color: transparent; }

/* Thin, quiet scrollbars so the chrome doesn't fight the content. */
.panel,
.stage,
.modal,
textarea {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.panel::-webkit-scrollbar,
.stage::-webkit-scrollbar,
.modal::-webkit-scrollbar,
textarea::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.panel::-webkit-scrollbar-thumb,
.stage::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
  background: var(--line);
  background-clip: padding-box;
  border: 3px solid transparent; /* inset the thumb so it reads as a slim pill */
  border-radius: 999px;
}
.panel::-webkit-scrollbar-thumb:hover,
.stage::-webkit-scrollbar-thumb:hover,
.modal::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
}
.panel::-webkit-scrollbar-track,
.stage::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
  background: transparent;
}
