/* ── Society (year-sliding) maps — shared by population & life expectancy ────── */

/* Left-panel list (tiers or search results) */
.hm-list { padding: 6px 8px 12px; }
.hm-empty { padding: 20px 16px; font-size: 13px; color: var(--ink-faint); text-align: center; }

.hm-row, .hm-tier {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
  color: var(--ink);
  font-family: inherit;
}
.hm-row:hover, .hm-tier:hover { background: var(--bg-warm); }
.hm-tier--active { background: color-mix(in srgb, var(--accent) 8%, var(--paper)); }

.hm-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.hm-row-name, .hm-tier-label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hm-row-val, .hm-tier-count { font-size: 12px; color: var(--ink-faint); flex-shrink: 0; }

/* Map overlays */
.hm-map-title { position: absolute; top: 20px; left: 20px; z-index: 10; pointer-events: none; }
.hm-map-title-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-faint); display: block; margin-bottom: 3px;
}
.hm-map-title-text {
  font-size: clamp(18px, 2vw, 26px); font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink); display: block;
}

.hm-reset-btn {
  position: absolute; top: 20px; right: 14px; z-index: 10;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 8px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; font-family: inherit; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.hm-reset-btn.visible { opacity: 1; pointer-events: auto; }
.hm-reset-btn:hover { background: var(--bg-warm); }

.hm-tooltip {
  position: absolute; bottom: 96px; left: 20px; z-index: 11;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 10px;
  padding: 10px 14px; pointer-events: none; opacity: 0; transition: opacity 0.15s;
  max-width: 260px; box-shadow: 0 4px 16px rgba(26, 58, 92, 0.10);
}
.hm-tooltip.visible { opacity: 1; }
.hm-tip--float { bottom: auto; left: auto; right: auto; will-change: left, top; }
.hm-tip-name { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.hm-tip-val { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-soft); }
.hm-tip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.hm-fade-top {
  position: absolute; top: 0; left: 0; right: 0; height: 80px;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
  pointer-events: none; z-index: 3;
}
.hm-fade-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
  pointer-events: none; z-index: 2;
}

/* Chevrons */
.hm-chevron { transition: transform 0.3s ease; }
[data-panel="left"][data-panel-open="false"] .hm-chevron { transform: rotate(180deg); }
.hm-info-chevron { transition: transform 0.3s ease; }
[data-panel="right"][data-panel-open="false"] .hm-info-chevron { transform: rotate(180deg); }

/* Right panel */
.hm-placeholder {
  display: flex; align-items: center; justify-content: center; height: 100%;
  padding: 24px; font-size: 13px; color: var(--ink-faint); text-align: center;
}
.hm-info { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.hm-info-head { padding: 20px 18px 16px; border-bottom: 1px solid var(--rule); text-align: center; flex-shrink: 0; }
.hm-info-range {
  font-family: 'IBM Plex Mono', monospace; font-size: 22px; font-weight: 900;
  letter-spacing: -0.03em; display: block; line-height: 1.05; margin-bottom: 6px;
}
.hm-info-desc { font-size: 12.5px; color: var(--ink-faint); }
.hm-info-stats { display: flex; border-bottom: 1px solid var(--rule); flex-shrink: 0; }
.hm-info-stat { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 12px 6px; }
.hm-info-stat + .hm-info-stat { border-left: 1px solid var(--rule); }
.hm-info-stat-val { font-family: 'IBM Plex Mono', monospace; font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.hm-info-stat-lbl {
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em; color: var(--ink-faint);
  text-transform: uppercase; margin-top: 3px;
}
.hm-info-section {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-faint); padding: 14px 16px 6px;
}
.hm-info-list { overflow-y: auto; flex: 1; min-height: 0; padding-bottom: 20px; }
.hm-info-row { display: flex; align-items: center; gap: 10px; padding: 8px 16px; transition: background 0.1s; }
.hm-info-row:hover { background: var(--bg-warm); }
.hm-info-name {
  flex: 1; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hm-info-val { font-size: 12px; color: var(--ink-faint); flex-shrink: 0; }
