/*
 * Figures of the thermal calculator (App\Diagram\Thermal, thermal spec §4): the classes the figures add to the ones of
 * site.css (.diagram .l .t .m .d .f .s .k .a .b .c .h .x .xs .xxs). Link it on the pages that show the figures (the page of
 * the calculator, its print version); the stand-alone .svg files carry the same rules in App\Diagram\Thermal\ThermalDocument.
 *
 * k1 masonry, k2 concrete / mortar / fill, k3 wood (and the studs), k4 wool, k5 foam, k6 sheet, k7 air (hatched by the
 * drawing), k8 film (a line) — every fill is also told by its hatching and by the legend, colour is never the only sign.
 * z the zone of condensation, pl the plane of maximum moistening, cs the saturation curve, dp the dew point, fz the part
 * below 0 °C, ig a layer that is not counted, g the grid.
 * Label contrast: text is --c-text with a halo of --c-surface (site.css); on every fill it is ≥ 4,5:1 (WCAG AA) in both schemes,
 * and the curves (--th-blue, --c-accent, --c-error) are ≥ 4,5:1 on the surface (ThermalStyleTest checks both).
 */
:root {
    --th-k1: #e0b99f;
    --th-k2: #d3d6da;
    --th-k3: #e6cd96;
    --th-k4: #f4e48f;
    --th-k5: #bfe0ee;
    --th-k6: #ece6d6;
    --th-blue: #0b5d7a;
    --th-grid: #dce1e7;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --th-k1: #6f4a38;
        --th-k2: #4b535b;
        --th-k3: #7b6531;
        --th-k4: #6e6529;
        --th-k5: #2f5b6d;
        --th-k6: #575345;
        --th-blue: #78c4e0;
        --th-grid: #2c3640;
    }
}
@media not print {
    :root[data-theme="dark"] {
        --th-k1: #6f4a38;
        --th-k2: #4b535b;
        --th-k3: #7b6531;
        --th-k4: #6e6529;
        --th-k5: #2f5b6d;
        --th-k6: #575345;
        --th-blue: #78c4e0;
        --th-grid: #2c3640;
    }
}

.diagram .k1 { fill: var(--th-k1); stroke: var(--c-border-strong); stroke-width: 1; }
.diagram .k2 { fill: var(--th-k2); stroke: var(--c-border-strong); stroke-width: 1; }
.diagram .k3 { fill: var(--th-k3); stroke: var(--c-border-strong); stroke-width: 1; }
.diagram .k4 { fill: var(--th-k4); stroke: var(--c-border-strong); stroke-width: 1; }
.diagram .k5 { fill: var(--th-k5); stroke: var(--c-border-strong); stroke-width: 1; }
.diagram .k6 { fill: var(--th-k6); stroke: var(--c-border-strong); stroke-width: 1; }
.diagram .k7 { fill: var(--c-surface); stroke: var(--c-border-strong); stroke-width: 1; }
.diagram .k8 { fill: var(--c-text); stroke: none; }
.diagram .z { fill: var(--c-error); fill-opacity: .2; stroke: var(--c-error); stroke-width: 1; }
.diagram .pl { fill: none; stroke: var(--c-error); stroke-width: 2; stroke-dasharray: 8 4; }
.diagram .cs { fill: none; stroke: var(--th-blue); stroke-width: 2.5; stroke-linejoin: round; }
.diagram .dp { fill: none; stroke: var(--th-blue); stroke-width: 2.5; stroke-dasharray: 7 5; stroke-linejoin: round; }
.diagram .fz { fill: var(--th-blue); fill-opacity: .17; stroke: none; }
.diagram .ig { fill: var(--c-surface); fill-opacity: .62; stroke: var(--c-muted); stroke-width: 1; stroke-dasharray: 4 3; }
.diagram .g { fill: none; stroke: var(--th-grid); stroke-width: 1; }
