.ehe-page {
  --ehe-surface: color-mix(in srgb, var(--card, #212936) 94%, transparent);
  --ehe-line: color-mix(in srgb, var(--accent, #3fd0bf) 30%, var(--line, #354156));
  --ehe-muted: var(--ink-soft, #a5aec0);
  max-width: 1080px;
  padding-bottom: max(6rem, calc(4.5rem + env(safe-area-inset-bottom)));
}

.ehe-page h1,
.ehe-page h2,
.ehe-page h3 {
  text-wrap: balance;
}

.ehe-hero,
.ehe-picker,
.ehe-comparison article,
.ehe-reasons,
.ehe-national-grid article,
.ehe-method-grid article,
.ehe-source {
  background: var(--ehe-surface);
  border: 1px solid var(--ehe-line);
  border-radius: 1.3rem;
}

.ehe-hero {
  background:
    radial-gradient(circle at 90% 8%, color-mix(in srgb, var(--accent, #3fd0bf) 19%, transparent), transparent 34%),
    linear-gradient(145deg, var(--ehe-surface), color-mix(in srgb, var(--card, #212936) 82%, var(--bg, #10131a)));
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  margin-top: 1rem;
  overflow: hidden;
  padding: clamp(1.4rem, 4vw, 3rem);
}

.ehe-hero h1 {
  font-size: clamp(2.2rem, 5.7vw, 4.65rem);
  line-height: 1;
  margin: .35rem 0 .85rem;
  max-width: 13ch;
}

.ehe-dek {
  color: var(--ehe-muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.55;
  margin: 0;
  max-width: 58ch;
}

.ehe-headlines {
  display: grid;
  gap: .65rem;
  margin: 0;
}

.ehe-headlines div {
  background: color-mix(in srgb, var(--bg, #10131a) 56%, transparent);
  border: 1px solid var(--line, #354156);
  border-radius: 1rem;
  display: grid;
  gap: .15rem;
  padding: .95rem;
}

.ehe-headlines dt,
.ehe-comparison article > p {
  color: var(--ehe-muted);
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .045em;
  margin: 0;
  text-transform: uppercase;
}

.ehe-headlines dd {
  color: var(--accent-text, #3fd0bf);
  font-family: Georgia, serif;
  font-size: clamp(1.55rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.08;
  margin: 0;
}

.ehe-section {
  margin-top: clamp(2.7rem, 6vw, 4.8rem) !important;
}

.ehe-section-heading {
  margin-bottom: 1.15rem;
  max-width: 70ch;
}

.ehe-section-heading h2,
.ehe-source h2 {
  font-size: clamp(1.7rem, 3.7vw, 2.65rem);
  margin: .3rem 0 .45rem;
}

.ehe-section-heading > p:last-child,
.ehe-source p {
  color: var(--ehe-muted);
}

.ehe-picker {
  max-width: 720px;
  padding: clamp(1rem, 3vw, 1.45rem);
}

.ehe-picker label {
  display: block;
  font-weight: 800;
  margin-bottom: .45rem;
}

.ehe-picker select {
  background: var(--bg, #10131a);
  border: 1px solid var(--ehe-line);
  border-radius: .85rem;
  color: var(--ink, #edeef2);
  font: inherit;
  min-height: 50px;
  padding: .7rem 2.4rem .7rem .85rem;
  width: 100%;
}

.ehe-picker select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent, #3fd0bf) 58%, transparent);
  outline-offset: 2px;
}

.ehe-picker-help,
.ehe-status {
  color: var(--ehe-muted);
  font-size: .9rem;
  margin: .55rem 0 0;
}

.ehe-status {
  min-height: 1.4em;
}

.ehe-comparison,
.ehe-national-grid,
.ehe-method-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.ehe-comparison article,
.ehe-national-grid article,
.ehe-method-grid article {
  padding: clamp(1rem, 2.5vw, 1.35rem);
}

.ehe-comparison h3,
.ehe-national-grid h3,
.ehe-method-grid h3 {
  font-size: 1.08rem;
  margin: .35rem 0 .7rem;
}

.ehe-comparison strong,
.ehe-national-grid strong {
  color: var(--accent-text, #3fd0bf);
  display: block;
  font-family: Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
}

.ehe-comparison span {
  color: var(--ehe-muted);
  display: block;
  font-size: .9rem;
  margin-top: .45rem;
}

.ehe-reasons {
  margin-top: 1rem;
  padding: clamp(1rem, 3vw, 1.55rem);
}

.ehe-reasons h3 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  margin: .3rem 0 .35rem;
}

.ehe-reasons > div > p:last-child {
  color: var(--ehe-muted);
  margin: 0;
}

.ehe-reason-bars {
  display: grid;
  gap: .85rem;
  list-style: none;
  margin: 1.2rem 0;
  padding: 0;
}

.ehe-reason-bars li > div {
  display: flex;
  font-size: .9rem;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: .3rem;
}

.ehe-bar-progress {
  appearance: none;
  background: color-mix(in srgb, var(--line, #354156) 62%, transparent);
  border: 0;
  border-radius: 999px;
  display: block;
  height: .72rem;
  overflow: hidden;
  width: 100%;
}

.ehe-bar-progress::-webkit-progress-bar {
  background: color-mix(in srgb, var(--line, #354156) 62%, transparent);
  border-radius: 999px;
}

.ehe-bar-progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent, #3fd0bf), color-mix(in srgb, var(--accent, #3fd0bf) 60%, var(--coral, #e8938f)));
  border-radius: 999px;
}

.ehe-bar-progress::-moz-progress-bar {
  background: var(--accent, #3fd0bf);
  border-radius: 999px;
}

.ehe-reasons details,
.ehe-series {
  margin-top: 1rem;
}

.ehe-reasons summary,
.ehe-series summary {
  color: var(--accent-text, #3fd0bf);
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
  padding: .65rem 0;
}

.ehe-national-grid article:nth-child(3) {
  border-color: color-mix(in srgb, var(--coral, #e8938f) 48%, var(--ehe-line));
}

.ehe-national-grid p,
.ehe-method-grid p {
  color: var(--ehe-muted);
  margin-bottom: 0;
}

.ehe-method-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ehe-source {
  align-items: end;
  display: grid;
  gap: 1rem 2rem;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, .5fr);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.ehe-source p {
  overflow-wrap: anywhere;
}

.ehe-actions {
  display: grid;
  gap: .65rem;
}

.ehe-actions a {
  align-items: center;
  border: 1px solid var(--ehe-line);
  border-radius: 999px;
  color: var(--accent-text, #3fd0bf);
  display: inline-flex;
  font-weight: 800;
  min-height: 44px;
  padding: .62rem 1rem;
  text-decoration: none;
}

.ehe-actions a:first-child {
  background: var(--accent, #3fd0bf);
  color: var(--accent-on, #10131a);
}

.ehe-actions a:hover,
.ehe-actions a:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #3fd0bf) 18%, transparent);
}

@media (max-width: 820px) {
  .ehe-hero,
  .ehe-source {
    grid-template-columns: 1fr;
  }

  .ehe-comparison,
  .ehe-national-grid,
  .ehe-method-grid {
    grid-template-columns: 1fr;
  }
}

@media (forced-colors: active) {
  .ehe-hero,
  .ehe-picker,
  .ehe-comparison article,
  .ehe-reasons,
  .ehe-national-grid article,
  .ehe-method-grid article,
  .ehe-source {
    background: Canvas;
    border-color: CanvasText;
  }

  .ehe-bar-progress {
    border: 1px solid CanvasText;
  }
}
