/**
 * tokens.css — QUANTIC design tokens canonical bit-exact CSS Custom Properties V1.0 fundacional canonizado 2026-05-21
 *
 * DAEDALUS V2.5.12 quinta tipología arquitectónica D-48 emisión canonical bit-exact
 * Custodia operacional acotada §0.X.Y-DAEDALUS sobre artefactos cliente-facing materiales entregables
 *
 * Source: tokens.json (single source of truth canonical bit-exact)
 * Spec: DAEDALUS/clientes/novarthic/quantic-design-system/design_tokens_v1_0_2026-05-21.md
 * Ratificacion: Edison Director Estratégico Nivel 3 amplia binaria explícita sub-sesión 17 Entrada 3 Opción α preservación N=5 precedentes
 *
 * Preservación bit-exact N=5 precedente DAEDALUS V1.1 §1.1-§1.10 confirmada bit-exact:
 *   - Inter Variable (sans-serif primaria) + IBM Plex Mono (monospace) self-hosted preserving sovereignty
 *   - Escala modular 1.250 Major Third base 16px canonical: 10 stops 12-64px
 *   - Paleta dark agentic primario + acento púrpura #8b5cf6 signature
 *   - Spacing scale base 4px + radius scale 7 stops + shadow scale 8 stops + motion timing canonical
 */

/* === @font-face declarations canonical bit-exact self-hosted preserving sovereignty === */
@font-face {
  font-family: 'Inter Variable';
  src: url('/static/fonts/InterVariable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/static/fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* === Design tokens canonical bit-exact 8 dimensiones === */
:root {
  /* ============================================
   * §1 Color tokens canonical bit-exact
   * ============================================ */

  /* Backgrounds canonical bit-exact preservados V0.4 → V0.5 → V1.0 QUANTIC */
  --nv-bg-base: #0a0a14; /* recalibrado §10 vanguardia 2026, N3 2026-05-26 */
  --nv-bg-elevated: #14141b;
  --nv-bg-overlay: #1c1c26;
  --nv-bg-hover: #1f1f2a;
  --nv-bg-active: #252532;
  --nv-bg-selected: rgba(139, 92, 246, 0.08);

  /* Borders canonical bit-exact */
  --nv-border-subtle: #1f1f2a;
  --nv-border-base: #2a2a35;
  --nv-border-strong: #3a3a48;
  --nv-border-accent: #9d72f8;

  /* Text canonical bit-exact preservados WCAG 2.1 AA estricta */
  --nv-text-primary: #f5f5fa;       /* 17.8:1 sobre bg-base AAA */
  --nv-text-secondary: #c0c0cf;     /* 11.2:1 sobre bg-base AAA */
  --nv-text-tertiary: #8a8a9b;      /* 5.6:1 sobre bg-base AA */
  --nv-text-disabled: #54546b;      /* 2.7:1 solo decorativo */
  --nv-text-on-accent: #ffffff;     /* 4.1:1 AA Large 18px+ */

  /* Accent canonical bit-exact #8b5cf6 color signature */
  --nv-accent: #8b5cf6;
  --nv-accent-soft: rgba(139, 92, 246, 0.12);
  --nv-accent-hover: #7c4ef0;
  --nv-accent-active: #6d3fe8;
  --nv-accent-border: #9d72f8;

  /* Estados semánticos canonical bit-exact */
  --nv-success: #10b981;
  --nv-success-soft: rgba(16, 185, 129, 0.12);
  --nv-warning: #f59e0b;
  --nv-warning-soft: rgba(245, 158, 11, 0.12);
  --nv-danger: #ef4444;
  --nv-danger-soft: rgba(239, 68, 68, 0.12);
  --nv-info: #3b82f6;
  --nv-info-soft: rgba(59, 130, 246, 0.12);

  /* Focus ring canonical bit-exact P2 CRÍTICA 100% application */
  --nv-focus-ring-color: var(--nv-accent);
  --nv-focus-ring-width: 2px;
  --nv-focus-ring-offset: 2px;
  --nv-ring: 0 0 0 var(--nv-focus-ring-width) var(--nv-focus-ring-color);

  /* Permission Tree tokens canonical preservados V0.5 + extensión V1.0 QUANTIC */
  --nv-permission-granted-template: var(--nv-success);
  --nv-permission-granted-template-soft: var(--nv-success-soft);
  --nv-permission-granted-direct: var(--nv-warning);
  --nv-permission-granted-direct-soft: var(--nv-warning-soft);
  --nv-permission-inherited: var(--nv-info);
  --nv-permission-inherited-soft: var(--nv-info-soft);
  --nv-permission-revoked: var(--nv-danger);
  --nv-permission-revoked-soft: var(--nv-danger-soft);
  --nv-permission-not-granted: var(--nv-text-disabled);
  --nv-permission-tree-indent: 1.5rem;
  --nv-permission-tree-row-padding: 0.5rem;
  --nv-permission-tree-checkbox-gap: 0.625rem;
  --nv-permission-node-hover-bg: var(--nv-bg-hover);
  --nv-permission-node-focus-ring: var(--nv-ring);

  /* Tokens V1.0 QUANTIC emergentes empresarial multi-módulo */
  --nv-kpi-delta-positive: var(--nv-success);
  --nv-kpi-delta-negative: var(--nv-danger);
  --nv-kpi-delta-neutral: var(--nv-text-tertiary);
  --nv-cfdi-stamp-bg: var(--nv-bg-elevated);
  --nv-cfdi-stamp-border: var(--nv-success);
  --nv-cfdi-folio-color: var(--nv-text-secondary);
  --nv-andromeda-bridge-bg: rgba(139, 92, 246, 0.04);
  --nv-andromeda-bridge-border: var(--nv-accent-border);
  --nv-andromeda-bridge-icon: var(--nv-accent);
  --nv-tenant-brand-primary: var(--nv-accent);
  --nv-tenant-brand-secondary: var(--nv-accent-soft);
  --nv-tenant-logo-url: url('/static/img/novarthic-logo.svg');

  /* ============================================
   * §2 Typography tokens canonical bit-exact
   * Inter Variable + IBM Plex Mono preservación bit-exact N=5 precedente
   * ============================================ */

  --nv-font-sans: 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nv-font-mono: 'IBM Plex Mono', 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;

  /* Escala modular 1.250 Major Third base 16px canonical (10 stops N=5 precedente bit-exact) */
  --nv-text-xs: 0.75rem;     /* 12px */
  --nv-text-sm: 0.875rem;    /* 14px */
  --nv-text-base: 1rem;      /* 16px */
  --nv-text-lg: 1.125rem;    /* 18px */
  --nv-text-xl: 1.25rem;     /* 20px */
  --nv-text-2xl: 1.5rem;     /* 24px */
  --nv-text-3xl: 1.875rem;   /* 30px */
  --nv-text-4xl: 2.25rem;    /* 36px */
  --nv-text-5xl: 3rem;       /* 48px */
  --nv-text-display: 4rem;   /* 64px */

  /* Line heights canonical */
  --nv-leading-tight: 1.2;
  --nv-leading-snug: 1.4;
  --nv-leading-normal: 1.5;
  --nv-leading-relaxed: 1.6;
  --nv-leading-loose: 1.8;

  /* Letter spacing canonical */
  --nv-tracking-tighter: -0.04em;
  --nv-tracking-tight: -0.02em;
  --nv-tracking-normal: 0;
  --nv-tracking-wide: 0.025em;
  --nv-tracking-wider: 0.05em;

  /* Font weights canonical */
  --nv-font-regular: 400;
  --nv-font-medium: 500;
  --nv-font-semibold: 600;
  --nv-font-bold: 700;
  --nv-font-extrabold: 800;

  /* ============================================
   * §3 Spacing tokens canonical bit-exact base 4px
   * ============================================ */

  --nv-space-0: 0;
  --nv-space-px: 1px;
  --nv-space-0_5: 0.125rem;  /* 2px */
  --nv-space-1: 0.25rem;     /* 4px */
  --nv-space-1_5: 0.375rem;  /* 6px */
  --nv-space-2: 0.5rem;      /* 8px */
  --nv-space-2_5: 0.625rem;  /* 10px */
  --nv-space-3: 0.75rem;     /* 12px */
  --nv-space-4: 1rem;        /* 16px */
  --nv-space-5: 1.25rem;     /* 20px */
  --nv-space-6: 1.5rem;      /* 24px */
  --nv-space-8: 2rem;        /* 32px */
  --nv-space-10: 2.5rem;     /* 40px */
  --nv-space-12: 3rem;       /* 48px */
  --nv-space-16: 4rem;       /* 64px */
  --nv-space-20: 5rem;       /* 80px */
  --nv-space-24: 6rem;       /* 96px */
  --nv-space-32: 8rem;       /* 128px */

  /* Spacing aliases canonical preservados V0.4 */
  --nv-spacing-card-padding: 1.25rem;
  --nv-spacing-row-gap: 0.75rem;
  --nv-spacing-section-gap: 2rem;
  --nv-spacing-page-padding: 1.5rem;

  /* ============================================
   * §4 Radius tokens canonical bit-exact
   * ============================================ */

  --nv-radius-none: 0;
  --nv-radius-sm: 0.25rem;
  --nv-radius-base: 0.5rem;
  --nv-radius-md: 0.75rem;
  --nv-radius-lg: 1rem;
  --nv-radius-xl: 1.5rem;
  --nv-radius-full: 9999px;

  /* ============================================
   * §5 Shadow tokens canonical bit-exact dark mode tuneados
   * ============================================ */

  --nv-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --nv-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.6), 0 1px 2px -1px rgba(0, 0, 0, 0.6);
  --nv-shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.7), 0 2px 4px -2px rgba(0, 0, 0, 0.7);
  --nv-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.75), 0 4px 6px -4px rgba(0, 0, 0, 0.75);
  --nv-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 8px 10px -6px rgba(0, 0, 0, 0.8);
  --nv-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  --nv-shadow-2xl: 0 35px 60px -15px rgba(0, 0, 0, 0.95);
  --nv-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.5);
  --nv-shadow-accent-glow: 0 0 24px -4px rgba(139, 92, 246, 0.3);
  --nv-shadow-accent-glow-strong: 0 0 32px -2px rgba(139, 92, 246, 0.5);

  /* ============================================
   * §6 Motion tokens canonical bit-exact
   * ============================================ */

  --nv-duration-instant: 0ms;
  --nv-duration-fast: 100ms;
  --nv-duration-base: 200ms;
  --nv-duration-slow: 300ms;
  --nv-duration-slower: 500ms;

  --nv-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --nv-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --nv-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  --nv-transition-fast: var(--nv-duration-fast) var(--nv-ease-in-out);
  --nv-transition-base: var(--nv-duration-base) var(--nv-ease-in-out);
  --nv-transition-slow: var(--nv-duration-slow) var(--nv-ease-in-out);

  /* ============================================
   * §7 Breakpoint tokens canonical bit-exact mobile-first
   * ============================================ */

  --nv-bp-sm: 640px;
  --nv-bp-md: 768px;
  --nv-bp-lg: 1024px;
  --nv-bp-xl: 1280px;
  --nv-bp-2xl: 1536px;

  /* ============================================
   * §8 Z-index tokens canonical bit-exact
   * ============================================ */

  --nv-z-base: 0;
  --nv-z-dropdown: 10;
  --nv-z-sticky: 20;
  --nv-z-fixed: 30;
  --nv-z-modal-backdrop: 35;
  --nv-z-modal: 40;
  --nv-z-popover: 50;
  --nv-z-tooltip: 60;
  --nv-z-toast: 70;
  --nv-z-skip-link: 100;
}

/* === Accessibility prefers-reduced-motion canonical bit-exact WCAG 2.1 AAA 2.3.3 === */
@media (prefers-reduced-motion: reduce) {
  :root {
    --nv-duration-instant: 0ms;
    --nv-duration-fast: 0ms;
    --nv-duration-base: 0ms;
    --nv-duration-slow: 0ms;
    --nv-duration-slower: 0ms;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === Multi-tenant override pattern canonical bit-exact V1.0 QUANTIC === */
/* Tenant Novarthic interno tenant 1 día 1 ejercita arquitectura multi-tenant desde día 1 */
/* Future tenants B2B 2028+ usan [data-tenant-id="<X>"] scoped CSS variables override sin rewrite */
[data-tenant-id="external-client-X"] {
  /* Override per-tenant canonical bit-exact emplazado F_N.X+ */
  /* --nv-tenant-brand-primary: #<client-color>; */
  /* --nv-tenant-brand-secondary: #<client-color-soft>; */
  /* --nv-tenant-logo-url: url('/static/tenants/<X>/logo.svg'); */
}

/* ============================================================================
 * §10 RECALIBRACIÓN VANGUARDIA 2026 — tokens NUEVOS aditivos (N3 2026-05-26)
 * ----------------------------------------------------------------------------
 * Bloque aditivo: profundidad/glassmorphism/glow para gama high-end vanguardia
 * 2026. NO redefine tokens §1-§9 (excepto --nv-bg-base recalibrado IN-PLACE
 * arriba). Glow disciplinado acento-only (botones CTA, nav activo, focus, estados
 * semánticos puntuales) — NUNCA en cards estáticas/borders/texto.
 * ============================================================================ */
:root {
  /* Mesh overlay de fondo (radial-gradients de baja opacidad para textura sutil). */
  --nv-bg-mesh-overlay: radial-gradient(at 20% 0%, rgba(139, 92, 246, 0.06) 0px, transparent 50%);
  --nv-bg-mesh-overlay-dual:
    radial-gradient(at 20% 0%, rgba(139, 92, 246, 0.06) 0px, transparent 50%),
    radial-gradient(at 80% 100%, rgba(59, 130, 246, 0.05) 0px, transparent 50%);

  /* Glass blur scale (backdrop-filter). */
  --nv-glass-blur-sm: 16px;
  --nv-glass-blur-md: 24px;
  --nv-glass-blur-lg: 28px;
  --nv-glass-blur-xl: 40px;

  /* Glass surfaces (translúcidas, para usar con backdrop-filter blur). */
  --nv-glass-surface-1: rgba(20, 20, 27, 0.60);
  --nv-glass-surface-2: rgba(28, 28, 38, 0.65);
  --nv-glass-surface-3: rgba(35, 35, 48, 0.70);

  /* Glass borders (hairline traslúcido). */
  --nv-glass-border-subtle: rgba(255, 255, 255, 0.04);
  --nv-glass-border-base: rgba(255, 255, 255, 0.06);
  --nv-glass-border-strong: rgba(255, 255, 255, 0.10);

  /* Elevation surfaces (escala sólida de profundidad). */
  --nv-elevation-0: var(--nv-bg-base);
  --nv-elevation-1: #14141b;
  --nv-elevation-2: #1c1c26;
  --nv-elevation-3: #232330;
  --nv-elevation-4: #2a2a38;

  /* Elevation shadows (más finas y direccionales que §5; para profundidad sutil). */
  --nv-shadow-elevation-1: 0 1px 2px 0 rgba(0, 0, 0, 0.30);
  --nv-shadow-elevation-2: 0 4px 6px -1px rgba(0, 0, 0, 0.50), 0 2px 4px -2px rgba(0, 0, 0, 0.50);
  --nv-shadow-elevation-3: 0 10px 15px -3px rgba(0, 0, 0, 0.65), 0 4px 6px -4px rgba(0, 0, 0, 0.65);
  --nv-shadow-elevation-4: 0 25px 50px -12px rgba(0, 0, 0, 0.80), 0 8px 12px -6px rgba(0, 0, 0, 0.70);

  /* Glow disciplinado (acento-only + estados semánticos puntuales). */
  --nv-glow-purple-soft: 0 0 8px rgba(139, 92, 246, 0.30);
  --nv-glow-purple-strong: 0 0 12px rgba(139, 92, 246, 0.50);
  --nv-glow-success: 0 0 6px rgba(16, 185, 129, 0.25);
  --nv-glow-warning: 0 0 6px rgba(245, 158, 11, 0.25);
  --nv-glow-danger: 0 0 6px rgba(239, 68, 68, 0.30);
  --nv-glow-info: 0 0 6px rgba(59, 130, 246, 0.25);
  --nv-glow-cta-hover: 0 0 16px rgba(139, 92, 246, 0.40);

  /* Focus ring extendido (doble halo + glow púrpura para foco vanguardia). */
  --nv-focus-ring-extended: 0 0 0 2px var(--nv-bg-base), 0 0 0 4px var(--nv-accent), var(--nv-glow-purple-soft);
}

/* ============================================================================
 * §11 NOVARTHIC ADN gold — token aditivo de marca institucional (Slice B M4 T-4.9)
 * ----------------------------------------------------------------------------
 * Dorado #C9A55C = ADN Novarthic (materializa la decisión cromática dual §4 #2 del
 * design brief Slice B: púrpura = QUANTIC producto · dorado = sello institucional
 * Novarthic). Token DS REUTILIZABLE, NO hardcode. Uso ACOTADO: sello institucional
 * en la cabina del capitán (home Mission Control) — NUNCA body-text, NUNCA en
 * módulos operativos cliente-facing (frontera cabina/cliente). El gold NO cuenta
 * dentro del presupuesto de ≤3 acentos púrpura/pantalla (es un acento distinto y
 * único). Aditivo: no redefine ningún token §1-§10.
 * ============================================================================ */
:root {
  --nv-novarthic-gold: #C9A55C;
  --nv-novarthic-gold-soft: rgba(201, 165, 92, 0.12);
  --nv-novarthic-gold-border: rgba(201, 165, 92, 0.35);
  --nv-glow-gold: 0 0 12px rgba(201, 165, 92, 0.30);

  /* ── SIGNATURE atmospheric depth (iter F·v2 · render-canon) ──────────
     Three radial washes layered over the flat cosmic-dark base: two top-
     corner washes (purple 0.10, indigo 0.08) + a deep purple foot (0.20).
     Reads as light/atmosphere; never "nebula illustration". Applied as a
     DIRECT background on .qk-shell:not([data-polish="performance"]) (see
     kit.css E.1) layered over var(--nv-bg-base); PERFORMANCE omits the rule.
     Animated by @keyframes nv-atmo-breath (40s ease-in-out, kit.css). */
  --nv-bg-atmospheric:
    radial-gradient(ellipse 70% 40% at 20% 0%,  rgba(139, 92, 246, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 65% 35% at 85% 0%,  rgba(91, 99, 190, 0.08)  0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(34, 22, 82, 0.20)  0%, transparent 55%);

  /* ── SIGNATURE spatial elevation (iter F·v2 · render-canon) ──────────
     The card shadow that actually ships is a 3-layer stack (top specular
     inset highlight + near drop + deep far-drop). Applied inline on
     .qk-shell:not([data-polish="performance"]) .qk-card (kit.css E.5).
     -hover is the rendered hover stack (paired inline with translateY(-2px)
     + accent border, 200ms). -focus is the spec'd card focus treatment —
     available, but cards currently inherit the global focus ring. */
  --nv-shadow-card-signature:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.32),
    0 16px 36px -12px rgba(0, 0, 0, 0.55);
  --nv-shadow-card-signature-hover:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 2px 4px rgba(0, 0, 0, 0.40),
    0 24px 48px -12px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(139, 92, 246, 0.30);
  --nv-shadow-card-signature-focus:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 2px var(--nv-bg-base),
    0 0 0 4px var(--nv-accent-soft),
    0 1px 2px rgba(0, 0, 0, 0.40),
    0 12px 32px rgba(139, 92, 246, 0.08);
}

/* ============================================================================
 * §12 POLISH TIERS — PERFORMANCE light editorial vs SIGNATURE dark agentic
 * ----------------------------------------------------------------------------
 * Two polish modes, one DNA. SIGNATURE is the default dark-agentic system
 * already canonized in §1–§11 (no overrides needed — the bare `:root` IS
 * SIGNATURE). PERFORMANCE is a light editorial override that swaps the
 * cromatic surfaces, text pyramid, accent shade, semantic chroma, and shadow
 * scale — same components, same DNA, decidedly different posture.
 *
 * Decision N3 2026-05-28: PERFORMANCE became light editorial (was previously
 * "dark sobrio" — the distinction was too subtle in practice).
 *
 * Tier mapping (server-set on <html data-polish="...">):
 *   IGNITION, ALPHA           → "performance" (no in-app toggle)
 *   ENTERPRISE, OMEGA-Q       → "signature" by default; toggle to performance
 *   NOVARTHIC interno (T1)    → "signature" by default
 *
 * Backward-compat alias: `[data-polish="signature"]` is a no-op — it just
 * re-asserts the :root defaults — so consumers can declare the mode
 * explicitly on <html> regardless of which tier they're rendering.
 *
 * Honesty clauses:
 *   1. Glass + backdrop-filter are SIGNATURE-only. In PERFORMANCE light they
 *      lose their visual purpose (translucency over a dark canvas) — we fall
 *      back to a solid card with a stronger 1px border. The `.surface-glass`
 *      utility re-aliases to `surface-1` under [data-polish="performance"].
 *   2. Mesh gradient bg overlays are SIGNATURE-only. Variables exist but
 *      resolve to `none` under PERFORMANCE.
 *   3. Accent-glow CTA, agent-halo pulse, and all 0 0 *px rgba glows are
 *      SIGNATURE-only. They resolve to `none` under PERFORMANCE; the same
 *      buttons read as crisp solid fills instead.
 *   4. Sello cometa NOVARTHIC (#C9A55C) stays visible in BOTH modes as a brand
 *      ASSET (the cometa/sello PNG carries its own luminance) — NOT a CSS
 *      text/UI color. The gold is ~8.46:1 over the dark base but only ~2.2:1
 *      over the light surface (fails AA as text); it is never applied as a
 *      text/border color of small UI on light.
 * ============================================================================ */
[data-polish="performance"] {
  /* ── Surfaces (off-white gris-azulado, NOT marfil) ─────────────────── */
  --nv-bg-base:     #F8F9FB;
  --nv-bg-elevated: #FFFFFF;
  --nv-bg-overlay:  #FBFCFD;
  --nv-bg-hover:    #F1F3F7;
  --nv-bg-active:   #E8EBF1;
  --nv-bg-selected: rgba(109, 63, 232, 0.08);

  /* ── Borders (cool gray scale, calibrated up) ──────────────────────── */
  --nv-border-subtle: #E5E7EC;
  --nv-border-base:   #D5D9E2;
  --nv-border-strong: #B7BDC9;
  --nv-border-accent: #6D3FE8;

  /* ── Text (inverted pyramid, WCAG-verified vs bg-base #F8F9FB) ──────── */
  --nv-text-primary:   #0F1424;   /* 17.40:1 AAA — Cosmic Black as ink */
  --nv-text-secondary: #3A3F52;   /*  9.90:1 AAA */
  --nv-text-tertiary:  #6A7185;   /*  4.62:1 AA — captions / metadata */
  --nv-text-disabled:  #A8AEBC;   /*  2.11:1 decorative only, non-interactive */
  --nv-text-on-accent: #FFFFFF;   /*  5.95:1 AA on #6D3FE8 accent */

  /* ── Accent QUANTIC púrpura recalibrado para fondos claros ─────────── */
  --nv-accent:        #6D3FE8;    /*  5.65:1 AA on bg-base, 5.95:1 AA on white */
  --nv-accent-soft:   rgba(109, 63, 232, 0.10);
  --nv-accent-hover:  #5A33D4;    /*  7.35:1 AAA on white */
  --nv-accent-active: #4D2BB8;    /*  8.92:1 AAA on white */
  --nv-accent-border: #8B5CF6;    /* original lighter purple, decorative border only */

  /* ── Semantic colors (oscurecidos para legibilidad sobre claro) ────── */
  --nv-success:       #047857;    /*  5.21:1 AA */
  --nv-success-soft:  rgba(4, 120, 87, 0.10);
  --nv-warning:       #B45309;    /*  4.77:1 AA */
  --nv-warning-soft:  rgba(180, 83, 9, 0.10);
  --nv-danger:        #B91C1C;    /*  6.14:1 AA */
  --nv-danger-soft:   rgba(185, 28, 28, 0.10);
  --nv-info:          #1D4ED8;    /*  6.36:1 AA */
  --nv-info-soft:     rgba(29, 78, 216, 0.10);

  /* ── KPI delta colors re-anchor to performance semantics ──────────── */
  --nv-kpi-delta-positive: var(--nv-success);
  --nv-kpi-delta-negative: var(--nv-danger);
  --nv-kpi-delta-neutral:  var(--nv-text-tertiary);

  /* ── CFDI / Andromeda Bridge / Tenant re-resolve through new accent ── */
  --nv-cfdi-stamp-bg:           var(--nv-bg-elevated);
  --nv-cfdi-stamp-border:       var(--nv-success);
  --nv-cfdi-folio-color:        var(--nv-text-secondary);
  --nv-andromeda-bridge-bg:     rgba(109, 63, 232, 0.04);
  --nv-andromeda-bridge-border: var(--nv-accent-border);
  --nv-andromeda-bridge-icon:   var(--nv-accent);
  --nv-tenant-brand-primary:    var(--nv-accent);
  --nv-tenant-brand-secondary:  var(--nv-accent-soft);

  /* ── Permission tree re-binds via the new semantic palette ────────── */
  --nv-permission-granted-template:      var(--nv-success);
  --nv-permission-granted-template-soft: var(--nv-success-soft);
  --nv-permission-granted-direct:        var(--nv-warning);
  --nv-permission-granted-direct-soft:   var(--nv-warning-soft);
  --nv-permission-inherited:             var(--nv-info);
  --nv-permission-inherited-soft:        var(--nv-info-soft);
  --nv-permission-revoked:               var(--nv-danger);
  --nv-permission-revoked-soft:          var(--nv-danger-soft);
  --nv-permission-not-granted:           var(--nv-text-disabled);

  /* ── Shadows softened for light surfaces (alpha 0.04 → 0.12) ──────── */
  --nv-shadow-xs:    0 1px 2px 0 rgba(15, 20, 36, 0.04);
  --nv-shadow-sm:    0 1px 3px 0 rgba(15, 20, 36, 0.06), 0 1px 2px -1px rgba(15, 20, 36, 0.06);
  --nv-shadow-base:  0 4px 6px -1px rgba(15, 20, 36, 0.08), 0 2px 4px -2px rgba(15, 20, 36, 0.06);
  --nv-shadow-md:    0 10px 15px -3px rgba(15, 20, 36, 0.10), 0 4px 6px -4px rgba(15, 20, 36, 0.08);
  --nv-shadow-lg:    0 20px 25px -5px rgba(15, 20, 36, 0.12), 0 8px 10px -6px rgba(15, 20, 36, 0.10);
  --nv-shadow-xl:    0 25px 50px -12px rgba(15, 20, 36, 0.14);
  --nv-shadow-2xl:   0 35px 60px -15px rgba(15, 20, 36, 0.16);
  --nv-shadow-inner: inset 0 1px 2px 0 rgba(15, 20, 36, 0.06);

  /* ── Honesty: SIGNATURE-only effects neutralized in light ─────────── */
  /* Glass surfaces collapse to solid card with a slightly stronger border;
     translucent surfaces over light read as fog, not as glass. */
  --nv-glass-surface-1:      var(--nv-bg-elevated);
  --nv-glass-surface-2:      var(--nv-bg-elevated);
  --nv-glass-surface-3:      var(--nv-bg-elevated);
  --nv-glass-border-subtle:  var(--nv-border-subtle);
  --nv-glass-border-base:    var(--nv-border-base);
  --nv-glass-border-strong:  var(--nv-border-strong);
  --nv-glass-blur-sm: 0px;
  --nv-glass-blur-md: 0px;
  --nv-glass-blur-lg: 0px;
  --nv-glass-blur-xl: 0px;

  /* Mesh background overlays don't apply over light surfaces. */
  --nv-bg-mesh-overlay:      none;
  --nv-bg-mesh-overlay-dual: none;

  /* Accent glow is dark-only — in light, primary buttons read as solid fill. */
  --nv-shadow-accent-glow:         none;
  --nv-shadow-accent-glow-strong:  none;
  --nv-glow-purple-soft:    none;
  --nv-glow-purple-strong:  none;
  --nv-glow-cta-hover:      none;
  --nv-glow-success:        none;
  --nv-glow-warning:        none;
  --nv-glow-danger:         none;
  --nv-glow-info:           none;
  --nv-glow-gold:           none;

  /* Elevation surfaces resolve to the solid light scale */
  --nv-elevation-0: var(--nv-bg-base);
  --nv-elevation-1: var(--nv-bg-elevated);
  --nv-elevation-2: var(--nv-bg-elevated);
  --nv-elevation-3: var(--nv-bg-elevated);
  --nv-elevation-4: var(--nv-bg-elevated);
  --nv-shadow-elevation-1: var(--nv-shadow-xs);
  --nv-shadow-elevation-2: var(--nv-shadow-sm);
  --nv-shadow-elevation-3: var(--nv-shadow-base);
  --nv-shadow-elevation-4: var(--nv-shadow-md);

  /* Focus ring extended — keep the dual halo but use bg-base as the inner ring */
  --nv-focus-ring-extended:
    0 0 0 2px var(--nv-bg-base),
    0 0 0 4px var(--nv-accent);

  /* NOVARTHIC gold sello stays visible as a brand ASSET — the cometa/sello PNG
     carries its own luminance. The gold #C9A55C is only ~2.2:1 over white, so it
     is NEVER used as a text/border color on the light surface (fails AA); it
     appears solely as the institutional sello. */
  /* (Keep --nv-novarthic-gold-* unchanged from §11 :root.) */
}

/* Explicit signature alias — declaring [data-polish="signature"] on <html>
   is a no-op that re-asserts :root. Allows consumers to set polish
   declaratively without conditional templates. */
[data-polish="signature"] {
  /* intentionally empty — all SIGNATURE tokens already live in :root §1–§11 */
}
