:root, .area-map {
  --color-surface: #191b19;
  --color-surface-alt: #20231f;
  --color-surface-raised: #242722;
  --color-selected: #30342f;
  --color-text-primary: #f4f0e5;
  --color-text-secondary: #b8bcaf;
  --color-border: #51594f;
  --color-mark: #91998e;
  --color-action: #e8bc69;
  --color-action-hover: #f1ca81;
  --color-action-ink: #191b19;
  --color-focus: #f4f0e5;
  --color-waiting: #f19685;
  --color-finding: #f4c69e;
  --color-failed: #ff998f;
  --color-passed: #a2d2a5;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --target: 44px;
  --measure: 70ch;
  --focus-width: 2px;
  --focus-offset: 2px;
  --shadow-sheet: 0 1px 2px #10130f66, 0 8px 24px #10130f44;
  --z-base: 0;
  --z-nav: 10;
  --z-sheet: 20;
  --z-dialog: 30;
  --duration-100: 100ms;
  --duration-150: 150ms;
  --duration-200: 200ms;
  --ease-out: cubic-bezier(.215, .61, .355, 1);
}

/* Older controls use these colour names for the same kit surfaces. */
.gc-root {
  --color-surface: var(--gc-page);
  --color-surface-alt: var(--gc-card-2);
  --color-surface-raised: var(--gc-card-3);
  --color-selected: var(--gc-card-4);
  --color-text-primary: var(--gc-ink-1);
  --color-text-secondary: var(--gc-ink-2);
  --color-border: var(--gc-card-edge);
  --color-mark: var(--gc-ink-2);
  --color-action: var(--gc-cream);
  --color-action-hover: var(--gc-cream);
  --color-action-ink: var(--ink-on-filled);
  --color-focus: var(--gc-focus);
  --focus-width: 3px;
  --color-finding: var(--gc-amber);
  --color-failed: var(--ink-error);

  /* A transparent shadow also works when a kit component composes shadows. */
  --gc-drop: 0 0 transparent;
  --gc-raise-drop: 0 0 transparent;
  --gc-panel-shadow: 0 0 transparent;
  --gc-lit-top: 0 0 transparent;
  --gc-lit-top-soft: 0 0 transparent;
  --gc-face-foot: 0 0 transparent;
  --gc-raise-sheen: none;
  --gc-blue-lip: transparent;
  --gc-card-shadow: inset 0 0 0 1px var(--gc-card-edge);
  --gc-cta-height: var(--target);
  --gc-cta-lip: 0px;
  --gc-cta-press: 0px;
  --gc-radius-cta: var(--radius-md);
}

/* Foregrounds for the product outside the stage. Text size and weight can
   change independently of what the reader came for, its context and its proof. */
:root {
  --ink-primary: #ededed;
  --ink-context: #c2c2c2;
  --ink-proof: #9c9c9c;
  --ink-on-filled: #141414;
  --ink-on-filled-muted: var(--ink-on-filled);
  --ink-on-accent: var(--ink-on-filled);
  --ink-on-selected: var(--ink-on-filled);
  --ink-on-in-flight: var(--gc-page);
  --ink-error: var(--gc-hazard-text);
  --ink-waiting-on-you: var(--gc-badge);
  --hive-badge-ink: #fff;
  --ink-on-waiting-on-you: #fff;
  --ink-control-edge: #6e6e6e;
  --ink-in-flight: var(--gc-amber);
  --ink-observed-working: var(--gc-green);
  --ink-you: var(--gc-cream);
  /* The one thing to do on a page wears the fill that what is chosen already wears (the chosen kind, the chosen
     option, the current tab's line): the product has one filled face, and it means yours. Never blue. Here, with the
     product's tokens, so a surface that does not load the page system (a phone's screen, a sheet) reads it too. */
  --face-primary: var(--ink-you);
  --face-primary-hover: color-mix(in srgb, var(--ink-you) 88%, #fff);
  --face-primary-press: color-mix(in srgb, var(--ink-you) 84%, #000);
  --ink-on-primary: var(--ink-on-filled);
  --ink-waiting: var(--color-waiting);
  --ink-crossing: var(--gc-amber);
  --ink-crossing-dim: #ad7d35;
  --ink-notice: var(--gc-amber);
}

/* The reusable kit controls and shared marks read their palette on the
   surrounding surface. Limit these bindings to the pages that own this ink. */
:where(.hive-top, .hive-nav, .workspace-message, .exchange-page, .run-detail, .steer-composer, .setup, .sign-in, .arrival, .map-hud__left, .map-hud__right, .map-counters--strip, .map-selection) {
  --gc-ink: var(--ink-primary);
  --gc-ink-1: var(--ink-context);
  --gc-ink-2: var(--ink-proof);
  --gc-cream-ink: var(--ink-on-filled);
  --gc-cream-ink-2: var(--ink-on-filled-muted);
  --gc-chosen-ink: var(--ink-on-selected);
  --gc-on-accent: var(--ink-on-accent);
  --gc-hazard-text: var(--ink-error);
  --hive-ink: var(--ink-primary);
  --hive-you: var(--ink-you);
  --hive-on-you: var(--ink-waiting-on-you);
  --hive-crossing: var(--ink-crossing);
}

:where(.hive-top, .workspace-message, .workspace__skip, .exchange-page, .setup, .sign-in, .arrival) {
  color: var(--ink-context);
}
