/* ── Map page ─────────────────────────────────────── */
.map-pg { padding: 72px 0; }
.map-srch { display: flex; gap: 10px; max-width: 600px; margin-bottom: 20px; }
.map-srch input { flex: 1; }
#map-el { height: 520px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

/* ── Map panel ────────────────────────────────────── */
.map-pnl { margin-top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: none; }
.map-pnl.show { display: block; }
.map-pnl-l { font-family: var(--font-mono); font-size: 0.67rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 16px; }
.map-sts { display: block; }

/* ── Sun hours grid ───────────────────────────────── */
.sun-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sun-cell { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; }
.sun-cell.is-current { background: rgba(245,166,35,0.07); border-color: var(--amber); }
.sun-cell.is-annual {
  grid-column: 1 / -1;
  background: rgba(20,160,106,0.07);
  border-color: var(--green);
  display: flex;
  align-items: center;
  gap: 32px;
}
.ann-col { display: flex; flex-direction: column; }
.ann-col + .ann-col { border-left: 1px solid rgba(20,160,106,0.25); padding-left: 32px; }

/* ── Sun cell typography ──────────────────────────── */
.sc-mon { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 4px; }
.sun-cell.is-current .sc-mon { color: var(--amber); }
.sun-cell.is-annual .sc-mon { color: var(--green); }
.sc-val { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 2px; }
.sc-irr { font-size: 0.68rem; color: var(--text-muted); margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-unit { font-size: 0.6rem; }
.ann-irr { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ── NASA link ────────────────────────────────────── */
.nasa-lnk { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.nasa-lnk:hover { color: var(--blue); text-decoration-style: solid; }
.sun-lgd { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0.04em; margin-bottom: 12px; }

/* ── Map body layout ──────────────────────────────── */
.map-body { display: flex; gap: 20px; align-items: stretch; }
.map-body #map-el { flex: 1; min-width: 0; height: auto; min-height: 400px; }
.map-body .map-pnl { width: 400px; flex-shrink: 0; display: block; margin-top: 0; max-height: 600px; overflow-y: auto; }
.map-body .sun-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.map-body .sun-cell { padding: 10px 12px; }
.map-hint { color: var(--text-muted); font-size: 0.85rem; line-height: 1.65; padding: 8px 0; }

/* ── Usage guide ──────────────────────────────────── */
.map-guide {
  margin-top: 20px;
  background: var(--blue-tint);
  border: 1px solid rgba(1,131,195,0.18);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  font-size: 0.84rem;
  color: var(--text-dark);
  line-height: 1.7;
}
.map-guide strong { color: var(--ink); }
.map-guide code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: rgba(1,131,195,0.1);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--blue-dark);
  white-space: normal;
  overflow-wrap: break-word;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 920px) {
  .map-body { flex-direction: column; }
  .map-body #map-el { height: 400px; }
  .map-body .map-pnl { width: 100%; max-height: none; display: none; margin-top: 20px; }
  .map-body .map-pnl.show { display: block; }
  .map-body .sun-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .map-body .sun-cell { padding: 14px 16px; }
}

@media (max-width: 480px) {
  .map-srch { flex-direction: column; }
  .map-body #map-el { height: 320px; }
  .map-body .map-pnl { padding: 16px; }
  .map-body .sun-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .map-body .sun-cell { padding: 10px 8px; }
}
