/* risk-management.css: the Risk management page (risk-management.html).
   Dark, as My Hub. Bands use one palette everywhere on the page: the heat
   map's cells, the chips and the method's matrix. */

:root {
  --rm-bg: #0a1628;
  --rm-panel: #0f2040;
  --rm-panel-2: #112847;
  --rm-field: #0a1628;
  --rm-line: rgba(148, 163, 184, .12);
  --rm-line-2: rgba(148, 163, 184, .09);
  --rm-edge: rgba(148, 163, 184, .35);
  --rm-text: #e2e8f0;
  --rm-text-2: #cbd5e1;
  --rm-muted: #a3b1c6;
  --rm-faint: #8a99ad;
  --rm-accent: #00d4aa;
  --rm-accent-ink: #062018;
  --rm-link: #5eead4;
  --rm-warn: #fcd34d;
  --rm-bad: #fecaca;
  --rm-good: #a7f3d0;
  --rm-critical: #ef4444;
  --rm-high: #f97316;
  --rm-moderate: #f59e0b;
  --rm-low: #10b981;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding-top: 40px; background: var(--rm-bg); color: var(--rm-text); font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; min-height: 100vh; }
a { color: var(--rm-link); }
a:hover { color: #99f6e4; }
button, input, select, textarea { font: inherit; color: inherit; }

.rm-wrap { max-width: 1280px; margin: 0 auto; padding: 24px 32px 64px; display: flex; flex-direction: column; gap: 22px; }
.rm-intro { display: flex; flex-direction: column; gap: 8px; }
.rm-back { font-size: 13.5px; font-weight: 600; text-decoration: none; align-self: flex-start; min-height: 32px; display: inline-flex; align-items: center; }
.rm-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.rm-intro h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.rm-intro p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--rm-muted); max-width: 80ch; }
.rm-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 4px 11px; background: rgba(0, 212, 170, .12); color: var(--rm-link); }

.rm-tabs { display: flex; flex-wrap: wrap; gap: 4px 28px; border-bottom: 1px solid rgba(148, 163, 184, .14); }
.rm-tab { font-size: 14px; font-weight: 600; color: var(--rm-muted); padding: 12px 2px; border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; white-space: nowrap; min-height: 44px; }
.rm-tab[aria-selected="true"] { color: var(--rm-text); border-bottom-color: var(--rm-accent); }
.rm-tab:hover { color: var(--rm-text); }
.rm-count { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-left: 6px; background: rgba(252, 211, 77, .16); color: var(--rm-warn); }
.rm-count.bad { background: rgba(239, 68, 68, .2); color: var(--rm-bad); }

.rm-notice { border-radius: 10px; padding: 12px 16px; font-size: 13.5px; line-height: 1.5; background: rgba(252, 211, 77, .08); border: 1px solid rgba(252, 211, 77, .28); color: #fde68a; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; }
.rm-notice.bad { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .35); color: var(--rm-bad); }
.rm-notice.good { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .35); color: var(--rm-good); }
.rm-notice ul { margin: 6px 0 0; padding-left: 18px; }

.rm-summary { display: flex; flex-wrap: wrap; gap: 10px 32px; font-size: 14px; color: var(--rm-text-2); align-items: baseline; }
.rm-summary b { font-size: 18px; color: var(--rm-text); font-variant-numeric: tabular-nums; }
.rm-summary b.bad { color: var(--rm-bad); }
.rm-summary b.warn { color: var(--rm-warn); }

.rm-row-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.rm-panel { background: var(--rm-panel); border: 1px solid var(--rm-line); border-radius: 14px; }
.rm-panel.pad { padding: 18px 20px; }
.rm-panel.draft { border-color: rgba(252, 211, 77, .3); }
.rm-panel h2 { margin: 0; font-size: 15px; font-weight: 700; }
.rm-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rm-scroll { overflow-x: auto; }

.rm-muted { color: var(--rm-muted); }
.rm-faint { color: var(--rm-faint); }
.rm-small { font-size: 12.5px; line-height: 1.5; }
.rm-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--rm-muted); }
.rm-p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--rm-text-2); }
.rm-empty { padding: 28px 20px; text-align: center; color: var(--rm-muted); font-size: 14px; line-height: 1.55; display: flex; flex-direction: column; gap: 12px; align-items: center; }

.rm-btn { font-size: 13.5px; font-weight: 600; border-radius: 8px; padding: 10px 16px; min-height: 44px; cursor: pointer; border: 1px solid var(--rm-edge); background: transparent; color: var(--rm-text); white-space: nowrap; }
.rm-btn:hover { background: rgba(148, 163, 184, .08); }
.rm-btn.primary { background: var(--rm-accent); border-color: var(--rm-accent); color: var(--rm-accent-ink); }
.rm-btn.primary:hover { filter: brightness(1.06); }
.rm-btn.danger { border-color: rgba(239, 68, 68, .45); color: var(--rm-bad); }
.rm-btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.rm-btn.small { min-height: 36px; padding: 6px 12px; font-size: 12.5px; }
.rm-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-link-btn { background: none; border: 0; padding: 4px 0; color: var(--rm-link); font-weight: 600; font-size: 13px; cursor: pointer; text-align: left; }

.rm-seg { display: inline-flex; border: 1px solid var(--rm-edge); border-radius: 9px; padding: 2px; gap: 2px; }
.rm-seg button { font-size: 12.5px; font-weight: 600; color: var(--rm-muted); background: transparent; border: 0; border-radius: 7px; padding: 0 12px; min-height: 36px; cursor: pointer; }
.rm-seg button[aria-pressed="true"] { background: var(--rm-accent); color: var(--rm-accent-ink); }
.rm-seg button:disabled { cursor: not-allowed; }

.rm-band { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rm-band.critical { background: rgba(239, 68, 68, .2); color: var(--rm-bad); }
.rm-band.high { background: rgba(249, 115, 22, .18); color: #fed7aa; }
.rm-band.moderate { background: rgba(245, 158, 11, .16); color: #fde68a; }
.rm-band.low { background: rgba(16, 185, 129, .16); color: var(--rm-good); }
.rm-band.none { background: rgba(148, 163, 184, .12); color: var(--rm-muted); font-weight: 600; }
.rm-draft-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 4px 11px; background: rgba(252, 211, 77, .14); color: var(--rm-warn); }
.rm-ok-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 4px 11px; background: rgba(16, 185, 129, .14); color: var(--rm-good); }

/* Heat map */
.rm-heat { flex: 1 1 400px; max-width: 440px; display: flex; flex-direction: column; gap: 14px; }
.rm-heat-grid { display: grid; grid-template-columns: 82px repeat(5, minmax(0, 1fr)); gap: 4px; font-size: 11px; color: var(--rm-muted); }
.rm-heat-y { display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; text-align: right; line-height: 1.2; hyphens: auto; overflow-wrap: break-word; }
.rm-heat-x { text-align: center; padding-top: 4px; line-height: 1.2; hyphens: auto; overflow-wrap: break-word; }
.rm-cell { display: flex; align-items: center; justify-content: center; border-radius: 6px; height: 44px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; color: #0a1628; }
.rm-cell.empty { color: rgba(10, 22, 40, .38); font-weight: 600; }
.rm-cell.critical { background: var(--rm-critical); }
.rm-cell.high { background: var(--rm-high); }
.rm-cell.moderate { background: var(--rm-moderate); }
.rm-cell.low { background: var(--rm-low); }
.rm-heat-axes { display: flex; justify-content: space-between; font-size: 11px; color: var(--rm-faint); }

/* Register table */
.rm-list { flex: 999 1 640px; min-width: 0; }
.rm-list-head { padding: 14px 16px; }
.rm-table { min-width: 780px; }
.rm-tr { width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--rm-line-2); display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.2fr) 112px 112px minmax(0, 1.3fr) 120px; gap: 12px; align-items: center; padding: 12px 16px; color: var(--rm-text); min-height: 44px; }
button.rm-tr { cursor: pointer; }
button.rm-tr:hover { background: rgba(0, 212, 170, .05); }
.rm-tr[aria-current="true"] { background: var(--rm-panel-2); box-shadow: inset 3px 0 0 var(--rm-accent); }
.rm-tr.head { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--rm-muted); }
.rm-tr.closed { opacity: .6; }
.rm-cell-stack { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rm-risk-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.rm-sub { font-size: 12px; color: var(--rm-faint); overflow-wrap: anywhere; }
/* Scopes (RISK_SCOPES_PLAN.md): the filter above the Register and Reviews tabs, and each risk's scopes in the list. */
.rm-scope-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; }
.rm-scope-filter .rm-select { width: auto; min-width: 220px; max-width: 100%; }
.rm-scope-tag { align-self: flex-start; font-size: 11.5px; font-weight: 600; color: var(--rm-link); border: 1px solid var(--rm-edge); border-radius: 999px; padding: 1px 8px; overflow-wrap: anywhere; }
.rm-scope-tag.org { color: var(--rm-muted); }
.rm-due-overdue { color: var(--rm-bad); }
.rm-due-soon { color: var(--rm-warn); }
/* Suppliers (SUPPLIER_RISK_PLAN.md): the Register tab's filters in a row, each risk's suppliers,
   what moved since its last review, and "Supplier risks to consider". */
.rm-filters { display: flex; flex-wrap: wrap; gap: 0 28px; }
.rm-filters:empty { display: none; }
.rm-tag-row { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.rm-scope-tag.sup { color: var(--rm-text-2); }
.rm-scope-tag.sup.gone { color: var(--rm-faint); font-style: italic; }
.rm-scope-tag.changed { color: var(--rm-warn); border-color: rgba(252, 211, 77, .45); }
.rm-sup-change { border-radius: 10px; padding: 10px 14px; background: rgba(252, 211, 77, .08); border: 1px solid rgba(252, 211, 77, .28); color: #fde68a; font-size: 13px; line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }
.rm-sup-change ul { margin: 0; padding-left: 18px; }
.rm-ss-head { padding: 14px 18px; }
.rm-ss-head h2 { display: flex; align-items: center; gap: 2px; }
.rm-ss-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--rm-line-2); }
.rm-ss-why { font-size: 12.5px; color: var(--rm-warn); line-height: 1.45; overflow-wrap: anywhere; }
.rm-dot.late { background: var(--rm-critical); }

/* Detail */
.rm-detail { padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.rm-detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rm-detail h2 { font-size: 22px; font-weight: 800; overflow-wrap: anywhere; }
.rm-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px 28px; }
.rm-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rm-scores { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rm-score { display: flex; flex-direction: column; gap: 4px; }
.rm-kv { font-size: 13px; line-height: 1.5; color: var(--rm-text-2); overflow-wrap: anywhere; }
.rm-act { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rm-line-2); font-size: 13.5px; }
.rm-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--rm-moderate); }
.rm-dot.done { background: var(--rm-low); }
.rm-hist { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--rm-line-2); }
.rm-hist b { font-size: 12.5px; font-weight: 600; }

/* Reviews */
.rm-due-list { flex: 1 1 340px; max-width: 440px; overflow: hidden; }
.rm-due-list h2 { padding: 16px 18px 12px; }
.rm-due-group { display: flex; flex-direction: column; }
.rm-due-group .rm-eyebrow { padding: 10px 18px 8px; }
.rm-due { width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--rm-line-2); padding: 10px 18px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; color: var(--rm-text); min-height: 44px; }
.rm-due:hover { background: rgba(0, 212, 170, .05); }
.rm-due[aria-current="true"] { background: var(--rm-panel-2); box-shadow: inset 3px 0 0 var(--rm-accent); }
.rm-due-line { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.rm-form { flex: 999 1 560px; min-width: 0; padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.rm-form h2 { font-size: 21px; font-weight: 800; overflow-wrap: anywhere; }
.rm-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.rm-label { font-size: 12.5px; font-weight: 600; color: var(--rm-text-2); }
.rm-hint { font-size: 12px; color: var(--rm-faint); line-height: 1.45; }
.rm-input, .rm-select, .rm-textarea { font-size: 13.5px; color: var(--rm-text); background: var(--rm-field); border: 1px solid rgba(148, 163, 184, .3); border-radius: 8px; padding: 9px 11px; min-height: 42px; width: 100%; min-width: 0; }
.rm-textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.rm-input:disabled, .rm-select:disabled, .rm-textarea:disabled { opacity: .6; }
.rm-input.tight { min-height: 36px; padding: 6px 8px; font-size: 13px; }
.rm-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.rm-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 24px; }
.rm-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; min-height: 36px; }
.rm-check input { width: 18px; height: 18px; accent-color: var(--rm-accent); }
.rm-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 16px; border-top: 1px solid var(--rm-line); }
.rm-log-row { display: grid; grid-template-columns: 120px minmax(0, 2fr) 150px 140px minmax(0, 2fr); gap: 14px; align-items: baseline; padding: 11px 18px; border-top: 1px solid var(--rm-line-2); font-size: 13px; }
.rm-log-row.head { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--rm-muted); border-top: 0; }
.rm-log { min-width: 860px; }

/* Method */
.rm-lvl { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; background: var(--rm-panel-2); flex: none; font-variant-numeric: tabular-nums; }
.rm-lrow { display: grid; grid-template-columns: 26px 140px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 0; }
.rm-irow { display: grid; grid-template-columns: 26px 130px repeat(var(--dims, 1), minmax(150px, 1fr)) ; gap: 8px; align-items: center; padding: 6px 0; }
.rm-lrow.head, .rm-irow.head { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--rm-muted); padding-top: 0; }
.rm-irow.head .rm-input { text-transform: none; letter-spacing: 0; font-weight: 600; }
.rm-dim-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rm-x { background: none; border: 0; color: var(--rm-faint); font-size: 16px; line-height: 1; cursor: pointer; min-width: 32px; min-height: 32px; border-radius: 6px; flex: none; }
.rm-x:hover { color: var(--rm-bad); background: rgba(239, 68, 68, .1); }
.rm-read { font-size: 13px; line-height: 1.45; color: var(--rm-text-2); overflow-wrap: anywhere; }
.rm-read.name { font-weight: 600; color: var(--rm-text); }
.rm-step { display: inline-flex; align-items: center; border: 1px solid var(--rm-edge); border-radius: 9px; overflow: hidden; }
.rm-step button { font-size: 16px; font-weight: 700; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; }
.rm-step button:disabled { color: #46546a; cursor: not-allowed; }
.rm-step b { min-width: 38px; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; }
.rm-fixed { display: inline-flex; align-items: center; height: 42px; padding: 0 12px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rm-cut { display: grid; grid-template-columns: 96px auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rm-line-2); }
.rm-mx { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
.rm-mx span { display: flex; align-items: center; justify-content: center; border-radius: 5px; height: 28px; font-size: 12px; font-weight: 800; color: #0a1628; font-variant-numeric: tabular-nums; }
.rm-mx .critical { background: var(--rm-critical); }
.rm-mx .high { background: var(--rm-high); }
.rm-mx .moderate { background: var(--rm-moderate); }
.rm-mx .low { background: var(--rm-low); }
.rm-kvrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid var(--rm-line-2); font-size: 13.5px; }
.rm-kvrow .rm-input, .rm-kvrow .rm-select { width: auto; max-width: 220px; }
.rm-days { width: 92px !important; text-align: right; font-variant-numeric: tabular-nums; }
.rm-chg { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr); gap: 14px; padding: 10px 0; border-top: 1px solid var(--rm-line-2); font-size: 13.5px; }
.rm-was { font-size: 11.5px; color: var(--rm-faint); text-decoration: line-through; }
.rm-versions { display: flex; flex-direction: column; }
.rm-version { display: grid; grid-template-columns: 90px 140px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--rm-line-2); font-size: 13px; }

/* RACI */
.rm-raci { display: grid; align-items: center; min-width: 760px; padding: 0 10px; }
.rm-gh { padding: 12px 8px; font-size: 12px; line-height: 1.3; color: var(--rm-text-2); border-bottom: 1px solid rgba(148, 163, 184, .14); align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-width: 0; }
.rm-gh.role { align-items: center; text-align: center; }
.rm-gr { padding: 4px 8px; min-height: 46px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--rm-line-2); font-size: 13.5px; min-width: 0; }
.rm-gr.c { justify-content: center; }
.rm-k { width: 40px; height: 32px; border-radius: 7px; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; background: transparent; }
button.rm-k { cursor: pointer; }
button.rm-k:hover { filter: brightness(1.15); }
.rm-k.R { background: rgba(0, 212, 170, .16); color: var(--rm-link); border-color: rgba(0, 212, 170, .35); }
.rm-k.A { background: var(--rm-accent); color: var(--rm-accent-ink); }
.rm-k.C { background: rgba(129, 140, 248, .16); color: #c7d2fe; border-color: rgba(129, 140, 248, .3); }
.rm-k.I { background: rgba(148, 163, 184, .1); color: var(--rm-muted); border-color: rgba(148, 163, 184, .2); }
.rm-k.E { color: #5b6b82; border: 1px dashed rgba(148, 163, 184, .28); }
.rm-k.key { width: 28px; height: 24px; }
.rm-role-btn { width: 100%; min-height: 44px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 8px; border: 1px dashed transparent; background: none; cursor: pointer; text-align: center; overflow-wrap: anywhere; }
.rm-role-btn:hover { border-color: var(--rm-edge); }
.rm-role-edit { font-size: 11px; font-weight: 600; color: var(--rm-link); }
.rm-chk { font-size: 12.5px; font-weight: 600; }
.rm-chk.ok { color: var(--rm-good); }
.rm-chk.bad { color: var(--rm-warn); }
.rm-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.rm-leg { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--rm-text-2); }
.rm-ref-input { width: 70px !important; flex: none; }
.rm-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rm-start button { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--rm-edge); background: var(--rm-panel-2); cursor: pointer; color: var(--rm-text); white-space: normal; }
.rm-start button:hover { border-color: var(--rm-accent); }
.rm-start b { font-size: 14px; }

/* Statement of Applicability */
.rm-soa { min-width: 860px; }
.rm-soa-row { width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--rm-line-2); display: grid; grid-template-columns: 70px minmax(0, 2.2fr) 110px 150px minmax(0, 2fr); gap: 12px; align-items: start; padding: 11px 18px; color: var(--rm-text); min-height: 44px; }
button.rm-soa-row { cursor: pointer; }
button.rm-soa-row:hover { background: rgba(0, 212, 170, .05); }
button.rm-soa-row[aria-disabled="true"] { cursor: default; }
button.rm-soa-row[aria-disabled="true"]:hover { background: transparent; }
.rm-soa-row.head { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--rm-muted); border-top: 0; align-items: end; }
.rm-soa-theme { padding: 14px 18px 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--rm-link); border-top: 1px solid var(--rm-line); }
.rm-soa-id { font-weight: 700; font-variant-numeric: tabular-nums; }
.rm-soa-issue { font-size: 11.5px; font-weight: 600; color: var(--rm-warn); }
.rm-soa-diff { font-size: 11.5px; font-weight: 600; color: #c7d2fe; }

/* Business assets (ASSET_REGISTER_PLAN.md): filters, classification pills, suggestions. */
.rm-af-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.rm-af { flex: 1 1 160px; max-width: 240px; }
.rm-af-check { align-self: center; padding-top: 18px; }
.rm-cls { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rm-cls.low { background: rgba(148, 163, 184, .14); color: var(--rm-text-2); }
.rm-cls.mid { background: rgba(0, 212, 170, .14); color: var(--rm-link); }
.rm-cls.high { background: rgba(245, 158, 11, .18); color: var(--rm-warn); }
.rm-cls.top { background: rgba(239, 68, 68, .2); color: var(--rm-bad); }
.rm-sugg { display: flex; flex-direction: column; max-height: 360px; overflow-y: auto; border: 1px solid rgba(148, 163, 184, .3); border-radius: 8px; background: var(--rm-field); }
.rm-sugg-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--rm-line-2); }
.rm-sugg-row > .rm-check { grid-column: 1; min-width: 0; }
.rm-sugg-row > .rm-check:only-child { grid-column: 1 / -1; }
@media (max-width: 600px) { .rm-sugg-row { grid-template-columns: 1fr; } .rm-af { max-width: none; } }

/* The Documents menu on the Register tab */
.rm-docs { position: relative; }
.rm-docs summary { list-style: none; display: inline-flex; align-items: center; }
.rm-docs summary::-webkit-details-marker { display: none; }
.rm-docs summary::after { content: '▾'; margin-left: 8px; font-size: 11px; }
.rm-docs-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 240px; background: var(--rm-panel-2); border: 1px solid rgba(148, 163, 184, .25); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.rm-docs-menu button { text-align: left; background: none; border: 0; border-radius: 6px; padding: 10px 12px; min-height: 40px; cursor: pointer; font-size: 13.5px; }
.rm-docs-menu button:hover, .rm-docs-menu button:focus-visible { background: rgba(0, 212, 170, .1); outline: none; }

/* A printed document (risk-documents.js): alone on the page, dark ink on white, through print-shell.js. */
#rm-print-root { display: none; }
@media print {
  body.rm-printing > :not(#rm-print-root) { display: none !important; }
  body.rm-printing { background: #fff !important; padding-top: 0; min-height: 0; }
  body.rm-printing #rm-print-root { display: block; }
}

/* Dialogs: above the nav bar and Ask Phronesis; never hide their own top or buttons. */
.rm-overlay { position: fixed; inset: 0; z-index: 1200; background: rgba(3, 8, 15, .72); display: flex; align-items: flex-start; justify-content: center; padding: 56px 16px 16px; overflow-y: auto; }
.rm-dialog { background: var(--rm-panel); border: 1px solid rgba(148, 163, 184, .2); border-radius: 14px; width: 100%; max-width: 640px; display: flex; flex-direction: column; }
.rm-dialog.narrow { max-width: 460px; }
.rm-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--rm-line); }
.rm-dialog-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.rm-dialog-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.rm-dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--rm-line); }
.rm-error { font-size: 13px; color: #fb7185; min-height: 18px; line-height: 1.45; }
.rm-picker { max-height: 180px; overflow-y: auto; border: 1px solid rgba(148, 163, 184, .3); border-radius: 8px; background: var(--rm-field); padding: 4px; }
.rm-pick { display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.rm-pick:hover { background: rgba(255, 255, 255, .04); }

.rm-tab:focus-visible, .rm-seg button:focus-visible, .rm-tr:focus-visible, .rm-btn:focus-visible, .rm-due:focus-visible, .rm-k:focus-visible,
.rm-step button:focus-visible, .rm-x:focus-visible, .rm-role-btn:focus-visible, .rm-soa-row:focus-visible, .rm-docs summary:focus-visible, .rm-link-btn:focus-visible, .rm-start button:focus-visible, .rm-back:focus-visible {
  outline: 2px solid var(--rm-accent); outline-offset: 2px;
}
.rm-input:focus-visible, .rm-select:focus-visible, .rm-textarea:focus-visible { outline: 2px solid var(--rm-accent); outline-offset: 0; border-color: transparent; }

@media (max-width: 900px) {
  .rm-wrap { padding: 20px 20px 56px; }
  .rm-heat { max-width: none; }
  .rm-due-list { max-width: none; }
}
/* Phones and narrow tablets: the register and the review log become labelled cards. */
@media (max-width: 700px) {
  .rm-list.rm-scroll { overflow-x: visible; }
  .rm-table, .rm-log { min-width: 0; }
  .rm-tr.head, .rm-log-row.head { display: none; }
  .rm-tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; }
  .rm-tr > :first-child { grid-column: 1 / -1; }
  .rm-log-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; }
  .rm-log-row > :nth-child(2), .rm-log-row > :nth-child(5) { grid-column: 1 / -1; }
  .rm-log-row > :nth-child(2) { order: -1; }
  .rm-soa { min-width: 0; }
  .rm-soa-row { grid-template-columns: 56px minmax(0, 1fr); gap: 8px 12px; }
  .rm-soa-row.head { display: none; }
  .rm-soa-row > :nth-child(n+3) { grid-column: 2; }
  [data-label]::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--rm-faint); margin-bottom: 4px; }
}
@media (max-width: 600px) {
  .rm-wrap { padding: 16px 16px 48px; gap: 18px; }
  .rm-intro h1 { font-size: 24px; }
  .rm-tabs { gap: 2px 20px; }
  .rm-heat-grid { grid-template-columns: 60px repeat(5, minmax(0, 1fr)); gap: 3px; }
  .rm-heat-x { font-size: 10px; letter-spacing: -.01em; }
  .rm-cut { grid-template-columns: 1fr; gap: 6px; }
  .rm-chg { grid-template-columns: 1fr; gap: 4px; }
  .rm-detail, .rm-form { padding: 16px; }
  .rm-ss-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media print {
  #sch-nav-bar, .rm-back, .rm-tabs, .rm-btns, .rm-btn, .rm-heat, .rm-notice, .rm-overlay, .rm-ss, .rm-filters { display: none !important; }
  body { background: #fff; color: #000; padding-top: 0; }
  .rm-wrap { padding: 0; max-width: none; }
  .rm-panel { border-color: #ccc; background: #fff; }
  .rm-tr, .rm-log-row { color: #000; border-color: #ddd; }
  .rm-muted, .rm-faint, .rm-sub, .rm-eyebrow { color: #444; }
  .rm-scroll { overflow: visible; }
  .rm-table, .rm-log, .rm-raci { min-width: 0; }
}
