/* Namespaced and theme-safe */
.cx-card{
  max-width: 720px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 18px;
  padding: 18px;
  background: var(--zefnps-card-bg, #fff);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--zefnps-text-color, #111827);
}

.cx-title{
  font-size: var(--zefnps-title-size, 2rem);
  font-weight: 800;
  color: var(--zefnps-title-color, inherit);
  margin: 0;
  margin-bottom: 10px;
  text-align: center;
}
.cx-subtitle{
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
}

/* --- Gauge sizing constraints --- */
.cx-gauge-shell{
  /* Theme (admin page): segment colors tinted with the overlay color */
  --_zefnps-ov: var(--zefnps-overlay, transparent);
  --_zefnps-os: var(--zefnps-overlay-strength, 0%);
  --zefnps-c1: color-mix(in srgb, var(--zefnps-seg-1, #7f1d1d), var(--_zefnps-ov) var(--_zefnps-os));
  --zefnps-c2: color-mix(in srgb, var(--zefnps-seg-2, #991b1b), var(--_zefnps-ov) var(--_zefnps-os));
  --zefnps-c3: color-mix(in srgb, var(--zefnps-seg-3, #dc2626), var(--_zefnps-ov) var(--_zefnps-os));
  --zefnps-c4: color-mix(in srgb, var(--zefnps-seg-4, #f97316), var(--_zefnps-ov) var(--_zefnps-os));
  --zefnps-c5: color-mix(in srgb, var(--zefnps-seg-5, #fbbf24), var(--_zefnps-ov) var(--_zefnps-os));
  --zefnps-c6: color-mix(in srgb, var(--zefnps-seg-6, #e5e7eb), var(--_zefnps-ov) var(--_zefnps-os));
  --zefnps-c7: color-mix(in srgb, var(--zefnps-seg-7, #bbf7d0), var(--_zefnps-ov) var(--_zefnps-os));
  --zefnps-c8: color-mix(in srgb, var(--zefnps-seg-8, #4ade80), var(--_zefnps-ov) var(--_zefnps-os));
  --zefnps-c9: color-mix(in srgb, var(--zefnps-seg-9, #22c55e), var(--_zefnps-ov) var(--_zefnps-os));
  --zefnps-c10: color-mix(in srgb, var(--zefnps-seg-10, #15803d), var(--_zefnps-ov) var(--_zefnps-os));
  --zefnps-c11: color-mix(in srgb, var(--zefnps-seg-11, #14532d), var(--_zefnps-ov) var(--_zefnps-os));
  width: var(--zefnps-shell-width, 420px);
  max-width: 100%;
  margin: 12px 0px 12px 12px ;
}


.cx-survey-link{
  text-align: center;
  margin-bottom: 12px;
}


/* Legend */
.cx-legend{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,.10);
  text-align: center;
}
.cx-legend-title{
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 8px;
}
.cx-legend-list{
  margin: 0;
  padding-left: 18px;
  color: var(--zefnps-text-color, #374151);
  font-size: 13px;
  line-height: 1.5;
}
.cx-legend-list li{
    margin: 6px 0;
    text-align: left;
    list-style: none;
}
.cx-swatch{
  display:inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
  transform: translateY(1px);
}

.s1{ background: var(--zefnps-c1, #7f1d1d); }
.s2{ background: var(--zefnps-c6, #e5e7eb); }
.s3{ background: var(--zefnps-c11, #14532d); }

/* Mobile: keep layout tidy */
@media (max-width: 520px){
  .cx-details{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cx-legend-toggle {
  margin-top: 12px;
}

.cx-legend-toggle summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}
.cx-credit {
  margin-top: 10px;
  font-size: 1rem;
}


.cx-legend-toggle summary::-webkit-details-marker {
  display: none;
}

.cx-chevron {
  transition: transform 0.2s ease;
  font-size: 14px;
}

.cx-legend-toggle[open] .cx-chevron {
  transform: rotate(180deg);
}

.cx-legend-list {
  margin-top: 10px;
}
