/* LeadRadar_web r3-fluent: design tokens.
   Every colour, font, size, radius, shadow and duration on the page comes from here.
   Numbers are derived from measured references (see reference-study.md, rules 1-15). */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-cyrillic-ext-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-cyrillic-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-ext-opsz-normal.woff2") format("woff2-variations");
  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: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-opsz-normal.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF;
}

:root {
  color-scheme: light;

  /* Brand: ADER HABER Docs core. Amsterdam is the only accent (rule 12). */
  --brand-amsterdam: #0a1c44;
  --brand-deep: #040f2a;
  --brand-navy: #123570;
  --brand-slate: #2e4070;
  --brand-mist: #b2c4e3;
  --brand-paper: #e1e9f9;

  /* Neutrals, tinted toward Amsterdam's hue. */
  --n-0: #ffffff;
  --n-25: #fafbfc;
  --n-50: #f6f7f9;
  --n-100: #f0f1f4;
  --n-150: #e9ebef;
  --n-200: #e1e4ea;
  --n-300: #cdd1d9;

  /* Surfaces */
  --surface-chrome: var(--n-100); /* rail and sidebar: the second neutral */
  --surface-canvas: var(--n-25); /* main sheet */
  --surface-raised: var(--n-0); /* cards, panel, palette, menus */
  --surface-sunken: var(--n-150); /* segmented track, kbd */
  --surface-lane: var(--n-100); /* board column lanes */
  --surface-hover: rgba(10, 28, 68, 0.045);
  --surface-selected: rgba(10, 28, 68, 0.07);
  --surface-scrim: rgba(10, 18, 40, 0.1);

  /* Text: three levels, all >= 4.5:1 on every surface above (rule 4). */
  --text-1: #15181e;
  --text-2: #4d5461;
  --text-3: #646b78;
  --text-on-accent: #ffffff;
  --text-link: var(--brand-navy);
  --avatar-bg: var(--brand-paper);
  --avatar-fg: var(--brand-amsterdam);

  /* Accent and the one semantic colour (rule 12). */
  --accent: var(--brand-amsterdam);
  --accent-hover: #142b5f;
  --accent-press: var(--brand-deep);
  --urgent: #b42318;
  --urgent-soft: rgba(180, 35, 24, 0.08);
  --warn: #b54708; /* a term within a week: amber, always with an icon and a word, never alone */
  --warn-soft: rgba(181, 71, 8, 0.08);

  /* Data: one hue family (Amsterdam), three steps, plus heat ramp for slot load. */
  --chart-1: var(--brand-amsterdam);
  --chart-2: #5a6e9c;
  --chart-3: var(--brand-mist);
  --heat-0: #eef1f7;
  --heat-1: #d3dcee;
  --heat-2: #9db0d6;
  --heat-3: #4f68a0;
  --heat-4: var(--brand-amsterdam);

  /* Lines: only between regions, alpha <= 8 % (rule 6). */
  --line: rgba(10, 28, 68, 0.08);
  --line-strong: rgba(10, 28, 68, 0.14);

  /* Focus */
  --focus: var(--brand-navy);
  --focus-ring: 0 0 0 2px var(--surface-raised), 0 0 0 4px var(--focus);

  /* Depth: shadows instead of borders, tinted to Amsterdam (rule 7). */
  --shadow-1: 0 0 0 1px rgba(10, 28, 68, 0.06), 0 1px 2px rgba(10, 28, 68, 0.05);
  --shadow-2:
    0 0 0 1px rgba(10, 28, 68, 0.07), 0 2px 4px rgba(10, 28, 68, 0.05), 0 8px 20px -6px rgba(10, 28, 68, 0.14);
  --shadow-3:
    0 0 0 0.5px rgba(10, 28, 68, 0.14), 0 2px 6px rgba(10, 28, 68, 0.05), 0 24px 64px -12px rgba(10, 28, 68, 0.3);
  --shadow-inset-top: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --shadow-control: 0 0 0 1px rgba(10, 28, 68, 0.08), 0 1px 2px rgba(10, 28, 68, 0.06);
  --shadow-primary: 0 1px 2px rgba(10, 28, 68, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --shadow-mark: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(10, 28, 68, 0.25);
  --mark-fg: #ffffff;
  --line-input: #8c93a0; /* field edge, 3:1 against white (WCAG 1.4.11) */

  /* Type (rules 1-3) */
  --font-ui: "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-brand: "Montserrat", "Inter Variable", sans-serif;
  /* Scale raised one step for reading (owner, 25.11): meta 12.5, interface 14, body and card titles 15. */
  --fs-12: 12.5px;
  --lh-12: 18px;
  --fs-13: 14px;
  --lh-13: 20px;
  --fs-14: 15px;
  --lh-14: 22px;
  --fs-16: 17px;
  --lh-16: 24px;
  --fs-20: 20px;
  --lh-20: 28px;
  --fs-24: 26px;
  --lh-24: 32px;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --tracking-body: -0.006em;
  --tracking-title: -0.014em;
  --tracking-display: -0.022em;

  /* Space, 4px base (rule 9) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* Radius (rule 8) */
  --r-6: 6px;
  --r-8: 8px;
  --r-10: 10px;
  --r-12: 12px;
  --r-full: 999px;

  /* Sizes (rules 10-11) */
  --h-row-nav: 30px;
  --h-row: 32px;
  --h-row-palette: 36px;
  --h-control: 32px;
  --w-rail: 52px;
  --w-sidebar: 232px;
  --w-column: 220px;
  --w-panel: clamp(680px, 68vw, 1040px); /* wide card panel with the documents column (owner, 25.11) */
  --w-aside: 320px;
  --w-palette: 640px;
  --avatar: 24px;

  /* Motion (rule 14) */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-micro: 120ms;
  --dur-short: 200ms;
  --dur-panel: 280ms;
  --dur-fill: 640ms;
  --dur-bar: 500ms;
  --dur-pulse: 1.6s;
  --dur-spin-step: 1.2s;
  --dur-spin-vstep: 1.1s;
  --dur-pop: 420ms;
  --dur-tick: 420ms;
  --dur-tick-delay: 120ms;
}

/* Reduced motion: every duration and delay is zero, so no transition or animation runs. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-micro: 0ms;
    --dur-short: 0ms;
    --dur-panel: 0ms;
    --dur-fill: 0ms;
    --dur-bar: 0ms;
    --dur-pulse: 0ms;
    --dur-spin-step: 0ms;
    --dur-spin-vstep: 0ms;
    --dur-pop: 0ms;
    --dur-tick: 0ms;
    --dur-tick-delay: 0ms;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --n-0: #1b1e24;
  --n-25: #15171c;
  --n-50: #121419;
  --n-100: #0f1115;
  --n-150: #22252c;
  --n-200: #2a2e36;
  --n-300: #3a3f49;

  --surface-chrome: var(--n-100);
  --surface-canvas: var(--n-25);
  --surface-raised: var(--n-0);
  --surface-sunken: #0b0c10;
  --surface-lane: #111318;
  --surface-hover: rgba(178, 196, 227, 0.06);
  --surface-selected: rgba(178, 196, 227, 0.1);
  --surface-scrim: rgba(0, 0, 0, 0.35);

  --text-1: #e8eaee;
  --text-2: #adb3be;
  --text-3: #8b919d;
  --text-on-accent: #0a1c44;
  --text-link: var(--brand-mist);
  --avatar-bg: #26324a;
  --avatar-fg: #dce5f5;

  --accent: #dce5f5;
  --accent-hover: #ffffff;
  --accent-press: var(--brand-mist);
  --urgent: #ff8b7b;
  --urgent-soft: rgba(255, 139, 123, 0.1);
  --warn: #f5b659;
  --warn-soft: rgba(245, 182, 89, 0.1);

  --chart-1: #dce5f5;
  --chart-2: #7f93c2;
  --chart-3: #3b4d78;
  --heat-0: #1c212b;
  --heat-1: #24324f;
  --heat-2: #34508a;
  --heat-3: #6f8cc8;
  --heat-4: #c9d6f0;

  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);

  --focus: var(--brand-mist);

  --shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 4px rgba(0, 0, 0, 0.35), 0 10px 24px -6px rgba(0, 0, 0, 0.6);
  --shadow-3: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.4), 0 24px 64px -12px rgba(0, 0, 0, 0.75);
  --shadow-inset-top: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-control: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-primary: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  --shadow-mark: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 0 1px rgba(178, 196, 227, 0.18);
  --line-input: #6e7584;
}
