:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-2: #eef3f6;
  --ink: #182026;
  --muted: #64717d;
  --line: #d7e0e6;
  --green: #0f8f63;
  --teal: #087b83;
  --blue: #2d67b1;
  --amber: #a76400;
  --orange: #b84a18;
  --red: #b3261e;
  --gray: #6b7280;
  --focus: #2158a4;
  --shadow: 0 14px 30px rgba(24, 32, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px 18px;
  background: #17212b;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 4px;
  color: #8da0b3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 2px;
  font-size: 18px;
}

h3 {
  margin-bottom: 8px;
  font-size: 14px;
}

.source-note {
  color: #c8d2dc;
  font-size: 13px;
  text-align: right;
}

.topbar-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.section-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.section-tab {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #d5dde5;
  padding: 7px 12px;
}

.section-tab.is-active {
  background: #ffffff;
  color: #17212b;
}

.workspace {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.page-section {
  display: none;
}

.page-section.is-active {
  display: grid;
  gap: 14px;
}

.summary-band,
.taxonomy-panel,
.control-panel,
.list-panel,
.detail-panel,
.runtime-alert-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.runtime-summary {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.simple-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.runtime-summary .metric-healthy strong {
  color: var(--green);
}

.runtime-summary .metric-high strong {
  color: var(--red);
}

.runtime-summary .metric-source strong {
  color: var(--amber);
}

.runtime-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7fafb;
  padding: 9px 12px;
  color: #40505c;
  font-size: 13px;
}

.runtime-banner strong {
  color: var(--ink);
}

.runtime-live-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gray);
}

.runtime-banner.is-loading .runtime-live-dot {
  background: var(--amber);
}

.runtime-banner.is-online .runtime-live-dot {
  background: var(--green);
}

.runtime-banner.is-offline {
  border-color: #e2a39e;
  background: #fff7f6;
}

.runtime-banner.is-offline .runtime-live-dot {
  background: var(--red);
}

.runtime-alert-panel {
  overflow: hidden;
}

.runtime-alert-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  border-radius: 6px;
  background: var(--red);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.runtime-alert-list {
  display: grid;
}

.runtime-no-alert {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  color: #375349;
  font-size: 13px;
}

.runtime-no-alert strong {
  color: var(--green);
}

.runtime-no-alert.is-error,
.runtime-no-alert.is-error strong {
  color: var(--red);
}

.runtime-alert-row {
  display: grid;
  grid-template-columns: auto minmax(150px, 0.7fr) minmax(260px, 2fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fffafa;
  padding: 11px 16px;
  color: var(--ink);
  text-align: left;
}

.runtime-alert-row:hover {
  background: #fff2f1;
}

.runtime-alert-row span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.runtime-alert-row small,
.runtime-alert-row time {
  color: var(--muted);
  font-size: 12px;
}

.runtime-severity {
  border-radius: 5px;
  background: var(--red);
  color: #ffffff;
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 900;
}

.taxonomy-panel {
  overflow: hidden;
}

.taxonomy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.taxonomy-head h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.taxonomy-count {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.taxonomy-count strong {
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.mindmap {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.mindmap-root {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  justify-self: center;
  min-width: min(100%, 360px);
  border: 1px solid #9fb4c4;
  border-radius: 8px;
  background: #17212b;
  color: #ffffff;
  padding: 12px 16px;
  text-align: center;
}

.mindmap-root span {
  font-weight: 800;
}

.mindmap-root strong {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  padding: 4px 9px;
  font-size: 13px;
}

.mindmap-branches {
  display: grid;
  gap: 10px;
}

.taxonomy-groups {
  display: grid;
  gap: 12px;
}

.taxonomy-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: #f8fafb;
  padding: 12px;
}

.taxonomy-group-issuance {
  border-left-color: var(--red);
}

.taxonomy-group-reconciliation {
  border-left-color: var(--orange);
}

.taxonomy-group-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.taxonomy-group-head h3,
.taxonomy-group-head p {
  margin: 0;
}

.taxonomy-group-head h3 {
  font-size: 15px;
}

.taxonomy-group-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.taxonomy-group-head > strong {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.taxonomy-group-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #17212b;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.taxonomy-group-issuance .mindmap-branches {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.taxonomy-group-reconciliation .mindmap-branches {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mindmap-node {
  min-width: 0;
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.mindmap-node h3 {
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 1.25;
}

.mindmap-node p {
  margin-bottom: 10px;
  color: #344450;
  font-size: 12px;
  line-height: 1.45;
}

.node-effect {
  margin-bottom: 8px;
  border-left: 3px solid #9fb4c4;
  padding-left: 7px;
  color: #344450;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.node-1,
.risk-border-01 {
  border-top-color: var(--green);
}

.node-2,
.risk-border-02 {
  border-top-color: var(--blue);
}

.node-3,
.risk-border-03 {
  border-top-color: var(--amber);
}

.node-4,
.risk-border-04 {
  border-top-color: var(--teal);
}

.risk-border-05 {
  border-top-color: var(--red);
}

.risk-border-06 {
  border-top-color: var(--orange);
}

.risk-border-07 {
  border-top-color: var(--gray);
}

.node-kicker {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.node-focus {
  display: grid;
  gap: 3px;
  border-radius: 6px;
  background: #edf4f6;
  padding: 8px;
  color: #2d3944;
  font-size: 12px;
  line-height: 1.4;
}

.node-examples {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  color: #4d5b66;
  font-size: 11px;
  line-height: 1.4;
}

.node-examples strong {
  color: #26343f;
  font-size: 11px;
}

.metric {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(150px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
}

.monitor-controls {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto;
}

.runtime-controls {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto;
}

.simple-controls {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto;
}

.simple-policy-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.simple-policy-strip > div {
  min-width: 0;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}

.simple-policy-strip > div:last-child {
  border-right: 0;
}

.simple-policy-strip span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.simple-policy-strip strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.search-wrap,
.select-wrap {
  display: grid;
  gap: 5px;
  min-width: 0;
}

label,
.toggle span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  white-space: nowrap;
}

.toggle input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--focus);
}

.control-panel button,
.tab,
.copy-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 7px 12px;
}

.monitor-grid {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 34vw);
}

.runtime-grid {
  grid-template-columns: minmax(0, 1fr) minmax(460px, 38vw);
}

.simple-grid {
  grid-template-columns: minmax(0, 1fr) minmax(430px, 36vw);
}

.runtime-table-wrap table {
  min-width: 1020px;
}

.simple-table-wrap table {
  min-width: 1120px;
}

.simple-table-wrap td:nth-child(1) {
  min-width: 94px;
}

.simple-table-wrap td:nth-child(2) {
  min-width: 180px;
}

.simple-table-wrap td:nth-child(3) {
  min-width: 190px;
}

.simple-table-wrap td a {
  display: block;
  max-width: 250px;
  overflow-wrap: anywhere;
  color: var(--blue);
  font-size: 12px;
}

.simple-table-wrap td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.simple-exposure-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.simple-exposure-tags span {
  border-left: 3px solid var(--teal);
  background: #eef8f7;
  padding: 3px 6px;
  color: #245158;
  font-size: 11px;
}

.simple-json-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  width: fit-content;
  border: 1px solid #9db8d2;
  border-radius: 6px;
  background: #f5f9fd;
  color: #204f7d !important;
  padding: 5px 9px;
  text-decoration: none;
  white-space: nowrap;
}

.simple-detail-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.simple-exposure-row,
.simple-sample-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.simple-exposure-row:first-child,
.simple-sample-row:first-child {
  padding-top: 0;
}

.simple-exposure-row:last-child,
.simple-sample-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.simple-exposure-row header,
.simple-sample-row header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.simple-exposure-row header span,
.simple-sample-row header span {
  color: var(--muted);
  font-size: 11px;
}

.simple-coverage {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.simple-coverage span {
  border: 1px solid #b9c9d7;
  background: #f5f8fa;
  padding: 2px 5px;
}

.simple-signal-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
}

.simple-signal-row a,
.simple-sample-row > a {
  overflow-wrap: anywhere;
  color: var(--blue);
}

.simple-signal-row span {
  overflow-wrap: anywhere;
  color: var(--muted);
}

.simple-signal-row span b {
  display: block;
  margin-bottom: 2px;
  color: #245158;
  font-size: 10px;
  font-weight: 700;
}

.simple-amount-row,
.simple-extraction dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
}

.simple-amount-row div,
.simple-extraction dl div {
  min-width: 0;
  background: var(--surface);
  padding: 8px 9px;
}

.simple-amount-row dt,
.simple-extraction dt {
  color: var(--muted);
  font-size: 11px;
}

.simple-amount-row dd,
.simple-extraction dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
}

.simple-extraction {
  margin: 9px 0 12px;
}

.simple-sample-row pre {
  max-height: 160px;
  margin-top: 7px;
  border: 1px solid var(--line);
  background: #f7fafb;
}

.runtime-updated,
.runtime-time,
.runtime-cell-note {
  color: var(--muted);
  font-size: 12px;
}

.monitor-table-wrap table {
  min-width: 1180px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 30vw);
  gap: 14px;
  align-items: start;
}

.list-panel,
.detail-panel {
  min-width: 0;
}

.panel-head,
.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafb;
}

.tab {
  min-width: 48px;
  border: 0;
  background: transparent;
}

.tab.is-active {
  background: #17212b;
  color: #ffffff;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.distribution {
  display: grid;
  grid-template-columns: repeat(7, minmax(80px, 1fr));
  gap: 8px;
  padding: 12px 16px 0;
}

.bar-item {
  min-width: 0;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf1;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
}

.table-wrap {
  max-height: calc(100vh - 310px);
  overflow: auto;
  padding: 12px 16px 16px;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf3f7;
  color: #394652;
  font-size: 12px;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.is-selected {
  background: #eef6f4;
}

.chain-name {
  display: grid;
  gap: 2px;
  min-width: 112px;
}

.chain-name strong {
  font-size: 14px;
}

.chain-name span,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.summary-cell {
  max-width: 360px;
  color: #33404b;
  font-size: 13px;
  line-height: 1.45;
}

.risk-cell {
  min-width: 180px;
}

.monitor-index {
  width: 48px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.risk-badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  border-radius: 6px;
  padding: 5px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.risk-badge strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 11px;
}

.risk-01 {
  background: var(--green);
}

.risk-02 {
  background: var(--blue);
}

.risk-03 {
  background: var(--amber);
}

.risk-04 {
  background: var(--teal);
}

.risk-05 {
  background: var(--red);
}

.risk-06 {
  background: var(--orange);
}

.risk-07,
.risk-unknown {
  background: var(--gray);
}

.risk-badge.risk-kind-reconciliation {
  border: 1px solid #d58a65;
  background: #fff7f2;
  color: #8a3715;
}

.exposure-bullets {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 17px;
}

.exposure-bullets li {
  color: #2d3944;
  font-size: 13px;
  line-height: 1.45;
}

.monitor-rule-cell {
  max-width: 430px;
  color: #33404b;
  font-size: 13px;
  line-height: 1.45;
}

.monitor-rule-cell p {
  margin: 0;
}

.monitor-rule-cell p + p {
  margin-top: 7px;
}

.monitor-rule-cell strong {
  color: #17212b;
}

.detail-risk-badges {
  margin-left: -17px;
  list-style: none;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.detail-head .status-badge {
  flex: 0 1 auto;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}

.status-ready {
  background: var(--green);
}

.status-needs-work {
  background: var(--amber);
}

.status-unsupported {
  background: var(--gray);
}

.runtime-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 5px;
  padding: 4px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.runtime-status-healthy {
  background: var(--green);
}

.runtime-status-high {
  background: var(--red);
}

.runtime-status-source,
.runtime-status-testing {
  background: var(--amber);
}

.runtime-status-pending {
  background: var(--gray);
}

.runtime-status-unsupported {
  background: #52616b;
}

.runtime-status-gap {
  background: var(--orange);
}

.runtime-value {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.runtime-value-normal {
  color: var(--green);
}

.runtime-value-high {
  color: var(--red);
}

.runtime-value-audit {
  color: var(--amber);
}

.runtime-empty-value {
  color: var(--muted);
  font-size: 12px;
}

.rating-a {
  background: var(--green);
}

.rating-ab {
  background: var(--teal);
}

.rating-b {
  background: var(--blue);
}

.rating-bc {
  background: var(--amber);
}

.rating-c {
  background: var(--orange);
}

.rating-cd {
  background: var(--red);
}

.rating-unrated {
  background: var(--gray);
}

.detail-panel {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
}

.runtime-detail-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.runtime-exposure-list {
  margin-top: 12px;
}

.runtime-monitor-list {
  display: grid;
}

.runtime-monitor-row {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.runtime-monitor-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.runtime-monitor-row:last-child {
  padding-bottom: 0;
}

.runtime-monitor-row header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.runtime-monitor-row header div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.runtime-monitor-row header span:not(.observation-status) {
  border-radius: 4px;
  background: var(--surface-2);
  padding: 3px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.runtime-monitor-row dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.runtime-monitor-row dl div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
}

.runtime-monitor-row dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.observation-status {
  display: inline-flex;
  border-radius: 4px;
  padding: 3px 6px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

.observation-status.is-normal {
  background: var(--green);
}

.observation-status.is-high {
  background: var(--red);
}

.observation-status.is-audit {
  border-color: #d6a04d;
  background: #fff8e8;
  color: #8a5700;
}

.runtime-policy-copy {
  margin: 0 0 12px;
  color: #40505c;
  font-size: 13px;
  line-height: 1.55;
}

.runtime-mini-table {
  width: 100%;
  overflow: auto;
}

.runtime-mini-table table {
  min-width: 640px;
}

.runtime-mini-table th,
.runtime-mini-table td {
  padding: 7px 6px;
  font-size: 11px;
}

.runtime-mini-table td {
  overflow-wrap: anywhere;
}

.runtime-mini-table small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.runtime-detail-empty {
  display: grid;
  gap: 4px;
  padding: 8px 0;
  text-align: left;
}

.runtime-detail-empty span {
  font-size: 12px;
}

.runtime-poll-list {
  display: grid;
}

.runtime-poll-row {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 8px 0;
  color: var(--muted);
  font-size: 11px;
}

.runtime-poll-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.runtime-poll-row strong {
  color: var(--ink);
  font-size: 12px;
}

.runtime-poll-row small {
  grid-column: 2 / -1;
  color: var(--red);
  overflow-wrap: anywhere;
}

.poll-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.poll-dot.is-success {
  background: var(--green);
}

.poll-dot.is-failed {
  background: var(--red);
}

.detail-meta div {
  min-width: 0;
  background: #fbfcfd;
  padding: 10px 12px;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.detail-section {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.detail-section p {
  margin-bottom: 0;
  color: #2d3944;
  font-size: 14px;
  line-height: 1.62;
  white-space: pre-wrap;
}

.stacked-copy {
  margin-top: 10px;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #2d3944;
  font-size: 14px;
  line-height: 1.55;
}

.link-stack,
.test-stack,
.api-list,
.source-list {
  display: grid;
  gap: 10px;
}

.endpoint-link,
.source-row {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
  color: #174f8a;
  padding: 9px 10px;
  text-decoration: none;
}

.endpoint-link:hover,
.source-row:hover {
  border-color: #8bb6d8;
  background: #f1f7fb;
}

.test-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
  overflow: hidden;
}

.test-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.test-title strong {
  font-size: 13px;
}

pre {
  margin: 0;
  overflow: auto;
  padding: 10px;
  color: #24323d;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.api-list,
.source-list {
  padding: 16px;
}

.empty {
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1120px) {
  .summary-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .runtime-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .simple-summary,
  .simple-policy-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .simple-policy-strip > div:nth-child(2) {
    border-right: 0;
  }

  .simple-policy-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .taxonomy-group-issuance .mindmap-branches,
  .taxonomy-group-reconciliation .mindmap-branches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .runtime-summary .metric {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .runtime-summary .metric:nth-child(4n) {
    border-right: 0;
  }

  .runtime-summary .metric:nth-child(n + 5) {
    border-bottom: 0;
  }

  .runtime-summary .metric:last-child {
    border-right: 0;
  }

  .control-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 16px;
  }

  .source-note {
    text-align: left;
  }

  .topbar-actions {
    justify-items: start;
    width: 100%;
  }

  .section-tabs {
    width: 100%;
  }

  .section-tab {
    flex: 1;
  }

  .workspace {
    padding: 10px;
  }

  .summary-band,
  .control-panel,
  .distribution,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .runtime-summary,
  .runtime-detail-meta {
    grid-template-columns: 1fr;
  }

  .simple-summary,
  .simple-policy-strip,
  .simple-detail-meta,
  .simple-amount-row,
  .simple-extraction dl,
  .simple-signal-row {
    grid-template-columns: 1fr;
  }

  .simple-policy-strip > div,
  .simple-policy-strip > div:nth-child(2),
  .simple-policy-strip > div:nth-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .simple-policy-strip > div:last-child {
    border-bottom: 0;
  }

  .runtime-alert-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .runtime-alert-row > span:nth-child(3),
  .runtime-alert-row time {
    grid-column: 2;
  }

  .runtime-no-alert {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .runtime-monitor-row dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .runtime-poll-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .runtime-poll-row > span:nth-child(4) {
    grid-column: 2;
  }

  .taxonomy-group-issuance .mindmap-branches,
  .taxonomy-group-reconciliation .mindmap-branches {
    grid-template-columns: 1fr;
  }

  .taxonomy-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .taxonomy-count {
    justify-items: start;
  }

  .metric,
  .metric:nth-child(2),
  .metric:nth-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .panel-head,
  .detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-wrap {
    max-height: none;
  }
}
