.omi-status {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.omi-status.error {
  color: #b91c1c;
}

.risk-status {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.risk-status.error {
  color: #b91c1c;
}

.risk-results {
  display: grid;
  gap: 8px;
}

.risk-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  background: var(--surface-alt);
}

.risk-card h4 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #111827;
}

.risk-kv {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 2px 0;
}

.risk-kv span:first-child {
  text-align: left;
  white-space: nowrap;
}

.risk-kv span:first-child::after {
  content: ":";
}

.risk-kv span:last-child {
  margin-left: auto;
  text-align: right;
}

.risk-kv.risk-index span {
  font-size: 14px;
  font-weight: 700;
}

.risk-legal-sep {
  border-top: 1px solid var(--border);
  margin: 6px 0;
}

.risk-legal-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin: 2px 0 4px;
}

.risk-score-sep {
  border-top: 1px dashed var(--border);
  margin: 6px 0;
}

.risk-methodology-btn {
  font-size: 13px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.risk-radar-btn {
  font-size: 13px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.risk-methodology-content {
  max-height: 520px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.35;
}

.risk-methodology-popover {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  max-width: min(760px, calc(100vw - 32px));
}

.risk-methodology-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  position: sticky;
  top: 0;
  background: #ffffff;
  padding: 4px 0 6px;
  margin-bottom: 6px;
  z-index: 2;
  border-bottom: 1px solid var(--border);
}

.risk-methodology-close {
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: #111827;
}

.risk-methodology-content .section {
  margin-top: 6px;
}

.risk-methodology-content ul {
  margin: 4px 0 0 16px;
  padding: 0;
}

.risk-methodology-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

.risk-methodology-content blockquote {
  margin: 6px 0;
  padding-left: 10px;
  border-left: 3px solid #cbd5f5;
  color: #1f2937;
}

.risk-methodology-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  font-size: 13px;
}

.risk-methodology-table th,
.risk-methodology-table td {
  border: 1px solid var(--border);
  padding: 4px 6px;
  text-align: left;
}

.risk-methodology-table th {
  background: #f1f5f9;
}

.risk-formula {
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  margin: 6px 0;
}

.risk-radar-wrap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
}

.risk-radar-chart {
  display: block;
  overflow: visible;
}

.risk-radar-grid {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 1;
}

.risk-radar-axis {
  stroke: #d1d5db;
  stroke-width: 1;
}

.risk-radar-shape {
  fill: rgba(59, 130, 246, 0.25);
  stroke: #2563eb;
  stroke-width: 2;
}

.risk-radar-marker {
  fill: #2563eb;
}

.risk-radar-label {
  font-size: 12px;
  fill: #111827;
}

.risk-radar-center-title {
  font-size: 12px;
  fill: #6b7280;
}

.risk-radar-center-value {
  font-size: 13px;
  font-weight: 600;
  fill: #111827;
}

.risk-radar-legend {
  font-size: 13px;
  line-height: 1.35;
  min-width: 160px;
  max-width: 260px;
}

.risk-radar-inline {
  margin: 6px 0 8px;
  overflow: visible;
  display: flex;
  justify-content: center;
  cursor: pointer;
}

.risk-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.risk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.risk-overlays {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.risk-overlays-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.risk-overlay-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
}

.risk-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.risk-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.risk-overlay-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.risk-overlay-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.risk-overlay-sub {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.risk-overlay-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.risk-toggle-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-main);
}

.omi-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background: #f9fafb;
}

.omi-kv {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 2px 0;
}

.omi-key {
  color: var(--text-muted);
  font-weight: 600;
}

.omi-chart {
  width: 100%;
  height: 160px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.omi-chart svg {
  width: 100%;
  height: 160px;
  display: block;
}

.omi-chart-empty {
  font-size: 13px;
  color: var(--text-muted);
}

.omi-table-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.omi-table-wrap {
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

.omi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.omi-table th,
.omi-table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.omi-table th {
  background: #f3f4f6;
  position: sticky;
  top: 0;
}

.omi-series-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

#omiSeriesSelect {
  flex: 1;
  min-width: 160px;
  font-size: 13px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

.omi-series-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ntn-status {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ntn-status.error {
  color: #b91c1c;
}

.ntn-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background: #f9fafb;
}

.ntn-kv {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 2px 0;
}

.ntn-key {
  color: var(--text-muted);
  font-weight: 600;
}

.ntn-chart {
  width: 100%;
  height: 160px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ntn-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ntn-chart-empty {
  font-size: 13px;
  color: var(--text-muted);
}

.ntn-table-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ntn-table-wrap {
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

.ntn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ntn-table th,
.ntn-table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.ntn-table th {
  background: #f3f4f6;
  position: sticky;
  top: 0;
}

.ntn-series-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

#ntnSeriesSelect {
  flex: 1;
  min-width: 160px;
  font-size: 13px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

.ntn-series-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

#ntnScopeSelect {
  flex: 1;
  min-width: 160px;
  font-size: 13px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

.ntn-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  align-items: center;
}

.ntn-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ntn-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #6b7280;
}

.ntn-pie-slice {
  cursor: pointer;
  stroke: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  transform-box: fill-box;
  transform-origin: center;
  -webkit-tap-highlight-color: transparent;
}

.ntn-pie-slice:focus {
  outline: none;
}

.ntn-pie-slice.is-selected {
  transform: scale(1.08);
  opacity: 1;
}

.ntn-pie-slice.is-dimmed {
  opacity: 0.5;
}

.cap-status {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cap-status.error {
  color: #b91c1c;
}

.cap-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background: #f9fafb;
}

.cap-kv {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 2px 0;
}

.cap-key {
  color: var(--text-muted);
  font-weight: 600;
}

.cap-chart {
  width: 100%;
  height: 180px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cap-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cap-chart-empty {
  font-size: 13px;
  color: var(--text-muted);
}

.cap-table-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cap-table-wrap {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

.cap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cap-table th,
.cap-table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.cap-table th {
  background: #f3f4f6;
  position: sticky;
  top: 0;
}

.cap-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cap-kpi {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  padding: 6px;
}

.cap-kpi-action {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.15s ease;
}

.cap-kpi-action:hover {
  border-color: #0f766e;
  box-shadow: 0 6px 12px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

.cap-kpi-action:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

.cap-kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cap-kpi-value {
  font-size: 14px;
  font-weight: 600;
}

.cap-quadrant-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.chart-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.ntn-year-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chart-max-btn {
  border: 1px solid #cfd8e3;
  background: #f8fafc;
  color: #0f172a;
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.15s ease, background-color 0.15s ease;
}

.chart-max-btn:hover {
  border-color: var(--interactive);
  background: var(--interactive-light);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.chart-max-btn:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
}

.chart-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 27, 0.62);
  z-index: 2400;
}

.chart-lightbox {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1240px, 95vw);
  max-height: 92vh;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #cfd8e3;
  box-shadow: 0 28px 58px rgba(15, 23, 42, 0.36);
  z-index: 2401;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px 20px;
}

.chart-lightbox-title {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}

.chart-lightbox-title-main {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.chart-lightbox-title-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.chart-lightbox-content {
  flex: 1 1 auto;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  overflow: auto;
}

.chart-lightbox-content svg {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 72vh;
  display: block;
}

#chartLightboxLegend {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 12px;
  row-gap: 6px;
}

#chartLightboxLegend .ntn-legend-item {
  flex: 0 1 auto;
}

.chart-lightbox-content svg text {
  font-size: 95% !important;
  fill: #334155;
}

.chart-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.chart-lightbox-close:hover {
  border-color: var(--interactive);
  background: var(--interactive-light);
}
