/* Design tokens — the one file with colors, radii, spacings.

   Since 2026-10-22 the values of the carelogic style guide (GitRepo/styleguidelines,
   web/carelogic-tokens.css, Gestaltungsrichtlinien v1.0): primary color #116799, Open Sans,
   radius about 10 px. Only the values were exchanged — the names of the tokens and every
   control stay as they were; the style guide has the same roles (brand, fill, stroke, ink,
   status colors), so no rule in portal.css or report.css had to change. Dark mode: the
   guidelines know none; the style guide's own neutral values are taken over. */

/* Open Sans, served locally — no call to Google Fonts (data protection). Licence: SIL OFL,
   next to the files. In the sent report file the path does not resolve; it then falls back to
   the system font of the stack, which is intended — embedding the font would make every file
   half a megabyte larger. */
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/open-sans/OpenSans-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/open-sans/OpenSans-SemiBold.ttf") format("truetype");
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/open-sans/OpenSans-Bold.ttf") format("truetype");
}

:root {
    --brand: #116799;
    --brand-pressed: #0D5379;
    --brand-soft: #D1E1E7;
    /* Focus and selection in the primary color — the style guide adds no extra color. */
    --accent: #116799;
    --accent-soft: #D1E1E7;
    --bg: #F7F7F8;
    --surface: #FFFFFF;
    --fill: #F3F3F4;
    --fill-2: #E7ECEF;
    --stroke: #D5DEE4;
    --stroke-2: #BCCAD3;
    --ink: #4A5964;
    --ink-2: #61707A;
    --ink-3: #8A97A1;
    --blue: #116799;
    --blue-soft: #D1E1E7;
    --amber: #B0700F;
    --amber-soft: #FBEBD3;
    --red: #C9352F;
    --red-soft: #FBE4E3;
    --green: #0E7D58;
    --green-soft: #DEF3EA;
    --purple: #6A48E0;
    --purple-soft: #EBE6FD;
    --r-card: 10px;
    --r-tile: 10px;
    --r-ctrl: 10px;
    --sh: 0 1px 2px rgba(20, 30, 40, .05), 0 6px 20px rgba(20, 30, 40, .05);
    --font: "Open Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, system-ui, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color-scheme: light dark;
}

/* Dark color scheme — the style guide's own values (neutral black, every layer one step
   lighter than the one below; the primary color lightened, #116799 would be too dark as text).
   Three states, controlled via data-theme on the <html> element:
     (no attribute) → follow the operating system (default)
     hell           → explicitly light, even on a dark system
     dunkel         → explicitly dark, even on a light system */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="hell"]) {
        --brand: #3BAAEA;
        --brand-pressed: #2C93CF;
        --brand-soft: #123246;
        --accent: #3BAAEA;
        --accent-soft: #0F2E42;
        --bg: #121212;
        --surface: #1C1C1C;
        --fill: #232323;
        --fill-2: #2A2A2A;
        --stroke: #2F2F2F;
        --stroke-2: #3D3D3D;
        --ink: #EDEDED;
        --ink-2: #A9A9A9;
        --ink-3: #7C7C7C;
        --blue: #3BAAEA;
        --blue-soft: #0F2E42;
        --amber: #F0A23E;
        --amber-soft: #3E3220;
        --red: #F0605B;
        --red-soft: #3E2726;
        --green: #2BB585;
        --green-soft: #173A31;
        --purple: #9B82F5;
        --purple-soft: #2C2942;
        --sh: 0 1px 2px rgba(0, 0, 0, .22), 0 6px 20px rgba(0, 0, 0, .26);
    }
}

/* Explicitly chosen — applies independently of the operating system. */
:root[data-theme="dunkel"] {
    --brand: #3BAAEA;
    --brand-pressed: #2C93CF;
    --brand-soft: #123246;
    --accent: #3BAAEA;
    --accent-soft: #0F2E42;
    --bg: #121212;
    --surface: #1C1C1C;
    --fill: #232323;
    --fill-2: #2A2A2A;
    --stroke: #2F2F2F;
    --stroke-2: #3D3D3D;
    --ink: #EDEDED;
    --ink-2: #A9A9A9;
    --ink-3: #7C7C7C;
    --blue: #3BAAEA;
    --blue-soft: #0F2E42;
    --amber: #F0A23E;
    --amber-soft: #3E3220;
    --red: #F0605B;
    --red-soft: #3E2726;
    --green: #2BB585;
    --green-soft: #173A31;
    --purple: #9B82F5;
    --purple-soft: #2C2942;
    --sh: 0 1px 2px rgba(0, 0, 0, .22), 0 6px 20px rgba(0, 0, 0, .26);
    color-scheme: dark;
}

:root[data-theme="hell"] {
    color-scheme: light;
}

/* Printing stays light, even out of the dark scheme. */
@media print {
    :root {
        --bg: #fff;
        --surface: #fff;
        --fill: #F3F3F4;
        --fill-2: #E7ECEF;
        --stroke: #D5DEE4;
        --stroke-2: #BCCAD3;
        --ink: #4A5964;
        --ink-2: #61707A;
        --ink-3: #8A97A1;
        --brand: #116799;
    }
}
