:root {
  --bg:        #0d1117;
  --bg-panel:  #161b22;
  --bg-soft:   #21262d;
  --fg:        #d4dce5;
  --fg-muted:  #9aa6b2;
  --fg-bright: #f0f6fc;
  --border:    #3a424d;
  --border-2:  #21262d;
  --accent:    #58a6ff;
  --crit:      #f85149;
  --high:      #ff7b72;
  --med:       #d29922;
  --low:       #56d364;
  --info:      #79c0ff;
  --supp:      #6e7681;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* nav */
nav { background: var(--bg-panel); border-bottom: 1px solid var(--border);
  padding: 10px 18px; display: flex; align-items: center; gap: 22px; }
nav .brand { color: var(--fg-bright); font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: baseline; gap: 6px;
  padding-right: 18px; border-right: 1px solid var(--border); }
nav .brand-sub { color: var(--fg-muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
@media (max-width: 720px) {
  nav .brand-sub { display: none; }
  nav .brand { border-right: none; padding-right: 0; }
}
nav .links { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
nav .links a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--fg);                /* was --fg-muted: brighter inactive text */
  padding: 7px 11px 8px;
  border-radius: 6px 6px 0 0;
  font-size: 13.5px;
  line-height: 1;
  position: relative;
  border-bottom: 2px solid transparent;   /* reserves space for the accent */
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
nav .links a:hover {
  color: var(--fg-bright);
  background: var(--bg-soft);
  border-bottom-color: rgba(88,166,255,0.4);
}
nav .links a.active {
  color: var(--fg-bright);
  font-weight: 600;
  background: rgba(88,166,255,0.12);
  border-bottom-color: var(--accent);     /* clear accent underline */
}
/* Nav icons inherit link color via currentColor; dim slightly when inactive
   so the active item's icon visibly brightens. */
.nav-ic { flex: 0 0 auto; opacity: .75; transition: opacity .12s ease; }
nav .links a:hover .nav-ic,
nav .links a.active .nav-ic,
nav .navdrop > summary:hover .nav-ic,
nav .navdrop > summary.active .nav-ic { opacity: 1; }

nav .right { margin-left: auto; color: var(--fg-muted); font-size: 12px;
  display: flex; align-items: center; gap: 4px; }
nav .right .muted { margin-right: 6px; }
nav .right a { padding: 5px 9px; border-radius: 6px; color: var(--fg);
  transition: background .12s ease, color .12s ease; }
nav .right a:hover { color: var(--fg-bright); background: var(--bg-soft); }

/* Admin nav dropdown (pure <details>, no JS). Summary styled like a nav
   pill; menu floats below as a bordered panel. */
nav .navdrop { position: relative; display: inline-block; }
nav .navdrop > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--fg);
  padding: 7px 11px 8px; border-radius: 6px 6px 0 0;
  font-size: 13.5px; line-height: 1;
  border-bottom: 2px solid transparent;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
nav .navdrop > summary::-webkit-details-marker { display: none; }
nav .navdrop > summary:hover { color: var(--fg-bright); background: var(--bg-soft);
  border-bottom-color: rgba(88,166,255,0.4); }
nav .navdrop > summary.active {
  color: var(--fg-bright);
  font-weight: 600;
  background: rgba(88,166,255,0.12);
  border-bottom-color: var(--accent);
}
nav .navdrop[open] > summary { color: var(--fg-bright); background: var(--bg-soft); }
nav .navdrop-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 50;
  min-width: 184px; padding: 5px;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 9px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  display: flex; flex-direction: column; gap: 2px;
}
nav .navdrop-menu a {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--fg); padding: 8px 12px; border-radius: 6px;
  font-size: 13.5px; line-height: 1; white-space: nowrap; margin: 0;
  border-left: 2px solid transparent;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
nav .navdrop-menu a:hover { color: var(--fg-bright); background: var(--bg-soft); }
nav .navdrop-menu a.active {
  color: var(--fg-bright); font-weight: 600;
  background: rgba(88,166,255,0.12);
  border-left-color: var(--accent);
}

/* Reusable subtab bar (page-level sub-navigation, e.g. Logs sources,
   Scans All/Android/Multi, nav-group subtabs). 2026.07.142: made visibly
   distinct so grouped pages are easy to recognize — accent top edge on the
   bar, larger pills, and a high-contrast active pill with an accent glow. */
.subtab-bar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 0 0 18px; padding: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.subtab-bar a {
  color: var(--fg-muted); padding: 8px 18px; border-radius: 7px;
  font-size: 14px; font-weight: 600; line-height: 1;
  border: 1px solid transparent;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.subtab-bar a:hover {
  color: var(--fg-bright); background: var(--bg-soft);
  border-color: var(--border);
}
.subtab-bar a.active {
  color: #fff; background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 2px 8px rgba(88,166,255,.35);
}
.subtab-bar .sep { flex: 1; }

/* Page-level tabs with an accent underline (Maintenance Overview/Database/…).
   Higher-contrast than the old subtab pills; the active tab gets a solid
   accent underline and brighter, heavier text so the current section is
   unmistakable. */
.page-tabs {
  display: flex; flex-wrap: wrap; gap: 2px;
  border-bottom: 1px solid var(--border);
  margin: 0 0 20px;
}
.page-tabs .page-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px 10px;
  color: var(--fg-muted);
  font-size: 14px; font-weight: 500; line-height: 1;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;            /* sit the underline on the bar's border */
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.page-tabs .page-tab .nav-ic { opacity: .7; transition: opacity .12s ease; }
.page-tabs .page-tab:hover {
  color: var(--fg-bright);
  background: var(--bg-soft);
  border-bottom-color: rgba(88,166,255,0.4);
}
.page-tabs .page-tab:hover .nav-ic { opacity: 1; }
.page-tabs .page-tab.active {
  color: var(--fg-bright);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.page-tabs .page-tab.active .nav-ic { opacity: 1; }
.subtab-bar .label { color: var(--fg-muted); font-size: 12px;
  padding: 0 8px; text-transform: uppercase; letter-spacing: .04em; }

main { max-width: 1850px; margin: 0 auto; padding: 18px; }
html.app-wide main { max-width: none; }
nav .right .width-toggle { background: transparent; border: 1px solid var(--border); color: var(--fg-muted); border-radius: 6px; padding: 3px 9px; font-size: 13px; line-height: 1.2; cursor: pointer; margin-right: 6px; }
nav .right .width-toggle:hover { color: var(--fg-bright); background: var(--bg-soft); }
nav .right .width-toggle.on { color: var(--accent); border-color: var(--accent); }

h1 { font-size: 20px; font-weight: 600; margin: 0 0 14px; color: var(--fg-bright); }
h2 { font-size: 16px; font-weight: 600; margin: 22px 0 10px; color: var(--fg-bright); }

/* tables */
table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 13px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border-2); }
/* 2026.07.145: column headers brightened globally — they were muted/small
   and hard to pick out against the rows they label. */
th { background: var(--bg-soft); color: var(--fg-bright, var(--fg)); font-weight: 700;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 2px solid var(--accent) !important; }
tr:hover td { background: var(--bg-panel); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mono, code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* forms */
form.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: var(--bg-panel); border: 1px solid var(--border); padding: 10px;
  border-radius: 6px; margin-bottom: 14px; }
input[type=text], input[type=password], input[type=date], select, textarea {
  background: var(--bg); border: 1px solid var(--border); color: var(--fg);
  padding: 6px 9px; border-radius: 4px; font: inherit; min-width: 0; }
input[type=text]:focus, input[type=password]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); }
button, .btn { background: var(--bg-soft); color: var(--fg); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 4px; cursor: pointer; font: inherit; }
button:hover, .btn:hover { background: var(--border); }
button.primary { background: var(--accent); color: #0d1117; border-color: var(--accent); }
button.primary:hover { background: #4493f8; }
button.danger { background: var(--crit); color: #0d1117; border-color: var(--crit); }

/* severity pills */
.pill { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 11px;
  font-weight: 500; letter-spacing: 0.03em; }
.pill-CRITICAL { background: rgba(248,81,73,0.15); color: var(--crit); }
.pill-HIGH     { background: rgba(255,123,114,0.15); color: var(--high); }
.pill-MEDIUM   { background: rgba(210,153,34,0.15); color: var(--med); }
.pill-LOW      { background: rgba(86,211,100,0.15); color: var(--low); }
.pill-INFO     { background: rgba(121,192,255,0.15); color: var(--info); }
/* Triage status pills */
.pill-CONFIRMED    { background: rgba(248,81,73,0.15); color: var(--crit); }
.pill-LIKELY_TP    { background: rgba(255,123,114,0.15); color: var(--high); }
.pill-NEEDS_REVIEW { background: rgba(210,153,34,0.15); color: var(--med); }
.pill-LIKELY_FP    { background: rgba(110,118,129,0.15); color: var(--supp); }
.pill-SUPPRESS     { background: rgba(110,118,129,0.15); color: var(--supp); }
/* LLM action pills (legacy + still used in finding detail) */
.pill-CONFIRM  { background: rgba(248,81,73,0.15); color: var(--crit); }
.pill-FP       { background: rgba(110,118,129,0.15); color: var(--supp); }
.pill-CONTEXT  { background: rgba(210,153,34,0.15); color: var(--med); }
.pill-DOWNGRADE { background: rgba(210,153,34,0.15); color: var(--med); }

/* sortable table headers */
table th.sortable { cursor: pointer; user-select: none; }
table th.sortable:hover { color: var(--fg-bright); }
table th.sortable::after { content: " \2195"; opacity: 0.4; font-size: 11px; }
table th.sortable.sort-asc::after { content: " \25B2"; opacity: 1; }
table th.sortable.sort-desc::after { content: " \25BC"; opacity: 1; }

/* P15a: manual override visuals */
.strike-orig {
  text-decoration: line-through;
  opacity: 0.55;
  font-size: 90%;
  margin-right: 6px;
}
.override-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(88, 166, 255, 0.18);
  color: var(--accent);
  margin-left: 6px;
  cursor: help;
}
.override-badge.override-confirm {
  background: rgba(110, 118, 129, 0.18);
  color: var(--muted);
}
.override-badge.override-suggested {
  background: rgba(210, 153, 34, 0.18);
  color: var(--med);
}
tr.overridden-row {
  background: rgba(88, 166, 255, 0.035);
}
.suggested-banner {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  background: rgba(210, 153, 34, 0.10);
  color: var(--med);
  border-radius: 3px;
  font-size: 12px;
}
.card.suggested-card {
  border-left: 4px solid var(--med);
  background: rgba(210, 153, 34, 0.04);
}

/* P15d: bulk-action toolbar + select helpers */
.bulk-bar {
  position: sticky;
  top: 8px;
  z-index: 60;
  /* 2026.07.143: solid opaque background + strong accent frame — the bar
     floats over finding rows while sticky, and the old panel background let
     the content bleed through ("barely visible"). */
  background: var(--bg-deep, #0d1117);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 10px 0;
  box-shadow: 0 0 0 1px rgba(88,166,255,.35), 0 6px 24px rgba(0,0,0,.65);
}
.bulk-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.bulk-row:last-child { margin-bottom: 0; }
.bulk-row label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--muted);
  gap: 2px;
}
.bulk-count {
  font-weight: 600;
  color: var(--accent);
  font-size: 14px;
}
.select-helpers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin: 8px 0;
  padding: 6px 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 4px;
}
.btn.small {
  padding: 2px 8px;
  font-size: 11px;
}

/* P16: maintenance + danger styles */
.btn.btn-danger {
  background: rgba(248, 81, 73, 0.12);
  color: var(--crit);
  border-color: rgba(248, 81, 73, 0.4);
}
.btn.btn-danger:hover {
  background: rgba(248, 81, 73, 0.22);
}
.kvtable {
  width: auto;
  margin: 8px 0;
}
.kvtable th {
  text-align: left;
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
  padding: 3px 16px 3px 0;
  border: none;
  background: transparent;
}
.kvtable td {
  padding: 3px 0;
  border: none;
}
.op-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.op-grid form {
  display: flex;
  gap: 12px;
  align-items: center;
}
.op-grid form button { min-width: 160px; }
.dform {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 4px;
}
.dform label { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.dform label.cb { font-size: 12px; color: var(--muted); }
.dform input[type=text], .dform input[type=number] {
  padding: 4px 8px;
  width: auto;
}
.dform button { align-self: flex-start; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin: 0 0 16px; }
.tile { background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 6px; padding: 12px 14px; }
.tile .label { color: var(--fg-muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.05em; }
.tile .value { color: var(--fg-bright); font-size: 22px; font-weight: 600;
  margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile.crit  .value { color: var(--crit); }
.tile.high  .value { color: var(--high); }
.tile.med   .value { color: var(--med); }

/* card */
.card { background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 6px; padding: 14px 16px; margin-bottom: 14px; }
.card h2:first-child { margin-top: 0; }
.muted { color: var(--fg-muted); }
.small { font-size: 12px; }

/* logs */
.log-pane { background: #010409; border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 12px; font-family: ui-monospace, monospace; font-size: 12px;
  line-height: 1.4; max-height: 70vh; overflow-y: auto; white-space: pre-wrap;
  word-break: break-word; }

/* login */
.login-box { max-width: 380px; margin: 80px auto; padding: 28px;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; }
.login-box h1 { text-align: center; margin-bottom: 4px; }
.login-box .login-sub { text-align: center; margin: 0 0 18px 0; }
.login-box input { width: 100%; }
.login-box button { width: 100%; margin-top: 12px; }
.error { background: rgba(248,81,73,0.1); border: 1px solid var(--crit);
  color: var(--crit); padding: 8px 10px; border-radius: 4px; margin-bottom: 12px; }
.success { background: rgba(86,211,100,0.1); border: 1px solid var(--low);
  color: var(--low); padding: 8px 10px; border-radius: 4px; margin-bottom: 12px; }

/* finding detail */
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; margin: 12px 0; }
.kv dt { color: var(--fg-muted); font-size: 12px; }
.kv dd { margin: 0; font-size: 13px; word-break: break-word; }

/* embed frame */
iframe.report-embed { width: 100%; height: 80vh; border: 1px solid var(--border);
  border-radius: 6px; background: #fff; }

.crumbs { font-size: 12px; color: var(--fg-muted); margin-bottom: 8px; }
.crumbs a { color: var(--fg-muted); }
.crumbs a:hover { color: var(--accent); }

/* ─── AI assistant panel ─── */
.ai-panel summary { cursor: pointer; padding: 4px 0; }
.ai-panel .ai-quick-prompts {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
.ai-quick-btn { font-size: 11px; padding: 4px 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--fg-muted); border-radius: 4px; cursor: pointer; }
.ai-quick-btn:hover { background: rgba(255,255,255,0.08); color: var(--fg); }

.ai-history { display: flex; flex-direction: column; gap: 10px;
  max-height: 600px; overflow-y: auto; padding: 4px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-deep); }
.ai-msg { padding: 10px 14px; border-radius: 6px; }
.ai-msg-user { background: rgba(82,143,255,0.06);
  border-left: 3px solid var(--accent); }
.ai-msg-assistant { background: rgba(255,255,255,0.02);
  border-left: 3px solid var(--low); }
.ai-msg-error { background: transparent; padding: 0; }
.ai-msg-meta { font-size: 11px; color: var(--fg-muted); margin-bottom: 4px; }
.ai-msg-body { font-size: 13px; line-height: 1.5; }
.btn-sm { font-size: 11px; padding: 3px 8px; }

/* htmx pending-request indicators
 * .htmx-indicator is hidden by default; visible while a request is
 * in flight (htmx adds .htmx-request to the source element). */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: block; }
.ai-thinking { animation: ai-pulse 1.6s ease-in-out infinite; }
@keyframes ai-pulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1.0; }
}

/* AI assistant: per-message actions (e.g. "Use as override reason") */
.ai-msg-actions {
  margin-top: 6px;
  text-align: right;
}
.ai-msg-actions .btn {
  font-size: 11px;
  padding: 3px 8px;
}
.ai-use-as-reason {
  opacity: 0.7;
}
.ai-use-as-reason:hover {
  opacity: 1.0;
}

/* When "Use as reason" lands, briefly flash the override card so the
   user can see where the text went. */
.ai-flash {
  animation: ai-flash-anim 1.6s ease-out;
}
@keyframes ai-flash-anim {
  0%   { box-shadow: 0 0 0 0 rgba(82,143,255,0.0); background-color: transparent; }
  20%  { box-shadow: 0 0 0 4px rgba(82,143,255,0.45); background-color: rgba(82,143,255,0.08); }
  100% { box-shadow: 0 0 0 0 rgba(82,143,255,0.0); background-color: transparent; }
}

/* Quick-prompt buttons: visibly disabled while a request is in flight */
.ai-quick-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* AI assistant: cancel button — visible only while a request is in
   flight. The form gets .htmx-request from htmx; the cancel button
   has .htmx-indicator which our existing CSS hides by default and
   shows during the request. */
#ai-cancel-btn.htmx-indicator { display: none; }
.htmx-request #ai-cancel-btn.htmx-indicator,
.htmx-request ~ #ai-cancel-btn.htmx-indicator,
form.htmx-request #ai-cancel-btn.htmx-indicator,
form.ai-streaming #ai-cancel-btn.htmx-indicator { display: inline-block; }

/* The "(cancels the wait...)" hint span next to Cancel: same toggle */
form.htmx-request span.htmx-indicator,
form.ai-streaming span.htmx-indicator { display: inline; }
form span.htmx-indicator { display: none; }

/* Streaming target: subtle indicator the text is still arriving */
#ai-streaming-target pre::after {
  content: "▍";
  animation: ai-pulse 1s steps(2) infinite;
  margin-left: 2px;
  opacity: 0.5;
}

/* Context debug pane */
.ai-context-debug summary:hover { color: var(--fg); }
.ai-context-block pre {
  font-family: 'SF Mono', Menlo, Monaco, 'Courier New', monospace;
}

/* Scan progress graph (running tab + /track) */
@keyframes appsec-pulse {
  0%   { opacity: 1; }
  50%  { opacity: 0.35; }
  100% { opacity: 1; }
}
.pulse-dot { animation: appsec-pulse 1.2s ease-in-out infinite; display:inline-block; }
.progress-row td { background: var(--bg-soft, rgba(127,127,127,0.04)); }
@media (prefers-reduced-motion: reduce) {
  .pulse-dot { animation: none; }
}

/* Severity-summary toggle (scan detail): Initial-triage vs AI-adjusted. */
.sevsum-toggle { display: inline-flex; border: 1px solid var(--border);
  border-radius: 7px; overflow: hidden; }
.sevsum-btn { background: transparent; color: var(--fg-muted); border: none;
  padding: 5px 12px; font-size: 12.5px; cursor: pointer; line-height: 1.4;
  transition: background .12s ease, color .12s ease; }
.sevsum-btn + .sevsum-btn { border-left: 1px solid var(--border); }
.sevsum-btn:hover { color: var(--fg-bright); background: var(--bg-soft); }
.sevsum-btn.active { background: var(--accent); color: #fff; font-weight: 600; }

/* ── Print / Save-as-PDF ──────────────────────────────────────────────
 * The app is dark-themed; without this, light text prints invisibly on
 * white (browsers drop backgrounds by default). Flip the neutral palette
 * to light for print, darken the severity accents so they stay legible on
 * paper, hide interactive chrome, and let the findings tables print in full
 * (their on-screen scroll window would otherwise clip the printout). The
 * active tab is what prints — switch tabs to choose what the PDF contains. */
@media print {
  :root {
    --bg:#fff; --bg-panel:#fff; --bg-soft:#f4f4f4;
    --fg:#111; --fg-muted:#555; --fg-bright:#000;
    --border:#ccc; --border-2:#ddd; --accent:#0b5cad;
    --crit:#b00020; --high:#c0392b; --med:#9a6700; --low:#2e7d32;
    --info:#0b5cad; --supp:#666;
  }
  html, body { background:#fff !important; color:#111 !important; }
  /* Hide app chrome that doesn't belong in a printed assessment. */
  nav, .crumbs, .ar-tabs, .ar-actions, form.toolbar, #bulk-bar,
  #select-helpers, .danger-zone, .navdrop, button.btn, a.btn,
  .sortable::after { display:none !important; }
  /* Print the full tables, not just the on-screen scroll window. */
  .ar-tblwrap, .mb-tblwrap { max-height:none !important; overflow:visible !important;
    border:none !important; }
  .ar-tbl th { position:static !important; }   /* sticky headers break paging */
  .card { box-shadow:none !important; break-inside:avoid; }
  .ar-tbl tr, .mb-findtbl tr { break-inside:avoid; }
  a { color:#111 !important; text-decoration:none !important; }
}

/* ── Collapsible (<details>) affordance ──────────────────────────────
   A prominent, consistent arrow on every content collapsible so users
   instantly recognize the fold/unfold feature. Nav dropdowns (.navdrop)
   keep their own styling. */
details:not(.navdrop) > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}
details:not(.navdrop) > summary::-webkit-details-marker { display: none; }
details:not(.navdrop) > summary::before {
  content: '\25B8';                 /* ▸ */
  display: inline-block;
  margin-right: 8px;
  color: var(--accent);
  font-weight: 900;
  font-size: 1.05em;
  line-height: 1;
  transition: transform .15s ease;
}
details:not(.navdrop)[open] > summary::before { transform: rotate(90deg); }
details:not(.navdrop) > summary:hover::before { filter: brightness(1.35); }
