.energy-index-section {
  --energy-index-ink: #17251f;
  --energy-index-green: #174e41;
  --energy-index-green-soft: #e8f1ed;
  --energy-index-paper: #fbfaf5;
  --energy-index-panel: #fff;
  --energy-index-line: #cfd8d2;
  --energy-index-muted: #52645d;
  --energy-index-amber: #a96518;
  --energy-index-amber-soft: #fff3df;
  --energy-index-red: #a92c2c;
  --energy-index-red-soft: #fae9e7;
  margin: 52px 0;
  color: var(--energy-index-ink);
  font-family: ui-serif, Georgia, "Noto Serif SC", serif;
  font-size: 18px;
  line-height: 1.7;
  scroll-margin-top: 24px;
}

.energy-index-section * { box-sizing: border-box; }
.energy-index-section a { color: var(--energy-index-green); text-underline-offset: 3px; }
.energy-index-section p { font-size: 18px; }
.energy-index-section :focus-visible { outline: 3px solid var(--energy-index-amber); outline-offset: 3px; }

.energy-index-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr);
  gap: 28px;
  padding: 34px;
  border-top: 7px solid var(--energy-index-green);
  background: linear-gradient(125deg, #f8f5e9, #eef5f1);
}

.energy-index-eyebrow,
.energy-index-heading-meta span,
.energy-index-card-header span,
.energy-index-nav-panel span,
.energy-index-performance span,
.energy-index-data-status span,
.energy-index-segments header span,
.energy-index-method header span,
.energy-index-method-grid span,
.energy-index-downloads span {
  display: block;
  color: var(--energy-index-green);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .04em;
}

.energy-index-heading h2 {
  max-width: 760px;
  margin: 7px 0 10px;
  color: var(--energy-index-green);
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 600;
  line-height: 1.12;
}

.energy-index-heading p { max-width: 800px; margin: 0; }
.energy-index-heading-meta { display: grid; align-content: center; gap: 1px; background: var(--energy-index-line); }
.energy-index-heading-meta p { margin: 0; padding: 14px 16px; background: rgba(255,255,255,.88); }
.energy-index-heading-meta strong { display: block; margin-top: 2px; font-size: 18px; }

.energy-index-history-boundary {
  display: grid;
  grid-template-columns: minmax(190px, .35fr) minmax(0, 1.65fr);
  gap: 22px;
  margin: 16px 0;
  padding: 22px 24px;
  border-left: 6px solid var(--energy-index-amber);
  background: var(--energy-index-amber-soft);
}

.energy-index-history-boundary strong { color: #75420d; font-size: 20px; }
.energy-index-history-boundary p { margin: 0; }

.energy-index-unavailable {
  margin: 16px 0;
  padding: 22px 24px;
  border: 2px solid var(--energy-index-red);
  background: var(--energy-index-red-soft);
}

.energy-index-unavailable strong { color: var(--energy-index-red); font-size: 22px; }
.energy-index-unavailable p { margin: 5px 0 0; }

.energy-index-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.energy-index-card { min-width: 0; padding: 24px; border: 1px solid var(--energy-index-line); border-top: 8px solid var(--energy-index-green); background: var(--energy-index-panel); box-shadow: 0 12px 34px rgba(28,50,41,.08); }
.energy-index-card--pending,
.energy-index-card--stale { border-top-color: var(--energy-index-red); }

.energy-index-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.energy-index-card-header h3 { margin: 3px 0 0; font-size: clamp(26px, 2.7vw, 36px); font-weight: 600; line-height: 1.22; }
.energy-index-publish-state { flex: 0 0 auto; padding: 7px 10px; background: var(--energy-index-green-soft); color: var(--energy-index-green); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 18px; line-height: 1.2; }
.energy-index-card--pending .energy-index-publish-state,
.energy-index-card--stale .energy-index-publish-state { background: var(--energy-index-red-soft); color: var(--energy-index-red); }

.energy-index-nav-panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(180px, .8fr); gap: 20px; align-items: end; margin-top: 20px; padding: 22px; background: var(--energy-index-ink); color: #fff; }
.energy-index-nav-panel span { color: #aad0bd; }
.energy-index-nav-value > strong { display: block; margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: clamp(42px, 5vw, 66px); font-weight: 500; line-height: 1; }
.energy-index-nav-panel dl { display: grid; grid-template-columns: 1fr auto; gap: 7px 14px; margin: 0; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 18px; }
.energy-index-nav-panel dt { color: #cad8d1; }
.energy-index-nav-panel dd { margin: 0; font-weight: 900; }
.energy-index-nav-panel--pending { display: block; background: #3b3028; }
.energy-index-nav-panel--pending .energy-index-nav-value > strong { font: 800 26px/1.35 ui-sans-serif, system-ui, sans-serif; }
.energy-index-nav-panel--pending p { margin: 8px 0 0; color: #f0ded4; }
.energy-index-positive { color: #117a58 !important; }
.energy-index-negative { color: var(--energy-index-red) !important; }
.energy-index-nav-panel .energy-index-positive { color: #8de0b5 !important; }
.energy-index-nav-panel .energy-index-negative { color: #ffaaa4 !important; }

.energy-index-chart { margin: 14px 0 0; border: 1px solid var(--energy-index-line); background: #f3f1e9; }
.energy-index-chart svg { display: block; width: 100%; height: 210px; }
.energy-index-chart line { stroke: #a9b8b0; stroke-width: 1; stroke-dasharray: 7 7; }
.energy-index-chart polyline { fill: none; stroke: var(--energy-index-green); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.energy-index-chart figcaption { display: flex; justify-content: space-between; gap: 18px; padding: 8px 13px 12px; color: var(--energy-index-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 18px; font-weight: 700; }

.energy-index-chart-empty { display: grid; place-items: center; min-height: 210px; margin-top: 14px; padding: 24px; border: 1px dashed #9caaa3; background: repeating-linear-gradient(-45deg, #faf9f4, #faf9f4 12px, #f3f1e9 12px, #f3f1e9 24px); text-align: center; }
.energy-index-chart-empty p { max-width: 460px; margin: 0; color: var(--energy-index-muted); }
.energy-index-chart-empty strong { display: block; color: var(--energy-index-ink); font-size: 22px; }
.energy-index-chart-empty > span { width: 13px; height: 13px; margin-bottom: 9px; border: 3px solid var(--energy-index-green); border-radius: 50%; background: white; }

.energy-index-performance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 14px; background: var(--energy-index-line); }
.energy-index-performance p { margin: 0; padding: 13px; background: var(--energy-index-paper); }
.energy-index-performance strong { display: block; margin-top: 3px; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 21px; line-height: 1.25; }
.energy-index-sample-note { margin: 0; padding: 11px 13px; background: #f2f1ed; color: var(--energy-index-muted); }

.energy-index-data-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 14px; background: var(--energy-index-line); }
.energy-index-data-status p { margin: 0; padding: 12px 13px; background: #fff; }
.energy-index-data-status strong { display: block; margin-top: 3px; overflow-wrap: anywhere; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 18px; }
.energy-index-warning { margin: 12px 0 0; padding: 14px 16px; border-left: 5px solid var(--energy-index-red); background: var(--energy-index-red-soft); color: #722020; }

.energy-index-segments { margin-top: 14px; padding: 18px; border: 1px solid var(--energy-index-line); background: var(--energy-index-paper); }
.energy-index-segments header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.energy-index-segments h4 { margin: 2px 0 0; font-size: 24px; }
.energy-index-segments header > strong { flex: 0 0 auto; padding: 5px 8px; background: var(--energy-index-amber-soft); color: #75420d; font: 800 18px ui-sans-serif, system-ui, sans-serif; }
.energy-index-segments > div { margin-top: 13px; }
.energy-index-segments > div p { display: grid; grid-template-columns: minmax(120px, .75fr) minmax(150px, 1.5fr) auto; gap: 12px; align-items: center; margin: 8px 0; }
.energy-index-segments i { height: 12px; overflow: hidden; background: #dce5e0; }
.energy-index-segments i b { display: block; height: 100%; background: var(--energy-index-green); }
.energy-index-segments > small { display: block; margin-top: 12px; color: var(--energy-index-muted); font-size: 18px; }
.energy-index-segments-empty { display: block !important; color: var(--energy-index-muted); }

.energy-index-selection,
.energy-index-data-details,
.energy-index-components { margin-top: 14px; border: 1px solid var(--energy-index-line); background: #fff; }
.energy-index-selection { border: 2px solid var(--energy-index-ink); }
.energy-index-selection > summary,
.energy-index-data-details > summary,
.energy-index-components > summary { position: relative; padding: 16px 56px 16px 18px; cursor: pointer; list-style: none; color: var(--energy-index-green); font-size: 19px; font-weight: 900; }
.energy-index-selection > summary::-webkit-details-marker,
.energy-index-data-details > summary::-webkit-details-marker,
.energy-index-components > summary::-webkit-details-marker { display: none; }
.energy-index-selection > summary::after,
.energy-index-data-details > summary::after,
.energy-index-components > summary::after { content: "+"; position: absolute; top: 50%; right: 18px; width: 28px; height: 28px; border: 2px solid currentColor; font: 800 24px/23px ui-monospace, monospace; text-align: center; transform: translateY(-50%); }
.energy-index-selection[open] > summary::after,
.energy-index-data-details[open] > summary::after,
.energy-index-components[open] > summary::after { content: "−"; }
.energy-index-data-details .energy-index-detail-body { padding: 0 18px; }
.energy-index-data-details p { overflow-wrap: anywhere; }
.energy-index-detail-body { border-top: 1px solid var(--energy-index-line); }
.energy-index-selection-lead { margin: 0; padding: 18px; }
.energy-index-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 1px; background: var(--energy-index-line); list-style: none; }
.energy-index-rules li { display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 16px; background: #fff; font-size: 18px; }
.energy-index-rules b { color: var(--energy-index-green); font: 900 18px ui-monospace, monospace; }
.energy-index-not-selected { margin: 0; padding: 17px 18px; border-top: 1px solid var(--energy-index-line); }
.energy-index-not-selected strong { color: var(--energy-index-red); }

.energy-index-table-scroll { max-width: 100%; overflow-x: auto; border-top: 1px solid var(--energy-index-line); -webkit-overflow-scrolling: touch; }
.energy-index-table { width: 100%; min-width: 1000px; border-collapse: collapse; background: #fff; font-size: 18px; }
.energy-index-table--selection { min-width: 1120px; }
.energy-index-table th,
.energy-index-table td { padding: 14px; border-right: 1px solid #e2e7e4; border-bottom: 1px solid #e2e7e4; text-align: left; vertical-align: top; }
.energy-index-table thead th { position: sticky; top: 0; background: var(--energy-index-ink); color: #fff; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 18px; }
.energy-index-table tbody th { min-width: 190px; }
.energy-index-table--selection td:nth-child(4),
.energy-index-table--selection td:nth-child(5) { min-width: 300px; }
.energy-index-table small { display: block; margin-top: 3px; color: var(--energy-index-muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 18px; font-weight: 500; }
.energy-index-company-name { font-weight: 900; }
.energy-index-company-name--tier-9,
.energy-index-tier-9 { color: var(--energy-index-red) !important; }
.energy-index-tier-9 { padding: 3px 7px; background: var(--energy-index-red-soft); white-space: nowrap; }

.energy-index-card-footer { display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; align-items: center; margin-top: 16px; color: var(--energy-index-muted); font-size: 18px; }
.energy-index-card-footer a { font-weight: 900; }
.energy-index-card-footer span { text-align: right; }
.energy-index-card-footer small { grid-column: 1 / -1; font-size: 18px; text-align: right; }

.energy-index-method { margin-top: 20px; padding: 24px; border-left: 7px solid var(--energy-index-amber); background: var(--energy-index-amber-soft); }
.energy-index-method h3 { margin: 3px 0 14px; color: #75420d; font-size: 28px; }
.energy-index-method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #dcc9ab; }
.energy-index-method-grid p { margin: 0; padding: 14px; background: #fffaf1; }
.energy-index-method-grid strong { display: block; margin-top: 3px; font-size: 18px; }
.energy-index-method > p { margin: 16px 0 0; }

.energy-index-downloads { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 18px 20px; border: 1px solid var(--energy-index-line); background: var(--energy-index-paper); }
.energy-index-downloads div { margin-right: auto; }
.energy-index-downloads strong { display: block; }
.energy-index-downloads a { padding: 10px 12px; border: 1px solid var(--energy-index-green); background: #fff; font: 800 18px ui-sans-serif, system-ui, sans-serif; text-decoration: none; }
.energy-index-downloads a:hover { background: var(--energy-index-green); color: #fff; }
.energy-index-generated { margin: 8px 0 0; color: var(--energy-index-muted); text-align: right; }

@media (max-width: 1180px) {
  .energy-index-grid { grid-template-columns: 1fr; }
  .energy-index-performance { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
}

@media (max-width: 820px) {
  .energy-index-heading { grid-template-columns: 1fr; padding: 24px; }
  .energy-index-history-boundary { grid-template-columns: 1fr; gap: 7px; }
  .energy-index-performance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .energy-index-rules,
  .energy-index-method-grid { grid-template-columns: 1fr; }
  .energy-index-downloads { align-items: stretch; flex-direction: column; }
  .energy-index-downloads div { margin: 0 0 5px; }
  .energy-index-downloads a { text-align: center; }
}

@media (max-width: 620px) {
  .energy-index-section { margin: 34px 0; }
  .energy-index-heading,
  .energy-index-card { padding: 18px; }
  .energy-index-card-header,
  .energy-index-segments header { align-items: flex-start; flex-direction: column; }
  .energy-index-nav-panel { grid-template-columns: 1fr; align-items: start; padding: 18px; }
  .energy-index-nav-value > strong { font-size: 40px; }
  .energy-index-performance,
  .energy-index-data-status { grid-template-columns: 1fr; }
  .energy-index-chart svg { height: 170px; }
  .energy-index-chart figcaption { flex-direction: column; gap: 2px; }
  .energy-index-segments > div p { grid-template-columns: 1fr auto; }
  .energy-index-segments i { grid-column: 1 / -1; grid-row: 2; }
  .energy-index-card-footer { grid-template-columns: 1fr; }
  .energy-index-card-footer span,
  .energy-index-card-footer small { grid-column: auto; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .energy-index-section * { scroll-behavior: auto; }
}
