/* Hazard Explorer v2 - comparison layout. The shared look (header, sidebar,
   filters, type, buttons) comes from styles_vulnerability_v2.css via .atlas-v2;
   this file only adds the side-by-side maps and charts. Every rule is scoped
   under .atlas-v2.hz2 so it cannot reach any other page. */

.atlas-v2.hz2 .hz2-body { grid-template-columns: minmax(0, 1fr) 360px; }
.atlas-v2.hz2 .hz2-main-col { display: grid; gap: 22px; min-width: 0; }

/* Two maps, one line between them */
.atlas-v2.hz2 .hz2-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 0 24px;
  align-items: start;
}
.atlas-v2.hz2 .hz2-divider { align-self: stretch; background: var(--ink); opacity: 0.55; }
.atlas-v2.hz2 .hz2-panel { display: grid; gap: 10px; min-width: 0; }
.atlas-v2.hz2 .hz2-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 8px;
}
.atlas-v2.hz2 .hz2-panel-title { margin: 0; }
.atlas-v2.hz2 .hz2-period { width: 150px; flex: none; }
.atlas-v2.hz2 .hz2-map { height: clamp(320px, 52vh, 580px); }
.atlas-v2.hz2 .hz2-map-caption { margin: 0; font-size: 14px; color: var(--ink-2); }

/* One shared legend under both maps */
.atlas-v2.hz2 .hz2-legend { max-width: 560px; }
.atlas-v2.hz2 .hz2-legend-bar { height: 14px; border: 1px solid rgba(20, 32, 26, .38); }
.atlas-v2.hz2 .hz2-legend-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin-top: 4px;
}

/* Timeline (wide) + distribution */
.atlas-v2.hz2 .hz2-charts {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 28px;
  border-top: 1px solid var(--hair);
  padding-top: 20px;
}
.atlas-v2.hz2 .hz2-chart { min-width: 0; }
.atlas-v2.hz2 .hz2-chart .v2-h3 { margin-bottom: 4px; }

/* Side column: the comparison in numbers */
.atlas-v2.hz2 .hz2-story { align-self: start; }
.atlas-v2.hz2 .hz2-stat-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}
.atlas-v2.hz2 .hz2-stat { display: grid; gap: 2px; padding: 10px 12px; background: var(--stock-2); border-left: 3px solid var(--hair); }
.atlas-v2.hz2 .hz2-stat:last-child { border-left-color: var(--agra); }
.atlas-v2.hz2 .hz2-stat-key { font-size: 13px; font-weight: 600; }
.atlas-v2.hz2 .hz2-stat-sub { font-size: 12px; color: var(--ink-3); }
.atlas-v2.hz2 .hz2-stat-val { font-size: 22px; font-weight: 700; line-height: 1.2; margin-top: 4px; }
.atlas-v2.hz2 .hz2-stat-arrow { font-size: 22px; color: var(--ink-3); padding-bottom: 12px; }
.atlas-v2.hz2 .hz2-key {
  display: inline-block;
  width: 14px;
  height: 4px;
  margin-top: 11px;
}

@media (max-width: 1300px) {
  .atlas-v2.hz2 .hz2-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .atlas-v2.hz2 .hz2-compare { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .atlas-v2.hz2 .hz2-divider { height: 1px; }
  .atlas-v2.hz2 .hz2-charts { grid-template-columns: minmax(0, 1fr); }
}
