:root {
  --border: #d6d9de;
  --muted: #667085;
  --surface: #f5f7f9;
  --text: #20252b;
  --link: #155f94;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--text); background: white; font-size: 14px; }
.site-header { border-bottom: 1px solid var(--border); background: #fff; }
.brand-wrap { max-width: 1500px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: baseline; gap: 18px; }
.brand { font-size: 25px; font-weight: 700; color: #222; text-decoration: none; }
.subtitle { color: var(--muted); font-size: 15px; }
.page-shell { max-width: 1500px; margin: 0 auto; padding: 24px; }
.page-intro { border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.page-intro h1, .requirements-section h1 { margin: 0 0 8px; font-size: 24px; }
.page-intro p, .section-heading p { margin: 0 0 18px; color: #4f5865; }
code { background: #f2f4f7; padding: 2px 5px; border-radius: 3px; }
.system-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 28px; }
.system-nav a, .small-button { border: 1px solid #c7ccd2; border-radius: 3px; background: #fff; padding: 6px 10px; color: var(--link); text-decoration: none; cursor: pointer; }
.system-nav .count { color: var(--muted); margin-left: 4px; font-size: 12px; }
.requirements-section { margin: 0 0 42px; scroll-margin-top: 16px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.section-actions { display: flex; gap: 6px; margin-bottom: 14px; white-space: nowrap; }
.search-box { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--muted); }
.requirement-filter { width: min(520px, 100%); padding: 8px 10px; border: 1px solid #c7ccd2; border-radius: 3px; font: inherit; }
.requirements-table { border: 1px solid var(--border); overflow-x: auto; min-width: 900px; }
.tree-row { display: grid; grid-template-columns: minmax(230px, 1.05fr) minmax(360px, 2.25fr) minmax(170px, 1fr) 105px 120px; min-width: 1050px; border-bottom: 1px solid var(--border); }
.header-row { background: #e6eaee; font-weight: 700; }
.requirements-table .header-row .cell { font-size: 14px; font-weight: 700; }
.group-row { background: var(--surface); }
.requirement-row:hover { background: #fbfcfd; }
.cell { padding: 8px 9px; border-right: 1px solid var(--border); line-height: 1.35; overflow-wrap: anywhere; }
.cell:last-child { border-right: 0; }
.id-cell { padding-left: calc(9px + (var(--depth, 0) * 22px)); }
.muted-cell { color: var(--muted); font-style: italic; }
.toggle { width: 22px; height: 22px; margin-right: 5px; border: 1px solid #b8bec6; border-radius: 2px; background: white; cursor: pointer; line-height: 18px; }
.leaf-dot { display: inline-block; width: 22px; text-align: center; color: #7c8794; }
a { color: var(--link); }
.status { white-space: normal; }
.status-approved, .status-satisfied, .status-complete { font-weight: 700; }
.tree-node.collapsed > .children { display: none; }
.tree-node[hidden], .no-results[hidden] { display: none !important; }
.tree-node:last-child > .tree-row { border-bottom: 0; }
.no-results { padding: 10px 0; color: var(--muted); }
.breadcrumb { color: var(--muted); margin-top: 0; }
.detail-card { border: 1px solid var(--border); padding: 24px; max-width: 1000px; }
.detail-card h1 { margin-top: 0; }
dl { display: grid; grid-template-columns: 140px 1fr; gap: 12px 18px; }
dt { font-weight: 700; }
dd { margin: 0; white-space: pre-wrap; }
.error-card { border-left: 4px solid #a33; }
.site-footer { max-width: 1500px; margin: 10px auto 40px; padding: 0 24px; color: var(--muted); }

@media (max-width: 800px) {
  .brand-wrap { align-items: flex-start; flex-direction: column; gap: 5px; }
  .page-shell { padding: 16px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-actions { margin-bottom: 8px; }
  .search-box { align-items: stretch; flex-direction: column; gap: 5px; }
}

/* G/F/P/I landing page */
.landing-intro { margin-bottom: 28px; }
.landing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; max-width: 1100px; }
.landing-card { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 18px; min-height: 128px; padding: 22px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); }
.landing-card:hover { border-color: #9aa4b2; box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08); }
.landing-code { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 8px; background: var(--surface); color: #243746; font-size: 32px; font-weight: 700; }
.landing-copy { display: flex; flex-direction: column; gap: 7px; }
.landing-copy strong { color: var(--text); font-size: 18px; }
.landing-copy small { color: var(--muted); line-height: 1.35; }
.landing-arrow { color: var(--link); font-size: 24px; }
.landing-note { margin-top: 24px; color: var(--muted); }
.r-row { background: #fcfcfd; }
.synthetic-node > .requirement-row { background: #fff8e8; }
.synthetic-label { display: inline-block; margin-left: 5px; padding: 1px 5px; border: 1px solid #d6b66c; border-radius: 8px; color: #7a5a0a; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.requirement-node.collapsed > .children { display: none; }

@media (max-width: 900px) {
  .landing-grid { grid-template-columns: 1fr; }
}

/* Homepage status rollups */
.landing-grid-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; align-items: start; }
.landing-panel { min-width: 0; border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); }
.landing-panel .landing-card { border: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--border); }
.landing-panel .landing-card:hover { box-shadow: none; background: #fbfcfd; }
.status-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: -8px 0 20px; color: #4f5865; font-size: 12px; }
.status-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.legend-note { color: var(--muted); }
.system-status-summary { max-height: 540px; overflow-y: auto; padding: 0 16px 12px; }
.summary-heading { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 12px; padding: 12px 0 9px; background: #fff; border-bottom: 1px solid #eceff2; font-size: 12px; }
.summary-heading span { color: var(--muted); font-weight: 400; }
.system-summary-row { padding: 10px 0; border-bottom: 1px solid #eef0f2; }
.system-summary-row:last-child { border-bottom: 0; }
.system-summary-topline { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.system-name { font-weight: 700; font-size: 12px; }
.system-total { color: var(--muted); font-size: 11px; white-space: nowrap; }
.status-bar { display: flex; width: 100%; height: 13px; overflow: hidden; border-radius: 3px; background: #eef1f4; }
.status-segment { display: block; height: 100%; min-width: 1px; }
.status-segment.status-on-hold, .legend-swatch.status-on-hold { background: #d92d20; }
.status-segment.status-in-process, .legend-swatch.status-in-process { background: #f4c430; }
.status-segment.status-reviewed, .legend-swatch.status-reviewed { background: #2e78c7; }
.status-segment.status-approved, .legend-swatch.status-approved { background: #2f9e44; }
.status-bar-empty { width: 100%; text-align: center; color: #7a8490; font-size: 10px; line-height: 13px; }
.status-counts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; color: #59636f; font-size: 10px; font-variant-numeric: tabular-nums; }
.status-counts span { white-space: nowrap; }
.status-counts strong { font-weight: 700; }
.count-on-hold { color: #b42318; }
.count-in-process { color: #8a6800; }
.count-reviewed { color: #175f9f; }
.count-approved { color: #217a34; }
.empty-summary { color: var(--muted); font-size: 12px; }

@media (max-width: 1000px) {
  .landing-grid-summary { grid-template-columns: 1fr; }
}

/* Expandable homepage status hierarchy */
.status-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: #fafbfc; }
.status-toolbar label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.status-auto-depth-note { font-size: 12px; font-weight: 700; color: var(--muted); }
.status-level-select { padding: 5px 28px 5px 8px; border: 1px solid #c7ccd2; border-radius: 3px; background: white; font: inherit; }
.status-toolbar-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.status-toolbar-actions .small-button { font-size: 11px; padding: 5px 8px; }
.status-tree-node { position: relative; }
.status-tree-node[data-status-depth="1"] > .system-summary-row,
.status-tree-node[data-status-depth="2"] > .system-summary-row { background: #fff; }
.status-tree-node[data-status-depth="3"] > .system-summary-row { padding-left: 18px; background: #fcfcfd; }
.status-tree-node[data-status-depth="4"] > .system-summary-row { padding-left: 36px; background: #fafbfc; }
.status-tree-node[data-status-depth="5"] > .system-summary-row { padding-left: 54px; background: #f8fafb; }
.status-tree-node[data-status-depth="6"] > .system-summary-row { padding-left: 72px; background: #f6f8fa; }
.status-tree-node[data-status-depth="7"] > .system-summary-row { padding-left: 90px; background: #f4f6f8; }
.status-children { display: none; }
.status-tree-node.status-expanded > .status-children { display: block; }
.system-name-wrap { display: flex; align-items: center; gap: 5px; min-width: 0; }
.status-toggle, .status-toggle-spacer { flex: 0 0 20px; width: 20px; height: 20px; }
.status-toggle { border: 1px solid #b8bec6; border-radius: 2px; background: #fff; color: var(--link); cursor: pointer; line-height: 16px; padding: 0; font-weight: 700; }
.status-toggle-spacer { display: inline-block; }
.level-badge { padding: 1px 5px; border-radius: 8px; background: #eef1f4; color: #667085; font-size: 9px; font-weight: 700; }
.status-tree-node.status-level-hidden { display: none; }
@media (max-width: 650px) {
  .status-toolbar { align-items: stretch; flex-direction: column; }
  .status-toolbar-actions { width: 100%; }
}

/* Performance: descendants of collapsed branches do not participate in layout/paint. */
.tree-node.collapsed > .children { display: none !important; }
.children { contain: layout style paint; }
.tree-node { content-visibility: auto; contain-intrinsic-size: 38px; }

/* Code.zip visual integration */
body.eic-requirements-page {
  min-height: 100vh;
  height: auto;
  overflow: auto;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  color: var(--ink, #102631);
  background:
    radial-gradient(circle at 9% 8%, rgba(0, 173, 220, 0.22), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(178, 211, 59, 0.15), transparent 26%),
    linear-gradient(145deg, #052d40 0%, #0b4a62 46%, #062a3b 100%);
  background-attachment: fixed;
}
.eic-dashboard-header { position: sticky; top: 0; }
.eic-dashboard-header .header-title-link { color: inherit; text-decoration: none; }
.eic-dashboard-header .header-actions { display: flex; justify-content: flex-end; }
.eic-dashboard-header .header-home-button {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border-radius: 999px;
  color: #eafaff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.eic-dashboard-header .header-home-button:hover { background: rgba(255,255,255,0.22); }
.eic-dashboard-shell {
  width: min(1500px, calc(100% - 44px));
  margin: 28px auto 34px;
  padding: 26px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 24px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 24px 70px rgba(3,22,31,0.34);
  backdrop-filter: blur(10px);
}
.eic-dashboard-shell .page-intro h1,
.eic-dashboard-shell .requirements-section h1 { color: #102631; }
.eic-dashboard-shell .landing-panel,
.eic-dashboard-shell .detail-card,
.eic-dashboard-shell .requirements-table {
  box-shadow: 0 14px 34px rgba(4,35,49,0.10);
}
.eic-dashboard-shell .landing-card:hover,
.eic-dashboard-shell .small-button:hover {
  border-color: #105C78;
}
.eic-dashboard-shell .landing-code {
  background: linear-gradient(135deg, #105C78, #0b4057);
  color: #fff;
}
.eic-dashboard-shell a { color: #105C78; }
.eic-dashboard-shell .landing-arrow { color: #F68B1F; }
.eic-dashboard-shell .status-toggle { color: #105C78; }
.eic-dashboard-footer {
  color: rgba(239,253,255,0.72);
  text-align: center;
  padding-bottom: 28px;
}
@media (max-width: 900px) {
  .eic-dashboard-header { grid-template-columns: 1fr; height: auto; text-align: center; }
  .eic-dashboard-header .brand, .eic-dashboard-header .header-actions { justify-content: center; }
  .eic-dashboard-shell { width: min(100% - 24px, 1500px); margin-top: 16px; padding: 16px; }
}

/* Progressive requirements-dashboard loading state. */
.requirements-loading-panel {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 48px 28px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
  text-align: left;
}

.requirements-loading-spinner {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 5px solid rgba(20, 74, 88, 0.18);
  border-top-color: #144a58;
  border-radius: 50%;
  animation: requirements-spin 0.85s linear infinite;
}

.requirements-loading-copy h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.requirements-loading-copy p {
  margin: 5px 0;
  color: #4f5865;
}

.requirements-loading-source {
  font-size: 13px;
}

.requirements-load-error {
  min-height: 260px;
}

@keyframes requirements-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .requirements-loading-panel {
    flex-direction: column;
    text-align: center;
  }
}

/* Hierarchy levels B-G: IDs and system-layer labels match the 14px bold table headers. */
.group-row.hierarchy-level-b .id-cell,
.group-row.hierarchy-level-c .id-cell,
.group-row.hierarchy-level-d .id-cell,
.group-row.hierarchy-level-e .id-cell,
.group-row.hierarchy-level-f .id-cell,
.group-row.hierarchy-level-g .id-cell,
.group-row.hierarchy-level-b .level-badge,
.group-row.hierarchy-level-c .level-badge,
.group-row.hierarchy-level-d .level-badge,
.group-row.hierarchy-level-e .level-badge,
.group-row.hierarchy-level-f .level-badge,
.group-row.hierarchy-level-g .level-badge,
.group-row.hierarchy-level-b .id-cell strong,
.group-row.hierarchy-level-c .id-cell strong,
.group-row.hierarchy-level-d .id-cell strong,
.group-row.hierarchy-level-e .id-cell strong,
.group-row.hierarchy-level-f .id-cell strong,
.group-row.hierarchy-level-g .id-cell strong {
  font-size: 14px;
  font-weight: 700;
}

/* Hierarchy rows B-G: keep all displayed row data consistent with table headers. */
.group-row.hierarchy-level-b .cell,
.group-row.hierarchy-level-c .cell,
.group-row.hierarchy-level-d .cell,
.group-row.hierarchy-level-e .cell,
.group-row.hierarchy-level-f .cell,
.group-row.hierarchy-level-g .cell,
.group-row.hierarchy-level-b .cell *,
.group-row.hierarchy-level-c .cell *,
.group-row.hierarchy-level-d .cell *,
.group-row.hierarchy-level-e .cell *,
.group-row.hierarchy-level-f .cell *,
.group-row.hierarchy-level-g .cell * {
  font-size: 14px;
  font-weight: 700;
}


/* Hierarchy rows B-G: show hierarchy descriptions in solid black without muted italics. */
.group-row.hierarchy-level-b .desc-cell.muted-cell,
.group-row.hierarchy-level-c .desc-cell.muted-cell,
.group-row.hierarchy-level-d .desc-cell.muted-cell,
.group-row.hierarchy-level-e .desc-cell.muted-cell,
.group-row.hierarchy-level-f .desc-cell.muted-cell,
.group-row.hierarchy-level-g .desc-cell.muted-cell {
  color: #000;
  font-style: normal;
}

/* Unlabeled audit export control: unique requirement IDs with no hierarchy link. */
.unlinked-id-export-button {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 30;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.34);
  border-radius: 50%;
  background: rgba(5,45,64,0.78);
  color: rgba(239,253,255,0.82) !important;
  box-shadow: 0 5px 18px rgba(0,0,0,0.2);
  backdrop-filter: blur(8px);
  text-decoration: none;
  opacity: 0.72;
}
.unlinked-id-export-button:hover,
.unlinked-id-export-button:focus-visible {
  opacity: 1;
  background: rgba(11,74,98,0.96);
  border-color: rgba(255,255,255,0.62);
  outline: none;
}
.unlinked-id-export-button svg { width: 18px; height: 18px; }


/* Shared system selection for the G/F/P/I status rollups. */
.eic-dashboard-shell:has(.requirements-filter-layout) { width: calc(100% - 32px); max-width: 1900px; }
.requirements-filter-layout { display: grid; grid-template-columns: minmax(270px, 330px) minmax(0, 1fr); gap: 22px; align-items: start; }
.requirements-rollups { min-width: 0; }
.system-filter-panel { position: sticky; top: 120px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.system-filter-panel h2 { margin: 0 0 10px; font-size: 20px; }
.system-filter-panel p { font-size: 13px; line-height: 1.45; }
.system-filter-panel > label { display: block; font-weight: bold; margin-bottom: 6px; }
.system-filter-panel input[type="search"] { width: 100%; padding: 9px; border: 1px solid var(--border); border-radius: 4px; }
.system-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.system-filter-table-scroll { max-height: calc(100vh - 430px); min-height: 200px; overflow: auto; }
.system-filter-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.system-filter-table th { position: sticky; top: 0; text-align: left; background: #eef2f6; z-index: 1; }
.system-filter-table th, .system-filter-table td { padding: 8px 5px; border-bottom: 1px solid var(--border); vertical-align: top; }
.system-filter-table label { display: block; cursor: pointer; overflow-wrap: anywhere; }
.system-filter-table small { display: block; margin-top: 4px; color: #4f5865; font-size: 11px; }
.system-filter-table input { width: 17px; height: 17px; cursor: pointer; }
.requirements-rollups[aria-busy="true"] { opacity: .65; }
@media (max-width: 1200px) { .requirements-filter-layout .landing-grid-summary { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .requirements-filter-layout { grid-template-columns: 1fr; }
  .system-filter-panel { position: static; }
  .system-filter-table-scroll { max-height: 300px; }
}

.system-level-quick-select { margin: 12px 0; }
.system-level-quick-select > span { display: block; font-weight: bold; margin-bottom: 7px; }
.system-level-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.system-level-quick-select small { display: block; color: #4f5865; line-height: 1.4; margin-top: 7px; }
.system-filter-panel .system-filter-submit { display: block; width: 100%; margin-top: 12px; background: #155f94; color: #fff; font-weight: bold; }
.system-filter-panel .system-filter-submit:disabled { opacity: .5; cursor: default; }
.system-filter-table-scroll { max-height: calc(100vh - 570px); }
@media (max-width: 760px) { .system-filter-table-scroll { max-height: 300px; } }

.system-level-buttons button[aria-pressed="true"] { background: #155f94; color: #fff; border-color: #155f94; }
.system-level-buttons button[aria-pressed="mixed"] { background: #dcebf7; border-color: #155f94; }
.system-level-buttons button:disabled { opacity: .45; cursor: default; }

.selected-systems-only .status-tree > .status-tree-node > .system-summary-row { padding-left: 0; }

.system-group-quick-select { margin: 12px 0; }
.system-group-quick-select > span { display: block; font-weight: bold; margin-bottom: 7px; }
.system-group-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.system-group-quick-select small { display: block; color: #4f5865; line-height: 1.4; margin-top: 7px; }
.system-group-buttons button[aria-pressed="true"] { background: #155f94; color: #fff; border-color: #155f94; }
.system-group-buttons button:disabled { opacity: .45; cursor: default; }
.system-filter-table-scroll { max-height: calc(100vh - 725px); }
@media (max-width: 760px) { .system-filter-table-scroll { max-height: 300px; } }

.requirements-view-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.requirements-view-switch button[aria-pressed="true"] { background: #155f94; color: #fff; border-color: #155f94; }
[data-system-filter-search] { width: 100%; }

.system-search-note { display: block; margin-top: 6px; color: #4f5865; font-size: 11px; line-height: 1.4; }

/* Unfiltered history stays outside the replaceable/filtered rollup panels. */
.requirements-main-content { min-width: 0; }
.requirements-history { padding: 18px; margin: 0 auto 22px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.history-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 12px; text-align: center; }
.history-heading > div:first-child { flex: 1 1 350px; }
.history-heading h2 { margin: 0 0 5px; font-size: 20px; }
.history-heading p, .history-note { margin: 5px 0 12px; font-size: 12px; color: #4f5865; line-height: 1.5; }
.history-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 auto; font-size: 12px; }
.history-controls label { display: flex; align-items: center; gap: 5px; }
.history-controls select { padding: 6px; border: 1px solid var(--border); border-radius: 4px; background: white; }
.history-level-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.history-level-grid.history-single-level { grid-template-columns: minmax(0, 1fr); }
.history-level-panel { min-width: 0; border: 1px solid #e7ebee; border-radius: 6px; padding: 10px; }
.history-level-panel h3 { text-align: center; font-size: 14px; margin: 2px 0 8px; }
.history-chart { display: block; width: 100%; max-height: 340px; }
.history-gridline { stroke: #dce3e9; stroke-width: 1; }
.history-tick { fill: #4f5865; font: 12px Arial, sans-serif; }
.history-legend { max-height: 96px; overflow: auto; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; }
.history-legend span { display: inline-flex; align-items: center; gap: 5px; cursor: default; }
.history-legend i { width: 10px; height: 3px; flex: 0 0 10px; }
.history-details, .history-sources { margin-top: 12px; font-size: 12px; }
.history-details summary, .history-sources summary { cursor: pointer; color: var(--link); }
.history-data-scroll { overflow: auto; max-height: 320px; margin-top: 8px; }
.history-data-scroll table { border-collapse: collapse; font-size: 11px; width: 100%; }
.history-data-scroll th, .history-data-scroll td { padding: 5px; border: 1px solid #e6eaee; text-align: left; white-space: nowrap; }
.history-data-scroll thead { position: sticky; top: 0; background: #f1f4f7; }
.history-loading { text-align: center; margin: 12px 0 20px; padding: 20px; border: 1px solid var(--border); border-radius: 6px; }
.history-level-panel[hidden], [data-history-metric-panel][hidden] { display: none !important; }
@media (max-width: 1150px) { .history-level-grid { grid-template-columns: 1fr; } }

[data-history-series] { transition: opacity .12s ease; }
.history-legend span:focus { outline: 2px solid #155f94; outline-offset: 2px; }

.history-stacked-scroll { width: 100%; overflow-x: auto; }
.history-stacked-chart { display: block; height: 250px; max-width: none; margin: 0 auto; }
.history-stacked-note { font-size: 11px; color: #4f5865; line-height: 1.4; }
.history-status-legend { font-size: 11px; gap: 7px; margin: 8px 0; }
[data-history-line-legend][hidden] { display: none !important; }

.history-level-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:10px; }
.history-level-heading h3 { margin:0; }
.history-export-actions { display:flex; gap:8px; flex-wrap:wrap; }

.history-legend-title { font-size:15px; font-weight:700; margin:16px 0 8px; }
.history-status-legend { font-weight:700; }
.history-bar-number { font-size:10px; font-weight:700; fill:#105C78; }
.history-system-legend-scroll { overflow-x:auto; }
.history-system-legend { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:8px 18px; font-size:12px; }
.history-legend-column { min-width:0; border-left:3px solid #00ADDC; padding-left:10px; }
.history-legend-column h5 { font-size:13px; font-weight:700; margin:0 0 10px; color:#105C78; }
.history-system-legend-item { font-weight:700; line-height:1.5; margin-bottom:8px; overflow-wrap:anywhere; }

.history-system-legend-item span { display:inline-flex; align-items:flex-start; gap:7px; }
.history-system-legend-item i { flex:0 0 12px; height:4px; margin-top:7px; }
.history-system-legend-scroll[hidden] { display:none !important; }

a.system-name { color:#105C78; text-decoration:underline; text-underline-offset:3px; }
a.system-name:hover, a.system-name:focus { color:#007ca2; }
.requirements-drilldown h2 { margin:0 0 8px; font-size:18px; color:#105C78; }
.rollup-status-counts { display:flex; flex-wrap:wrap; gap:16px; }
.requirements-export-note { font-size:12px; color:#52616b; }
.section-actions { flex-wrap:wrap; }
.section-actions form { margin:0; }
