:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --surface-3: #f0f0f3;
  --surface-translucent: rgba(255, 255, 255, 0.84);
  --surface-header: rgba(245, 245, 247, 0.78);
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #69696f;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;
  --accent-ink: #0066cc;
  --accent-soft: rgba(0, 113, 227, 0.1);

  /* Demo stage */
  --stage: #101012;
  --stage-2: #1a1a1d;
  --stage-3: #242427;
  --stage-ink: #f5f5f7;
  --stage-muted: rgba(245, 245, 247, 0.6);
  --stage-line: rgba(255, 255, 255, 0.12);

  /* Category accents */
  --cat-feedback: #0071e3;
  --cat-navigation: #5e5ce6;
  --cat-overlays: #ff9f0a;
  --cat-gestures: #30d158;
  --cat-scroll: #32ade6;
  --cat-layout: #bf5af2;
  --cat-type: #ff375f;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /*
   * Typography roles. Product pages use roles, not one-off sizes.
   * A role owns size, leading and tracking together so hierarchy cannot drift.
   */
  --type-display-size: clamp(46px, 6.6vw, 92px);
  --type-display-leading: 1.03;
  --type-display-tracking: -0.03em;
  --type-page-size: clamp(34px, 4.2vw, 56px);
  --type-page-leading: 1.12;
  --type-page-tracking: -0.025em;
  --type-section-size: clamp(28px, 3vw, 40px);
  --type-section-leading: 1.25;
  --type-section-tracking: -0.02em;
  --type-card-size: clamp(18px, 1.8vw, 23px);
  --type-card-leading: 1.3;
  --type-card-tracking: -0.015em;
  --type-body-size: 17px;
  --type-body-leading: 1.7;
  --type-small-size: 14px;
  --type-small-leading: 1.6;
  --type-cta-size: 15px;
  --type-cta-leading: 1.35;
  --type-meta-size: 12px;
  --type-meta-leading: 1.4;
  --type-eyebrow-size: 11px;
  --type-eyebrow-leading: 1.4;
  --type-eyebrow-tracking: 0.14em;
  --measure-body: 68ch;
  --measure-lead: 62ch;
  --measure-wide: 88ch;

  /* Legacy aliases: keep older pages working while they migrate to roles. */
  --text-hero: var(--type-display-size);
  --text-h2: clamp(30px, 3.6vw, 52px);
  --text-h3: clamp(22px, 2.4vw, 30px);
  --text-title: clamp(18px, 2vw, 24px);
  --text-body: 17px;
  --text-sm: 14px;
  --text-xs: 12px;

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --section-gap: clamp(48px, 7vw, 96px);
  --block-gap: var(--space-6);
  --stack-gap: var(--space-4);

  /* Radii */
  --r-xs: 8px;
  --r-keycap: 5px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.03), 0 4px 16px rgba(0, 0, 0, 0.03);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.04), 0 20px 48px rgba(0, 0, 0, 0.1);
  --shadow-sheet: 0 40px 120px rgba(0, 0, 0, 0.3);

  /* Motion */
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
  --dur-4: 480ms;
  --dur-5: 700ms;
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-overshoot: cubic-bezier(0.34, 1.56, 0.64, 1);

  /*
   * Product motion roles. Interface motion answers one of five intents.
   * Teaching demos and website editions may deliberately use other timing.
   */
  --motion-feedback: 120ms;
  --motion-switch: 220ms;
  --motion-enter: 360ms;
  --motion-exit: 200ms;
  --motion-emphasize: 520ms;
  --motion-ambient: 2600ms;
  --motion-ease: var(--ease-out);
  --motion-ease-feedback: var(--ease-out);
  --motion-ease-switch: var(--ease-out);
  --motion-ease-enter: var(--ease-out);
  --motion-ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --motion-ease-emphasize: cubic-bezier(0.34, 1.16, 0.64, 1);

  /* Layout */
  --header-h: 64px;
  --page-gutter: clamp(20px, 5vw, 72px);
  --max-width: 1280px;
}
