/* Cortex Map · Tornado ARCHIVE timeline (fase 3) */
#ih-panel-macro-map .ih-mm-torn-arch {
  position: absolute;
  left: 14px;
  bottom: calc(var(--mm-region-foot-h, 60px) + 14px);
  z-index: 28;
  min-width: 220px;
  max-width: min(320px, 42vw);
  padding: 10px 12px;
  background: rgba(10, 14, 20, 0.92);
  border: 1px solid rgba(232, 180, 74, 0.35);
  color: #ebe5d8;
  font: 18px/1.3 "IBM Plex Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
  pointer-events: auto;
}

#ih-panel-macro-map .ih-mm-torn-arch[hidden] {
  display: none !important;
}

#ih-panel-macro-map .ih-mm-torn-arch__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#ih-panel-macro-map .ih-mm-torn-arch__row--slide {
  margin-top: 8px;
}

#ih-panel-macro-map .ih-mm-torn-arch__tog {
  appearance: none;
  border: 1px solid rgba(232, 180, 74, 0.45);
  background: transparent;
  color: #a89058;
  font: 700 16px/1 "IBM Plex Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  cursor: pointer;
}

#ih-panel-macro-map .ih-mm-torn-arch__tog.is-on {
  background: rgba(232, 180, 74, 0.18);
  color: #ebe5d8;
  border-color: rgba(232, 180, 74, 0.75);
}

#ih-panel-macro-map .ih-mm-torn-arch__yr {
  font-size: 22px;
  font-weight: 700;
  color: #E8B44A;
  min-width: 2.6em;
}

#ih-panel-macro-map .ih-mm-torn-arch__n {
  margin-left: auto;
  color: #8a949e;
  font-size: 16px;
}

#ih-panel-macro-map .ih-mm-torn-arch__range {
  width: 100%;
  height: 22px;
  accent-color: #E8B44A;
  cursor: pointer;
}

#ih-panel-macro-map .ih-mm-torn-arch__range:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

#ih-panel-macro-map .ih-mm-torn-arch__efs {
  margin-top: 8px;
  gap: 4px;
}

#ih-panel-macro-map .ih-mm-torn-arch__ef {
  appearance: none;
  border: 1px solid rgba(138, 148, 158, 0.35);
  background: transparent;
  color: #6a7682;
  font: 700 16px/1 "IBM Plex Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  cursor: pointer;
  min-width: 3.2em;
}

#ih-panel-macro-map .ih-mm-torn-arch__ef.is-on {
  border-color: rgba(232, 180, 74, 0.7);
  color: #ebe5d8;
  background: rgba(232, 180, 74, 0.16);
}

#ih-panel-macro-map .ih-mm-torn-arch__ef[data-torn-ef="3"].is-on,
#ih-panel-macro-map .ih-mm-torn-arch__ef[data-torn-ef="4"].is-on,
#ih-panel-macro-map .ih-mm-torn-arch__ef[data-torn-ef="5"].is-on {
  border-color: rgba(123, 232, 255, 0.65);
  background: rgba(123, 232, 255, 0.12);
  color: #d8f4ff;
}

#ih-panel-macro-map .ih-mm-torn-arch__ef:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

#ih-panel-macro-map .ih-mm-torn-arch__src {
  margin-top: 7px;
  color: #6a7682;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Fase 6 · histograma por ano (década no dock) */
#ih-panel-macro-map .ih-mm-torn-arch {
  max-width: none;
}

#ih-panel-macro-map .ih-mm-torn-arch__hist {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(138, 148, 158, 0.2);
}

#ih-panel-macro-map .ih-mm-torn-arch__hist[hidden] {
  display: none !important;
}

#ih-panel-macro-map .ih-mm-torn-arch__hist-hd {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a7682;
}

#ih-panel-macro-map .ih-mm-torn-arch__hist-hd span:last-child {
  color: #a89058;
  font-weight: 600;
}

#ih-panel-macro-map .ih-mm-torn-arch__hist-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-evenly;
  gap: 0;
  height: 104px;
}

#ih-panel-macro-map .ih-mm-torn-arch__bar {
  appearance: none;
  flex: 1 1 0;
  max-width: 36px;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}

#ih-panel-macro-map .ih-mm-torn-arch__bar-fill {
  width: 12px;
  min-height: 2px;
  background: rgba(232, 180, 74, 0.45);
  border: 1px solid rgba(232, 180, 74, 0.35);
  box-sizing: border-box;
}

#ih-panel-macro-map .ih-mm-torn-arch__bar.is-cur .ih-mm-torn-arch__bar-fill {
  background: rgba(232, 180, 74, 0.9);
  border-color: rgba(232, 180, 74, 0.95);
}

#ih-panel-macro-map .ih-mm-torn-arch__bar:hover .ih-mm-torn-arch__bar-fill {
  background: rgba(123, 232, 255, 0.55);
  border-color: rgba(123, 232, 255, 0.7);
}

#ih-panel-macro-map .ih-mm-torn-arch__bar-y {
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #6a7682;
}

#ih-panel-macro-map .ih-mm-torn-arch__bar.is-cur .ih-mm-torn-arch__bar-y {
  color: #E8B44A;
  font-weight: 700;
}

#ih-panel-macro-map[data-mm-mode="tornadoes"] .ih-mm-torn-arch:not([hidden]) {
  align-items: center;
  bottom: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  font-size: 18px;
  gap: 18px;
  left: 0;
  max-width: none;
  min-width: 0;
  padding: 22px 18px 22px 78px;
  right: 0;
  width: auto;
  overflow-x: auto;
  z-index: 36;
}

#ih-panel-macro-map[data-mm-mode="tornadoes"]:has(#ih-mm-region-foot:not([hidden])) .ih-mm-torn-arch:not([hidden]) {
  bottom: var(--mm-region-foot-h, 60px);
}

#ih-panel-macro-map[data-mm-mode="tornadoes"] .ih-mm-torn-arch__row {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

#ih-panel-macro-map[data-mm-mode="tornadoes"] .ih-mm-torn-arch__row--slide {
  flex: 1 1 160px;
  margin-top: 0;
  min-width: 120px;
}

#ih-panel-macro-map[data-mm-mode="tornadoes"] .ih-mm-torn-arch__efs {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  margin-top: 0;
}

#ih-panel-macro-map[data-mm-mode="tornadoes"] .ih-mm-torn-arch__hist {
  border-top: 0;
  flex: 1 1 280px;
  margin-top: 0;
  min-width: 200px;
  padding-top: 0;
}

#ih-panel-macro-map[data-mm-mode="tornadoes"] .ih-mm-torn-arch__src {
  flex: 0 0 auto;
  margin-top: 0;
  white-space: nowrap;
}

/* Fase 5 · dossier curto no clique (reusa popup MapLibre) */
.ih-mm-eq-popup--storm .maplibregl-popup-content {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.ih-mm-storm-dos {
  position: relative;
  min-width: 220px;
  max-width: 320px;
  padding: 10px 12px 10px;
  background: rgba(10, 14, 20, 0.94);
  border: 1px solid rgba(232, 180, 74, 0.4);
  color: #ebe5d8;
  font: 11px/1.35 "IBM Plex Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.03em;
}

.ih-mm-storm-dos__x {
  position: absolute;
  top: 4px;
  right: 6px;
  appearance: none;
  border: 0;
  background: transparent;
  color: #8a94a0;
  font: 700 16px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
  padding: 2px 4px;
}

.ih-mm-storm-dos__title {
  font: 700 12px/1.2 "IBM Plex Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ebe5d8;
  padding-right: 18px;
  margin-bottom: 8px;
}

.ih-mm-storm-dos__title span {
  color: #E8B44A;
  font-weight: 700;
}

.ih-mm-storm-dos__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}

.ih-mm-storm-dos__grid i {
  display: block;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #6a7682;
  text-transform: uppercase;
}

.ih-mm-storm-dos__grid b {
  display: block;
  font-weight: 600;
  color: #ebe5d8;
  margin-top: 1px;
}

.ih-mm-storm-dos__meta {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a94a0;
}
