/* Yūrei Console — design tokens.
   From the design handoff (UI-UX/design_handoff_yurei_console/console/css/tokens.css), as delivered except:
   - fonts are self-hosted (app/assets/fonts, OFL): the Google Fonts @import and the Noto Greek faces are gone
     (CSP style-src has no Google host; no Greek for now, operator 2026-10-27), and "Noto Sans" left the stacks;
   - the layout puts data-theme / data-accent on <body>, not <html>: Turbo Drive keeps the first <html>'s attributes.
   Dark is the default; light and the accent variants are attribute overrides on the SAME element. */

/* Red Hat Display — latin-ext */
@font-face {
  font-family: 'Red Hat Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/red-hat-display-latin-ext-2346703f.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Red Hat Display — latin */
@font-face {
  font-family: 'Red Hat Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/red-hat-display-latin-c08a0ccc.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Red Hat Display — latin-ext */
@font-face {
  font-family: 'Red Hat Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/red-hat-display-latin-ext-2346703f.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Red Hat Display — latin */
@font-face {
  font-family: 'Red Hat Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/red-hat-display-latin-c08a0ccc.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Red Hat Mono — latin-ext */
@font-face {
  font-family: 'Red Hat Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/red-hat-mono-latin-ext-74164b09.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Red Hat Mono — latin */
@font-face {
  font-family: 'Red Hat Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/red-hat-mono-latin-830bdc3f.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Red Hat Mono — latin-ext */
@font-face {
  font-family: 'Red Hat Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/red-hat-mono-latin-ext-74164b09.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Red Hat Mono — latin */
@font-face {
  font-family: 'Red Hat Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/red-hat-mono-latin-830bdc3f.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Red Hat Text — latin-ext */
@font-face {
  font-family: 'Red Hat Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/red-hat-text-latin-ext-e8f13e7f.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Red Hat Text — latin */
@font-face {
  font-family: 'Red Hat Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/red-hat-text-latin-b3851a9e.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Red Hat Text — latin-ext */
@font-face {
  font-family: 'Red Hat Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/red-hat-text-latin-ext-e8f13e7f.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Red Hat Text — latin */
@font-face {
  font-family: 'Red Hat Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/red-hat-text-latin-b3851a9e.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Red Hat Text — latin-ext */
@font-face {
  font-family: 'Red Hat Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/red-hat-text-latin-ext-e8f13e7f.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Red Hat Text — latin */
@font-face {
  font-family: 'Red Hat Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/red-hat-text-latin-b3851a9e.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root, [data-theme] {
  color-scheme: dark;

  /* ---- Brand primitives (from Yūrei Brand Guidelines v1.0) ---- */
  --jet: #060608;
  --surface: #0B0B11;
  --white: #FFFFFF;
  --mist: #F4F4FF;
  --paper: #F4F4F8;
  --threat: #FF1F4B;
  --phosphor: #4DFFB4;
  --phosphor-ink: #007A52;     /* brand #00875A darkened to pass AA as text on paper */
  --ultraviolet: #A855FF;
  --ultraviolet-ink: #7C2BD9;

  /* ---- Neutrals ---- */
  --bg: var(--jet);
  --surface-1: #0B0B11;        /* cards, sidebar */
  --surface-2: #12121A;        /* hover, raised rows, inputs */
  --surface-3: #1A1A25;        /* pressed, selected, skeleton */
  --overlay: rgba(6, 6, 8, 0.72);
  --border: #1D1D28;
  --border-strong: #2C2C3A;
  --text: #F4F4FF;             /* 18.9:1 on surface-1 */
  --text-2: #B6B6C6;           /* 9.6:1 */
  --text-3: #8B8B9E;           /* 5.6:1 — the lowest text tone allowed */
  --text-inverse: #060608;

  /* ---- Accent (Phosphor by default) ---- */
  --accent: var(--phosphor);
  --accent-hover: #7DFFC8;
  --accent-press: #2EE89A;
  --accent-text: var(--phosphor);
  --accent-soft: rgba(77, 255, 180, 0.12);
  --accent-line: rgba(77, 255, 180, 0.4);
  --on-accent: #060608;
  --acc: var(--accent);        /* alias read by the animated ghost (yurei-ghost.js) */

  /* ---- Semantic ---- */
  --success: #3FD68B;   --success-soft: rgba(63, 214, 139, 0.14);
  --warning: #FFB224;   --warning-soft: rgba(255, 178, 36, 0.14);
  --danger:  #FF4D6A;   --danger-soft:  rgba(255, 77, 106, 0.14);
  --info:    #5AB0FF;   --info-soft:    rgba(90, 176, 255, 0.14);

  /* ---- Severity ---- */
  --sev-critical: #FF4D6A;  --sev-critical-soft: rgba(255, 77, 106, 0.16);
  --sev-high:     #FF8A3D;  --sev-high-soft:     rgba(255, 138, 61, 0.15);
  --sev-medium:   #FFC53D;  --sev-medium-soft:   rgba(255, 197, 61, 0.13);
  --sev-low:      #6CB6FF;  --sev-low-soft:      rgba(108, 182, 255, 0.14);
  --sev-info:     #A3A3B8;  --sev-info-soft:     rgba(163, 163, 184, 0.12);

  /* ---- Verdict ---- */
  --verdict-tp:     #FF6B84;
  --verdict-benign: #5AB0FF;
  --verdict-fp:     #A3A3B8;

  /* ---- Endpoint status ---- */
  --status-online:   #3FD68B;
  --status-offline:  #8B8B9E;
  --status-degraded: #FFB224;
  --status-isolated: #5AB0FF;

  /* ---- Actors: Defender (agent) and Analyst (person) are deliberately equal ---- */
  --actor-bg: var(--surface-2);
  --actor-border: var(--border-strong);
  --actor-fg: var(--text);
  --actor-marker: var(--text-2);

  /* ---- Focus ---- */
  --focus: var(--accent);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus);

  /* ---- Typography ---- */
  --font-display: "Red Hat Display", system-ui, sans-serif;
  --font-ui: "Red Hat Text", system-ui, sans-serif;
  --font-mono: "Red Hat Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-2xs: 11px;  --lh-2xs: 16px;
  --text-xs: 12px;   --lh-xs: 16px;
  --text-sm: 13px;   --lh-sm: 18px;
  --text-md: 14px;   --lh-md: 20px;   /* UI base */
  --text-lg: 16px;   --lh-lg: 24px;
  --text-xl: 20px;   --lh-xl: 26px;
  --text-2xl: 24px;  --lh-2xl: 30px;
  --text-3xl: 32px;  --lh-3xl: 36px;
  --text-4xl: 40px;  --lh-4xl: 44px;
  --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600; --weight-bold: 700;
  --tracking-display: -0.03em;
  --tracking-label: 0.08em;

  /* ---- Spacing (4 px base) ---- */
  --space-0: 0; --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px;

  /* ---- Radius ---- */
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-pill: 999px;

  /* ---- Elevation (dark relies on borders; shadows only for floating layers) ---- */
  --shadow-1: 0 1px 0 rgba(0, 0, 0, 0.4);
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--border-strong);
  --shadow-3: 0 24px 72px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--border-strong);

  /* ---- Motion ---- */
  --dur-fast: 120ms; --dur: 200ms; --dur-slow: 320ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* ---- Layout ---- */
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --content-max: 1360px;
  --z-sticky: 10; --z-drawer: 40; --z-popover: 50; --z-toast: 70;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: var(--paper);
  --surface-1: #FFFFFF;
  --surface-2: #F7F7FA;
  --surface-3: #ECECF2;
  --overlay: rgba(11, 11, 17, 0.45);
  --border: #E3E3EB;
  --border-strong: #C9C9D5;
  --text: #0B0B11;
  --text-2: #3E3E4B;
  --text-3: #5E5E6D;
  --text-inverse: #FFFFFF;

  --accent: var(--phosphor-ink);
  --accent-hover: #006644;
  --accent-press: #005237;
  --accent-text: var(--phosphor-ink);
  --accent-soft: rgba(0, 122, 82, 0.1);
  --accent-line: rgba(0, 122, 82, 0.4);
  --on-accent: #FFFFFF;

  --success: #11734A;   --success-soft: rgba(17, 115, 74, 0.1);
  --warning: #8A5A00;   --warning-soft: rgba(196, 128, 0, 0.12);
  --danger:  #C8102E;   --danger-soft:  rgba(200, 16, 46, 0.08);
  --info:    #0B5CAD;   --info-soft:    rgba(11, 92, 173, 0.08);

  --sev-critical: #C8102E;  --sev-critical-soft: rgba(200, 16, 46, 0.09);
  --sev-high:     #A84300;  --sev-high-soft:     rgba(214, 90, 0, 0.1);
  --sev-medium:   #855C00;  --sev-medium-soft:   rgba(214, 155, 0, 0.14);
  --sev-low:      #1F5FAD;  --sev-low-soft:      rgba(31, 95, 173, 0.09);
  --sev-info:     #555566;  --sev-info-soft:     rgba(85, 85, 102, 0.09);

  --verdict-tp: #B3122F; --verdict-benign: #0B5CAD; --verdict-fp: #555566;
  --status-online: #11734A; --status-offline: #5E5E6D; --status-degraded: #8A5A00; --status-isolated: #0B5CAD;

  --shadow-1: 0 1px 2px rgba(11, 11, 17, 0.06);
  --shadow-2: 0 12px 32px rgba(11, 11, 17, 0.12), 0 0 0 1px var(--border);
  --shadow-3: 0 24px 72px rgba(11, 11, 17, 0.2), 0 0 0 1px var(--border);
}

[data-accent="ultraviolet"] {
  --accent: var(--ultraviolet);
  --accent-hover: #B976FF;
  --accent-press: #9638F5;
  --accent-text: #BB8CFF;
  --accent-soft: rgba(168, 85, 255, 0.14);
  --accent-line: rgba(168, 85, 255, 0.45);
  --on-accent: #060608;
}
[data-theme="light"][data-accent="ultraviolet"] {
  --accent: var(--ultraviolet-ink);
  --accent-hover: #6A1FC4;
  --accent-press: #5A17A8;
  --accent-text: var(--ultraviolet-ink);
  --accent-soft: rgba(124, 43, 217, 0.09);
  --accent-line: rgba(124, 43, 217, 0.4);
  --on-accent: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
  :root, [data-theme] { --dur-fast: 0ms; --dur: 0ms; --dur-slow: 0ms; }
}
