/* Design tokens. Every stylesheet and scoped style takes its colours, radii, shadows and motion from here. The few
   literals elsewhere are the logo mark's own colours, the black and white of masks, backdrops and scroll shadows, and
   fallbacks. The header and the footer are also exported on their own (src/pages/shared), where the host page
   supplies the tokens: a token added here that they use must carry a fallback there. */
:root {
  /* Grounds and surfaces: one pure-grey ramp in even lightness steps (about 3 L* apart). A surface is always lighter
     than the ground or band it sits on, so "lighter" means "nearer" on every page. */
  --color-bg:             #111111;                 /* page ground; the well of a text input */
  --color-bg-alt:         #171717;                 /* alternate bands, the footer; a pressed button */
  --color-surface:        #1c1c1c;                 /* cards, panels, popovers, code blocks, plain buttons */
  --color-surface-raised: #222222;                 /* hover of a surface; a button that stands on a surface */
  --color-surface-high:   #292929;                 /* the primary button, badges; hover of a raised surface */

  /* Lines are white at a fixed alpha, so one hairline has the same weight on every step of the ramp. */
  --color-border:         rgb(255 255 255 / 0.11); /* hairlines: rules, dividers, card edges */
  --color-border-strong:  rgb(255 255 255 / 0.2);  /* capture frames, header rules of tables, emphasised edges */
  --color-border-control: rgb(255 255 255 / 0.38); /* boundaries of controls: at least 3:1 against every step above */

  --color-text-strong:    #f2f2f2;                 /* the primary button label, selected text */
  --color-text:           #e0e0e0;
  --color-text-muted:     #a3a3a3;                 /* at least 5.7:1 on every surface above */
  --color-text-faint:     #7e7e7e;                 /* separators and other marks that carry no text of their own */

  --color-link:           #6fa8c7;
  --color-link-hover:     #8ec4df;
  --color-accent:         #8ab4c7;                 /* the quiet second accent: note rules, list numerals */
  --color-orange:         #c44d28;                 /* the brand accent, for rules and marks (3.6:1 to 4:1: not for text) */
  --color-orange-bright:  #e87a54;                 /* the brand accent as text */

  --color-code-bg:        rgb(255 255 255 / 0.07); /* inline code: a tint, so it holds on bands, cards and table heads */
  --color-table-head:     rgb(255 255 255 / 0.045);
  --color-hover:          rgb(255 255 255 / 0.04); /* hover tint of a row in a menu */
  --color-badge:          var(--color-surface-high);
  --color-badge-text:     #c4c4c4;
  --color-notice-bg:      #2a2418;                 /* notices: the licence warnings, the macOS preview badge */
  --color-notice-border:  #6a5632;
  --color-notice-text:    #e8c68c;
  --color-selection:      rgb(196 77 40 / 0.45);   /* the brand orange behind selected text */
  --color-scrollbar:      #6e6e6e;                 /* the scrollbar thumb: 3:1 on the page, a band and a surface */

  --font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;

  --size-xs: 0.75rem;
  --size-sm: 0.875rem;
  --size-base: 1rem;
  --size-lg: 1.125rem;
  --size-xl: 1.5rem;
  --size-2xl: 2rem;
  --size-3xl: 3rem;

  /* Tracking follows size: light display type is drawn in, small capitals are let out. */
  --tracking-display: -0.015em;                    /* light headings from 2.5rem */
  --tracking-title:   -0.01em;                     /* headings from 1.5rem */
  --tracking-eyebrow:  0.12em;                     /* uppercase mono eyebrows, kickers and labels */
  --tracking-label:    0.08em;                     /* uppercase mono terms in lists and tabs */

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  --radius-sm: 3px;                                /* inline code, badges */
  --radius-md: 4px;                                /* controls, cards, panels, code blocks */
  --radius-lg: 6px;                                /* capture frames, the stage, dialogs */

  /* Shadows are black only and layered: a tight contact shadow under a wider soft one. A control adds a lit top edge. */
  --shadow-control: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 1px 2px rgb(0 0 0 / 0.35);
  --shadow-pressed: inset 0 1px 2px rgb(0 0 0 / 0.45);
  --shadow-popover: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 28px -6px rgb(0 0 0 / 0.55);
  --shadow-capture: 0 1px 1px rgb(0 0 0 / 0.35), 0 6px 12px -2px rgb(0 0 0 / 0.3), 0 18px 40px -8px rgb(0 0 0 / 0.38);

  --duration: 140ms;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);

  --max-width: 68rem;
  --measure: 44rem;                                /* lead and marketing copy (1.125rem and larger): about 85 characters */
  --measure-text: 40rem;                           /* running text at body size on reading pages: about 88 characters */
  --header-height: 3.675rem;
}
