
  :root {
    --nav-width: 246px;
    --nav-radius: 10px;
    --gradient-nav: linear-gradient(180deg, var(--navy), var(--navy-deep));
    --gradient-gold: linear-gradient(135deg, var(--gold-light), var(--gold));
    --gradient-gold-hover: linear-gradient(135deg, var(--gold), var(--gold-light));
    --radius: 0.375rem;
    --radius-xs: 3px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-full: 999px;
    --space-0: 0;
    --space-1: 2px;
    --space-2: 4px;
    --space-3: 6px;
    --space-4: 8px;
    --space-5: 10px;
    --space-6: 12px;
    --space-7: 16px;
    --space-8: 20px;
    --space-9: 24px;
    --space-10: 32px;
    --space-12: 48px;
    --ease-default: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 80ms;
    --duration-base: 120ms;
    --duration-medium: 180ms;
    --duration-slow: 280ms;
    --duration-stagger: 40ms;
    --font-display: 'Jost', 'Helvetica Neue', sans-serif;
    --font-body: 'Jost', 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
    --type-word-spacing: 0.08em;
    --control-height: 40px;
    --card-padding: var(--space-7);
    --type-page-title: 600 32px/1.3 var(--font-body);
    --type-section-title: 600 16px/1.3 var(--font-body);
    --type-value: 600 24px/1.3 var(--font-body);
    --type-display-lg: 600 30px/1.15 var(--font-body);
    --type-display-md: 600 24px/1.2 var(--font-body);
    --type-display-sm: 600 19px/1.25 var(--font-body);
    --type-heading: 600 15px/1.3 var(--font-body);
    --type-title-sm: 600 16px/1.3 var(--font-body);
    --type-body: 400 14px/1.45 var(--font-body);
    --type-body-sm: 400 13px/1.4 var(--font-body);
    --type-label: 600 12px/1.2 var(--font-body);
    --type-caption: 500 12px/16px var(--font-body);
    --type-eyebrow: 600 12px/16px var(--font-body);
    --type-mono: 400 13px/1.4 var(--font-mono);
    --type-mono-sm: 400 12px/1.3 var(--font-mono);
    --type-button: 500 14px/1 var(--font-body);
    --type-nav: 400 15px/1.3 var(--font-body);
    --type-label-letter-spacing: 0.04em;
    --type-caption-letter-spacing: 0.03em;
    --type-eyebrow-letter-spacing: 0.22em;
    --map-territory-1: #247ba0;
    --map-territory-2: #26976b;
    --map-territory-3: #d38a24;
    --map-territory-4: #9267bd;
    --map-territory-5: #cc527a;
    --map-territory-6: #2d9cac;
    --map-territory-7: #ba6834;
    --map-territory-8: #6578c4;
    --map-territory-9: #88952e;
    --map-territory-10: #b66aa7;
    --map-territory-11: #488e83;
    --map-territory-12: #b57f55;
    --map-draft-hatch: #253c50;
    --map-selection: #007e89;
    --map-uncovered: #d9dde3;
    --map-postal-outline: #596574;
    --gold: #c8a24a;
    --gold-light: #e7cd8b;
    --gold-soft: #fbf5e6;
    --navy: #131a2e;
    --navy-deep: #080d1b;
    --background: #f5f7fb;
    --foreground: #131a2e;
    --card: #ffffff;
    --card-foreground: #131a2e;
    --primary: #131a2e;
    --primary-foreground: #ffffff;
    --secondary: #eceef2;
    --secondary-foreground: #131a2e;
    --muted: #eceef2;
    --muted-foreground: #5a6579;
    --accent: #1c5fd6;
    --accent-foreground: #ffffff;
    --destructive: #d4183d;
    --destructive-foreground: #ffffff;
    --border: #e4e9f2;
    --input: #e4e9f2;
    --nav: #131a2e;
    --nav-foreground: #ffffff;
    --nav-muted: #aebbd1;
    --nav-hover: #1d2942;
    --nav-selected: #1f2c4f;
    --nav-border: rgba(200, 162, 74, 0.22);
    --color-surface-data: #f5f7fb;
    --color-bg: #f5f7fb;
    --color-surface: #eceef2;
    --color-surface-raised: #ffffff;
    --color-surface-sunken: #e3e6ec;
    --color-surface-hover: #f0f2f6;
    --color-ink: #131a2e;
    --color-heading: #131a2e;
    --color-ink-secondary: #3f4350;
    --color-ink-muted: #5a6579;
    --color-ink-disabled: #9aa0ab;
    --color-stage-open: #315e99;
    --color-stage-open-bg: #eaf1fb;
    --color-stage-won: #216444;
    --color-stage-won-bg: #e7f5ed;
    --color-stage-lost: #9d3548;
    --color-stage-lost-bg: #fbecef;
    --color-stage-shipped: #655093;
    --color-stage-shipped-bg: #f0ebfa;
    --color-ink-inverse: #ffffff;
    --color-accent: #1c5fd6;
    --color-accent-hover: #0d4aa8;
    --color-accent-subtle: #eaf1ff;
    --color-accent-ring: rgba(18, 97, 215, 0.4);
    --color-muted: #5a6579;
    --color-danger: #c0173a;
    --color-accent-soft: #eaf1ff;
    --color-on-accent: #ffffff;
    --color-border: #e4e9f2;
    --color-border-strong: #c8cfd9;
    --color-border-subtle: #eceef2;
    --color-success: #1f7a4d;
    --color-success-bg: #f0f8f4;
    --color-success-border: #b5ddc7;
    --color-warning: #8a5300;
    --color-warning-bg: #fdf6ec;
    --color-warning-border: #f5d8a8;
    --color-error: #c0173a;
    --color-error-bg: #fdf2f5;
    --color-error-border: #f6c9d4;
    --color-info: #0d4aa8;
    --color-info-bg: #eef4fd;
    --color-info-border: #c3d8f6;
    --color-alt: #5b21b6;
    --color-alt-bg: #f5f3ff;
    --color-alt-border: #c4b5fd;
    --shadow-xs: 0 1px 2px rgba(10, 15, 30, 0.04);
    --shadow-sm: 0 2px 6px rgba(10, 15, 30, 0.06);
    --shadow-md: 0 14px 35px rgba(25, 45, 85, 0.08);
    --shadow-lg: 0 12px 32px rgba(10, 15, 30, 0.12);
    --shadow-xl: 0 20px 48px rgba(10, 15, 30, 0.16);
    --shadow-inset: inset 0 1px 2px rgba(10, 15, 30, 0.06);
    --color-overlay-strong: rgba(10, 15, 30, 0.4);
    --color-overlay-medium: rgba(10, 15, 30, 0.3);
    --color-ink-alpha-04: rgba(10, 15, 30, 0.04);
    --color-ink-alpha-02: rgba(10, 15, 30, 0.02);
    --color-muted-alpha-45: rgba(97, 97, 111, 0.45);
    --color-muted-alpha-26: rgba(97, 97, 111, 0.26);
    --color-muted-alpha-12: rgba(97, 97, 111, 0.12);
    --color-muted-alpha-08: rgba(97, 97, 111, 0.08);
    --color-surface-alpha-72: rgba(236, 238, 242, 0.72);
    --color-accent-subtle-alpha-82: rgba(236, 242, 252, 0.82);
    --color-accent-subtle-alpha-34: rgba(236, 242, 252, 0.34);
    --color-accent-subtle-alpha-20: rgba(236, 242, 252, 0.2);
    --color-accent-alpha-40: rgba(18, 97, 215, 0.4);
    --color-accent-alpha-30: rgba(18, 97, 215, 0.3);
    --color-accent-alpha-20: rgba(18, 97, 215, 0.2);
    --color-accent-alpha-18: rgba(18, 97, 215, 0.18);
    --color-accent-alpha-12: rgba(18, 97, 215, 0.12);
    --color-ink-secondary-alpha-20: rgba(63, 67, 80, 0.2);
  }

  :root[data-theme='dark'] {
    --map-territory-1: #58b8dc;
    --map-territory-2: #53c69a;
    --map-territory-3: #edb557;
    --map-territory-4: #b897df;
    --map-territory-5: #ef87a6;
    --map-territory-6: #65cdda;
    --map-territory-7: #ed9a68;
    --map-territory-8: #95a5ed;
    --map-territory-9: #bdcf65;
    --map-territory-10: #e09bd0;
    --map-territory-11: #80c9bb;
    --map-territory-12: #dfb68c;
    --map-draft-hatch: #f0f6ff;
    --map-selection: #71e7ee;
    --map-uncovered: #343e4f;
    --map-postal-outline: #a0adbf;
    --gold: #d6b361;
    --gold-light: #eed69d;
    --gold-soft: #302a1c;
    --navy: #101729;
    --navy-deep: #080d1b;
    --background: #0d1322;
    --foreground: #eef1f5;
    --card: #1d2638;
    --card-foreground: #eef1f5;
    --primary: #d6b361;
    --primary-foreground: #0d1520;
    --secondary: #171f30;
    --secondary-foreground: #eef1f5;
    --muted: #171f30;
    --muted-foreground: #a8b3c8;
    --accent: #5a9ff0;
    --accent-foreground: #0d1520;
    --destructive: #f2778f;
    --destructive-foreground: #2b1720;
    --border: #333c4b;
    --input: #333c4b;
    --nav: #101729;
    --nav-foreground: #ffffff;
    --nav-muted: #aebbd1;
    --nav-hover: #1d2942;
    --nav-selected: #1f2c4f;
    --nav-border: rgba(200, 162, 74, 0.22);
    --color-surface-data: #1c2533;
    --color-bg: #0d1322;
    --color-surface: #171f30;
    --color-surface-raised: #1d2638;
    --color-surface-sunken: #080d1b;
    --color-surface-hover: #2b3341;
    --color-ink: #eef1f5;
    --color-heading: #eef1f5;
    --color-ink-secondary: #b7bfcb;
    --color-ink-muted: #a8b3c8;
    --color-ink-disabled: #6b7381;
    --color-stage-open: #9fc3f6;
    --color-stage-open-bg: #20334e;
    --color-stage-won: #86dbad;
    --color-stage-won-bg: #193c2b;
    --color-stage-lost: #f4a0b0;
    --color-stage-lost-bg: #472732;
    --color-stage-shipped: #c7b4f0;
    --color-stage-shipped-bg: #352b4a;
    --color-ink-inverse: #0d1520;
    --color-accent: #5a9ff0;
    --color-accent-hover: #7fb6f5;
    --color-accent-subtle: #233149;
    --color-accent-ring: rgba(90, 159, 240, 0.45);
    --color-muted: #a8b3c8;
    --color-danger: #f2778f;
    --color-accent-soft: #233149;
    --color-on-accent: #0d1520;
    --color-border: #333c4b;
    --color-border-strong: #414c5e;
    --color-border-subtle: #2a323f;
    --color-success: #4ec38a;
    --color-success-bg: #16281f;
    --color-success-border: #2e5c42;
    --color-warning: #e0a94a;
    --color-warning-bg: #2a2317;
    --color-warning-border: #5c4a2a;
    --color-error: #f2778f;
    --color-error-bg: #2b1720;
    --color-error-border: #5e2e3c;
    --color-info: #7fb6f5;
    --color-info-bg: #17222f;
    --color-info-border: #2f4560;
    --color-alt: #c4b5fd;
    --color-alt-bg: #221a33;
    --color-alt-border: #4c3a6b;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.58);
    --shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.35);
    --color-overlay-strong: rgba(0, 0, 0, 0.6);
    --color-overlay-medium: rgba(0, 0, 0, 0.45);
    --color-ink-alpha-04: rgba(255, 255, 255, 0.05);
    --color-ink-alpha-02: rgba(255, 255, 255, 0.03);
    --color-muted-alpha-45: rgba(151, 160, 174, 0.45);
    --color-muted-alpha-26: rgba(151, 160, 174, 0.26);
    --color-muted-alpha-12: rgba(151, 160, 174, 0.12);
    --color-muted-alpha-08: rgba(151, 160, 174, 0.08);
    --color-surface-alpha-72: rgba(33, 40, 51, 0.72);
    --color-accent-subtle-alpha-82: rgba(38, 50, 70, 0.82);
    --color-accent-subtle-alpha-34: rgba(38, 50, 70, 0.34);
    --color-accent-subtle-alpha-20: rgba(38, 50, 70, 0.2);
    --color-accent-alpha-40: rgba(90, 159, 240, 0.4);
    --color-accent-alpha-30: rgba(90, 159, 240, 0.3);
    --color-accent-alpha-20: rgba(90, 159, 240, 0.2);
    --color-accent-alpha-18: rgba(90, 159, 240, 0.18);
    --color-accent-alpha-12: rgba(90, 159, 240, 0.12);
    --color-ink-secondary-alpha-20: rgba(183, 191, 203, 0.2);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) {
      --map-territory-1: #58b8dc;
      --map-territory-2: #53c69a;
      --map-territory-3: #edb557;
      --map-territory-4: #b897df;
      --map-territory-5: #ef87a6;
      --map-territory-6: #65cdda;
      --map-territory-7: #ed9a68;
      --map-territory-8: #95a5ed;
      --map-territory-9: #bdcf65;
      --map-territory-10: #e09bd0;
      --map-territory-11: #80c9bb;
      --map-territory-12: #dfb68c;
      --map-draft-hatch: #f0f6ff;
      --map-selection: #71e7ee;
      --map-uncovered: #343e4f;
      --map-postal-outline: #a0adbf;
      --gold: #d6b361;
      --gold-light: #eed69d;
      --gold-soft: #302a1c;
      --navy: #101729;
      --navy-deep: #080d1b;
      --background: #0d1322;
      --foreground: #eef1f5;
      --card: #1d2638;
      --card-foreground: #eef1f5;
      --primary: #d6b361;
      --primary-foreground: #0d1520;
      --secondary: #171f30;
      --secondary-foreground: #eef1f5;
      --muted: #171f30;
      --muted-foreground: #a8b3c8;
      --accent: #5a9ff0;
      --accent-foreground: #0d1520;
      --destructive: #f2778f;
      --destructive-foreground: #2b1720;
      --border: #333c4b;
      --input: #333c4b;
      --nav: #101729;
      --nav-foreground: #ffffff;
      --nav-muted: #aebbd1;
      --nav-hover: #1d2942;
      --nav-selected: #1f2c4f;
      --nav-border: rgba(200, 162, 74, 0.22);
      --color-surface-data: #1c2533;
      --color-bg: #0d1322;
      --color-surface: #171f30;
      --color-surface-raised: #1d2638;
      --color-surface-sunken: #080d1b;
      --color-surface-hover: #2b3341;
      --color-ink: #eef1f5;
      --color-heading: #eef1f5;
      --color-ink-secondary: #b7bfcb;
      --color-ink-muted: #a8b3c8;
      --color-ink-disabled: #6b7381;
      --color-stage-open: #9fc3f6;
      --color-stage-open-bg: #20334e;
      --color-stage-won: #86dbad;
      --color-stage-won-bg: #193c2b;
      --color-stage-lost: #f4a0b0;
      --color-stage-lost-bg: #472732;
      --color-stage-shipped: #c7b4f0;
      --color-stage-shipped-bg: #352b4a;
      --color-ink-inverse: #0d1520;
      --color-accent: #5a9ff0;
      --color-accent-hover: #7fb6f5;
      --color-accent-subtle: #233149;
      --color-accent-ring: rgba(90, 159, 240, 0.45);
      --color-muted: #a8b3c8;
      --color-danger: #f2778f;
      --color-accent-soft: #233149;
      --color-on-accent: #0d1520;
      --color-border: #333c4b;
      --color-border-strong: #414c5e;
      --color-border-subtle: #2a323f;
      --color-success: #4ec38a;
      --color-success-bg: #16281f;
      --color-success-border: #2e5c42;
      --color-warning: #e0a94a;
      --color-warning-bg: #2a2317;
      --color-warning-border: #5c4a2a;
      --color-error: #f2778f;
      --color-error-bg: #2b1720;
      --color-error-border: #5e2e3c;
      --color-info: #7fb6f5;
      --color-info-bg: #17222f;
      --color-info-border: #2f4560;
      --color-alt: #c4b5fd;
      --color-alt-bg: #221a33;
      --color-alt-border: #4c3a6b;
      --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
      --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
      --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.42);
      --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
      --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.58);
      --shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.35);
      --color-overlay-strong: rgba(0, 0, 0, 0.6);
      --color-overlay-medium: rgba(0, 0, 0, 0.45);
      --color-ink-alpha-04: rgba(255, 255, 255, 0.05);
      --color-ink-alpha-02: rgba(255, 255, 255, 0.03);
      --color-muted-alpha-45: rgba(151, 160, 174, 0.45);
      --color-muted-alpha-26: rgba(151, 160, 174, 0.26);
      --color-muted-alpha-12: rgba(151, 160, 174, 0.12);
      --color-muted-alpha-08: rgba(151, 160, 174, 0.08);
      --color-surface-alpha-72: rgba(33, 40, 51, 0.72);
      --color-accent-subtle-alpha-82: rgba(38, 50, 70, 0.82);
      --color-accent-subtle-alpha-34: rgba(38, 50, 70, 0.34);
      --color-accent-subtle-alpha-20: rgba(38, 50, 70, 0.2);
      --color-accent-alpha-40: rgba(90, 159, 240, 0.4);
      --color-accent-alpha-30: rgba(90, 159, 240, 0.3);
      --color-accent-alpha-20: rgba(90, 159, 240, 0.2);
      --color-accent-alpha-18: rgba(90, 159, 240, 0.18);
      --color-accent-alpha-12: rgba(90, 159, 240, 0.12);
      --color-ink-secondary-alpha-20: rgba(183, 191, 203, 0.2);
    }
  }

  :root { color-scheme: light; }
  :root[data-theme='dark'] { color-scheme: dark; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) { color-scheme: dark; }
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; min-height: 100%; font: var(--type-body); background: var(--color-bg); color: var(--color-ink); }
  button, input, select { font: inherit; }
  button { cursor: pointer; border-radius: var(--radius-md); border: 1px solid var(--color-border); padding: 12px 16px; }
  button.primary { background: var(--gold) var(--gradient-gold); color: var(--navy-deep); border-color: var(--gold); }
  button:disabled { cursor: progress; }
  button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 4px; }
  .skip-link { position: absolute; left: -999px; top: 0; }
  .skip-link:focus { left: 8px; z-index: 10; background: var(--color-surface-raised); color: var(--color-ink); padding: 12px; }
  .shell-login { display: grid; place-items: center; min-height: 100vh; min-height: 100svh; padding: 48px 24px; }
  .signin { width: 100%; max-width: 390px; min-width: 0; text-align: center; }
  .brand { font-family: var(--font-display); font-weight: 300; font-size: 40px; letter-spacing: -0.04em; color: var(--color-heading); margin-bottom: 40px; }
  h1 { font: var(--type-display-lg); font-size: 32px; color: var(--color-heading); margin: 0 0 12px; }
  .intro { font-size: 14px; margin: 0 0 28px; }
  .sso-action { display: flex; align-items: center; justify-content: center; gap: 24px; width: 100%; min-height: 48px; font: var(--type-button); font-weight: 600; }
  .signin-note { margin: 22px 0 0; font-size: 12px; }
  button.link-action { margin: 14px auto 0; display: block; border: 0; background: none; padding: 8px; color: var(--color-ink-muted); text-decoration: underline; font-size: 13px; }
  .muted { color: var(--color-ink-muted); }
  .error { color: var(--color-error); overflow-wrap: anywhere; margin: 0 0 20px; }
  .development-login { text-align: left; margin-top: 32px; border-top: 1px solid var(--color-border); padding-top: 20px; }
  .development-login summary { cursor: pointer; }
  .context-grid { display: grid; gap: 12px; }
  .context-grid label { display: grid; gap: 4px; font-size: 12px; color: var(--color-ink-muted); }
  .context-grid input, .context-grid select { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-raised); color: var(--color-ink); }
  @media (max-width: 480px) { .shell-login { padding: 32px 24px; } .brand { margin-bottom: 32px; } }
