/* GridFlow design tokens.
   Brand colours are sampled from the logo: #343494 (indigo), #4F50A3 (deep indigo), #7C7BC7 (lavender).
   Light values on :root; dark values for the system setting and for an explicit choice. */

:root {
  /* brand */
  --brand-900: #343494;
  --brand-700: #4f50a3;
  --brand-400: #7c7bc7;
  --brand-100: #eeeeff;

  /* surfaces and text */
  --bg: #f6f6f9;
  --surface: #ffffff;
  --surface-2: #f4f4f8;
  --surface-3: #ececf3;
  --border: #e4e4e7;
  --border-strong: #d4d4dc;
  --text: #18181b;
  --text-2: #52525b;
  --text-3: #71717a;

  /* interactive */
  --accent: #343494;
  --accent-hover: #4f50a3;
  --accent-ink: #ffffff;
  --accent-soft: #eeeeff;
  --accent-text: #343494;
  --focus: #4f50a3;
  --danger: #b42346;
  --danger-soft: #fdecef;
  --success: #15803d;

  /* preview */
  --cell: #eeeef6;
  --cell-hover: #e2e2f3;
  --cell-ink: #8a8aa0;
  --gap-stripe: rgb(124 123 199 / 0.22);
  --item-bg-l: 94%;
  --item-border-l: 52%;
  --item-text-l: 24%;

  /* code */
  --code-bg: #fbfbfd;
  --tok-selector: #343494;
  --tok-property: #0f6e9a;
  --tok-value: #9a4a0b;
  --tok-punct: #71717a;
  --tok-tag: #4f50a3;

  /* type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 20px;

  /* shape and space */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --shadow-sm: 0 1px 2px rgb(24 24 27 / 0.06);
  --shadow: 0 1px 2px rgb(24 24 27 / 0.06), 0 4px 12px rgb(24 24 27 / 0.06);

  --header-h: 56px;
  --control-h: 32px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-100: #23234a;
    --bg: #0b0c0f;
    --surface: #131418;
    --surface-2: #191a20;
    --surface-3: #22232b;
    --border: #26272f;
    --border-strong: #363742;
    --text: #f4f4f5;
    --text-2: #b4b4bd;
    --text-3: #8b8b96;
    --accent: #8f8ee3;
    --accent-hover: #a6a5ec;
    --accent-ink: #101114;
    --accent-soft: #23234a;
    --accent-text: #b3b2f0;
    --focus: #a6a5ec;
    --danger: #ff7f99;
    --danger-soft: #3a1820;
    --success: #4ade80;
    --cell: #1a1b23;
    --cell-hover: #23243a;
    --cell-ink: #6f6f86;
    --gap-stripe: rgb(143 142 227 / 0.16);
    --item-bg-l: 20%;
    --item-border-l: 64%;
    --item-text-l: 90%;
    --code-bg: #101115;
    --tok-selector: #b3b2f0;
    --tok-property: #7cc7ec;
    --tok-value: #f0b37a;
    --tok-punct: #8b8b96;
    --tok-tag: #a6a5ec;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 16px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --brand-100: #23234a;
  --bg: #0b0c0f;
  --surface: #131418;
  --surface-2: #191a20;
  --surface-3: #22232b;
  --border: #26272f;
  --border-strong: #363742;
  --text: #f4f4f5;
  --text-2: #b4b4bd;
  --text-3: #8b8b96;
  --accent: #8f8ee3;
  --accent-hover: #a6a5ec;
  --accent-ink: #101114;
  --accent-soft: #23234a;
  --accent-text: #b3b2f0;
  --focus: #a6a5ec;
  --danger: #ff7f99;
  --danger-soft: #3a1820;
  --success: #4ade80;
  --cell: #1a1b23;
  --cell-hover: #23243a;
  --cell-ink: #6f6f86;
  --gap-stripe: rgb(143 142 227 / 0.16);
  --item-bg-l: 20%;
  --item-border-l: 64%;
  --item-text-l: 90%;
  --code-bg: #101115;
  --tok-selector: #b3b2f0;
  --tok-property: #7cc7ec;
  --tok-value: #f0b37a;
  --tok-punct: #8b8b96;
  --tok-tag: #a6a5ec;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 16px rgb(0 0 0 / 0.3);
  color-scheme: dark;
}
