/* untrust design tokens. Custom properties only: no selectors beyond the theme switch, no
   layout. Copy this file as is into another codebase (the docs site, the console) and map
   its names onto that codebase's own variables. The values are the marketing site's
   (site/v2.css); tools/check_design_tokens.py fails if the two drift apart.

   Themes: light is the default. Dark applies when the system prefers dark, unless the root
   element carries data-theme="light"; data-theme="dark" forces dark. A codebase with its own
   theme switch (a class, another attribute) repeats the dark block under its own selector. */

:root{
  color-scheme:light;

  /* surfaces */
  --ut-bg:#F7F7F5;            /* page */
  --ut-bg-alt:#EFEFEC;        /* alternate band, image wells */
  --ut-surface:#FFFFFF;       /* cards, panels, inputs */
  --ut-chip:#E9EAEE;          /* inline code, window bars, quiet fills */
  --ut-line:#E1E1DC;          /* every border and rule */
  --ut-grid:rgba(22,24,29,.045); /* the faint 28px grid behind the hero */

  /* text */
  --ut-text:#16181D;          /* headings and body emphasis */
  --ut-text-2:#4C5059;        /* body */
  --ut-text-3:#666A73;        /* captions, labels; 4.5:1 on --ut-bg */

  /* accent (cobalt) */
  --ut-accent:#2F55D4;
  --ut-accent-hover:#2445B8;
  --ut-accent-wash:rgba(47,85,212,.07);
  --ut-on-accent:#FFFFFF;

  /* status */
  --ut-bad:#B4321F;
  --ut-ok:#1A7350;
  --ut-warn:#915E07;

  /* severity: five levels for findings. critical is --ut-bad, medium is --ut-warn. */
  --ut-sev-high:#A34A0A;      /* orange, between bad and warn */
  --ut-sev-low:#0B6E8A;       /* teal blue, not the cobalt accent */
  --ut-sev-info:#5A5F69;      /* neutral */
  /* washes: the tint behind a severity or status chip */
  --ut-bad-wash:rgba(180,50,31,.10);
  --ut-sev-high-wash:rgba(163,74,10,.10);
  --ut-warn-wash:rgba(145,94,7,.10);
  --ut-sev-low-wash:rgba(11,110,138,.10);
  --ut-sev-info-wash:rgba(90,95,105,.10);
  --ut-ok-wash:rgba(26,115,80,.10);

  /* elevation */
  --ut-shadow:0 1px 2px rgba(22,24,29,.04),0 8px 24px rgba(22,24,29,.06);

  /* type */
  --ut-font-display:"Space Grotesk",sans-serif;          /* headings, 600 to 700 */
  --ut-font-body:"IBM Plex Sans",system-ui,sans-serif;    /* body 400, UI 500 to 600 */
  --ut-font-mono:"IBM Plex Mono",ui-monospace,monospace;  /* code, eyebrows, labels */
  --ut-text-base:16px;
  --ut-leading:1.6;
  --ut-h1:clamp(32px,4vw,44px);     /* a content page's title; the homepage hero goes to 56px */
  --ut-h2:clamp(28px,3.6vw,42px);   /* a section heading */
  --ut-h2-doc:22px;                 /* a heading inside a content page */
  --ut-h3:17px;
  --ut-small:14px;
  --ut-eyebrow:12px;                /* mono, uppercase, .14em tracking, accent */
  --ut-label:11.5px;                /* mono, uppercase, .12em tracking, --ut-text-3 */
  --ut-tracking-display:-.03em;

  /* space: steps used for padding and gaps */
  --ut-space-1:4px;
  --ut-space-2:8px;
  --ut-space-3:12px;
  --ut-space-4:16px;
  --ut-space-5:24px;
  --ut-space-6:32px;
  --ut-space-7:48px;
  --ut-space-8:88px;                /* vertical padding of a section; 60px on phones */

  /* radius */
  --ut-radius-xs:5px;               /* inline code */
  --ut-radius-sm:9px;               /* buttons, inputs, icon buttons */
  --ut-radius-md:12px;              /* terminals, image frames */
  --ut-radius-lg:14px;              /* small cards */
  --ut-radius-xl:18px;              /* panels */
  --ut-radius-pill:999px;           /* tags, chips */

  /* layout */
  --ut-page-max:1180px;             /* a content column; the homepage grows to 1560px */
  --ut-page-pad:24px;               /* 16px at 640px and narrower */
  --ut-prose-max:820px;             /* a text page */
  --ut-nav-height:64px;             /* 56px at 820px and narrower */

  /* terminal: the same in both themes */
  --ut-term-bg:#0D1117;
  --ut-term-bar:#161B22;
  --ut-term-line:#30363D;
  --ut-term-text:#C9D1D9;
  --ut-term-dim:#7D8590;
  --ut-term-red:#FF7B72;
  --ut-term-green:#56D364;
  --ut-term-yellow:#E3B341;
  --ut-term-blue:#79C0FF;
}

@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  color-scheme:dark;
  --ut-bg:#16181C;
  --ut-bg-alt:#1A1C21;
  --ut-surface:#1E2126;
  --ut-chip:#262A31;
  --ut-line:#2B2E35;
  --ut-grid:rgba(255,255,255,.03);
  --ut-text:#E4E6EA;
  --ut-text-2:#A3A8B2;
  --ut-text-3:#959AA4;
  --ut-accent:#7E9BFF;
  --ut-accent-hover:#9DB2FF;
  --ut-accent-wash:rgba(126,155,255,.09);
  --ut-on-accent:#0F1424;
  --ut-bad:#F08B78;
  --ut-ok:#5FD3A2;
  --ut-warn:#E8B64C;
  --ut-sev-high:#F2A05E;
  --ut-sev-low:#6CC5DD;
  --ut-sev-info:#9AA0AA;
  --ut-bad-wash:rgba(240,139,120,.12);
  --ut-sev-high-wash:rgba(242,160,94,.12);
  --ut-warn-wash:rgba(232,182,76,.12);
  --ut-sev-low-wash:rgba(108,197,221,.12);
  --ut-sev-info-wash:rgba(154,160,170,.12);
  --ut-ok-wash:rgba(95,211,162,.12);
  --ut-shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.25);
}}

:root[data-theme="dark"]{
  color-scheme:dark;
  --ut-bg:#16181C;
  --ut-bg-alt:#1A1C21;
  --ut-surface:#1E2126;
  --ut-chip:#262A31;
  --ut-line:#2B2E35;
  --ut-grid:rgba(255,255,255,.03);
  --ut-text:#E4E6EA;
  --ut-text-2:#A3A8B2;
  --ut-text-3:#959AA4;
  --ut-accent:#7E9BFF;
  --ut-accent-hover:#9DB2FF;
  --ut-accent-wash:rgba(126,155,255,.09);
  --ut-on-accent:#0F1424;
  --ut-bad:#F08B78;
  --ut-ok:#5FD3A2;
  --ut-warn:#E8B64C;
  --ut-sev-high:#F2A05E;
  --ut-sev-low:#6CC5DD;
  --ut-sev-info:#9AA0AA;
  --ut-bad-wash:rgba(240,139,120,.12);
  --ut-sev-high-wash:rgba(242,160,94,.12);
  --ut-warn-wash:rgba(232,182,76,.12);
  --ut-sev-low-wash:rgba(108,197,221,.12);
  --ut-sev-info-wash:rgba(154,160,170,.12);
  --ut-ok-wash:rgba(95,211,162,.12);
  --ut-shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.25);
}
