/* ds-tokens.css -- shared SciMynd design tokens, v1. Namespace --ds-*; never redefines --bg/--text/--accent.
   Source of truth: design/ds/v1/ds-tokens.css; wwwroot/css/redesign/ds-tokens.css is a byte-identical copy (DsTokensTests).
   Light is the default. Dark is opt-in: <html data-ds-theme="dark"> (or .ds-dark on a subtree); "auto" follows the OS.
   Portal type scale: every tier is >= 12px (the viewer keeps its own --fs-* scale; see docs/ui-ds-tokens.md). */
:root {
  color-scheme: light;
  /* brand */
  --ds-brand-600:#0A6FD0; --ds-brand-700:#084F9E; --ds-brand-500:#0A83E0; --ds-brand-400:#0A9BF0;
  --ds-accent-cyan:#00AEFF; --ds-brand-tint:#EBF3FE; --ds-on-brand:#FFFFFF;
  --ds-navy-900:#08102B; --ds-navy-800:#0E1638;
  /* neutrals */
  --ds-bg:#FFFFFF; --ds-bg-soft:#F4F7FD; --ds-surface:#FFFFFF; --ds-surface-2:#F1F5FC;
  --ds-text:#0E1638; --ds-text-body:#33405A; --ds-text-muted:#5A6478;
  --ds-text-faint:#636E82;
  --ds-border:#E4EAF4; --ds-border-strong:#DCE4F2; --ds-focus:#0A6FD0;
  /* semantic: ink = text on its bg, bg = tint, solid = fills and icons */
  --ds-success:#1E9E8C; --ds-success-ink:#147263; --ds-success-bg:#F1FAF8;
  --ds-warning:#C98A2B; --ds-warning-ink:#9A6A1D; --ds-warning-bg:#FFFBF2;
  --ds-danger:#C94B4B;  --ds-danger-ink:#B33A3A;  --ds-danger-bg:#FDF2F2;
  --ds-info:#0A6FD0;    --ds-info-ink:#084F9E;    --ds-info-bg:#EBF3FE;
  /* module colours (app-icon artwork) */
  --ds-mod-ask:#00B1FF; --ds-mod-core:#FF7015; --ds-mod-studio:#FC153D; --ds-mod-vault:#FC9E00;
  --ds-mod-synapse:#2055CE; --ds-mod-amplify:#1E9F8C; --ds-mod-catalyst:#4B535E;
  /* type */
  --ds-font-sans:'Manrope',system-ui,-apple-system,'Segoe UI',sans-serif;
  --ds-font-display:'Newsreader',Georgia,serif;
  --ds-font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --ds-type-scale:1;
  --ds-fs-display:calc(30px * var(--ds-type-scale));
  --ds-fs-heading:calc(22px * var(--ds-type-scale));
  --ds-fs-title:calc(18px * var(--ds-type-scale));
  --ds-fs-ui:calc(14px * var(--ds-type-scale));
  --ds-fs-prose:calc(13.5px * var(--ds-type-scale));
  --ds-fs-value:calc(13px * var(--ds-type-scale));
  --ds-fs-row:calc(12.5px * var(--ds-type-scale));
  --ds-fs-label:calc(12px * var(--ds-type-scale));
  --ds-fs-input:16px;
  --ds-lh-tight:1.1; --ds-lh-body:1.6; --ds-lh-dense:1.5;
  --ds-fw-regular:400; --ds-fw-medium:500; --ds-fw-semibold:600; --ds-fw-bold:700;
  /* spacing (4px base) */
  --ds-sp-1:4px; --ds-sp-2:8px; --ds-sp-3:12px; --ds-sp-4:16px; --ds-sp-5:20px;
  --ds-sp-6:24px; --ds-sp-8:32px; --ds-sp-10:40px; --ds-sp-12:48px; --ds-sp-16:64px;
  --ds-gutter:clamp(16px,4vw,32px); --ds-shell:1440px; --ds-content:1160px;
  /* radius */
  --ds-r-xs:7px; --ds-r-sm:10px; --ds-r-md:12px; --ds-r-lg:14px; --ds-r-xl:20px; --ds-r-pill:999px;
  /* elevation */
  --ds-sh-1:0 1px 2px rgba(14,22,56,.06);
  --ds-sh-2:0 10px 30px -22px rgba(14,22,56,.45);
  --ds-sh-3:0 24px 60px -18px rgba(14,22,56,.35);
  --ds-sh-primary:0 10px 24px -10px rgba(10,111,208,.7);
  /* controls */
  --ds-ctl-h:44px; --ds-ctl-h-sm:44px; --ds-tap:44px;
  /* chrome */
  --ds-topbar-h:64px; --ds-sidebar-w:264px; --ds-drawer-w:min(88vw,360px);
  /* motion */
  --ds-ease:cubic-bezier(.2,.7,.2,1); --ds-dur-1:120ms; --ds-dur-2:200ms; --ds-dur-3:320ms;
  /* z bands */
  --ds-z-sticky:1000; --ds-z-card:9000; --ds-z-popover:9500; --ds-z-overlay:10000; --ds-z-confirm:10080;
  /* safe areas */
  --ds-safe-t:env(safe-area-inset-top,0px); --ds-safe-b:env(safe-area-inset-bottom,0px);
  --ds-safe-l:env(safe-area-inset-left,0px); --ds-safe-r:env(safe-area-inset-right,0px);
}
/* compact 32px controls only where a precise pointer exists */
@media (pointer:fine) { :root { --ds-ctl-h-sm:32px; } }

/* Dark: viewer family (#05121F) with the Portal blue lifted for contrast */
:root[data-ds-theme="dark"], .ds-dark {
  color-scheme: dark;
  --ds-brand-600:#4A9BFF; --ds-brand-700:#7DB6FF; --ds-on-brand:#04132B;
  --ds-brand-tint:rgba(74,155,255,.14);
  --ds-bg:#05121F; --ds-bg-soft:#0A1A2B; --ds-surface:#0E1F30; --ds-surface-2:#122235;
  --ds-text:#E5F0F8; --ds-text-body:#C5D3E0; --ds-text-muted:#8FA8BC; --ds-text-faint:#7890A4;
  --ds-border:rgba(220,233,244,.10); --ds-border-strong:rgba(220,233,244,.22); --ds-focus:#6DB4FF;
  --ds-success:#4ADE80; --ds-success-ink:#6EE7A0; --ds-success-bg:rgba(74,222,128,.12);
  --ds-warning:#FBBF24; --ds-warning-ink:#FCD34D; --ds-warning-bg:rgba(251,191,36,.12);
  --ds-danger:#F87171;  --ds-danger-ink:#FCA5A5;  --ds-danger-bg:rgba(248,113,113,.12);
  --ds-info:#67B8F0;    --ds-info-ink:#9AD1F7;    --ds-info-bg:rgba(103,184,240,.12);
  --ds-sh-1:0 1px 2px rgba(0,0,0,.5); --ds-sh-2:0 10px 28px -12px rgba(0,0,0,.65);
  --ds-sh-3:0 24px 60px -18px rgba(0,0,0,.78);
}
@media (prefers-color-scheme:dark) {
  :root[data-ds-theme="auto"] {
    color-scheme: dark;
    --ds-brand-600:#4A9BFF; --ds-brand-700:#7DB6FF; --ds-on-brand:#04132B;
    --ds-brand-tint:rgba(74,155,255,.14);
    --ds-bg:#05121F; --ds-bg-soft:#0A1A2B; --ds-surface:#0E1F30; --ds-surface-2:#122235;
    --ds-text:#E5F0F8; --ds-text-body:#C5D3E0; --ds-text-muted:#8FA8BC; --ds-text-faint:#7890A4;
    --ds-border:rgba(220,233,244,.10); --ds-border-strong:rgba(220,233,244,.22); --ds-focus:#6DB4FF;
    --ds-success:#4ADE80; --ds-success-ink:#6EE7A0; --ds-success-bg:rgba(74,222,128,.12);
    --ds-warning:#FBBF24; --ds-warning-ink:#FCD34D; --ds-warning-bg:rgba(251,191,36,.12);
    --ds-danger:#F87171;  --ds-danger-ink:#FCA5A5;  --ds-danger-bg:rgba(248,113,113,.12);
    --ds-info:#67B8F0;    --ds-info-ink:#9AD1F7;    --ds-info-bg:rgba(103,184,240,.12);
    --ds-sh-1:0 1px 2px rgba(0,0,0,.5); --ds-sh-2:0 10px 28px -12px rgba(0,0,0,.65);
    --ds-sh-3:0 24px 60px -18px rgba(0,0,0,.78);
  }
}
/* user text-size preference */
:root[data-size="small"] { --ds-type-scale:.9; }
:root[data-size="large"] { --ds-type-scale:1.15; }
:root[data-size="xlarge"] { --ds-type-scale:1.3; }
