/* =====================================================================
   Design tokens — copied from Cloudflare's live dashboard design system
   "Kumo" (@cloudflare/kumo 2.19.0, MIT licence, Copyright 2026 Cloudflare),
   the same theme file dash.cloudflare.com loads (checked 19 Nov 2026).

   Light is the default. Dark turns on with <html data-mode="dark">.
   Never write a raw colour in a component: use these names.
   ===================================================================== */
:root {
  /* ---- text ---- */
  --text-default: oklch(21% 0.006 285.885);
  --text-inverse: oklch(97% 0 0);
  --text-strong: oklch(14.5% 0 0);
  --text-subtle: oklch(55.6% 0 0);
  --text-inactive: oklch(87% 0 0);
  --text-placeholder: oklch(70.8% 0 0);
  --text-brand: #f6821f;
  --text-link: oklch(42.4% 0.199 265.638);
  --text-info: oklch(42.4% 0.199 265.638);
  --text-success: oklch(43.2% 0.095 166.913);
  --text-danger: oklch(50.5% 0.213 27.518);
  --text-warning: oklch(59.7% 0.144 57.5);
  --text-badge-orange-subtle: oklch(47% 0.157 37.304);
  --text-badge-teal-subtle: oklch(43.7% 0.078 188.216);
  --text-badge-neutral-subtle: oklch(26.9% 0 0);
  --text-badge-inverted: #fff;
  --text-body: #313131;                    /* page copy colour on the live dashboard */

  /* ---- surfaces ---- */
  --canvas: oklch(98.75% 0 0);             /* page background */
  --elevated: oklch(98% 0 0);              /* layer-card frame, table header */
  --recessed: oklch(96% 0 0);              /* tab track, dialog backdrop */
  --base: #fff;                            /* cards, rows */
  --tint: oklch(97% 0 0);                  /* hover */
  --contrast: oklch(8.5% 0 0);             /* checked checkbox, tooltip */
  --overlay: oklch(97.5% 0 0);
  --control: #fff;                         /* inputs, menus */
  --interact: oklch(87% 0 0);
  --fill: oklch(92.2% 0 0);                /* neutral badge, meter track */
  --fill-hover: oklch(96.5% 0 0);
  --sidebar-active: oklch(96.5% 0 0);

  /* ---- brand + lines ---- */
  --brand: oklch(0.5772 0.2324 260);       /* primary buttons, focus rings, meters */
  --brand-hover: oklch(48.8% 0.243 264.376);
  --line: oklch(14.5% 0 0 / 0.1);          /* 1px ring round controls and cards */
  --hairline: oklch(93.5% 0 0);            /* row dividers */
  --focus: oklch(15% 0 0);
  --shadow-edge: oklch(0% 0 0 / 0.12);
  --shadow-drop: oklch(0% 0 0 / 0.08);

  /* ---- status ---- */
  --info: oklch(68.5% 0.169 237.323);
  --info-tint: oklch(93.2% 0.032 255.6 / 0.45);
  --warning: oklch(73.9% 0.177 58.2);
  --warning-tint: oklch(93.1% 0.107 94.6 / 0.2);
  --danger: oklch(63.7% 0.237 25.331);
  --danger-tint: oklch(93.6% 0.032 17.7 / 0.42);
  --success: oklch(59.6% 0.145 163.225);
  --success-tint: oklch(96.2% 0.043 156.7 / 0.57);
  --banner-info: oklch(93.2% 0.032 255.585 / 0.7);
  --banner-warning: oklch(97.3% 0.071 103.193);

  /* ---- badges ---- */
  --badge-red: oklch(57.7% 0.245 27.325);
  --badge-green: oklch(59.6% 0.145 163.225);
  --badge-orange: oklch(81.5% 0.197 76);
  --badge-purple: oklch(55.8% 0.288 302.321);
  --badge-teal: oklch(54.9% 0.096 184.565);
  --badge-blue: oklch(54.6% 0.245 262.881);
  --badge-neutral: oklch(55.6% 0 0);
  --badge-inverted: oklch(14.5% 0 0);

  /* ---- switch (Kumo uses fixed blues/neutrals here) ---- */
  --switch-on: oklch(62.3% 0.214 259.815);
  --switch-on-ring: oklch(54.6% 0.245 262.881);
  --switch-off: oklch(92.2% 0 0);
  --switch-off-ring: oklch(87% 0 0);

  /* ---- chart series (Cloudflare "sequential" palette) ---- */
  --series-1: #3E8EFF; --series-2: #E46E0A; --series-3: #29A456; --series-4: #F8528A;
  --series-5: #6B1687; --series-6: #BA8700; --series-7: #104858; --series-8: #FD5548;

  /* ---- type (Kumo text scale: base is 14px; font: General Sans from Fontshare) ---- */
  --font: "General Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --text-xs: 12px;   --lh-xs: 16px;
  --text-sm: 13px;   --lh-sm: 15.3px;
  --text-base: 14px; --lh-base: 21px;
  --text-lg: 16px;   --lh-lg: 24px;
  --text-title: 20px; --lh-title: 25px;    /* page heading */
  --text-stat: 24px;  --lh-stat: 30px;     /* metric number */
  --tracking: -0.01em;                     /* -0.16px at 16px, as measured */

  /* ---- shape (Tailwind v4 scale Kumo uses) ---- */
  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-full: 9999px;
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --ring: 0 0 0 1px var(--line);

  /* ---- layout (measured on dash.cloudflare.com) ---- */
  --sidebar-w: 260px;
  --topbar-h: 58px;
  --row-h: 34px;            /* sidebar item */
  --control-h: 36px;        /* button / input base */

  color-scheme: light;
}

:root[data-mode="dark"] {
  --text-default: oklch(97% 0 0);
  --text-inverse: oklch(20.5% 0 0);
  --text-strong: oklch(98.5% 0 0);
  --text-subtle: oklch(70.8% 0 0);
  --text-inactive: oklch(43.9% 0 0);
  --text-placeholder: oklch(55.6% 0 0);
  --text-link: oklch(70.7% 0.165 254.624);
  --text-info: oklch(70.7% 0.165 254.624);
  --text-success: oklch(90.5% 0.093 164.15);
  --text-danger: oklch(70.4% 0.191 22.216);
  --text-warning: oklch(75% 0.183 55.934);
  --text-badge-orange-subtle: oklch(90.1% 0.076 70.697);
  --text-badge-teal-subtle: oklch(91% 0.096 180.426);
  --text-badge-neutral-subtle: oklch(92.2% 0 0);
  --text-badge-inverted: #000;
  --text-body: oklch(92.2% 0 0);

  --canvas: oklch(10% 0 0);
  --elevated: oklch(12% 0 0);
  --recessed: oklch(15% 0 0);
  --base: oklch(17% 0 0);
  --tint: oklch(26.9% 0 0);
  --contrast: oklch(98.5% 0 0);
  --overlay: oklch(26.9% 0 0);
  --control: oklch(21% 0.006 285.885);
  --interact: oklch(37.1% 0 0);
  --fill: oklch(26.9% 0 0);
  --fill-hover: oklch(37.1% 0 0);
  --sidebar-active: oklch(21% 0 0);

  --brand: color-mix(in oklch, oklch(0.5772 0.2324 260), black 10%);
  --line: oklch(32% 0 0);
  --hairline: oklch(26.9% 0 0);
  --focus: oklch(93.5% 0 0);
  --shadow-edge: oklch(100% 0 0 / 0.1);
  --shadow-drop: oklch(0% 0 0 / 0.3);

  --warning: oklch(64.5% 0.168 50);
  --info-tint: oklch(38% 0.145 265.5 / 0.22);
  --warning-tint: oklch(35.3% 0.079 65 / 0.37);
  --danger: oklch(57.7% 0.245 27.325);
  --danger-tint: oklch(42.9% 0.176 28.7 / 0.17);
  --success: oklch(76.5% 0.177 163.223);
  --success-tint: oklch(39.3% 0.096 152.3 / 0.2);
  --banner-info: oklch(37.9% 0.146 265.522 / 0.5);
  --banner-warning: oklch(55.4% 0.135 66.442 / 0.5);

  --badge-red: oklch(50.5% 0.213 27.518);
  --badge-green: oklch(50.8% 0.118 165.612);
  --badge-purple: oklch(49.6% 0.265 301.924);
  --badge-teal: oklch(51.1% 0.096 186.391);
  --badge-blue: oklch(48.8% 0.243 264.376);
  --badge-neutral: oklch(43.9% 0 0);
  --badge-inverted: #fff;

  --switch-on: oklch(54.6% 0.245 262.881);
  --switch-on-ring: oklch(62.3% 0.214 259.815);
  --switch-off: oklch(37.1% 0 0);
  --switch-off-ring: oklch(43.9% 0 0);

  color-scheme: dark;
}
