/*
 * Beam CSS variables — layout and spacing.
 *
 * VARIABLES ONLY. No selector in this file renders or overrides anything; it
 * declares custom properties and nothing else. That is the contract the name
 * carries, and css_foundation_test.clj enforces it.
 *
 * This is one of three, split by domain on 23 September 2026 because the single
 * file it came from was called tokens.css and "token" means four different
 * things in this repo — the anti-forgery token on every form POST, the preview
 * and API auth tokens, this, and @beam/input-ui/tokens.css which the islands
 * import and which is a different file entirely. Same values, same names,
 * findable by what they are:
 *
 *   vars-colour.css   surfaces, text, borders, --status-*, charts, scrim
 *   vars-layout.css   spacing, drawer and globals widths, z-index
 *   vars-control.css  radii, control heights and padding, component sizing
 *
 * THE TYPE SCALE IS NOT HERE and never was. resources/styleguide.css owns
 * --headings-large-* and --body-*, and specs/presentation.allium
 * (TypographyPresentation) is its behavioural contract. Brand ramps
 * (--primary-*, --secondary-*, --dark-*, --light-*, --alert-*) are owned by
 * resources/tailwind.css. Where sources disagree, styleguide.css is canonical.
 *
 * Names are UNCHANGED by the split: every var() that resolved before resolves
 * now. Only the file a name lives in, and the <link> that pulls it in, moved.
 *
 * Placeholders with no platform precedent: --drawer-w,
 * --drawer-collapse-handle-w, --globals-w, --globals-modal-w, --z-*.
 */

:root {
  --rec-category-width: 120px;
  --rec-name-width: 104px;
  --rec-system-min-width: 180px;
  --rec-hint-width: 300px;
  --rec-hint-wide-width: 340px;
  --rec-ranking-width: 1680px;
  --rec-ranking-compact-width: 1100px;
  --rec-confirm-width: 560px; /* Unsaved-weightings confirmation over the explanation dialog. */
  --rec-ranking-chrome-height: 150px;
  --rec-label-max-width: 360px; /* Existing chart recommendation label wrap limit. */
  --rec-explanation-width: 760px; /* Existing recommendation explanation dialog width. */
  --rec-explanation-gutter: 40px; /* Dialog viewport allowance, independent of control height. */
  /* Spacing. Values extracted from current Tailwind/page spacing in use. */
  --space-0-5: 2px; /* Tailwind 0.5 — the side menu's hairline gaps (#424) */
  --space-1: 4px; /* Tailwind gap-1 / .btn gap .25rem in output.css */
  --space-1-5: 6px; /* Tailwind 1.5 — the side menu's item padding (#424) */
  --space-2: 8px; /* Tailwind gap-2 and px-2 family */
  --space-2-5: 10px; /* Tailwind 2.5 — the side menu's item inset (#424) */
  --space-3: 12px; /* site-setup.css modal load row gap */
  --space-4: 16px; /* site-setup.css modal header padding */
  --space-5: 20px; /* full-systems-table.html px-5 button padding */
  --space-6: 24px; /* dashboard.html main px-6 */
  --space-7: 28px; /* site-setup.css modal sidebar top padding */
  --space-8: 32px; /* existing Tailwind spacing scale in output.css */

  --sv-panel-min-height: 300px; /* Standard View's selected card and detail panel floor. */
  --sv-film-min-height: 190px; /* Standard View's filmstrip / next-steps floor. */
  --sv-oa-film-min-height: 250px; /* Self-service filmstrip includes each card's offers footer. */

  --systems-controls-width: 216px; /* Systems chart left column before panel measurement. */
  --systems-header-width: 600px; /* Systems header fallback before panel measurement. */
  --systems-pin-label-width: 130px; /* Pinned category label box before font measurement. */
  --systems-plot-min-height: 180px; /* Dashboard plot minimum before the measured lift. */
  --systems-plot-base-height: 156px; /* Standalone plot minimum in normal flow. */
  --systems-tooltip-max-width: 520px; /* Fixed maximum width of the cursor-following card. */

  /* Layout. Drawer widths are new shared-system decisions in platform idiom. */
  --drawer-w: 320px; /* new — no platform precedent; between current 280px sidebar and EA3 drawer */
  --drawer-collapse-handle-w: 32px; /* new — no platform precedent */
  --globals-w: min(960px, 92vw); /* new — no platform precedent */
  --globals-diff-list-max-h: 60vh; /* Site Variables comparison, within the shared modal viewport cap. */
  --release-notice-modal-w: min(720px, 94vw); /* Preserve the compact release prompt; globals modal is wider. */
  --globals-modal-w: min(1180px, 96vw); /* new — no platform precedent */
  --manage-source-select-min-width: 220px; /* manage-data-sources.css: Merge / Generation / Consumption selects wrap below this. */
  --globals-table-label-min-width: 230px; /* Shared variables tables: labels may grow to their longest line. */
  --modal-content-min-h: 240px; /* site-setup.css: a full-size component editor's tabs + body on a short window */
  --z-dropdown: 30; /* new — no platform precedent */
  --z-sticky: 40; /* new — no platform precedent */
  --z-modal: 70; /* new — no platform precedent */
  --z-shell-topbar: calc(var(--z-modal) - 1); /* The Assess shell pages' top bar (assess-shell.css): above the page's own layers, below .beam-modal. The dashboard's bar stays 10002 (header.css, UX-44b). */
  --z-shell-sidebar: calc(var(--z-modal) - 1); /* The Assess shell pages' side menu (assess-shell.css): beside the canvas, below .beam-modal. Elsewhere #sidebar-wrapper stays 1000 (sidebar.css). */
  --z-modal-over-drawer: calc(var(--z-modal) + 30); /* Above the Systems editor (70) and settings drawer (90). */
  --z-modal-over-sidebar: 1001; /* Legacy sidebar is 1000; matches the admin document viewer's overlay layer. */
  --z-tooltip-over-modal: 1002; /* Floating tooltips: also readable on a chip inside a modal (offers score pop-ups). */
  --z-modal-over-solar: 2147483001; /* Above the solar fullscreen layer (2147483000), including its settings drawer. */
  --z-toast: 80; /* admin-globals.css .admin-globals-toast */
  --z-fullscreen-frame: 40; /* UX-29 fullscreen-frame.js; same level as sticky, below shell menus. */
}

:root {
  --z-notice: 10010;
  --notice-stack-top: 88px;
}
