/* ===========================================================================
   pentes.io — design tokens & base styles
   Dark, mono-forward, security-tool aesthetic.
   Accent: Tailwind emerald-400 (oklch 0.7659 0.1532 158.84 / #34d399) —
   mirrors the SPA's text-emerald-400 on the .io glyph and link accents.
   =========================================================================== */

:root {
  /* Neutrals — pure neutral grayscale, near-black canvas (EasyVoice B&W) */
  --bg:        oklch(0.135 0 0);
  --bg-2:      oklch(0.165 0 0);
  --panel:     oklch(0.188 0 0);
  --panel-2:   oklch(0.222 0 0);
  --panel-3:   oklch(0.262 0 0);
  --border:    oklch(0.288 0 0);
  --border-2:  oklch(0.352 0 0);

  --text:      oklch(0.985 0 0);
  --text-2:    oklch(0.785 0 0);
  --muted:     oklch(0.620 0 0);
  --faint:     oklch(0.482 0 0);

  /* Accent — Tailwind emerald-400. Matches the SPA's text-emerald-400 on the
     .io glyph and link accents. Derived tokens (--accent-dim/--accent-line/
     --accent-text) cascade via color-mix, so changing this one line recolors
     every consumer (nav, CTAs, .kicker, focus rings, .dot, footer accent). */
  --accent:        oklch(0.7659 0.1532 158.84);
  --accent-dim:    color-mix(in oklch, var(--accent) 14%, transparent);
  --accent-line:   color-mix(in oklch, var(--accent) 30%, transparent);
  --accent-text:   var(--accent);
  /* text/icon color to sit ON the accent (white) surface */
  --on-accent:     oklch(0.145 0 0);

  /* Severity — monochrome brightness ramp (Critical brightest → Info faint) */
  --sev-crit:  oklch(0.985 0 0);
  --sev-high:  oklch(0.820 0 0);
  --sev-med:   oklch(0.660 0 0);
  --sev-low:   oklch(0.520 0 0);
  --sev-info:  oklch(0.400 0 0);

  --sev-crit-dim: oklch(0.985 0 0 / 0.16);
  --sev-high-dim: oklch(0.820 0 0 / 0.15);
  --sev-med-dim:  oklch(0.660 0 0 / 0.15);
  --sev-low-dim:  oklch(0.520 0 0 / 0.15);
  --sev-info-dim: oklch(0.400 0 0 / 0.15);

  /* State — kept monochrome; danger reads via iconography + label, not hue */
  --ok:    oklch(0.985 0 0);
  --warn:  oklch(0.720 0 0);
  --err:   oklch(0.870 0 0);

  --font-sans: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Density (overridable) */
  --row-h: 52px;
  --pad: 16px;
  --gap: 16px;

  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;

  --shadow-1: 0 1px 0 oklch(1 0 0 / 0.03) inset, 0 1px 3px oklch(0 0 0 / 0.4);
  --shadow-2: 0 12px 40px oklch(0 0 0 / 0.5);

  --sidebar-w: 232px;
  --topbar-h: 56px;
}

[data-density="compact"] { --row-h: 42px; --pad: 12px; --gap: 12px; }
[data-density="comfy"]   { --row-h: 62px; --pad: 22px; --gap: 22px; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { height: 100%; }

::selection { background: var(--accent-dim); }

/* Scrollbars */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--panel-3);
  border-radius: 99px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-2); }

/* ---- typography helpers ---- */
.mono { font-family: var(--font-mono); font-feature-settings: "ss01", "cv01"; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* focus ring */
:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scanline {
  from { transform: translateY(-100%); }
  to   { transform: translateY(100%); }
}
@keyframes barGrow {
  from { transform: scaleX(0); }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes pktflow {
  from { transform: translateX(-7px); }
  to   { transform: translateX(51px); }
}

/* Resting state is fully visible; the animation only plays IN from hidden.
   No fill-mode, so a missed/skipped animation never leaves content invisible. */
.fade-up { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .fade-up { animation: fadeUp 0.34s cubic-bezier(0.2, 0.7, 0.2, 1); }
}
