/* ==========================================================================
   nullen.cc — theme
   Design tokens: color, type, shape, elevation, spacing, motion.
   Loaded before every other stylesheet so components can consume the
   variables. Nothing in this file renders anything.

   Themes
   ------
   The active theme lives on <html data-theme="light|dark">.
   `data-theme-default="auto"` follows the operating system; any other value
   pins the theme (the tool page pins "dark").

   Palette idea
   ------------
   Ink black, paper white and a single electric lime. Everything else is a
   neutral step, so the accent always means the same thing: "this is the
   thing you act on".
   ========================================================================== */

/* ---------- Light theme ---------- */
:root {
  /* Canvas and surfaces */
  --bg: #ffffff;
  --bg-alt: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #f4f5f2;
  --surface-3: #ebece8;
  --surface-sunken: #fafbf9;

  /* Ink */
  --ink: #0b0c0e;
  --ink-2: #23262b;
  --muted: #5c626c;
  --muted-2: #8a9099;

  /* Lines */
  --line: #e7e9e4;
  --line-strong: #d3d6cf;

  /* Brand accent */
  --accent: #6fdc63;          /* fills: buttons, bars, highlights */
  --accent-hover: #86e87b;
  --accent-text: #2f7526;    /* text and icons on light surfaces */
  --accent-soft: #e7f8e4;
  --accent-contrast: #0b0c0e; /* text on an accent fill */
  --accent-line: rgba(47, 117, 38, 0.28);

  /* A soft wash used for hover states that need to work in both themes */
  --wash: rgba(11, 12, 14, 0.045);

  /* Inverted panels — always dark, in every theme */
  --panel-bg: #0b0c0e;
  --panel-ink: #ffffff;
  --panel-muted: #9aa0aa;
  --panel-line: rgba(255, 255, 255, 0.14);
  --panel-accent: #6fdc63;

  /* Code and terminal surfaces — always dark, in every theme */
  --code-bg: #0b0c0e;
  --code-raised: #15181d;
  --code-fg: #e6e8ec;
  --code-muted: #6c727d;
  --code-line: rgba(255, 255, 255, 0.1);
  --code-null: #ff7a85;
  --code-null-bg: rgba(255, 122, 133, 0.15);
  --code-key: #8ad7ff;

  /* Chrome */
  --header-bg: rgba(255, 255, 255, 0.78);
  --header-line: rgba(11, 12, 14, 0.09);
  --footer-bg: #0b0c0e;
  --footer-ink: #ffffff;
  --footer-muted: #8a9099;
  --footer-line: rgba(255, 255, 255, 0.12);

  /* Decorative */
  --glow: rgba(111, 220, 99, 0.32);
  --grid-line: rgba(11, 12, 14, 0.05);
  --beam: rgba(111, 220, 99, 0.16);

  /* Feedback */
  --danger-bg: rgba(255, 122, 133, 0.1);
  --danger-border: rgba(255, 122, 133, 0.35);
  --danger-fg: #b0303a;

  /* Typography */
  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, "Liberation Mono", monospace;

  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;

  /* Fluid display sizes */
  --text-hero: clamp(42px, 6.4vw, 82px);
  --text-display: clamp(32px, 4.4vw, 56px);
  --text-section: clamp(28px, 3.6vw, 44px);
  --text-support: clamp(34px, 4.6vw, 56px);

  /* Shape */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(11, 12, 14, 0.05);
  --shadow: 0 12px 30px rgba(11, 12, 14, 0.08);
  --shadow-md: 0 22px 50px rgba(11, 12, 14, 0.12);
  --shadow-lg: 0 40px 90px rgba(11, 12, 14, 0.16);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-11: 44px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Layout */
  --wrap: 1200px;
  --gutter: 24px;
  --header-height: 76px;

  /* Motion */
  --duration-fast: 0.15s;
  --duration: 0.2s;
  --duration-slow: 0.55s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Stacking */
  --z-header: 10;
  --z-dropdown: 20;
  --z-toast: 50;
  --z-skip: 100;
}

/* ---------- Dark theme ---------- */
:root[data-theme="dark"] {
  /* Canvas and surfaces */
  --bg: #0b0c0e;
  --bg-alt: #101215;
  --surface: #121418;
  --surface-2: #181b20;
  --surface-3: #1f232a;
  --surface-sunken: #0f1114;

  /* Ink */
  --ink: #f4f5f7;
  --ink-2: #cfd3d9;
  --muted: #9aa1ac;
  --muted-2: #6f757f;

  /* Lines */
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Brand accent */
  --accent: #6fdc63;
  --accent-hover: #86e87b;
  --accent-text: #8df083;
  --accent-soft: rgba(111, 220, 99, 0.13);
  --accent-contrast: #0b0c0e;
  --accent-line: rgba(111, 220, 99, 0.4);

  /* A soft wash used for hover states that need to work in both themes */
  --wash: rgba(255, 255, 255, 0.07);

  /* Inverted panels */
  --panel-bg: #0b0c0e;
  --panel-ink: #ffffff;
  --panel-muted: #9aa0aa;
  --panel-line: rgba(255, 255, 255, 0.14);
  --panel-accent: #6fdc63;

  /* Code and terminal surfaces */
  --code-bg: #0b0c0e;
  --code-raised: #15181d;
  --code-fg: #e6e8ec;
  --code-muted: #6c727d;
  --code-line: rgba(255, 255, 255, 0.1);
  --code-null: #ff7a85;
  --code-null-bg: rgba(255, 122, 133, 0.15);
  --code-key: #8ad7ff;

  /* Chrome */
  --header-bg: rgba(11, 12, 14, 0.76);
  --header-line: rgba(255, 255, 255, 0.1);
  --footer-bg: #000000;
  --footer-ink: #ffffff;
  --footer-muted: #8a9099;
  --footer-line: rgba(255, 255, 255, 0.12);

  /* Decorative */
  --glow: rgba(111, 220, 99, 0.2);
  --grid-line: rgba(255, 255, 255, 0.045);
  --beam: rgba(111, 220, 99, 0.1);

  /* Feedback */
  --danger-bg: rgba(255, 122, 133, 0.12);
  --danger-border: rgba(255, 122, 133, 0.4);
  --danger-fg: #ff9aa2;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 22px 50px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 40px 90px rgba(0, 0, 0, 0.65);
}
