:root {
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;

  --container: 1100px;
  --container-narrow: 720px;
  --gutter: 1.25rem;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --duration-fast: 0.15s;
  --duration: 0.25s;

  --radius-sm: 3px;
  --radius: 4px;
  --radius-lg: 6px;

  /* Default theme */
  --bg: #1e1e1e;
  --bg-2: #252526;
  --bg-3: #2d2d30;
  --line: #3e3e42;
  --line-strong: #5a5a60;
  --ink: #cccccc;
  --ink-strong: #ffffff;
  --ink-muted: #9d9d9d;
  --ink-faint: #7a7a7a;
  --accent: #4fc1ff;
  --accent-2: #75bfff;
  --accent-deep: #007acc;
  --accent-soft: #0a3a5a;
  --accent-on: #001e33;
  --status-bg: #007acc;
  --status-fg: #ffffff;
  --selection-bg: #094771;
  --selection-fg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.55);
}

/* High contrast */
[data-theme="high-contrast"] {
  --bg: #000000;
  --bg-2: #0d0d0d;
  --bg-3: #161616;
  --line: #6a6a6a;
  --line-strong: #aaaaaa;
  --ink: #ffffff;
  --ink-strong: #ffffff;
  --ink-muted: #e8e8e8;
  --ink-faint: #c0c0c0;
  --accent: #ffff00;
  --accent-2: #ffff80;
  --accent-deep: #cccc00;
  --accent-soft: #2a2a00;
  --accent-on: #000000;
  --status-bg: #ffff00;
  --status-fg: #000000;
  --selection-bg: #ffff00;
  --selection-fg: #000000;
  --shadow-sm: 0 0 0 1px #aaaaaa;
  --shadow-md: 0 0 0 2px #ffffff;
}

/* Blue & yellow — protan / deutan */
[data-theme="blue-yellow"] {
  --bg: #1a2332;
  --bg-2: #243447;
  --bg-3: #2d3f56;
  --line: #3d4a5f;
  --line-strong: #5a6a82;
  --ink: #f0f4ff;
  --ink-strong: #ffffff;
  --ink-muted: #b8c4d6;
  --ink-faint: #8a96a8;
  --accent: #ffd23f;
  --accent-2: #ffe371;
  --accent-deep: #d4a700;
  --accent-soft: #3a3215;
  --accent-on: #1a1305;
  --status-bg: #4a90e2;
  --status-fg: #ffffff;
  --selection-bg: #ffd23f;
  --selection-fg: #1a2332;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Pink & teal — tritan */
[data-theme="pink-teal"] {
  --bg: #1f1f2e;
  --bg-2: #2a2a3e;
  --bg-3: #353548;
  --line: #3d3d55;
  --line-strong: #5d5d75;
  --ink: #f0e8f8;
  --ink-strong: #ffffff;
  --ink-muted: #c4b8d0;
  --ink-faint: #948aa8;
  --accent: #00d4aa;
  --accent-2: #4de3c8;
  --accent-deep: #00a888;
  --accent-soft: #053026;
  --accent-on: #001a14;
  --status-bg: #e91e63;
  --status-fg: #ffffff;
  --selection-bg: #e91e63;
  --selection-fg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Monochrome — achromatopsia */
[data-theme="monochrome"] {
  --bg: #1a1a1a;
  --bg-2: #2a2a2a;
  --bg-3: #353535;
  --line: #4a4a4a;
  --line-strong: #707070;
  --ink: #e8e8e8;
  --ink-strong: #ffffff;
  --ink-muted: #b8b8b8;
  --ink-faint: #888888;
  --accent: #d8d8d8;
  --accent-2: #ffffff;
  --accent-deep: #a0a0a0;
  --accent-soft: #2f2f2f;
  --accent-on: #000000;
  --status-bg: #707070;
  --status-fg: #ffffff;
  --selection-bg: #d8d8d8;
  --selection-fg: #1a1a1a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Light mode */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f5f5f5;
  --bg-3: #ebebeb;
  --line: #d0d0d0;
  --line-strong: #999999;
  --ink: #1a1a1a;
  --ink-strong: #000000;
  --ink-muted: #4a4a4a;
  --ink-faint: #6a6a6a;
  --accent: #0066cc;
  --accent-2: #0080ff;
  --accent-deep: #004d99;
  --accent-soft: #e0eeff;
  --accent-on: #ffffff;
  --status-bg: #0066cc;
  --status-fg: #ffffff;
  --selection-bg: #0066cc;
  --selection-fg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* BIOS */
[data-theme="bios"] {
  --bg: #0c1f80;
  --bg-2: #0a1d70;
  --bg-3: #142a90;
  --line: #c8c8c8;
  --line-strong: #c8c8c8;
  --ink: #ffffff;
  --ink-strong: #e8d870;
  --ink-muted: #cccccc;
  --ink-faint: #a8a8a8;
  --accent: #e8d870;
  --accent-2: #f0e898;
  --accent-deep: #6fa8aa;
  --accent-soft: #000033;
  --accent-on: #000000;
  --status-bg: #a8a8a8;
  --status-fg: #000000;
  --selection-bg: #a8a8a8;
  --selection-fg: #000000;
  --shadow-sm: 3px 3px #000000;
  --shadow-md: 4px 4px #000000;
}
