@layer global, composition, utility, block, exception;

:root {
  color-scheme: light;

  --color-ink: #0d0d0d;
  --color-ink-muted: #5f5f5f;
  --color-ink-subtle: #9a9a9a;
  --color-ink-hover: #2a2a2a;
  --color-surface: #ffffff;
  --color-surface-sunken: #f7f7f7;
  --color-surface-hover: #f5f5f5;
  --color-veil: rgba(255, 255, 255, .94);
  --color-fill: #f2f2f2;
  --color-fill-strong: #e9e9e9;
  --color-mark: #c9c9c9;
  --color-border: #ececec;
  --color-border-strong: #d6d6d6;
  --color-scrim: rgba(15, 15, 15, .32);
  --color-danger: #d44c47;
  --color-danger-ink: #c23b36;
  --color-alert: #b4232a;
  --color-chart: #8b9cf4;
  --color-night: #111111;
  --color-night-ink: #e8e8e8;
  --color-night-muted: #9a9a9a;
  --color-night-fill: #2b2b2b;
  --color-night-fill-strong: #3a3a3a;
  --color-night-border: rgba(255, 255, 255, .08);
  --color-night-bright: #ffffff;
  --color-night-fill-hover: #4a4a4a;
  --color-logo-plate: #ffffff;

  --tint-gray-bg: #f1f1ef;
  --tint-gray-fg: #787774;
  --tint-brown-bg: #f4eeee;
  --tint-brown-fg: #9f6b53;
  --tint-orange-bg: #fbecdd;
  --tint-orange-fg: #c9660a;
  --tint-yellow-bg: #fbf3db;
  --tint-yellow-fg: #b17f22;
  --tint-green-bg: #edf3ec;
  --tint-green-fg: #448361;
  --tint-blue-bg: #e7f3f8;
  --tint-blue-fg: #2a6f96;
  --tint-purple-bg: #f4f0f7;
  --tint-purple-fg: #9065b0;
  --tint-pink-bg: #f9eef3;
  --tint-pink-fg: #c14c8a;
  --tint-red-bg: #fdebec;
  --tint-red-fg: #d44c47;

  --hue-bg-lightness: .93;
  --hue-bg-chroma: .05;
  --hue-line-lightness: .85;
  --hue-line-chroma: .09;
  --hue-fg-lightness: .5;
  --hue-fg-chroma: .16;

  --font-sans: "Google Sans", system-ui, Arial, sans-serif;
  --font-code: "Google Sans Code", ui-monospace, monospace;

  --text-2xs: 11px;
  --text-xs: 12px;
  --text-s: 13px;
  --text-m: 14px;
  --text-base: 16px;
  --text-l: 19px;
  --text-xl: 23px;
  --text-2xl: 28px;
  --text-title: clamp(30px, 4vw, 40px);
  --text-3xl: clamp(28px, 4vw, 46px);
  --text-4xl: clamp(40px, 6.4vw, 76px);

  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-loose: 1.6;

  --tracking-tight: -.02em;
  --tracking-tighter: -.035em;
  --tracking-code: .5em;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --space-4xs: 2px;
  --space-3xs: 4px;
  --space-2xs: 6px;
  --space-xs: 8px;
  --space-s: 12px;
  --space-m: 16px;
  --space-l: 20px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;
  --space-5xl: 96px;
  --space-6xl: 120px;
  --gutter: clamp(16px, 5vw, 32px);

  --radius-xs: 4px;
  --radius-s: 6px;
  --radius-m: 8px;
  --radius-l: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-pill: 999px;

  --control-s: 28px;
  --control-m: 32px;
  --control-l: 40px;
  --control-touch: 44px;

  --shadow-ring: 0 0 0 1px var(--color-border);
  --shadow-press: 0 1px 3px rgba(0, 0, 0, .12);
  --shadow-raise: 0 8px 24px -16px rgba(0, 0, 0, .25);
  --shadow-pop: var(--shadow-ring), 0 12px 36px -10px rgba(0, 0, 0, .2);
  --shadow-drawer: var(--shadow-ring), -24px 0 60px -24px rgba(0, 0, 0, .2);
  --shadow-modal: 0 24px 80px -20px rgba(0, 0, 0, .35);
  --shadow-window: 0 40px 80px -50px rgba(0, 0, 0, .25);
  --shadow-sidebar: 24px 0 60px -24px rgba(0, 0, 0, .25);
  --shadow-stage: 0 0 0 1px var(--color-night-border), 0 -24px 80px -24px rgba(0, 0, 0, .5);
  --shadow-cover: 0 1px 2px rgba(0, 0, 0, .08), 0 8px 20px -8px rgba(0, 0, 0, .25);

  --z-raised: 1;
  --z-sticky: 5;
  --z-popover: 8;
  --z-nav: 20;
  --z-drawer: 20;
  --z-sidebar: 30;
  --z-menu: 40;
  --z-tooltip: 60;
  --z-modal: 70;
  --z-toast: 80;

  --duration-fast: .12s;
  --duration-base: .2s;
  --duration-slow: .5s;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.5, 0, .2, 1);
  --delay-busy: .15s;

  --measure: 68ch;
  --measure-narrow: 440px;
  --measure-lede: 560px;
  --measure-title: 980px;
  --size-thumb-l: 56px;
  --size-thumb-xl: 72px;
  --size-logo-max: 180px;
  --size-cell-title: 360px;
  --size-histogram: 44px;
  --size-range-thumb: 16px;
  --size-range-value: 88px;
  --wrapper-max: 1240px;
  --page-max: 1180px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-ink: #ececec;
  --color-ink-muted: #a3a3a3;
  --color-ink-subtle: #737373;
  --color-ink-hover: #d6d6d6;
  --color-surface: #161616;
  --color-surface-sunken: #1d1d1d;
  --color-surface-hover: #242424;
  --color-veil: rgba(22, 22, 22, .9);
  --color-fill: #262626;
  --color-fill-strong: #303030;
  --color-mark: #4a4a4a;
  --color-border: #2c2c2c;
  --color-border-strong: #3a3a3a;
  --color-scrim: rgba(0, 0, 0, .55);
  --color-night: #0c0c0c;
  --tint-gray-bg: #2f2f2f;
  --tint-gray-fg: #9b9b9b;
  --tint-brown-bg: #3f2e26;
  --tint-brown-fg: #ba856f;
  --tint-orange-bg: #4a3121;
  --tint-orange-fg: #d0874f;
  --tint-yellow-bg: #46391f;
  --tint-yellow-fg: #ca9849;
  --tint-green-bg: #1f3a2b;
  --tint-green-fg: #5fae80;
  --tint-blue-bg: #183447;
  --tint-blue-fg: #8ab6e6;
  --tint-purple-bg: #35283f;
  --tint-purple-fg: #a87bd8;
  --tint-pink-bg: #44263a;
  --tint-pink-fg: #d4659f;
  --tint-red-bg: #4a2623;
  --tint-red-fg: #e06660;
  --hue-bg-lightness: .31;
  --hue-bg-chroma: .06;
  --hue-line-lightness: .4;
  --hue-line-chroma: .08;
  --hue-fg-lightness: .82;
  --hue-fg-chroma: .12;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --color-ink: #ececec;
    --color-ink-muted: #a3a3a3;
    --color-ink-subtle: #737373;
    --color-ink-hover: #d6d6d6;
    --color-surface: #161616;
    --color-surface-sunken: #1d1d1d;
    --color-surface-hover: #242424;
    --color-veil: rgba(22, 22, 22, .9);
    --color-fill: #262626;
    --color-fill-strong: #303030;
    --color-mark: #4a4a4a;
    --color-border: #2c2c2c;
    --color-border-strong: #3a3a3a;
    --color-scrim: rgba(0, 0, 0, .55);
    --color-night: #0c0c0c;
    --tint-gray-bg: #2f2f2f;
    --tint-gray-fg: #9b9b9b;
    --tint-brown-bg: #3f2e26;
    --tint-brown-fg: #ba856f;
    --tint-orange-bg: #4a3121;
    --tint-orange-fg: #d0874f;
    --tint-yellow-bg: #46391f;
    --tint-yellow-fg: #ca9849;
    --tint-green-bg: #1f3a2b;
    --tint-green-fg: #5fae80;
    --tint-blue-bg: #183447;
    --tint-blue-fg: #8ab6e6;
    --tint-purple-bg: #35283f;
    --tint-purple-fg: #a87bd8;
    --tint-pink-bg: #44263a;
    --tint-pink-fg: #d4659f;
    --tint-red-bg: #4a2623;
    --tint-red-fg: #e06660;
    --hue-bg-lightness: .31;
    --hue-bg-chroma: .06;
    --hue-line-lightness: .4;
    --hue-line-chroma: .08;
    --hue-fg-lightness: .82;
    --hue-fg-chroma: .12;
  }
}
