/* Scoped from CUSTOS Monitor server-v1.5.2 public/assets/app.css. */
/* CUSTOS Monitor in Material Design 3.
   Colours: the M3 "tonal spot" scheme of the site's blue (#2457c5) with neutral grey surfaces (its neutral palettes at
   chroma 0 and 2, without the blue-violet tint), the same "neutral grey" as the trial Windows window; green and amber
   are harmonised to the blue for "ok" and "warning". Four more schemes of the program window (graphite, blue, warm,
   sepia) are made by tools/make-colors.mjs and put over it. The profile chooses auto, light or dark: the dark palette
   is written twice, once for "auto" with a dark system theme and once for "dark". Type: Roboto and Roboto Mono
   (fonts/, SIL OFL). Icons: Material Symbols Rounded (icons.svg, built by tools/make-icons.py). Motion: M3 easing,
   short; with less motion asked for nothing moves. */

@font-face { font-family: Roboto; font-style: normal; font-weight: 400; font-display: swap; src: url(monitor/fonts/roboto-cyrillic-400-normal.woff2) format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Roboto; font-style: normal; font-weight: 400; font-display: swap; src: url(monitor/fonts/roboto-latin-400-normal.woff2) format("woff2");
    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: Roboto; font-style: normal; font-weight: 500; font-display: swap; src: url(monitor/fonts/roboto-cyrillic-500-normal.woff2) format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Roboto; font-style: normal; font-weight: 500; font-display: swap; src: url(monitor/fonts/roboto-latin-500-normal.woff2) format("woff2");
    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: Roboto; font-style: normal; font-weight: 700; font-display: swap; src: url(monitor/fonts/roboto-cyrillic-700-normal.woff2) format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Roboto; font-style: normal; font-weight: 700; font-display: swap; src: url(monitor/fonts/roboto-latin-700-normal.woff2) format("woff2");
    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: "Roboto Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(monitor/fonts/roboto-mono-cyrillic-400-normal.woff2) format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(monitor/fonts/roboto-mono-latin-400-normal.woff2) format("woff2");
    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; }

/* ---------------------------------------------------------------------------------------------------------------------
   Colours, shadows, motion
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app {
    --md-primary: #4a5c92;
    --md-on-primary: #ffffff;
    --md-primary-container: #dbe1ff;
    /* The square behind the logo: always the colour of the base scheme, which the blue shield stands out on; the colour
       schemes (below) leave it as it is (the Blue one would hide the shield). */
    --brand-bg: #dbe1ff;
    --md-on-primary-container: #314578;
    --md-secondary: #585e71;
    --md-secondary-container: #dde2f9;
    --md-on-secondary-container: #414659;
    --md-tertiary-container: #ffd6f9;
    --md-on-tertiary-container: #5a3d58;
    --md-error: #ba1a1a;
    --md-on-error: #ffffff;
    --md-error-container: #ffdad6;
    --md-on-error-container: #93000a;
    --md-surface: #f9f9f9;
    --md-surface-bright: #ffffff;
    --md-on-surface: #1b1b1b;
    --md-on-surface-variant: #474648;
    --md-surface-container-lowest: #ffffff;
    --md-surface-container-low: #f3f3f3;
    --md-surface-container: #eeeeee;
    --md-surface-container-high: #e8e8e8;
    --md-surface-container-highest: #e2e2e2;
    --md-outline: #787678;
    --md-outline-variant: #c8c6c7;
    --md-inverse-surface: #303030;
    --md-inverse-on-surface: #f1f1f1;
    --md-inverse-primary: #b3c5ff;
    --md-ok: #006c4d;
    --md-ok-container: #b4f2d4;
    --md-on-ok-container: #00513a;
    --md-warn: #8a5100;
    --md-warn-container: #ffdcbd;
    --md-on-warn-container: #693c00;
    /* A list item on a card: white in the light theme, a step lighter than the card in the dark one. */
    --item-bg: #ffffff;
    --log-bg: #303030;
    --log-text: #f1f1f1;
    --heat-none: #e2e2e2;
    --heat-success: #40a17b;
    --heat-warning: #f09727;
    --heat-missed_offline: #adabac;
    --heat-missed: #ff8b68;
    --heat-error: #de3730;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23474648' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
    --sh1: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 3px 1px rgba(0, 0, 0, .15);
    --sh2: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 6px 2px rgba(0, 0, 0, .15);
    --sh3: 0 1px 3px rgba(0, 0, 0, .3), 0 4px 8px 3px rgba(0, 0, 0, .15);
    color-scheme: light;

    /* M3 motion: standard for small changes, emphasized decelerate for what comes in, accelerate for what leaves. */
    --ease: cubic-bezier(.2, 0, 0, 1);
    --ease-in: cubic-bezier(.05, .7, .1, 1);
    --ease-out: cubic-bezier(.3, 0, .8, .15);
    /* The colour behind the element: a floating label and the gap of a progress bar are painted with it. */
    --bg-here: var(--md-surface-container);
    /* Names the charts of the task page read (app.js). */
    --info: var(--md-primary);
    --bad: var(--md-error);
    --muted: var(--md-on-surface-variant);
    --border: var(--md-outline-variant);
}

@media (prefers-color-scheme: dark) {
    .cm-app:not([data-theme="light"]) {
        --md-primary: #b3c5ff;
        --md-on-primary: #192e60;
        --md-primary-container: #314578;
        --brand-bg: #314578;
        --md-on-primary-container: #dbe1ff;
        --md-secondary: #c1c6dd;
        --md-secondary-container: #414659;
        --md-on-secondary-container: #dde2f9;
        --md-tertiary-container: #5a3d58;
        --md-on-tertiary-container: #ffd6f9;
        --md-error: #ffb4ab;
        --md-on-error: #690005;
        --md-error-container: #93000a;
        --md-on-error-container: #ffdad6;
        --md-surface: #131313;
        --md-surface-bright: #393939;
        --md-on-surface: #e2e2e2;
        --md-on-surface-variant: #c8c6c7;
        --md-surface-container-lowest: #0e0e0e;
        --md-surface-container-low: #1b1b1b;
        --md-surface-container: #1f1f1f;
        --md-surface-container-high: #2a2a2a;
        --md-surface-container-highest: #353535;
        --md-outline: #929092;
        --md-outline-variant: #474648;
        --md-inverse-surface: #e2e2e2;
        --md-inverse-on-surface: #303030;
        --md-inverse-primary: #4a5c92;
        --md-ok: #6bdbad;
        --md-ok-container: #005139;
        --md-on-ok-container: #88f8c7;
        --md-warn: #ffb86e;
        --md-warn-container: #693c00;
        --md-on-warn-container: #ffdcbd;
        --item-bg: #252525;
        --log-bg: #0e0e0e;
        --log-text: #e2e2e2;
        --heat-none: #353535;
        --heat-success: #40a17b;
        --heat-warning: #e08a18;
        --heat-missed_offline: #5f5e5f;
        --heat-missed: #ff8b68;
        --heat-error: #ff5449;
        --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23c8c6c7' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
        --sh1: 0 1px 2px rgba(0, 0, 0, .6), 0 1px 3px 1px rgba(0, 0, 0, .3);
        --sh2: 0 1px 2px rgba(0, 0, 0, .6), 0 2px 6px 2px rgba(0, 0, 0, .3);
        --sh3: 0 1px 3px rgba(0, 0, 0, .6), 0 4px 8px 3px rgba(0, 0, 0, .3);
        color-scheme: dark;
    }
}
.cm-app[data-theme="dark"] {
    --md-primary: #b3c5ff;
    --md-on-primary: #192e60;
    --md-primary-container: #314578;
    --brand-bg: #314578;
    --md-on-primary-container: #dbe1ff;
    --md-secondary: #c1c6dd;
    --md-secondary-container: #414659;
    --md-on-secondary-container: #dde2f9;
    --md-tertiary-container: #5a3d58;
    --md-on-tertiary-container: #ffd6f9;
    --md-error: #ffb4ab;
    --md-on-error: #690005;
    --md-error-container: #93000a;
    --md-on-error-container: #ffdad6;
    --md-surface: #131313;
    --md-surface-bright: #393939;
    --md-on-surface: #e2e2e2;
    --md-on-surface-variant: #c8c6c7;
    --md-surface-container-lowest: #0e0e0e;
    --md-surface-container-low: #1b1b1b;
    --md-surface-container: #1f1f1f;
    --md-surface-container-high: #2a2a2a;
    --md-surface-container-highest: #353535;
    --md-outline: #929092;
    --md-outline-variant: #474648;
    --md-inverse-surface: #e2e2e2;
    --md-inverse-on-surface: #303030;
    --md-inverse-primary: #4a5c92;
    --md-ok: #6bdbad;
    --md-ok-container: #005139;
    --md-on-ok-container: #88f8c7;
    --md-warn: #ffb86e;
    --md-warn-container: #693c00;
    --md-on-warn-container: #ffdcbd;
    --item-bg: #252525;
    --log-bg: #0e0e0e;
    --log-text: #e2e2e2;
    --heat-none: #353535;
    --heat-success: #40a17b;
    --heat-warning: #e08a18;
    --heat-missed_offline: #5f5e5f;
    --heat-missed: #ff8b68;
    --heat-error: #ff5449;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23c8c6c7' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
    --sh1: 0 1px 2px rgba(0, 0, 0, .6), 0 1px 3px 1px rgba(0, 0, 0, .3);
    --sh2: 0 1px 2px rgba(0, 0, 0, .6), 0 2px 6px 2px rgba(0, 0, 0, .3);
    --sh3: 0 1px 3px rgba(0, 0, 0, .6), 0 4px 8px 3px rgba(0, 0, 0, .3);
    color-scheme: dark;
}

/* The other colour schemes a user may choose in the user menu (layout.php: <html data-color="...">) put their colours
   over the palette above: the same Material scheme with other accents or other surfaces, as in the program window. */
/* Colour schemes (made by tools/make-colors.mjs, do not edit by hand) */
/* graphite */
.cm-app[data-color="graphite"] {
    --md-primary: #000000; --md-on-primary: #e2e2e2; --md-primary-container: #3b3b3b;
    --md-on-primary-container: #ffffff; --md-secondary: #5e5e5e; --md-secondary-container: #d4d4d4;
    --md-on-secondary-container: #1b1b1b; --md-tertiary-container: #747474; --md-on-tertiary-container: #ffffff;
    --md-surface: #f9f9f9; --md-surface-bright: #ffffff; --md-on-surface: #1b1b1b; --md-on-surface-variant: #474747;
    --md-surface-container-lowest: #ffffff; --md-surface-container-low: #f3f3f3; --md-surface-container: #eeeeee;
    --md-surface-container-high: #e8e8e8; --md-surface-container-highest: #e2e2e2; --md-outline: #777777;
    --md-outline-variant: #c6c6c6; --md-inverse-surface: #303030; --md-inverse-on-surface: #f1f1f1;
    --md-inverse-primary: #c6c6c6; --item-bg: #ffffff; --log-bg: #303030; --log-text: #f1f1f1; --heat-none: #e2e2e2;
    --heat-missed_offline: #ababab;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23474747' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
    .cm-app[data-color="graphite"]:not([data-theme="light"]) {
        --md-primary: #ffffff; --md-on-primary: #1b1b1b; --md-primary-container: #d4d4d4;
        --md-on-primary-container: #000000; --md-secondary: #c6c6c6; --md-secondary-container: #474747;
        --md-on-secondary-container: #e2e2e2; --md-tertiary-container: #919191; --md-on-tertiary-container: #000000;
        --md-surface: #131313; --md-surface-bright: #393939; --md-on-surface: #e2e2e2; --md-on-surface-variant: #c6c6c6;
        --md-surface-container-lowest: #0e0e0e; --md-surface-container-low: #1b1b1b; --md-surface-container: #1f1f1f;
        --md-surface-container-high: #2a2a2a; --md-surface-container-highest: #353535; --md-outline: #919191;
        --md-outline-variant: #474747; --md-inverse-surface: #e2e2e2; --md-inverse-on-surface: #303030;
        --md-inverse-primary: #5e5e5e; --item-bg: #252525; --log-bg: #0e0e0e; --log-text: #e2e2e2; --heat-none: #353535;
        --heat-missed_offline: #5e5e5e;
        --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23c6c6c6' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
    }
}
.cm-app[data-color="graphite"][data-theme="dark"] {
    --md-primary: #ffffff; --md-on-primary: #1b1b1b; --md-primary-container: #d4d4d4;
    --md-on-primary-container: #000000; --md-secondary: #c6c6c6; --md-secondary-container: #474747;
    --md-on-secondary-container: #e2e2e2; --md-tertiary-container: #919191; --md-on-tertiary-container: #000000;
    --md-surface: #131313; --md-surface-bright: #393939; --md-on-surface: #e2e2e2; --md-on-surface-variant: #c6c6c6;
    --md-surface-container-lowest: #0e0e0e; --md-surface-container-low: #1b1b1b; --md-surface-container: #1f1f1f;
    --md-surface-container-high: #2a2a2a; --md-surface-container-highest: #353535; --md-outline: #919191;
    --md-outline-variant: #474747; --md-inverse-surface: #e2e2e2; --md-inverse-on-surface: #303030;
    --md-inverse-primary: #5e5e5e; --item-bg: #252525; --log-bg: #0e0e0e; --log-text: #e2e2e2; --heat-none: #353535;
    --heat-missed_offline: #5e5e5e;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23c6c6c6' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
}
/* blue */
.cm-app[data-color="blue"] {
    --md-primary: #004f96; --md-on-primary: #ffffff; --md-primary-container: #0067c0;
    --md-on-primary-container: #dbe7ff; --md-secondary: #485f83; --md-secondary-container: #bed6ff;
    --md-on-secondary-container: #465c80; --md-tertiary-container: #7d5d7a; --md-on-tertiary-container: #ffddf9;
    --md-surface: #f9f9f9; --md-surface-bright: #ffffff; --md-on-surface: #1b1b1b; --md-on-surface-variant: #474648;
    --md-surface-container-lowest: #ffffff; --md-surface-container-low: #f3f3f3; --md-surface-container: #eeeeee;
    --md-surface-container-high: #e8e8e8; --md-surface-container-highest: #e2e2e2; --md-outline: #787678;
    --md-outline-variant: #c8c6c7; --md-inverse-surface: #303030; --md-inverse-on-surface: #f1f1f1;
    --md-inverse-primary: #a6c8ff; --item-bg: #ffffff; --log-bg: #303030; --log-text: #f1f1f1; --heat-none: #e2e2e2;
    --heat-missed_offline: #adabad;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23474648' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
    .cm-app[data-color="blue"]:not([data-theme="light"]) {
        --md-primary: #a6c8ff; --md-on-primary: #003060; --md-primary-container: #0067c0;
        --md-on-primary-container: #dbe7ff; --md-secondary: #b0c8f0; --md-secondary-container: #30476a;
        --md-on-secondary-container: #9fb6de; --md-tertiary-container: #7d5d7a; --md-on-tertiary-container: #ffddf9;
        --md-surface: #131313; --md-surface-bright: #393939; --md-on-surface: #e2e2e2; --md-on-surface-variant: #c8c6c7;
        --md-surface-container-lowest: #0e0e0e; --md-surface-container-low: #1b1b1b; --md-surface-container: #1f1f1f;
        --md-surface-container-high: #2a2a2a; --md-surface-container-highest: #353535; --md-outline: #929092;
        --md-outline-variant: #474648; --md-inverse-surface: #e2e2e2; --md-inverse-on-surface: #303030;
        --md-inverse-primary: #005eb1; --item-bg: #252525; --log-bg: #0e0e0e; --log-text: #e2e2e2; --heat-none: #353535;
        --heat-missed_offline: #5f5e60;
        --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23c8c6c7' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
    }
}
.cm-app[data-color="blue"][data-theme="dark"] {
    --md-primary: #a6c8ff; --md-on-primary: #003060; --md-primary-container: #0067c0;
    --md-on-primary-container: #dbe7ff; --md-secondary: #b0c8f0; --md-secondary-container: #30476a;
    --md-on-secondary-container: #9fb6de; --md-tertiary-container: #7d5d7a; --md-on-tertiary-container: #ffddf9;
    --md-surface: #131313; --md-surface-bright: #393939; --md-on-surface: #e2e2e2; --md-on-surface-variant: #c8c6c7;
    --md-surface-container-lowest: #0e0e0e; --md-surface-container-low: #1b1b1b; --md-surface-container: #1f1f1f;
    --md-surface-container-high: #2a2a2a; --md-surface-container-highest: #353535; --md-outline: #929092;
    --md-outline-variant: #474648; --md-inverse-surface: #e2e2e2; --md-inverse-on-surface: #303030;
    --md-inverse-primary: #005eb1; --item-bg: #252525; --log-bg: #0e0e0e; --log-text: #e2e2e2; --heat-none: #353535;
    --heat-missed_offline: #5f5e60;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23c8c6c7' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
}
/* warm */
.cm-app[data-color="warm"] {
    --md-primary: #4a5c92; --md-on-primary: #ffffff; --md-primary-container: #dbe1ff;
    --md-on-primary-container: #314578; --md-secondary: #585e71; --md-secondary-container: #dde2f9;
    --md-on-secondary-container: #414659; --md-tertiary-container: #ffd6f9; --md-on-tertiary-container: #5a3d58;
    --md-surface: #fff8f4; --md-surface-bright: #ffffff; --md-on-surface: #201b15; --md-on-surface-variant: #504539;
    --md-surface-container-lowest: #ffffff; --md-surface-container-low: #fef1e8; --md-surface-container: #f8ece2;
    --md-surface-container-high: #f2e6dc; --md-surface-container-highest: #ece0d7; --md-outline: #827568;
    --md-outline-variant: #d4c4b5; --md-inverse-surface: #362f29; --md-inverse-on-surface: #fbefe5;
    --md-inverse-primary: #b3c5ff; --item-bg: #ffffff; --log-bg: #362f29; --log-text: #fbefe5; --heat-none: #ece0d7;
    --heat-missed_offline: #b8a99b;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23504539' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
    .cm-app[data-color="warm"]:not([data-theme="light"]) {
        --md-primary: #b3c5ff; --md-on-primary: #192e60; --md-primary-container: #314578;
        --md-on-primary-container: #dbe1ff; --md-secondary: #c1c6dd; --md-secondary-container: #414659;
        --md-on-secondary-container: #dde2f9; --md-tertiary-container: #5a3d58; --md-on-tertiary-container: #ffd6f9;
        --md-surface: #18120d; --md-surface-bright: #3f3831; --md-on-surface: #ece0d7; --md-on-surface-variant: #d4c4b5;
        --md-surface-container-lowest: #120d08; --md-surface-container-low: #201b15; --md-surface-container: #241f19;
        --md-surface-container-high: #2f2923; --md-surface-container-highest: #3a342d; --md-outline: #9c8e81;
        --md-outline-variant: #504539; --md-inverse-surface: #ece0d7; --md-inverse-on-surface: #362f29;
        --md-inverse-primary: #4a5c92; --item-bg: #2a241e; --log-bg: #120d08; --log-text: #ece0d7; --heat-none: #3a342d;
        --heat-missed_offline: #685c50;
        --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23d4c4b5' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
    }
}
.cm-app[data-color="warm"][data-theme="dark"] {
    --md-primary: #b3c5ff; --md-on-primary: #192e60; --md-primary-container: #314578;
    --md-on-primary-container: #dbe1ff; --md-secondary: #c1c6dd; --md-secondary-container: #414659;
    --md-on-secondary-container: #dde2f9; --md-tertiary-container: #5a3d58; --md-on-tertiary-container: #ffd6f9;
    --md-surface: #18120d; --md-surface-bright: #3f3831; --md-on-surface: #ece0d7; --md-on-surface-variant: #d4c4b5;
    --md-surface-container-lowest: #120d08; --md-surface-container-low: #201b15; --md-surface-container: #241f19;
    --md-surface-container-high: #2f2923; --md-surface-container-highest: #3a342d; --md-outline: #9c8e81;
    --md-outline-variant: #504539; --md-inverse-surface: #ece0d7; --md-inverse-on-surface: #362f29;
    --md-inverse-primary: #4a5c92; --item-bg: #2a241e; --log-bg: #120d08; --log-text: #ece0d7; --heat-none: #3a342d;
    --heat-missed_offline: #685c50;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23d4c4b5' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
}
/* sepia */
.cm-app[data-color="sepia"] {
    --md-primary: #7c5635; --md-on-primary: #ffffff; --md-primary-container: #f4dfcb;
    --md-on-primary-container: #524436; --md-secondary: #6b5c4c; --md-secondary-container: #f0e0cf;
    --md-on-secondary-container: #4f4539; --md-tertiary-container: #f0e2bb; --md-on-tertiary-container: #4f462a;
    --md-surface: #fff8f3; --md-surface-bright: #ffffff; --md-on-surface: #201b13; --md-on-surface-variant: #504535;
    --md-surface-container-lowest: #ffffff; --md-surface-container-low: #fef2e5; --md-surface-container: #f8ecdf;
    --md-surface-container-high: #f2e6d9; --md-surface-container-highest: #ece1d4; --md-outline: #827563;
    --md-outline-variant: #d4c4af; --md-inverse-surface: #352f27; --md-inverse-on-surface: #fbefe2;
    --md-inverse-primary: #efbd94; --item-bg: #ffffff; --log-bg: #352f27; --log-text: #fbefe2; --heat-none: #ece1d4;
    --heat-missed_offline: #b8aa95;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23504535' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
    .cm-app[data-color="sepia"]:not([data-theme="light"]) {
        --md-primary: #efbd94; --md-on-primary: #48290b; --md-primary-container: #524436;
        --md-on-primary-container: #f4dfcb; --md-secondary: #d7c3b0; --md-secondary-container: #4f4539;
        --md-on-secondary-container: #f0e0cf; --md-tertiary-container: #4f462a; --md-on-tertiary-container: #f0e2bb;
        --md-surface: #17130b; --md-surface-bright: #3f382f; --md-on-surface: #ece1d4; --md-on-surface-variant: #d4c4af;
        --md-surface-container-lowest: #120d07; --md-surface-container-low: #201b13; --md-surface-container: #241f17;
        --md-surface-container-high: #2f2921; --md-surface-container-highest: #3a342b; --md-outline: #9c8f7b;
        --md-outline-variant: #504535; --md-inverse-surface: #ece1d4; --md-inverse-on-surface: #352f27;
        --md-inverse-primary: #7c5635; --item-bg: #2a241c; --log-bg: #120d07; --log-text: #ece1d4; --heat-none: #3a342b;
        --heat-missed_offline: #685d4c;
        --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23d4c4af' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
    }
}
.cm-app[data-color="sepia"][data-theme="dark"] {
    --md-primary: #efbd94; --md-on-primary: #48290b; --md-primary-container: #524436;
    --md-on-primary-container: #f4dfcb; --md-secondary: #d7c3b0; --md-secondary-container: #4f4539;
    --md-on-secondary-container: #f0e0cf; --md-tertiary-container: #4f462a; --md-on-tertiary-container: #f0e2bb;
    --md-surface: #17130b; --md-surface-bright: #3f382f; --md-on-surface: #ece1d4; --md-on-surface-variant: #d4c4af;
    --md-surface-container-lowest: #120d07; --md-surface-container-low: #201b13; --md-surface-container: #241f17;
    --md-surface-container-high: #2f2921; --md-surface-container-highest: #3a342b; --md-outline: #9c8f7b;
    --md-outline-variant: #504535; --md-inverse-surface: #ece1d4; --md-inverse-on-surface: #352f27;
    --md-inverse-primary: #7c5635; --item-bg: #2a241c; --log-bg: #120d07; --log-text: #ece1d4; --heat-none: #3a342b;
    --heat-missed_offline: #685d4c;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23d4c4af' d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
}
/* The samples in the user menu */
.cm-app .swatch-neutral { --swatch-fg: #4a5c92; --swatch-bg: #eeeeee; }
.cm-app .swatch-graphite { --swatch-fg: #000000; --swatch-bg: #eeeeee; }
.cm-app .swatch-blue { --swatch-fg: #004f96; --swatch-bg: #eeeeee; }
.cm-app .swatch-warm { --swatch-fg: #4a5c92; --swatch-bg: #f8ece2; }
.cm-app .swatch-sepia { --swatch-fg: #7c5635; --swatch-bg: #f8ecdf; }
@media (prefers-color-scheme: dark) {
    .cm-app:not([data-theme="light"]) .swatch-neutral { --swatch-fg: #b3c5ff; --swatch-bg: #1f1f1f; }
    .cm-app:not([data-theme="light"]) .swatch-graphite { --swatch-fg: #ffffff; --swatch-bg: #1f1f1f; }
    .cm-app:not([data-theme="light"]) .swatch-blue { --swatch-fg: #a6c8ff; --swatch-bg: #1f1f1f; }
    .cm-app:not([data-theme="light"]) .swatch-warm { --swatch-fg: #b3c5ff; --swatch-bg: #241f19; }
    .cm-app:not([data-theme="light"]) .swatch-sepia { --swatch-fg: #efbd94; --swatch-bg: #241f17; }
}
.cm-app[data-theme="dark"] .swatch-neutral { --swatch-fg: #b3c5ff; --swatch-bg: #1f1f1f; }
.cm-app[data-theme="dark"] .swatch-graphite { --swatch-fg: #ffffff; --swatch-bg: #1f1f1f; }
.cm-app[data-theme="dark"] .swatch-blue { --swatch-fg: #a6c8ff; --swatch-bg: #1f1f1f; }
.cm-app[data-theme="dark"] .swatch-warm { --swatch-fg: #b3c5ff; --swatch-bg: #241f19; }
.cm-app[data-theme="dark"] .swatch-sepia { --swatch-fg: #efbd94; --swatch-bg: #241f17; }
/* End of the colour schemes */

/* ---------------------------------------------------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app * { box-sizing: border-box; }
.cm-app {
    font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 20px; letter-spacing: .018em;
    color: var(--md-on-surface); background: var(--md-surface-container); -webkit-text-size-adjust: 100%; scroll-padding-top: 80px;
}
.cm-app { margin: 0; background: var(--md-surface-container); color: var(--md-on-surface); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.cm-app a { color: var(--md-primary); text-decoration: none; }
/* Links and pictures are not dragged: a press that moves a few pixels before it ends would drag the link instead of
   opening it (app.js does the same for Firefox). */
.cm-app a, .cm-app img { -webkit-user-drag: none; }
.cm-app a:hover { text-decoration: underline; }
.cm-app h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 20px; font-size: 28px; line-height: 36px; font-weight: 400; letter-spacing: 0; }
.cm-app h2 { margin: 0 0 16px; font-size: 22px; line-height: 28px; font-weight: 400; letter-spacing: 0; }
.cm-app h3 { margin: 20px 0 8px; font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: .01em; }
.cm-app p { margin: 0 0 12px; }
.cm-app code, .cm-app kbd, .cm-app pre, .cm-app .mono { font-family: "Roboto Mono", ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .93em; letter-spacing: 0; }
.cm-app .icon { width: 20px; height: 20px; flex: none; fill: currentColor; vertical-align: -5px; }
.cm-app ::selection { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.cm-app [hidden] { display: none !important; }
.cm-app .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cm-app .nowrap { white-space: nowrap; }
.cm-app .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cm-app .hint, .cm-app .note, .cm-app .empty, .cm-app .summary { color: var(--md-on-surface-variant); }
.cm-app .note { font-size: 12px; line-height: 16px; letter-spacing: .03em; }
.cm-app .bad-text, .cm-app .danger-link { color: var(--md-error); }
.cm-app .warn-text { color: var(--md-warn); }
.cm-app .info-text { color: var(--md-primary); }
.cm-app .gap-top { margin-top: 12px; }
.cm-app .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 0 0 4px; color: var(--md-on-surface-variant); font-weight: 500; letter-spacing: .01em; }

/* ---------------------------------------------------------------------------------------------------------------------
   The frame (layout.php): a navigation rail at the left, a top bar with the search, the page on a rounded sheet.
   1200 px and wider: the rail with words. 840–1199 px: icons with small words under them. Narrower: a bar at the
   bottom with the four main sections and "More", the search behind a button of the top bar.
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app.with-rail { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.cm-app .rail {
    grid-column: 1; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    display: flex; flex-direction: column; padding: 8px 12px 16px;
}
.cm-app .frame { grid-column: 2; display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.cm-app.no-user .frame { grid-column: auto; }
.cm-app .brand { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 64px; padding: 0 12px 0 8px; margin-bottom: 4px;
    color: var(--md-on-surface); font-size: 18px; line-height: 24px; font-weight: 500; letter-spacing: .02em; text-decoration: none; }
.cm-app .brand:hover { text-decoration: none; }
.cm-app .brand-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-bg); }
.cm-app .brand-mark img { display: block; }
.cm-app .brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cm-app .nav-item {
    position: relative; display: flex; align-items: center; gap: 12px; flex: none; min-height: 52px; padding: 0 16px; border-radius: 26px;
    color: var(--md-on-surface-variant); font-weight: 500; letter-spacing: .01em; text-decoration: none; -webkit-tap-highlight-color: transparent;
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
.cm-app .nav-item:hover { background-color: color-mix(in srgb, var(--md-on-surface) 8%, transparent); color: var(--md-on-surface); text-decoration: none; }
.cm-app .nav-item.active { background-color: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.cm-app .nav-item.active:hover { background-color: color-mix(in srgb, var(--md-on-secondary-container) 8%, var(--md-secondary-container)); }
.cm-app .nav-icon .icon { width: 24px; height: 24px; }
/* The open section has the filled form of its icon; both forms are in the page (layout.php), so that a click can
   mark the section at once. */
.cm-app .nav-icon .icon-fill { display: none; }
.cm-app .active > .nav-icon .icon-fill { display: inline-block; }
.cm-app .active > .nav-icon .icon-fill + .icon-line { display: none; }
.cm-app .rail .nav-icon { display: contents; border-radius: inherit; }
.cm-app .nav-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-app .rail .count { order: 2; min-width: 0; height: auto; margin-left: auto; padding: 0; background: none; color: inherit; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cm-app .rail .count-bad { min-width: 24px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--md-error); color: var(--md-on-error);
    font-size: 12px; line-height: 20px; text-align: center; }
.cm-app .nav-head { margin: 8px 16px 0; padding: 16px 0 8px; border-top: 1px solid var(--md-outline-variant); color: var(--md-on-surface-variant);
    font-weight: 500; letter-spacing: .01em; }

.cm-app header.top {
    position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; height: 64px; padding: 8px 16px 8px 0;
    background: var(--md-surface-container);
}
.cm-app.no-user header.top { padding: 8px 24px; }
.cm-app .top-brand { display: none; padding: 0; min-height: 0; margin: 0; }
.cm-app.no-user .top-brand { display: flex; }

/* The search of machines and tasks: matches show under the field as one types (app.js), Enter opens the full list. */
.cm-app .search { position: relative; flex: 0 1 720px; min-width: 0; margin: 0; }
.cm-app .search-field {
    display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px 0 16px; border-radius: 24px; cursor: text;
    background: var(--md-surface-container-high); color: var(--md-on-surface-variant); transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.cm-app .search-field:hover { background: color-mix(in srgb, var(--md-on-surface) 6%, var(--md-surface-container-high)); }
.cm-app .search-field:focus-within { background: var(--md-surface-bright); box-shadow: var(--sh2); }
.cm-app .search-field > .icon { width: 24px; height: 24px; }
.cm-app header.top .search-field input, .cm-app header.top .search-field input:hover, .cm-app header.top .search-field input:focus {
    flex: 1 1 auto; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none;
    color: var(--md-on-surface); font-size: 16px; letter-spacing: .03em;
}
.cm-app .search-field input::placeholder { color: var(--md-on-surface-variant); opacity: 1; }
.cm-app .search-field input::-webkit-search-decoration, .cm-app .search-field input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.cm-app .search-key { flex: none; min-width: 24px; height: 24px; padding: 0 6px; border: 1px solid var(--md-outline-variant); border-radius: 6px;
    color: var(--md-on-surface-variant); font-size: 12px; line-height: 22px; text-align: center; }
.cm-app .search-field:focus-within .search-key { display: none; }
.cm-app .search-results {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 46; max-height: min(70vh, 560px); overflow-y: auto; padding: 8px 0;
    border-radius: 24px; background: var(--md-surface-container-high); color: var(--md-on-surface); box-shadow: var(--sh2);
    animation: menu-in .2s var(--ease-in); transform-origin: top center;
}
.cm-app .sr-head { padding: 12px 20px 4px; color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .04em; }
.cm-app .sr-item { position: relative; display: flex; align-items: center; gap: 16px; min-height: 56px; margin: 0 8px; padding: 8px 12px; border-radius: 16px; color: var(--md-on-surface); text-decoration: none; }
.cm-app .sr-item:hover, .cm-app .sr-item[aria-selected="true"] { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); text-decoration: none; }
.cm-app .sr-item .lead { width: 40px; height: 40px; }
.cm-app .sr-text { flex: 1 1 auto; min-width: 0; }
.cm-app .sr-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 22px; }
.cm-app .sr-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; }
.cm-app .sr-title mark, .cm-app .sr-sub mark, .cm-app .search-list mark { background: none; color: var(--md-primary); font-weight: 700; }
.cm-app .sr-empty { padding: 16px 20px; color: var(--md-on-surface-variant); }
.cm-app .search-list { padding: 12px 12px 16px; }
.cm-app .search-list .sr-head { padding-left: 12px; }
.cm-app .search-list .sr-head:first-child { padding-top: 4px; }
.cm-app .search-list .sr-item { margin: 0; }
.cm-app .sr-all { display: flex; align-items: center; gap: 8px; margin: 4px 8px 0; padding: 12px; border-top: 1px solid var(--md-outline-variant); font-weight: 500; }

.cm-app .top-tools { display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; }
.cm-app .theme-switch { display: inline-flex; margin: 0; }
.cm-app .theme-switch .to-light { display: none; }
.cm-app[data-theme="dark"] .theme-switch .to-light { display: inline-flex; }
.cm-app[data-theme="dark"] .theme-switch .to-dark { display: none; }
@media (prefers-color-scheme: dark) {
    .cm-app:not([data-theme="light"]) .theme-switch .to-light { display: inline-flex; }
    .cm-app:not([data-theme="light"]) .theme-switch .to-dark { display: none; }
}
.cm-app header.top .search-open { display: none; }
.cm-app .bell .count { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--md-error); color: var(--md-on-error); font-size: 11px; line-height: 18px; font-weight: 500; letter-spacing: 0; text-align: center; }
.cm-app .icon-button.bell.active { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.cm-app header.top details.user-menu > summary {
    --btn-bg: transparent; --btn-fg: var(--md-on-surface); gap: 8px; min-height: 48px; padding: 4px 8px 4px 4px; border-radius: 24px;
}
.cm-app .avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 20px; background: var(--md-tertiary-container);
    color: var(--md-on-tertiary-container); font-size: 16px; font-weight: 500; }
.cm-app .user-menu > summary > .icon { color: var(--md-on-surface-variant); }
.cm-app .user-menu .dropdown-menu { min-width: 260px; max-height: calc(100dvh - 80px); overflow-y: auto; overscroll-behavior: contain; }

.cm-app .sheet {
    --bg-here: var(--md-surface); flex: 1 0 auto; min-width: 0; margin: 0 16px 0 0; padding: 28px 32px 40px; border-radius: 28px;
    background: var(--md-surface); color: var(--md-on-surface);
}
.cm-app.no-user .sheet { margin: 0; background: none; --bg-here: var(--md-surface-container); }
.cm-app footer { padding: 16px 16px 20px 0; color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; letter-spacing: .03em; text-align: center; }
.cm-app .motion-note { cursor: help; }
.cm-app .motion-note::before, .cm-app .footer-donate::before { content: "·"; margin: 0 8px; }

.cm-app .bottom-nav { display: none; }

@media (max-width: 1199px) and (min-width: 840px) {
    .cm-app.with-rail { grid-template-columns: 88px minmax(0, 1fr); }
    .cm-app .rail { padding: 8px 0 16px; align-items: center; }
    .cm-app .rail .brand { justify-content: center; padding: 0; }
    .cm-app .rail .brand-name { display: none; }
    .cm-app .rail .nav-item { flex-direction: column; justify-content: center; gap: 4px; width: 88px; min-height: 64px; padding: 4px 2px 8px; border-radius: 0;
        background: none; font-size: 12px; line-height: 16px; letter-spacing: .02em; text-align: center; }
    .cm-app .rail .nav-item:hover, .cm-app .rail .nav-item.active, .cm-app .rail .nav-item.active:hover { background: none; }
    .cm-app .rail .nav-item.active { color: var(--md-on-surface); }
    .cm-app .rail .nav-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 56px; height: 32px; border-radius: 16px;
        transition: background-color .2s var(--ease); }
    .cm-app .rail .nav-item:hover .nav-icon { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); }
    .cm-app .rail .nav-item.active .nav-icon { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
    .cm-app .rail .nav-label { flex: none; max-width: 84px; }
    .cm-app .rail .count { position: absolute; top: -2px; left: 30px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; margin: 0;
        background: var(--md-primary); color: var(--md-on-primary); font-size: 11px; line-height: 18px; text-align: center; }
    .cm-app .rail .count-bad { background: var(--md-error); color: var(--md-on-error); }
    .cm-app .rail .nav-head { width: 40px; height: 1px; margin: 8px 0; padding: 0; border: 0; background: var(--md-outline-variant); font-size: 0; }
}

@media (max-width: 839px) {
    .cm-app.with-rail { display: block; }
    .cm-app .rail { display: none; }
    .cm-app header.top { padding: 8px 8px 8px 12px; }
    .cm-app .top-brand { display: flex; font-size: 16px; }
    .cm-app .top-brand .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
    .cm-app .search { display: none; position: absolute; inset: 8px; z-index: 3; flex: none; }
    .cm-app.searching .search { display: block; }
    .cm-app.searching header.top > :not(.search) { visibility: hidden; }
    .cm-app header.top .search-open { display: inline-flex; }
    .cm-app .search-key { display: none; }
    .cm-app .user-name { display: none; }
    .cm-app header.top details.user-menu > summary { padding: 4px; }
    .cm-app .user-menu > summary > .icon { display: none; }
    .cm-app .sheet { margin: 0; padding: 20px 16px 32px; border-radius: 28px 28px 0 0; }
    .cm-app footer { padding: 16px 16px 104px; }
    .cm-app .bottom-nav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: stretch; height: 80px;
        padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--md-surface-container); box-shadow: 0 -1px 0 var(--md-outline-variant);
    }
    .cm-app .bar-item {
        position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 2px;
        color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .03em; text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }
    .cm-app .bar-item:hover { text-decoration: none; color: var(--md-on-surface); }
    .cm-app .bar-item .nav-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 64px; height: 32px; border-radius: 16px;
        transition: background-color .2s var(--ease); }
    .cm-app .bar-item:hover .nav-icon { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); }
    .cm-app .bar-item.active, .cm-app .bar-more.active > .bar-item, .cm-app .bar-more[open] > .bar-item { color: var(--md-on-surface); }
    .cm-app .bar-item.active .nav-icon, .cm-app .bar-more.active > .bar-item .nav-icon, .cm-app .bar-more[open] > .bar-item .nav-icon {
        background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
    .cm-app .bar-item .nav-label { max-width: 100%; }
    .cm-app .bar-item .count { position: absolute; top: -2px; left: 36px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
        background: var(--md-primary); color: var(--md-on-primary); font-size: 11px; line-height: 18px; text-align: center; }
    .cm-app .bar-item .count-bad { background: var(--md-error); color: var(--md-on-error); }
    .cm-app details.bar-more { position: static; display: flex; flex: 1 1 0; min-width: 0; }
    .cm-app details.bar-more > summary.bar-item { display: flex; gap: 4px; min-height: 0; padding: 0 2px; border-radius: 0; background: none; box-shadow: none; }
    .cm-app details.bar-more > summary.bar-item:hover { background: none; }
    .cm-app .bar-more .dropdown-menu { position: fixed; top: auto; right: 8px; bottom: 88px; transform-origin: bottom right; }
}

/* ---------------------------------------------------------------------------------------------------------------------
   Cards, lists, tables
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app .panel { --bg-here: var(--md-surface-container-low); margin-bottom: 16px; padding: 20px 24px 24px; border-radius: 24px; background: var(--md-surface-container-low); }
.cm-app .panel.attention { --bg-here: var(--md-primary-container); background: var(--md-primary-container); color: var(--md-on-primary-container); }
.cm-app .panel.narrow { max-width: 440px; }
.cm-app .panel-bad { box-shadow: inset 0 0 0 1px var(--md-error); }
.cm-app .panel.calm { --bg-here: var(--md-surface); background: none; box-shadow: inset 0 0 0 1px var(--md-outline-variant); }
.cm-app .panel.calm h3 { margin-top: 16px; color: var(--md-on-surface-variant); font-size: 14px; line-height: 20px; }
.cm-app .panel > :last-child { margin-bottom: 0; }
/* Graphite and Blue use strong container colours for machine approval. Pair their text and controls with that surface. */
.cm-app:is([data-color="graphite"], [data-color="blue"]) .pending-agents {
    --pending-text: var(--md-on-primary-container);
    --pending-detail: color-mix(in srgb, var(--pending-text) 94%, var(--md-primary-container));
    color: var(--pending-text);
}
.cm-app[data-color="blue"] .pending-agents { --pending-text: #ffffff; }
.cm-app:is([data-color="graphite"], [data-color="blue"]) .pending-agents :is(.hint, .note, th),
.cm-app:is([data-color="graphite"], [data-color="blue"]) .pending-agents td[data-label]::before { color: var(--pending-detail); }
.cm-app:is([data-color="graphite"], [data-color="blue"]) .pending-agents a { color: inherit; text-decoration: underline; }
.cm-app:is([data-color="graphite"], [data-color="blue"]) .pending-agents :is(a, button):focus-visible { outline-color: var(--pending-text); }
.cm-app:is([data-color="graphite"], [data-color="blue"]) .pending-agents button {
    border: 1px solid color-mix(in srgb, var(--pending-text) 70%, var(--md-primary-container));
}
.cm-app[data-color="blue"] .pending-agents button.secondary { --btn-fg: var(--md-on-surface); }
.cm-app:is([data-color="graphite"], [data-color="blue"]) .pending-agents button.danger {
    --btn-bg: var(--md-error-container);
    --btn-fg: var(--md-on-error-container);
}
.cm-app .columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 16px; }
.cm-app .columns > * { min-width: 0; }
.cm-app .all-good { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--md-ok); font-weight: 500; }
.cm-app .all-good::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 5px; background: var(--heat-success); box-shadow: 0 0 0 5px var(--md-ok-container); margin: 0 4px 0 5px; }

/* Problems page: keep the report, affected task and dates readable as separate groups. */
.cm-app .problems-intro { max-width: 76ch; }
.cm-app .problem-records { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cm-app .problem-record {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(9.625rem, 24%) minmax(12.25rem, 29%); align-items: start;
    gap: 14px 20px; padding: 12px 16px; border-radius: 12px; background: var(--item-bg); overflow-wrap: anywhere;
}
.cm-app .problem-record.arrived { box-shadow: inset 0 0 0 1px var(--md-outline); animation: appear .25s var(--ease-in); }
.cm-app .problem-record-message { max-width: 82ch; margin: 6px 0 0; line-height: 1.5; white-space: pre-wrap; }
.cm-app .problem-record-facts { display: grid; gap: 8px 12px; margin: 0; }
.cm-app .problem-record-facts dt, .cm-app .problem-record-detail { color: var(--md-on-surface-variant); font-size: 13px; line-height: 18px; }
.cm-app .problem-record-facts dd { margin: 0; }
.cm-app .problem-record-facts a { font-weight: 500; }
.cm-app .problem-record-timing time { font-variant-numeric: tabular-nums; }
.cm-app .problem-record-detail { display: block; }
@media (min-width: 641px) {
    .cm-app .problem-record-facts { grid-template-columns: max-content minmax(0, 1fr); gap: 4px 8px; }
    .cm-app .problem-record-facts > div {
        display: grid; grid-column: 1 / -1; grid-template-columns: max-content minmax(0, 1fr); grid-template-columns: subgrid;
        gap: 8px; align-items: baseline;
    }
}
@media (max-width: 1023px) {
    .cm-app .problem-record { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cm-app .problem-record-main { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
    .cm-app .problem-record { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px; }
    .cm-app .problem-record-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cm-app .problem-record-timing { padding-top: 10px; border-top: 1px solid var(--md-outline-variant); }
}
@media (max-width: 360px) { .cm-app .problem-record-facts { grid-template-columns: minmax(0, 1fr); } }

/* Lead icons of list items: a tonal circle with an icon. */
.cm-app .lead { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 20px; background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.cm-app .lead .icon { width: 22px; height: 22px; }
.cm-app .lead-bad { background: var(--md-error-container); color: var(--md-on-error-container); }
.cm-app .lead-warn { background: var(--md-warn-container); color: var(--md-on-warn-container); }
.cm-app .lead-ok { background: var(--md-ok-container); color: var(--md-on-ok-container); }
.cm-app .lead-info { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.cm-app .lead-muted { background: var(--md-surface-container-highest); color: var(--md-on-surface-variant); }

.cm-app .table-wrap { position: relative; overflow-x: auto; }
.cm-app table { width: 100%; border-collapse: collapse; background: none; font-variant-numeric: tabular-nums; }
.cm-app th, .cm-app td { padding: 10px 8px; border-bottom: 1px solid var(--md-outline-variant); text-align: left; vertical-align: top; }
.cm-app th { color: var(--md-on-surface-variant); font-size: 13px; line-height: 18px; font-weight: 500; letter-spacing: .01em; white-space: nowrap; }
.cm-app thead th { padding-top: 12px; padding-bottom: 12px; }
.cm-app tbody > tr:last-child > td, .cm-app tbody > tr:last-child > th { border-bottom: 0; }
.cm-app td.num, .cm-app th.num { text-align: right; white-space: nowrap; }
.cm-app td.actions > form, .cm-app td.actions > span { display: inline-block; vertical-align: middle; margin: 2px 6px 2px 0; }
.cm-app table:not(.heatmap):not(.diff) tbody td { transition: background-color .15s var(--ease); }
.cm-app table:not(.heatmap):not(.diff):not(.verification-table):not(.package-catalog) tbody tr:not(.warn-row):not(.bad-row):not(.unread):not(.selected-row):hover > td,
.cm-app :is(.verification-table, .package-catalog) tbody tr:is(:hover, :focus-within) {
    background: color-mix(in srgb, var(--md-on-surface) 5%, transparent); }
.cm-app table.row-links tbody tr { cursor: pointer; }
.cm-app tr.warn-row td { background: var(--md-warn-container); background: color-mix(in srgb, var(--md-warn-container) 50%, transparent); }
.cm-app tr.bad-row td { background: var(--md-error-container); background: color-mix(in srgb, var(--md-error-container) 45%, transparent); }
.cm-app tr.unread td { background: color-mix(in srgb, var(--md-primary-container) 45%, transparent); }
.cm-app tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--md-primary); }
.cm-app tr.selected-row td { background: var(--md-secondary-container); }
.cm-app td.row-actions { width: 1%; white-space: nowrap; text-align: right; vertical-align: middle; }
.cm-app td.row-actions > form, .cm-app td.row-actions > details { display: inline-block; vertical-align: middle; margin-left: 4px; }
.cm-app td.pills { line-height: 28px; }
.cm-app .task-desc { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-app .panel > .table-wrap:first-child { margin-top: -4px; }
.cm-app form.stack > .table-wrap { align-self: stretch; min-width: 0; }
.cm-app table.compact td { padding: 6px 8px; }
.cm-app table.grid { table-layout: fixed; }
.cm-app table.grid td, .cm-app table.align-middle td { vertical-align: middle; }
.cm-app table.grid th:nth-child(1) { width: 22%; }
.cm-app table.grid th:nth-child(2) { width: 8.75rem; }
.cm-app table.grid th:nth-child(3) { width: 9.625rem; }
.cm-app table.grid th:nth-child(4) { width: 4.8125rem; }
.cm-app table.diff td.old { background: var(--md-error-container); color: var(--md-on-error-container); overflow-wrap: anywhere; }
.cm-app table.diff td.new { background: var(--md-ok-container); color: var(--md-on-ok-container); overflow-wrap: anywhere; }
.cm-app tr.group-row > th { padding: 20px 12px 8px; border-bottom: 0; background: none; color: var(--md-primary); font-size: 14px; font-weight: 500; white-space: normal; }
.cm-app tr.group-row:first-child > th { padding-top: 8px; }
.cm-app #agent-list > p.empty { margin: 8px 0; }

/* minmax(0, ...): a wide value (the connection string) shrinks to the page and does not widen it. */
.cm-app dl.props { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; margin: 0 0 12px; }
.cm-app dl.props dt { color: var(--md-on-surface-variant); }
.cm-app dl.props dd { margin: 0; overflow-wrap: anywhere; }

/* Updates cards use one vertical gap for their actions, status, and upload forms. */
.cm-app .updates-panel { --updates-gap: 12px; }
.cm-app .updates-panel, .cm-app .updates-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: var(--updates-gap);
}
.cm-app .updates-panel :is(h2, p, dl.props), .cm-app .updates-flow > :is(ol, pre.log) { margin-block: 0; }
.cm-app .updates-panel form.stack { gap: var(--updates-gap); }
.cm-app .updates-panel details > :is(form.stack, .updates-flow) { margin-top: var(--updates-gap); }
.cm-app .package-catalog :is(th, td) { vertical-align: middle; }
.cm-app .package-catalog tbody th { min-width: 110px; }
.cm-app .catalog-versions { overflow-wrap: anywhere; }
.cm-app .catalog-cell-label { display: none; }
.cm-app .catalog-disclosure > summary { color: var(--md-primary); font-weight: 500; }
.cm-app .catalog-disclosure > p { padding-top: var(--updates-gap); }
.cm-app .catalog-files h3 { margin: 0; font-size: 16px; }
.cm-app .catalog-files ul { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.cm-app .catalog-files li {
    display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center;
    padding: 8px 0; border-top: 1px solid var(--md-outline-variant);
}
.cm-app .catalog-files li > div { min-width: 0; }
.cm-app .catalog-checksum { overflow-wrap: anywhere; }
.cm-app [data-installer-fields] { display: grid; gap: var(--updates-gap); }
.cm-app [data-installer-fields][hidden] { display: none; }

@media (max-width: 680px) {
    .cm-app .package-catalog, .cm-app .package-catalog tbody { display: block; }
    .cm-app .package-catalog thead { display: none; }
    .cm-app .package-catalog tbody tr {
        display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
        padding: 10px 0; border-bottom: 1px solid var(--md-outline-variant);
    }
    .cm-app .package-catalog tbody :is(th, td) { min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
    .cm-app .package-catalog :is(th, .catalog-action) { grid-column: 1 / -1; }
    .cm-app .catalog-cell-label { display: block; color: var(--md-on-surface-variant); font-size: 12px; }
}

/* Status labels: a tonal pill with an icon (badge() in helpers.php). */
.cm-app .badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 12px; vertical-align: middle;
    font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.cm-app .badge > .icon { width: 16px; height: 16px; margin-left: -4px; }
.cm-app .badge-ok { background: var(--md-ok-container); color: var(--md-on-ok-container); }
.cm-app .badge-warn { background: var(--md-warn-container); color: var(--md-on-warn-container); }
.cm-app .badge-bad { background: var(--md-error-container); color: var(--md-on-error-container); }
.cm-app .badge-info { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.cm-app .badge-muted { background: var(--md-surface-container-highest); color: var(--md-on-surface-variant); }
.cm-app .badge-live > .icon { animation: spin 1.2s linear infinite; }
.cm-app .pill { display: inline-flex; align-items: center; max-width: 15.75rem; height: 24px; margin: 0 4px 4px 0; padding: 0 8px; border-radius: 6px; vertical-align: middle;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 24px; font-weight: 500; letter-spacing: .02em; }
.cm-app a.pill:hover { text-decoration: none; filter: brightness(.96); }
.cm-app .pill-ok { background: var(--md-ok-container); color: var(--md-on-ok-container); }
.cm-app .pill-warn { background: var(--md-warn-container); color: var(--md-on-warn-container); }
.cm-app .pill-bad { background: var(--md-error-container); color: var(--md-on-error-container); font-weight: 700; }
.cm-app .pill-info { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.cm-app .pill-muted { background: var(--md-surface-container-highest); color: var(--md-on-surface-variant); }
.cm-app .count { display: inline-block; min-width: 24px; height: 24px; padding: 0 8px; border-radius: 12px; vertical-align: middle; text-align: center;
    background: var(--md-secondary-container); color: var(--md-on-secondary-container); font-size: 12px; line-height: 24px; font-weight: 500; letter-spacing: .02em; }
.cm-app .dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 4px; background: var(--md-outline); }
.cm-app .dot-ok { background: var(--heat-success); }
.cm-app .dot-warn { background: var(--heat-warning); }
.cm-app .dot-bad { background: var(--heat-error); }
.cm-app .dot-info { background: var(--md-primary); }
.cm-app .dot-muted { background: var(--md-outline-variant); }
.cm-app .legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }

/* Banners across the page: errors, warnings, notes with a button at the end. */
.cm-app .alert { margin-bottom: 12px; padding: 14px 16px; border-radius: 16px; background: var(--md-surface-container-high); color: var(--md-on-surface); }
.cm-app .alert-bad { background: var(--md-error-container); color: var(--md-on-error-container); }
.cm-app .alert-warn { background: var(--md-warn-container); color: var(--md-on-warn-container); }
.cm-app .alert-info { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.cm-app .alert-muted { background: var(--md-surface-container-high); color: var(--md-on-surface-variant); }
.cm-app .alert a { color: inherit; text-decoration: underline; }
.cm-app .alert ul { margin: 6px 0 0; padding-left: 20px; }
.cm-app .alert.with-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 10px 10px 16px; }
.cm-app .alert.with-action form { display: inline-flex; }
.cm-app .flash { margin-bottom: 16px; padding: 12px 16px; border-radius: 12px; }
.cm-app .flash-info { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.cm-app .flash-error { background: var(--md-error-container); color: var(--md-on-error-container); }

/* ---------------------------------------------------------------------------------------------------------------------
   Buttons. A plain button is the filled one: the main action of a page or a card, one per place. "secondary",
   a.button-link and the summary of a "More" menu are tonal; "quiet" is a text button; "danger" removes or switches
   something off and always asks first; "link" looks like a link. Hover and press lay a state colour over the button
   and a ripple spreads from the pointer (app.js).
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app button, .cm-app a.button-link {
    --btn-bg: var(--md-primary); --btn-fg: var(--md-on-primary); --btn-lift: var(--sh1);
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; margin: 0; padding: 0 24px;
    border: 0; border-radius: 20px; background: var(--btn-bg); color: var(--btn-fg); font-family: inherit; font-size: 14px; line-height: 20px;
    font-weight: 500; letter-spacing: .01em; white-space: nowrap; text-decoration: none; vertical-align: middle; cursor: pointer;
    -webkit-tap-highlight-color: transparent; transition: background-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.cm-app :is(button, a.button-link):hover { background: color-mix(in srgb, var(--btn-fg) 8%, var(--btn-bg)); box-shadow: var(--btn-lift); text-decoration: none; }
.cm-app :is(button, a.button-link):active { background: color-mix(in srgb, var(--btn-fg) 12%, var(--btn-bg)); box-shadow: none; }
.cm-app :where(button, a.button-link) > .icon { width: 18px; height: 18px; }
.cm-app :where(button, a.button-link) > .icon:where(:first-child:not(:only-child)) { margin-left: -8px; }
.cm-app button.secondary, .cm-app a.button-link { --btn-bg: var(--md-secondary-container); --btn-fg: var(--md-on-secondary-container); }
.cm-app a.button-link.primary { --btn-bg: var(--md-primary); --btn-fg: var(--md-on-primary); }
.cm-app button.quiet { --btn-bg: transparent; --btn-fg: var(--md-primary); --btn-lift: none; padding: 0 12px; }
.cm-app :where(button.quiet) > .icon:where(:first-child:not(:only-child)) { margin-left: 0; }
.cm-app button.danger { --btn-bg: transparent; --btn-fg: var(--md-error); --btn-lift: none; padding: 0 23px; border: 1px solid var(--md-outline-variant); }
.cm-app button.danger-fill { --btn-bg: var(--md-error); --btn-fg: var(--md-on-error); }
.cm-app button.small, .cm-app a.button-link.small { min-height: 32px; padding: 0 16px; border-radius: 16px; }
.cm-app button.small.danger { padding: 0 15px; }
.cm-app :where(button.small, a.button-link.small) > .icon:where(:first-child:not(:only-child)) { margin-left: -4px; }
.cm-app button.link {
    display: inline; min-height: 0; padding: 0; border-radius: 0; background: none; box-shadow: none; color: var(--md-primary);
    font-weight: inherit; letter-spacing: inherit; white-space: normal; vertical-align: baseline;
}
.cm-app button.link:hover, .cm-app button.link:active { background: none; box-shadow: none; text-decoration: underline; }
.cm-app button.danger-link { color: var(--md-error); }
.cm-app button:disabled, .cm-app button:disabled:hover { opacity: .45; cursor: default; box-shadow: none; background: var(--btn-bg); }
.cm-app :is(button, a.button-link, summary, .icon-button, .nav-item, .bar-item, .chip, .menu-item):focus-visible { outline: 3px solid var(--md-secondary); outline-offset: 2px; }
.cm-app a:focus-visible { outline: 3px solid var(--md-secondary); outline-offset: 2px; border-radius: 4px; }
.cm-app .buttons, .cm-app .actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-app .wrap-actions, .cm-app .wrap-actions > form { max-width: 100%; min-width: 0; }
.cm-app .wrap-actions button { max-width: 100%; white-space: normal; padding-block: 6px; overflow-wrap: anywhere; }
.cm-app .actions-row { margin-bottom: 16px; }
.cm-app .actions-row form, .cm-app .buttons form { display: inline-flex; }
.cm-app .form-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 20px; }

.cm-app .icon-button {
    --btn-bg: transparent; --btn-fg: var(--md-on-surface-variant); --btn-lift: none;
    position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; min-height: 0;
    padding: 0; border: 0; border-radius: 20px; background: var(--btn-bg); color: var(--btn-fg); text-decoration: none;
}
.cm-app :is(.icon-button, .menu-item):hover { background: color-mix(in srgb, var(--btn-fg) 8%, var(--btn-bg)); text-decoration: none; }
.cm-app .icon-button:hover { color: var(--md-on-surface); }
.cm-app .icon-button > .icon { width: 24px; height: 24px; margin: 0; }
.cm-app h1 .icon-button { width: 36px; height: 36px; }
.cm-app h1 .icon-button > .icon { width: 20px; height: 20px; }

/* A button whose form is on its way shows a small spinner and takes no second click. */
.cm-app button.busy { cursor: progress; }
.cm-app button.busy::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: spin .8s linear infinite; }

/* The ripple: a circle with a soft edge that spreads from the pointer (app.js adds it on press and makes it grow).
   It shows quickly while pressed and fades slowly after, with the times of Material 3. Tabs have none. */
.cm-app .ripple { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.cm-app .ripple > i { position: absolute; border-radius: 50%; opacity: 0; transition: opacity .375s linear;
    background: radial-gradient(closest-side, currentColor max(calc(100% - 70px), 65%), transparent 100%); }
.cm-app .ripple.pressed > i { opacity: .12; transition-duration: .105s; }

/* Filter chips (machine list, task list): outlined; the chosen one is tonal. */
.cm-app button.chip {
    --btn-bg: transparent; --btn-fg: var(--md-on-surface-variant); --btn-lift: none;
    min-height: 32px; padding: 0 12px; gap: 8px; border: 1px solid var(--md-outline-variant); border-radius: 8px; font-size: 14px;
}
.cm-app button.chip b { color: var(--md-on-surface); font-weight: 700; font-variant-numeric: tabular-nums; }
.cm-app button.chip[aria-pressed="true"] { --btn-bg: var(--md-secondary-container); --btn-fg: var(--md-on-secondary-container); border-color: transparent; }
.cm-app button.chip[aria-pressed="true"] b { color: inherit; }
.cm-app button.chip[disabled] { opacity: .45; }
.cm-app .chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------------------------------------------------------------
   Fields: outlined; the label sits in a notch of the frame (app.js moves the text of a short label there; a long one
   stays above the field).
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app form { margin: 0; }
.cm-app form.stack, .cm-app .stack { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.cm-app form.stack label { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 520px; }
.cm-app form.stack > .panel { align-self: stretch; }
.cm-app .panel.stack > h2 { margin-bottom: 0; }
.cm-app form.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-app form.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.cm-app form.filters label { display: flex; flex-direction: column; gap: 6px; color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; }
.cm-app input, .cm-app select, .cm-app textarea { font-family: inherit; font-size: 14px; line-height: 20px; letter-spacing: .018em; color: var(--md-on-surface); }
.cm-app :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"], [type="submit"], [type="button"]), select, textarea) {
    min-height: 44px; margin: 0; padding: 11px 15px; border: 1px solid var(--md-outline); border-radius: 4px; background-color: transparent; color: var(--md-on-surface);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.cm-app :is(input, select, textarea):hover:not(:disabled):not(:focus) { border-color: var(--md-on-surface); }
.cm-app :is(input, select, textarea):focus { outline: none; border-color: var(--md-primary); box-shadow: inset 0 0 0 1px var(--md-primary); }
.cm-app :is(input, select, textarea):user-invalid { border-color: var(--md-error); }
.cm-app :is(input, select, textarea):disabled { opacity: .6; cursor: not-allowed; }
.cm-app :is(input, textarea)::placeholder { color: var(--md-on-surface-variant); opacity: .75; }
.cm-app select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.cm-app select:not([multiple]):not([size]) { padding-right: 40px; background-image: var(--select-arrow); background-repeat: no-repeat;
    background-position: right 8px center; background-size: 24px; }
.cm-app select option { background: var(--md-surface-container); color: var(--md-on-surface); }
.cm-app textarea { width: 100%; min-height: 88px; resize: vertical; }
.cm-app input[type="checkbox"], .cm-app input[type="radio"] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--md-primary); cursor: pointer; }
.cm-app input[type="file"] { max-width: 100%; color: var(--md-on-surface-variant); }
.cm-app input[type="file"]::file-selector-button { margin-right: 12px; padding: 0 16px; min-height: 36px; border: 0; border-radius: 18px; cursor: pointer;
    background: var(--md-secondary-container); color: var(--md-on-secondary-container); font: 500 14px/20px Roboto, system-ui, sans-serif; }
.cm-app input.short { width: 7rem; }
.cm-app .field-error { margin-top: -4px; color: var(--md-error); font-size: 12px; line-height: 16px; }
.cm-app .label-text { display: block; margin: 4px 0; color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; font-weight: 500; }
.cm-app .check { display: inline-flex; align-items: center; gap: 10px; color: var(--md-on-surface); cursor: pointer; }
.cm-app form.stack label.check, .cm-app form.stack label .check { flex-direction: row; }
.cm-app .copy-row { display: inline-flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.cm-app .copy-row input { max-width: 100%; min-width: 0; }
.cm-app .copy-row + .note { margin-top: 6px; }
.cm-app .connect-tabs a { gap: 8px; white-space: normal; max-width: 62%; text-align: center; }
.cm-app .connect-tabs .icon { width: 18px; height: 18px; }
.cm-app .connect-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.cm-app .connect-head h2 { margin: 0; }
.cm-app .connect-platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 12px; }
.cm-app .connect-platform { display: grid; align-content: start; gap: 12px; min-width: 0; padding: 20px; border-radius: 16px; background: var(--item-bg); }
.cm-app .connect-platform h3, .cm-app .connect-platform p { margin: 0; }
.cm-app .connect-platform select, .cm-app .connect-platform > p { min-height: 44px; max-width: 100%; }
.cm-app .connect-platform > p { display: flex; align-items: center; }
.cm-app .connect-platform .note { margin-bottom: 8px; }
.cm-app .connect-platform .connect-permission { margin: 12px 0 0; }
.cm-app .connect-details { margin: 16px 0; }
.cm-app .connect-details summary { margin-bottom: 8px; }
.cm-app .catalog-action form:has([name="include_installers"]) { display: grid; gap: 8px; justify-items: start; }
/* The steps after a command (page Install). */
.cm-app ol.steps { margin: 16px 0 12px; padding-left: 22px; }
.cm-app ol.steps li { margin: 4px 0; }
.cm-app code.fingerprint { letter-spacing: .05em; }
.cm-app dialog.modal input[type="password"] { width: 100%; }

/* The label in the notch of the frame (app.js: label.fl-on > span.fl). */
.cm-app label.fl-on { position: relative; }
.cm-app label.fl-on > .fl {
    position: absolute; left: 11px; top: -8px; z-index: 1; max-width: calc(100% - 22px); padding: 0 4px; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; background: var(--bg-here); color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; font-weight: 400;
    letter-spacing: .03em; pointer-events: none; transition: color .15s var(--ease);
}
.cm-app label.fl-on:focus-within > .fl { color: var(--md-primary); }
.cm-app form.stack label.fl-on, .cm-app .row-fields label.fl-on, .cm-app form.filters label.fl-on, .cm-app label.field.fl-on, .cm-app fieldset.editor .panel label.fl-on { gap: 4px; }
.cm-app label.fl-on > :is(.note, .field-error) { margin-top: 0; padding: 0 16px; }

/* Settings: one card and one button per group; short fields stand side by side with their unit inside the frame. */
.cm-app .field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 20px 24px; align-items: start; }
.cm-app .field-grid > .field-wide { grid-column: 1 / -1; margin: 0; }
.cm-app label.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cm-app label.field > :is(input, select, textarea) { width: 100%; }
.cm-app label.field > .field-error { margin-top: 0; }
.cm-app .unit-input { position: relative; display: flex; align-items: stretch; width: 9.625rem; max-width: 100%; min-height: 44px; border: 1px solid var(--md-outline);
    border-radius: 4px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.cm-app .unit-input:hover { border-color: var(--md-on-surface); }
.cm-app .unit-input:focus-within { border-color: var(--md-primary); box-shadow: inset 0 0 0 1px var(--md-primary); }
.cm-app .unit-input > input, .cm-app .unit-input > input:hover, .cm-app .unit-input > input:focus { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 0; border: 0; border-radius: 4px;
    background: none; box-shadow: none; outline: none; }
.cm-app .unit-input > .unit { display: flex; align-items: center; padding: 0 14px 0 4px; color: var(--md-on-surface-variant); white-space: nowrap; }

/* ---------------------------------------------------------------------------------------------------------------------
   Menus ("More", the user menu): a <details> whose summary is a tonal button. app.js closes an open one on a click
   elsewhere or Esc, and lifts a menu out of a scrolling table so that the table does not cut it off.
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app summary { cursor: pointer; }
.cm-app details.dropdown { position: relative; display: inline-block; }
.cm-app details.dropdown > summary {
    --btn-bg: var(--md-secondary-container); --btn-fg: var(--md-on-secondary-container);
    position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px 0 24px; border-radius: 20px; list-style: none;
    background: var(--btn-bg); color: var(--btn-fg); font-weight: 500; letter-spacing: .01em; white-space: nowrap; user-select: none;
    -webkit-tap-highlight-color: transparent; transition: background-color .2s var(--ease);
}
.cm-app details.dropdown > summary::-webkit-details-marker { display: none; }
.cm-app details.dropdown > summary:hover { background: color-mix(in srgb, var(--btn-fg) 8%, var(--btn-bg)); }
.cm-app details.dropdown[open] > summary { background: color-mix(in srgb, var(--btn-fg) 12%, var(--btn-bg)); }
.cm-app details.dropdown > summary > .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.cm-app details.dropdown[open] > summary:not(.dots) > svg.icon:last-of-type { transform: rotate(180deg); }
.cm-app details.dropdown > summary.dots { --btn-bg: transparent; --btn-fg: var(--md-on-surface-variant); justify-content: center; width: 40px; padding: 0; }
.cm-app details.dropdown > summary.dots > .icon { width: 24px; height: 24px; }
.cm-app td.row-actions details.dropdown > summary.dots { width: 32px; min-height: 32px; }
.cm-app .dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; display: flex; flex-direction: column; min-width: 232px; padding: 8px 0;
    border-radius: 16px; background: var(--md-surface-container); color: var(--md-on-surface); box-shadow: var(--sh2); text-align: left; white-space: nowrap;
}
.cm-app details.dropdown[open] > .dropdown-menu { animation: menu-in .22s var(--ease-in); transform-origin: top right; }
.cm-app .dropdown-menu > form { display: block; margin: 0; }
.cm-app .menu-item {
    --btn-bg: transparent; --btn-fg: var(--md-on-surface); --btn-lift: none;
    position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: calc(100% - 8px); min-height: 44px;
    margin: 0 4px; padding: 0 16px 0 12px; border: 0; border-radius: 12px; background: var(--btn-bg); color: var(--btn-fg); font-size: 14px;
    font-weight: 400; letter-spacing: .018em; text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.cm-app .menu-item:hover { text-decoration: none; }
.cm-app .menu-item > .icon { width: 20px; height: 20px; margin: 0; color: var(--md-on-surface-variant); }
.cm-app .menu-item.danger { --btn-fg: var(--md-error); border: 0; padding: 0 16px 0 12px; }
.cm-app .menu-item.danger > .icon { color: var(--md-error); }
.cm-app .menu-item.active { --btn-bg: var(--md-secondary-container); --btn-fg: var(--md-on-secondary-container); font-weight: 500; }
.cm-app .menu-item.active > .nav-icon .icon, .cm-app .menu-item.active > .icon { color: inherit; }
.cm-app .menu-item > .nav-icon { display: contents; }
.cm-app .menu-item .nav-icon .icon { width: 20px; height: 20px; color: var(--md-on-surface-variant); }
.cm-app .menu-item .count { margin-left: auto; order: 2; }
.cm-app .menu-item[aria-pressed="true"] { font-weight: 500; }
.cm-app .menu-check { display: inline-flex; margin-left: auto; padding-left: 20px; color: var(--md-primary); }
.cm-app .menu-check .icon { width: 20px; height: 20px; }
.cm-app .menu-code { display: inline-flex; justify-content: center; flex: none; width: 20px; color: var(--md-on-surface-variant); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
/* A colour scheme in the user menu: its main colour on its background (--swatch-*: "Colour schemes" above). */
.cm-app .swatch { flex: none; position: relative; width: 20px; height: 20px; border-radius: 50%; background: var(--swatch-bg); box-shadow: inset 0 0 0 1px var(--md-outline-variant); }
.cm-app .swatch::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--swatch-fg); }
.cm-app .menu-label { padding: 12px 16px 4px; color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .04em; }
.cm-app .menu-label:first-child { padding-top: 4px; }
.cm-app .menu-sep { height: 1px; margin: 8px 0; background: var(--md-outline-variant); }

/* ---------------------------------------------------------------------------------------------------------------------
   Dialogs and messages
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app dialog.modal {
    --bg-here: var(--md-surface-container-high); width: min(26.25rem, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 24px;
    border: 0; border-radius: 28px; background: var(--md-surface-container-high); color: var(--md-on-surface); box-shadow: var(--sh3);
}
.cm-app dialog.modal::backdrop { background: rgba(0, 0, 0, .32); }
.cm-app dialog.modal[open] { animation: dialog-in .3s var(--ease-in); }
.cm-app dialog.modal[open]::backdrop { animation: fade-in .3s linear; }
.cm-app dialog.modal h2 { margin: 0 0 4px; font-size: 24px; line-height: 32px; }
.cm-app dialog.modal form.stack label { max-width: none; }
.cm-app dialog.modal :is(input[type="text"], select) { width: 100%; }
.cm-app .dialog-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-self: stretch; margin-top: 8px; }
.cm-app .confirm-dialog h2 { font-size: 22px; line-height: 28px; }
.cm-app .confirm-dialog p { margin: 16px 0 0; color: var(--md-on-surface-variant); }
.cm-app .confirm-dialog .dialog-buttons { margin-top: 24px; }

/* Messages after an action: snackbars at the bottom right, away from the buttons of the page head. */
.cm-app .toasts { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(22.75rem, calc(100vw - 32px)); pointer-events: none; }
.cm-app .toasts .flash { position: relative; min-height: 48px; margin: 0; padding: 14px 52px 14px 16px; border-radius: 8px; pointer-events: auto;
    background: var(--md-inverse-surface); color: var(--md-inverse-on-surface); box-shadow: var(--sh3); animation: toast-in .3s var(--ease-in); }
.cm-app .toasts .flash-error { background: var(--md-error-container); color: var(--md-on-error-container); }
.cm-app .toasts .flash.leaving { opacity: 0; transform: translateY(8px); transition: opacity .2s var(--ease-out), transform .2s var(--ease-out); }
.cm-app .toast-close { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 18px;
    --btn-bg: transparent; --btn-fg: currentColor; --btn-lift: none; color: inherit; }
.cm-app .toast-close:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.cm-app .toast-close > .icon { width: 20px; height: 20px; margin: 0; }

/* "Back to top": a small FAB once the top of a long page has scrolled away (app.js). */
.cm-app .to-top {
    --btn-bg: var(--md-primary-container); --btn-fg: var(--md-on-primary-container); --btn-lift: var(--sh3);
    position: fixed; right: 24px; bottom: 24px; z-index: 50; width: 48px; height: 48px; min-height: 0; padding: 0; border-radius: 16px; box-shadow: var(--sh2);
    opacity: 0; visibility: hidden; transform: scale(.6); transition: opacity .2s var(--ease), visibility .2s, transform .25s var(--ease-in), box-shadow .2s var(--ease);
}
.cm-app .to-top.shown { opacity: 1; visibility: visible; transform: none; }
.cm-app .to-top > .icon { width: 24px; height: 24px; margin: 0; }
@media (max-width: 839px) {
    .cm-app .to-top { right: 16px; bottom: 96px; }
    .cm-app .toasts { left: 16px; right: 16px; bottom: 96px; width: auto; }
}
@media print { .cm-app .to-top, .cm-app .rail, .cm-app .bottom-nav, .cm-app header.top .top-tools, .cm-app header.top .search { display: none; } }

/* ---------------------------------------------------------------------------------------------------------------------
   Page parts
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app .page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 24px; }
.cm-app .page-head h1 { margin: 0; }
.cm-app .page-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-app .page-tools > form { display: inline-flex; }
.cm-app .page-meta { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 2px 8px; margin: -4px 0 0; color: var(--md-on-surface-variant); }
.cm-app .page-meta > span:not(:last-child)::after { content: "·"; margin-left: 8px; }
.cm-app h2 .count { margin-left: 4px; }
.cm-app h2 .h2-link { margin-left: 12px; font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .01em; }
.cm-app h2.with-link { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }

.cm-app .tabs { display: flex; margin: 0 0 24px; border-bottom: 1px solid var(--md-outline-variant); overflow-x: auto; scrollbar-width: none; }
.cm-app .tabs a { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 48px; padding: 0 16px;
    color: var(--md-on-surface-variant); font-weight: 500; letter-spacing: .01em; white-space: nowrap; text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease); }
.cm-app .tabs a:hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); color: var(--md-on-surface); text-decoration: none; }
.cm-app .tabs a:active { background: color-mix(in srgb, var(--md-on-surface) 12%, transparent); }
.cm-app .tabs a.active { color: var(--md-primary); }
.cm-app .tabs a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--md-primary); }

.cm-app .pager { display: flex; flex-wrap: wrap; gap: 4px; margin: 16px 0; }
.cm-app .pager a, .cm-app .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 18px;
    color: var(--md-on-surface-variant); font-weight: 500; }
.cm-app .pager a:hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); text-decoration: none; }
.cm-app .pager .current { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }

.cm-app pre.log { max-height: 420px; overflow: auto; margin: 0 0 12px; padding: 14px 16px; border-radius: 16px; background: var(--log-bg); color: var(--log-text); white-space: pre-wrap; }
.cm-app pre.log.full { max-height: none; }

.cm-app .login { --bg-here: var(--md-surface); max-width: 400px; margin: 48px auto; padding: 32px; border-radius: 28px; background: var(--md-surface); }
.cm-app .login h1 { font-size: 24px; line-height: 32px; margin-bottom: 24px; }
.cm-app .login label, .cm-app .login button { width: 100%; }
.cm-app .login form.stack { gap: 20px; }

/* Folded facts (machine details) and folded editor sections: one line until opened. */
.cm-app details.facts > summary, .cm-app details.fold > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; list-style: none; font-weight: 500; }
.cm-app details.facts > summary::-webkit-details-marker, .cm-app details.fold > summary::-webkit-details-marker { display: none; }
.cm-app details.facts > summary > .icon, .cm-app details.fold > summary > .icon { width: 24px; height: 24px; color: var(--md-on-surface-variant); transition: transform .2s var(--ease); }
.cm-app details:is(.facts, .fold):not([open]) > summary > .icon { transform: rotate(-90deg); }
.cm-app details.facts > summary small { color: var(--md-on-surface-variant); font-size: 12px; font-weight: 400; }
.cm-app details.facts.panel, .cm-app details.fold.panel { padding-top: 14px; padding-bottom: 14px; }
.cm-app details.facts.panel > summary { font-size: 16px; line-height: 24px; }
.cm-app details.facts[open] > summary { margin-bottom: 16px; }
.cm-app details.facts h3 { margin: 20px 0 8px; font-size: 14px; }
.cm-app details.fold > summary h2 { margin: 0; }
.cm-app details.fold > summary .fold-summary { flex: 1 1 10.5rem; min-width: 0; color: var(--md-on-surface-variant); font-size: 13px; font-weight: 400; }
.cm-app details.fold[open] > summary .fold-summary { display: none; }
.cm-app details.fold[open].panel { padding-bottom: 24px; }
.cm-app details.fold[open] > summary { margin-bottom: 16px; }
.cm-app details.reveal summary { display: inline; color: var(--md-primary); font-weight: 500; list-style: none; }
.cm-app details.reveal summary::-webkit-details-marker { display: none; }
.cm-app details.reveal summary:hover { text-decoration: underline; }
.cm-app details.reveal[open] summary { display: block; margin-bottom: 8px; }

/* An empty block shrinks to one line. */
.cm-app .panel.panel-empty { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding-top: 16px; padding-bottom: 16px; }
.cm-app .panel.panel-empty h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.cm-app .panel.panel-empty > p { margin: 0; }
.cm-app .now-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 16px; padding: 12px 16px; border-radius: 16px;
    background: var(--md-surface-container-low); color: var(--md-on-surface-variant); }
.cm-app .now-line > .icon { width: 22px; height: 22px; color: var(--md-primary); }
.cm-app .now-line > span { min-width: 0; }

/* ---------------------------------------------------------------------------------------------------------------------
   Progress: an 8 px M3 bar (the done part, a gap, the rest with a stop dot at its end) with a light running along it
   while the run goes on; app.js lets it glide to each new value. A ring says the same in a table row.
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app progress {
    -webkit-appearance: none; appearance: none; display: block; width: 100%; max-width: 560px; height: 8px; border: 0; border-radius: 4px; overflow: hidden;
    color: var(--md-primary); background: radial-gradient(circle at calc(100% - 4px) 50%, var(--md-primary) 2px, transparent 2.5px) no-repeat, var(--md-secondary-container);
}
.cm-app progress::-webkit-progress-bar { background: transparent; }
.cm-app progress::-webkit-progress-value { border-radius: 4px; background-color: var(--md-primary); box-shadow: 4px 0 0 var(--bg-here); }
.cm-app progress::-moz-progress-bar { border-radius: 4px; background-color: var(--md-primary); box-shadow: 4px 0 0 var(--bg-here); }
.cm-app progress.live::-webkit-progress-value { background-image: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%);
    background-size: 220% 100%; background-repeat: no-repeat; animation: sheen 1.8s linear infinite; }
.cm-app progress.live::-moz-progress-bar { background-image: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%);
    background-size: 220% 100%; background-repeat: no-repeat; animation: sheen 1.8s linear infinite; }

.cm-app .progress-item { display: flex; gap: 16px; align-items: flex-start; min-width: 0; padding: 14px 0; border-bottom: 1px solid var(--md-outline-variant); }
.cm-app .progress-item:first-of-type { padding-top: 4px; }
.cm-app .progress-item:last-child, .cm-app .progress-item:last-of-type { border-bottom: 0; padding-bottom: 0; }
.cm-app .progress-item > .lead .icon { animation: spin 2s linear infinite; }
.cm-app .progress-item.paused > .lead .icon { animation: none; }
.cm-app .progress-body { flex: 1 1 auto; min-width: 0; }
.cm-app .progress-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: .01em; }
.cm-app .progress-title a { color: var(--md-on-surface); }
.cm-app .progress-sub { color: var(--md-on-surface-variant); }
.cm-app .progress-bar { display: flex; align-items: center; gap: 12px; margin: 10px 0 6px; }
.cm-app .progress-bar progress { flex: 1 1 auto; max-width: none; }
.cm-app .progress-bar .percent { flex: none; min-width: 3.2em; color: var(--md-primary); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

.cm-app .ring { display: inline-block; flex: none; width: 24px; height: 24px; vertical-align: middle; }
.cm-app .ring svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cm-app .ring .ring-track { stroke: var(--md-secondary-container); }
.cm-app .ring .ring-value { stroke: var(--md-primary); }
.cm-app .now-run { display: inline-flex; align-items: center; gap: 8px; color: var(--md-primary); font-weight: 500; }
.cm-app .now-run .percent { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------------------------------------------------------
   Dashboard
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; margin-bottom: 16px; }
.cm-app .tile { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 18px 20px 20px; border-radius: 24px;
    background: var(--md-surface-container-low); color: var(--md-on-surface); transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.cm-app a.tile:hover { background: color-mix(in srgb, var(--md-on-surface) 6%, var(--md-surface-container-low)); box-shadow: var(--sh1); text-decoration: none; }
.cm-app .tile-label { padding-right: 48px; color: var(--md-on-surface-variant); font-weight: 500; letter-spacing: .01em; }
.cm-app .tile-icon { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
    background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.cm-app .tile-icon .icon { width: 22px; height: 22px; }
.cm-app .tile-icon.bad { background: var(--md-error-container); color: var(--md-on-error-container); }
.cm-app .tile-value { margin-top: 2px; font-size: 36px; line-height: 44px; font-weight: 400; letter-spacing: 0; }
.cm-app .tile-value small { color: var(--md-on-surface-variant); font-size: 16px; }
.cm-app .tile-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 22px; line-height: 28px; font-weight: 500; }
.cm-app .tile-counts .dot { margin-left: 6px; }
.cm-app .tile-counts .dot:first-child { margin-left: 0; }
.cm-app .tile-note { color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; letter-spacing: .03em; }
.cm-app .tile-note.mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-app .tile-note.bad-text { color: var(--md-error); }
.cm-app .seg-bar { display: block; width: 100%; height: 8px; margin: 8px 0 6px; border-radius: 4px; overflow: hidden; background: var(--md-surface-container-highest); }
.cm-app .seg-bar .seg-ok { fill: var(--heat-success); }
.cm-app .seg-bar .seg-warn { fill: var(--heat-warning); }
.cm-app .seg-bar .seg-bad { fill: var(--heat-error); }
.cm-app .seg-bar .seg-info { fill: var(--md-primary); }
.cm-app .seg-bar .seg-muted { fill: var(--md-outline-variant); }
.cm-app .tile-legend { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--md-on-surface-variant); font-size: 12px; line-height: 18px; }
.cm-app .tile-legend > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cm-app .tile-legend b { color: var(--md-on-surface); font-variant-numeric: tabular-nums; }

.cm-app .dashboard-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-rows: auto 1fr;
    grid-template-areas: "main side" "heat side"; gap: 0 16px; align-items: start; }
.cm-app .dash-main { grid-area: main; min-width: 0; }
.cm-app .dash-heat { grid-area: heat; min-width: 0; }
.cm-app .dash-side { grid-area: side; min-width: 0; }
@media (max-width: 1279px) { .cm-app .dashboard-grid { grid-template-rows: auto auto; grid-template-areas: "main side" "heat heat"; } }
@media (max-width: 960px) { .cm-app .dashboard-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "heat"; } }

/* Problems: list items on the card, the first and the last rounded more. */
.cm-app ul.problems, .cm-app ul.soft, .cm-app ul.notices { margin: 0; padding: 0; list-style: none; }
.cm-app ul.problems { display: flex; flex-direction: column; gap: 3px; }
.cm-app li.problem { display: flex; align-items: flex-start; gap: 16px; min-width: 0; padding: 14px 16px; border-radius: 6px; background: var(--item-bg); }
.cm-app li.problem:first-child { border-top-left-radius: 20px; border-top-right-radius: 20px; }
.cm-app li.problem:last-child { border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; }
.cm-app .problem-body { flex: 1 1 auto; min-width: 0; }
.cm-app .problem-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 15px; line-height: 22px; }
.cm-app .problem-head a { color: var(--md-on-surface); }
.cm-app .problem-text { margin-top: 2px; color: var(--md-on-surface-variant); overflow-wrap: anywhere; }
.cm-app .problem-since { flex: none; max-width: 30%; color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; font-weight: 500; text-align: right; }
.cm-app .problem-since > span { display: block; }
.cm-app ul.soft li { padding: 4px 0; }
.cm-app ul.notices li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--md-outline-variant); }
.cm-app ul.notices li:last-child { border-bottom: 0; }
.cm-app ul.notices li .note { flex: none; min-width: 6.5em; }
.cm-app ul.notices li a { color: var(--md-on-surface); }
.cm-app ul.notices li.unread { font-weight: 500; }
.cm-app ul.notices li.unread .note { color: var(--md-primary); }
.cm-app ul.notices li.unread .note::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 4px; background: var(--md-primary); vertical-align: 1px; }
.cm-app .panel > form.inline { margin-top: 12px; }

/* The days share the width of the card: a square shrinks on a narrow card and grows up to 22 px on a wide one. */
.cm-app table.heatmap { width: 100%; max-width: 900px; table-layout: fixed; border-collapse: separate; border-spacing: 3px; background: none; }
.cm-app table.heatmap thead th:first-child { width: 7.4375rem; }
.cm-app table.heatmap th, .cm-app table.heatmap td { padding: 0; border: 0; vertical-align: middle; }
.cm-app table.heatmap tbody th { padding-right: 10px; color: var(--md-on-surface); font-size: 13px; font-weight: 400; text-align: left; }
.cm-app table.heatmap tbody th a { color: var(--md-on-surface); }
.cm-app table.heatmap thead th.heat-day { overflow: visible; font-size: 11px; font-weight: 500; text-align: center; }
.cm-app table.heatmap thead th.weekend { color: var(--md-error); }
.cm-app table.heatmap tr.heat-total th { font-weight: 500; }
.cm-app table.heatmap tr.heat-total td { padding-bottom: 6px; }
.cm-app .heat { display: inline-block; width: 18px; height: 18px; border-radius: 4px; background: var(--heat-none); vertical-align: middle; transition: transform .15s var(--ease); }
.cm-app table.heatmap .heat { display: block; width: 100%; max-width: 22px; height: auto; aspect-ratio: 1; margin: 0 auto; }
.cm-app a.heat:hover { position: relative; z-index: 1; transform: scale(1.25); outline: 2px solid var(--md-on-surface); outline-offset: 1px; }
.cm-app .heat-success { background: var(--heat-success); }
.cm-app .heat-warning { background: var(--heat-warning); }
.cm-app .heat-missed_offline { background: var(--heat-missed_offline); }
.cm-app .heat-missed { background: var(--heat-missed); }
.cm-app .heat-error { background: var(--heat-error); }
.cm-app .heat-legend { margin-top: 16px; color: var(--md-on-surface-variant); font-size: 12px; }
.cm-app .heat-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.cm-app .heat-legend .heat { width: 12px; height: 12px; border-radius: 4px; }

/* ---------------------------------------------------------------------------------------------------------------------
   Machines, tasks, storages, charts
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app .list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.cm-app .list-tools-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.cm-app .list-tools-end form { display: inline-flex; margin: 0; }
.cm-app input.list-search { width: 13.125rem; max-width: 100%; }
.cm-app .versions-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 0 16px; align-items: start; }
.cm-app .machine-list { display: flex; flex-direction: column; gap: 6px; width: 100%; max-height: 320px; overflow-y: auto; padding: 10px 14px; border: 1px solid var(--md-outline-variant); border-radius: 12px; }
.cm-app form.stack .machine-list label { flex-direction: row; }

.cm-app .storages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.cm-app .storage { min-width: 0; padding: 14px 16px; border-radius: 16px; background: var(--item-bg); }
.cm-app .storage:has(details[open]) { grid-column: 1 / -1; }
.cm-app .storage-bad { box-shadow: inset 0 0 0 1px var(--md-error); }
.cm-app .storage-bad .storage-head strong { color: var(--md-error); }
/* Opened from the dashboard tile "Least free space" (#storage-…): the destination it names stands out. */
.cm-app .storage:target { box-shadow: inset 0 0 0 2px var(--md-primary); }
.cm-app .storage-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.cm-app .storage-space { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 8px 0 4px; }
.cm-app .storage details { margin-top: 6px; }
.cm-app .storage summary { color: var(--md-primary); font-weight: 500; }
.cm-app meter { width: 180px; height: 8px; border: 0; border-radius: 4px; background: var(--md-surface-container-highest); }
.cm-app meter::-webkit-meter-bar { height: 8px; border: 0; border-radius: 4px; background: var(--md-surface-container-highest); }
.cm-app meter::-webkit-meter-optimum-value { border-radius: 4px; background: var(--md-primary); }
.cm-app meter::-webkit-meter-suboptimum-value { border-radius: 4px; background: var(--heat-warning); }
.cm-app meter::-webkit-meter-even-less-good-value { border-radius: 4px; background: var(--heat-error); }
.cm-app meter:-moz-meter-optimum::-moz-meter-bar { border-radius: 4px; background: var(--md-primary); }
.cm-app meter:-moz-meter-sub-optimum::-moz-meter-bar { border-radius: 4px; background: var(--heat-warning); }
.cm-app meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { border-radius: 4px; background: var(--heat-error); }

.cm-app .charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cm-app .charts figure { margin: 0; min-width: 0; }
.cm-app .charts figcaption { margin-bottom: 6px; color: var(--md-on-surface-variant); font-weight: 500; }
.cm-app .chart-box { position: relative; height: 200px; }

.cm-app fieldset.plain { margin: 0; padding: 0; border: 0; }
.cm-app fieldset.plain legend { margin-bottom: 6px; padding: 0; }

/* ---------------------------------------------------------------------------------------------------------------------
   Task editor: a table of contents (sticky at the left on a wide screen, a row of chips on a narrow one), cards for
   the sections, the rarely changed ones folded into one line, the save buttons on a floating bar.
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app .editor-layout { display: grid; grid-template-columns: 11.375rem minmax(0, 1fr); gap: 0 24px; align-items: start; }
.cm-app .editor-toc { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 96px); overflow-y: auto; padding: 4px 0; }
.cm-app .editor-toc a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 16px; border-radius: 20px; color: var(--md-on-surface-variant);
    font-weight: 500; letter-spacing: .01em; line-height: 18px; transition: background-color .2s var(--ease), color .2s var(--ease); }
.cm-app .editor-toc a:hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); color: var(--md-on-surface); text-decoration: none; }
.cm-app .editor-toc a[aria-current="true"] { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.cm-app .editor-toc a.has-error::after { content: ""; flex: none; width: 8px; height: 8px; margin-left: auto; border-radius: 4px; background: var(--md-error); }
.cm-app fieldset.editor { min-width: 0; margin: 0; padding: 0; border: 0; }
.cm-app fieldset.editor > .panel { scroll-margin-top: 80px; }
.cm-app fieldset.editor .panel label, .cm-app form.stack fieldset.editor label { display: flex; flex-direction: column; gap: 6px; }
.cm-app fieldset.editor .panel label.check, .cm-app fieldset.editor label.check { display: inline-flex; flex-direction: row; gap: 10px; margin-right: 16px; color: var(--md-on-surface); font-size: 14px; line-height: 20px; }
.cm-app fieldset.editor .panel label.block { margin-top: 12px; }
.cm-app fieldset.editor .panel > label { max-width: 520px; margin-bottom: 16px; }
.cm-app fieldset.editor :is(input[type="text"], input[type="password"], input[type="number"], select) { max-width: 100%; }
.cm-app fieldset.editor [data-add-row] + .note { margin-top: 12px; }
.cm-app fieldset.editor details.fold[open] > summary + .row-fields { padding-top: 8px; }
.cm-app fieldset.editor .row-fields > label { min-width: 0; max-width: 100%; }
.cm-app fieldset[disabled] .remove, .cm-app fieldset[disabled] [data-add-row] { display: none; }
.cm-app .row-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.cm-app .row-fields label { color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; }
.cm-app .row-fields .grow { flex: 1 1 260px; }
.cm-app .form-row { --bg-here: var(--item-bg); position: relative; margin-bottom: 12px; padding: 20px 96px 4px 16px; border-radius: 16px; background: var(--item-bg); }
.cm-app .form-row .remove { position: absolute; top: 12px; right: 12px; }
.cm-app .form-row .cred { margin-top: 4px; padding-top: 16px; border-top: 1px dashed var(--md-outline-variant); }
.cm-app .choices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cm-app label.choice { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 12px; }
.cm-app label.choice input { margin-top: 1px; }
.cm-app .choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.125rem), 1fr)); gap: 8px; }
.cm-app .choice-cards label.choice { padding: 14px 16px; border: 1px solid var(--md-outline-variant); border-radius: 16px; cursor: pointer;
    transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.cm-app .choice-cards label.choice:hover { background: color-mix(in srgb, var(--md-on-surface) 5%, transparent); }
.cm-app .choice-cards label.choice:has(input:checked) { border-color: transparent; background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.cm-app .choice-cards label.choice > span { display: flex; flex-direction: column; gap: 4px; }
.cm-app .choice-cards label.choice small { color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; }
.cm-app .choice-cards label.choice:has(input:checked) small { color: inherit; opacity: .85; }
/* Days of a monthly schedule: 1–30 like a calendar page, "last day of the month" across the last row. */
.cm-app fieldset.editor .month-days { display: grid; grid-template-columns: repeat(7, minmax(0, 40px)); gap: 4px; margin: 4px 0 8px; }
.cm-app fieldset.editor .month-days label.day { position: relative; display: block; margin: 0; }
.cm-app fieldset.editor .month-days label.day.last { grid-column: 1 / -1; }
.cm-app fieldset.editor .month-days input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cm-app fieldset.editor .month-days span { display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 20px; color: var(--md-on-surface);
    font-size: 14px; user-select: none; transition: background-color .15s var(--ease), color .15s var(--ease); }
.cm-app fieldset.editor .month-days label.day.last span { justify-content: flex-start; padding: 0 16px; }
.cm-app fieldset.editor .month-days label.day:hover input:not(:checked) + span { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); }
.cm-app fieldset.editor .month-days input:checked + span { background: var(--md-primary); color: var(--md-on-primary); }
.cm-app fieldset.editor .month-days input:focus-visible + span { outline: 3px solid var(--md-secondary); outline-offset: 2px; }
.cm-app fieldset[disabled] .month-days span { opacity: .6; }
.cm-app .sticky-buttons {
    position: sticky; bottom: 16px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; width: fit-content; max-width: 100%;
    margin: 8px 0 0; padding: 8px 20px 8px 8px; border-radius: 28px; background: var(--md-surface-container-high); box-shadow: var(--sh3);
}
.cm-app .sticky-buttons > a { font-weight: 500; }
@media (min-width: 1101px) { .cm-app .editor-form > .sticky-buttons { margin-left: calc(11.375rem + 24px); } }
.cm-app .sticky-buttons .note { max-width: 40ch; }
@media (max-width: 1100px) {
    .cm-app .editor-layout { display: block; }
    .cm-app .editor-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; max-height: none; margin-bottom: 16px; }
    .cm-app .editor-toc a { min-height: 32px; padding: 0 12px; border: 1px solid var(--md-outline-variant); border-radius: 8px; }
    .cm-app .editor-toc a[aria-current="true"] { border-color: transparent; }
}
@media (max-width: 839px) { .cm-app .sticky-buttons { bottom: 92px; } }

/* ---------------------------------------------------------------------------------------------------------------------
   The wall screen (7.9): always dark, large, readable from across the room.
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app.wall { --bg-here: var(--md-surface); min-height: 100vh; padding: 16px 24px; background: var(--md-surface); font-size: 16px; line-height: 24px; }
.cm-app .wall-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.cm-app .wall-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 24px; line-height: 32px; font-weight: 500; }
.cm-app .wall-offline { padding: 4px 14px; border-radius: 16px; background: var(--md-error-container); color: var(--md-on-error-container); font-weight: 500; }
.cm-app .wall-updated { margin: 4px 0 16px; color: var(--md-on-surface-variant); font-size: 14px; }
.cm-app .wall-alert { margin-bottom: 16px; padding: 14px 20px; border-radius: 20px; background: var(--md-error-container); color: var(--md-on-error-container); font-size: 18px; }
.cm-app .wall-ok { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding: 24px 28px; border-radius: 28px; background: var(--md-ok-container);
    color: var(--md-on-ok-container); font-size: 32px; line-height: 40px; }
.cm-app .wall-ok::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 8px; background: var(--md-ok); }
.cm-app .wall-problems { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; margin-bottom: 16px; }
.cm-app .wall-problem { min-width: 0; padding: 18px 22px; border-radius: 24px; background: var(--md-error-container); color: var(--md-on-error-container); box-shadow: inset 6px 0 0 var(--heat-error); }
.cm-app .wall-problem-missed { box-shadow: inset 6px 0 0 var(--heat-missed); }
.cm-app .wall-problem-space { background: var(--md-warn-container); color: var(--md-on-warn-container); box-shadow: inset 6px 0 0 var(--heat-warning); }
.cm-app .wall-problem-head { font-size: 24px; line-height: 32px; font-weight: 500; overflow-wrap: anywhere; }
.cm-app .wall-problem-text { margin: 6px 0; font-size: 18px; overflow-wrap: anywhere; }
.cm-app .wall-problem-since { opacity: .8; font-size: 15px; }
.cm-app .wall-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 16px; }
.cm-app .wall-tile { display: flex; flex-direction: column; padding: 18px 22px; border-radius: 24px; background: var(--md-surface-container-low); }
.cm-app .wall-tile-value { font-size: 52px; line-height: 60px; font-weight: 400; }
.cm-app .wall-tile-value small { color: var(--md-on-surface-variant); font-size: 22px; }
.cm-app .wall-tile-label { color: var(--md-on-surface-variant); font-size: 16px; }
.cm-app .wall-tile-ok .wall-tile-value { color: var(--md-ok); }
.cm-app .wall-tile-warn .wall-tile-value { color: var(--md-warn); }
.cm-app .wall-tile-bad { background: var(--md-error-container); }
.cm-app .wall-tile-bad .wall-tile-value, .cm-app .wall-tile-bad .wall-tile-label { color: var(--md-on-error-container); }
.cm-app .wall-tile-info .wall-tile-value { color: var(--md-primary); }
.cm-app .wall-running { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 12px 24px; margin-bottom: 16px; }
.cm-app .wall-run { min-width: 0; }
.cm-app .wall-run-head { display: flex; justify-content: space-between; gap: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-app .wall-run-state { flex-shrink: 0; color: var(--md-on-surface-variant); }
.cm-app .wall-run progress { max-width: none; height: 10px; border-radius: 5px; margin-top: 6px; }
.cm-app .wall-soft { display: flex; flex-direction: column; gap: 6px; color: var(--md-on-surface-variant); font-size: 15px; }
.cm-app .wall-soft-label { color: var(--md-on-surface); }

/* ---------------------------------------------------------------------------------------------------------------------
   Narrow screens. Phone: the main lists (machines, tasks, runs, problems, notices) turn into cards. The first cell is
   the title, a .card-side cell (state, buttons) stands at its right, facts with data-label follow side by side with
   their column names above them, a .card-end cell closes the card.
   ------------------------------------------------------------------------------------------------------------------ */
@media (max-width: 900px) { .cm-app .versions-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
    .cm-app h1 { font-size: 24px; line-height: 32px; }
    .cm-app .panel { padding: 16px; border-radius: 20px; }
    .cm-app .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .cm-app .tile { padding: 14px 16px 16px; border-radius: 20px; }
    .cm-app .tile-icon { display: none; }
    .cm-app .tile-label { padding-right: 0; }
    .cm-app .tile-value { font-size: 28px; line-height: 36px; }
    .cm-app dl.props { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .cm-app dl.props dt { margin-top: 8px; }
    .cm-app li.problem { flex-wrap: wrap; row-gap: 6px; }
    .cm-app .problem-body { flex: 1 1 0; }
    .cm-app .problem-since { max-width: none; flex-basis: 100%; padding-left: 56px; text-align: left; }
    .cm-app .problem-since > span { display: inline; }
    .cm-app .problem-since > span + span::before { content: ', '; }
    /* Thirty days need some room: the map scrolls sideways instead of shrinking its squares to dots. */
    .cm-app table.heatmap { min-width: 31.5rem; }
    .cm-app table.heatmap thead th:first-child { width: 6.125rem; }
    .cm-app table.cards, .cm-app table.cards > tbody { display: block; }
    .cm-app table.cards { table-layout: auto; }
    .cm-app table.cards > thead { display: none; }
    .cm-app table.cards > tbody > tr { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 16px; padding: 12px 4px; border-bottom: 1px solid var(--md-outline-variant); }
    .cm-app table.cards > tbody > tr:last-child { border-bottom: 0; }
    /* Ends the title line: everything else starts below it. */
    .cm-app table.cards > tbody > tr::after { content: ""; order: 1; flex: 0 0 100%; }
    .cm-app table.cards > tbody > tr > td { order: 2; flex: 1 1 100%; min-width: 0; margin-top: 6px; padding: 0; border: 0; background: none !important;
        box-shadow: none !important; white-space: normal; }
    .cm-app table.cards > tbody > tr > td:first-child { order: 0; flex: 1 1 0; margin-top: 0; font-weight: 500; }
    .cm-app table.cards > tbody > tr > td.card-side { order: 1; flex: 0 1 auto; width: auto; max-width: 60%; margin-top: 0; text-align: right; }
    .cm-app table.cards > tbody > tr > td[data-label] { order: 3; flex: 0 1 auto; }
    .cm-app table.cards > tbody > tr > td[data-label]::before { content: attr(data-label); display: block; color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; font-weight: 400; }
    .cm-app table.cards > tbody > tr > td.card-end { order: 4; flex-basis: 100%; }
    .cm-app table.cards > tbody > tr > td.num { text-align: left; }
    .cm-app table.cards > tbody > tr:hover { background: color-mix(in srgb, var(--md-on-surface) 5%, transparent); }
    .cm-app table.cards > tbody > tr.unread { background: color-mix(in srgb, var(--md-primary-container) 45%, transparent); box-shadow: inset 3px 0 0 var(--md-primary); }
    .cm-app table.cards > tbody > tr.warn-row { background: color-mix(in srgb, var(--md-warn-container) 50%, transparent); }
    .cm-app table.cards > tbody > tr.bad-row { background: color-mix(in srgb, var(--md-error-container) 45%, transparent); }
    .cm-app table.cards .task-desc { max-width: none; }
    .cm-app table.cards > tbody > tr.group-row { display: block; padding: 16px 4px 4px; }
    .cm-app table.cards > tbody > tr.group-row::after { content: none; }
    .cm-app table.cards > tbody > tr.group-row > th { display: block; width: auto; padding: 0; border: 0; background: none; }
    .cm-app .list-tools-end, .cm-app input.list-search { width: 100%; }
    .cm-app .list-tools-end { justify-content: space-between; }
}
/* Fingers need bigger targets than a mouse. */
@media (pointer: coarse) {
    .cm-app .menu-item { min-height: 48px; }
    .cm-app button.small, .cm-app a.button-link.small { min-height: 36px; }
}

/* ---------------------------------------------------------------------------------------------------------------------
   Motion. Live blocks: what changed lights up for a moment, a new problem or run slides in, the bell count jumps when
   it grows. Folded blocks open and close smoothly where the browser can. With less motion asked for (Windows:
   Settings → Accessibility → Visual effects → Animation effects off) nothing moves and nothing fades; a changed row
   keeps its colour for a moment, a busy button gets "…".

   From page to page: a click on a section marks it at once (app.js) and the next page simply shows when it comes,
   with nothing moving or fading. The dissolve of 1.1.4-1.2.0 (a view transition between documents) and the content
   that came in from below were taken out in 1.2.1: in Chrome on Windows with its animation effects on, a click soon
   after such a page change now and then lost its release and did nothing (seen with a click log), and the user menu was now
   and then not redrawn; with the effects off, which also stopped these movements, neither happened.
   ------------------------------------------------------------------------------------------------------------------ */
.cm-app tr.changed > td, .cm-app tr.arrived > td { animation: glow 1.4s var(--ease); }
.cm-app li.problem.arrived, .cm-app .progress-item.arrived { animation: slide-in .35s var(--ease-in), glow 1.4s var(--ease); }
.cm-app .wall-problem.arrived { animation: glow 1.6s var(--ease); }
.cm-app .count.bump { animation: bump .5s var(--ease); }
.cm-app .appearing { animation: appear .25s var(--ease-in); }

@supports (interpolate-size: allow-keywords) and selector(::details-content) {
    .cm-app { interpolate-size: allow-keywords; }
    .cm-app details:not(.dropdown)::details-content { height: 0; overflow: clip; overflow-clip-margin: 4px;
        transition: height .25s var(--ease), content-visibility .25s allow-discrete; }
    .cm-app details:not(.dropdown)[open]::details-content { height: auto; }
    /* Opened by a jump (the editor's table of contents): at once, so that the page can scroll to it. */
    .cm-app details.at-once::details-content { transition: none; }
}

@keyframes menu-in { from { opacity: 0; transform: scaleY(.85) translateY(-4px); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sheen { from { background-position: 160% 0; } to { background-position: -60% 0; } }
@keyframes glow { from { background-color: var(--md-primary-container); } }
@keyframes slide-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes bump { 30% { transform: scale(1.3); } }
@keyframes appear { from { opacity: 0; transform: translateY(-4px); } }

@media (prefers-reduced-motion: reduce) {
    .cm-app *, .cm-app *::before, .cm-app *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
        transition-duration: 1ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
    .cm-app .ripple { display: none; }
    .cm-app tr.changed > td, .cm-app tr.arrived > td, .cm-app li.problem.arrived, .cm-app .progress-item.arrived, .cm-app .wall-problem.arrived { background-color: var(--md-primary-container); }
    .cm-app button.busy::after { content: "…"; width: auto; height: auto; border: 0; }
    .cm-app a.heat:hover { transform: none; }
}

.cm-app .analytics-title { margin-block-end: 10px; }
.cm-app .analytics-title h1, .cm-app .analytics-title form.analytics-storage { margin-block: 0; }
.cm-app .analytics-tabs { scrollbar-width: thin; }
.cm-app .analytics-filters label, .cm-app .analytics-filters select { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.cm-app .analytics-scale, .cm-app .analytics-caption { display: flex; justify-content: space-between; gap: 0.4375rem; }
.cm-app .analytics-caption { align-items: baseline; flex-wrap: wrap; overflow-wrap: anywhere; }
.cm-app .analytics-scale, .cm-app .analytics-caption span { color: var(--md-on-surface-variant); font-size: 0.74375rem; font-variant-numeric: tabular-nums; }
.cm-app .analytics-slot { margin-top: 0.65625rem; }
.cm-app .analytics-slot svg { display: block; width: 100%; height: 0.4375rem; margin-top: 0.21875rem; border-radius: 0.21875rem; background: var(--md-surface-container-highest); fill: var(--md-primary); }
.cm-app .analytics-calendar { display: grid; grid-template-columns: minmax(14.875rem, 1fr) minmax(0, 1.5fr); gap: 16px; }
.cm-app .analytics-calendar > .panel { min-width: 0; }
.cm-app .analytics-heading, .cm-app .analytics-actions { display: flex; gap: 0.65625rem; align-items: center; flex-wrap: wrap; }
.cm-app .analytics-heading { justify-content: space-between; }
.cm-app .calendar-nav { gap: 0.30625rem; }
.cm-app .calendar-nav .secondary { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    background: var(--md-surface-container-high); color: var(--md-on-surface); font-size: 1.09375rem; }
.cm-app .calendar-nav span.secondary { opacity: .35; }
.cm-app .calendar-nav .link { margin-inline-start: 0.35rem; }
.cm-app .analytics-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-block: 12px; }
.cm-app .calendar-weekday { padding-block: 4px; color: var(--md-on-surface-variant); text-align: center; font-size: 0.6825rem; }
.cm-app .calendar-date, .cm-app .calendar-disabled { display: grid; place-content: center; gap: 3px; min-height: 46px; border-radius: 10px;
    text-align: center; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cm-app .calendar-date { background: var(--md-surface-container-lowest); color: var(--md-on-surface); }
.cm-app .calendar-date:hover, .cm-app .calendar-date:focus-visible { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.cm-app .calendar-date.today { box-shadow: inset 0 0 0 1px var(--md-primary); }
.cm-app .calendar-date[aria-current] { background: var(--md-primary); color: var(--md-on-primary); font-weight: 600; }
.cm-app .calendar-disabled { align-content: start; padding-top: 10px; color: var(--md-on-surface-variant); opacity: .65; }
.cm-app .calendar-signals { display: flex; justify-content: center; align-items: center; gap: 3px; min-height: 6px; }
.cm-app .signal-load, .cm-app .signal-overlap, .cm-app .signal-late { display: inline-block; width: 6px; height: 6px; flex: none; }
.cm-app .signal-load { border-radius: 50%; background: var(--md-primary); }
.cm-app .signal-overlap { background: var(--md-warn); transform: rotate(45deg); }
.cm-app .signal-late { background: var(--md-on-surface-variant); width: 9px; height: 3px; }
.cm-app .calendar-date[aria-current] i { background: currentColor; }
.cm-app .calendar-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 8px; border-top: 1px solid var(--md-outline-variant);
    font-size: 0.7rem; color: var(--md-on-surface-variant); }
.cm-app .calendar-legend span { display: inline-flex; gap: 6px; align-items: center; }
.cm-app .calendar-detail li small { display: block; color: var(--md-on-surface-variant); }
.cm-app .calendar-period { border-radius: 16px; padding: 3px 10px; background: var(--md-secondary-container); color: var(--md-on-secondary-container); font-size: 0.7rem; }
.cm-app .calendar-detail .analytics-conflicts { max-height: 12.25rem; overflow: auto; }

.cm-app .analytics-window summary { cursor: pointer; }
.cm-app .window-caption { font-size: 0.7875rem; font-weight: 400; margin-inline-start: 0.4375rem; color: var(--md-on-surface-variant); }
.cm-app .window-editor { display: grid; grid-template-columns: max-content max-content minmax(4.375rem, 1fr); align-items: center;
    max-width: 40.25rem; gap: 8px 14px; margin: 14px 0; }
.cm-app .window-editor .window-slider { width: 100%; padding: 0; min-height: 24px; accent-color: var(--md-primary); cursor: pointer; }
.cm-app .window-track { grid-column: 3; }
.cm-app .window-band { --fill: var(--md-primary); --rest: var(--md-surface-container-highest); height: 5px; border-radius: 5px;
    background: linear-gradient(to right, var(--rest) var(--first), var(--fill) var(--first) var(--last), var(--rest) var(--last)); }
.cm-app .window-band.overnight { --rest: var(--md-primary); --fill: var(--md-surface-container-highest); }
.cm-app .window-track .analytics-scale { font-size: 0.63rem; }
.cm-app .window-caption { font-variant-numeric: tabular-nums; }

.cm-app .analytics-window .clock-input, .cm-app .analytics-planner .clock-input { width: 4.6375rem; min-height: 30px; height: 32px; padding: 2px 6px;
    text-align: center; font-variant-numeric: tabular-nums; }
.cm-app .analytics-conflicts { padding-inline-start: 1.225rem; overflow-wrap: anywhere; }
.cm-app .analytics-conflicts li + li { margin-top: 0.30625rem; }
.cm-app .analytics-slot.estimate svg { fill: var(--md-tertiary); }

.cm-app .analytics-planner .analytics-actions { margin-block: 0.7rem; }
.cm-app .analytics-machine-search { margin-inline-start: auto; }

.cm-app .analytics-machine { border-bottom: 1px solid var(--md-outline-variant); padding: 0.525rem 0; }
.cm-app .analytics-machine-row { display: flex; flex-wrap: wrap; gap: 0.48125rem; align-items: center; }
.cm-app .analytics-machine-row label { display: flex; align-items: center; gap: 0.30625rem; overflow-wrap: anywhere; }
.cm-app .analytics-machine-row input { margin: 0; }
.cm-app .analytics-machine-row .secondary, .cm-app .analytics-lane-controls .secondary { min-height: 32px; min-width: 32px; padding: 0 0.39375rem; }
.cm-app .analytics-machine-row button:last-child { margin-inline-start: auto; }
.cm-app .analytics-plan-grid { --task-col: minmax(7.875rem, 26%); --clock-col: 6.7375rem; }
.cm-app .analytics-plan-task, .cm-app .plan-ruler { display: grid; grid-template-columns: var(--task-col) minmax(0, 1fr);
    gap: 0.13125rem 0.875rem; align-items: center; padding: 0.175rem 0.4375rem; }
.cm-app .plan-task-name { grid-column: 1; grid-row: 1; position: relative; justify-self: start; overflow-wrap: anywhere; }
.cm-app .plan-tooltip, .cm-app .plan-time { position: absolute; z-index: 4; padding: 0.2625rem 0.525rem; border-radius: 6px;
    background: var(--md-inverse-surface); color: var(--md-inverse-on-surface); box-shadow: var(--sh1);
    line-height: 1.35; font-size: 0.6825rem; font-weight: 400; pointer-events: none; }
.cm-app .plan-tooltip { bottom: 100%; left: 0; width: max-content; max-width: min(14.875rem, 75vw); }
.cm-app .plan-task-name:not(:hover):not(:focus) .plan-tooltip, .cm-app .plan-lane:not(.dragging):not(:focus-within):not(:hover) .plan-time { visibility: hidden; }
.cm-app .plan-start, .cm-app .plan-ruler { font-variant-numeric: tabular-nums; }
.cm-app .plan-start { grid-column: 2; display: grid; grid-template-columns: minmax(0,1fr) var(--clock-col); gap: 0.65625rem; align-items: center; }
.cm-app .plan-hours { position: relative; grid-column: 2; margin: 0 calc(var(--clock-col) + 0.65625rem + 6px) 0 6px;
    height: 0.875rem; color: var(--md-on-surface-variant); font-size: 0.63rem; }
.cm-app .plan-hours span { position: absolute; transform: translateX(-50%); }
.cm-app .plan-hours span:first-child { left: 0; transform: none; }
.cm-app .plan-hours span:nth-child(2) { left: 25%; }
.cm-app .plan-hours span:nth-child(3) { left: 50%; }
.cm-app .plan-hours span:nth-child(4) { left: 75%; }
.cm-app .plan-hours span:last-child { right: 0; transform: none; }
.cm-app .plan-lane { padding: 0 6px; min-width: 0; }
.cm-app .plan-rail { position: relative; height: 24px; display: flex; align-items: center; }
.cm-app .plan-rail::before { content: ''; width: 100%; height: 10px; border-radius: 4px; background-color: var(--md-surface-container-highest);
    background-image: repeating-linear-gradient(to right, var(--md-outline-variant) 0 1px, transparent 1px calc(100% / 24)); }
.cm-app .plan-interval { position: absolute; left: var(--start); min-width: 2px; height: 8px; border-radius: 4px; background: var(--md-primary); }
.cm-app .plan-interval.continuation { left: 0; min-width: 0; }
.cm-app .plan-rail::after { content: ''; position: absolute; left: var(--start); transform: translateX(-50%); height: 16px; width: 6px;
    border-radius: 3px; background: var(--md-primary); pointer-events: none; }
.cm-app .plan-time { bottom: 100%; left: clamp(1.4rem, var(--start), calc(100% - 1.4rem)); transform: translateX(-50%); }
.cm-app .analytics-planner .plan-slider { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0;
    margin: 0; padding: 0; opacity: 0; cursor: grab; touch-action: pan-y; }
.cm-app .plan-rail:has(:focus-visible) { outline: 2px solid var(--md-primary); outline-offset: 2px; border-radius: 4px; }
.cm-app .plan-lane.dragging .plan-slider { cursor: grabbing; }
.cm-app .plan-lane:has(:disabled) { opacity: .5; }
.cm-app .analytics-lane-controls { display: flex; justify-content: flex-end; align-items: center; gap: 0.30625rem; }
@media (max-width: 760px) {
    .cm-app .analytics-plan-task, .cm-app .plan-ruler { grid-template-columns: minmax(0, 1fr); }
    .cm-app .plan-start, .cm-app .plan-hours { grid-column: 1; }
    .cm-app .plan-task-name { font-size: 0.7875rem; }
}
.cm-app .analytics-toggle-row { display: flex; justify-content: flex-end; }
.cm-app .analytics-pagination { justify-content: flex-end; }
.cm-app .analytics-pagination select { width: auto; }
.cm-app .analytics-confirm-list { max-height: min(45vh, 26.25rem); overflow: auto; padding-inline-start: 1.3125rem; }
.cm-app .analytics-confirm-list li + li { margin-top: 0.48125rem; }
.cm-app .analytics-toast:not([hidden]) { position: fixed; z-index: 61; inset-inline-end: 1.3125rem; bottom: 1.3125rem;
    display: flex; align-items: center; flex-wrap: wrap; gap: 0.6125rem; max-width: calc(100vw - 2.625rem); padding: 0.525rem 0.7rem;
    border-radius: 12px; background: var(--md-inverse-surface); color: var(--md-inverse-on-surface); box-shadow: var(--elevation-2); }
@media (max-width: 760px) {
    .cm-app .analytics-calendar { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .cm-app .analytics-machine-search { margin-inline-start: 0; }
    .cm-app .analytics-toast:not([hidden]) { bottom: 5.25rem; }
}
@media (max-width: 425px) {
    .cm-app .window-editor { column-gap: 8px; }
    .cm-app .window-track { grid-column: 1 / -1; }
    .cm-app .calendar-date, .cm-app .calendar-disabled { min-height: 40px; }
    .cm-app .analytics-plan-task { padding-inline-start: 0.4375rem; }
}

.cm-app .verification-surface { border: 1px solid var(--md-outline-variant); border-radius: 12px; background: var(--md-surface-container-lowest); }
.cm-app .verification-table :is(td, th) { vertical-align: middle; }
.cm-app .verification-table tbody th { white-space: normal; }
.cm-app .verification-table thead th { background: var(--md-surface-container); }
.cm-app .verification-table tbody tr + tr > * { border-top: 1px solid var(--md-outline-variant); }
.cm-app .verification-table .secondary-line { display: block; font-size: 0.7rem; color: var(--md-on-surface-variant); }
.cm-app .verification-table .check-count { display: inline-block; min-width: 2em; text-align: center; border-radius: 1em;
    background: var(--md-surface-container-high); color: var(--md-on-surface-variant); }
.cm-app .verification-table .check-count.failed { background: var(--md-error-container); color: var(--md-on-error-container); }
.cm-app .verification-table .verified-date { color: var(--md-ok); }
.cm-app .history-batch { padding: 0.6125rem 0; border-top: 1px solid var(--md-outline-variant); }
.cm-app .history-batch summary { cursor: pointer; overflow-wrap: anywhere; }
.cm-app .history-batch .analytics-actions { justify-content: space-between; }
.cm-app .history-batch .hint, .cm-app .history-current { display: block; }
.cm-app .history-batch details { min-width: 0; flex: 1 1 12.25rem; }
.cm-app .history-batch li { margin-block: 0.30625rem; }

.cm-app:has(.history-batch) #confirm-text { white-space: pre-line; max-height: 45vh; overflow-y: auto; }
