/* tokens.css – GENERATED by scripts/tokens_bauen.mjs – do not edit by hand: change the source and run
   "node scripts/tokens_bauen.mjs". Owner: B (design system). The first stylesheet: it fixes the order of the cascade
   layers. The only file with colour values. Light is the default and also applies to print. Dark appears twice, both
   inside @media screen: for the system preference unless the person chose light, and for the explicit choice. */
@layer reset, tokens, base, components, layout, pages, utilities, print;

@layer tokens {
  :root {
    color-scheme: light;
    --bg: #f3f3f5;
    --surface: #ffffff;
    --surface-2: #f8f8fa;
    --surface-hover: #f1f1f4;
    --surface-active: #e9e9ee;
    --surface-sunken: #f3f3f5;
    --surface-raised: #ffffff;
    --scrim: rgb(16 17 22 / 0.42);
    --border: #e3e3e8;
    --border-strong: #d2d2d9;
    --border-input: #8a8a94;
    --text: #16161a;
    --text-2: #4c4c55;
    --text-3: #61616a;
    --text-on-solid: #ffffff;
    --accent: #3e63dd;
    --accent-hover: #3457d0;
    --accent-pressed: #2c4bbb;
    --accent-text: #3354c4;
    --accent-line: #3e63dd;
    --accent-subtle: #eef2fe;
    --accent-subtle-hover: #e2e9fd;
    --focus: #3e63dd;
    --nav-hover: #eaeaee;
    --nav-aktiv: #e3e3e9;
    --tip-bg: #1d1d22;
    --tip-text: #f5f5f7;
    --tip-border: #1d1d22;
    --chip: #eeeef2;
    --chip-hover: #e4e4ea;
    --danger-solid: #c4282b;
    --danger-solid-hover: #ab2225;
    --danger-text: #b42318;
    --danger-subtle: #fdf1f0;
    --danger-border: #d4554c;
    --rose-text: #be123c;
    --rose-subtle: #fdf0f3;
    --rose-dot: #e11d48;
    --success-text: #136c37;
    --success-subtle: #ebf7ef;
    --success-border: #3b9862;
    --success-dot: #1f9a52;
    --info-text: #3354c4;
    --info-subtle: #eef2fe;
    --info-border: #6a86e4;
    --neutral-text: #4c4c55;
    --neutral-subtle: #efeff3;
    --neutral-dot: #7f7f8a;
    --neutral-solid: #3f3f47;
    --neutral-solid-text: #ffffff;
    --mark-key: #fcd34d;
    --mark-key-text: #16161a;
    --mark-passage: #fef3c7;
    --mark-edge: #b45309;
    --doc-chip: #fcd34d;
    --doc-chip-text: #451a03;
    --doc-chip-border: #b45309;
    --paper: #ffffff;
    --paper-text: #16161a;
    --paper-border: #e3e3e8;
    --paper-well: #f6f6f8;
    --cat-surface: #f3f4f7;
    --cat-head: #e9ebf0;
    --cat-border: #d6d9e1;
    --cat-ring: #80838f;
    --cat-text: #3b3d46;
    --cat-eyebrow: #555865;
    --theme-color: #f3f3f5;
    --shadow-paper: 0 1px 2px rgb(16 18 27 / 0.05), 0 2px 6px -2px rgb(16 18 27 / 0.06);
    --shadow-pop: 0 10px 28px -8px rgb(16 18 27 / 0.18), 0 2px 6px -2px rgb(16 18 27 / 0.08);
    --shadow-dialog: 0 28px 64px -16px rgb(16 18 27 / 0.32), 0 10px 20px -10px rgb(16 18 27 / 0.14);
    --shadow-dock: 0 -8px 24px -12px rgb(16 18 27 / 0.14);

    /* Typography */
    --font-ui: "Inter", system-ui, "Segoe UI", sans-serif;
    --font-text: "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
    --text-weight: 400;                 /* serif reading text; 420 in dark */

    --fs-12: 0.75rem;     /* 12/16 meta, pills, kbd, eyebrow */
    --fs-13: 0.8125rem;   /* 13/20 secondary text */
    --fs-14: 0.875rem;    /* 14/20 UI base */
    --fs-15: 0.9375rem;   /* 15/24 excerpts (serif), composer */
    --fs-16: 1rem;        /* 16/24 dialog title; phone reading text */
    --fs-17: 1.0625rem;   /* 17/27 document, 17/28 answer */
    --fs-18: 1.125rem;    /* 18/26 question (h2), subject in the reading pane */
    --fs-20: 1.25rem;     /* 20/28 mail subject (h1), phone h1 */
    --fs-22: 1.375rem;    /* 22/30 h1, key figures */

    /* Spacing: 4 px grid */
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
    --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

    /* Control heights */
    --h-xs: 24px; --h-sm: 28px; --h-md: 32px; --h-lg: 36px; --h-xl: 44px;
    --row: 40px;                        /* list row; 32px with data-dichte="kompakt" */

    /* Radii */
    --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-xl: 12px; --r-full: 999px;

    /* Motion */
    --dur-1: 120ms; --dur-2: 180ms; --dur-3: 240ms;
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

    /* Layers (dialogs, palette and drawer use the top layer via showModal) */
    --z-sticky: 2; --z-dock: 4; --z-pane: 5; --z-handle: 6; --z-header: 30; --z-scrim: 40; --z-sheet: 50;
    --z-popover: 70; --z-toast: 80; --z-skip: 100;

    /* Layout */
    --leiste: 240px;
    --rail: 56px;
    --rand: 8px;
    --inhalt-max: 1200px;
    --lesebreite: 0.5;                  /* pane share of the work area (0.3–0.7); CSSOM, stored as mailarchiv.lesebreite */
    --composer-h: 160px;                /* height of the docked composer; measured and set via CSSOM (scroll-padding) */
  }

  [data-dichte="kompakt"] { --row: 32px; }
}

@layer tokens {
  @media screen and (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      color-scheme: dark;
      --bg: #0b0b0e;
      --surface: #131317;
      --surface-2: #17171c;
      --surface-hover: #1c1c22;
      --surface-active: #24242b;
      --surface-sunken: #0e0e11;
      --surface-raised: #1b1b21;
      --scrim: rgb(0 0 0 / 0.6);
      --border: #26262d;
      --border-strong: #34343d;
      --border-input: #72727e;
      --text: #ececf1;
      --text-2: #a7a7b2;
      --text-3: #9494a0;
      --text-on-solid: #ffffff;
      --accent: #3e63dd;
      --accent-hover: #3557d6;
      --accent-pressed: #2f4fc4;
      --accent-text: #9db0ff;
      --accent-line: #6d8af0;
      --accent-subtle: #1a2140;
      --accent-subtle-hover: #212a50;
      --focus: #7b96f5;
      --nav-hover: #18181d;
      --nav-aktiv: #202028;
      --tip-bg: #2a2a31;
      --tip-text: #f5f5f7;
      --tip-border: #3b3b45;
      --chip: #23232a;
      --chip-hover: #2c2c34;
      --danger-solid: #c4282b;
      --danger-solid-hover: #b42325;
      --danger-text: #ff8b84;
      --danger-subtle: #2b1416;
      --danger-border: #c8463f;
      --rose-text: #ff93ad;
      --rose-subtle: #2b1520;
      --rose-dot: #fb5f84;
      --success-text: #63d394;
      --success-subtle: #0f2619;
      --success-border: #2f9a5d;
      --success-dot: #34c472;
      --info-text: #9db0ff;
      --info-subtle: #1a2140;
      --info-border: #5f7ee6;
      --neutral-text: #b4b4bf;
      --neutral-subtle: #23232a;
      --neutral-dot: #9494a0;
      --neutral-solid: #d4d4dc;
      --neutral-solid-text: #16161a;
      --mark-key: #6f5813;
      --mark-key-text: #fdfcf7;
      --mark-passage: #3a3015;
      --mark-edge: #f5a524;
      --doc-chip: #fbbf24;
      --doc-chip-text: #231a02;
      --doc-chip-border: #fbbf24;
      --paper: #1c1a17;
      --paper-text: #e6dfd3;
      --paper-border: #302b25;
      --paper-well: #0f0f13;
      --cat-surface: #191b22;
      --cat-head: #20232c;
      --cat-border: #2c303b;
      --cat-ring: #7d808e;
      --cat-text: #cbcdd6;
      --cat-eyebrow: #a2a5b4;
      --theme-color: #0b0b0e;
      --shadow-paper: 0 1px 2px rgb(0 0 0 / 0.45);
      --shadow-pop: 0 12px 32px -8px rgb(0 0 0 / 0.6), 0 2px 6px -2px rgb(0 0 0 / 0.4);
      --shadow-dialog: 0 28px 64px -16px rgb(0 0 0 / 0.75), 0 10px 20px -10px rgb(0 0 0 / 0.5);
      --shadow-dock: 0 -8px 24px -12px rgb(0 0 0 / 0.6);
      --text-weight: 420;
    }
  }
  @media screen {
    :root[data-theme="dark"] {
      color-scheme: dark;
      --bg: #0b0b0e;
      --surface: #131317;
      --surface-2: #17171c;
      --surface-hover: #1c1c22;
      --surface-active: #24242b;
      --surface-sunken: #0e0e11;
      --surface-raised: #1b1b21;
      --scrim: rgb(0 0 0 / 0.6);
      --border: #26262d;
      --border-strong: #34343d;
      --border-input: #72727e;
      --text: #ececf1;
      --text-2: #a7a7b2;
      --text-3: #9494a0;
      --text-on-solid: #ffffff;
      --accent: #3e63dd;
      --accent-hover: #3557d6;
      --accent-pressed: #2f4fc4;
      --accent-text: #9db0ff;
      --accent-line: #6d8af0;
      --accent-subtle: #1a2140;
      --accent-subtle-hover: #212a50;
      --focus: #7b96f5;
      --nav-hover: #18181d;
      --nav-aktiv: #202028;
      --tip-bg: #2a2a31;
      --tip-text: #f5f5f7;
      --tip-border: #3b3b45;
      --chip: #23232a;
      --chip-hover: #2c2c34;
      --danger-solid: #c4282b;
      --danger-solid-hover: #b42325;
      --danger-text: #ff8b84;
      --danger-subtle: #2b1416;
      --danger-border: #c8463f;
      --rose-text: #ff93ad;
      --rose-subtle: #2b1520;
      --rose-dot: #fb5f84;
      --success-text: #63d394;
      --success-subtle: #0f2619;
      --success-border: #2f9a5d;
      --success-dot: #34c472;
      --info-text: #9db0ff;
      --info-subtle: #1a2140;
      --info-border: #5f7ee6;
      --neutral-text: #b4b4bf;
      --neutral-subtle: #23232a;
      --neutral-dot: #9494a0;
      --neutral-solid: #d4d4dc;
      --neutral-solid-text: #16161a;
      --mark-key: #6f5813;
      --mark-key-text: #fdfcf7;
      --mark-passage: #3a3015;
      --mark-edge: #f5a524;
      --doc-chip: #fbbf24;
      --doc-chip-text: #231a02;
      --doc-chip-border: #fbbf24;
      --paper: #1c1a17;
      --paper-text: #e6dfd3;
      --paper-border: #302b25;
      --paper-well: #0f0f13;
      --cat-surface: #191b22;
      --cat-head: #20232c;
      --cat-border: #2c303b;
      --cat-ring: #7d808e;
      --cat-text: #cbcdd6;
      --cat-eyebrow: #a2a5b4;
      --theme-color: #0b0b0e;
      --shadow-paper: 0 1px 2px rgb(0 0 0 / 0.45);
      --shadow-pop: 0 12px 32px -8px rgb(0 0 0 / 0.6), 0 2px 6px -2px rgb(0 0 0 / 0.4);
      --shadow-dialog: 0 28px 64px -16px rgb(0 0 0 / 0.75), 0 10px 20px -10px rgb(0 0 0 / 0.5);
      --shadow-dock: 0 -8px 24px -12px rgb(0 0 0 / 0.6);
      --text-weight: 420;
    }
  }
}
