/* The Training Matrix wears OpsRoom's look: the same colours per theme, ISO lettering, buttons, tabs, panels,
   dialogs and toasts. Dark is the default; the theme button in the header cycles dark → light → greyscale. */
:root {
    color-scheme: dark;
    --bg: #050505;
    --panel: #0c1220;
    --panel-2: #111a2e;
    --line: #1e2a44;
    --text: #e2e8f0;
    --muted: #8b9ab5;
    --accent: #22d3ee;
    --on-accent: #000;
    --accent-orange: #f97316;
    --red: #f43f5e;
    --amber: #f59e0b;
    --green: #22c55e;
    --error-bg: #2a0610; --error-line: #5a0c1e; --error-text: #fda4af;
    --row-hover: #0f1729;
    --grip: #34425f;
    --option-hover: #1b2742;
    --backdrop: rgba(0, 0, 0, .6);
    --shadow: rgba(0, 0, 0, .45);
    --scroll: rgba(139, 154, 181, .16); --scroll-near: rgba(139, 154, 181, .38); --scroll-on: #38bdf8;
    --glow-ring: rgba(34, 211, 238, .25);
    --edge: #3b4b6b;
}
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f2f5f9;
    --panel: #ffffff;
    --panel-2: #eef2f7;
    --line: #d5dde8;
    --text: #0f1a2b;
    --muted: #5a6880;
    --accent: #0e7490;
    --on-accent: #fff;
    --accent-orange: #ea580c;
    --red: #e11d48;
    --amber: #b45309;
    --green: #15803d;
    --error-bg: #fff1f2; --error-line: #fecdd3; --error-text: #9f1239;
    --row-hover: #f6f9fc;
    --grip: #b4c0d2;
    --option-hover: #e9eff7;
    --backdrop: rgba(15, 26, 43, .35);
    --shadow: rgba(15, 26, 43, .14);
    --scroll: rgba(90, 104, 128, .22); --scroll-near: rgba(90, 104, 128, .42); --scroll-on: #0e7490;
    --glow-ring: rgba(14, 116, 144, .2);
    --edge: #c2ccd9;
}
:root[data-theme="grey"] {
    color-scheme: dark;
    --bg: #1c1c1c;
    --panel: #262626;
    --panel-2: #303030;
    --line: #3d3d3d;
    --text: #d2d2d2;
    --muted: #969696;
    --accent: #d4d4d4;
    --on-accent: #111;
    --accent-orange: #d29a6e;
    --red: #e07c7c;
    --amber: #d4b26a;
    --green: #8ec49b;
    --error-bg: #382828; --error-line: #634040; --error-text: #f0bcbc;
    --row-hover: #2c2c2c;
    --grip: #5a5a5a;
    --option-hover: #3a3a3a;
    --backdrop: rgba(0, 0, 0, .55);
    --shadow: rgba(0, 0, 0, .45);
    --scroll: rgba(200, 200, 200, .16); --scroll-near: rgba(200, 200, 200, .36); --scroll-on: #d4d4d4;
    --glow-ring: rgba(212, 212, 212, .2);
    --edge: #5c5c5c;
}
/* Competency levels colour the Harvey balls: no exposure is a muted ring, then orange, yellow, light green and full green
   as competence grows. Set per theme so each stays clear on that theme's panels. */
:root {
    --l0: var(--muted); --l1: #fb923c; --l2: #facc15; --l3: #86efac; --l4: #22c55e;
}
:root[data-theme="light"] {
    --l1: #ea580c; --l2: #ca8a04; --l3: #4ade80; --l4: #15803d;
}
:root[data-theme="grey"] {
    --l1: #d29a6e; --l2: #d4c06a; --l3: #b5dcbe; --l4: #8ec49b;
}
:root, :root[data-theme] {
    --cell: 30px;
    --ball-size: 24px;
    --name-col: 230px;
}

/* osifont: a free font drawn to the ISO 3098 technical-lettering standard (as CAD's ISOCPEUR), by hikikomori82
   (github.com/hikikomori82/osifont), under the GNU LGPL v3 with font exception. The same file OpsRoom uses. */
@font-face { font-family: "osifont"; src: url(fonts/osifont.woff) format("woff"); font-display: swap; }
:root { --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --font-iso: "osifont", "ISOCPEUR", var(--font-ui);
        /* osifont leaves more room below its letters than above; padding moves this much from bottom to top to centre them. */
        --iso-nudge: 2px; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font-iso); display: flex; flex-direction: column; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

/* Scroll bars: faint until wanted, cyan on the bar itself (as OpsRoom). */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 9999px; border: 4px solid transparent; background-clip: padding-box; }
:hover::-webkit-scrollbar-thumb { background-color: var(--scroll-near); border-width: 3px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-on); border-width: 1px; }
::-webkit-scrollbar-thumb:active { background-color: var(--accent); border-width: 1px; }
@supports not selector(::-webkit-scrollbar) {
    * { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
    :hover { scrollbar-color: var(--scroll-near) transparent; }
}

/* ---------- header ---------- */

header { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand img { display: block; }
.brand span { font-size: 20px; letter-spacing: .03em; }
.brand small { color: var(--muted); font-weight: 400; font-size: 14px; letter-spacing: .02em; }
.spacer { flex: 1; }
.who { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ---------- buttons and fields ---------- */

.btn { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: calc(6px + var(--iso-nudge)) 12px calc(6px - var(--iso-nudge));
       display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.icon { padding-block: 6px; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.btn.small { padding: calc(3px + var(--iso-nudge)) 8px max(0px, calc(3px - var(--iso-nudge))); font-size: 12px; }
.btn.small.icon { padding-block: 3px; }
.ms-logo { width: 1em; height: 1em; flex: none; }
.link-btn { all: unset; cursor: pointer; color: var(--accent); }
.link-btn:hover, .link-btn:focus-visible { text-decoration: underline; }

input[type="search"], input[type="text"], select {
    background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: calc(6px + var(--iso-nudge)) 8px calc(6px - var(--iso-nudge));
}
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="checkbox"] { accent-color: var(--accent); margin: 0; }

/* Dropdown lists drawn in the app's style where the browser allows it (Edge, Chrome); others keep their own. */
@supports (appearance: base-select) {
    select, ::picker(select) { appearance: base-select; }
    select { display: inline-flex; align-items: center; gap: 6px; }
    select::picker-icon { color: var(--muted); font-size: 11px; transition: rotate .15s; }
    select:open::picker-icon { rotate: 180deg; }
    ::picker(select) { margin-top: 4px; padding: 4px; border: 1px solid var(--edge); border-radius: 10px;
                       background: var(--panel-2); color: var(--text); box-shadow: 0 10px 28px var(--shadow); }
    option { padding: calc(7px + var(--iso-nudge)) 10px calc(7px - var(--iso-nudge)); border-radius: 6px; gap: 8px; }
    option:hover, option:focus-visible { background: var(--option-hover); outline: none; }
    option:checked { color: var(--accent); }
    option::checkmark { color: var(--accent); }
}

/* ---------- tabs and toolbar ---------- */

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.tabs { display: flex; gap: 4px; margin-right: 8px; }
.tab { background: transparent; border: 1px solid transparent; border-radius: 8px; padding: calc(6px + var(--iso-nudge)) 12px calc(6px - var(--iso-nudge)); color: var(--muted); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--panel-2); border-color: var(--accent); }
.toolbar select { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Show leavers / Show hidden: buttons that light up while on, like OpsRoom's Filter button. */
.toggle { cursor: pointer; user-select: none; }
.toggle:has(input:checked) { border-color: var(--accent); color: var(--accent); }
.tools { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* Smart search: chips and a text box in one field, like the "Assigned to" picker in OpsRoom's task editor. */
.search { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; flex: 1 1 340px; max-width: 640px; min-height: 36px;
          padding: 3px 6px 3px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; cursor: text; }
.search:focus-within { border-color: var(--accent); }
.search-icon { color: var(--muted); font-size: 12px; }
.chips { display: contents; }
.search input { flex: 1; min-width: 140px; border: 0; background: none; padding: calc(4px + var(--iso-nudge)) 4px calc(4px - var(--iso-nudge)); outline: none; }
.search input:focus-visible { outline: none; }
.search-clear { all: unset; cursor: pointer; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--muted); }
.search-clear:hover, .search-clear:focus-visible { color: var(--red); background: var(--option-hover); }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 3px 2px 9px; border-radius: 999px; cursor: default; white-space: nowrap;
         background: var(--panel-2); border: 1px solid var(--line); font-size: 12.5px; }
.fchip > i { color: var(--muted); font-size: 11px; }
.fchip > span { padding-top: var(--iso-nudge); }
.fchip.skill { padding-left: 3px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.chip-level { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 1px; padding: 1px 5px 1px 3px; border-radius: 999px; }
.chip-level:hover, .chip-level:focus-visible { background: var(--option-hover); }
.chip-level .ball { width: 18px; height: 18px; }
.chip-level b { color: var(--ball); font-size: 13px; line-height: 1; }
.chip-x { all: unset; cursor: pointer; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--muted); font-size: 11px; }
.chip-x:hover, .chip-x:focus-visible { color: var(--red); background: var(--option-hover); }
.suggest { position: absolute; z-index: 25; left: -1px; top: calc(100% + 4px); width: min(440px, calc(100vw - 20px)); max-height: 380px; overflow: auto;
           padding: 4px; background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; box-shadow: 0 10px 28px var(--shadow); cursor: default; }
.pick-head { padding: 6px 8px 2px; color: var(--muted); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; }
.pick-opt { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.pick-opt > i { color: var(--muted); text-align: center; font-size: 12px; }
.pick-opt small { display: block; color: var(--muted); font-size: 11.5px; }
.pick-opt.at, .pick-opt:hover { background: var(--option-hover); }
.pick-opt.at > i { color: var(--accent); }
.pick-none { padding: 8px; color: var(--muted); font-size: 12.5px; }
.pick-foot { border-top: 1px solid var(--line); margin-top: 4px; padding: 6px 8px 2px; color: var(--muted); font-size: 11px; }
.sync-info { color: var(--muted); font-size: 12px; white-space: nowrap; }

main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 14px 16px 12px; }
#matrixView { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ---------- legend ---------- */

.legend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 12px; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; padding: 0; }
.match-info { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.match-info b { color: var(--accent); font-size: 15px; }
.print-filter { display: none; }
.legend li { display: inline-flex; align-items: center; gap: 7px; padding: calc(3px + var(--iso-nudge)) 11px calc(3px - var(--iso-nudge)) 6px;
             border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; }

/* ---------- harvey balls + level colours ---------- */

.ball { width: 16px; height: 16px; display: block; flex: none; }
.ball .ring { fill: none; stroke: var(--ball, var(--text)); stroke-width: 1.2; }
.ball .fill { fill: var(--ball, var(--text)); }
.l0 { --ball: var(--l0); }
.l1 { --ball: var(--l1); }
.l2 { --ball: var(--l2); }
.l3 { --ball: var(--l3); }
.l4 { --ball: var(--l4); }

/* ---------- grid ---------- */

.grid-wrap { flex: 1; min-height: 0; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.matrix { border-collapse: separate; border-spacing: 0; }
.matrix th, .matrix td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; }

.matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--panel-2); vertical-align: bottom; font-weight: 600; }
.matrix .corner { left: 0; z-index: 4; text-align: left; padding: 8px 12px; min-width: var(--name-col); max-width: var(--name-col); color: var(--muted); font-weight: 400; }
.skill-head { width: var(--cell); min-width: var(--cell); max-width: var(--cell); height: 170px; }
.skill-head div { writing-mode: vertical-rl; transform: rotate(180deg); margin: 0 auto; padding: 10px 0; max-height: 165px;
                  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; letter-spacing: .02em; }
.matrix .pad { border-right: 0; width: 100%; background: var(--panel); }
.matrix thead .pad { background: var(--panel-2); }

.matrix tbody th { position: sticky; left: 0; z-index: 1; background: var(--panel); text-align: left; font-weight: 400; padding: 0 6px 0 12px;
                   height: var(--cell); min-width: var(--name-col); max-width: var(--name-col); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-inner { display: flex; align-items: center; gap: 6px; width: calc(var(--name-col) - 19px); }
.name-text { overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; padding-top: var(--iso-nudge); }
.chip { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); flex: none; font-weight: 400; }
/* The hide button shows while the pointer is over the row (always, on touch screens), like OpsRoom's ↗. */
.hide-btn { all: unset; box-sizing: border-box; margin-left: auto; flex: none; cursor: pointer; display: grid; place-items: center; width: 22px; height: 22px;
            border-radius: 5px; color: var(--text); font-size: 12px; opacity: 0; transition: opacity .15s; }
tr.person:hover .hide-btn, .hide-btn:focus-visible { opacity: 1; }
.hide-btn:hover, .hide-btn:focus-visible { color: var(--accent); background: var(--glow-ring); }
@media (pointer: coarse) { .hide-btn { opacity: 1; } }
tr.person:hover th, tr.person:hover td.pad { background: var(--row-hover); }
tr.leaver .name-text { color: var(--muted); text-decoration: line-through; }

tr.group th, tr.group td { background: var(--panel-2); height: 34px; }
tr.group th { font-weight: 600; font-size: 1.1em; letter-spacing: .02em; }
tr.group th .chip { margin-left: 6px; font-size: 11px; letter-spacing: 0; }

td.cell { width: var(--cell); min-width: var(--cell); height: var(--cell); cursor: pointer; text-align: center; }
td.cell .ball { margin: 0 auto; width: var(--ball-size); height: var(--ball-size); }
td.cell .ball .ring { stroke-width: 1.1; }
/* Blank (no exposure) circles get a thinner ring, so the rated ones stand out. */
td.cell.l0 .ball .ring, .l0 .ball .ring { stroke-width: .7; }
td.cell:hover, td.cell.picking { box-shadow: inset 0 0 0 2px var(--accent); }
/* Columns for the skills being searched: brought to the front and lightly tinted. */
.matrix th.skill-head.focus { background: color-mix(in srgb, var(--accent) 16%, var(--panel-2)); color: var(--accent); }
td.cell.focus { background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }

/* Loading and "nothing here" messages: centred, icon above the text. */
.empty { color: var(--muted); padding: 40px 16px; text-align: center; min-height: 220px;
         display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.empty > i { font-size: 22px; margin-bottom: 8px; }
.hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

/* osifont's letters sit high in small pills; where the browser can, trim the line box to the capitals so they centre. */
@supports (text-box: trim-both cap alphabetic) {
    .chip { text-box: trim-both cap alphabetic; padding-block: 5px; }
}

/* ---------- level picker ---------- */

.level-picker { position: fixed; z-index: 30; width: 290px; padding: 4px; background: var(--panel); border: 1px solid var(--edge);
                border-radius: 10px; box-shadow: 0 10px 28px var(--shadow); }
.picker-title { padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-weight: 600; }
.picker-title small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.pick { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 26px 1fr 14px; gap: 8px; align-items: center; width: 100%;
        padding: calc(6px + var(--iso-nudge)) 8px calc(6px - var(--iso-nudge)); border-radius: 6px; cursor: pointer; font-size: 13px; }
.pick .swatch { display: grid; place-items: center; width: 26px; height: 22px; }
.pick .swatch .ball { width: 20px; height: 20px; }
.pick:hover, .pick:focus-visible { background: var(--option-hover); }
.pick.current { color: var(--accent); }
.pick .tick { visibility: hidden; color: var(--accent); font-size: 12px; }
.pick.current .tick { visibility: visible; }

/* ---------- skills ---------- */

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.skills-panel { width: 100%; max-width: 760px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.skills-panel > * { flex: none; }
.panel h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.panel h2 i { color: var(--accent); }
.panel h3 { margin: 6px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.panel p { margin: 0; }
.add-skill { display: flex; gap: 8px; }
.add-skill input { flex: 1; min-width: 0; background: var(--bg); }
.skill-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.skill-list:empty { display: none; }
.skill-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-top: 1px solid var(--line); }
.skill-list li:first-child { border-top: 0; }
.skill-list li:hover { background: var(--row-hover); }
.skill-list li.dragging { opacity: .35; }
.skill-list li.empty-row { justify-content: center; color: var(--muted); padding: 12px; }
.grip { color: var(--grip); cursor: grab; user-select: none; padding: 0 2px; }
.skill-list li:hover .grip { color: var(--muted); }
.skill-name { flex: 1; min-width: 0; background: transparent !important; border-color: transparent !important; }
.skill-name:hover { border-color: var(--line) !important; }
.skill-name:focus { background: var(--bg) !important; border-color: var(--accent) !important; outline: none; }
.skill-name-static { flex: 1; color: var(--muted); padding-top: var(--iso-nudge); }

/* ---------- sign in ---------- */

.signin { max-width: 420px; margin: 80px auto; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 30px; }
.signin h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: .02em; }
.signin p { color: var(--muted); margin: 0 0 20px; }

/* ---------- dialog ---------- */

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--edge); border-radius: 14px; padding: 0; width: min(640px, 94vw); }
dialog::backdrop { background: var(--backdrop); }
.dlg-head { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 1.1em; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; }
.dlg-head i { color: var(--accent); }
.dlg-body { padding: 14px 18px; max-height: 60vh; overflow: auto; }
.dlg-body p { margin: 0; }
.dlg-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; margin: 0; }
.history { border-collapse: collapse; width: 100%; font-size: 13px; }
.history th, .history td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.history th { color: var(--muted); font-weight: 500; }
.history tr:last-child td { border-bottom: 0; }
.error-text { color: var(--red); }

/* ---------- toast ---------- */

.toast { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 50;
         display: flex; align-items: center; gap: 10px; max-width: min(520px, 92vw); padding: 10px 16px 10px 14px;
         background: var(--panel-2); border: 1px solid var(--edge); border-left: 3px solid var(--accent); border-radius: 10px;
         box-shadow: 0 8px 24px var(--shadow); animation: toast-in .18s ease-out; }
.toast i { color: var(--accent); }
.toast.error { border-left-color: var(--red); }
.toast.error i { color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- phones ---------- */

@media (pointer: coarse) {
    .tab, .btn, .toolbar select, .toolbar input { min-height: 40px; }
}
@media (max-width: 640px) {
    header { gap: 8px; }
    .brand small, .who, .label { display: none; }
    .btn:has(> .label) { padding-block: 6px; }
    .tabs { width: 100%; margin: 0; }
    .tab { flex: 1; }
    .search { flex: 1 1 100%; max-width: none; }
    .tools { margin-left: 0; }
    .sync-info { display: none; }
    main { padding-left: 10px; padding-right: 10px; }
    :root, :root[data-theme] { --name-col: 160px; }
}

/* ---------- print: A3 landscape, everything visible, always on white ---------- */

.print-only { display: none; }

@media print {
    @page { size: A3 landscape; margin: 10mm; }
    :root, :root[data-theme] {
        --bg: #fff; --panel: #fff; --panel-2: #eef2f7; --line: #c2ccd9; --text: #0f1a2b; --muted: #5a6880;
        --l0: #5a6880; --l1: #ea580c; --l2: #ca8a04; --l3: #4ade80; --l4: #15803d;
    }
    html, body { height: auto; display: block; background: #fff; }
    header, .toolbar, .no-print, .level-picker, .toast { display: none !important; }
    main { padding: 0; display: block; }
    #matrixView { display: block; }
    .print-only { display: flex; justify-content: space-between; align-items: baseline; }
    .print-filter:not(:empty) { display: block; margin: 0 0 8px; font-size: 13px; }
    .print-title h2 { margin: 0 0 6px; font-size: 18px; }
    .grid-wrap { overflow: visible; border: 0; border-radius: 0; }
    .matrix thead th, .matrix tbody th { position: static; }
    .matrix thead { display: table-header-group; }
    .matrix tr { break-inside: avoid; }
    .matrix .pad { display: none; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
