/* =====================================================================
   mmat_topography_map.css
   ---------------------------------------------------------------------
   Mapbox 3D MMAT topography map at
   /liver-transplant-waiting-list/mmat-topography/.
   Scoped to body.nf-acuity-page[data-page="mmat-topography"] so it
   cannot leak into the existing /your_options/ map module.
   ===================================================================== */

body.nf-acuity-page[data-page="mmat-topography"] .mmat-map-shell {
  position: relative;
  width: 100%;
  height: 640px;
  max-height: 80vh;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--nf-border, rgba(255, 255, 255, 0.18));
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32);
  background: #0e1830;
}
@media (max-width: 720px) {
  body.nf-acuity-page[data-page="mmat-topography"] .mmat-map-shell {
    height: 520px;
  }
}

#mmat-topo-map {
  position: absolute;
  inset: 0;
}

/* --- Map controls panel (top-right) --- */
.mmat-map-ctrls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  background: rgba(14, 24, 48, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 168, 150, 0.36);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: #f3f7ff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}
.mmat-map-ctrls h3 {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5ee7d5;
  font-weight: 700;
}
.mmat-map-ctrls label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  color: rgba(232, 238, 255, 0.92);
}
.mmat-map-ctrls input[type="checkbox"] {
  accent-color: #5ee7d5;
}
.mmat-map-ctrls .style-row {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.mmat-map-ctrls .style-row button {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e7ecfa;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.mmat-map-ctrls .style-row button.is-active {
  background: rgba(0, 168, 150, 0.28);
  border-color: rgba(0, 168, 150, 0.65);
  color: #5ee7d5;
}
.mmat-map-ctrls .style-row button:hover {
  background: rgba(0, 168, 150, 0.14);
}

/* Region jump row — CONUS / AK / HI / PR. Same visual grammar as the
   .style-row buttons but in a tighter 4-cell row. flyTo presets live in
   the JS REGIONS object. */
.mmat-map-ctrls .region-row {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}
.mmat-map-ctrls .region-row button {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e7ecfa;
  font-size: 10.5px;
  padding: 4px 4px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.mmat-map-ctrls .region-row button:hover {
  background: rgba(94, 231, 213, 0.14);
  border-color: rgba(94, 231, 213, 0.45);
}
.mmat-map-ctrls .region-row button.is-active {
  background: rgba(94, 231, 213, 0.22);
  border-color: rgba(94, 231, 213, 0.70);
  color: #5ee7d5;
}

/* --- MELD Lens (bottom-left, replaces the old static legend) ---
   A wider card that overlays a slider on the MMAT color gradient.
   Histogram of the donor MMAT distribution renders behind the gradient.
   Drag the thumb to set the patient-MELD lens; donors above the threshold
   soft-fade rather than disappear (MMAT is a median, not a cutoff). */
.mmat-lens-card {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 5;
  background: rgba(14, 24, 48, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(94, 231, 213, 0.32);
  border-radius: 12px;
  padding: 12px 14px 11px;
  color: #f3f7ff;
  width: 320px;
  max-width: calc(100vw - 24px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  font-size: 12px;
}
.mmat-lens-card.is-active {
  border-color: rgba(94, 231, 213, 0.65);
}
.mmat-lens-card .lens-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.mmat-lens-card .lens-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5ee7d5;
  font-weight: 700;
  margin: 0;
}
.mmat-lens-card .lens-value {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(94, 231, 213, 0.16);
  border: 1px solid rgba(94, 231, 213, 0.42);
  white-space: nowrap;
}
.mmat-lens-card .lens-sub {
  font-size: 11px;
  color: rgba(225, 232, 248, 0.78);
  margin: 0 0 6px;
  line-height: 1.35;
}

/* The interactive viz: histogram (svg) + gradient strip + range input,
   stacked via absolute positioning. Total height ≈ 34px. */
.mmat-lens-viz {
  position: relative;
  height: 34px;
  margin: 6px 0 2px;
}
.mmat-lens-histogram {
  position: absolute;
  inset: 0 0 14px 0;
  width: 100%;
  height: 20px;
  pointer-events: none;
}
.mmat-lens-histogram rect {
  fill: rgba(232, 238, 255, 0.22);
  transition: fill 0.12s ease;
}
.mmat-lens-histogram rect.in-band {
  fill: rgba(94, 231, 213, 0.72);
}
.mmat-lens-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg,
    #2a9df4 0%,
    #6cc1f0 25%,
    #b8c9d4 50%,
    #ffb84d 75%,
    #e85a3a 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.mmat-lens-gradient::after {
  /* The "above-threshold" portion of the gradient gets a translucent
     dim overlay that follows the slider position. Width set by JS via
     the --lens-dim CSS var on the parent card. */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  right: 0;
  width: var(--lens-dim, 0%);
  background: rgba(14, 24, 48, 0.62);
  backdrop-filter: blur(1px);
  border-radius: 0 4px 4px 0;
  transition: width 0.06s linear;
}
.mmat-lens-thumbline {
  /* Vertical thumb indicator overlaid on the gradient. Position set
     by JS via --lens-thumb-pct on the parent card. */
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: var(--lens-thumb-pct, 100%);
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 12px rgba(255, 255, 255, 0.55);
  transform: translateX(-1px);
  pointer-events: none;
  transition: left 0.06s linear;
}
.mmat-lens-thumbline::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #14213a;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.mmat-lens-input {
  /* Invisible-but-interactive range input layered on top of the viz.
     The thumb is visually replaced by the .mmat-lens-thumbline above;
     this one is transparent and just carries the input/a11y. */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.mmat-lens-input:focus-visible {
  outline: none;
}
.mmat-lens-input:focus-visible ~ .mmat-lens-thumbline::before {
  box-shadow: 0 0 0 3px rgba(94, 231, 213, 0.55), 0 2px 6px rgba(0, 0, 0, 0.45);
}
.mmat-lens-input::-webkit-slider-runnable-track {
  background: transparent;
  height: 34px;
}
.mmat-lens-input::-moz-range-track {
  background: transparent;
  height: 34px;
}
.mmat-lens-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 34px;
  background: transparent;
  cursor: ew-resize;
  border: 0;
}
.mmat-lens-input::-moz-range-thumb {
  width: 24px;
  height: 34px;
  background: transparent;
  cursor: ew-resize;
  border: 0;
}

/* Numeric ticks under the gradient — MMAT scale labels */
.mmat-lens-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(225, 232, 248, 0.55);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  padding: 0 1px;
}

/* Readout row: count + reset button */
.mmat-lens-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}
.mmat-lens-readout .count {
  font-size: 12px;
  color: rgba(232, 238, 255, 0.92);
  line-height: 1.35;
}
.mmat-lens-readout .count b {
  color: #5ee7d5;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.mmat-lens-reset {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #e7ecfa;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}
.mmat-lens-reset:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.40);
}
.mmat-lens-reset[hidden] { display: none; }

/* Hide-above sub-toggle */
.mmat-lens-options {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(225, 232, 248, 0.78);
}
.mmat-lens-options input[type="checkbox"] {
  accent-color: #5ee7d5;
  width: 14px;
  height: 14px;
  margin: 0;
}
.mmat-lens-options label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Educational footnote */
.mmat-lens-footnote {
  margin-top: 8px;
  font-size: 10.5px;
  color: rgba(225, 232, 248, 0.62);
  line-height: 1.45;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
}
.mmat-lens-footnote b { color: rgba(232, 238, 255, 0.86); }

/* Mobile: drop the lens out of the overlay and stack it below the map.
   Phones can't comfortably reach a 320px card overlaid on a map. */
@media (max-width: 720px) {
  .mmat-lens-card {
    position: static;
    width: auto;
    max-width: none;
    margin-top: 12px;
    box-shadow: none;
    backdrop-filter: none;
  }
}

/* --- Legacy color-only legend (kept available as a fallback class) --- */
.mmat-map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 5;
  background: rgba(14, 24, 48, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11px;
  color: #e7ecfa;
  max-width: 230px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}
.mmat-map-legend h3 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5ee7d5;
  font-weight: 700;
}
.mmat-legend-gradient {
  display: block;
  width: 100%;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg,
    #2a9df4 0%,    /* deep valley */
    #6cc1f0 25%,   /* valley */
    #b8c9d4 50%,   /* plain */
    #ffb84d 75%,   /* ridge */
    #e85a3a 100%   /* peak */
  );
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.mmat-legend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  color: rgba(225, 232, 248, 0.78);
  font-size: 10px;
}
.mmat-legend-explainer {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(225, 232, 248, 0.78);
}

/* --- Acuity-ring legend (bottom-right, only when rings on) --- */
.mmat-rings-legend {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 5;
  background: rgba(14, 24, 48, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 168, 150, 0.36);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 11px;
  color: #f3f7ff;
  max-width: 180px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}
.mmat-rings-legend h3 {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5ee7d5;
  font-weight: 700;
}
.mmat-rings-legend .ring-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(232, 238, 255, 0.92);
}
.mmat-rings-legend .ring-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #9fb0c0;
  background: transparent;
}
.mmat-rings-legend .ring-swatch.r250 { border-color: #9fb0c0; }
.mmat-rings-legend .ring-swatch.r500 { border-color: #9fb0c0; }
.mmat-rings-legend .ring-style-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 10.5px;
  color: rgba(232, 238, 255, 0.90);
}
.mmat-rings-legend .ring-style {
  display: inline-block;
  width: 24px;
  height: 0;
  border-top: 2.5px solid #9fb0c0;
  border-radius: 1px;
}
.mmat-rings-legend .ring-style.donor {
  border-top: 2px dashed #7c3aed;   /* purple = donor (D) rings */
}
.mmat-rings-legend .ring-style.center {
  border-top: 2.5px solid #16a34a;  /* green = transplant-center rings */
}
.mmat-rings-legend .ring-style-lbl {
  letter-spacing: 0.02em;
}
.mmat-rings-legend .ring-hint {
  margin-top: 6px;
  color: rgba(225, 232, 248, 0.65);
  font-size: 10px;
  line-height: 1.40;
}

/* --- Popup base (mapbox-gl loads AFTER this file, so an unclassed popup would
   otherwise fall back to Mapbox's white background with the page's light text =
   unreadable). Container-scoped (#mmat-topo-map) so it outranks Mapbox's later
   stylesheet and is always dark + readable, even before the donor/center
   modifier class lands. --- */
#mmat-topo-map .mapboxgl-popup-content {
  background: rgba(12, 22, 44, 0.96);
  color: #f3f7ff;
}
#mmat-topo-map .mapboxgl-popup-tip {
  border-top-color: rgba(12, 22, 44, 0.96);
  border-bottom-color: rgba(12, 22, 44, 0.96);
}
#mmat-topo-map .mapboxgl-popup-close-button {
  color: #b6e6dd;
}
/* Preserve the center popup's teal tip against the container-scoped base. */
#mmat-topo-map .mmat-center-popup .mapboxgl-popup-tip {
  border-top-color: rgba(94, 231, 213, 0.55);
  border-bottom-color: rgba(94, 231, 213, 0.55);
}

/* --- Donor popup (mapbox-gl style overrides) --- */
.mmat-donor-popup .mapboxgl-popup-content {
  background: rgba(12, 22, 44, 0.96);
  color: #f3f7ff;
  border: 1px solid rgba(0, 168, 150, 0.42);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  max-width: 280px;
}
.mmat-donor-popup .mapboxgl-popup-tip {
  border-top-color: rgba(0, 168, 150, 0.42);
  border-bottom-color: rgba(0, 168, 150, 0.42);
}
.mmat-donor-popup .mapboxgl-popup-close-button {
  color: #b6e6dd;
  font-size: 18px;
  padding: 2px 8px;
}
.mmat-donor-popup .mmat-popup-title {
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  font-size: 14px;
}
.mmat-donor-popup .mmat-popup-meta {
  color: rgba(225, 232, 248, 0.78);
  font-size: 12px;
  margin: 0 0 8px;
}
.mmat-donor-popup .mmat-popup-mmat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  color: #14181f;
  font-size: 13px;
  margin-bottom: 6px;
}
.mmat-donor-popup .mmat-popup-cta {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(225, 232, 248, 0.78);
}
.mmat-donor-popup .mmat-popup-cta b {
  color: #5ee7d5;
}

/* --- Center popup (mapbox-gl style overrides) ---
   Compact card shown when the user clicks a transplant-center marker.
   Same dark-card grammar as the donor popup but a few rows taller,
   wider container, and a 2-column key/value grid for the metrics. */
.mmat-center-popup .mapboxgl-popup-content {
  background: rgba(12, 22, 44, 0.97);
  color: #f3f7ff;
  border: 1px solid rgba(94, 231, 213, 0.55);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  max-width: 340px;
  min-width: 280px;
}
.mmat-center-popup .mapboxgl-popup-tip {
  border-top-color: rgba(94, 231, 213, 0.55);
  border-bottom-color: rgba(94, 231, 213, 0.55);
}
.mmat-center-popup .mapboxgl-popup-close-button {
  color: #b6e6dd;
  font-size: 18px;
  padding: 2px 8px;
}
.mmat-center-popup .mmat-center-title {
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 2px;
  font-size: 15px;
  line-height: 1.25;
}
.mmat-center-popup .mmat-center-loc {
  color: rgba(225, 232, 248, 0.80);
  font-size: 12px;
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}
.mmat-center-popup .mmat-center-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 800;
  color: #14181f;
  font-size: 12px;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.mmat-center-popup .mmat-center-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 14px;
  row-gap: 4px;
  font-size: 12.5px;
  margin: 4px 0 8px;
}
.mmat-center-popup .mmat-center-grid .lbl {
  color: rgba(225, 232, 248, 0.68);
}
.mmat-center-popup .mmat-center-grid .val {
  color: #f3f7ff;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}

.mmat-center-popup .mmat-center-catchment {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding-top: 8px;
  margin-top: 4px;
  font-size: 12px;
}
.mmat-center-popup .mmat-center-catchment .ctch-label {
  color: rgba(225, 232, 248, 0.68);
  letter-spacing: 0.02em;
  margin-bottom: 3px;
}
.mmat-center-popup .mmat-center-catchment .ctch-vals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-variant-numeric: tabular-nums;
}
.mmat-center-popup .mmat-center-catchment .r150 b { color: #a06bff; font-weight: 800; }
.mmat-center-popup .mmat-center-catchment .r250 b { color: #7c3aed; font-weight: 800; }
.mmat-center-popup .mmat-center-catchment .r500 b { color: #ee2b2b; font-weight: 800; }
.mmat-center-popup .mmat-center-catchment span {
  color: rgba(225, 232, 248, 0.86);
  font-size: 11.5px;
}

.mmat-center-popup .mmat-center-cta {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #5ee7d5;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding-top: 8px;
  letter-spacing: 0.01em;
}
.mmat-center-popup .mmat-center-cta:hover {
  color: #b6e6dd;
}

/* --- Transplant-center detail card frame ---
   Hosts the .nf-hospital-card (same DOM/CSS as the Compare Centers
   page) below the map. The card itself stays in its native white/light
   theme — this frame reads as a "data panel on the dark canvas." */
.mmat-center-card-frame {
  margin-top: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(94, 231, 213, 0.32);
  border-radius: 14px;
  scroll-margin-top: 16px;
}
.mmat-center-card-frame[hidden] {
  display: none;
}
/* Tighten the host container's default top margin — the frame's
   padding already provides the breathing room. */
.mmat-center-card-frame .nf-hospital-card-host {
  margin-top: 0;
}
/* "Personalize on Compare Centers" CTA inside the right panel,
   replacing the cohort-match feature which is form-driven on
   /your_options/ and not present on this page. */
.mmat-center-card .mmat-card-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
}
.mmat-center-card .mmat-card-cta p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--nf-muted, #5a6478);
}
.mmat-center-card .mmat-card-cta-btn {
  display: inline-block;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--nf-sky, #0085ff);
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.mmat-center-card .mmat-card-cta-btn:hover {
  filter: brightness(1.06);
}
.mmat-center-card .mmat-card-cta-note {
  font-size: 12px;
  color: var(--nf-muted, #5a6478);
  margin: 0;
}

/* Local-MMAT chip in the card header — same band-color chip we used
   in the popup, kept for at-a-glance "where does this center sit in
   the pressure field." */
.mmat-center-card .nf-hospital-card__mmat-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 800;
  color: #14181f;
  font-size: 12px;
  letter-spacing: 0.02em;
  margin-top: 6px;
}

/* --- Mapbox attribution sits above legend at bottom-left --- */
body.nf-acuity-page[data-page="mmat-topography"] .mapboxgl-ctrl-bottom-left {
  margin-bottom: 96px;
  margin-left: 12px;
}

/* --- Below-the-map per-state summary cards --- */
.mmat-state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.mmat-state-card {
  background: rgba(12, 18, 36, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(232, 238, 255, 0.92);
}
.mmat-state-card .state-code {
  font-weight: 800;
  color: #f3f7ff;
  font-size: 16px;
  letter-spacing: 0.02em;
}
.mmat-state-card .state-stat {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.mmat-state-card .state-stat .label {
  color: rgba(225, 232, 248, 0.65);
  font-size: 12px;
}
.mmat-state-card .terrain-mini {
  margin-top: 6px;
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.mmat-state-card .terrain-mini .seg.deep_valley { background: #2a9df4; }
.mmat-state-card .terrain-mini .seg.valley      { background: #6cc1f0; }
.mmat-state-card .terrain-mini .seg.plain       { background: #b8c9d4; }
.mmat-state-card .terrain-mini .seg.ridge       { background: #ffb84d; }
.mmat-state-card .terrain-mini .seg.peak        { background: #e85a3a; }
