/* ============================================================================
   Platinur — Design Tokens (portal redesign, July 2026)
   Warm paper neutrals, near-black ink, SF system type, blue/green dataviz
   accents. Light mode. These :root tokens are the single source of truth —
   styles.css / refresh-*.css / redesign.css consume them.
   ============================================================================ */

:root {
  /* ---- Ink (near-black warm) ------------------------------------------- */
  --ink: #141413;            /* primary text + brand                          */
  --ink-2: #1c1c1a;          /* dark pill / dark buttons (design --pill-dark) */
  --steel: #4a6b8a;          /* structural accent (dw layer tone)             */
  --steel-strong: #3b566f;
  --ice: #d7e6f9;

  /* ---- Primary action (dataviz blue) ------------------------------------ */
  --accent: #2a78d6;
  --accent-strong: #1d63b8;
  --accent-press: #175093;
  --accent-soft: rgba(42, 120, 214, 0.08);
  --accent-tint: rgba(42, 120, 214, 0.22);
  --accent-ring: rgba(42, 120, 214, 0.18);

  /* ---- Warm paper neutrals ---------------------------------------------- */
  --bg: #efeeec;             /* app plane behind surfaces                     */
  --surface: #ffffff;
  --surface-subtle: #fcfcfb; /* card                                          */
  --surface-muted: #f6f5f3;  /* sidebar / rail                                */
  --surface-hover: rgba(11, 11, 11, 0.045);
  --border: rgba(11, 11, 11, 0.08);       /* hairline                         */
  --border-soft: rgba(11, 11, 11, 0.05);  /* hairline-2                       */
  --border-strong: rgba(11, 11, 11, 0.16);

  /* ---- Text -------------------------------------------------------------- */
  --text: #141413;
  --muted-strong: #575652;
  --muted: #6c6b65;
  --faint: #8f8d87;

  /* ---- Status ------------------------------------------------------------ */
  --green: #0ca30c;
  --green-text: #006300;
  --green-soft: rgba(12, 163, 12, 0.07);
  --green-border: rgba(12, 163, 12, 0.18);
  --amber: #c98500;
  --amber-text: #8a5a00;
  --amber-soft: rgba(201, 133, 0, 0.09);
  --amber-border: rgba(201, 133, 0, 0.22);
  --red: #d03b3b;
  --red-soft: rgba(208, 59, 59, 0.06);
  --red-border: rgba(208, 59, 59, 0.2);
  --info: var(--accent);
  --info-soft: var(--accent-soft);
  --slate: #c3c2b7;          /* idle dots / axis tone                         */
  --slate-soft: rgba(11, 11, 11, 0.05);

  /* ---- Dataviz roles ------------------------------------------------------ */
  --series-1: #2a78d6;
  --series-2: #1baf7a;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --ok: #0ca30c;
  --ok-text: #006300;
  --warn: #c98500;
  --bad: #d03b3b;

  /* ---- Layer tags --------------------------------------------------------- */
  --tag-staging: #c98500;
  --tag-dw: #4a6b8a;
  --tag-marts: #2a78d6;

  /* ---- Design-system aliases (redesign.css vocabulary) -------------------- */
  --plane: var(--bg);
  --sidebar: var(--surface-muted);
  --card: var(--surface-subtle);
  --ink-3: var(--faint);
  --hairline: var(--border);
  --hairline-2: var(--border-soft);
  --pill-dark: var(--ink-2);
  --hover: rgba(11, 11, 11, 0.045);
  --active: rgba(11, 11, 11, 0.07);
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 9px;

  /* ---- Typography ---------------------------------------------------------
     System SF stack everywhere. --font-mono is intentionally aliased to
     --font-sans so UI labels that reference it (file/table names, metrics,
     IDs, pills, run metadata) render in the UI font. Only genuine code/SQL/
     log/diff surfaces use --font-code. */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  --font-display: var(--font-sans);
  --font-code: ui-monospace, "SF Mono", Menlo, monospace;
  --font-mono: var(--font-sans);
  --font: var(--font-sans);

  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 21px;
  --text-2xl: 24px;
  --text-3xl: 30px;

  --leading-tight: 1.2;
  --leading: 1.45;
  --tracking-eyebrow: 0.06em;

  --weight-light: 400;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 650;
  --weight-display: 650;

  /* ---- Spacing scale ------------------------------------------------------ */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 44px;
  --space-9: 64px;

  /* ---- Radius -------------------------------------------------------------- */
  --radius-xs: 7px;
  --radius-sm: 9px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  /* ---- Elevation (soft, neutral) -------------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(11, 11, 11, 0.04);
  --shadow-sm: 0 1px 2px rgba(11, 11, 11, 0.04);
  --shadow: 0 4px 16px rgba(11, 11, 11, 0.06);
  --shadow-lg: 0 24px 70px rgba(11, 11, 11, 0.3);
  --shadow-ring: 0 0 0 1px var(--border-soft);

  /* ---- Layout ---------------------------------------------------------------- */
  /* Fallback only — app.js fitSidebarWidth() measures the real content width on load. */
  --sidebar-width: 236px;
  --sidebar-collapsed-width: 62px;
  --content-max: 1040px;     /* design page column                            */
  --content-wide: 1300px;    /* wide views (Promotions)                       */
  --content-narrow: 1040px;
  --topbar-height: 60px;

  --transition: 160ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* =========================================================================
   TYPOGRAPHY TWEAK — legacy axis kept for compatibility; every variant now
   resolves to the system SF stack so <html data-type> has no visual effect.
   ========================================================================= */
html[data-type="public"],
html[data-type="grotesk"],
html[data-type="editorial"],
html[data-type="technical"] {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: var(--font-sans);
}
