.n-realtime-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(34, 197, 94, 0.08);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.n-realtime-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.theme-light .n-realtime-pill {
  background: #ecfdf5;
  color: #166534;
  border-color: rgba(22, 163, 74, 0.25);
}

.theme-light .n-realtime-pill::before { background: #22c55e; }

.n-delayed-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(234, 179, 8, 0.06);
  color: #fcd34d;
  border: 1px solid rgba(234, 179, 8, 0.2);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.theme-light .n-delayed-pill {
  background: #fffbeb;
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.22);
}

/* ── HERO CARD ─────────────────────────────────────────────── */
.n-hero-card {
  display: flex;
  flex-direction: column;
  background: var(--n-surface-raised);
  border: 1px solid var(--n-border-subtle);
  border-radius: var(--n-radius-xl);
  overflow: hidden;
  position: relative;
  transition: border-color 0.45s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Subtle wash — no outer glow */
.n-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  transition: background 0.5s ease;
}

.n-hero-card.n-hero-green  { border-color: rgba(34, 197, 94, 0.28); }
.n-hero-card.n-hero-green::before  { background: #22c55e; }
.n-hero-card.n-hero-yellow { border-color: rgba(234, 179, 8, 0.28); }
.n-hero-card.n-hero-yellow::before { background: #eab308; }
.n-hero-card.n-hero-orange { border-color: rgba(249, 115, 22, 0.3); }
.n-hero-card.n-hero-orange::before { background: #f97316; }
.n-hero-card.n-hero-red    { border-color: rgba(239, 68, 68, 0.32); }
.n-hero-card.n-hero-red::before    { background: #ef4444; }

.theme-light .n-hero-card {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 24px 48px rgba(15, 23, 42, 0.06);
}

/* ── KPI hero — overall status + groups in one row (wide screens) ─ */
.n-hero-kpi-stack {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem 1.5rem;
  padding: 1.25rem 1.5rem 1rem;
}

.n-hero-status-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.5rem;
  flex: 0 1 auto;
  min-width: 10rem;
  max-width: 16rem;
}

.n-hero-status-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted, #64748b);
}

.n-hero-status-card {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--n-radius-lg);
  border: 1px solid var(--n-border-subtle);
  background: var(--n-well, rgba(255, 255, 255, 0.04));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.theme-light .n-hero-status-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

.n-hero-card.n-hero-green  .n-hero-status-card {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
}
.n-hero-card.n-hero-yellow .n-hero-status-card {
  border-color: rgba(234, 179, 8, 0.4);
  background: rgba(234, 179, 8, 0.1);
}
.n-hero-card.n-hero-orange .n-hero-status-card {
  border-color: rgba(249, 115, 22, 0.42);
  background: rgba(249, 115, 22, 0.1);
}
.n-hero-card.n-hero-red    .n-hero-status-card {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.1);
}

.theme-light .n-hero-card.n-hero-green  .n-hero-status-card { background: #ecfdf5; border-color: rgba(34, 197, 94, 0.35); }
.theme-light .n-hero-card.n-hero-yellow .n-hero-status-card { background: #fffbeb; border-color: rgba(234, 179, 8, 0.4); }
.theme-light .n-hero-card.n-hero-orange .n-hero-status-card { background: #fff7ed; border-color: rgba(249, 115, 22, 0.4); }
.theme-light .n-hero-card.n-hero-red    .n-hero-status-card { background: #fef2f2; border-color: rgba(239, 68, 68, 0.4); }

.n-hero-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #64748b;
  transition: background 0.5s, box-shadow 0.5s;
}

.n-hero-card.n-hero-green  .n-hero-status-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }
.n-hero-card.n-hero-yellow .n-hero-status-dot { background: #eab308; box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.25); }
.n-hero-card.n-hero-orange .n-hero-status-dot { background: #f97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25); }
.n-hero-card.n-hero-red    .n-hero-status-dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25); }

.n-hero-status-value {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary, #f8fafc);
  transition: color 0.3s;
}

.theme-light .n-hero-status-value { color: #0f172a; }

.n-updated-text {
  font-size: 0.7rem;
  color: var(--text-muted, #475569);
  white-space: nowrap;
}

/* ── KPI groups (air / heat) ────────────────────────────────── */
.n-kpi-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.5rem;
  flex: 1 1 12rem;
  min-width: 11rem;
  max-width: 22rem;
}

.n-kpi-group-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted, #64748b);
  cursor: default;
}

.n-kpi-dominant-pair {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.65rem 0.85rem;
  width: 100%;
}

.n-kpi-metric-block {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.65rem 0.75rem 0.75rem;
  border-radius: var(--n-radius-md);
  border: 1px solid var(--n-border-subtle);
  background: var(--n-well, rgba(255, 255, 255, 0.03));
  transition: border-color 0.3s, background 0.3s;
}

.theme-light .n-kpi-metric-block {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.07);
}

.n-kpi-metric-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #64748b);
}

.n-kpi-metric-value {
  font-size: clamp(1.85rem, 5.5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary, #f8fafc);
  transition: color 0.3s;
}

.theme-light .n-kpi-metric-value { color: #0f172a; }

.n-kpi-metric-unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
}

.n-kpi-pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
}

.n-kpi-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.2;
  max-width: 100%;
  text-align: center;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.n-kpi-desc {
  margin: 0;
  max-width: 100%;
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.45;
}

.theme-light .n-kpi-desc { color: #475569; }

.n-kpi-secondary {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.15rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--n-radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--n-border-subtle);
  font-size: 0.8rem;
}

.theme-light .n-kpi-secondary {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.06);
}

.n-kpi-secondary-label {
  font-weight: 600;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  margin-right: 0.15rem;
}

.n-kpi-secondary-value {
  font-weight: 700;
  color: var(--text-primary, #e2e8f0);
}

.theme-light .n-kpi-secondary-value { color: #1e293b; }

.n-kpi-secondary-unit {
  font-size: 0.7rem;
  color: var(--text-muted, #64748b);
}

/* ── Recommendation block ───────────────────────────────────── */
.n-hero-recommendation {
  margin: 0;
  padding: 0.85rem 1.5rem 1.15rem;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--n-border-subtle);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.n-hero-card.n-hero-green  .n-hero-recommendation {
  background: rgba(34, 197, 94, 0.09);
  border-color: rgba(34, 197, 94, 0.22);
}
.n-hero-card.n-hero-yellow .n-hero-recommendation {
  background: rgba(234, 179, 8, 0.09);
  border-color: rgba(234, 179, 8, 0.25);
}
.n-hero-card.n-hero-orange .n-hero-recommendation {
  background: rgba(249, 115, 22, 0.09);
  border-color: rgba(249, 115, 22, 0.28);
}
.n-hero-card.n-hero-red    .n-hero-recommendation {
  background: rgba(239, 68, 68, 0.09);
  border-color: rgba(239, 68, 68, 0.28);
}

.theme-light .n-hero-card.n-hero-green  .n-hero-recommendation { background: #ecfdf5; border-color: rgba(34, 197, 94, 0.25); }
.theme-light .n-hero-card.n-hero-yellow .n-hero-recommendation { background: #fffbeb; border-color: rgba(234, 179, 8, 0.28); }
.theme-light .n-hero-card.n-hero-orange .n-hero-recommendation { background: #fff7ed; border-color: rgba(249, 115, 22, 0.28); }
.theme-light .n-hero-card.n-hero-red    .n-hero-recommendation { background: #fef2f2; border-color: rgba(239, 68, 68, 0.28); }

/* Waiting / no CEI tint yet */
.n-hero-card:not(.n-hero-green):not(.n-hero-yellow):not(.n-hero-orange):not(.n-hero-red) .n-hero-recommendation {
  background: var(--n-well, rgba(255, 255, 255, 0.04));
}

.theme-light .n-hero-card:not(.n-hero-green):not(.n-hero-yellow):not(.n-hero-orange):not(.n-hero-red) .n-hero-recommendation {
  background: #f8fafc;
}

.n-hero-rec-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted, #64748b);
}

.n-hero-summary {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary, #e2e8f0);
  line-height: 1.55;
}

.theme-light .n-hero-summary { color: #334155; }

/* ── HERO PROGRESSIVE DISCLOSURE ─────────────────────────────
   "Show heat & weather context" toggle. Keeps the Hero focused on
   the primary Air Quality story while letting power users expand
   temperature/WBGT/wind details without cluttering the fold. */
.n-hero-expand-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: transparent;
  border: 1px dashed var(--n-border-subtle, rgba(255, 255, 255, 0.14));
  border-radius: 10px;
  color: var(--n-text-muted, rgba(255, 255, 255, 0.7));
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.n-hero-expand-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--n-accent-primary, rgba(79, 195, 247, 0.5));
  color: var(--n-text-strong, #fff);
}

.n-hero-expand-btn:focus-visible {
  outline: 2px solid var(--n-accent-primary, #4fc3f7);
  outline-offset: 2px;
}

.n-hero-expand-icon {
  display: inline-block;
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.n-hero-expand-btn[aria-expanded="true"] .n-hero-expand-icon {
  transform: rotate(180deg);
}

.n-hero-expand-btn[aria-expanded="true"] .n-hero-expand-text::before {
  content: "Hide ";
}
.n-hero-expand-btn[aria-expanded="true"] .n-hero-expand-text {
  /* Replace "Show heat & weather context" wording when expanded */
  font-size: 0;
}
.n-hero-expand-btn[aria-expanded="true"] .n-hero-expand-text::before {
  font-size: 0.82rem;
}
.n-hero-expand-btn[aria-expanded="true"] .n-hero-expand-text::after {
  content: "heat & weather context";
  font-size: 0.82rem;
}

.n-hero-expand-chip {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--n-text-muted, rgba(255, 255, 255, 0.75));
  white-space: nowrap;
}

.n-hero-expand-chip:empty { display: none; }

.n-hero-expand-btn[aria-expanded="true"] .n-hero-expand-chip { display: none; }

/* Expandable container — uses grid-template-rows 1fr → 0fr trick
   for smooth auto-height transition. */
.n-hero-expandable {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.28s ease, opacity 0.2s ease, margin 0.28s ease;
  opacity: 1;
  margin-top: 0;
}

.n-hero-expandable--collapsed {
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

.n-hero-expandable-inner {
  overflow: hidden;
  min-height: 0;
}

/* Prevent the collapsed block from grabbing focus / tab order */
.n-hero-expandable--collapsed .n-hero-expandable-inner {
  visibility: hidden;
}

/* Light theme */
.theme-light .n-hero-expand-btn {
  border-color: rgba(15, 23, 42, 0.15);
  color: rgba(15, 23, 42, 0.65);
}
.theme-light .n-hero-expand-btn:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(14, 116, 144, 0.5);
  color: #0f172a;
}
.theme-light .n-hero-expand-chip {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.7);
}

/* ── INSIGHT BAR ────────────────────────────────────────────── */
