/* Kassandra tokens, from the Kassandra Styleguide in Figma (Brandkit page):
   the brand palette, the dark and light roles, and the Utopia fluid type and
   space scales (18px/1.2 at 320px to 20px/1.25 at 1240px). */

:root {
  --klavender: #EE82EE;
  --kpurple: #B882EE;
  --kpink: #EE82B8;
  --strong-klavender: #E65CE7;
  --strong-kpurple: #A867EB;
  --strong-kpink: #EA5EA4;
  --white: #FFFFFF;
  --light-kgrey: #EAE3EA;
  --mid-kgrey: #ACA7AC;
  --dim-kgrey: #6C676C;
  --kgrey: #3F3C3F;
  --kblack: #1E1D1E;
  --kgreen: #49DE78;
  --strong-kgreen: #007329;
  --kred: #FF3532;
  --strong-kred: #D00013;

  --font-sans: "Inter Variable", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--2: clamp(0.7813rem, 0.7747rem + 0.0326vw, 0.8000rem);
  --step--1: clamp(0.9375rem, 0.9158rem + 0.1087vw, 1.0000rem);
  --step-0: clamp(1.1250rem, 1.0815rem + 0.2174vw, 1.2500rem);
  --step-1: clamp(1.3500rem, 1.2761rem + 0.3696vw, 1.5625rem);
  --step-2: clamp(1.6200rem, 1.5041rem + 0.5793vw, 1.9531rem);
  --step-3: clamp(1.9440rem, 1.7710rem + 0.8651vw, 2.4414rem);
  --step-4: clamp(2.3328rem, 2.0827rem + 1.2504vw, 3.0518rem);
  --step-5: clamp(2.7994rem, 2.4462rem + 1.7658vw, 3.8147rem);
  --step-6: clamp(3.3592rem, 2.8691rem + 2.4507vw, 4.7684rem);

  --space-3xs: 0.3125rem;
  --space-2xs: clamp(0.5625rem, 0.5408rem + 0.1087vw, 0.6250rem);
  --space-xs: clamp(0.8750rem, 0.8533rem + 0.1087vw, 0.9375rem);
  --space-s: clamp(1.1250rem, 1.0815rem + 0.2174vw, 1.2500rem);
  --space-m: clamp(1.6875rem, 1.6223rem + 0.3261vw, 1.8750rem);
  --space-l: clamp(2.2500rem, 2.1630rem + 0.4348vw, 2.5000rem);
  --space-xl: clamp(3.3750rem, 3.2446rem + 0.6522vw, 3.7500rem);
  --space-2xl: clamp(4.5000rem, 4.3261rem + 0.8696vw, 5.0000rem);
  --space-3xl: clamp(6.7500rem, 6.4891rem + 1.3043vw, 7.5000rem);

  /* Corners: the Figma file's Radius collection (Brandkit 06), and, for
     cards, the decision of Nov 13 (wiki/org/brand.md, Components): 14px on
     the front and pricing pages (--radius-card), 12px in the app
     (--radius-box below), 10px for rows and inputs (--radius-row). */
  --radius-xs: 2px;
  --radius-s: 5px;
  --radius-m: 10px;
  --radius-l: 20px;
  --radius-xl: 25px;
  --radius-card: 14px;
  --radius-pill: 999px;
  /* The app's own (signed-in pages), from the brand book: dense and fixed,
     so rows, menus and bars keep their size at every width (body 14px,
     small text never under 11px). Page titles, section headings, reading
     text and the space between blocks stay on the fluid scales above.
     Corners: rows, items, inputs and controls 10px (the Brandkit's M);
     cards, menus and dialogs 12px (the brand book's cards, 12-14px). */
  --text-2xs: 11px;
  --text-xs: 12px;
  --text-s: 13px;
  --text-m: 14px;
  --text-l: 16px;
  --radius-row: 10px;
  --radius-box: 12px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 64px;
  /* Motion: the Figma Motion variables (Brandkit, Appendix · Motion reference). */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-ui: cubic-bezier(0.2, 1, 0.25, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);
  --dur-quick: 150ms;
  --dur-fast: 250ms;
  --dur-medium: 350ms;
  --dur-slow: 400ms;
  --dur-very-slow: 500ms;
  --stagger: 40ms;
}

/* Dark: the brand default. */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--kblack);
  /* One raised level, the Figma's Surface (Brandkit 03/04): cards, panels. */
  --surface: #292729;
  --card: #292729;
  --card-hover: #2F2D2F;
  --text: var(--white);
  --muted: var(--mid-kgrey);
  /* #908B90 on the background is 4.9:1, enough for small text. */
  --faint: #908B90;
  --border: var(--kgrey);
  --border-strong: #4D4A4D;
  --accent: var(--klavender);
  --accent-ink: var(--klavender);
  --accent-2: var(--kpurple);
  --on-accent: var(--kblack);
  --accent-wash: color-mix(in srgb, var(--klavender) 14%, transparent);
  --positive: var(--kgreen);
  --negative: var(--kred);
  --positive-wash: rgba(73, 222, 120, 0.16);
  --negative-wash: rgba(255, 53, 50, 0.16);
  --focus: var(--klavender);
  --glow: color-mix(in srgb, var(--klavender) 50%, transparent);
  --dim-title: #8B868B;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: var(--white);
  --surface: var(--white);
  --card: var(--white);
  --card-hover: #F7F2F7;
  --text: var(--kblack);
  --muted: var(--dim-kgrey);
  /* #747074 on white is 4.8:1. */
  --faint: #747074;
  --border: var(--light-kgrey);
  --border-strong: #D9D0D9;
  /* The styleguide's light roles (Figma, Brandkit 04): fills keep
     Klavender with Kblack on top, accent text is Accent ink #A433A6 (5.8:1
     on White; Strong Kpurple was 3.6:1), the focus ring Strong Kpurple,
     washes 14% Klavender and 16% green and red, as in dark. */
  --accent: var(--klavender);
  --accent-ink: #A433A6;
  --accent-2: var(--strong-kpurple);
  --on-accent: var(--kblack);
  --accent-wash: color-mix(in srgb, var(--klavender) 14%, transparent);
  --positive: var(--strong-kgreen);
  --negative: var(--strong-kred);
  --positive-wash: rgba(0, 115, 41, 0.16);
  --negative-wash: rgba(208, 0, 19, 0.16);
  --focus: var(--strong-kpurple);
  --glow: color-mix(in srgb, var(--klavender) 35%, transparent);
  --dim-title: #8E878E;
  --shadow: 0 16px 48px rgba(30, 29, 30, 0.12);
}

/* The terminal is dark in both themes (kai's Kassandra Dark). */
:root {
  --term-bg: #171617;
  --term-bar: #1E1D1E;
  --term-text: #FFFFFF;
  --term-muted: #ACA7AC;
  /* 4.6:1 on the terminal's background. */
  --term-faint: #8D888D;
  --term-primary: var(--klavender);
  --term-accent: var(--kpurple);
  --term-success: #49DE78;
  --term-warning: #F2B35B;
  --term-danger: #FF3532;
}
