/* Portal appearance contract. Only this file owns visual values. */
:root, html[data-theme="flat"] {
  color-scheme: light;
  --ink: #172235;
  --muted: #526178;
  --subtle: #667388;
  --navy: #102846;
  --navy-2: #17385f;
  --teal: #08736e;
  --teal-2: #066a66;
  --paper: #ffffff;
  --wash: #f3f6f9;
  --surface-subtle: #f8fafc;
  --surface-raised: #ffffff;
  --surface-hover: #e7eef5;
  --line: #dce3eb;
  --line-strong: #80909f;
  --on-emphasis: #ffffff;
  --inverse-muted: #c9dce7;
  --accent-soft: #e2f3f0;
  --accent-line: #9ccfc9;
  --inverse-accent: #91e2da;
  --green: #11764f;
  --green-bg: #e2f5eb;
  --green-line: #9ccab2;
  --amber: #935500;
  --amber-bg: #fff3d6;
  --amber-line: #d8b86f;
  --red: #b42318;
  --red-bg: #ffebe9;
  --red-line: #d8948f;
  --violet: #6840a5;
  --violet-bg: #f0eafd;
  --violet-line: #c4b1e0;
  --info: #2d65a0;
  --info-bg: #e7f0fb;
  --info-line: #a8c3df;
  --overlay: #081628;
  --font-ui: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: var(--font-ui);
  --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --fw-body: 400; --fw-medium: 550; --fw-bold: 650; --fw-black: 700;
  --r-xs: 0; --r-sm: 0; --r-md: 0; --r-lg: 0; --r-xl: 0; --r-pill: 0; --r-round: 50%;
  --shadow-1: none; --shadow-2: none; --shadow-3: 0 16px 48px rgb(8 22 40 / 24%);
  --lift: none; --blur: none;
  --border-width: 1px; --border-heavy: 2px; --border-accent: 4px; --focus-width: 2px;
  --card-border: var(--line);
  --control-line: #80909f;
  --focus: #066a66;
  --disabled-opacity: .6; --opacity-faint: .3; --opacity-muted: .5; --opacity-soft: .7;
  --tint-faint: 5%; --tint-soft: 10%; --tint-medium: 20%; --tint-strong: 40%; --tint-heavy: 70%; --tint-opaque: 90%;
  --duration-fast: 160ms; --duration-normal: 240ms; --duration-spin: 800ms; --duration-pulse: 1400ms; --duration-reduced: .01ms;
  --leading-body: 1.5; --leading-heading: 1.2;
  --tracking-normal: 0; --tracking-label: .06em; --tracking-title: -.02em;
  --text-caption: 11px; --text-small: 12px; --text-body-sm: 13px; --text-body: 14px;
  --text-body-lg: 16px; --text-title-sm: 18px; --text-title-md: 22px; --text-title-lg: 26px;
  --text-heading: 30px; --text-display-sm: 36px; --text-display: 44px; --text-hero: 64px;
  --heading-ink: var(--navy);
  --workspace-bg: var(--wash);
  --sidebar-bg: var(--navy); --sidebar-ink: var(--inverse-muted); --sidebar-muted: var(--inverse-muted);
  --sidebar-hover-bg: color-mix(in srgb, var(--paper) var(--tint-faint), transparent);
  --sidebar-hover-ink: var(--on-emphasis); --sidebar-hover-line: color-mix(in srgb, var(--paper) var(--tint-soft), transparent);
  --sidebar-active-bg: var(--teal); --sidebar-active-ink: var(--on-emphasis);
  --sidebar-active-line: color-mix(in srgb, var(--inverse-accent) var(--tint-medium), transparent);
  --sidebar-icon: var(--info-line); --sidebar-icon-bg: var(--sidebar-hover-bg);
  --sidebar-active-icon: var(--navy); --sidebar-active-icon-bg: var(--inverse-accent);
  --material-bg: var(--wash); --material-heading-bg: var(--surface-hover);
  --material-line: var(--inverse-muted); --material-divider: var(--green-line);
  --rail-bg: var(--paper); --rail-ink: var(--muted);
  --compact-bg: var(--navy); --compact-ink: var(--on-emphasis); --compact-muted: var(--inverse-muted);
  --compact-accent: var(--inverse-accent); --compact-line: var(--inverse-accent);
  --work-section-line: var(--line); --work-section-radius: var(--r-md);
  --reader-size: var(--text-body); --reader-leading: var(--leading-body); --reader-width: 80ch;
  --composer-max-height: 120px;
}
html[data-theme="light"] {
  --ink: #242a38; --muted: #626c7c; --subtle: #626c7c;
  --teal: #454fba; --teal-2: #38429f; --focus: #454fba;
  --paper: #ffffff; --wash: #f5f6f8; --surface-subtle: #f5f6f8;
  --surface-raised: #ffffff; --surface-hover: #f0f2f5;
  --line: #e1e5eb; --line-strong: #7f8999; --control-line: #7f8999;
  --accent-soft: #edf0fc; --accent-line: #aeb6e0;
  --green: #37765a; --green-bg: #edf5f0; --green-line: #a4c4b3;
  --amber: #896320; --amber-bg: #fcf4e5; --amber-line: #d5bd8c;
  --red: #ae3d40; --red-bg: #fceded; --red-line: #d7a0a2;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --fw-medium: 500; --fw-bold: 600; --fw-black: 650;
  --r-xs: 6px; --r-sm: 6px; --r-md: 6px; --r-lg: 6px; --r-xl: 6px; --r-pill: 6px;
  --leading-body: 1.45; --leading-heading: 1.3; --tracking-label: 0; --tracking-title: -.025em;
  --text-caption: 12px; --text-small: 13px; --text-title-sm: 19px; --text-heading: 26px; --text-display-sm: 26px;
  --heading-ink: var(--ink);
  --workspace-bg: var(--paper);
  --sidebar-bg: var(--wash); --sidebar-ink: var(--ink); --sidebar-muted: var(--muted);
  --sidebar-hover-bg: var(--surface-hover); --sidebar-hover-ink: var(--ink); --sidebar-hover-line: var(--line);
  --sidebar-active-bg: var(--accent-soft); --sidebar-active-ink: var(--teal); --sidebar-active-line: var(--accent-line);
  --sidebar-icon: var(--muted); --sidebar-icon-bg: transparent;
  --sidebar-active-icon: var(--teal); --sidebar-active-icon-bg: transparent;
  --material-heading-bg: var(--wash); --material-line: var(--line); --material-divider: var(--line);
  --rail-bg: var(--wash); --rail-ink: var(--ink);
  --compact-bg: var(--accent-soft); --compact-ink: var(--ink); --compact-muted: var(--muted);
  --compact-accent: var(--teal); --compact-line: var(--accent-line);
  --work-section-line: transparent; --work-section-radius: 0;
  --reader-size: 16px; --reader-leading: 1.6; --reader-width: 72ch;
  --composer-max-height: 160px; --control-height: 38px; --sidebar-width: 208px;
}
html[data-theme="light"][data-space="employee"] {
  --teal: #176b4b; --teal-2: #12583e; --focus: #176b4b;
  --accent-soft: #edf5f0; --accent-line: #a4c4b3;
}
@media(min-width:1500px) { html[data-theme="light"] { --sidebar-width: 228px; } }
html[data-theme="paper"] {
  --ink: #262923; --muted: #53584e; --subtle: #5a6054;
  --navy: #283b35; --navy-2: #324b41;
  --teal: #236448; --teal-2: #174d35; --focus: #174d35;
  --paper: #fffef9; --wash: #eeede5; --surface-subtle: #f5f3e9;
  --surface-raised: #fffef9; --surface-hover: #e8e8dc;
  --line: #c6c8b8; --line-strong: #7b8072; --control-line: #7b8072;
  --on-emphasis: #fffef9; --inverse-muted: #dde1d4; --inverse-accent: #bce4c8;
  --accent-soft: #e5eee2; --accent-line: #a5b9a2;
  --green: #2c6240; --green-bg: #e5efdf; --green-line: #9fbc95;
  --amber: #845209; --amber-bg: #faf0d0; --amber-line: #cbb673;
  --red: #9d3026; --red-bg: #f9e5db; --red-line: #cba092;
  --violet: #66507b; --violet-bg: #eee7f1; --violet-line: #bfb0ca;
  --info: #3c5d79; --info-bg: #e5edf0; --info-line: #a3b6c3;
  --overlay: #20281f;
  --font-heading: Georgia, "Times New Roman", serif;
  --shadow-1: 0 1px 0 rgb(38 41 35 / 8%); --shadow-2: 0 3px 10px rgb(38 41 35 / 8%);
  --shadow-3: 0 16px 48px rgb(38 41 35 / 24%);
}
/* Density is independent of theme; geometry (grids, breakpoints, charts) is not scaled. */
:root {
  --space-1: 1px;
  --space-2: 2px;
  --space-3: 3px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-14: 14px;
  --space-16: 16px;
  --space-18: 18px;
  --space-20: 20px;
  --space-22: 22px;
  --space-24: 24px;
  --space-28: 28px;
  --space-32: 32px;
  --space-36: 36px;
  --space-40: 40px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;
  --space-72: 72px;
  --space-80: 80px;
  --space-96: 96px;
  --layout-wide: 1540px; --layout-shell: 1240px;
  --control-height: 36px; --control-height-compact: 30px;
}
html[data-density="compact"] {
  --space-6: 5px;
  --space-8: 6px;
  --space-10: 8px;
  --space-12: 10px;
  --space-14: 11px;
  --space-16: 13px;
  --space-18: 14px;
  --space-20: 16px;
  --space-22: 18px;
  --space-24: 19px;
  --space-28: 22px;
  --space-32: 26px;
  --space-36: 29px;
  --space-40: 32px;
  --space-48: 38px;
  --space-56: 45px;
  --space-64: 51px;
  --space-72: 58px;
  --space-80: 64px;
  --space-96: 77px;
  --control-height: 30px; --control-height-compact: 28px;
}
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 200 700; font-display: swap; src: url(/presentation/fonts/commissioner-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 200 700; font-display: swap; src: url(/presentation/fonts/commissioner-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 200 700; font-display: swap; src: url(/presentation/fonts/commissioner-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 200 700; font-display: swap; src: url(/presentation/fonts/commissioner-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Company whiteboard: light semantic groups, matching the sales dossier map. */
:root {
 --wb-blue:#2363dc; --wb-blue-soft:#e7f1ff; --wb-blue-line:#b9d1f4;
 --wb-purple-soft:#f0e7fa; --wb-purple-line:#d7c3ef;
 --wb-mint-soft:#e6f6ec; --wb-mint-line:#bce1ce;
 --wb-note:#fff8d8; --wb-note-line:#eedfa5;
 --wb-dot:#bacce1; --wb-confirmed:#288f86; --wb-unverified:#d28b32; --wb-commercial:#baa9d8;
 --wb-minimap-mask:rgba(221,231,241,.45); --wb-shadow:0 3px 12px rgba(34,64,104,.08);
 --wb-radius:12px; --wb-group-radius:18px; --wb-revenue-size:34px;
}

/* Shared CRM typography, spacing and overlay primitives. */
:root {
  --crm-border-medium: 3px;
  --crm-letter-spacing-p04em: .04em;
  --crm-line-height-1: 1;
  --crm-line-height-1p1: 1.1;
  --crm-line-height-1p2: 1.2;
  --crm-line-height-1p22: 1.22;
  --crm-line-height-1p25: 1.25;
  --crm-line-height-1p3: 1.3;
  --crm-line-height-1p35: 1.35;
  --crm-line-height-1p4: 1.4;
  --crm-line-height-1p45: 1.45;
  --crm-line-height-1p5: 1.5;
  --crm-line-height-1p6: 1.6;
  --crm-line-height-1p7: 1.7;
  --crm-overlay: color-mix(in srgb,var(--overlay) 40%,transparent);
  --crm-overlay-soft: color-mix(in srgb,var(--overlay) 27%,transparent);
  --crm-text-1-em: 1em;
  --crm-text-10-px: 10px;
  --crm-text-15-px: 15px;
  --crm-text-17-px: 17px;
  --crm-text-19-px: 19px;
  --crm-text-1p04-em: 1.04em;
  --crm-text-1p07-em: 1.07em;
  --crm-text-1p1-em: 1.1em;
  --crm-text-1p2-em: 1.2em;
  --crm-text-1p4-em: 1.4em;
  --crm-text-1p6-em: 1.6em;
  --crm-text-1p75-em: 1.75em;
  --crm-text-1p8-em: 1.8em;
  --crm-text-20-px: 20px;
  --crm-text-21-px: 21px;
  --crm-text-23-px: 23px;
  --crm-text-24-px: 24px;
  --crm-text-2p25-em: 2.25em;
  --crm-text-32-px: 32px;
  --crm-text-38-px: 38px;
  --crm-text-68-px: 68px;
  --crm-text-p56-em: .56em;
  --crm-text-p75-em: .75em;
  --crm-text-p78-em: .78em;
  --crm-text-p81-em: .81em;
  --crm-text-p83-em: .83em;
  --crm-text-p84-em: .84em;
  --crm-text-p85-em: .85em;
  --crm-text-p85-rem: .85rem;
  --crm-text-p86-em: .86em;
  --crm-text-p87-em: .87em;
  --crm-text-p88-em: .88em;
  --crm-text-p89-em: .89em;
  --crm-text-p9-em: .9em;
  --crm-text-p91-em: .91em;
  --crm-text-p93-em: .93em;
  --crm-text-p94-em: .94em;
  --crm-text-p95-em: .95em;
  --space-11: 11px;
  --space-13: 13px;
  --space-15: 15px;
  --space-17: 17px;
  --space-25: 25px;
  --space-30: 30px;
  --space-38: 38px;
  --space-5: 5px;
  --space-7: 7px;
  --space-9: 9px;
}
