:root {
  --navy-950: #102a43;
  --navy-900: #173f5f;
  --navy-800: #1f506f;
  --blue-600: #2d79b7;
  --teal-600: #218a8d;
  --teal-100: #dff3f0;
  --coral-600: #e76f51;
  --coral-100: #fde8e2;
  --amber-500: #e2a83b;
  --amber-100: #fff3d8;
  --green-600: #3d8b67;
  --green-100: #e2f2ea;
  --ink: #263746;
  --muted: #6c7f90;
  --line: #dce4ea;
  --canvas: #f5f7f9;
  --surface: #ffffff;
  --shadow: 0 12px 34px rgba(25, 52, 74, .08);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(45,121,183,.35); outline-offset: 2px;
}

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 250px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  color: #dce9f2;
  background: var(--navy-950);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 25px; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; color: white; background: linear-gradient(145deg, #3c8dc2, #41a19a);
  font-weight: 800; letter-spacing: -.04em;
}
.brand strong, .brand span { display: block; }
.brand strong { color: white; font-size: .98rem; }
.brand span { margin-top: 3px; color: #8faabd; font-size: .72rem; }
.primary-nav { flex: 1; overflow-y: auto; }
.nav-label {
  padding: 18px 12px 7px; color: #66869c; font-size: .68rem;
  font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin: 2px 0; border: 0; border-radius: 9px;
  color: #bdd0dc; background: transparent; cursor: pointer; text-align: left;
  transition: .18s ease;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: #24536f; box-shadow: inset 3px 0 #64b9b4; }
.nav-icon { width: 19px; color: #8eb3c6; text-align: center; font-weight: 700; }
.nav-item.active .nav-icon { color: #84d6ce; }
.module-nav { align-items: flex-start; line-height: 1.3; }
.module-number {
  width: 21px; height: 21px; flex: 0 0 21px; display: grid; place-items: center;
  border: 1px solid #52758a; border-radius: 6px; color: #9ec3d2; font-size: .65rem; font-weight: 800;
}
.module-nav.active .module-number { border-color: #78c9c2; color: #e7fffc; background: rgba(83,184,174,.15); }
.nav-count {
  min-width: 25px; margin-left: auto; padding: 2px 7px; border-radius: 10px;
  color: #a9c3d2; background: rgba(255,255,255,.07); font-size: .7rem; text-align: center;
}
.nav-count.alert { color: #ffd2c7; background: rgba(231,111,81,.18); }
.sidebar-footer { padding-top: 16px; border-top: 1px solid rgba(255,255,255,.07); }
.period-card {
  padding: 13px 14px; margin-bottom: 8px; border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; background: rgba(255,255,255,.035);
}
.period-card span, .period-card small, .period-card strong { display: block; }
.period-card span { color: #809db0; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.period-card strong { margin: 5px 0; color: white; }
.period-card small { color: #7994a7; font-size: .7rem; }

.main { width: calc(100% - 250px); margin-left: 250px; }
.topbar {
  height: 68px; position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
}
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: .82rem; }
.breadcrumb span, .breadcrumb b { color: #91a0ac; font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.global-search {
  width: 250px; height: 38px; display: flex; align-items: center; gap: 8px;
  padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb;
}
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .82rem; }
.global-search kbd { padding: 2px 5px; border: 1px solid #d7e0e7; border-radius: 4px; color: #8494a0; background: white; font-size: .65rem; }
.icon-button {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer;
}
.icon-button:hover { background: #f5f8fa; }
.notification-button { position: relative; font-size: 1.3rem; }
.notification-button i { width: 6px; height: 6px; position: absolute; top: 7px; right: 7px; border-radius: 50%; background: var(--coral-600); }
.profile-button { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; cursor: pointer; font-size: .8rem; }
.profile-button span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--navy-800); font-weight: 700; }
.content { max-width: 1600px; margin: 0 auto; padding: 32px 34px 60px; }
.view { display: none; }
.view.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: .35; transform: translateY(3px); } }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.page-heading h1 { margin: 2px 0 7px; color: var(--navy-950); font-family: Georgia, "Times New Roman", serif; font-size: 2.2rem; font-weight: 600; letter-spacing: -.03em; }
.page-heading p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--teal-600) !important; font-size: .7rem !important; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.heading-actions { display: flex; gap: 9px; }
.button {
  min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px;
  font-weight: 700; font-size: .8rem; cursor: pointer;
}
.button.primary { color: white; background: var(--navy-900); }
.button.primary:hover { background: #0f314b; }
.button.secondary { border-color: var(--line); background: white; }
.button.secondary:hover { background: #f7f9fa; }
.button.danger { color: #a94433; border-color: #f1c8be; background: #fff8f6; }
.button.compact { min-height: 34px; padding: 0 11px; font-size: .7rem; }
.text-button { padding: 0; border: 0; color: var(--blue-600); background: transparent; font-size: .78rem; font-weight: 700; cursor: pointer; }
.more-button { border: 0; background: transparent; color: #8c9ba7; cursor: pointer; letter-spacing: 2px; }

.attention-banner {
  display: flex; align-items: center; gap: 13px; padding: 13px 16px; margin-bottom: 18px;
  border: 1px solid #f0d7ab; border-radius: 11px; background: #fffaf0;
}
.attention-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #9b6810; background: #fcebc6; font-weight: 800; }
.attention-banner strong, .attention-banner span { display: block; }
.attention-banner strong { color: #604b27; font-size: .82rem; }
.attention-banner span { margin-top: 3px; color: #8a7650; font-size: .75rem; }
.attention-banner .text-button { margin-left: auto; color: #8e6216; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.metric-card { padding: 19px 20px 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 20px rgba(25,52,74,.035); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .78rem; font-weight: 600; }
.metric-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; }
.metric-icon.blue { color: var(--blue-600); background: #e7f1f8; }
.metric-icon.coral { color: var(--coral-600); background: var(--coral-100); }
.metric-icon.teal { color: var(--teal-600); background: var(--teal-100); }
.metric-icon.amber { color: #9b6810; background: var(--amber-100); }
.metric-card > strong { display: block; margin: 5px 0 4px; color: var(--navy-950); font-family: Georgia, serif; font-size: 2.05rem; font-weight: 600; }
.metric-card small { color: #8695a0; font-size: .7rem; }
.metric-card small i { margin-right: 4px; color: #a97114; font-style: normal; font-weight: 700; }
.metric-card small i.positive { color: var(--green-600); }

.dashboard-grid { display: grid; grid-template-columns: 1.04fr 1.4fr; gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 4px 20px rgba(25,52,74,.035); overflow: hidden; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; padding: 19px 20px 13px; }
.panel-heading h2 { margin: 0 0 4px; color: var(--navy-950); font-size: .95rem; }
.panel-heading p { margin: 0; color: var(--muted); font-size: .72rem; }
.risk-profile { min-height: 238px; display: flex; align-items: center; justify-content: center; gap: 42px; padding: 8px 24px 23px; }
.donut { width: 160px; height: 160px; position: relative; border-radius: 50%; background: conic-gradient(var(--coral-600) 0 18%, var(--amber-500) 18% 72%, var(--teal-600) 72% 100%); }
.donut::after { content: ""; position: absolute; inset: 25px; border-radius: 50%; background: white; }
.donut > div { position: absolute; inset: 0; z-index: 1; display: grid; align-content: center; text-align: center; }
.donut strong, .donut span { display: block; }
.donut strong { color: var(--navy-950); font-family: Georgia, serif; font-size: 1.8rem; }
.donut span { color: var(--muted); font-size: .66rem; }
.legend { min-width: 135px; display: grid; gap: 11px; }
.legend-row { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; font-size: .73rem; }
.legend-row i { width: 8px; height: 8px; border-radius: 2px; }
.legend-row span { color: var(--muted); }
.legend-row strong { color: var(--navy-950); }
.bar-chart { height: 215px; display: flex; align-items: end; gap: 14px; padding: 16px 24px 24px; border-bottom: 1px solid #edf1f4; }
.bar-group { height: 100%; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; }
.bar-stack { height: 160px; display: flex; align-items: end; gap: 4px; }
.bar { width: 15px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--navy-800); }
.bar.elevated { width: 8px; background: var(--coral-600); }
.bar-group label { max-width: 70px; min-height: 27px; color: var(--muted); font-size: .6rem; text-align: center; line-height: 1.2; }
.chart-legend { display: flex; justify-content: center; gap: 18px; padding: 10px; color: var(--muted); font-size: .65rem; }
.chart-legend i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 2px; }
.navy-dot { background: var(--navy-800); }.coral-dot { background: var(--coral-600); }
.priorities-panel, .testing-panel { min-height: 305px; }
.priority-row { display: grid; grid-template-columns: 37px minmax(130px, 1fr) 80px 60px; align-items: center; gap: 11px; padding: 13px 20px; border-top: 1px solid #edf1f4; cursor: pointer; }
.priority-row:hover { background: #f8fafb; }
.risk-score { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: #9e4330; background: var(--coral-100); font-weight: 800; font-size: .75rem; }
.priority-title strong, .priority-title span { display: block; }
.priority-title strong { color: var(--navy-950); font-size: .76rem; }
.priority-title span { margin-top: 3px; color: var(--muted); font-size: .66rem; }
.status-badge { width: fit-content; padding: 4px 7px; border-radius: 12px; font-size: .62rem; font-weight: 700; white-space: nowrap; }
.status-open { color: #a44935; background: var(--coral-100); }
.status-progress { color: #8b6419; background: var(--amber-100); }
.status-monitoring { color: #256f68; background: var(--teal-100); }
.status-closed, .status-effective { color: #317153; background: var(--green-100); }
.priority-row time { color: var(--muted); font-size: .65rem; text-align: right; }
.testing-summary { display: flex; align-items: center; gap: 24px; padding: 4px 20px 16px; }
.progress-ring { width: 105px; height: 105px; position: relative; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--teal-600) 0 68%, #e6ecef 68%); }
.progress-ring::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: white; }
.progress-ring div { z-index: 1; text-align: center; }
.progress-ring strong { display: block; color: var(--navy-950); font-family: Georgia, serif; font-size: 1.45rem; }
.progress-ring span { color: var(--muted); font-size: .6rem; }
.test-stats { flex: 1; display: grid; gap: 11px; }
.test-stat { display: flex; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid #edf1f4; font-size: .72rem; }
.test-stat span { color: var(--muted); }.test-stat strong { color: var(--navy-950); }
.testing-note { margin: 0 20px 18px; padding: 11px 12px; border-radius: 8px; color: #6e5a31; background: #fff8e9; font-size: .68rem; }
.timeline-panel { grid-column: 1 / -1; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 20px 22px; }
.timeline-item { position: relative; padding: 11px 18px 11px 21px; border-left: 1px solid var(--line); }
.timeline-item::before { content: ""; width: 8px; height: 8px; position: absolute; left: -5px; top: 15px; border: 2px solid white; border-radius: 50%; background: var(--blue-600); box-shadow: 0 0 0 1px var(--blue-600); }
.timeline-item time, .timeline-item strong, .timeline-item span { display: block; }
.timeline-item time { color: var(--teal-600); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.timeline-item strong { margin: 6px 0 3px; color: var(--navy-950); font-size: .76rem; }
.timeline-item span { color: var(--muted); font-size: .66rem; }

.register-shell { border: 1px solid var(--line); border-radius: var(--radius); background: white; overflow: hidden; }
.register-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar-group { display: flex; gap: 8px; }
.filter-control, .table-search {
  height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; font-size: .75rem; outline: none;
}
.table-search { width: 230px; }
.data-table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th { position: sticky; top: 0; z-index: 2; padding: 11px 13px; color: #718493; background: #f5f8fa; border-bottom: 1px solid var(--line); font-size: .66rem; text-align: left; text-transform: uppercase; letter-spacing: .055em; }
.data-table td { padding: 12px 13px; border-bottom: 1px solid #edf1f4; color: #4e606f; font-size: .72rem; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: #f8fbfc; }
.data-table td strong { color: var(--navy-950); }
.risk-inventory-table .frozen-select { position: sticky; left: 0; z-index: 4; background: white; }
.risk-inventory-table th.frozen-select { z-index: 6; background: #f5f8fa; }
.risk-inventory-table [data-risk-col="id"] { position: sticky; left: 45px; z-index: 3; background: white; box-shadow: 1px 0 #e4eaee; }
.risk-inventory-table th[data-risk-col="id"] { z-index: 5; background: #f5f8fa; }
.cell-title { max-width: 270px; overflow: hidden; text-overflow: ellipsis; }
.score-pill { min-width: 27px; display: inline-grid; place-items: center; padding: 4px 6px; border-radius: 7px; font-weight: 800; }
.score-high { color: #a44935; background: var(--coral-100); }
.score-medium { color: #8b6419; background: var(--amber-100); }
.score-low { color: #317153; background: var(--green-100); }
.table-footer { display: flex; justify-content: space-between; padding: 11px 16px; color: var(--muted); background: #fbfcfd; font-size: .7rem; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--navy-950); }

.coso-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.coso-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.coso-card header { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.coso-card h3 { margin: 0; color: var(--navy-950); font-size: .84rem; }
.coso-card p { margin: 5px 0 0; color: var(--muted); font-size: .7rem; }
.coverage-meter { height: 7px; border-radius: 4px; background: #e8edef; overflow: hidden; }
.coverage-meter i { height: 100%; display: block; border-radius: 4px; background: var(--teal-600); }
.coverage-count { color: var(--teal-600); font-size: .72rem; font-weight: 800; }

/* Module 1: SOX Scope Management */
.scope-hero {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 25px;
  padding: 25px 27px; margin-bottom: 18px; border: 1px solid #cfdee7; border-radius: var(--radius);
  color: white; background:
    radial-gradient(circle at 88% 15%, rgba(87,180,176,.27), transparent 31%),
    linear-gradient(120deg, #173b57, #1c526b);
  box-shadow: var(--shadow);
}
.scope-hero .eyebrow { color: #8ed4cf !important; }
.scope-hero h1 { margin: 4px 0 9px; color: white; font-family: Georgia, serif; font-size: 2rem; font-weight: 600; }
.scope-hero p:not(.eyebrow) { max-width: 850px; margin: 0; color: #c9dce7; font-size: .8rem; line-height: 1.6; }
.scope-hero-meta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.scope-hero-meta span { padding: 6px 9px; border: 1px solid rgba(255,255,255,.17); border-radius: 15px; color: #d5e7ef; background: rgba(255,255,255,.07); font-size: .65rem; white-space: nowrap; }
.scope-tabs {
  display: flex; gap: 3px; margin-bottom: 18px; padding: 5px;
  border: 1px solid var(--line); border-radius: 11px; background: #edf2f5; overflow-x: auto;
}
.scope-tab {
  min-height: 36px; flex: 0 0 auto; padding: 0 12px; border: 0; border-radius: 7px;
  color: #627686; background: transparent; font-size: .7rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.scope-tab:hover { color: var(--navy-950); background: rgba(255,255,255,.58); }
.scope-tab.active { color: var(--navy-950); background: white; box-shadow: 0 2px 8px rgba(26,55,76,.08); }
.scope-tab-panel { display: none; }
.scope-tab-panel.active { display: block; animation: fadeIn .18s ease; }
.scope-metrics { grid-template-columns: repeat(5, 1fr); }
.scope-metrics .metric-card { min-width: 0; padding: 16px; }
.scope-metrics .metric-card > strong { font-size: 1.7rem; }
.scope-metrics .metric-top span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 15px; }
.scope-panel-wide { grid-column: span 2; }
.mini-chart { padding: 8px 20px 21px; }
.mini-bar-row { display: grid; grid-template-columns: 125px 1fr 28px; align-items: center; gap: 10px; margin: 11px 0; }
.mini-bar-row label { color: #536776; font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-bar-track { height: 8px; border-radius: 5px; background: #edf1f3; overflow: hidden; }
.mini-bar-track i { height: 100%; display: block; border-radius: 5px; background: var(--teal-600); }
.mini-bar-row strong { color: var(--navy-950); font-size: .7rem; text-align: right; }
.scope-donut-wrap { min-height: 205px; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 3px 18px 20px; }
.scope-donut { width: 126px; height: 126px; flex: 0 0 126px; }
.scope-donut::after { inset: 21px; }
.scope-donut strong { font-size: 1.45rem; }
.scope-completion {
  display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 22px;
  padding: 8px 20px 24px;
}
.scope-completion-ring { width: 135px; height: 135px; }
.scope-completion-list { display: grid; gap: 10px; }
.scope-completion-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid #edf1f4; font-size: .7rem; }
.scope-completion-item span { color: var(--muted); }
.scope-completion-item strong { color: var(--navy-950); }
.scope-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.scope-section-heading h2 { margin: 0 0 5px; color: var(--navy-950); font-family: Georgia, serif; font-size: 1.45rem; font-weight: 600; }
.scope-section-heading p { margin: 0; color: var(--muted); font-size: .73rem; }
.scope-table-shell { border: 1px solid var(--line); border-radius: 12px; background: white; overflow: hidden; }
.record-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line); background: white; }
.record-actions > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.select-cell { width: 40px; text-align: center !important; }
.select-cell input { width: 15px; height: 15px; accent-color: var(--teal-600); }
.scope-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.scope-table-toolbar .toolbar-group { flex-wrap: wrap; }
.scope-table { min-width: 1000px; }
.scope-table td { max-width: 310px; white-space: normal; line-height: 1.4; }
.scope-table .nowrap { white-space: nowrap; }
.scope-table .relationship-cell { color: var(--blue-600); font-weight: 700; }
.scope-id { color: var(--navy-900); font-weight: 800; }
.scope-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 13px; font-size: .62rem; font-weight: 800; white-space: nowrap; }
.scope-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.scope-in { color: #287259; background: #e2f3eb; }
.scope-out { color: #6c7780; background: #edf0f2; }
.scope-review { color: #946817; background: #fff1d2; }
.crit-critical { color: #a73e31; background: #fce4df; }
.crit-high { color: #a26813; background: #fff0cf; }
.crit-medium { color: #286e78; background: #dff0f3; }
.crit-low { color: #4d6a58; background: #e7f0e9; }
.score-breakdown { display: flex; gap: 4px; }
.score-breakdown span { min-width: 22px; padding: 3px 5px; border: 1px solid #dce5ea; border-radius: 5px; background: #f7fafb; text-align: center; font-size: .62rem; }
.criticality-score { width: 31px; height: 31px; display: inline-grid; place-items: center; border-radius: 8px; font-weight: 800; }
.relationship-map {
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch; gap: 18px;
  padding: 18px 20px 22px;
}
.relationship-node { position: relative; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfd; }
.relationship-node:not(:last-child)::after { content: "→"; position: absolute; right: -15px; top: 50%; color: #8ba1af; transform: translateY(-50%); font-weight: 800; }
.relationship-node span, .relationship-node strong, .relationship-node small { display: block; }
.relationship-node span { color: var(--teal-600); font-size: .59rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.relationship-node strong { margin: 6px 0 4px; color: var(--navy-950); font-size: .74rem; }
.relationship-node small { color: var(--muted); font-size: .61rem; line-height: 1.35; }
.matrix-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .66rem; }
.matrix-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-600); }
[data-scope-action] { cursor: pointer; }
.metric-card[data-scope-action]:hover { border-color: #b7ccd8; box-shadow: 0 8px 24px rgba(25,52,74,.08); transform: translateY(-1px); }
.scope-drill-row { cursor: pointer; }
.scope-drill-row:hover .relationship-cell { text-decoration: underline; }
.scope-detail-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.scope-detail-list li { padding: 9px 10px; border: 1px solid #e3e9ed; border-radius: 8px; color: #3f5666; background: #fafcfd; font-size: .74rem; }
.scope-placeholder { padding: 10px 11px; border: 1px dashed #cbd8df; border-radius: 8px; background: #f8fafb; }
.scope-governance-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 5px 20px 22px; }
.scope-governance-stats div { padding: 14px; border: 1px solid #e2e8ec; border-radius: 9px; background: #fafcfd; }
.scope-governance-stats span, .scope-governance-stats strong { display: block; }
.scope-governance-stats span { min-height: 28px; color: var(--muted); font-size: .64rem; line-height: 1.35; }
.scope-governance-stats strong { margin-top: 6px; color: var(--navy-950); font-family: Georgia,serif; font-size: 1.25rem; }
.dependency-map-shell { display: grid; gap: 15px; }
.dependency-path { border: 1px solid var(--line); border-radius: 12px; background: white; overflow: hidden; }
.dependency-path > header { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.dependency-path > header strong { color: var(--navy-950); font-size: .78rem; }
.dependency-path > header span { color: var(--muted); font-size: .64rem; }
.dependency-chain { display: grid; grid-template-columns: repeat(6,minmax(125px,1fr)); align-items: center; gap: 22px; padding: 20px; overflow-x: auto; }
.dependency-node {
  min-width: 125px; min-height: 100px; padding: 13px; border: 1px solid #d9e3e8; border-radius: 10px;
  color: inherit; background: #fafcfd; text-align: left; cursor: pointer; transition: .16s ease;
}
.dependency-node:hover { border-color: #87b9c0; background: #f2f9f8; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(25,52,74,.07); }
.dependency-node span, .dependency-node strong, .dependency-node small { display: block; }
.dependency-node span { color: var(--teal-600); font-size: .57rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.dependency-node strong { margin: 7px 0 5px; color: var(--navy-950); font-size: .73rem; line-height: 1.3; }
.dependency-node small { color: var(--muted); font-size: .59rem; line-height: 1.35; }
.dependency-arrow { color: #87a0af; font-style: normal; font-weight: 800; text-align: center; transform: rotate(-90deg); }
.workflow-metrics { margin-bottom: 16px; }
.auditor-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 15px; }
.auditor-summary { grid-row: span 1; }
.auditor-question { padding: 13px 20px; border-top: 1px solid #edf1f4; }
.auditor-question span, .auditor-question strong { display: block; }
.auditor-question span { color: var(--muted); font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.auditor-question strong { margin-top: 5px; color: #405665; font-size: .75rem; line-height: 1.5; }
.auditor-facts { display: grid; gap: 0; padding-bottom: 10px; }
.auditor-facts div { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 11px 18px; border-top: 1px solid #edf1f4; }
.auditor-facts span { color: var(--muted); font-size: .66rem; }
.auditor-facts strong { color: var(--navy-950); font-size: .72rem; text-align: right; }
.audit-history { padding: 0 20px 20px; }
.audit-history > div:not(.empty-state) { position: relative; display: grid; grid-template-columns: 110px 180px 1fr; gap: 15px; padding: 13px 0 13px 15px; border-bottom: 1px solid #edf1f4; }
.audit-history > div:not(.empty-state)::before { content: ""; width: 7px; height: 7px; position: absolute; left: 0; top: 18px; border-radius: 50%; background: var(--teal-600); }
.audit-history time { color: var(--muted); font-size: .67rem; }
.audit-history strong { color: var(--navy-950); font-size: .7rem; }
.audit-history span { color: #526675; font-size: .68rem; }
.record-action-grid { display: grid; grid-template-columns: 1fr 1fr; }
.record-action-grid .button:last-child { grid-column: 1 / -1; }
.audit-log { display: grid; gap: 10px; }
.audit-log > div { padding: 12px; border: 1px solid #e0e7eb; border-radius: 9px; background: #fafcfd; }
.audit-log header { display: flex; justify-content: space-between; gap: 12px; }
.audit-log header strong { color: var(--navy-950); font-size: .72rem; }
.audit-log time, .audit-log small { color: var(--muted); font-size: .61rem; }
.audit-log p { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 9px 0; font-size: .68rem; }
.audit-log del { color: #9c4a38; text-decoration: none; }
.audit-log ins { color: #287259; text-decoration: none; text-align: right; }
.approval-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.auditor-package-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; padding: 0 20px 18px; }
.auditor-package-grid > div { padding: 13px; border: 1px solid #e1e8ec; border-radius: 9px; background: #fafcfd; }
.auditor-package-grid span, .auditor-package-grid strong, .auditor-package-grid small { display: block; }
.auditor-package-grid span { color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; }
.auditor-package-grid strong { margin: 5px 0; color: var(--navy-950); font-family: Georgia,serif; font-size: 1.35rem; }
.auditor-package-grid small { color: #536776; font-size: .61rem; line-height: 1.4; }
.trace-ribbon { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; padding: 13px 18px; border-top: 1px solid var(--line); background: #f8fafb; }
.trace-ribbon span { padding: 6px 8px; border: 1px solid #d8e3e8; border-radius: 7px; color: var(--navy-900); background: white; font-size: .61rem; font-weight: 700; }
.trace-ribbon i { color: #87a0af; font-style: normal; }
.document-link { display: inline-flex; align-items: center; text-decoration: none; }
.documentation-layout { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 15px; align-items: start; }
.documentation-index { display: grid; gap: 8px; }
.documentation-index button { padding: 14px; border: 1px solid var(--line); border-radius: 10px; color: inherit; background: white; cursor: pointer; text-align: left; }
.documentation-index button:hover { border-color: #9cbec9; background: #f8fbfc; }
.documentation-index button.active { border-color: #68aaa9; background: #eef8f7; box-shadow: inset 3px 0 var(--teal-600); }
.documentation-index span, .documentation-index small { display: block; }
.documentation-index span { color: var(--navy-950); font-size: .76rem; font-weight: 800; }
.documentation-index small { margin-top: 6px; color: var(--muted); font-size: .64rem; line-height: 1.45; }
.documentation-reader > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 25px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.documentation-reader > header h2 { margin: 3px 0 0; color: var(--navy-950); font-family: Georgia,serif; font-size: 1.45rem; font-weight: 600; }
.documentation-reader > header a { color: var(--blue-600); font-size: .68rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.documentation-body { max-width: 900px; padding: 26px 30px 35px; color: #465b6a; font-size: .76rem; line-height: 1.7; }
.documentation-body h2 { margin: 0 0 22px; color: var(--navy-950); font-family: Georgia,serif; font-size: 1.65rem; font-weight: 600; }
.documentation-body h3 { margin: 27px 0 8px; padding-bottom: 7px; border-bottom: 1px solid #e5ebef; color: var(--navy-900); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.documentation-body p { margin: 8px 0; }
.documentation-body ul, .documentation-body ol { display: grid; gap: 5px; padding-left: 20px; }
.document-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 15px; margin: 12px 0; border: 1px solid #dce6ea; border-radius: 10px; background: #f8fbfc; }
.document-flow span { padding: 6px 8px; border: 1px solid #d6e2e7; border-radius: 7px; color: var(--navy-900); background: white; font-size: .64rem; font-weight: 700; }
.document-flow i { color: #85a0af; font-style: normal; font-weight: 800; }
.document-levels { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; margin-top: 12px; }
.document-levels div { padding: 13px; border: 1px solid #dfe7eb; border-radius: 9px; background: #fafcfd; }
.document-levels strong { color: var(--navy-950); font-size: .72rem; }
.document-levels p { margin: 5px 0 0; font-size: .67rem; line-height: 1.5; }
.methodology-stack { max-width: 620px; display: grid; justify-items: center; margin: 0 auto; }
.methodology-stack > div { width: 100%; padding: 13px 16px; border: 1px solid #d8e4e8; border-radius: 10px; background: #fafcfd; text-align: center; }
.methodology-stack strong { color: var(--navy-950); font-size: .76rem; }
.methodology-stack p { margin: 4px 0 0; color: var(--muted); font-size: .66rem; line-height: 1.45; }
.methodology-stack > i { padding: 3px; color: var(--teal-600); font-style: normal; font-weight: 800; }
.grc-pulse { display: grid; grid-template-columns: repeat(9,1fr); gap: 8px; padding: 0 20px 20px; }
.grc-pulse button { min-width: 0; padding: 12px 8px; border: 1px solid #e0e7eb; border-radius: 9px; background: #fafcfd; cursor: pointer; }
.grc-pulse button:hover { border-color: #8ab8c0; background: #f2f9f8; }
.grc-pulse span, .grc-pulse strong { display: block; }
.grc-pulse span { min-height: 28px; color: var(--muted); font-size: .59rem; line-height: 1.3; }
.grc-pulse strong { color: var(--navy-950); font-size: .82rem; }
.training-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; }
.lab-list, .submission-list { display: grid; }
.lab-list > div { display: grid; grid-template-columns: 70px 1fr auto 45px 65px; align-items: center; gap: 10px; padding: 13px 18px; border-top: 1px solid #edf1f4; }
.lab-list section strong, .lab-list section small { display: block; }
.lab-list section strong { color: var(--navy-950); font-size: .74rem; }
.lab-list section small { margin-top: 4px; color: var(--muted); font-size: .63rem; }
.lab-list b { color: var(--navy-900); font-size: .72rem; text-align: right; }
.submission-list > div { display: grid; gap: 7px; padding: 15px 18px; border-top: 1px solid #edf1f4; }
.submission-list strong { color: var(--navy-950); font-size: .72rem; }
.submission-list span { color: var(--muted); font-size: .64rem; }

/* Module 2: Enterprise Risk Register */
.risk-hero { background: radial-gradient(circle at 90% 10%, rgba(231,111,81,.22), transparent 32%), linear-gradient(120deg,#173b57,#344f68); }
.risk-metrics { grid-template-columns: repeat(5,1fr); }
.risk-metrics .metric-card { min-width: 0; padding: 16px; }
.risk-metrics .metric-card > strong { font-size: 1.65rem; }
.risk-dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.risk-wide { grid-column: 1 / -1; }
.risk-comparison { min-height: 220px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 20px; text-align: center; }
.risk-comparison div { padding: 20px 12px; border: 1px solid #dfe7eb; border-radius: 11px; background: #fafcfd; }
.risk-comparison span, .risk-comparison strong { display: block; }
.risk-comparison span { color: var(--muted); font-size: .66rem; }
.risk-comparison strong { margin-top: 7px; color: var(--navy-950); font-family: Georgia,serif; font-size: 2rem; }
.risk-comparison i { color: var(--teal-600); font-style: normal; font-size: 1.5rem; }
.risk-comparison b { grid-column: 1 / -1; color: var(--green-600); font-size: .76rem; }
.risk-trend { height: 225px; display: flex; align-items: end; justify-content: center; gap: 24px; padding: 24px 20px 20px; }
.risk-trend div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.risk-trend i { width: 34px; min-height: 5px; border-radius: 6px 6px 0 0; background: linear-gradient(#e76f51,#d5543a); }
.risk-trend strong { color: var(--navy-950); font-size: .7rem; }
.risk-trend span { color: var(--muted); font-size: .62rem; }
.risk-top-list { display: grid; }
.risk-top-list button { display: grid; grid-template-columns: 38px minmax(0,1fr) auto 90px; align-items: center; gap: 12px; padding: 12px 20px; border: 0; border-top: 1px solid #edf1f4; background: white; cursor: pointer; text-align: left; }
.risk-top-list button:hover { background: #f8fbfc; }
.risk-top-list section strong, .risk-top-list section small { display: block; }
.risk-top-list section strong { color: var(--navy-950); font-size: .72rem; }
.risk-top-list section small { margin-top: 3px; color: var(--muted); font-size: .62rem; }
.risk-top-list time { color: var(--muted); font-size: .63rem; text-align: right; }
.overdue-risk-list { display: grid; }
.overdue-risk-list button { display: grid; gap: 4px; padding: 11px 18px; border: 0; border-top: 1px solid #edf1f4; background: white; cursor: pointer; text-align: left; }
.overdue-risk-list button:hover { background: #fff8f6; }
.overdue-risk-list strong { color: var(--navy-950); font-size: .69rem; }
.overdue-risk-list span { color: #a3523e; font-size: .61rem; }
.risk-inventory-table { min-width: 1650px; }
.risk-assessment-form { overflow: hidden; }
.assessment-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.assessment-heading span { color: var(--teal-600); font-size: .68rem; font-weight: 800; }
.assessment-heading h2 { margin: 4px 0; color: var(--navy-950); font-size: 1.05rem; }
.assessment-heading p { max-width: 850px; margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.reduction-badge { min-width: 100px; padding: 11px; border: 1px solid #cce1d8; border-radius: 10px; background: #f0faf5; text-align: center; }
.reduction-badge strong, .reduction-badge span { display: block; }
.reduction-badge strong { color: var(--green-600); font-family: Georgia,serif; font-size: 1.5rem; }
.reduction-badge span { color: #5f7d6e; font-size: .6rem; }
.assessment-columns { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; padding: 20px; }
.assessment-columns section { padding: 16px; border: 1px solid #dfe7eb; border-radius: 10px; background: #fafcfd; }
.assessment-columns h3 { margin: 0 0 14px; color: var(--navy-950); font-size: .78rem; }
.assessment-columns label { display: grid; gap: 5px; margin: 10px 0; color: var(--muted); font-size: .65rem; font-weight: 700; }
.assessment-columns select, .assessment-columns input, .assessment-reason input { height: 36px; padding: 0 9px; border: 1px solid #d5dfe6; border-radius: 8px; background: white; color: var(--ink); font-size: .72rem; }
.assessment-score { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding-top: 12px; margin-top: 12px; border-top: 1px solid #e1e8ec; }
.assessment-score span { color: var(--muted); font-size: .63rem; }
.assessment-score > strong { color: var(--navy-950); font-size: 1.1rem; }
.assessment-reason { flex: 1; display: grid; gap: 5px; color: var(--muted); font-size: .65rem; font-weight: 700; }
.heat-map-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.heat-map { display: grid; grid-template-columns: 90px repeat(5,1fr); gap: 5px; padding: 4px 18px 20px; }
.heat-map > strong { display: grid; place-items: center; min-height: 32px; color: var(--muted); font-size: .57rem; text-align: center; }
.heat-cell { min-height: 62px; display: grid; place-items: center; align-content: center; gap: 2px; border: 1px solid rgba(255,255,255,.75); border-radius: 7px; cursor: pointer; }
.heat-cell:hover { outline: 2px solid var(--navy-900); transform: scale(1.03); }
.heat-cell b { color: var(--navy-950); font-size: .83rem; }
.heat-cell span { color: rgba(16,42,67,.68); font-size: .55rem; }
.heat-low { background: #dff3e8; }.heat-medium { background: #fff0c9; }.heat-high { background: #f8c89d; }.heat-critical { background: #f2a493; }
.categorical-heat { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; padding: 4px 18px 20px; }
.categorical-heat button { min-height: 77px; padding: 10px; border: 1px solid #dbe4e9; border-radius: 8px; background: linear-gradient(135deg,rgba(231,111,81,var(--heat)),#f8fbfc); cursor: pointer; }
.categorical-heat strong, .categorical-heat span { display: block; }
.categorical-heat strong { color: var(--navy-950); font-size: .9rem; }
.categorical-heat span { margin-top: 5px; color: #536776; font-size: .58rem; line-height: 1.3; }
.relationship-workspace { overflow: hidden; }
.risk-relationship-chain { display: flex; align-items: stretch; gap: 8px; padding: 20px; overflow-x: auto; }
.risk-relationship-chain button { min-width: 145px; padding: 12px; border: 1px solid #dbe5e9; border-radius: 9px; background: #fafcfd; text-align: left; }
.risk-relationship-chain button { cursor: pointer; }
.risk-relationship-chain button:hover { border-color: #73aab1; background: #f2f9f8; }
.risk-relationship-chain button.missing { border-style: dashed; border-color: #e2b56d; background: #fffaf0; }
.risk-relationship-chain span, .risk-relationship-chain strong { display: block; }
.risk-relationship-chain span { color: var(--teal-600); font-size: .56rem; font-weight: 800; text-transform: uppercase; }
.risk-relationship-chain strong { margin-top: 6px; color: var(--navy-950); font-size: .67rem; line-height: 1.4; }
.risk-relationship-chain i { align-self: center; color: #8aa0ae; font-style: normal; }
.relationship-completeness { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; padding: 16px 20px 0; }
.relationship-completeness strong { color: var(--navy-950); font-family: Georgia,serif; font-size: 1.35rem; }
.relationship-completeness span { color: var(--muted); font-size: .65rem; font-weight: 700; }
.relationship-completeness div { height: 7px; border-radius: 99px; background: #e8eef1; overflow: hidden; }
.relationship-completeness i { height: 100%; display: block; border-radius: inherit; background: var(--teal-600); }
.missing-mappings { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 20px 18px; }
.missing-mappings span { padding: 5px 8px; border-radius: 99px; color: #8c5c13; background: #fff3d7; font-size: .6rem; font-weight: 700; }
.missing-mappings span.complete { color: #2e6d50; background: #eaf7f0; }
.student-lab-preview { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 19px 20px; margin-top: 15px; border: 1px solid #cbdfe1; border-radius: 11px; background: #f2f9f8; }
.student-lab-preview span, .student-lab-preview strong { display: block; }
.student-lab-preview span { color: var(--teal-600); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.student-lab-preview strong { margin-top: 5px; color: var(--navy-950); font-size: .73rem; }
.student-lab-copy { max-width: 820px; }
.student-lab-copy p, .student-lab-copy small { color: var(--muted); font-size: .65rem; line-height: 1.5; }
.student-lab-copy ol { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px 22px; padding-left: 18px; color: #425866; font-size: .65rem; }
.student-lab-actions { min-width: 150px; display: grid; gap: 7px; }
.inline-link { padding: 0; border: 0; color: var(--blue-600); background: transparent; font-weight: 800; cursor: pointer; }
.risk-auditor-grid { align-items: start; }
.ai-readiness-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; padding: 0 20px 18px; }
.ai-readiness-grid div { padding: 12px; border: 1px solid #e0e7eb; border-radius: 9px; background: #fafcfd; }
.ai-readiness-grid span, .ai-readiness-grid strong { display: block; }
.ai-readiness-grid span { color: var(--muted); font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; }
.ai-readiness-grid strong { margin-top: 5px; color: #425866; font-size: .69rem; line-height: 1.45; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fbfcfd; }
.appetite-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 10px; padding: 18px 20px; }
.appetite-summary > div { padding: 13px; border: 1px solid #dfe7eb; border-radius: 9px; background: #fafcfd; }
.appetite-summary span, .appetite-summary strong { display: block; }
.appetite-summary span { color: var(--muted); font-size: .61rem; }
.appetite-summary strong { margin: 5px 0; color: var(--navy-950); font-size: 1rem; }
.appetite-badge { display: inline-block; padding: 4px 7px; border-radius: 99px; font-size: .56rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.appetite-within { color: #2e6d50; background: #e5f5ed; }
.appetite-near { color: #6d641f; background: #f7f1cf; }
.appetite-above { color: #90600e; background: #fff0c9; }
.appetite-tolerance { color: #9c3f2d; background: #fde5df; }
.appetite-accepted { color: #355f89; background: #e8f1fa; }
.readiness-total { color: var(--teal-600); font-family: Georgia,serif; font-size: 1.5rem; }
.readiness-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 13px 20px; padding: 18px 20px 22px; }
.readiness-grid > div { display: grid; grid-template-columns: 180px 1fr 40px; align-items: center; gap: 9px; }
.readiness-grid span, .readiness-grid strong { color: #425866; font-size: .63rem; }
.readiness-grid strong { text-align: right; }
.readiness-grid > div > div { height: 7px; border-radius: 99px; background: #e8eef1; overflow: hidden; }
.readiness-grid i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,var(--blue-600),var(--teal-600)); }
.lifecycle-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 9px; padding: 18px 20px 22px; }
.lifecycle-summary button { padding: 13px; border: 1px solid #dfe7eb; border-radius: 9px; background: #fafcfd; cursor: pointer; }
.lifecycle-summary strong, .lifecycle-summary span { display: block; }
.lifecycle-summary strong { color: var(--navy-950); font-size: 1.05rem; }
.lifecycle-summary span { margin-top: 4px; color: var(--muted); font-size: .6rem; }
.integrity-checks { display: grid; gap: 7px; padding: 16px 20px 21px; }
.integrity-checks span { padding: 7px 9px; border-radius: 7px; font-size: .63rem; font-weight: 700; }
.integrity-checks .pass { color: #2e6d50; background: #eaf7f0; }
.integrity-checks .fail { color: #9c3f2d; background: #fde5df; }
.inventory-tools { display: flex; align-items: center; gap: 9px; }
.column-picker { position: relative; }
.column-picker summary { height: 36px; display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); cursor: pointer; font-size: .72rem; font-weight: 700; }
.column-picker > div { width: 245px; max-height: 310px; position: absolute; z-index: 20; right: 0; top: 41px; display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: var(--shadow); overflow-y: auto; }
.column-picker label { color: #4d6170; font-size: .68rem; }
.kri-impact-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; padding: 18px 20px 22px; }
.kri-impact-grid button { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px; border: 1px solid #dfe7eb; border-radius: 9px; background: #fafcfd; cursor: pointer; text-align: left; }
.kri-impact-grid strong { color: var(--navy-950); font-size: .67rem; }
.kri-impact-grid > button > span:last-child { grid-column: 1 / -1; color: var(--muted); font-size: .61rem; }
.risk-profile-page > .text-button { margin-bottom: 14px; }
.risk-profile-page > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px; border-radius: 14px; color: white; background: linear-gradient(120deg,#173b57,#344f68); }
.risk-profile-page > header span { font-size: .64rem; font-weight: 800; }
.risk-profile-page > header h1 { margin: 5px 0; font-family: Georgia,serif; font-size: 1.7rem; font-weight: 600; }
.risk-profile-page > header p { margin: 0; color: #d9e4eb; font-size: .7rem; }
.risk-profile-page > header > div:last-child { display: flex; gap: 7px; }
.risk-profile-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px 0; }
.risk-profile-sections { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.profile-section-body { padding: 16px 20px 20px; color: #4c606e; font-size: .72rem; line-height: 1.65; }
.ownership-gap-list { display: grid; gap: 8px; }
.ownership-gap-list button { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px; border: 1px solid #e0e7eb; border-radius: 9px; background: #fafcfd; cursor: pointer; text-align: left; }
.ownership-gap-list button:hover { border-color: #e0b363; background: #fffaf0; }
.ownership-gap-list strong { color: var(--navy-950); font-size: .74rem; }
.ownership-gap-list span { color: #9a6817; font-size: .66rem; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(12, 32, 48, .52); backdrop-filter: blur(3px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(680px, 100%); max-height: 90vh; display: flex; flex-direction: column; border-radius: 16px; background: white; box-shadow: 0 24px 70px rgba(9,29,45,.25); overflow: hidden; }
.modal-header, .drawer-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-header h2, .drawer-header h2 { margin: 3px 0 0; color: var(--navy-950); font-family: Georgia, serif; font-size: 1.45rem; font-weight: 600; }
.modal-body { max-height: 62vh; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px; overflow-y: auto; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #536676; font-size: .7rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 11px; border: 1px solid #d5dfe6; border-radius: 8px; color: var(--ink); background: white; outline: none; font-size: .78rem; }
.field textarea { min-height: 86px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(45,121,183,.1); }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 22px; border-top: 1px solid var(--line); background: #fbfcfd; }

.detail-drawer { width: min(520px, 92vw); position: fixed; z-index: 90; inset: 0 0 0 auto; transform: translateX(105%); background: white; box-shadow: -16px 0 48px rgba(9,29,45,.16); transition: transform .24s ease; }
.detail-drawer.open { transform: translateX(0); }
.drawer-content { height: calc(100vh - 82px); padding: 22px; overflow-y: auto; }
.drawer-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(12,32,48,.32); }
.drawer-scrim[hidden] { display: none; }
.detail-section { margin-bottom: 22px; }
.detail-section h3 { margin: 0 0 10px; color: var(--navy-950); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-field { padding: 11px; border: 1px solid #e3e9ed; border-radius: 8px; background: #fafcfd; }
.detail-field span, .detail-field strong { display: block; }
.detail-field span { color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; }
.detail-field strong { margin-top: 5px; color: var(--navy-950); font-size: .76rem; }
.detail-copy { color: #506270; font-size: .78rem; line-height: 1.65; }
.drawer-actions { display: flex; gap: 8px; margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); }

.toast-region { position: fixed; z-index: 200; right: 22px; bottom: 22px; display: grid; gap: 8px; }
.toast { min-width: 260px; padding: 13px 15px; border: 1px solid #cfe2db; border-radius: 10px; color: #285943; background: #f0faf5; box-shadow: var(--shadow); font-size: .75rem; animation: toastIn .22s ease; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }
.mobile-only { display: none; }

@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .risk-metrics { grid-template-columns: repeat(2, 1fr); }
  .risk-dashboard-grid, .heat-map-grid { grid-template-columns: 1fr; }
  .timeline-panel { grid-column: auto; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .global-search { width: 190px; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 18px 0 40px rgba(9,29,45,.2); }
  .main { width: 100%; margin-left: 0; }
  .mobile-only { display: grid; }
  .topbar { padding: 0 16px; }
  .breadcrumb { display: none; }
  .global-search { display: none; }
  .profile-button b { display: none; }
  .content { padding: 24px 16px 45px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 1.8rem; }
  .metrics-grid { grid-template-columns: 1fr; }
  .risk-profile { flex-direction: column; gap: 22px; }
  .bar-chart { gap: 5px; padding-left: 10px; padding-right: 10px; }
  .bar-group label { font-size: .52rem; }
  .priority-row { grid-template-columns: 37px 1fr 72px; }
  .priority-row time { display: none; }
  .timeline { grid-template-columns: 1fr; }
  .register-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-group { flex-wrap: wrap; }
  .table-search { width: 100%; }
  .coso-grid { grid-template-columns: 1fr; }
  .scope-hero { flex-direction: column; }
  .scope-hero-meta { justify-content: flex-start; }
  .scope-metrics { grid-template-columns: 1fr 1fr; }
  .scope-dashboard-grid { grid-template-columns: 1fr; }
  .scope-panel-wide { grid-column: auto; }
  .scope-completion { grid-template-columns: 1fr; justify-items: center; }
  .scope-completion-list { width: 100%; }
  .scope-governance-stats { grid-template-columns: 1fr; }
  .relationship-map { grid-template-columns: 1fr; }
  .relationship-node:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -17px; transform: translateX(-50%); }
  .dependency-chain { grid-template-columns: 1fr; overflow: visible; }
  .dependency-arrow { transform: none; }
  .auditor-grid { grid-template-columns: 1fr; }
  .auditor-package-grid { grid-template-columns: 1fr 1fr; }
  .record-actions { align-items: stretch; flex-direction: column; }
  .inventory-tools { width: 100%; align-items: stretch; flex-direction: column; }
  .column-picker > div { left: 0; right: auto; }
  .grc-pulse { grid-template-columns: repeat(2,1fr); }
  .training-grid { grid-template-columns: 1fr; }
  .documentation-layout { grid-template-columns: 1fr; }
  .risk-metrics { grid-template-columns: 1fr 1fr; }
  .risk-dashboard-grid, .heat-map-grid { grid-template-columns: 1fr; }
  .assessment-columns { grid-template-columns: 1fr; }
  .assessment-heading { flex-direction: column; }
  .heat-map { grid-template-columns: 64px repeat(5,minmax(48px,1fr)); overflow-x: auto; }
  .categorical-heat { grid-template-columns: 1fr 1fr; }
  .student-lab-preview { align-items: flex-start; flex-direction: column; }
  .student-lab-copy ol { grid-template-columns: 1fr; }
  .student-lab-actions { width: 100%; }
  .appetite-summary, .readiness-grid, .kri-impact-grid, .risk-profile-sections { grid-template-columns: 1fr; }
  .readiness-grid > div { grid-template-columns: 125px 1fr 38px; }
  .risk-profile-page > header { flex-direction: column; }
  .ai-readiness-grid { grid-template-columns: 1fr; }
  .documentation-index { grid-template-columns: 1fr; }
  .documentation-reader > header { flex-direction: column; }
  .documentation-body { padding: 22px 18px 30px; }
  .document-levels { grid-template-columns: 1fr; }
  .lab-list > div { grid-template-columns: 60px 1fr auto; }
  .lab-list b, .lab-list .text-button { grid-column: auto; }
  .audit-history > div:not(.empty-state) { grid-template-columns: 1fr; gap: 5px; }
  .modal-body { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --ink:#d9e4eb; --muted:#9fb0bd; --line:#344b5d; --canvas:#0f1d29; --surface:#172938; --navy-950:#edf6fb; --navy-900:#b9d8ea; }
  body, .topbar, .panel, .metric-card, .scope-table-shell, .register-shell, .modal, .detail-drawer, .data-table td, .risk-inventory-table .frozen-select, .risk-inventory-table [data-risk-col="id"], .column-picker summary, .column-picker > div { background:#172938; }
  .data-table th, .risk-inventory-table th.frozen-select, .risk-inventory-table th[data-risk-col="id"], .table-footer, .ai-actions { background:#203545; }
  .filter-control, .table-search, .field input, .field select, .field textarea, .assessment-columns select, .assessment-columns input { color:var(--ink); background:#10222f; }
  .assessment-columns section, .detail-field, .appetite-summary > div, .lifecycle-summary button, .ai-readiness-grid div, .kri-impact-grid button { background:#1b3040; }
  .button.secondary, .icon-button { color:var(--ink); background:#203545; }
}

/* Global dark enterprise readability restoration */
:root {
  color-scheme: dark;
  --navy-950: #f4f8fb;
  --navy-900: #c8e0ee;
  --navy-800: #326783;
  --blue-600: #70bdf0;
  --teal-600: #55c3ba;
  --teal-100: #143f43;
  --coral-600: #ff8067;
  --coral-100: #4b2928;
  --amber-500: #f0b64d;
  --amber-100: #49391e;
  --green-600: #6ecb9a;
  --green-100: #173d31;
  --ink: #e8f0f5;
  --muted: #afc0cc;
  --line: #294457;
  --canvas: #081522;
  --surface: #112637;
  --shadow: 0 14px 38px rgba(0, 0, 0, .24);
}

html { font-size: 16px; }
body { color: var(--ink); background: radial-gradient(circle at 85% 0, #102a3c 0, var(--canvas) 34%); }
.sidebar { color: #e1edf4; background: #071521; border-right: 1px solid #203b4e; }
.brand span, .period-card span, .period-card small { color: #a8bdca; }
.nav-label { color: #91adbd; }
.nav-item { color: #c7d9e3; font-weight: 600; }
.nav-item:hover { color: #fff; background: #132e40; }
.nav-item.active { color: #fff; background: #1d4d68; box-shadow: inset 3px 0 #63d0c7; }
.nav-icon, .module-number, .nav-count { color: #add0df; }
.sidebar-footer { border-top-color: #203b4e; }
.period-card { border-color: #29485c; background: #0d2231; }

.topbar {
  border-bottom-color: var(--line);
  color: var(--ink);
  background: rgba(8, 22, 34, .96);
}
.breadcrumb span, .breadcrumb b { color: #b6c7d2; }
.global-search, .filter-control, .table-search,
.field input, .field select, .field textarea,
.assessment-columns select, .assessment-columns input, .assessment-reason input {
  border-color: #38566a;
  color: #f2f7fa;
  background: #0b1e2c;
}
.global-search input { color: #f2f7fa; }
input::placeholder, textarea::placeholder { color: #91a8b7; opacity: 1; }
select option { color: #eef5f8; background: #102535; }
.global-search kbd { border-color: #3a5669; color: #c4d5df; background: #183244; }
.icon-button, .button.secondary {
  border-color: #3a586b;
  color: #edf5f9;
  background: #193447;
}
.icon-button:hover, .button.secondary:hover { background: #23485f; }
.button.primary { color: #fff; background: #246486; }
.button.primary:hover { background: #2d789e; }
.button.danger { color: #ffc1b5; border-color: #8a4439; background: #432521; }
.text-button, .inline-link, .document-link { color: #78c8fa; }
.more-button { color: #bfd0da; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid #79d8ff;
  outline-offset: 3px;
}

.page-heading h1, .scope-section-heading h2 { color: #f7fbfd; font-weight: 700; }
.page-heading p, .scope-section-heading p { color: #b9c9d3; }
.eyebrow { color: #71d5cc !important; }
.scope-hero, .risk-hero, .risk-profile-page > header {
  border-color: #31566c;
  background: radial-gradient(circle at 88% 10%, rgba(85,195,186,.18), transparent 32%), linear-gradient(120deg, #0c2c42, #153f57);
}
.scope-hero h1, .risk-profile-page > header h1 { color: #fff; font-weight: 700; }
.scope-hero p:not(.eyebrow), .risk-profile-page > header p { color: #d6e5ed; }

.metric-card, .panel, .register-shell, .scope-table-shell, .coso-card,
.dependency-path, .modal, .detail-drawer {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.metric-top { color: #c2d1da; font-size: .8rem; font-weight: 700; }
.metric-card > strong { color: #fff; font-weight: 700; }
.metric-card small { color: #afc2ce; font-size: .72rem; }
.panel-heading h2, .coso-card h3 { color: #f4f9fc; font-size: 1rem; font-weight: 750; }
.panel-heading p, .coso-card p { color: #b5c6d0; font-size: .74rem; }
.metric-icon.blue { color: #8ed2ff; background: #173e59; }
.metric-icon.coral { color: #ff9b87; background: #4b2928; }
.metric-icon.teal { color: #7ce0d7; background: #173f43; }
.metric-icon.amber { color: #ffd27a; background: #49391e; }
.attention-banner { border-color: #705822; background: #302819; }
.attention-icon { color: #ffd27a; background: #503d1b; }
.attention-banner strong { color: #ffe5ad; }
.attention-banner span, .attention-banner .text-button { color: #e5c989; }

.scope-tabs { border-color: #304d60; background: #0b1d2b; }
.scope-tab { color: #b8cad5; font-size: .72rem; }
.scope-tab:hover { color: #fff; background: #19384b; }
.scope-tab.active { color: #fff; background: #24546d; box-shadow: inset 0 0 0 1px #3b718b; }

.panel-heading, .register-toolbar, .record-actions, .scope-table-toolbar,
.assessment-heading, .dependency-path > header, .documentation-reader > header,
.ai-actions, .modal-footer, .modal-header, .drawer-header {
  border-color: var(--line);
  background: #102535;
}
.bar-chart, .priority-row, .test-stat, .timeline-item, .scope-completion-item,
.auditor-question, .auditor-facts div, .audit-history > div:not(.empty-state),
.lab-list > div, .submission-list > div, .risk-top-list button,
.overdue-risk-list button { border-color: #294457; }
.priority-row:hover, .risk-top-list button:hover, .overdue-risk-list button:hover { background: #183246; }
.priority-title strong, .timeline-item strong, .test-stat strong,
.risk-top-list section strong, .overdue-risk-list strong,
.lab-list section strong, .submission-list strong { color: #f0f6f9; }
.priority-title span, .priority-row time, .timeline-item span,
.risk-top-list section small, .risk-top-list time,
.lab-list section small, .submission-list span { color: #afc2ce; }
.testing-note { color: #f0d9a4; background: #342b1b; }
.donut::after, .progress-ring::after { background: var(--surface); }
.donut strong, .progress-ring strong, .legend-row strong { color: #fff; }
.donut span, .progress-ring span, .legend-row span,
.bar-group label, .chart-legend { color: #b5c7d2; }

.data-table { background: var(--surface); }
.data-table th {
  border-color: #3a5669;
  color: #dbe8ef;
  background: #1b384b;
  font-size: .73rem;
  font-weight: 750;
}
.data-table td {
  border-color: #274254;
  color: #d6e2e9;
  background: #112637;
  font-size: .8rem;
  line-height: 1.45;
}
.data-table tbody tr:nth-child(even) td { background: #0e2231; }
.data-table tbody tr:hover td { color: #fff; background: #1b3b50; }
.data-table td strong, .scope-id, .relationship-cell, .data-table a { color: #8bd1fb; font-weight: 800; }
.risk-inventory-table .frozen-select,
.risk-inventory-table [data-risk-col="id"] { background: #112637; }
.risk-inventory-table tbody tr:nth-child(even) .frozen-select,
.risk-inventory-table tbody tr:nth-child(even) [data-risk-col="id"] { background: #0e2231; }
.risk-inventory-table tbody tr:hover .frozen-select,
.risk-inventory-table tbody tr:hover [data-risk-col="id"] { background: #1b3b50; }
.risk-inventory-table th.frozen-select,
.risk-inventory-table th[data-risk-col="id"] { background: #1b384b; }
.risk-inventory-table [data-risk-col="id"] { box-shadow: 1px 0 #3a5669; }
.table-footer { color: #b9c9d3; background: #0d202e; }
.empty-state { color: #b3c4ce; }
.empty-state strong { color: #fff; }

.status-badge, .scope-status, .appetite-badge, .score-pill { font-weight: 800; }
.status-open, .status-failed, .crit-critical, .appetite-tolerance { color: #ffd6ce; background: #7c3028; }
.status-progress, .scope-review, .appetite-near, .appetite-above, .score-medium { color: #ffe5a8; background: #6a4d18; }
.status-monitoring, .crit-medium { color: #c5f7f1; background: #1c625e; }
.status-closed, .status-effective, .scope-in, .appetite-within, .score-low { color: #d4f7e5; background: #236446; }
.crit-high, .score-high { color: #ffe0c1; background: #91491f; }
.scope-out { color: #e1e9ee; background: #455967; }
.appetite-accepted { color: #d8ebff; background: #315b80; }

.mini-bar-row label, .scope-completion-item span, .matrix-note,
.dependency-path > header span, .auditor-question span, .auditor-facts span,
.audit-history time, .audit-log time, .audit-log small,
.auditor-package-grid span, .documentation-index small,
.methodology-stack p, .grc-pulse span, .risk-comparison span,
.risk-trend span, .assessment-heading p, .assessment-columns label,
.assessment-score span, .assessment-reason, .relationship-completeness span,
.student-lab-copy p, .student-lab-copy small, .ai-readiness-grid span,
.appetite-summary span, .readiness-grid span, .lifecycle-summary span,
.kri-impact-grid > button > span:last-child, .detail-field span {
  color: #b4c6d1;
}
.mini-bar-row strong, .scope-completion-item strong, .scope-governance-stats strong,
.dependency-path > header strong, .auditor-facts strong, .audit-history strong,
.audit-log header strong, .auditor-package-grid strong,
.documentation-index span, .documentation-reader > header h2,
.document-levels strong, .methodology-stack strong, .grc-pulse strong,
.risk-comparison strong, .risk-trend strong, .assessment-heading h2,
.assessment-columns h3, .assessment-score > strong,
.relationship-completeness strong, .student-lab-preview strong,
.appetite-summary strong, .lifecycle-summary strong, .kri-impact-grid strong,
.modal-header h2, .drawer-header h2, .detail-section h3, .detail-field strong,
.ownership-gap-list strong { color: #f4f9fc; }

.relationship-node, .scope-detail-list li, .scope-placeholder,
.scope-governance-stats div, .dependency-node, .audit-log > div,
.auditor-package-grid > div, .document-levels div, .methodology-stack > div,
.grc-pulse button, .risk-comparison div, .assessment-columns section,
.risk-relationship-chain button, .ai-readiness-grid div,
.appetite-summary > div, .lifecycle-summary button,
.column-picker summary, .column-picker > div, .kri-impact-grid button,
.ownership-gap-list button, .detail-field {
  border-color: #345267;
  color: var(--ink);
  background: #162e40;
}
.relationship-node strong, .dependency-node strong,
.risk-relationship-chain strong, .ai-readiness-grid strong,
.auditor-question strong, .audit-history span, .auditor-package-grid small,
.profile-section-body, .detail-copy, .scope-detail-list li { color: #d6e3ea; }
.relationship-node small, .dependency-node small { color: #b5c7d2; }
.relationship-node span, .dependency-node span, .risk-relationship-chain span { color: #72d9d0; }
.dependency-node:hover, .grc-pulse button:hover,
.risk-relationship-chain button:hover, .ownership-gap-list button:hover {
  border-color: #5a9db1;
  color: #fff;
  background: #20465b;
}
.risk-relationship-chain button.missing { border-color: #8a6827; background: #3a2e19; }
.scope-placeholder { border-style: dashed; }
.mini-bar-track, .coverage-meter, .relationship-completeness div,
.readiness-grid > div > div { background: #294355; }

.documentation-index button { border-color: #345267; color: var(--ink); background: #112637; }
.documentation-index button:hover { border-color: #5a9db1; background: #1a3a4e; }
.documentation-index button.active { border-color: #62c9c0; background: #174147; }
.documentation-body { color: #d6e3ea; font-size: .8rem; }
.documentation-body h2, .documentation-body h3 { color: #f4f9fc; }
.documentation-body h3 { border-color: #345267; }
.document-flow, .trace-ribbon { border-color: #345267; background: #0e2231; }
.document-flow span, .trace-ribbon span { border-color: #3c5c70; color: #d9ebf5; background: #173246; }

.risk-top-list button, .overdue-risk-list button { color: var(--ink); background: var(--surface); }
.overdue-risk-list span { color: #ff9c88; font-weight: 700; }
.reduction-badge { border-color: #357058; background: #173a2e; }
.reduction-badge strong { color: #7ee0ad; }
.reduction-badge span { color: #b9d9c9; }
.student-lab-preview { border-color: #35616a; background: #12343b; }
.student-lab-copy ol { color: #d4e1e8; }
.readiness-grid span, .readiness-grid strong { color: #d5e2e9; }
.integrity-checks .pass { color: #d4f7e5; background: #20573e; }
.integrity-checks .fail { color: #ffd6ce; background: #742e27; }
.column-picker label, .field label { color: #c5d4dd; }

.heat-map > strong { color: #d3e1e8; font-size: .7rem; font-weight: 800; }
.heat-cell { border-color: rgba(255,255,255,.16); }
.heat-cell b { color: #fff; font-size: .95rem; font-weight: 850; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.heat-cell span { color: #f4f8fb; font-size: .65rem; font-weight: 700; }
.heat-low { background: #246246; }
.heat-medium { background: #8a621b; }
.heat-high { background: #a55324; }
.heat-critical { background: #9b382f; }
.categorical-heat button { border-color: #3a5669; background: linear-gradient(135deg, rgba(255,128,103,var(--heat)), #163044); }
.categorical-heat strong { color: #fff; font-weight: 800; }
.categorical-heat span { color: #d5e2e9; }

.modal-backdrop { background: rgba(2, 10, 17, .76); }
.modal-body, .drawer-content { color: var(--ink); background: #0d202e; }
.drawer-scrim { background: rgba(2,10,17,.62); }
.toast { border-color: #3c795e; color: #d6f7e6; background: #1a4736; }

@media (max-width: 760px) {
  html { font-size: 15px; }
}

/* Module 3: Control Library */
.control-hero {
  background: radial-gradient(circle at 88% 10%, rgba(112,189,240,.18), transparent 32%), linear-gradient(120deg, #0c2c42, #173d54);
}
.control-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.control-metrics .metric-card { min-width: 0; padding: 16px; }
.control-metrics .metric-card > strong { font-size: 1.65rem; }
.control-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.control-wide { grid-column: 1 / -1; }
.control-inventory-table { min-width: 3300px; }
.control-inventory-table tbody tr { cursor: pointer; }
.control-statement-cell { min-width: 320px; max-width: 420px; white-space: normal; }
.control-drawer-header { margin-bottom: 18px; padding: 16px; border: 1px solid #345267; border-radius: 10px; background: #162e40; }
.control-drawer-header > div { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.control-drawer-header p { margin: 0; color: #d6e3ea; font-size: .76rem; line-height: 1.6; }
.detail-stack { display: grid; gap: 9px; }
.detail-stack > div { padding: 11px 12px; border: 1px solid #345267; border-radius: 8px; background: #162e40; }
.detail-stack span, .detail-stack strong { display: block; }
.detail-stack span { color: #b4c6d1; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.detail-stack strong { margin-top: 5px; color: #f4f9fc; font-size: .72rem; line-height: 1.5; }
.auditor-action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.control-auditor-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.control-auditor-facts .auditor-question:nth-child(odd) { border-right: 1px solid #294457; }
.scope-section-heading .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
.governance-score-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; padding: 18px 20px 22px; }
.governance-score-grid > div { padding: 13px; border: 1px solid #345267; border-radius: 9px; background: #162e40; }
.governance-score-grid span, .governance-score-grid strong { display: block; }
.governance-score-grid span { color: #b4c6d1; font-size: .63rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.governance-score-grid strong { margin-top: 5px; color: #fff; font-family: Georgia,serif; font-size: 1.35rem; }
.governance-ranking { display: grid; gap: 0; padding-bottom: 10px; }
.governance-ranking button { display: flex; justify-content: space-between; gap: 12px; padding: 11px 18px; border: 0; border-top: 1px solid #294457; color: #d6e3ea; background: transparent; text-align: left; cursor: pointer; }
.governance-ranking button:hover { background: #1b3b50; }
.governance-ranking strong { color: #8bd1fb; }
.rcm-table { min-width: 3100px; }
.version-timeline { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 18px 20px 22px; }
.version-timeline > div { padding: 15px; border: 1px solid #345267; border-radius: 10px; background: #162e40; }
.version-timeline strong, .version-timeline p, .version-timeline small { display: block; }
.version-timeline strong { margin-top: 9px; color: #f4f9fc; }
.version-timeline p { color: #d6e3ea; font-size: .72rem; line-height: 1.5; }
.version-timeline small { margin-bottom: 12px; color: #b4c6d1; }
.assertion-heatmap { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.assertion-heatmap button { min-height: 110px; padding: 14px; border: 1px solid #3a5669; border-radius: 10px; color: #fff; background: linear-gradient(135deg,rgba(64,195,159,var(--assertion-heat)),#153044); cursor: pointer; }
.assertion-heatmap span, .assertion-heatmap strong, .assertion-heatmap small { display: block; }
.assertion-heatmap strong { margin: 8px 0; font-size: 1.7rem; }
.assertion-heatmap small { color: #d5e2e9; }
.coverage-heatmap { display: grid; gap: 12px; padding: 18px 20px 22px; }
.coverage-heatmap > div { display: grid; grid-template-columns: 180px 1fr 60px; align-items: center; gap: 10px; }
.coverage-heatmap span { color: #d6e3ea; text-transform: capitalize; }
.coverage-heatmap strong { grid-column: 3; grid-row: 1; color: #fff; text-align: right; }
.coverage-heatmap i { grid-column: 2; grid-row: 1; height: 9px; border-radius: 99px; background: linear-gradient(90deg,#63d0c7 var(--coverage),#294355 var(--coverage)); }
.relationship-explorer { display: flex; align-items: stretch; gap: 8px; padding: 16px; margin-bottom: 16px; overflow-x: auto; border: 1px solid #345267; border-radius: 12px; background: #0e2231; }
.relationship-explorer > i { align-self: center; color: #72d9d0; font-style: normal; }
.relationship-explorer section { min-width: 190px; display: grid; align-content: start; gap: 7px; }
.relationship-explorer header { color: #72d9d0; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.relationship-explorer button { padding: 10px; border: 1px solid #345267; border-radius: 8px; color: #d6e3ea; background: #162e40; text-align: left; cursor: pointer; }
.relationship-explorer button:hover { border-color: #5a9db1; background: #20465b; }
.relationship-explorer strong, .relationship-explorer small { display: block; }
.relationship-explorer strong { font-size: .7rem; }
.relationship-explorer small { margin-top: 4px; color: #b4c6d1; font-size: .58rem; }

/* Module 4: Risk-Control Matrix */
.rcm-hero { background: radial-gradient(circle at 88% 10%, rgba(226,168,59,.16), transparent 32%), linear-gradient(120deg,#0b2b42,#29445c); }
.rcm-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); }
.rcm-metrics .metric-card { min-width: 0; padding: 16px; }
.rcm-metrics .metric-card > strong { font-size: 1.6rem; }
.rcm-core-table { min-width: 5100px; }
.table-id-link { padding: 0; border: 0; color: #8bd1fb; background: transparent; font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(139,209,251,.4); text-underline-offset: 3px; }
.table-id-link:hover, .table-id-link:focus-visible { color: #fff; text-decoration-color: #72d9d0; outline: 2px solid #72d9d0; outline-offset: 3px; }
.rcm-coverage-visual { margin-bottom: 16px; }
.rcm-coverage-flow { display: grid; grid-template-columns: minmax(150px,.7fr) auto minmax(360px,2fr) auto minmax(150px,.7fr); align-items: center; gap: 13px; padding: 18px 20px; }
.rcm-coverage-flow > div:not(.control-cluster) { padding: 18px; border: 1px solid #3a5c70; border-radius: 11px; background: #122d40; }
.rcm-coverage-flow > i { color: #72d9d0; font-size: 1.25rem; font-style: normal; }
.rcm-coverage-flow span, .rcm-coverage-flow strong, .rcm-coverage-flow small { display: block; }
.rcm-coverage-flow span { color: #b4c6d1; font-size: .66rem; font-weight: 700; }
.rcm-coverage-flow strong { margin-top: 6px; color: #fff; }
.control-cluster { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.control-cluster button { padding: 11px; border: 1px solid #3a5c70; border-radius: 9px; color: #dce8ee; background: #17364a; text-align: left; cursor: pointer; }
.control-cluster button:hover { border-color: #72d9d0; background: #20485d; }
.control-cluster small { margin-top: 4px; color: #a9c3d0; }
.rcm-coverage-score-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; padding: 0 20px 20px; }
.rcm-coverage-score-grid > div { position: relative; overflow: hidden; padding: 13px; border: 1px solid #345267; border-radius: 9px; background: #142f42; }
.rcm-coverage-score-grid span, .rcm-coverage-score-grid strong { display: block; }
.rcm-coverage-score-grid span { color: #b9ccd6; font-size: .62rem; font-weight: 700; text-transform: uppercase; }
.rcm-coverage-score-grid strong { margin: 7px 0 10px; color: #fff; font-size: 1rem; }
.rcm-coverage-score-grid i { display: block; width: var(--score); height: 4px; border-radius: 99px; background: #63d0c7; }
.auditor-action-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border: 1px solid #345267; border-radius: 11px; background: #122b3d; }
.scoring-rubric { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 14px 0; }
.scoring-rubric div { padding: 10px; border: 1px solid #416778; border-radius: 8px; background: #16384a; }
.scoring-rubric span, .scoring-rubric strong { display: block; }
.scoring-rubric span { color: #c0d2dc; font-size: .62rem; }
.scoring-rubric strong { margin-top: 5px; color: #fff; }
.framework-summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.framework-summary-grid .governance-score-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.residual-method-card { margin-bottom: 16px; }
.rcm-appetite-panel { margin: 16px 0; }
.rcm-appetite { padding: 14px 18px 16px; }
.rcm-appetite-track { position: relative; height: 13px; margin: 10px 6px 12px; border-radius: 99px; background: linear-gradient(90deg,#347d66 0 28%,#b6852d 28% 52%,#c76d32 52% 72%,#b84d58 72% 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.rcm-appetite-track i { position: absolute; inset: 0 auto 0 0; width: 28%; border-radius: 99px; background: rgba(99,208,199,.18); }
.rcm-appetite-track b, .rcm-appetite-track strong { position: absolute; top: 50%; width: 3px; height: 23px; transform: translate(-50%,-50%); border-radius: 3px; background: #d6e9f2; box-shadow: 0 0 0 2px #102a3c; }
.rcm-appetite-track b.tolerance { background: #f0b35c; }
.rcm-appetite-track strong { width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: #72d9d0; }
.rcm-appetite > div:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: #c4d7e1; font-size: .65rem; }
.rcm-appetite-list { display: grid; gap: 10px; padding: 5px 18px 18px; }
.rcm-appetite-list section { padding: 10px 12px 0; border: 1px solid #345267; border-radius: 10px; background: #122d40; }
#rcmView .scope-tabs { overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
#rcmView .rcm-tab { flex: 0 0 auto; white-space: nowrap; }
#rcmView .data-table th, #rcmView .data-table td { padding: 8px 10px; line-height: 1.35; vertical-align: top; }
#rcmView .data-table td { overflow-wrap: anywhere; }
#rcmView .governance-ranking span small { display: block; margin-top: 4px; color: #b9ccd6; line-height: 1.4; }
.detail-field-wide { grid-column: 1 / -1; }
#detailDrawer, #drawerContent { overflow-x: hidden; }
#drawerContent .detail-field strong, #drawerContent p { overflow-wrap: anywhere; }
#drawerContent .data-table-wrap { max-width: 100%; overflow-x: auto; }
#rcmView .risk-comparison { padding: 10px 20px 20px; }
#rcmView .risk-comparison div { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid #294457; }
#rcmView .risk-comparison span, #rcmView .risk-comparison small { color: #b4c6d1; }
#rcmView .risk-comparison strong { color: #f4f9fc; }
#rcmView .student-lab-copy section { padding: 10px 0; border-top: 1px solid #35616a; }
#rcmView .student-lab-copy h3 { margin: 0 0 4px; color: #f4f9fc; font-size: .78rem; }
.sample-solution { margin-top: 9px; border: 1px solid #3a5c70; border-radius: 9px; background: #122d40; }
.sample-solution summary { padding: 10px 12px; color: #8bd1fb; font-size: .68rem; font-weight: 800; cursor: pointer; }
.sample-solution > div { display: grid; gap: 6px; padding: 0 12px 12px; }
.sample-solution span { color: #72d9d0; font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.sample-solution strong, .sample-solution p { margin: 0; color: #dce8ee; font-size: .68rem; line-height: 1.5; }

@media (max-width:1100px) {
  .rcm-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rcm-coverage-flow { grid-template-columns: 1fr; }
  .rcm-coverage-flow > i { transform: rotate(90deg); text-align: center; }
  .rcm-coverage-score-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .framework-summary-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width:760px) {
  .rcm-metrics, .workflow-metrics { grid-template-columns: 1fr; }
  .rcm-coverage-score-grid, .framework-summary-grid { grid-template-columns: 1fr; }
  .rcm-appetite > div:last-child { align-items: flex-start; flex-direction: column; }
  #rcmView .scope-section-heading, #rcmView .panel-heading { align-items: flex-start; flex-direction: column; }
  #rcmView .heading-actions { width: 100%; }
  #rcmView .heading-actions .button, #rcmView .heading-actions .filter-control { flex: 1 1 160px; }
}
.control-profile-page > header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 25px; border: 1px solid #31566c; border-radius: 14px; color: white;
  background: radial-gradient(circle at 88% 10%, rgba(85,195,186,.18), transparent 32%), linear-gradient(120deg, #0c2c42, #153f57);
}
.control-profile-page > header span { font-size: .66rem; font-weight: 800; }
.control-profile-page > header h1 { margin: 5px 0; color: #fff; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 700; }
.control-profile-page > header p { max-width: 900px; margin: 0; color: #d6e5ed; font-size: .72rem; line-height: 1.55; }
.control-profile-page > header > div:last-child { display: flex; flex-wrap: wrap; gap: 7px; }

@media (max-width: 1100px) {
  .control-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control-dashboard-grid { grid-template-columns: 1fr; }
  .control-wide { grid-column: auto; }
}

@media (max-width: 760px) {
  .control-metrics { grid-template-columns: 1fr 1fr; }
  .control-profile-page > header { flex-direction: column; }
  .control-auditor-facts { grid-template-columns: 1fr; }
  .control-auditor-facts .auditor-question:nth-child(odd) { border-right: 0; }
  .governance-score-grid, .assertion-heatmap, .version-timeline { grid-template-columns: 1fr 1fr; }
}

/* Module 5: Control Testing */
.testing-hero { background: radial-gradient(circle at 88% 10%, rgba(99,208,199,.18), transparent 32%), linear-gradient(120deg,#092c43,#244b60); }
#testingView .scope-tabs { overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
#testingView .testing-tab { flex: 0 0 auto; white-space: nowrap; }
#testingView .workflow-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); }
#testingView .metric-card { min-width: 0; }
#testingView .metric-card > strong { color: #fff; font-size: 1.55rem; }
#testingView .data-table th, #testingView .data-table td { padding: 9px 10px; line-height: 1.4; vertical-align: top; }
#testingView .data-table td { color: #dce8ee; overflow-wrap: anywhere; }
#testingView .data-table th { color: #f4f9fc; }
.testing-inventory-table { min-width: 1900px; }
.testing-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 16px 20px; }
.testing-actions .button { justify-content: center; min-height: 38px; }
#testingView .documentation-layout { margin-bottom: 18px; }
#testingView .student-lab-copy section { padding: 11px 0; border-top: 1px solid #35616a; }
#testingView .student-lab-copy h3 { margin: 0 0 5px; color: #f4f9fc; font-size: .78rem; }
#testingView .ai-readiness-grid strong { overflow-wrap: anywhere; }
#testingView .scope-section-heading .filter-control { min-width: 280px; }
.executive-score-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.score-gauge { display: grid; place-items: center; min-height: 170px; padding: 14px; border: 1px solid #36596d; border-radius: 13px; background: #102b3d; }
.score-gauge::before { content: ""; grid-area: 1/1; width: 118px; height: 118px; border-radius: 50%; background: conic-gradient(#63d0c7 calc(var(--gauge)*1%),#294555 0); -webkit-mask: radial-gradient(circle,#0000 53%,#000 55%); mask: radial-gradient(circle,#0000 53%,#000 55%); }
.score-gauge > div { grid-area: 1/1; max-width: 105px; text-align: center; }
.score-gauge strong,.score-gauge span { display: block; }
.score-gauge strong { color: #fff; font-size: 1.35rem; }
.score-gauge span { margin-top: 5px; color: #bfd1db; font-size: .62rem; font-weight: 750; line-height: 1.35; }
.dual-trend { display: grid; grid-template-columns: repeat(12,minmax(18px,1fr)); align-items: end; gap: 7px; height: 190px; padding: 18px 18px 6px; }
.dual-trend > div { display: grid; grid-template-rows: 150px auto; gap: 5px; align-items: end; text-align: center; }
.dual-trend > div > span { display: flex; align-items: end; justify-content: center; gap: 3px; height: 150px; border-bottom: 1px solid #3c5b6c; }
.dual-trend i,.dual-trend b { width: 7px; border-radius: 4px 4px 0 0; }
.dual-trend i { background: #63d0c7; }
.dual-trend b { background: #e2a83b; }
.dual-trend strong { color: #b9ccd6; font-size: .56rem; }
.chart-legend { display: flex; justify-content: center; gap: 18px; padding: 6px 16px 16px; color: #c8d8e0; font-size: .62rem; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; }
.chart-legend .design { background: #63d0c7; }
.chart-legend .operating { background: #e2a83b; }
.aging-chart { display: grid; gap: 14px; padding: 20px; }
.aging-chart > div { display: grid; grid-template-columns: 85px 1fr 28px; align-items: center; gap: 10px; }
.aging-chart span { color: #c4d5de; font-size: .65rem; }
.aging-chart i { height: 10px; border-radius: 99px; background: linear-gradient(90deg,#63d0c7 var(--age),#294555 var(--age)); }
.aging-chart strong { color: #fff; text-align: right; }
.coverage-map { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 18px; }
.coverage-cell { display: grid; place-items: center; min-height: 76px; padding: 8px; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; text-align: center; }
.coverage-cell strong { color: #fff; font-size: 1.15rem; }
.coverage-cell span { color: #edf6fa; font-size: .59rem; font-weight: 700; }
.heat-0 { background: #285f55; }.heat-1 { background: #8a6828; }.heat-2 { background: #9b512d; }.heat-3 { background: #8c3945; }
.trend-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; padding: 18px; }
.trend-comparison > div { padding: 13px; border: 1px solid #345267; border-radius: 9px; background: #142f42; }
.trend-comparison span,.trend-comparison strong,.trend-comparison small { display: block; }
.trend-comparison span { color: #b9ccd6; font-size: .59rem; font-weight: 700; }
.trend-comparison strong { margin: 5px 0; color: #72d9d0; font-size: 1.15rem; }
.trend-comparison .down strong { color: #8bd6aa; }
.trend-comparison small { color: #dbe7ed; font-size: .62rem; }
.calendar-switch { display: flex; flex-wrap: wrap; gap: 7px; }
.calendar-board { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; margin: 16px 0; }
.calendar-board section { min-height: 100px; padding: 12px; border: 1px solid #345267; border-radius: 10px; background: #102a3c; }
.calendar-board section.has-events { border-color: #4f8da0; background: #15384b; }
.calendar-board header,.calendar-board strong,.calendar-board span { display: block; }
.calendar-board header { color: #72d9d0; font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.calendar-board strong { margin: 9px 0 3px; color: #fff; font-size: 1.3rem; }
.calendar-board span { color: #b8ccd6; font-size: .6rem; }
.lifecycle-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 16px 0; padding: 18px; }
.lifecycle-flow span { padding: 10px 13px; border: 1px solid #416778; border-radius: 8px; color: #edf7fa; background: #17374a; font-size: .66rem; font-weight: 800; }
.lifecycle-flow i { color: #72d9d0; font-style: normal; }
.audit-trail-table { min-width: 1500px; }
#testingView [id$="walkthroughs"] .data-table { min-width: 2800px; }
#testingView [id$="findings"] .data-table { min-width: 3200px; }
#testingView [id$="retesting"] .data-table { min-width: 2200px; }
#testingView [id$="pbc"] .data-table { min-width: 1700px; }
#testingView [id$="certification"] .data-table { min-width: 1600px; }

@media (max-width:1100px) {
  #testingView .workflow-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  #testingView .framework-summary-grid { grid-template-columns: 1fr 1fr; }
  .executive-score-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .calendar-board { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width:760px) {
  #testingView .workflow-metrics, #testingView .framework-summary-grid { grid-template-columns: 1fr; }
  #testingView .scope-section-heading, #testingView .panel-heading { align-items: flex-start; flex-direction: column; }
  #testingView .heading-actions { width: 100%; }
  #testingView .heading-actions .button, #testingView .heading-actions .filter-control { flex: 1 1 160px; min-width: 0; width: 100%; }
  .testing-actions { grid-template-columns: 1fr; }
  .executive-score-grid { grid-template-columns: 1fr 1fr; }
  .calendar-board { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .coverage-map { grid-template-columns: 1fr 1fr; }
  .dual-trend { gap: 3px; padding-inline: 8px; }
  .lifecycle-flow { align-items: stretch; flex-direction: column; text-align: center; }
  .lifecycle-flow i { transform: rotate(90deg); }
}

/* Module 5 connected assurance ecosystem */
.connected-audit-chain { margin: 0 0 16px; padding: 14px; border: 1px solid #3b6074; border-radius: 13px; background: linear-gradient(135deg,#0e293b,#13364a); }
.connected-audit-chain > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.connected-audit-chain > header span,.connected-audit-chain > header strong { display: block; }
.connected-audit-chain > header span { color: #72d9d0; font-size: .6rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.connected-audit-chain > header strong { margin-top: 3px; color: #f4f9fc; font-size: .78rem; }
.connected-audit-chain > header b { padding: 6px 9px; border: 1px solid #4a7688; border-radius: 99px; color: #fff; background: #1b4558; font-size: .62rem; }
.connected-audit-chain > div { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding-bottom: 3px; }
.connected-audit-chain > div > i { align-self: center; color: #72d9d0; font-style: normal; }
.audit-object { min-width: 112px; padding: 9px; border: 1px solid #416778; border-radius: 9px; color: #eaf4f8; background: #17384b; text-align: left; cursor: pointer; }
.audit-object:hover,.audit-object:focus-visible { border-color: #72d9d0; background: #205167; outline: 2px solid rgba(114,217,208,.35); }
.audit-object small,.audit-object strong,.audit-object em { display: block; }
.audit-object small { color: #a9c7d4; font-size: .54rem; font-weight: 800; text-transform: uppercase; }
.audit-object strong { margin: 5px 0 3px; color: #fff; font-size: .72rem; }
.audit-object em { color: #bcd0da; font-size: .54rem; font-style: normal; }
.audit-object.missing { opacity: .7; cursor: default; }
.audit-object.closure { border-color: #3c806d; background: #1e5147; }
.connected-audit-chain.compact { padding: 11px; }
.connected-audit-chain.compact .audit-object { min-width: 98px; padding: 7px; }
.audit-committee-section { margin-bottom: 16px; }
.committee-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.committee-metrics article { padding: 15px; border: 1px solid #3a5c70; border-radius: 11px; background: #122f42; }
.committee-metrics span,.committee-metrics strong { display: block; }
.committee-metrics span { color: #bed1db; font-size: .61rem; font-weight: 750; text-transform: uppercase; }
.committee-metrics strong { margin-top: 7px; color: #fff; font-size: 1.45rem; }
.committee-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.ranked-list { display: grid; gap: 7px; padding: 14px 18px 18px; }
.ranked-list > div { display: grid; grid-template-columns: 24px minmax(70px,auto) 1fr auto; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid #2f4d60; color: #dce8ee; }
.ranked-list b { color: #72d9d0; }.ranked-list strong { color: #fff; }
.lifecycle-journey-panel { margin-bottom: 16px; }
.lifecycle-journey { display: grid; grid-template-columns: 1fr; gap: 5px; padding: 8px 20px 14px; }
.lifecycle-journey button { display: grid; grid-template-columns: 30px 62px 1fr; align-items: center; gap: 10px; padding: 10px; border: 1px solid #385b6e; border-radius: 9px; color: #e7f1f5; background: #143247; text-align: left; cursor: pointer; }
.lifecycle-journey button:hover { border-color: #72d9d0; background: #1a4458; }
.lifecycle-journey button span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #092c43; background: #72d9d0; font-weight: 900; }
.lifecycle-journey button strong { color: #fff; font-size: 1.15rem; }
.lifecycle-journey button small { color: #d2e1e7; font-size: .68rem; font-weight: 750; }
.lifecycle-journey > i { color: #72d9d0; font-style: normal; text-align: center; }
.journey-bottlenecks { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 18px; }
.journey-bottlenecks span { padding: 7px 9px; border: 1px solid #815e31; border-radius: 7px; color: #ffe0af; background: #4e3822; font-size: .61rem; }
.aging-heatmap { padding: 12px 18px 18px; overflow-x: auto; }
.aging-head,.aging-row { display: grid; grid-template-columns: 150px repeat(5,minmax(90px,1fr)); gap: 7px; min-width: 720px; }
.aging-head { margin-bottom: 7px; color: #bcd0da; font-size: .58rem; text-align: center; }
.aging-head span { text-align: left; }
.aging-row { margin-bottom: 7px; align-items: stretch; }
.aging-row > strong { align-self: center; color: #eaf3f7; font-size: .66rem; }
.aging-cell { display: grid; place-items: center; min-height: 58px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; color: #fff; }
.aging-cell b { font-size: 1.05rem; }.aging-cell small { font-size: .5rem; }
.enterprise-workpaper { overflow: hidden; }
.workpaper-cover { display: flex; justify-content: space-between; gap: 20px; padding: 22px; border-bottom: 1px solid #3a5c70; background: linear-gradient(135deg,#102f43,#1b4559); }
.workpaper-cover h2 { margin: 4px 0; color: #fff; }.workpaper-cover p { margin: 0; color: #c9dbe3; }
.workpaper-cover > div:last-child { display: grid; grid-template-columns: repeat(3,minmax(100px,1fr)); gap: 8px; }
.workpaper-cover > div:last-child span { padding: 9px; border: 1px solid #416778; border-radius: 8px; color: #abc3cf; font-size: .54rem; text-transform: uppercase; }
.workpaper-cover > div:last-child strong { display: block; margin-top: 5px; color: #fff; font-size: .67rem; text-transform: none; }
.workpaper-sections { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 18px; }
.workpaper-sections > section { padding: 14px; border: 1px solid #345267; border-radius: 9px; background: #122e41; }
.workpaper-sections > section > span { color: #72d9d0; font-size: .59rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.workpaper-sections p { margin: 7px 0 0; color: #e0ebf0; font-size: .69rem; line-height: 1.55; }
.attachment-list,.approval-history { display: grid; gap: 7px; margin-top: 9px; }
.attachment-list button,.approval-history div { padding: 9px; border: 1px solid #416778; border-radius: 7px; color: #eaf4f8; background: #17384b; text-align: left; }
.attachment-list b,.attachment-list small,.approval-history b,.approval-history small { display: block; }
.attachment-list small,.approval-history small { margin-top: 3px; color: #b9cdd7; font-size: .56rem; }
.workpaper-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 18px 18px; }
.workpaper-footer > div:first-child { padding: 14px; border: 1px solid #6e5930; border-radius: 9px; background: #44351f; color: #ffe4b5; }
.maturity-trend { display: grid; gap: 12px; padding: 18px; }
.maturity-trend > div { display: grid; grid-template-columns: 70px 1fr 35px; align-items: center; gap: 10px; }
.maturity-trend span { color: #c3d5de; font-size: .62rem; }.maturity-trend strong { color: #fff; }
.maturity-trend i { height: 10px; border-radius: 99px; background: linear-gradient(90deg,#63d0c7 var(--maturity),#294555 var(--maturity)); }
.productivity-section { margin-bottom: 18px; }
.ai-disclaimer { margin-bottom: 14px; padding: 12px 15px; border: 1px solid #8c682d; border-radius: 9px; color: #ffe3ae; background: #4c371f; font-weight: 800; }
.playbook-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.playbook-grid .panel { padding-bottom: 16px; }.playbook-grid .panel > p,.playbook-grid .panel > button { margin-inline: 18px; }
.playbook-grid .panel > p { min-height: 55px; color: #d4e2e8; font-size: .68rem; line-height: 1.5; }
.executive-walkthrough-overlay { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 22px; background: rgba(3,14,23,.84); backdrop-filter: blur(8px); }
.executive-walkthrough-overlay[hidden] { display: none; }
.executive-walkthrough-dialog { width: min(1060px,96vw); max-height: 92vh; overflow: auto; border: 1px solid #4a7184; border-radius: 16px; color: #edf6fa; background: #0d2738; box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.executive-walkthrough-dialog > header,.executive-walkthrough-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid #345267; }
.executive-walkthrough-dialog > footer { border-top: 1px solid #345267; border-bottom: 0; }
.executive-walkthrough-dialog h2 { margin: 3px 0; color: #fff; }.executive-walkthrough-dialog p { margin: 0; color: #c7d9e1; }
.walkthrough-progress { display: grid; grid-template-columns: repeat(10,minmax(80px,1fr)); gap: 6px; padding: 16px; overflow-x: auto; }
.walkthrough-progress button { padding: 9px 6px; border: 1px solid #36596d; border-radius: 8px; color: #bcd0da; background: #132f42; cursor: pointer; }
.walkthrough-progress button span,.walkthrough-progress button small { display: block; }.walkthrough-progress button span { color: #fff; font-weight: 900; }
.walkthrough-progress button.active { border-color: #72d9d0; color: #fff; background: #1a5062; }.walkthrough-progress button.complete { border-color: #3f806f; background: #1d493f; }
.walkthrough-focus { margin: 0 22px 22px; padding: 26px; border: 1px solid #416778; border-radius: 12px; background: radial-gradient(circle at 90% 10%,rgba(99,208,199,.14),transparent 35%),#133247; }
.walkthrough-focus > span,.walkthrough-focus > strong { display: block; }.walkthrough-focus > span { color: #72d9d0; font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.walkthrough-focus > strong { margin: 8px 0; color: #fff; font-size: 2rem; }
.walkthrough-focus .button { margin-top: 16px; }

@media (max-width:1100px) {
  .committee-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .committee-grid,.playbook-grid { grid-template-columns: 1fr 1fr; }
  .workpaper-cover,.workpaper-footer { grid-template-columns: 1fr; flex-direction: column; }
}
@media (max-width:760px) {
  .committee-metrics,.committee-grid,.playbook-grid,.workpaper-sections { grid-template-columns: 1fr; }
  .workpaper-cover > div:last-child { grid-template-columns: 1fr; }
  .workpaper-footer { grid-template-columns: 1fr; }
  .walkthrough-progress { grid-template-columns: repeat(10,90px); }
}
