/* COVRA UI. DTB red on white; dark theme via [data-theme="dark"] variables. */
:root {
  --primary: #E8112D;
  --primary-dark: #B50D23;
  --primary-soft: #FDE9EC;
  --info: #39506B;
  --info-bg: #EEF2F6;
  --ink: #1F2A44;
  --ink-2: #66758C;
  --title: #1D5FA8;
  --figure: #16325C;
  --nav-ico: #5B7DB1;
  --bg: #F6F8FA;
  --surface: #FFFFFF;
  --panel: #F2F5F8;
  --line: #D8DFE6;
  --line-soft: #ECF0F4;
  --row-hover: #FAFCFE;
  --ok: #1E8449;      --ok-bg: #E8F5E9;
  --warn: #B7791F;    --warn-bg: #FEF6E7;
  --crit: #C0392B;    --crit-bg: #FDECEA;
  --shadow: rgba(26, 26, 26, .08);
  --radius: 8px;
}
[data-theme="dark"] {
  --primary: #FF4D63;
  --primary-dark: #E8112D;
  --primary-soft: #3A161E;
  --info: #AFC3DA;
  --info-bg: #212B38;
  --ink: #E6EAF0;
  --ink-2: #9AA8BA;
  --title: #7FB2EC;
  --figure: #DCE7F5;
  --nav-ico: #7F9CC8;
  --bg: #121417;
  --surface: #1B1E23;
  --panel: #23272D;
  --line: #363C44;
  --line-soft: #2B3138;
  --row-hover: #22262C;
  --ok: #4FC97E;      --ok-bg: #17301F;
  --warn: #E3A94F;    --warn-bg: #362A12;
  --crit: #FF7066;    --crit-bg: #3B1A17;
  --shadow: rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: Verdana, Geneva, Tahoma, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a, a:link, a:visited, a:hover, a:focus, a:active { text-decoration: none; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

/* ---- Shell ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column; padding: 18px 0;
  border-right: 1px solid var(--line);
}
.brand { display: block; padding: 0 20px 14px; border-bottom: 1px solid var(--line); }
.brand:hover img { opacity: .85; }
.brand img { width: 120px; display: block; margin: -10px 0 -4px -14px; }
[data-theme="dark"] .brand img {
  background: #fff; border-radius: 12px; padding: 8px 12px;
  margin: 0 0 6px -4px; width: 112px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.nav { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.nav .ico { flex-shrink: 0; color: var(--nav-ico); }
.nav-group > summary { list-style: none; display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; cursor: pointer; user-select: none; font-size: 11.5px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase; color: var(--title); }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(-45deg); transition: transform .15s ease; }
.nav-group[open] > summary::after { transform: rotate(45deg); }
.nav-group > summary:hover { background: var(--panel); }
.nav a { display: flex; align-items: center; gap: 10px; color: var(--ink);
  padding: 8px 20px 8px 28px; font-size: 13.5px; }
.nav a:hover { background: var(--panel); color: var(--title); }
.nav a:hover .ico { color: var(--title); }
.nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 700;
  border-left: 3px solid var(--primary); padding-left: 25px; }
.nav a.active .ico { color: var(--primary); }

.main { flex: 1; min-width: 0; }
.topbar {
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 10px 28px; display: flex; align-items: center; gap: 14px;
}
.topbar .title { font-size: 18px; font-weight: 700; }
.topbar .spacer { flex: 1; }
.userchip { font-size: 13px; color: var(--ink-2); text-align: right; }
.userchip b { color: var(--ink); }
.content { padding: 16px 22px 40px; max-width: 1400px; }

/* ---- Panels & grids ---- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px;
  overflow-x: auto; /* wide tables scroll inside the panel, never the page */
}
.panel h2 { margin: 0 0 12px; font-size: 15px; color: var(--title); }
.panel h2 .sub { font-weight: 400; color: var(--ink-2); font-size: 12px; margin-left: 8px; }
.grid { display: grid; gap: 14px; margin-bottom: 18px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1100px) { .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }

/* ---- Cards (tiles). Clickable cards keep normal text colours: no red text,
   no underline. The card border and a pointer are the affordance. ---- */
.tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
}
.tile .label { font-size: 12.5px; font-weight: 600; color: var(--title); }
.tile .value { font-size: 28px; font-weight: 700; margin-top: 4px; color: var(--figure); }
.tile .hint { font-size: 11.5px; color: var(--ink-2); margin-top: 4px; }
.tile.accent { border-top: 3px solid var(--primary); }
.tile.t-ok .value { color: var(--ok); }
.tile.t-warn .value { color: var(--warn); }
.tile.t-crit .value { color: var(--crit); }
a.tile, a.tile:hover { text-decoration: none; cursor: pointer; }
a.tile .label { color: var(--title); }
a.tile .hint { color: var(--ink-2); }
a.tile .value { color: var(--figure); }
a.tile.t-ok .value { color: var(--ok); }
a.tile.t-warn .value { color: var(--warn); }
a.tile.t-crit .value { color: var(--crit); }
a.tile { display: block; }
a.tile:hover { border-color: var(--primary); box-shadow: 0 3px 14px var(--shadow);
  transform: translateY(-1px); transition: all .12s ease; }

/* ---- Tables ---- */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; background: var(--panel); color: var(--ink-2);
  font-size: 12px; letter-spacing: .5px; text-transform: uppercase;
  padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td {
  padding: 10px; border-bottom: 1px solid var(--line-soft);
  vertical-align: top; white-space: nowrap; /* one line; the panel slides */
}
table.data td .small, table.data td .muted { white-space: nowrap; }
table.data tr:hover td { background: var(--row-hover); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Status pills: colour plus text label, never colour alone ---- */
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.crit { background: var(--crit-bg); color: var(--crit); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.muted { background: var(--panel); color: var(--ink-2); }

.hbar { background: var(--panel); border-radius: 4px; height: 10px; overflow: hidden; }
.hbar > span { display: block; height: 100%; border-radius: 4px; background: #8296A8; }
.hbar > span.ok { background: var(--ok); }
.hbar > span.warn { background: var(--warn); }
.hbar > span.crit { background: var(--crit); }

/* ---- Buttons & forms ---- */
.btn {
  display: inline-block; background: var(--primary); color: #fff; border: 0;
  padding: 9px 18px; border-radius: 6px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn.secondary { background: var(--surface); color: var(--primary);
  border: 1px solid var(--primary); }
.btn.danger { background: var(--crit); }
.btn.sm { padding: 5px 12px; font-size: 13px; }

input, select, textarea {
  font-family: inherit; font-size: 14px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  color: var(--ink);
}
textarea { width: 100%; resize: vertical; }
label.fld { display: block; font-size: 13px; color: var(--ink-2); margin: 12px 0 4px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.filters form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.messages { margin: 0 0 16px; padding: 0; list-style: none; }
.messages li {
  padding: 11px 14px; border-radius: 6px; margin-bottom: 8px; font-size: 14px;
  background: var(--info-bg); border: 1px solid var(--info); color: var(--info);
}
.messages li.success { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.messages li.error { background: var(--crit-bg); border-color: var(--crit); color: var(--crit); }

.banner {
  padding: 11px 14px; border-radius: 6px; font-size: 13.5px; margin-bottom: 16px;
  background: var(--warn-bg); border: 1px solid var(--warn); color: var(--warn);
}
.kv { font-size: 14px; }
.kv dt { color: var(--ink-2); font-size: 12px; text-transform: uppercase;
  letter-spacing: .5px; margin-top: 10px; }
.kv dd { margin: 1px 0 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { border-left: 2px solid var(--line); padding: 0 0 14px 14px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--primary);
}
.timeline .when { font-size: 12px; color: var(--ink-2); }
.timeline .what { font-size: 14px; }

/* ---- Login & MFA ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 16px; }
.login-card { background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 36px 40px; width: 100%; max-width: 420px;
  box-shadow: 0 8px 30px var(--shadow); text-align: center; }
.login-card .logo { width: 170px; margin: -20px auto 0; display: block; }
[data-theme="dark"] .login-card .logo {
  background: #fff; border-radius: 14px; padding: 10px 16px;
  width: 150px; margin: -14px auto 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .4);
}
.login-card .name { color: var(--primary); font-size: 26px; font-weight: 700;
  letter-spacing: 1px; }
.login-card .tag { color: var(--ink-2); font-size: 13px; margin-bottom: 20px; }
.login-card form { text-align: left; }
.login-card input { width: 100%; margin-bottom: 12px; padding: 11px 12px; }
.login-card .btn { width: 100%; padding: 11px; }

/* ---- Helpers ---- */
.mono { font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.hidden { display: none; }
.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.asof { font-size: 12.5px; color: var(--ink-2); }
h1.page { font-size: 20px; margin: 0 0 4px; }
p.lede { margin: 0 0 14px; color: var(--ink-2); font-size: 12.5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.explain {
  background: var(--panel); border-radius: 6px; padding: 10px 12px;
  font-size: 13px; color: var(--ink-2); margin-top: 8px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid var(--primary); border-radius: 999px;
  padding: 3px 10px; font-size: 13px; font-weight: 700;
}
.chip .chip-x {
  background: none; border: none; color: var(--primary); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0; font-family: inherit;
}
.bell {
  position: relative; display: inline-flex; align-items: center;
  color: var(--ink-2); padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--surface);
}
.bell:hover { color: var(--primary); border-color: var(--primary); }
.bell .badge {
  position: absolute; top: -7px; right: -7px; background: var(--primary);
  color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px;
  padding: 1px 6px; min-width: 18px; text-align: center;
}
.theme-toggle {
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer;
  font-family: inherit;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* table pagination bar */
.pager { display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pager .row { display: flex; align-items: center; gap: 8px; }
.pager select { padding: 4px 8px; }
/* Attend Device panel (details/summary, no script needed) */
details.attend > summary { list-style: none; cursor: pointer; display: flex;
  align-items: center; gap: 12px; flex-wrap: wrap; }
details.attend > summary::-webkit-details-marker { display: none; }
details.attend[open] > summary .btn { background: var(--primary-dark); }
details.attend .attend-h { font-size: 13px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--ink-2); margin: 18px 0 8px; }
/* Performance analytics */
.perf-views { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.perf-view { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 13.5px; text-decoration: none; }
.perf-view.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.perf-filters { align-items: center; }
.perf-filters select, .perf-filters input[type="date"] { max-width: 190px; }
.perf-bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.perf-band { display: grid; gap: 4px; padding: 12px; border-radius: var(--radius);
  background: var(--panel); color: var(--ink); text-decoration: none; }
.perf-band:hover { outline: 1px solid var(--line); }
.perf-n { color: var(--figure); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.perf-bars { display: grid; gap: 4px; }
.perf-bar { display: grid; grid-template-columns: minmax(150px, 260px) minmax(80px, 1fr) 130px;
  gap: 10px; align-items: center; padding: 5px 6px; border-radius: 6px;
  color: var(--ink); text-decoration: none; font-size: 13.5px; }
.perf-bar:hover { background: var(--row-hover); }
.perf-bar .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perf-bar .trk { height: 12px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.perf-bar .fil { display: block; height: 100%; border-radius: 3px; }
.perf-bar .fil.ok { background: var(--ok); }
.perf-bar .fil.warn { background: var(--warn); }
.perf-bar .fil.crit { background: var(--crit); }
.perf-bar .val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12.5px; }
.perf-bar .asof { grid-column: 1 / -1; padding-left: 2px; }
.perf-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.perf-kv > * { display: grid; gap: 4px; padding: 10px; border-radius: var(--radius);
  background: var(--panel); color: var(--ink); text-decoration: none; }
.perf-kv b { font-size: 22px; font-variant-numeric: tabular-nums; }
.perf-chart svg { width: 100%; height: auto; max-height: 260px; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--ink-2); font-size: 11px; font-family: Verdana, Geneva, sans-serif; }
.perf-legend { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.perf-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.perf-legend .sw.ok { background: var(--ok); }
.perf-legend .sw.crit { background: var(--crit); }
.perf-pre { background: var(--panel); padding: 10px 12px; border-radius: 6px; }
@media (max-width: 700px) {
  .perf-bar { grid-template-columns: 1fr 90px; }
  .perf-bar .trk { grid-column: 1 / -1; grid-row: 2; }
}
/* Assurance gap board */
.gap-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gap-card { display: grid; gap: 4px; align-content: start; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--ink); text-decoration: none; }
.gap-card:hover, .gap-chip:hover { border-color: var(--primary); }
.gap-card.on, .gap-chip.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.gap-card .gc-tool { font-weight: 700; color: var(--title); }
.gap-card .gc-src, .gap-card .gc-meta { font-size: 11.5px; color: var(--ink-2); }
.gap-card .gc-n { color: var(--figure); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gap-card .gc-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.gap-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gap-chip { display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--ink); text-decoration: none; }
.gap-chip b { font-variant-numeric: tabular-nums; }
.gap-bulk { margin-bottom: 10px; }
.gap-pick { display: block; padding: 2px; cursor: pointer; }.tool-chip { margin: 1px 2px 1px 0; font-size: 11px; padding: 1px 6px; }
/* Device class coverage cards (Asset Register, COVRA dashboard) */
.class-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px; margin-bottom: 18px; }
.class-card { display: grid; gap: 6px; align-content: start; padding: 14px;
  border: 1px solid var(--line); border-top: 4px solid var(--line);
  border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.class-card.tone-ok { border-top-color: var(--ok); }
.class-card.tone-warn { border-top-color: var(--warn); }
.class-card.tone-crit { border-top-color: var(--crit); }
a.class-card:hover, .class-card .cc-head:hover { color: var(--ink); }
.class-card .cc-head { display: grid; gap: 6px; color: var(--ink); text-decoration: none; }
.class-card .cc-label { font-weight: 700; color: var(--title); }
.class-card .cc-n { color: var(--figure); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.class-card .cc-bar { height: 8px; background: var(--panel); border-radius: 4px; overflow: hidden; }
.class-card .cc-fill { display: block; height: 100%; }
.class-card .cc-fill.ok { background: var(--ok); }
.class-card .cc-fill.warn { background: var(--warn); }
.class-card .cc-fill.crit { background: var(--crit); }
.class-card .cc-fill.muted { background: var(--line); }
.class-card .cc-subs { display: grid; gap: 4px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.class-card .cc-sub { display: flex; justify-content: space-between; gap: 8px; font-size: 12px;
  color: var(--ink-2); text-decoration: none; }
.class-card .cc-sub:hover { color: var(--primary); }
/* =====================================================================
   Device range: phones, tablets, workstations and wall / TV screens.
   ===================================================================== */
.nav-toggle { display: none; background: none; border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 8px; color: var(--ink); cursor: pointer; }
.nav-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 40; }
.grow { flex: 1 1 260px; min-width: 0; }
input, select, textarea, button { max-width: 100%; }

/* Tablets and small laptops: the menu becomes a slide-out drawer */
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
    transform: translateX(-105%); transition: transform .2s ease;
    overflow-y: auto; box-shadow: 0 0 24px var(--shadow); }
  body.nav-open .sidebar { transform: none; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; row-gap: 8px; }
  .content { padding: 14px 16px 32px; }
}

/* Phones */
@media (max-width: 700px) {
  html { font-size: 15px; }
  .topbar .title { font-size: 16px; flex: 1 1 60%; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .spacer { display: none; }
  .userchip { width: 100%; text-align: left; display: flex; flex-wrap: wrap;
    gap: 6px 12px; align-items: center; }
  .userchip br { display: none; }
  .content { padding: 12px 12px 28px; }
  .panel { padding: 14px 12px; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .tile .value { font-size: 24px; }
  .filters form, .filters { width: 100%; }
  .filters form > input[type="text"], .filters form > select,
  .filters form > input[type="date"] { flex: 1 1 100%; }
  /* Touch targets and no zoom-on-focus in mobile browsers */
  .btn, button, select, input[type="text"], input[type="date"], input[type="number"],
  input[type="email"], input[type="password"], textarea { min-height: 40px; font-size: 16px; }
  .btn.sm { min-height: 36px; }
  table.data { font-size: 13px; }
  table.data th, table.data td { padding: 8px 6px; }
  .gap-cards, .class-cards { grid-template-columns: 1fr 1fr; }
  .perf-views, .tabs { overflow-x: auto; flex-wrap: nowrap; }
}
@media (max-width: 420px) {
  .gap-cards, .class-cards { grid-template-columns: 1fr; }
}

/* Wall screens and TVs: use the width, and read from across the room */
@media (min-width: 1800px) {
  .content { max-width: 1760px; }
  .grid.cols-2.wide-tv { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 2400px) {
  html { font-size: 18px; }
  .content { max-width: 2300px; }
  table.data { font-size: 16px; }
  .tile .value, .gc-n, .cc-n { font-size: 38px; }
  .sidebar { width: 280px; }
}

/* Folding tables: wide tables show their key columns by default; each row
   unfolds the rest beneath it, or the whole table unfolds at once. */
.fold-bar { display: flex; justify-content: flex-end; gap: 8px; margin: -4px 0 6px; }
table.data.folded .fold-col { display: none; }
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }@media (max-width: 480px) { .login-card { padding: 24px 18px; } }
/* Section and list folding */
.panel > h2.section-head { cursor: pointer; user-select: none; display: flex;
  align-items: baseline; gap: 6px; flex-wrap: wrap; }
.section-fold { background: none; border: 0; padding: 0 2px; min-height: 0; width: 18px;
  color: var(--ink-2); cursor: pointer; font-size: 13px; line-height: 1; }
.panel.section-collapsed > :not(h2) { display: none; }
.panel.section-collapsed { padding-bottom: 6px; }
.panel.section-collapsed > h2 { margin-bottom: 0; }
.list-folded { display: none !important; }
.list-fold-bar { display: flex; justify-content: center; margin: 8px 0 2px; }
/* ---- Data Mining ---- */
:root { --multi: #6D4BC4; --multi-bg: #F1ECFC; }
[data-theme="dark"] { --multi: #B39DFF; --multi-bg: #2A2340; }
.pill.multi { background: var(--multi-bg); color: var(--multi); }
.mining-top { margin-bottom: 12px; }
.scn-group { font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--ink-2); margin: 10px 0 6px; }
.scn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.scn-card { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); text-decoration: none; }
.scn-card b { color: var(--title); font-size: 13px; }
.scn-card span { color: var(--ink-2); font-size: 11.5px; }
.scn-card:hover, .scn-card.on { border-color: var(--title); box-shadow: inset 0 0 0 1px var(--title); }
.mining-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mining-grid label { display: block; font-size: 13px; }
.check-list { max-height: 190px; overflow: auto; border: 1px solid var(--line-soft);
  border-radius: 6px; padding: 6px 8px; }
.check-list.tall { max-height: 260px; }
.mining-grid input[type="number"] { width: 90px; }
.legend-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.lchip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px;
  color: var(--ink); text-decoration: none; }
.lchip b { margin-left: 4px; }
.lchip.on { box-shadow: inset 0 0 0 2px currentColor; }
.lchip.t-ok { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.lchip.t-crit { color: var(--crit); background: var(--crit-bg); border-color: transparent; }
.lchip.t-warn { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.lchip.t-info { color: var(--info); background: var(--info-bg); border-color: transparent; }
.lchip.t-multi { color: var(--multi); background: var(--multi-bg); border-color: transparent; }
table.mining tr.mrow td:first-child { border-left: 4px solid transparent; }
table.mining tr.t-ok td:first-child { border-left-color: var(--ok); }
table.mining tr.t-crit td:first-child { border-left-color: var(--crit); }
table.mining tr.t-warn td:first-child { border-left-color: var(--warn); }
table.mining tr.t-info td:first-child { border-left-color: var(--info); }
table.mining tr.t-multi td:first-child { border-left-color: var(--multi); }
table.mining td.cell-diff { background: var(--warn-bg); color: var(--warn); font-weight: 700; }
table.mining td.cell-na { color: var(--crit); font-weight: 700; }
.profile-type { font-variant: small-caps; color: var(--title); }
@media (max-width: 1100px) { .mining-grid { grid-template-columns: 1fr; } }
details.scn-panel > summary { list-style: none; cursor: pointer; }
details.scn-panel > summary::-webkit-details-marker { display: none; }
details.scn-panel > summary h2 { display: inline-block; margin-bottom: 0; }
details.scn-panel > summary h2::after { content: " ▸"; color: var(--ink-2); }
details.scn-panel[open] > summary h2::after { content: " ▾"; }
details.scn-panel[open] > summary h2 { margin-bottom: 8px; }
.mining-grid .row label { display: inline; }
