/* ============================================================
   SELF-HOSTED FONTS
============================================================ */
/* --- Geist --- */
@font-face { font-family: 'Geist'; src: url('./fonts/Geist-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: block; }
@font-face { font-family: 'Geist'; src: url('./fonts/Geist-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: 'Geist'; src: url('./fonts/Geist-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: block; }
@font-face { font-family: 'Geist'; src: url('./fonts/Geist-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: block; }
@font-face { font-family: 'Geist'; src: url('./fonts/Geist-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: block; }
@font-face { font-family: 'Geist'; src: url('./fonts/Geist-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: block; }
@font-face { font-family: 'Geist'; src: url('./fonts/Geist-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: block; }

/* --- JetBrains Mono --- */
@font-face { font-family: 'JetBrains Mono'; src: url('./fonts/JetBrainsMono-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: 'JetBrains Mono'; src: url('./fonts/JetBrainsMono-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: block; }
@font-face { font-family: 'JetBrains Mono'; src: url('./fonts/JetBrainsMono-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: block; }

/* 
========================================================================
AI DESIGN SYSTEM GUIDE: NODEDIFF
========================================================================
INSTRUCTIONS FOR AI AGENTS:
When building or updating pages for this application, you MUST strictly adhere to the following design system. Do NOT introduce new HEX codes, RGB values, or external font families.

1. TYPOGRAPHY:
   - Base Font (Body, paragraphs, UI elements): 'Geist', -apple-system, sans-serif
   - Code/Monospace Font: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace

2. COLOR PALETTE (Tokens):
   - Primary Background (Page Bg): var(--bg) #F8F8F8
   - Inverted Background: var(--bg-inverted) #0F172A
   - Primary Text (Dark): var(--text) #0F172A
   - Secondary Text (Gray): var(--text-dim) #334155
   - Borders/Dividers: var(--border) #E2E8F0
   - Interactive/Ink: var(--ink) #0F172A

3. COMPONENT RULES:
   - All text should use `var(--text)` on `var(--bg)` background.
   - All primary buttons or prominent links should use `var(--ink)`.
   - Structural boxes (like warnings or fixes) should use `var(--fix-bg)` to stand out softly.

4. CSS FILE OWNERSHIP:
   - global.css   → tokens, reset, base typography, shared UI primitives, utilities
   - report.css   → all report page components (layout, TOC, sections, tables, fix-boxes, etc.)
   - app.css      → dashboard, billing, sidebar, navbar, dialogs

Use the CSS variables defined in the :root block below for ALL styling.
========================================================================
*/

/* ============================================================
       DESIGN TOKENS
============================================================ */
    :root {
      /* Backgrounds */
      --bg:               #F8F8F8;
      --bg-alt:           #FFFFFF;
      --bg-section:       #F2F2F2;
      --fix-bg:           #F0EEE8;
      --code-bg:          #0F172A;
      --silky-color:      linear-gradient(160deg, #FFFFFF 0%, #F6F8FA 100%);

      /* Inverted */
      --bg-inverted:      #0F172A;
      --bg-inverted-alt:  #1E293B;

      /* Text */
      --text:             #0F172A;
      --text-dim:         #334155;
      --gray:             #64748B;
      --gray-mid:         #94A3B8;
      --code-text:        #F1F5F9;
      --text-inverted:    #F1F5F9;

      /* Ink - all interactive elements */
      --ink:              #0F172A;
      --ink-hover:        #1E293B;
      --ink-dim:          rgba(15,23,42,0.06);

      /* Borders */
      --border:           #E2E8F0;
      --border-inverted:  #2A3A50;

      /* Score / semantic colors - the ONLY colors */
      --red:              #DC2626;
      --amber:            #D97706;
      --green:            #16A34A;
      --red-bg:           #FEF2F2;
      --red-text:         #991B1B;
      --green-bg:         #F0FDF4;
      --green-text:       #166534;

      /* Overlay */
      --overlay-bg:       rgba(0, 0, 0, 0.5);

      /* Typography */
      --text-display: clamp(3.5rem, 8vw, 5rem);
      --text-xl: clamp(1.7rem, 3.5vw, 2.75rem);
      --text-lg: clamp(1.5rem, 3vw, 2rem);
      --text-md: clamp(1.125rem, 2vw, 1.25rem);
      --text-base: 0.875rem;
      --text-sm: 0.75rem;
      
      --font:    'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      --mono:    'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

      /* Spacing (8px base grid) */
      --s1: 8px;  --s2: 16px; --s3: 24px;
      --s4: 32px; --s6: 48px; --s8: 64px;
      --section-py: clamp(48px, 8vh, 96px);

      /* Radius */
      --r: 4px;

      /* Nav height */
      --nav-h: 56px;
    }

    /* ============================================================
       RESET
    ============================================================ */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { overflow-x: clip; }
    html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
    img, svg { display: block; max-width: 100%; }
    a { color: inherit; text-decoration: none; }
    ul { list-style: none; }
    button { font-family: inherit; cursor: pointer; border: none; background: none; }

    /* ============================================================
       BASE
    ============================================================ */
    body {
      font-family: var(--font);
      background: var(--bg);
      color: var(--text-dim);
      font-size: var(--text-base);
      font-weight: 400;
      line-height: 1.65;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    /* ============================================================
       TYPOGRAPHY
    ============================================================ */
    h1 {
      font-size: var(--text-xl);
      font-weight: 800;
      line-height: 1.1;
      letter-spacing: -0.03em;
      color: var(--text);
    }
    h2 {
      font-size: var(--text-lg);
      font-weight: 700;
      line-height: 1.15;
      letter-spacing: -0.02em;
      color: var(--text);
    }
    h3 {
      font-size: var(--text-md);
      font-weight: 600;
      line-height: 1.25;
      letter-spacing: -0.01em;
      color: var(--text);
    }

    /* ============================================================
       COMPONENTS (Shared)
    ============================================================ */
    .nav__logo {
      font-family: var(--font);
      font-size: var(--text-md);
      font-weight: 600;
      letter-spacing: -0.04em;
      color: var(--text);
      text-decoration: none;
      flex-shrink: 0;
    }
    code, pre {
      font-family: var(--mono);
      font-size: 0.75rem;
    }

    /* ── Scrollbar Auto-Hide ────────────────────────────────────── */
    :root {
      --scroll-thumb-color: var(--gray);
    }

    /* Firefox */
    * {
      scrollbar-width: thin;
      scrollbar-color: var(--scroll-thumb-color, var(--gray-mid)) transparent;
    }

    *::-webkit-scrollbar { width: 6px; height: 6px; }
    *::-webkit-scrollbar-track { background: var(--bg); }
    *::-webkit-scrollbar-thumb {
      background: var(--scroll-thumb-color, var(--gray-mid));
      border-radius: 99px;
    }
    
    *::-webkit-scrollbar-button:single-button {
      background-color: var(--bg);
      display: block;
      height: 6px;
      width: 6px;
    }
    
    *::-webkit-scrollbar-button:single-button:vertical:decrement {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239ca3af"><path d="M7 14l5-5 5 5z"/></svg>');
      background-size: 6px;
      background-position: center;
      background-repeat: no-repeat;
    }
    
    *::-webkit-scrollbar-button:single-button:vertical:increment {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239ca3af"><path d="M7 10l5 5 5-5z"/></svg>');
      background-size: 6px;
      background-position: center;
      background-repeat: no-repeat;
    }


    /* ── Utilities ─────────────────────────────────────────────────── */
    .hidden { display: none !important; }

    .hide-mobile { display: inline; }
    .hide-desktop { display: none; }

    @media (max-width: 768px) {
      .hide-mobile { display: none !important; }
      .hide-desktop { display: inline !important; }
    }

    /* ── UI Overlays ───────────────────────────────────────────────── */
    .ui-overlay {
      position: fixed;
      inset: 0;
      background: var(--overlay-bg);
      transition: opacity 350ms ease;
    }

    /* Native HTML dialog overlays */
    dialog::backdrop {
      background: var(--overlay-bg);
    }
