.energy-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
  gap: 16px;
  margin-bottom: 0;
}

.energy-action-grid > .panel {
  min-width: 0;
}

.energy-performance-panel .panel-body,
.energy-opportunity-panel .panel-body {
  padding: 20px;
}

.energy-performance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.energy-performance-card {
  --performance-color: var(--green);
  display: flex;
  min-width: 0;
  min-height: 196px;
  flex-direction: column;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.energy-performance-card.is-warning {
  --performance-color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 42%, var(--line));
}

.energy-performance-card > header,
.energy-performance-target,
.energy-performance-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.energy-performance-card > header > span:first-child {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.energy-performance-value {
  display: flex;
  min-height: 62px;
  align-items: baseline;
  gap: 5px;
  padding-top: 14px;
}

.energy-performance-value strong {
  color: var(--text);
  font-family: inherit;
  font-size: 28px;
  font-weight: 650;
  line-height: 36px;
}

.energy-performance-value small,
.energy-performance-target span,
.energy-performance-card > footer span {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.energy-performance-target b {
  color: var(--performance-color);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.energy-performance-track {
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  background: var(--line);
  border-radius: 4px;
}

.energy-performance-track span {
  display: block;
  height: 100%;
  background: var(--performance-color);
  border-radius: inherit;
}

.energy-performance-card > footer {
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.energy-performance-card > footer a,
.energy-opportunity-item > a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
}

.energy-opportunity-list {
  display: grid;
  gap: 12px;
}

.energy-opportunity-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 92px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.energy-opportunity-item.is-high {
  border-color: color-mix(in srgb, var(--red) 35%, var(--line));
}

.energy-opportunity-rank {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--primary);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  background: var(--primary-soft);
  border-radius: 6px;
}

.energy-opportunity-item.is-high .energy-opportunity-rank {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
}

.energy-opportunity-copy,
.energy-opportunity-copy header,
.energy-opportunity-copy footer {
  min-width: 0;
}

.energy-opportunity-copy header,
.energy-opportunity-copy footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.energy-opportunity-copy header b {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.energy-opportunity-copy p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.energy-opportunity-copy footer {
  flex-wrap: wrap;
  color: var(--soft);
  font-size: 12px;
  line-height: 18px;
}

.energy-opportunity-copy footer span + span::before {
  margin-right: 8px;
  content: "·";
  color: var(--line-strong);
}

@media (max-width: 1380px) {
  .energy-action-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .energy-performance-grid {
    grid-template-columns: 1fr;
  }

  .energy-performance-card {
    min-height: 180px;
  }

  .energy-opportunity-item {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .energy-opportunity-item > a {
    grid-column: 2;
    justify-self: start;
  }
}
