.sa-panel {
  padding-top: 1rem;
}

.sa-panel .container {
  margin: 0;
  max-width: none;
}

.sa-panel .box,
.sa-panel .column,
.sa-panel .select {
  margin: 0;
}

.sa-panel .columns {
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  margin-top: 0;
}

.sa-panel .column {
  padding: 0.5rem;
}

.sa-panel .sa-header {
  background: #f6f8fb;
  border: 1px solid #dce3ed;
  border-radius: 8px;
}

.sa-panel .sa-header .hero-body {
  padding: 1rem 1.25rem;
}

.sa-panel .sa-controls {
  padding: 0.85rem 1rem;
}

.sa-panel .sa-control-help {
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.25;
  margin-top: 0.35rem;
  max-width: 18rem;
}

.sa-panel .sa-chart-controls .sa-control-help {
  flex: 1 0 100%;
  max-width: none;
}

.sa-panel .sa-chart-controls {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.sa-panel .sa-chart-control {
  flex: 0 0 auto;
  min-width: 6.5rem;
}

.sa-panel .sa-chart-control-grow {
  flex: 1 1 8.5rem;
  min-width: 8.5rem;
}

.sa-panel .sa-chart-control .select,
.sa-panel .sa-chart-control select {
  width: 100%;
}

.sa-panel.sa-landing-crs {
  margin: 0 auto 1rem;
  max-width: 760px;
  padding-top: 0;
  width: 100%;
}

.landing-market-column > .section {
  padding-bottom: 0.75rem;
  padding-top: 0.75rem;
}

.landing-decision-columns {
  align-items: flex-start;
  justify-content: center;
  margin-top: 0.35rem;
  --landing-decision-card-width: 325px;
}

.landing-data-column,
.landing-signup-column {
  max-width: calc(var(--landing-decision-card-width) + 1.5rem);
  width: 100%;
}

.landing-data-column .sa-panel.sa-landing-crs {
  margin: 0 auto;
  max-width: var(--landing-decision-card-width);
  width: min(100%, var(--landing-decision-card-width));
}

.landing-signup-column {
  align-self: flex-start;
}

@media screen and (min-width: 1024px) {
  .landing-decision-columns > .landing-data-column,
  .landing-decision-columns > .landing-signup-column {
    flex: 0 0 calc(var(--landing-decision-card-width) + 1.5rem);
    width: calc(var(--landing-decision-card-width) + 1.5rem);
  }
}

@media screen and (max-width: 1023px) {
  .landing-data-column,
  .landing-signup-column {
    margin-left: auto;
    margin-right: auto;
  }
}

.sa-panel.sa-landing-crs .sa-landing-grid {
  margin-top: 0;
}

.sa-panel.sa-landing-crs .sa-landing-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  color: #172033;
  min-height: 330px;
  padding: 0.85rem;
  text-align: left;
}

.sa-panel.sa-landing-crs .sa-landing-card--consolidated {
  min-height: 0;
}

.sa-panel.sa-landing-crs .sa-landing-card .title,
.sa-panel.sa-landing-crs .sa-landing-card .heading {
  color: inherit;
}

.sa-panel.sa-landing-crs .sa-landing-card-header {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.sa-panel .sa-stress-info-tag {
  cursor: help;
  overflow: visible;
  position: relative;
}

.sa-panel .sa-stress-info-tag:focus {
  outline: 2px solid rgba(96, 165, 250, 0.9);
  outline-offset: 3px;
}

.sa-panel .sa-stress-info-tag::after {
  background: rgba(6, 10, 18, 0.96);
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 6px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
  color: #edf2f7;
  content: attr(data-tooltip);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0;
  padding: 0.65rem 0.75rem;
  pointer-events: none;
  position: absolute;
  right: 0;
  text-align: left;
  top: calc(100% + 0.55rem);
  transform: translateY(-0.15rem);
  transition: opacity 0.16s ease, transform 0.16s ease;
  white-space: pre-line;
  width: min(17rem, calc(100vw - 2rem));
  z-index: 30;
}

.sa-panel .sa-stress-info-tag:hover::after,
.sa-panel .sa-stress-info-tag:focus::after {
  opacity: 1;
  transform: translateY(0);
}

.sa-panel.sa-landing-crs .sa-landing-score-block {
  align-items: center;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto 1fr;
  margin-bottom: 0.6rem;
}

.sa-panel.sa-landing-crs .sa-landing-score {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.95;
}

.sa-panel.sa-landing-crs .sa-landing-score-meta {
  color: #475569;
  display: grid;
  font-size: 0.76rem;
  gap: 0.12rem;
  line-height: 1.25;
}

.sa-panel.sa-landing-crs .sa-landing-main-progress {
  margin-bottom: 0.75rem;
}

.sa-panel.sa-landing-crs .sa-landing-instrument-list,
.sa-panel.sa-landing-crs .sa-landing-driver-list {
  display: grid;
  gap: 0.5rem;
}

.sa-panel.sa-landing-crs .sa-landing-driver-stack {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.sa-panel.sa-landing-crs .sa-landing-driver-group {
  display: grid;
  gap: 0.5rem;
}

.sa-panel.sa-landing-crs .sa-landing-instrument-row,
.sa-panel.sa-landing-crs .sa-landing-driver-row {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem;
}

.sa-panel.sa-landing-crs .sa-landing-driver-row {
  align-items: center;
  grid-template-columns: 1fr auto;
}

.sa-panel.sa-landing-crs .sa-landing-row-title {
  color: #172033;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.15;
}

.sa-panel.sa-landing-crs .sa-landing-row-meta,
.sa-panel.sa-landing-crs .sa-landing-price-meta {
  color: #64748b;
  font-size: 0.7rem;
  line-height: 1.25;
}

.sa-panel.sa-landing-crs .sa-landing-driver-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sa-panel.sa-landing-crs .sa-landing-delta {
  align-items: center;
  display: inline-flex;
  font-weight: 700;
  gap: 0.16rem;
  white-space: nowrap;
}

.sa-panel.sa-landing-crs .sa-landing-delta--up {
  color: #b91c1c;
}

.sa-panel.sa-landing-crs .sa-landing-delta--down {
  color: #047857;
}

.sa-panel.sa-landing-crs .sa-landing-delta--flat,
.sa-panel.sa-landing-crs .sa-landing-delta--unknown {
  color: #64748b;
}

.sa-panel.sa-landing-crs .sa-landing-row-score,
.sa-panel.sa-landing-crs .sa-landing-driver-score {
  align-items: center;
  display: flex;
  gap: 0.4rem;
  justify-content: space-between;
}

.sa-panel.sa-landing-crs .sa-landing-row-score > span:first-child {
  font-size: 1.1rem;
  font-weight: 800;
}

.sa-panel.sa-landing-crs .sa-landing-history-chart {
  min-height: 178px;
}

.sa-panel.sa-landing-crs .sa-chart {
  min-height: 178px;
}

.sa-panel.sa-landing-crs .notification {
  margin-bottom: 0.75rem;
}

.sa-panel .sa-help-heading {
  margin-bottom: 0.55rem;
}

.sa-panel .sa-help-button .icon {
  margin-left: 0;
  margin-right: 0;
}

.sa-panel .sa-score-card {
  min-height: 190px;
  padding: 1rem;
}

.sa-panel .sa-panel-box {
  min-height: 330px;
  padding: 1rem;
}

.sa-panel .sa-crs-map-heading {
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.sa-panel .sa-crs-map-heading .level-left {
  min-width: 0;
}

.sa-panel .sa-crs-view-toggle {
  margin-bottom: 0;
  white-space: nowrap;
}

.sa-panel .sa-treemap-toolbar {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.6rem;
}

.sa-panel .sa-treemap-field {
  align-items: center;
  margin-bottom: 0;
  max-width: 17rem;
  width: 100%;
}

.sa-panel .sa-treemap-field .field-label {
  flex-basis: auto;
  flex-grow: 0;
  margin-right: 0.45rem;
  padding-top: 0;
}

.sa-panel .sa-treemap-field .field-body {
  flex-grow: 1;
}

.sa-panel .sa-metric-grid {
  align-content: start;
  display: grid;
  gap: 0.45rem;
  width: 100%;
}

.sa-panel .sa-bubble-grid.sa-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}

.sa-panel .sa-instrument-metric-grid {
  grid-template-columns: 1fr;
}

.sa-panel .sa-metric-row {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #9ca3af;
  border-radius: 7px;
  color: #172033;
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.52rem;
  text-align: left;
}

.sa-panel .sa-metric-row.is-loading-state {
  background: rgba(248, 250, 252, 0.52);
  border-style: dashed;
}

.sa-panel .sa-metric-row.is-clickable {
  cursor: pointer;
}

.sa-panel .sa-metric-row.is-clickable:focus,
.sa-panel .sa-metric-row.is-clickable:hover {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  outline: none;
}

.sa-panel .sa-metric-row.sa-regime-calm {
  border-left-color: #059669;
}

.sa-panel .sa-metric-row.sa-regime-transition {
  border-left-color: #2563eb;
}

.sa-panel .sa-metric-row.sa-regime-stress {
  border-left-color: #d97706;
}

.sa-panel .sa-metric-row.sa-regime-extreme {
  border-left-color: #dc2626;
}

.sa-panel .sa-metric-range,
.sa-panel .sa-metric-foot {
  align-items: center;
  color: #64748b;
  display: grid;
  font-size: 0.7rem;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  line-height: 1.2;
}

.sa-panel .sa-metric-risk {
  color: #172033;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.sa-panel .sa-metric-range-value {
  cursor: help;
  font-weight: 700;
  min-width: 0;
}

.sa-panel .sa-metric-main {
  align-items: center;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.sa-panel .sa-metric-copy {
  min-width: 0;
}

.sa-panel .sa-metric-title {
  color: #172033;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.sa-panel .sa-metric-meta {
  color: #64748b;
  font-size: 0.7rem;
  line-height: 1.25;
  margin-top: 0.12rem;
}

.sa-panel .sa-metric-score-block {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.sa-panel .sa-metric-score {
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1;
}

.sa-panel .sa-loading-tag {
  background: transparent;
  border: 1px solid rgba(100, 116, 139, 0.45);
  color: #475569;
  gap: 0.35rem;
}

.sa-panel .sa-loading-tag::before {
  animation: sa-spin 0.75s linear infinite;
  border: 2px solid rgba(100, 116, 139, 0.28);
  border-radius: 999px;
  border-top-color: #2563eb;
  content: "";
  display: inline-block;
  height: 0.72rem;
  width: 0.72rem;
}

.sa-panel .sa-loading-progress {
  opacity: 0.38;
}

.sa-panel .sa-metric-delta {
  font-weight: 800;
  text-align: center;
}

.sa-panel .sa-delta-up {
  color: #dc2626;
}

.sa-panel .sa-delta-down {
  color: #059669;
}

.sa-panel .sa-delta-flat,
.sa-panel .sa-delta-unknown {
  color: #6b7280;
}

.sa-panel .sa-treemap-delta {
  font-size: 0.68rem;
  font-weight: 900;
  pointer-events: none;
  text-anchor: end;
}

.sa-panel .sa-treemap-delta.sa-delta-up {
  fill: #dc2626;
}

.sa-panel .sa-treemap-delta.sa-delta-down {
  fill: #059669;
}

.sa-panel .sa-treemap-delta.sa-delta-flat,
.sa-panel .sa-treemap-delta.sa-delta-unknown {
  fill: #6b7280;
}

.sa-panel .sa-bubble-grid {
  min-height: 260px;
  position: relative;
}

.sa-panel .sa-crs-treemap {
  display: block;
  min-height: 330px;
  width: 100%;
}

.sa-panel .sa-treemap-summary {
  align-items: center;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.7rem;
  font-weight: 700;
  gap: 0.35rem 0.8rem;
  justify-content: space-between;
  line-height: 1.25;
  margin-bottom: 0.45rem;
}

.sa-panel .sa-treemap-svg {
  background: #f8fafc;
  border: 1px solid #dce3ed;
  border-radius: 7px;
  display: block;
  overflow: hidden;
  width: 100%;
}

.sa-panel .sa-treemap-cell {
  cursor: default;
  outline: none;
}

.sa-panel .sa-treemap-cell.is-clickable {
  cursor: pointer;
}

.sa-panel .sa-treemap-cell.is-clickable:focus .sa-treemap-rect,
.sa-panel .sa-treemap-cell.is-clickable:hover .sa-treemap-rect {
  stroke: #1d4ed8;
  stroke-width: 2.5;
}

.sa-panel .sa-treemap-rect {
  fill: #e5e7eb;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1;
}

.sa-panel .sa-treemap-rect.sa-regime-calm,
.sa-panel .sa-treemap-swatch.sa-regime-calm {
  background: #d1fae5;
  fill: #d1fae5;
}

.sa-panel .sa-treemap-rect.sa-regime-transition,
.sa-panel .sa-treemap-swatch.sa-regime-transition {
  background: #dbeafe;
  fill: #dbeafe;
}

.sa-panel .sa-treemap-rect.sa-regime-stress,
.sa-panel .sa-treemap-swatch.sa-regime-stress {
  background: #fef3c7;
  fill: #fef3c7;
}

.sa-panel .sa-treemap-rect.sa-regime-extreme,
.sa-panel .sa-treemap-swatch.sa-regime-extreme {
  background: #fee2e2;
  fill: #fee2e2;
}

.sa-panel .sa-treemap-label,
.sa-panel .sa-treemap-score,
.sa-panel .sa-treemap-meta,
.sa-panel .sa-treemap-group-label {
  fill: #172033;
  pointer-events: none;
}

.sa-panel .sa-treemap-label {
  font-size: 0.74rem;
  font-weight: 800;
}

.sa-panel .sa-treemap-score {
  font-size: 0.72rem;
  font-weight: 800;
}

.sa-panel .sa-treemap-meta {
  fill: #475569;
  font-size: 0.64rem;
  font-weight: 700;
}

.sa-panel .sa-treemap-group-label {
  fill: #475569;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sa-panel .sa-treemap-legend {
  align-items: center;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.7rem;
  font-weight: 700;
  gap: 0.35rem 0.75rem;
  justify-content: flex-end;
  line-height: 1.2;
  margin-top: 0.45rem;
}

.sa-panel .sa-treemap-legend-item {
  align-items: center;
  display: inline-flex;
  gap: 0.3rem;
}

.sa-panel .sa-treemap-swatch {
  border: 1px solid rgba(71, 85, 105, 0.25);
  border-radius: 2px;
  display: inline-block;
  height: 0.68rem;
  width: 0.68rem;
}

.sa-panel .sa-chart {
  min-height: 340px;
  position: relative;
}

.sa-panel .sa-bubble-grid svg,
.sa-panel .sa-chart svg {
  display: block;
  height: auto;
  max-width: 100%;
  width: 100%;
}

.sa-panel .sa-bubble-node {
  cursor: pointer;
  outline: none;
}

.sa-panel .sa-bubble-node:focus .sa-bubble-circle,
.sa-panel .sa-bubble-node:hover .sa-bubble-circle {
  stroke-width: 4;
}

.sa-panel .sa-bubble-circle {
  fill: #d1fae5;
  stroke: #047857;
  stroke-width: 2;
}

.sa-panel .sa-bubble-circle.sa-regime-transition {
  fill: #dbeafe;
  stroke: #2563eb;
}

.sa-panel .sa-bubble-circle.sa-regime-stress {
  fill: #fef3c7;
  stroke: #d97706;
}

.sa-panel .sa-bubble-circle.sa-regime-extreme {
  fill: #fee2e2;
  stroke: #dc2626;
}

.sa-panel .sa-bubble-circle.sa-regime-unknown {
  fill: #f3f4f6;
  stroke: #9ca3af;
}

.sa-panel .sa-bubble-label,
.sa-panel .sa-bubble-score,
.sa-panel .sa-bubble-percentile,
.sa-panel .sa-bubble-risk-label {
  fill: #172033;
  font-weight: 700;
  pointer-events: none;
  text-anchor: middle;
}

.sa-panel .sa-bubble-label {
  font-size: 0.72rem;
}

.sa-panel .sa-bubble-score {
  font-size: 0.88rem;
}

.sa-panel .sa-bubble-percentile {
  font-size: 0.66rem;
}

.sa-panel .sa-bubble-risk-label {
  font-size: 0.56rem;
}

.sa-panel .sa-bubble-range-text,
.sa-panel .sa-bubble-period-text {
  cursor: help;
  fill: #475569;
  font-size: 0.64rem;
  font-weight: 700;
  pointer-events: auto;
}

.sa-panel .sa-bubble-period-text {
  font-size: 0.58rem;
}

.sa-panel .sa-bubble-delta-line {
  stroke-linecap: round;
  stroke-width: 2.5;
}

.sa-panel .sa-bubble-delta-text {
  font-size: 0.68rem;
  font-weight: 700;
  pointer-events: none;
}

.sa-panel .sa-chart-axis,
.sa-panel .sa-chart-grid {
  stroke: #d7dee8;
  stroke-width: 1;
}

.sa-panel .sa-chart-grid {
  stroke-dasharray: 3 4;
}

.sa-panel .sa-chart-price-grid {
  opacity: 0.7;
}

.sa-panel .sa-chart-text,
.sa-panel .sa-chart-label {
  fill: #4b5563;
  font-size: 0.72rem;
}

.sa-panel .sa-chart-label {
  font-weight: 700;
}

.sa-panel .sa-chart-axis-title {
  font-size: 0.72rem;
  font-weight: 700;
}

.sa-panel .sa-chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.sa-panel .sa-chart-price-line {
  stroke-width: 3;
}

.sa-panel .sa-asof-marker {
  stroke: #6b7280;
  stroke-dasharray: 4 4;
  stroke-width: 1.5;
}

.sa-panel .sa-empty {
  align-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  display: flex;
  justify-content: center;
  min-height: 180px;
  padding: 1rem;
  text-align: center;
}

.sa-panel .sa-loading-box {
  align-items: center;
  background: rgba(248, 250, 252, 0.42);
  border: 1px dashed rgba(148, 163, 184, 0.58);
  border-radius: 8px;
  color: #475569;
  display: flex;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 0.65rem;
  justify-content: center;
  min-height: 160px;
  padding: 1rem;
  text-align: center;
}

.sa-panel .sa-chart .sa-loading-box {
  min-height: 320px;
}

.sa-panel .sa-bubble-grid .sa-loading-box {
  min-height: 250px;
}

.sa-panel .sa-loading-spinner {
  animation: sa-spin 0.75s linear infinite;
  border: 3px solid rgba(100, 116, 139, 0.25);
  border-radius: 999px;
  border-top-color: #2563eb;
  flex: 0 0 auto;
  height: 1.1rem;
  width: 1.1rem;
}

.sa-panel .sa-alerts .notification {
  margin-bottom: 0.5rem;
}

.sa-panel .sa-contributors {
  margin-top: 0.5rem;
}

.sa-panel .sa-contributors summary {
  cursor: pointer;
}

.sa-panel .sa-contributor-toolbar {
  margin: 0.6rem 0 0.75rem;
}

.sa-panel .sa-contributor-heading-row {
  width: 100%;
}

.sa-panel .sa-contributor-heading-row .level-left {
  min-width: 0;
}

.sa-panel .sa-contributor-heading-row .level-right {
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.sa-panel .sa-contributor-limit-field {
  margin-bottom: 0;
}

.sa-panel .sa-contributor-limit-control {
  min-width: 76px;
}

.sa-panel .sa-contributor-limit-control select {
  width: 100%;
}

.sa-panel .sa-contributor-limit-help {
  margin-top: 0.2rem;
  text-align: right;
}

.sa-panel .sa-contributor-help {
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.sa-panel .sa-contributor-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  margin-bottom: 0.75rem;
  padding: 0.7rem;
}

.sa-panel .sa-contributors .table {
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

.sa-panel .sa-contributor-table {
  background: transparent;
  margin-bottom: 0;
}

.sa-panel .sa-contributor-table th {
  color: #475569;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.sa-panel .sa-contributor-table td,
.sa-panel .sa-contributor-table th {
  vertical-align: middle;
}

@media screen and (max-width: 520px) {
  .sa-panel .sa-contributor-heading-row .level-right {
    margin-left: 0.5rem;
  }

  .sa-panel .sa-contributor-limit-help {
    text-align: left;
  }
}

.sa-help-modal .modal-card {
  max-width: min(720px, calc(100vw - 2rem));
}

.sa-help-modal .modal-card-body {
  line-height: 1.55;
}

.sa-help-modal .content h1,
.sa-help-modal .content h2,
.sa-help-modal .content h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.sa-help-modal .content p {
  margin-bottom: 0.85rem;
}

@keyframes sa-spin {
  100% {
    transform: rotate(360deg);
  }
}

body.dark-mode .sa-panel .sa-header,
html.dark-mode body .sa-panel .sa-header {
  background: #161b22;
  border-color: #30363d;
}

body.dark-mode .sa-panel .sa-chart-text,
body.dark-mode .sa-panel .sa-chart-label,
body.dark-mode .sa-panel .sa-chart-axis-title,
html.dark-mode body .sa-panel .sa-chart-text,
html.dark-mode body .sa-panel .sa-chart-label,
html.dark-mode body .sa-panel .sa-chart-axis-title {
  fill: #c9d1d9;
  color: #c9d1d9;
}

body.dark-mode .sa-panel.sa-landing-crs .sa-landing-card,
html.dark-mode body .sa-panel.sa-landing-crs .sa-landing-card {
  background: rgba(22, 27, 34, 0.96);
  border-color: #30363d;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  color: #c9d1d9;
}

body.dark-mode .sa-panel.sa-landing-crs .sa-landing-score-meta,
body.dark-mode .sa-panel.sa-landing-crs .sa-landing-row-meta,
body.dark-mode .sa-panel.sa-landing-crs .sa-landing-price-meta,
html.dark-mode body .sa-panel.sa-landing-crs .sa-landing-score-meta,
html.dark-mode body .sa-panel.sa-landing-crs .sa-landing-row-meta,
html.dark-mode body .sa-panel.sa-landing-crs .sa-landing-price-meta {
  color: #9ca3af;
}

body.dark-mode .sa-panel.sa-landing-crs .sa-landing-delta--up,
html.dark-mode body .sa-panel.sa-landing-crs .sa-landing-delta--up {
  color: #f87171;
}

body.dark-mode .sa-panel.sa-landing-crs .sa-landing-delta--down,
html.dark-mode body .sa-panel.sa-landing-crs .sa-landing-delta--down {
  color: #34d399;
}

body.dark-mode .sa-panel.sa-landing-crs .sa-landing-delta--flat,
body.dark-mode .sa-panel.sa-landing-crs .sa-landing-delta--unknown,
html.dark-mode body .sa-panel.sa-landing-crs .sa-landing-delta--flat,
html.dark-mode body .sa-panel.sa-landing-crs .sa-landing-delta--unknown {
  color: #9ca3af;
}

body.dark-mode .sa-panel.sa-landing-crs .sa-landing-instrument-row,
body.dark-mode .sa-panel.sa-landing-crs .sa-landing-driver-row,
body.dark-mode .sa-panel .sa-metric-row,
html.dark-mode body .sa-panel.sa-landing-crs .sa-landing-instrument-row,
html.dark-mode body .sa-panel.sa-landing-crs .sa-landing-driver-row,
html.dark-mode body .sa-panel .sa-metric-row {
  background: #1f2937;
  border-color: #30363d;
}

body.dark-mode .sa-panel.sa-landing-crs .sa-landing-row-title,
body.dark-mode .sa-panel .sa-metric-title,
body.dark-mode .sa-panel .sa-metric-risk,
html.dark-mode body .sa-panel.sa-landing-crs .sa-landing-row-title,
html.dark-mode body .sa-panel .sa-metric-title,
html.dark-mode body .sa-panel .sa-metric-risk {
  color: #f3f4f6;
}

body.dark-mode #situational-awareness-panel .sa-metric-score,
html.dark-mode body #situational-awareness-panel .sa-metric-score {
  color: #f3f4f6;
}

body.dark-mode .sa-panel .sa-control-help,
html.dark-mode body .sa-panel .sa-control-help {
  color: #9ca3af;
}

body.dark-mode .sa-panel .sa-metric-range,
body.dark-mode .sa-panel .sa-metric-foot,
body.dark-mode .sa-panel .sa-metric-meta,
body.dark-mode .sa-panel .sa-contributor-help,
body.dark-mode .sa-panel .sa-treemap-summary,
body.dark-mode .sa-panel .sa-treemap-legend,
html.dark-mode body .sa-panel .sa-metric-range,
html.dark-mode body .sa-panel .sa-metric-foot,
html.dark-mode body .sa-panel .sa-metric-meta,
html.dark-mode body .sa-panel .sa-contributor-help,
html.dark-mode body .sa-panel .sa-treemap-summary,
html.dark-mode body .sa-panel .sa-treemap-legend {
  color: #9ca3af;
}

body.dark-mode .sa-panel .sa-metric-row.sa-regime-calm,
html.dark-mode body .sa-panel .sa-metric-row.sa-regime-calm {
  border-left-color: #059669;
}

body.dark-mode .sa-panel .sa-metric-row.sa-regime-transition,
html.dark-mode body .sa-panel .sa-metric-row.sa-regime-transition {
  border-left-color: #2563eb;
}

body.dark-mode .sa-panel .sa-metric-row.sa-regime-stress,
html.dark-mode body .sa-panel .sa-metric-row.sa-regime-stress {
  border-left-color: #d97706;
}

body.dark-mode .sa-panel .sa-metric-row.sa-regime-extreme,
html.dark-mode body .sa-panel .sa-metric-row.sa-regime-extreme {
  border-left-color: #dc2626;
}

body.dark-mode .sa-panel .sa-bubble-label,
body.dark-mode .sa-panel .sa-bubble-score,
body.dark-mode .sa-panel .sa-bubble-percentile,
body.dark-mode .sa-panel .sa-bubble-risk-label,
html.dark-mode body .sa-panel .sa-bubble-label,
html.dark-mode body .sa-panel .sa-bubble-score,
html.dark-mode body .sa-panel .sa-bubble-percentile,
html.dark-mode body .sa-panel .sa-bubble-risk-label {
  fill: #0f172a;
}

body.dark-mode .sa-panel .sa-bubble-range-text,
body.dark-mode .sa-panel .sa-bubble-period-text,
html.dark-mode body .sa-panel .sa-bubble-range-text,
html.dark-mode body .sa-panel .sa-bubble-period-text {
  fill: #c9d1d9;
}

body.dark-mode .sa-panel .sa-treemap-svg,
html.dark-mode body .sa-panel .sa-treemap-svg {
  background: #161b22;
  border-color: #30363d;
}

body.dark-mode .sa-panel .sa-treemap-label,
body.dark-mode .sa-panel .sa-treemap-score,
html.dark-mode body .sa-panel .sa-treemap-label,
html.dark-mode body .sa-panel .sa-treemap-score {
  fill: #0f172a;
}

body.dark-mode .sa-panel .sa-treemap-meta,
body.dark-mode .sa-panel .sa-treemap-group-label,
html.dark-mode body .sa-panel .sa-treemap-meta,
html.dark-mode body .sa-panel .sa-treemap-group-label {
  fill: #c9d1d9;
}

body.dark-mode .sa-panel .sa-treemap-cell.is-clickable:focus .sa-treemap-rect,
body.dark-mode .sa-panel .sa-treemap-cell.is-clickable:hover .sa-treemap-rect,
html.dark-mode body .sa-panel .sa-treemap-cell.is-clickable:focus .sa-treemap-rect,
html.dark-mode body .sa-panel .sa-treemap-cell.is-clickable:hover .sa-treemap-rect {
  stroke: #58a6ff;
}

body.dark-mode .sa-panel .sa-chart-axis,
body.dark-mode .sa-panel .sa-chart-grid,
html.dark-mode body .sa-panel .sa-chart-axis,
html.dark-mode body .sa-panel .sa-chart-grid {
  stroke: #3a4553;
}

body.dark-mode .sa-panel .sa-contributor-panel,
html.dark-mode body .sa-panel .sa-contributor-panel {
  background: #1f2937;
  border-color: #30363d;
}

body.dark-mode .sa-panel .sa-contributor-table,
html.dark-mode body .sa-panel .sa-contributor-table {
  color: #c9d1d9;
}

body.dark-mode .sa-panel .sa-contributor-table th,
html.dark-mode body .sa-panel .sa-contributor-table th {
  color: #9ca3af;
}

body.dark-mode .sa-panel .sa-empty,
html.dark-mode body .sa-panel .sa-empty {
  border-color: #3a4553;
  color: #c9d1d9;
}

body.dark-mode .sa-panel .sa-metric-row.is-loading-state,
html.dark-mode body .sa-panel .sa-metric-row.is-loading-state {
  background: rgba(31, 41, 55, 0.42);
}

body.dark-mode .sa-panel .sa-loading-box,
html.dark-mode body .sa-panel .sa-loading-box {
  background: rgba(22, 27, 34, 0.34);
  border-color: rgba(156, 163, 175, 0.42);
  color: #c9d1d9;
}

body.dark-mode .sa-panel .sa-loading-spinner,
body.dark-mode .sa-panel .sa-loading-tag::before,
html.dark-mode body .sa-panel .sa-loading-spinner,
html.dark-mode body .sa-panel .sa-loading-tag::before {
  border-color: rgba(201, 209, 217, 0.22);
  border-top-color: #58a6ff;
}

body.dark-mode .sa-panel .sa-loading-tag,
html.dark-mode body .sa-panel .sa-loading-tag {
  border-color: rgba(201, 209, 217, 0.38);
  color: #c9d1d9;
}

body.dark-mode .sa-help-modal .modal-card-head,
body.dark-mode .sa-help-modal .modal-card-body,
body.dark-mode .sa-help-modal .modal-card-foot,
html.dark-mode body .sa-help-modal .modal-card-head,
html.dark-mode body .sa-help-modal .modal-card-body,
html.dark-mode body .sa-help-modal .modal-card-foot {
  background: #161b22;
  border-color: #30363d;
  color: #c9d1d9;
}

body.dark-mode .sa-help-modal .modal-card-title,
body.dark-mode .sa-help-modal .content,
html.dark-mode body .sa-help-modal .modal-card-title,
html.dark-mode body .sa-help-modal .content {
  color: #c9d1d9;
}

@media screen and (max-width: 768px) {
  .sa-panel {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .sa-panel .sa-crs-map-heading {
    display: block;
  }

  .sa-panel .sa-crs-map-heading .level-right {
    margin-top: 0.5rem;
  }

  .sa-panel .sa-treemap-toolbar {
    justify-content: stretch;
  }

  .sa-panel .sa-treemap-field {
    max-width: none;
  }

  .sa-panel .sa-treemap-summary,
  .sa-panel .sa-treemap-legend {
    justify-content: flex-start;
  }
}
