/*
 * Colour tokens of the redesigned cabinet. Every colour that differs from theme to theme is one of these variables,
 * so a theme is one block here: «Лён» (light), «Студия» (dark) and «Графит» (neutral dark), switched by data-theme
 * on <html> without touching a single component. The few colours written in place elsewhere read alike in every
 * theme: light outlines over dark controls and the video stage, and the player's shadow, which shows on «Лён» only.
 */
:root {
    --font-ui: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Yeseva One', Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --radius-s: 8px;
    --radius-m: 12px;
    --radius-l: 16px;
    --radius-xl: 20px;
}

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

    /* Surfaces, from the page down to sunken fields */
    --bg: #F4F6FA;
    --surface: #FFFFFF;
    --surface-sunken: #F7F8FC;

    /* Lines, from the faintest row divider to the strongest control border */
    --line-row: #EDF0F6;
    --line-header: #E4E8F0;
    --line: #E1E6EF;
    --line-strong: #D9DFEA;
    --line-control: #CCD4E3;

    /* Scrollbar thumb, at rest and under the pointer: between the control border and the hints, so it shows on the
       surface without reading as one more border */
    --scrollbar: #B2BBCF;
    --scrollbar-hover: #97A2BA;

    /* Text, from headings to hints */
    --text: #111A2E;
    --text-2: #2B3650;
    --text-3: #4A5570;
    --text-4: #3A4560;
    --muted: #5E677F;
    --muted-2: #97A2BA;

    /* Accent and the tints built on it */
    --accent: #2D5BB8;
    --accent-ink: #1F4AA0;
    --on-accent: #F4F6FA;
    --brand: #5488E2;
    --brand-mark: #4A7BD8;
    --selected: #EAF0FE;
    --selected-line: #7C9CE3;
    --tint: #E3EBFD;
    --chip: #EDF1F8;
    --segment-on: #E6EDFC;
    --avatar: #DCE6FB;
    --eva: #E3EAF9;

    /* Score bands: 67 and above, 34–66, up to 33 */
    --band-strong: #2D5BB8;
    --band-mid: #7A89AE;
    --band-weak: #B0521C;

    /* Warm: what is about to run out or needs a decision */
    --warm: #B0521C;
    --warm-ink: #8A3F14;
    --warm-tint: #FCEBDD;
    --warm-line: #E4B592;

    /* Funnel: started, finished, shortlisted, over the opened-link track */
    --funnel-track: #EDF1F8;
    --funnel-started: #CFDCF7;
    --funnel-finished: #8FAEEB;
    --funnel-short: #2D5BB8;
    /* The vacancy page's four funnel steps, from opened to shortlisted */
    --funnel-step-1: #CFDCF7;
    --funnel-step-2: #AFC5F2;
    --funnel-step-3: #7C9FE6;
    --funnel-step-4: #2D5BB8;

    /* Board: columns sit a shade below the page, cards on the surface */
    --column: #EEF1F7;
    --score-mid-ink: #3A4560;
    --tone-0: #DCE6FB;
    --tone-1: #E4E0F7;
    --tone-2: #DCEEF0;
    --tone-3: #EAE0F5;
    --tone-4: #DDE8F7;

    /* Dossier: the strengths and weaknesses cards, the decision buttons */
    --strengths-line: #DCE6FB;
    --strengths-icon: #D6E2FB;
    --weaknesses-line: #EBC6AC;
    --decision-review: #2B3650;

    /* Video: the dark stage, its silhouette while the answer loads, and the overlays on top */
    --stage-1: #25406F;
    --stage-2: #13213E;
    --stage-3: #0C1528;
    --stage-head: #2F4876;
    --stage-body: #2A4170;
    --stage-ink: #EEF2FA;
    --stage-accent: #93B3F6;
    --stage-overlay: rgba(8, 14, 30, 0.74);
    --stage-track: rgba(238, 242, 250, 0.2);
    --player-backdrop: rgba(8, 14, 30, 0.74);

    /* Comparison: answer cells from 90 and above down to the weak band, and the three lit chart lines */
    --cell-90: #AFC5F2;
    --cell-80: #CFDCF7;
    --cell-67: #E3EAF9;
    --cell-33: #F7F8FC;
    --cell-0: #FCEBDD;
    --line-0: #2D5BB8;
    --line-1: #0F7C6E;
    --line-2: #7B3FB8;

    --company-avatar: #111A2E;
    --company-avatar-ink: #FFFFFF;
    --shadow-pop: 0 24px 48px -24px rgba(22, 34, 58, 0.28);
    --dialog-backdrop: rgba(17, 26, 46, 0.32);
    --crop-shade: rgba(8, 14, 30, 0.55);
    --focus-ring: 0 0 0 3px rgba(45, 91, 184, 0.28);
    /* The arrow of a drop-down drawn by the cabinet, down and, while its list is open, up: the --text-3 colour above,
       which a picture in url() cannot read */
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%234A5570%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 9l6 6 6-6%27/%3E%3C/svg%3E");
    --select-arrow-open: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%234A5570%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 15l6-6 6 6%27/%3E%3C/svg%3E");
}

/* «Студия», the dark theme: the colours of the original layouts, from which «Лён» was derived role by role.
   The two share the video stage — it is footage, not interface; «Графит» paints its own, as its layouts do. */
:root[data-theme="studio"] {
    color-scheme: dark;

    --bg: #0B1326;
    --surface: #0F1A31;
    --surface-sunken: #101B33;

    --line-row: #172540;
    --line-header: #1A2743;
    --line: #1E2D4C;
    --line-strong: #22324F;
    --line-control: #2A3B5E;

    --scrollbar: #405276;
    --scrollbar-hover: #56688F;

    --text: #EEF2FA;
    --text-2: #D5DCEC;
    --text-3: #B3BED6;
    --text-4: #C9D2E6;
    --muted: #8C98B5;
    --muted-2: #56688F;

    --accent: #93B3F6;
    --accent-ink: #B9CEFA;
    --on-accent: #0B1326;
    --brand: #5488E2;
    --brand-mark: #7FA4F0;
    --selected: #16244A;
    --selected-line: #4A6BB0;
    --tint: #14284A;
    --chip: #1A2848;
    --segment-on: #1A2A4C;
    --avatar: #2B4172;
    --eva: #1B2B50;

    --band-strong: #93B3F6;
    --band-mid: #5B6F9B;
    --band-weak: #F0A877;

    --warm: #F0A877;
    --warm-ink: #F6C9A5;
    --warm-tint: #2A2130;
    --warm-line: #6B4A38;

    --funnel-track: #1A2848;
    --funnel-started: #2E4677;
    --funnel-finished: #4E73BF;
    --funnel-short: #93B3F6;
    --funnel-step-1: #2E4677;
    --funnel-step-2: #3D5C9E;
    --funnel-step-3: #5E84CF;
    --funnel-step-4: #93B3F6;

    --column: #0E182E;
    --score-mid-ink: #C9D2E6;
    --tone-0: #2B4172;
    --tone-1: #3B3A6E;
    --tone-2: #2D4F63;
    --tone-3: #40365E;
    --tone-4: #2F4A70;

    --strengths-line: #2B4172;
    --strengths-icon: #243A68;
    --weaknesses-line: #4A3A40;
    --decision-review: #D5DCEC;

    --stage-1: #25406F;
    --stage-2: #13213E;
    --stage-3: #0C1528;
    --stage-head: #2F4876;
    --stage-body: #2A4170;
    --stage-ink: #EEF2FA;
    --stage-accent: #93B3F6;
    --stage-overlay: rgba(8, 14, 30, 0.74);
    --stage-track: rgba(238, 242, 250, 0.2);
    --player-backdrop: rgba(0, 0, 0, 0.7);

    --cell-90: #3D5C9E;
    --cell-80: #2E4677;
    --cell-67: #1B2B50;
    --cell-33: #101B33;
    --cell-0: #2A2130;
    --line-0: #93B3F6;
    --line-1: #7ED4C6;
    --line-2: #D2A8F2;

    --company-avatar: #EEF2FA;
    --company-avatar-ink: #0E1830;
    --shadow-pop: 0 24px 48px -24px rgba(0, 0, 0, 0.7);
    --dialog-backdrop: rgba(17, 26, 46, 0.32);
    --crop-shade: rgba(4, 8, 18, 0.62);
    --focus-ring: 0 0 0 3px rgba(147, 179, 246, 0.35);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23B3BED6%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 9l6 6 6-6%27/%3E%3C/svg%3E");
    --select-arrow-open: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23B3BED6%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 15l6-6 6 6%27/%3E%3C/svg%3E");
}

/* «Графит», the neutral dark theme among the palettes the layouts compare: its greys carry no blue, which is left
   to the accent, the brand and the charts. The colours follow Studio's role by role, as the Graphite layouts
   paint them; the funnel's middle step, the strongest heat cell and the board column, which those layouts do not
   show, sit between their neighbours, and the chart keeps the hues of its series. The video stage and the dimmer
   under a dialog are grey and black as well, where the other two themes keep them a deep blue. */
:root[data-theme="graphite"] {
    color-scheme: dark;

    --bg: #121418;
    --surface: #191B1F;
    --surface-sunken: #1A1C21;

    --line-row: #23262B;
    --line-header: #25282E;
    --line: #2B2E34;
    --line-strong: #2F3238;
    --line-control: #383C43;

    --scrollbar: #4D525C;
    --scrollbar-hover: #626976;

    --text: #F1F2F4;
    --text-2: #DADCE1;
    --text-3: #BBBEC5;
    --text-4: #CFD2D8;
    --muted: #9598A1;
    --muted-2: #626976;

    --accent: #93B3F6;
    --accent-ink: #BBCEF6;
    --on-accent: #121418;
    --brand: #5488E2;
    --brand-mark: #7FA4F0;
    --selected: #23272E;
    --selected-line: #4A6BB0;
    --tint: #252930;
    --chip: #262930;
    --segment-on: #282B32;
    --avatar: #3E434D;
    --eva: #292D34;

    --band-strong: #93B3F6;
    --band-mid: #69707F;
    --band-weak: #F0A877;

    --warm: #F0A877;
    --warm-ink: #F6C9A5;
    --warm-tint: #2A2130;
    --warm-line: #6B4A38;

    --funnel-track: #262930;
    --funnel-started: #434852;
    --funnel-finished: #4E73BF;
    --funnel-short: #93B3F6;
    --funnel-step-1: #434852;
    --funnel-step-2: #4B5A78;
    --funnel-step-3: #5E84CF;
    --funnel-step-4: #93B3F6;

    --column: #15171B;
    --score-mid-ink: #CFD2D8;
    --tone-0: #3E434D;
    --tone-1: #40404B;
    --tone-2: #454C4F;
    --tone-3: #3E3C44;
    --tone-4: #444A51;

    --strengths-line: #3E434D;
    --strengths-icon: #373C45;
    --weaknesses-line: #4A3A40;
    --decision-review: #DADCE1;

    --stage-1: #3C414B;
    --stage-2: #1F2228;
    --stage-3: #141619;
    --stage-head: #444952;
    --stage-body: #3E434C;
    --stage-ink: #F1F2F4;
    --stage-accent: #93B3F6;
    --stage-overlay: rgba(12, 13, 16, 0.74);
    --stage-track: rgba(241, 242, 244, 0.2);
    --player-backdrop: rgba(0, 0, 0, 0.7);

    --cell-90: #4B5A78;
    --cell-80: #434852;
    --cell-67: #292D34;
    --cell-33: #1A1C21;
    --cell-0: #2A2130;
    --line-0: #93B3F6;
    --line-1: #7ED4C6;
    --line-2: #D2A8F2;

    --company-avatar: #F1F2F4;
    --company-avatar-ink: #17191E;
    --shadow-pop: 0 24px 48px -24px rgba(0, 0, 0, 0.7);
    --dialog-backdrop: rgba(0, 0, 0, 0.4);
    --crop-shade: rgba(0, 0, 0, 0.6);
    --focus-ring: 0 0 0 3px rgba(147, 179, 246, 0.35);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23BBBEC5%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 9l6 6 6-6%27/%3E%3C/svg%3E");
    --select-arrow-open: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23BBBEC5%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 15l6-6 6 6%27/%3E%3C/svg%3E");
}
