/* Autica tokens. Colour is one flat palette: blue hero field, black page, near-black frames, white ink. */
:root {
  /* Spacing scale */
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;

  /* Type roles, desktop (60rem up). Mobile sizes are in the block below. Nothing under 18px. */
  --text-display: 4rem;       /* 64 h1 */
  --text-section: 2.75rem;    /* 44 h2 */
  --text-card: 1.75rem;       /* 28 #exposure result line, card and dialog titles */
  --text-title: 1.5rem;       /* 24 step heads, area names, limit lines */
  --text-wordmark: 1.5rem;    /* 24 */
  --text-lead: 1.25rem;       /* 20 hero sentence, ledes, step and area bodies */
  --text-md: 1.125rem;        /* 18 body, controls, nav, captions, chart words, labels */
  --text-legal: 1.125rem;     /* 18 the footer line */
  --leading-display: 1.02; --leading-section: 1.08; --leading-card: 1.2; --leading-title: 1.3;
  --leading-lead: 1.5; --leading-body: 1.55; --leading-legal: 1.45;
  --tracking-display: -0.032em; --tracking-section: -0.024em; --tracking-card: -0.015em; --tracking-title: -0.012em;
  --weight-text: 460; --weight-mark: 600;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --ease-in: cubic-bezier(0.4, 0, 1, 1); --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;
  --dur-hover: 180ms;                            /* nav link hover, on --ease-out */
  --dur-press: 200ms;                            /* pill hover and press, on --ease-quint */
  --dur-fade-out: 150ms;                         /* nav state out, menu close */
  --dur-settle: 450ms; --dur-settle-fade: 340ms; --stagger-settle: 80ms;   /* hero settle: a 16px entrance */
  --ease-reveal: cubic-bezier(0.58, 0, 0.2, 1); --ease-reveal-fade: cubic-bezier(0.42, 0, 0.2, 1);
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1); --ease-quint: cubic-bezier(0.23, 1, 0.32, 1); --ease-sine: cubic-bezier(0.445, 0.05, 0.55, 0.95); --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --dur-dialog: 280ms; --dur-dialog-out: 180ms;
  --rise-y: 56px; --rise-scale: 0.985; --dur-rise: 820ms; --dur-rise-fade: 300ms; --ease-rise: cubic-bezier(0.2, 0.9, 0.25, 1);
  --dur-item: 480ms; --delay-state: 100ms;
  --dur-swap-out: 180ms; --dur-swap-in: 420ms;   /* viewer overlays */
  --dur-copy: 280ms;                             /* active and inactive copy */
  --dur-pill: 300ms; --ease-pill: cubic-bezier(0.22, 0.8, 0.2, 1);
  --dur-poster: 300ms;                           /* poster to live canvas */
  --dur-act: 1.6s;                               /* hero acts A and B */

  /* Controls: 48px in the body, 40px for the two nav-pill controls (44px hit area) */
  --control: 48px; --control-s: 40px; --control-hit: 44px;

  /* Layout: frame container 1344, text container 1130, 12 columns, one 24px gap, 48px outer margin */
  --container: 84rem; --container-text: 70.625rem;
  --gutter: 48px; --gap-columns: 24px;
  --section-gap: 144px;   /* above a section */
  --section-gap-s: 96px;  /* below a section */
  --nav-offset: 16px; --nav-h: 60px;
  --nav-clear: 92px;      /* nav offset + nav height + 16px; a plain length, read by JS */

  /* Depth */
  --z-canvas: 0; --z-base: 1; --z-raised: 10; --z-dropdown: 100; --z-sticky: 200; --z-sticky-nav: 300; --z-modal: 400; --z-toast: 500; --z-tooltip: 600;

  /* Colour: flat fields only:
     the blue hero field, a black page, near-black frames, white ink, one blue accent and one green. */
  --color-paper: #000000;           /* the page */
  --color-paper-2: #1a1a1a;         /* frames, viewers, cards */
  --color-paper-3: #262626;         /* floating UI */
  --color-paper-4: #333333;
  --color-rule: #333333;            /* hairlines */
  --color-line: #808080;
  --color-ink: #ffffff;
  --color-ink-2: #cccccc;           /* white at 80% */
  --color-ink-3: #999999;           /* white at 60% */
  /* Roles: the attack path is white, the defense that holds is the green */
  --color-attack: #ffffff;
  --color-attack-hot: #ffffff;
  --color-defense: #0ae77a;
  --color-defense-hot: #9df5c6;
  --color-accent: #388cff;          /* second title lines, links, focus */
  /* The three areas share one white: the dust is a monochrome texture */
  --color-area-internal: #cccccc;
  --color-area-cloud: #cccccc;
  --color-area-identity: #cccccc;
  --color-dust-internal: #b3b3b3;
  --color-dust-cloud: #b3b3b3;
  --color-dust-identity: #b3b3b3;
  --color-dust-far: #666666;
  --color-light-internal: #1a1a1a;
  --color-light-cloud: #1a1a1a;
  --color-light-identity: #1a1a1a;
  /* The hero field is a flat blue; the close frame is near-black */
  --color-field-hero: #1019ec;
  --color-field-ink: #0d0d0d;
  --color-field-attack: #ffffff;
  --color-field-ember: #ffffff;
  --color-field-defense: #0ae77a;
  /* The report chapter is dark like the rest of the page */
  --color-paper-light: #000000;
  --color-rule-on-light: #333333;
  --color-ink-on-light: #ffffff;
  --color-ink-on-light-2: #cccccc;
  --color-attack-on-light: #ffffff;
  --color-defense-on-light: #0ae77a;
  --color-plate-internal: #1a1a1a;
  --color-plate-cloud: #1a1a1a;
  --color-plate-identity: #1a1a1a;
  /* Focus and errors */
  --color-focus: #388cff;
  --color-focus-on-light: #388cff;
  --color-error: #ff6b5a;

  /* Derived surfaces */
  --color-glass: color-mix(in oklab, var(--color-paper-3) 88%, transparent);        /* floating UI, with backdrop blur */
  --color-glass-solid: var(--color-paper-3);  /* html.glass-solid, no blur (T68) */
  --color-frame: var(--color-paper-2);        /* the #exposure frame: page lights show through */
  --color-frame-edge: color-mix(in oklab, var(--color-ink) 10%, transparent);       /* 1px edge on frames and viewers */
  --color-backdrop: color-mix(in oklab, var(--color-paper) 70%, transparent);       /* dialog backdrop */
  --glass-blur: blur(18px);

  /* One family: Rethink Sans for display and body */
  --font-display: "Rethink Sans", system-ui, sans-serif;
  --font-body: "Rethink Sans", system-ui, sans-serif;

  --radius-frame: 32px; --radius-view: 24px; --radius-card: 14px; --radius-nav: 14px; --radius-input: 10px; --radius-nav-btn: 6px; --radius-pill: 999px;
  --rule-hair: 1px; --shadow-card: none;
}

/* Every role takes its mobile size below 60rem */
@media (max-width: 59.99rem) {
  :root {
    --text-display: 2.5rem; --text-section: 2rem; --text-card: 1.5rem;
    --text-title: 1.3125rem; --text-wordmark: 1.375rem; --text-lead: 1.125rem;
  }
}
