:root {
  --navy: #12294b;
  --navy-light: #1d3f6e;
  --accent: #b8933f;
  --bg: #f4f6f9;
  --card: #ffffff;
  --border: #d9dfe7;
  --text: #1c2733;
  --muted: #66738a;
  --low: #1e7d46;
  --medium: #b07d1d;
  --high: #b3261e;
  --radius: 8px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
header.topbar {
  background: var(--navy);
  color: #fff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  /* header stays reachable while scrolling a long profile (user spec 2026-08-20) */
  position: sticky;
  top: 0;
  z-index: 200;
}
header.topbar h1 { font-size: 17px; margin: 0; font-weight: 600; letter-spacing: 0.02em; }
header.topbar img.logo { height: 30px; }
header.topbar .brand { color: var(--accent); font-weight: 700; }
header.topbar a { color: #cdd8ea; text-decoration: none; font-size: 13px; }
main { max-width: min(96vw, 1720px); margin: 24px auto; padding: 0 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
}
button, .btn {
  background: var(--navy);
  border: 1px solid var(--navy);
  color: #fff;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
}
a.btn { text-decoration: none; display: inline-block; }
button.secondary { background: #fff; color: var(--navy); }
button.small { padding: 3px 9px; font-size: 12px; }
button:disabled { opacity: 0.5; cursor: default; }
input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
textarea { resize: vertical; min-height: 54px; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
table.list th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
table.list tr.rowlink { cursor: pointer; }
table.list tr.rowlink:hover { background: #eef2f8; }
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.low { background: #e2f3e9; color: var(--low); }
.badge.medium { background: #f9efd9; color: var(--medium); }
.badge.high { background: #fbe4e2; color: var(--high); }
.badge.neutral { background: #e8ecf2; color: var(--muted); }
.badge.status-not_started { background: #f0f2f5; color: #8b94a5; }
.badge.status-in_progress { background: #e8ecf2; color: var(--muted); }
.badge.status-qc_review { background: #f0e4fb; color: #6d34a8; }
.badge.status-qc_rejected { background: #fbe4e2; color: var(--high); }
.badge.status-qc_approved { background: #e6f0e9; color: #2c7a4b; }
.badge.status-qc_pending { background: #f9efd9; color: var(--medium); }
.badge.status-senior_review { background: #ddeafd; color: #1d54a8; }
.badge.status-senior_rejected { background: #fbe4e2; color: var(--high); }
.badge.status-senior_approved { background: #e2f3e9; color: var(--low); }
.badge.status-senior_exception { background: #fdeed9; color: #a85f1d; }
.badge.status-suspended { background: #fdf3d7; color: #8a5a00; }
.badge.status-offboarded { background: #e3e6eb; color: #5a6474; }
.rstep.off .dot { background: #e3e6eb; color: #5a6474; }
.rstep.off .rnote { color: #5a6474; }
.mrdot.off { background: #8b94a5; }
/* legacy statuses (old audit records) */
.badge.status-draft { background: #e8ecf2; color: var(--muted); }
.badge.status-submitted { background: #ddeafd; color: #1d54a8; }
.badge.status-edd_required { background: #f9efd9; color: var(--medium); }
.badge.status-approved { background: #e2f3e9; color: var(--low); }
.badge.status-rejected { background: #fbe4e2; color: var(--high); }
.badge.status-refresh_due { background: #fdeed9; color: #a85f1d; }
.status-reason-banner { margin-top: 10px; padding: 8px 12px; border-radius: 6px; font-size: 13px; border: 1px solid; }
.status-reason-banner.rejected { background: #fbe4e2; border-color: #eec4c1; color: #7c2620; }
.status-reason-banner.exception { background: #fdeed9; border-color: #eed6ad; color: #7c4a12; }
.status-reason-banner .muted { color: inherit; opacity: 0.75; }
.status-reason-cell { font-size: 11.5px; max-width: 200px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.issues-panel { margin-top: 10px; padding: 8px 12px; border-radius: 6px; font-size: 13px; border: 1px solid #e7d99a; background: #fffbe9; }
/* RCF highlight ticker — scrolling ribbon under the topbar */
.ticker { background: var(--navy-light); border-bottom: 2px solid var(--accent); overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; align-items: center; gap: 42px; padding: 8px 0; animation: ticker-scroll 40s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tick-item { display: inline-flex; align-items: baseline; gap: 8px; color: #cdd8ea; font-size: 13px; letter-spacing: 0.02em; }
.tick-item .tick-num { color: #fff; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tick-item .tick-icon { font-size: 14px; }
.tick-sep { color: var(--accent); font-weight: 700; }
.guide-toc { background: #f8f9fb; border: 1px solid var(--border); border-radius: 6px; padding: 12px 16px; margin-bottom: 18px; }
.guide-h { color: var(--navy); border-bottom: 2px solid var(--accent); padding-bottom: 5px; margin: 26px 0 10px; font-size: 16px; }
.guide-p { line-height: 1.55; margin: 8px 0; }
.guide-fig { margin: 14px 0 22px; }
.guide-fig img { max-width: 100%; border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 3px 12px rgba(18,41,75,.10); }
.guide-callouts { margin: 8px 0 0 20px; padding: 0; font-size: 12.5px; color: var(--muted); }
.guide-callouts li { margin: 2px 0; }
.guide-callouts li::marker { color: var(--accent); font-weight: 700; }
.guide-badge { position: absolute; z-index: 40; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; border: 2px solid var(--accent); font: 700 14px/22px "Segoe UI", sans-serif; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.35); pointer-events: none; }
.issue-link { cursor: pointer; padding: 1px 0; }
.issue-link:hover { color: var(--navy); text-decoration: underline; }
.flash-field { animation: flash-field 2.2s ease-out; border-radius: 6px; }
@keyframes flash-field {
  0% { background: #fdf3cd; box-shadow: 0 0 0 3px #e7c96a; }
  70% { background: #fdf3cd; box-shadow: 0 0 0 3px #e7c96a55; }
  100% { background: transparent; box-shadow: none; }
}
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type="text"] { max-width: 260px; }
.toolbar select { max-width: 180px; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 18px; }
.tabs button {
  background: none; border: none; color: var(--muted);
  padding: 9px 16px; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tabs button.active { color: var(--navy); font-weight: 600; border-bottom-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 340px 1fr 34px; gap: 10px; align-items: start; padding: 6px 0; }
.form-row label.q { padding-top: 7px; line-height: 1.35; font-weight: 600; }
.form-row.indent label.q { padding-left: 28px; font-weight: 500; }
.multi-checks { display: grid; gap: 2px; padding-top: 5px; }
.multi-checks .check-row { font-weight: 400; }
.form-section {
  font-weight: 600; color: var(--navy);
  margin: 18px 0 4px; padding: 8px 0 4px; border-bottom: 1px solid var(--border);
}
.check-row { display: flex; gap: 8px; align-items: center; padding: 2px 0 2px 8px; }
.meta-toggle {
  background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 6px; width: 30px; height: 30px; font-size: 13px; padding: 0;
}
.meta-toggle.has-meta { border-color: var(--accent); color: var(--accent); }
.meta-panel {
  grid-column: 2 / 4;
  background: #f8f9fb; border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 12px; margin-top: 4px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.meta-panel label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 3px; }
.meta-panel .full { grid-column: 1 / 3; }
/* collection-only fields: verification column grayed out */
.meta-panel .verif-na { opacity: 0.55; }
.meta-panel .verif-na .multi-toggle { cursor: not-allowed; background: #eceef2; }
/* instruction line pinned at the top of a sources dropdown panel */
.multi-panel .multi-note {
  font-size: 12px; color: var(--navy); background: #eef3fa;
  padding: 6px 8px; border-radius: 5px; margin: 2px 2px 6px; font-style: italic;
}
/* long multi-selects (country lists) scroll inside their panel */
.multi-panel.scrollable { max-height: 260px; overflow-y: auto; }
.attr-multi-dd { position: relative; min-width: 0; }
.attr-multi-dd .multi-toggle { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* DDQ S2-11 transaction grids */
.tx-grid { width: 100%; border-collapse: collapse; }
.tx-grid th { background: var(--navy); color: #fff; font-size: 12px; text-align: left; padding: 7px 10px; }
.tx-grid td { border-bottom: 1px solid var(--border); padding: 7px 10px; vertical-align: middle; }
.tx-grid input[type="text"] { max-width: 220px; }
.tx-denom { display: inline-flex; align-items: center; gap: 3px; margin-right: 10px; font-size: 12.5px; white-space: nowrap; }
/* Currency Reserve Visit records */
.visits-editor { display: flex; flex-direction: column; gap: 6px; }
.visit-rec { display: grid; grid-template-columns: 150px 120px 1fr 28px; gap: 6px; align-items: center; }
.visit-del { border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; color: var(--muted); }
.visit-del:hover { color: var(--high); }
.visit-add { align-self: flex-start; }
/* per-person PEP / Source of Wealth editor */
.pep-editor { border-left: 3px solid var(--accent); background: #fbf8f1; border-radius: 0 6px 6px 0; padding: 8px 12px 10px; margin: 2px 0 8px; }
.pep-title { margin-bottom: 6px; color: var(--navy); }
.pep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 14px; }
/* inputs bottom-align across a grid row even when a label wraps to two
   lines (user spec 2026-09-09) */
.pep-field { display: flex; flex-direction: column; justify-content: flex-end; }
.pep-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.pep-field input, .pep-field select { width: 100%; }
.pep-sow { margin-top: 10px; padding-top: 6px; border-top: 1px dashed var(--border); color: var(--navy); }
.attach-doc { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
/* user-guide data-dictionary tables */
.guide-table-wrap { margin: 10px 0 18px; overflow-x: auto; }
.guide-table-title { font-weight: 700; color: var(--navy); margin: 0 0 6px; font-size: 14.5px; }
.guide-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.guide-table th { background: var(--navy); color: #fff; text-align: left; padding: 6px 10px; border: 1px solid var(--navy); }
.guide-table td { border: 1px solid var(--border); padding: 5px 10px; vertical-align: top; }
.guide-table tr:nth-child(even) td { background: #f6f8fb; }
.guide-table .gt-key { font-weight: 600; color: var(--navy); white-space: nowrap; }
/* screening alerts collapse behind the hit-count badge */
.badge.clickable { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
/* section identity: pronounced headings (user spec 2026-08-27 — they must
   not blend into the questions). Main TOC sections get a filled navy band;
   sub-sections and other headings get a larger navy title with a gold rule. */
.form-section {
  font-size: 16.5px; font-weight: 700; color: var(--navy);
  border-top: none; border-bottom: 2px solid var(--accent);
  margin: 22px 0 6px; padding: 10px 0 5px;
  scroll-margin-top: 64px;
}
.form-section.toc-main {
  font-size: 19px; color: #fff; background: var(--navy);
  border-radius: 6px; border-bottom: 3px solid var(--accent);
  margin: 28px 0 8px; padding: 9px 12px;
}
.form-section.toc-main .note-mark { color: #d8e2f0; }
/* Preliminary Showstopper Questions twist-down (fred 15 follow-up) */
details.sso-details > summary.form-section {
  display: list-item; cursor: pointer;
  font-size: 19px; color: #fff; background: var(--navy);
  border-radius: 6px; border-bottom: 3px solid var(--accent);
  margin: 28px 0 8px; padding: 9px 12px 9px 14px;
}
details.sso-details > summary.form-section::marker { color: var(--accent); }
/* customizable dashboard grid (2026-09-11): fixed layout so saved column
   widths hold; drag grips on each header's right edge */
#entityTable { table-layout: fixed; width: 100%; }
#entityTable td { overflow-wrap: anywhere; }
#entityTable th { overflow-wrap: normal; word-break: keep-all; hyphens: none; line-height: 1.2; font-size: 11px; letter-spacing: 0.03em; overflow: hidden; }
/* wide custom layouts scroll INSIDE the card instead of spilling out of it */
.table-scroll { overflow-x: auto; }
/* small-screen hardening (user report 2026-09-17): the dashboard grid keeps
   its own contained scroll area — header + filter rows stick to the top with
   solid backgrounds so rows never slide visibly "behind" them, and the
   horizontal scrollbar is always reachable without scrolling the whole page */
#entityTable { position: relative; }
.card .table-scroll:has(#entityTable) { overflow: auto; max-height: calc(100vh - 230px); }
#entityTable thead th { position: sticky; top: 0; background: var(--card); z-index: 6; box-shadow: 0 1px 0 var(--border); }
#entityTable thead .grid-filter-row th { top: var(--dash-head-h, 35px); z-index: 6; background: var(--card); }
#entityTable thead th.gear-th { z-index: 8; } /* the ⚙ corner pins both ways */
/* the same treatment as a shared class — report-viewer grids, the entity
   page's screening roster, and any future long grid */
.pin-scroll { overflow: auto; max-height: calc(100vh - 240px); }
.pin-scroll table.list thead th { position: sticky; top: 0; background: var(--card); z-index: 6; box-shadow: 0 1px 0 var(--border); }
.pin-scroll table.list thead .grid-filter-row th { top: var(--head-h, 33px); z-index: 6; background: var(--card); }
#entityTable th { position: relative; }
.col-grip { position: absolute; top: 0; right: 0; width: 9px; height: 100%; cursor: col-resize; user-select: none; }
.col-grip:hover { background: var(--accent); opacity: 0.55; }
.cols-panel .col-opt { padding: 3px 8px; }
.cols-panel .col-opt button { padding: 0 6px; line-height: 1.4; }
#colsPanel { min-width: 280px; max-height: 460px; z-index: 70; }
/* the ⚙ column-chooser column pins to the card's right edge so it is always
   visible no matter how wide the customized grid scrolls */
#entityTable th.gear-th, #entityTable td.gear-td {
  position: sticky; right: 0; z-index: 5;
  background: var(--card);
  box-shadow: -6px 0 8px -6px rgba(18, 41, 75, 0.22);
}
.gear-th { text-align: center; padding: 7px 6px !important; }
.gear-th button {
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 8px; cursor: pointer; font-size: 14px; color: var(--navy);
}
.gear-th button:hover { border-color: var(--accent); background: #fdf9ef; }
/* screening history: one bordered block per subject (fred 19) */
.run-subject { margin: 6px 0 10px; padding: 4px 0 4px 12px; border-left: 3px solid var(--border); }
.run-subject > .subtle-note { margin-bottom: 4px; }
/* status column: which process the record is in (2026-09-11) */
.proc-kind { font-size: 10.5px; letter-spacing: 0.4px; text-transform: uppercase; }
.proc-kind.onboarding { color: #1d54a8; font-weight: 700; }
.proc-kind.review { color: #7a4db8; font-weight: 700; }
/* provisional-score banner on the dashboard risk cell (2026-09-17; fred 24:
   wraps inside its own column under the rating instead of overflowing) */
.prov-note {
  font-size: 11px; color: #8a5a00; background: #fdf3d7; border-radius: 4px;
  padding: 1px 6px; margin-top: 3px; display: block; max-width: 100%;
  white-space: normal; overflow-wrap: break-word; line-height: 1.25;
}

/* drag-a-header column reorder + drag-a-card layout (user request 2026-09-17) */
.report-card.card-dragging { opacity: 0.45; }
.report-card.card-drop { outline: 2px dashed #1d54a8; outline-offset: 2px; }
th.col-dragging { opacity: 0.45; }
th.col-drop-l { box-shadow: inset 3px 0 0 var(--accent, #1d54a8); }
th.col-drop-r { box-shadow: inset -3px 0 0 var(--accent, #1d54a8); }

/* lifecycle banners for decided records (user request 2026-09-17) */
.proc-kind.active { color: #2c7a4b; font-weight: 700; }
.proc-kind.rejected { color: #b3372e; font-weight: 700; }
.proc-kind.suspended { color: #8a5a00; font-weight: 700; }
.proc-kind.terminated { color: #5f6d83; font-weight: 700; }
/* divider between repeating person/entity entries (UBO (1) / (2) / …) */
.person-divider { grid-column: 1 / -1; border-top: 1px dashed var(--border); margin: 10px 0 4px; }
.jump-bar { margin: 0 0 12px; }
.jump-bar select { max-width: 420px; }

/* ---------- workflow ribbon (banknote-management pattern) ---------- */
.ribbon { display: flex; align-items: flex-start; overflow-x: auto; padding: 10px 0 6px; }
.rstep { flex: 1; min-width: 110px; text-align: center; }
.rstep .dot {
  width: 38px; height: 38px; border-radius: 50%; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; line-height: 1;
}
.rstep .dot svg { width: 19px; height: 19px; }
.waiting svg { width: 16px; height: 16px; flex: 0 0 16px; }
.badge svg { width: 12px; height: 12px; vertical-align: -2px; margin-right: 4px; }
.rstep.done .dot { background: #dff0e5; color: var(--low); }
.rstep.current .dot { background: var(--navy); color: #fff; }
.rstep.blocked .dot { background: #f8ecd8; color: var(--medium); }
.rstep.stop .dot { background: #f9e3e1; color: var(--high); }
.rstep.todo .dot { background: var(--bg); border: 1px solid var(--border); color: var(--muted); }
/* desk lanes: Analyst navy · QC gold · Senior purple — current = solid lane
   color with white icon, upcoming = light lane tint with the colored icon;
   done/blocked/stopped keep their state colors */
.rstep.current .dot.lane-analyst { background: var(--navy); color: #fff; }
.rstep.current .dot.lane-qc { background: #8a6d2a; color: #fff; }
.rstep.current .dot.lane-senior { background: #6b3f7d; color: #fff; }
.rstep.todo .dot.lane-analyst { background: #dfe7f3; border: none; color: var(--navy); }
.rstep.todo .dot.lane-qc { background: #f3ead3; border: none; color: #8a6d2a; }
.rstep.todo .dot.lane-senior { background: #efe6f2; border: none; color: #6b3f7d; }
.rstep .rt { font-size: 13.5px; font-weight: 700; margin-top: 6px; color: var(--text); }
.rstep.todo .rt { color: var(--muted); font-weight: 500; }
.rstep .rwho { font-size: 11px; color: var(--muted); }
.rstep .rnote { font-size: 11px; margin-top: 1px; }
.rstep.done .rnote { color: var(--low); }
.rstep.current .rnote { color: var(--navy); }
.rstep.blocked .rnote { color: var(--medium); }
.rstep.stop .rnote { color: var(--high); }
.rstep.todo .rnote { color: var(--muted); }
.rlink { flex: 0 0 22px; height: 2px; background: var(--border); margin-top: 28px; }
.waiting {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: 6px; margin: 4px 0 6px; font-size: 13px;
  background: #eef3fa; color: var(--navy);
}
.waiting.ok { background: #dff0e5; color: var(--low); }
.waiting.warn { background: #f8ecd8; color: var(--medium); }
.waiting.stop { background: #f9e3e1; color: var(--high); }
.waiting strong { font-weight: 700; }
.waiting .spacer { flex: 1; }
/* sortable + filterable grids */
table.list thead th.sorted-asc::after { content: " ▲"; font-size: 9px; color: var(--accent); }
table.list thead th.sorted-desc::after { content: " ▼"; font-size: 9px; color: var(--accent); }
table.list thead .grid-filter-row th { padding: 2px 6px 6px; cursor: default; }
table.list thead .grid-filter-row input {
  width: 100%; box-sizing: border-box; font-size: 12px; padding: 3px 6px;
  border: 1px solid var(--border); border-radius: 5px; background: #fff;
}
table.list thead .grid-filter-row input::placeholder { color: #b6bfcc; }
/* workflow key above the dashboard grid */
.workflow-key {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin: 0 0 8px;
}
.workflow-key .wk-step { display: inline-flex; align-items: center; gap: 5px; }
.workflow-key .wk-dot {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; background: var(--bg);
  border: 1px solid var(--border); color: var(--navy);
}
.workflow-key .wk-dot svg { width: 12px; height: 12px; }
.workflow-key .wk-sep { color: var(--border); }
.workflow-key .mrdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 3px; }
/* toolbar multi-select filters */
.filter-multi { position: relative; }
.filter-multi .multi-toggle { min-width: 150px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-multi .multi-panel { position: absolute; z-index: 60; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; box-shadow: 0 4px 14px rgba(18,41,75,.12); min-width: 200px; }
/* inline Priority editor on the dashboard */
.priority-select { max-width: 110px; font-weight: 600; }
.priority-select.prio-high { background: #fbe4e2; color: var(--high); border-color: var(--high); }
.priority-select.prio-medium { background: #f9efd9; color: var(--medium); border-color: var(--medium); }
.priority-select.prio-low { background: #e2f3e9; color: var(--low); border-color: var(--low); }
/* compact dashboard ribbon */
.mini-ribbon { display: inline-flex; align-items: center; margin-top: 3px; cursor: default; }
.mini-ribbon .mrdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.mrdot.done { background: #7fbf94; }
.mrdot.current { background: var(--navy); }
.mrdot.blocked { background: var(--medium); }
.mrdot.stop { background: var(--high); }
.mrdot.todo { background: #fff; border: 1px solid var(--border); }
/* lane colors on the mini dots too */
.mrdot.current.mlane-qc { background: #8a6d2a; }
.mrdot.current.mlane-senior { background: #6b3f7d; }
.mrdot.todo.mlane-analyst { background: #dfe7f3; border: none; }
.mrdot.todo.mlane-qc { background: #f3ead3; border: none; }
.mrdot.todo.mlane-senior { background: #efe6f2; border: none; }
/* lane tints in the workflow key */
.workflow-key .wk-dot.lane-analyst { background: #dfe7f3; color: var(--navy); border: none; }
.workflow-key .wk-dot.lane-qc { background: #f3ead3; color: #8a6d2a; border: none; }
.workflow-key .wk-dot.lane-senior { background: #efe6f2; color: #6b3f7d; border: none; }
.mini-ribbon .mrlink { width: 6px; height: 2px; background: var(--border); display: inline-block; }
.field-error { color: var(--high); font-size: 12px; margin-top: 3px; }
.req { color: var(--high); font-weight: 700; }
.guidance, .subtle-note.guidance { margin-top: 2px; font-style: italic; color: #1d54a8; }
.note-mark { cursor: help; opacity: 0.55; font-size: 0.85em; }
.multi-select { position: relative; }
.multi-toggle { width: 100%; text-align: left; background: #fff; color: inherit; border: 1px solid #c8d2e0; border-radius: 6px; padding: 6px 26px 6px 10px; font: inherit; cursor: pointer; position: relative; }
.multi-toggle::after { content: "▾"; position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.multi-toggle:disabled { background: #f2f4f8; cursor: default; }
.multi-panel { position: absolute; z-index: 30; top: calc(100% + 2px); left: 0; right: 0; max-height: 220px; overflow-y: auto; background: #fff; border: 1px solid #c8d2e0; border-radius: 6px; box-shadow: 0 6px 18px rgba(20,40,80,.15); padding: 4px; }
.multi-opt { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; cursor: pointer; font-size: 0.92em; }
.multi-opt:hover { background: #eef3fa; }
.inline-screening { margin: 4px 0 12px; padding: 8px 10px 6px; border-left: 3px solid #9db4d4; background: #f6f9fd; border-radius: 0 6px 6px 0; }
/* collapsible per-subject screening card: the description line is the
   always-visible summary; the twist-down opens the alerts beneath it */
details.inline-screening > summary { cursor: pointer; display: list-item; }
details.inline-screening > .hits-fold { margin-top: 6px; }
.hit-details { margin: 4px 0 2px; }
.hit-details summary { cursor: pointer; font-size: 0.85em; }
.hit-details-body { font-size: 0.88em; padding: 4px 0 2px 12px; display: grid; gap: 2px; overflow-wrap: anywhere; min-width: 0; }
/* small screens: the top navigation wraps instead of pushing the page wide,
   and any card whose table outgrows the viewport scrolls inside itself */
.topbar { flex-wrap: wrap; row-gap: 4px; }
.topbar > div { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 900px) {
  main .card { overflow-x: auto; }
}

/* entity header bar: wraps the moment it runs out of space AT ANY width —
   a fixed breakpoint cannot know how long the customer name is (user fix
   2026-09-25 ×2); Analyst/Status keep a hard minimum so they never crush */
.entity-headbar { flex-wrap: wrap; row-gap: 6px; }
.entity-headbar #status, .entity-headbar #analyst { min-width: 150px; flex: 0 0 auto; }
.entity-headbar > span { flex-shrink: 0; }

/* Post Onboarding stage (FED notifications) */
.po-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 10px 18px; }
.po-q label { display: block; font-weight: 600; font-size: 12.5px; color: var(--navy); margin-bottom: 3px; }
.po-q select, .po-q input, .po-q textarea { width: 100%; max-width: 420px; }
.po-q textarea { max-width: 100%; }

/* pressed-button shimmer — instant feedback while the server round-trip runs */
button.btn-busy, a.btn.btn-busy { position: relative; overflow: hidden; opacity: 0.85; cursor: progress; }
.btn-busy::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.5) 50%, transparent 80%);
  transform: translateX(-100%); animation: btn-shimmer 0.9s linear infinite;
}
@keyframes btn-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .btn-busy::after { animation: none; opacity: 0.35; } }
/* inline LexisNexis record — the SAME document users know from the PDF/full
   download: title, meta line, gold-underlined sections, grey label column */
.hit-record-body { font-size: 0.88em; padding: 8px 14px 10px; margin: 4px 0 2px 12px; max-width: 860px; background: #fff; border: 1px solid var(--border); border-radius: 6px; color: #1c2b3a; }
.hit-record-body .record-title { font-size: 1.25em; font-weight: 700; color: #12294a; }
.hit-record-body .record-meta { color: #5f6d83; font-size: 0.92em; margin-bottom: 2px; }
.hit-record-body h5 { margin: 14px 0 4px; font-size: 1.08em; font-weight: 700; color: #12294a; border-bottom: 2px solid #c8a44d; padding-bottom: 3px; }
.hit-record-body table.record-table { border-collapse: collapse; width: 100%; }
.hit-record-body th { width: 220px; text-align: left; vertical-align: top; color: #5f6d83; font-weight: 600; padding: 4px 10px 4px 0; }
.hit-record-body td { padding: 4px 0; overflow-wrap: anywhere; min-width: 0; }
.hit-record-body tr { border-bottom: 1px solid #e5eaf1; }
.hit-raw { margin: 4px 0 2px 12px; }
.hit-raw summary { cursor: pointer; font-size: 0.8em; }
.hit-raw pre { background: #f4f6fa; border: 1px solid var(--border); border-radius: 6px; padding: 8px; font-size: 11px; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; }
.score-banner { display: flex; gap: 26px; align-items: center; padding: 6px 0; }
.score-banner .score { font-size: 42px; font-weight: 700; color: var(--navy); }
.pillar { margin-bottom: 14px; }
.pillar h3 { margin: 0 0 6px; font-size: 14px; color: var(--navy); }
table.risk { width: 100%; border-collapse: collapse; font-size: 13px; }
table.risk th, table.risk td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; }
table.risk th { font-size: 11px; text-transform: uppercase; color: var(--muted); }
table.risk td.num { font-variant-numeric: tabular-nums; }
.hit { border: 1px solid var(--border); border-left: 4px solid var(--high); border-radius: 6px; padding: 10px 12px; margin: 8px 0; }
.run { border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; margin: 10px 0; }
.doc-legend { margin-left: 12px; font-size: 11.5px; }
.doc-legend .badge { font-weight: 600; padding: 1px 8px; }
.doc-checklist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.doc-checklist .badge { font-weight: 500; }
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 22px; text-align: center; color: var(--muted);
  margin: 10px 0 12px; transition: border-color 0.15s, background 0.15s;
}
.dropzone.dragover { border-color: var(--accent); background: #fdf9ef; color: var(--navy); }
.dropzone .browse { color: var(--navy); text-decoration: underline; cursor: pointer; }
.doc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 4px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.doc-row:last-child { border-bottom: none; }
.doc-row a { color: var(--navy); font-weight: 600; text-decoration: none; }
.doc-row a:hover { text-decoration: underline; }
.savebar { position: sticky; bottom: 0; background: #fffbe9; border: 1px solid #e7d99a; border-radius: 6px; padding: 10px 14px; display: none; align-items: center; gap: 14px; }
.savebar.dirty { display: flex; }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 6px; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.toast.show { opacity: 1; }
h2.pagetitle { margin: 0 0 14px; font-size: 20px; color: var(--navy); }
.subtle-note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) {
  .form-row { grid-template-columns: 1fr; }
  .meta-panel { grid-column: 1; grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* new-methodology calculator (2026-09-15) */
#rv2Form h4 { margin: 14px 0 6px; color: var(--navy); }
[data-rv2-row].rv2-missing > label { color: #b3261e; font-weight: 600; }
[data-rv2-row].rv2-missing select, [data-rv2-row].rv2-missing input { border-color: #b3261e; }
.rv2-ref table { font-size: 12.5px; }
.rv2-ref .table-scroll { max-height: 420px; overflow: auto; }

/* screened-inputs line on every hit (joe 2, 2026-09-15) */
.hit-inputs { margin: 4px 0 2px; padding: 5px 9px; background: #f2f6f2; border: 1px solid #d8e4d8; border-radius: 6px; font-size: 12.5px; }
.hit-inputs .hit-input { white-space: nowrap; }

/* risk-config tables: sortable/filterable grid (2026-09-16) — filter row
   sticks just under the sticky header */
.cfg-table .grid-filter-row th { top: 30px; background: #fff; }
.cfg-table .grid-filter-row input { width: 100%; box-sizing: border-box; }
