/* Home Energy — extensions on LifeLoveMe llm-applet styles */
.he-view-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.he-view-btn {
  font-size: 0.9rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--llm-border);
  background: var(--llm-card);
  border-radius: 999px;
  cursor: pointer;
  color: var(--llm-text);
}

.he-view-btn[aria-current="true"] {
  background: var(--llm-navy);
  color: #fff;
  border-color: var(--llm-navy);
}

.he-panel { display: none; }
.he-panel[aria-hidden="false"] { display: block; }

.he-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.he-stat {
  background: var(--llm-bg);
  border: 1px solid var(--llm-border);
  border-radius: 0.5rem;
  padding: 0.65rem;
  text-align: center;
}

.he-stat__val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--llm-navy);
}

.he-stat__lbl {
  font-size: 0.78rem;
  color: var(--llm-muted);
}

.he-period-banner {
  grid-column: 1 / -1;
  font-size: 0.88rem;
  color: var(--llm-muted);
  margin: 0 0 0.25rem;
  padding: 0.35rem 0.65rem;
  background: var(--llm-bg);
  border: 1px dashed var(--llm-border);
  border-radius: 0.4rem;
  text-align: left;
}

.he-period-banner--bill {
  border-color: var(--llm-navy);
  background: #eef2f8;
  color: var(--llm-navy);
  font-weight: 600;
}

.he-period-banner--analysis {
  border-color: #6b8cae;
  background: #f4f7fb;
  color: var(--llm-text);
}

.he-stat--bill {
  border-color: rgba(30, 58, 95, 0.2);
}

.he-rec {
  border-left: 3px solid var(--llm-accent);
  padding: 0.65rem 0.85rem;
  margin: 0.65rem 0;
  background: var(--llm-bg);
  border-radius: 0 0.4rem 0.4rem 0;
}

.he-rec--high { border-left-color: var(--llm-warn); }
.he-rec h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.he-rec p { margin: 0; font-size: 0.95rem; color: var(--llm-muted); }

.he-status {
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.4rem;
  margin-top: 0.75rem;
}
.he-status--ok { background: #e8f5ee; color: var(--llm-success); }
.he-status--err { background: #fdecea; color: #9b2335; }
.he-hidden { display: none !important; }

.he-table-wrap { overflow-x: auto; margin-top: 0.5rem; }
.he-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.he-table th, .he-table td {
  border-bottom: 1px solid var(--llm-border);
  padding: 0.45rem 0.5rem;
  text-align: left;
}
.he-table th { background: #eef3f7; color: var(--llm-navy); }

.he-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 640px) { .he-grid-2 { grid-template-columns: 1fr; } }

.he-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--llm-muted);
}
.he-field input, .he-field select, .he-field textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--llm-border);
  border-radius: 0.4rem;
}

.he-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

.he-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0;
}

.he-compare-delta.pos { color: var(--llm-success); }
.he-compare-delta.neg { color: #9b2335; }

.he-synthetic-label {
  font-size: 0.85rem;
  color: var(--llm-warn, #9b6b00);
  font-weight: 600;
  margin: 0.5rem 0;
}

.he-top-op {
  border: 1px solid var(--llm-border);
  border-radius: 0.5rem;
  padding: 0.85rem;
  margin: 0.65rem 0;
  background: var(--llm-bg);
}
.he-top-op h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.he-top-op p { margin: 0.35rem 0; font-size: 0.95rem; color: var(--llm-muted); }
.he-top-op__impact { font-weight: 600; color: var(--llm-navy); }

.he-action-row {
  border-bottom: 1px solid var(--llm-border);
  padding: 0.65rem 0;
}
.he-action-row:last-child { border-bottom: none; }
.he-action-row__meta { font-size: 0.85rem; color: var(--llm-muted); }

.he-action-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.he-action-badge--shift { background: #e8f0fa; color: #1a4d80; }
.he-action-badge--waste { background: #fdecea; color: #9b2335; }
.he-action-badge--reduce { background: #e8f5ee; color: #1e6b45; }

.he-dollar-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--llm-muted);
  margin-left: 0.25rem;
}
.he-dollar-label--exact { color: #1e6b45; }

.he-explain-panel {
  border: 1px solid var(--llm-border);
  border-radius: 0.5rem;
  padding: 0.85rem;
  background: var(--llm-card);
}
.he-explain-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.he-explain-answer { color: var(--llm-text); margin: 0 0 0.5rem; line-height: 1.5; }
.he-explain-disclaimer { font-size: 0.85rem; margin: 0; }

.he-subsection { margin-top: 1rem; font-size: 0.95rem; font-weight: 600; }
.he-bill-first { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--llm-border, #ddd); }
.he-info-box { margin-top: 0.75rem; padding: 0.75rem; background: var(--llm-surface-alt, #f8f8f8); border-radius: 6px; font-size: 0.92rem; }
.he-profile-details { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--llm-border, #e0e0e0); }
.he-profile-details.he-hidden { display: none; }
.he-explain-inline { margin-top: 0.75rem; padding: 0.75rem; background: var(--llm-surface-alt, #f8f8f8); border-radius: 6px; }
.he-progressive-q { margin-top: 0.5rem; padding: 0.65rem; border-left: 3px solid var(--llm-accent, #2a6); background: var(--llm-surface-alt, #f8f8f8); }
.he-dash-section { margin-top: 1.5rem; font-size: 1rem; }
.he-ladder { margin: 0.5rem 0; padding-left: 1.25rem; font-size: 0.9rem; color: var(--llm-muted); }
.he-ladder-note { font-size: 0.9rem; margin: 0.35rem 0; }
.he-explore-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }

.he-home-summary { display: grid; gap: 1.25rem; margin-top: 1rem; }
.he-home-block {
  border: 1px solid var(--llm-border);
  border-radius: 0.5rem;
  padding: 1rem;
  background: var(--llm-bg);
}
.he-home-block__title { margin: 0 0 0.65rem; font-size: 1.05rem; }
.he-home-lead { margin: 0 0 0.35rem; font-weight: 600; }
.he-home-copy { font-size: 0.92rem; margin: 0.35rem 0; }
.he-home-list { margin: 0.5rem 0 0.75rem; padding-left: 1.15rem; font-size: 0.92rem; }
.he-home-list li { margin: 0.35rem 0; }
.he-home-actions { margin-top: 0.5rem; }
.he-top-op--compact { margin: 0.5rem 0; padding: 0.65rem; }
.he-rate-teaser { margin-bottom: 1rem; }
.he-home-switch-note { font-size: 0.9rem; color: var(--llm-success, #1a6b3a); margin: 0.35rem 0; }
.he-explore-route-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.he-explore-route {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border: 1px solid var(--llm-border);
  border-radius: 0.45rem;
  padding: 0.65rem 0.75rem;
  background: var(--llm-card, #fff);
  cursor: pointer;
  font: inherit;
}
.he-explore-route__label { font-weight: 600; font-size: 0.92rem; }
.he-explore-route__desc { font-size: 0.82rem; color: var(--llm-muted); margin-top: 0.25rem; }
.he-stats--compact { margin: 0.65rem 0; }
.he-controllable-list { margin-top: 0.75rem; }
.he-load-row--material { font-weight: 500; }
.he-load-row__value { white-space: nowrap; margin-left: 0.75rem; }
.he-plan-block { margin: 0.75rem 0; }
.he-plan-block h4 { margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--llm-navy); }
.he-plan-item {
  border-left: 3px solid var(--llm-border);
  padding: 0.5rem 0.75rem;
  margin: 0.4rem 0;
  background: var(--llm-bg);
  font-size: 0.92rem;
}
.he-plan-item--now { border-left-color: var(--llm-success); }
.he-plan-item--consider { border-left-color: var(--llm-accent); }
.he-plan-item--plan { border-left-color: var(--llm-navy); }
.he-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  margin-right: 0.35rem;
}
.he-status-badge--now { background: #e8f5ee; color: #1e6b45; }
.he-status-badge--consider { background: #eef3f7; color: var(--llm-navy); }
.he-status-badge--plan { background: #f5f0e8; color: #7a5c00; }
.he-load-row { display: flex; justify-content: space-between; padding: 0.35rem 0; border-bottom: 1px solid var(--llm-border); font-size: 0.92rem; }

.he-solar-block { margin-top: 1rem; }
.he-solar-note { font-size: 0.9rem; margin: 0.5rem 0; line-height: 1.45; }
.he-solar-list { margin: 0.5rem 0; padding-left: 1.25rem; font-size: 0.92rem; color: var(--llm-muted); }
.he-solar-list li { margin: 0.35rem 0; }
.he-electrify-list { list-style: none; padding-left: 0; }
.he-electrify-card { margin: 0.75rem 0; padding: 0.65rem 0; border-bottom: 1px solid var(--llm-border, #e0e0e0); }
.he-electrify-card:last-child { border-bottom: none; }
.he-electrify-brief { margin-bottom: 0.45rem; }
.he-electrify-toggle { margin-top: 0.35rem; font-size: 0.88rem; }
.he-electrify-detail { margin-top: 0.65rem; padding: 0.65rem; background: #fff; border-radius: 6px; border: 1px solid var(--llm-border, #e0e0e0); }
.he-electrify-table { font-size: 0.88rem; margin-top: 0.35rem; }
.he-electrify-total td { border-top: 1px solid var(--llm-border, #ddd); padding-top: 0.35rem; }
.he-electrify-note { font-size: 0.88rem; color: var(--llm-muted); margin: 0.5rem 0 0; font-style: italic; }
.he-electrify-quotes { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px dashed var(--llm-border, #ddd); }
.he-bill-empty-title { margin: 0 0 0.35rem; }
.he-bill-status-badge { display: inline-block; padding: 0.25rem 0.55rem; border-radius: 4px; font-size: 0.85rem; background: var(--llm-surface-alt, #f0f0f0); margin-bottom: 0.5rem; }
.he-bill-status-badge--reconciled { background: #e8f5e9; color: #2e7d32; }
.he-bill-status-badge--actual { background: #e3f2fd; color: #1565c0; }
.he-bill-status-badge--estimated { background: #fff8e1; color: #f57f17; }
.he-dev-tools { opacity: 0.92; }
.he-bill-parse-report { margin-top: 0.65rem; font-size: 0.88rem; }
.he-bill-parse-failure { margin-top: 0.75rem; padding: 0.75rem; border-radius: 6px; background: #fff5f5; border: 1px solid #f5c2c2; }
.he-stats--unknown .he-stat__val { color: var(--llm-muted); font-size: 0.95rem; }
.he-explain-chips--solar { margin-top: 0.5rem; }
.he-status--warn { background: #fff8e6; color: #7a5c00; }

.he-dataset-table td { vertical-align: middle; }
.he-dataset-row--active { background: rgba(30, 107, 69, 0.06); }
.he-dataset-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.he-dataset-actions .llm-btn { padding: 0.25rem 0.55rem; font-size: 0.85rem; }
