:root {
  --ink: #233029;
  --ink-soft: #50605a;
  --ink-faint: #738079;
  --paper: #ffffff;
  --canvas: #eef2ef;
  --line: #d8dfda;
  --line-strong: #bec9c2;
  --forest: #173f32;
  --forest-2: #1b6b48;
  --solar: #f2b134;
  --solar-soft: #fff3ce;
  --green: #1b7f52;
  --green-soft: #dcefe5;
  --blue: #3273a8;
  --blue-soft: #dbeaf5;
  --coral: #c85f4b;
  --coral-soft: #f6e3de;
  --slate-soft: #e5e9e7;
  --tile-marker: #102f25;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(24, 42, 34, 0.06), 0 8px 24px rgba(24, 42, 34, 0.05);
  --page: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(35, 48, 41, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 48, 41, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
select,
input {
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.page-width {
  width: min(calc(100% - 48px), var(--page));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  color: white;
  background: var(--forest);
  border-radius: var(--radius);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  color: white;
  background: var(--forest);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--forest);
  background: var(--solar);
  border-radius: 4px;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-lockup > div {
  display: grid;
  gap: 0;
}

.brand-lockup strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.brand-kicker {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.source-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}

.status-pill svg {
  width: 14px;
  height: 14px;
}

.status-live > span:first-child {
  width: 7px;
  height: 7px;
  background: #57d693;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(87, 214, 147, 0.12);
}

.state-screen {
  min-height: calc(100vh - 150px);
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 48px 24px;
  text-align: center;
}

.state-screen h1 {
  margin: 24px 0 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
}

.state-screen p {
  margin: 0;
  color: var(--ink-soft);
}

.loading-symbol {
  width: 76px;
  height: 76px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 6px;
  padding: 14px;
  background: var(--forest);
  border-radius: var(--radius);
}

.loading-symbol span {
  display: block;
  background: var(--solar);
  animation: meter 1.1s ease-in-out infinite alternate;
}

.loading-symbol span:nth-child(1) { height: 34%; animation-delay: -0.6s; }
.loading-symbol span:nth-child(2) { height: 66%; animation-delay: -0.3s; }
.loading-symbol span:nth-child(3) { height: 92%; animation-delay: -0.8s; }
.loading-symbol span:nth-child(4) { height: 52%; animation-delay: -0.1s; }

@keyframes meter {
  to { height: 18%; opacity: 0.52; }
}

.state-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  color: var(--coral);
  background: var(--coral-soft);
  border-radius: var(--radius);
}

.state-icon svg {
  width: 32px;
  height: 32px;
}

.error-screen .button {
  margin-top: 22px;
}

main {
  animation: dashboard-in 420ms ease-out both;
}

@keyframes dashboard-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.period-shell {
  padding: 26px 0 24px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
}

.period-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.segment-control {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  padding: 3px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segment-control button {
  min-height: 36px;
  padding: 6px 14px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
}

.segment-control button.is-active {
  color: white;
  background: var(--forest);
  box-shadow: 0 1px 2px rgba(23, 63, 50, 0.18);
}

.period-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.picker-control input,
.picker-control select,
.select-label select {
  height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-weight: 600;
}

.picker-control input {
  min-width: 172px;
}

.picker-control select {
  min-width: 150px;
}

.icon-button,
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.icon-button {
  width: 40px;
  padding: 0;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line-strong);
}

.icon-button:hover:not(:disabled),
.button-secondary:hover:not(:disabled) {
  color: var(--forest);
  background: var(--green-soft);
  border-color: #9ebdad;
}

.icon-button svg,
.button svg {
  width: 18px;
  height: 18px;
}

.button {
  padding: 8px 13px;
  border: 1px solid transparent;
}

.button-primary {
  color: white;
  background: var(--forest);
  border-color: var(--forest);
}

.button-primary:hover {
  background: var(--forest-2);
  border-color: var(--forest-2);
}

.button-secondary {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line-strong);
}

.period-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-top: 30px;
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--forest-2);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow-light {
  color: rgba(255, 255, 255, 0.68);
}

.period-heading h1,
.section-heading h2,
.panel-heading h2,
.solar-window-copy strong {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0;
}

.period-heading h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.06;
}

.period-heading p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.metric-key {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 12px;
}

.metric-key span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.key-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 2px;
}

.key-solar { background: var(--green); }
.key-home { background: var(--ink); }
.key-import { background: var(--blue); }
.key-export { background: #d49318; }

.coverage-notice {
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  color: #6d5114;
  background: #fff8e5;
  border: 1px solid #ead49d;
  border-radius: 4px;
  font-size: 13px;
}

.coverage-notice svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.solar-window-section {
  color: white;
  background: var(--forest);
  border-bottom: 4px solid var(--solar);
}

.solar-window-layout {
  min-height: 154px;
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(400px, 0.64fr);
  align-items: center;
  gap: 52px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.solar-window-copy strong {
  display: block;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1;
  color: var(--solar);
}

.solar-window-copy p {
  max-width: 520px;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.solar-track-wrap {
  min-width: 0;
}

.solar-track {
  position: relative;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  overflow: visible;
}

.daylight-band,
.best-window-band {
  position: absolute;
  top: 0;
  height: 100%;
}

.daylight-band {
  background: rgba(242, 177, 52, 0.28);
}

.best-window-band {
  z-index: 2;
  background: var(--solar);
  border-left: 2px solid #fff3ce;
  border-right: 2px solid #fff3ce;
  box-shadow: 0 0 0 2px rgba(242, 177, 52, 0.16);
  transform-origin: left;
  animation: window-grow 560ms ease-out both;
}

@keyframes window-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.track-marker {
  position: absolute;
  top: -22px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  transform: translateX(-50%);
}

.track-marker::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.18);
}

.track-06 { left: 25%; }
.track-12 { left: 50%; }
.track-18 { left: 75%; }

.track-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.track-labels > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.track-labels > span:nth-child(2) {
  color: var(--solar-soft);
  font-weight: 600;
}

.track-labels > span:last-child {
  justify-content: flex-end;
}

.track-labels svg {
  width: 14px;
  height: 14px;
}

.dashboard-body {
  display: grid;
  gap: 28px;
  padding-top: 32px;
  padding-bottom: 48px;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.section-heading {
  margin-bottom: 15px;
}

.compact-heading {
  margin-bottom: 12px;
}

.section-heading h2,
.panel-heading h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.section-heading p,
.panel-heading p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.kpi-card {
  min-width: 0;
  min-height: 142px;
  display: flex;
  flex-direction: column;
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(24, 42, 34, 0.035);
}

.kpi-solar { border-top-color: var(--green); }
.kpi-home { border-top-color: var(--ink); }
.kpi-import { border-top-color: var(--blue); }
.kpi-export { border-top-color: #d49318; }
.kpi-self { border-top-color: var(--coral); }
.kpi-autarky { border-top-color: var(--forest-2); }

.kpi-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.kpi-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--canvas);
  border-radius: 3px;
}

.kpi-icon svg {
  width: 14px;
  height: 14px;
}

.kpi-value {
  margin-top: 13px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1;
  white-space: nowrap;
}

.kpi-value.is-muted {
  color: var(--ink-faint);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.kpi-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 13px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.25;
}

.kpi-foot > span:first-child {
  min-width: 0;
}

.kpi-change {
  flex: 0 0 auto;
  padding: 2px 4px;
  color: var(--ink-soft);
  background: var(--canvas);
  border-radius: 2px;
  font-weight: 600;
}

.kpi-change.is-up {
  color: #14633f;
  background: var(--green-soft);
}

.kpi-change.is-down {
  color: #9a4939;
  background: var(--coral-soft);
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(340px, 0.75fr);
  gap: 14px;
}

.panel {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-heading {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.observed-label,
.derived-label,
.clickable-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-faint);
  font-size: 11px;
  white-space: nowrap;
}

.observed-label svg,
.derived-label svg,
.clickable-note svg {
  width: 15px;
  height: 15px;
}

.chart-frame {
  position: relative;
  height: 380px;
  padding: 16px 18px 12px;
}

.flow-diagram {
  min-height: 380px;
  padding: 22px 20px;
}

.utilization-funnel {
  min-height: 336px;
  display: grid;
  align-content: space-between;
  gap: 26px;
}

.utilization-stage {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.utilization-stage-heading {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.utilization-stage-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--forest-2);
  background: var(--green-soft);
  border-radius: 3px;
}

.utilization-stage-icon svg {
  width: 16px;
  height: 16px;
}

.utilization-stage-heading strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  white-space: nowrap;
}

.utilization-track {
  height: 18px;
  display: flex;
  overflow: hidden;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.utilization-segment {
  min-width: 0;
  height: 100%;
  transition: width 420ms ease;
}

.utilization-segment.is-solar-home { background: var(--green); }
.utilization-segment.is-solar-grid { background: var(--solar); }
.utilization-segment.is-grid-home { background: var(--blue); }

.utilization-branches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.utilization-branch {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 8px;
  padding: 8px;
  border-left: 3px solid var(--line-strong);
  background: #f8faf8;
  font-size: 10px;
}

.utilization-branch span,
.utilization-branch small {
  color: var(--ink-soft);
}

.utilization-branch strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.utilization-branch.is-solar-home { border-left-color: var(--green); }
.utilization-branch.is-solar-grid { border-left-color: #d49318; }
.utilization-branch.is-grid-home { border-left-color: var(--blue); }

.utilization-branch small {
  font-size: 10px;
}

.empty-panel {
  min-height: 320px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--ink-faint);
}

.empty-panel svg {
  width: 30px;
  height: 30px;
}

.source-timeline-section {
  overflow: hidden;
}

.source-timeline-heading {
  align-items: center;
}

.source-timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.source-timeline-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 10px;
}

.source-timeline-legend-item i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 2px;
}

.source-timeline-legend-item strong {
  color: var(--ink);
  font-size: 10px;
}

.source-timeline-selection {
  min-height: 38px;
  margin: 0;
  padding: 9px 20px;
  color: var(--ink-soft);
  background: #f7faf8;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.source-timeline-scroll {
  overflow-x: auto;
  padding: 16px 20px 20px;
}

.source-timeline-grid {
  min-width: max(620px, calc(var(--timeline-days) * 4px + 112px));
  display: grid;
  gap: 7px;
}

.source-timeline-row {
  min-height: 30px;
  display: grid;
  grid-template-columns: 112px repeat(var(--timeline-days), minmax(4px, 1fr));
  gap: 4px;
}

.source-timeline-source {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  color: var(--ink-soft);
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

.source-timeline-source:hover,
.source-timeline-source:focus-visible,
.source-timeline-row.is-selected .source-timeline-source {
  color: var(--forest);
  background: var(--green-soft);
  border-color: #9ebdad;
}

.source-timeline-source svg {
  width: 15px;
  height: 15px;
}

.source-timeline-band {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(var(--timeline-days), minmax(4px, 1fr));
  grid-column: 2 / -1;
  overflow: hidden;
  background: #f6f8f7;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.source-timeline-row.is-selected .source-timeline-band {
  box-shadow: 0 0 0 2px rgba(23, 63, 50, 0.18);
}

.source-timeline-segment {
  min-width: 0;
  min-height: 28px;
  display: block;
  grid-row: 1;
  border-left: 1px solid rgba(255, 255, 255, 0.7);
}

.source-timeline-segment.is-solar-final,
.source-timeline-legend-item.is-solar-final i { background: #4f9d70; border-color: #39805c; }
.source-timeline-segment.is-solar-provisional,
.source-timeline-legend-item.is-solar-provisional i { background: #c4e1cd; border-color: #9abfa7; }
.source-timeline-segment.is-grid-intervals,
.source-timeline-legend-item.is-grid-intervals i { background: #6f9fc1; border-color: #4f83aa; }
.source-timeline-segment.is-grid-fluvius,
.source-timeline-legend-item.is-grid-fluvius i { background: #e6b34c; border-color: #ce911d; }
.source-timeline-segment.is-grid-daily,
.source-timeline-legend-item.is-grid-daily i { background: #aebbb4; border-color: #8d9e95; }
.source-timeline-segment.is-weather-final,
.source-timeline-legend-item.is-weather-final i { background: #78a6ba; border-color: #56899e; }
.source-timeline-segment.is-weather-provisional,
.source-timeline-legend-item.is-weather-provisional i { background: #c7dde5; border-color: #a1c1ce; }
.source-timeline-segment.is-grid-unavailable,
.source-timeline-segment.is-weather-unavailable,
.source-timeline-legend-item.is-grid-unavailable i,
.source-timeline-legend-item.is-weather-unavailable i {
  background: repeating-linear-gradient(135deg, #f4f5f3 0 4px, #dfe4e0 4px 6px);
  border-color: var(--line-strong);
}
.source-timeline-legend-item.is-calendar-gap i {
  background: #f6f8f7;
  border-color: var(--line);
}

.grid-clock-section {
  overflow: hidden;
}

.grid-clock-heading {
  align-items: center;
}

.grid-clock-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.grid-clock-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 10px;
}

.grid-clock-legend-item i {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  color: var(--tile-marker);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.grid-clock-legend-item.is-import i { background: var(--blue-soft); }
.grid-clock-legend-item.is-export i { background: var(--solar-soft); }
.grid-clock-legend-item.is-balanced i { background: var(--slate-soft); }
.grid-clock-legend-item.is-unavailable i { background: repeating-linear-gradient(135deg, #f4f5f3 0 4px, #dfe4e0 4px 6px); }

.grid-clock-body {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(260px, 1.1fr);
  align-items: center;
  gap: 36px;
  padding: 22px 20px 24px;
}

.grid-clock-face {
  --clock-size: 310px;
  --clock-offset: -118px;
  width: min(100%, var(--clock-size));
  aspect-ratio: 1;
  position: relative;
  justify-self: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--paper) 0 32%, transparent 32%),
    repeating-conic-gradient(from -7.5deg, rgba(35, 48, 41, 0.12) 0 1deg, transparent 1deg 15deg),
    var(--canvas);
}

.grid-clock-face::after {
  content: "";
  position: absolute;
  inset: 58px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.grid-clock-hour {
  width: 30px;
  height: 30px;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--tile-marker);
  background: color-mix(in srgb, var(--clock-color) var(--clock-intensity), white);
  border: 1px solid color-mix(in srgb, var(--clock-color) 62%, var(--line));
  border-radius: 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  transform: translate(-50%, -50%) rotate(var(--clock-angle)) translateY(var(--clock-offset)) rotate(var(--clock-reverse-angle));
}

.grid-clock-hour.is-import { --clock-color: #6f9fc1; }
.grid-clock-hour.is-export { --clock-color: #e6b34c; }
.grid-clock-hour.is-balanced { --clock-color: #aebbb4; }
.grid-clock-hour.is-unavailable {
  --clock-color: #dfe4e0;
  background: repeating-linear-gradient(135deg, #f4f5f3 0 4px, #dfe4e0 4px 6px);
}

.grid-clock-hour:hover:not(:disabled),
.grid-clock-hour:focus-visible,
.grid-clock-hour.is-selected {
  z-index: 3;
  outline: 2px solid var(--forest);
  outline-offset: 2px;
  transform: translate(-50%, -50%) rotate(var(--clock-angle)) translateY(var(--clock-offset)) rotate(var(--clock-reverse-angle)) scale(1.08);
}

.grid-clock-hour:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.grid-clock-center {
  position: absolute;
  inset: 90px;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  text-align: center;
}

.grid-clock-center span {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.grid-clock-center strong {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
}

.grid-clock-axis {
  position: absolute;
  z-index: 4;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 600;
}

.grid-clock-axis.is-00 { top: 8px; left: 50%; transform: translateX(-50%); }
.grid-clock-axis.is-06 { top: 50%; right: 8px; transform: translateY(-50%); }
.grid-clock-axis.is-12 { bottom: 8px; left: 50%; transform: translateX(-50%); }
.grid-clock-axis.is-18 { top: 50%; left: 8px; transform: translateY(-50%); }

.grid-clock-readout {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 7px;
}

.grid-clock-readout .eyebrow {
  margin: 0;
}

.grid-clock-readout > strong {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
  line-height: 1;
}

.grid-clock-readout p {
  max-width: 370px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.grid-clock-readout dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 0;
}

.grid-clock-readout dl > div {
  min-width: 0;
  padding: 8px;
  background: #f7faf8;
  border-top: 2px solid var(--line-strong);
}

.grid-clock-readout dl > div:nth-child(1) { border-top-color: var(--blue); }
.grid-clock-readout dl > div:nth-child(2) { border-top-color: #d49318; }
.grid-clock-readout dl > div:nth-child(3) { border-top-color: var(--ink-soft); }

.grid-clock-readout dt {
  color: var(--ink-faint);
  font-size: 10px;
}

.grid-clock-readout dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
}

.grid-clock-empty {
  min-height: 250px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 22px;
  color: var(--ink-faint);
  text-align: center;
  font-size: 13px;
}

.grid-clock-empty svg {
  width: 28px;
  height: 28px;
}

.overnight-section {
  overflow: hidden;
}

.overnight-heading {
  align-items: center;
}

.overnight-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.overnight-metric {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 13px 20px;
  border-left: 1px solid var(--line);
}

.overnight-metric:first-child {
  border-left: 0;
}

.overnight-metric span,
.overnight-metric small {
  color: var(--ink-faint);
  font-size: 10px;
}

.overnight-metric strong {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  white-space: nowrap;
}

.overnight-readout {
  min-height: 38px;
  margin: 0;
  padding: 9px 20px;
  color: var(--ink-soft);
  background: #f7faf8;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.overnight-profile {
  padding: 16px 20px 12px;
}

.overnight-profile-heading,
.overnight-month-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--ink-faint);
  font-size: 10px;
}

.overnight-hour-profile {
  min-height: 154px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.overnight-hour {
  min-width: 0;
  min-height: 154px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  padding: 8px 6px;
  color: var(--ink-soft);
  background: #f7faf8;
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--blue);
  border-radius: 3px;
  text-align: center;
}

.overnight-hour:hover:not(:disabled),
.overnight-hour:focus-visible,
.overnight-hour.is-selected {
  z-index: 1;
  outline: 2px solid var(--forest);
  outline-offset: 1px;
  background: var(--blue-soft);
}

.overnight-hour:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.overnight-hour-label {
  color: var(--ink-faint);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.overnight-hour-bar-wrap {
  min-height: 82px;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 5px 2px 0;
  border-bottom: 1px solid var(--line-strong);
}

.overnight-hour-bar-wrap i {
  width: min(36px, 74%);
  min-height: 4px;
  display: block;
  background: var(--blue);
  border-radius: 2px 2px 0 0;
  transition: height 420ms ease;
}

.overnight-hour strong {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  white-space: nowrap;
}

.overnight-months {
  display: grid;
  gap: 7px;
  padding: 4px 20px 20px;
}

.overnight-month-heading {
  margin-top: 3px;
}

.overnight-month-row {
  min-height: 30px;
  display: grid;
  grid-template-columns: 126px minmax(80px, 1fr) 90px;
  align-items: center;
  gap: 10px;
}

.overnight-month-row > span:first-child {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
}

.overnight-month-row span:first-child strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overnight-month-row span:first-child small {
  color: var(--ink-faint);
  font-size: 9px;
  white-space: nowrap;
}

.overnight-month-track {
  height: 10px;
  overflow: hidden;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.overnight-month-track i {
  height: 100%;
  display: block;
  background: var(--blue);
  border-radius: 1px;
}

.overnight-month-row > strong {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.overnight-empty {
  min-height: 132px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 22px;
  color: var(--ink-faint);
  text-align: center;
  font-size: 13px;
}

.overnight-empty svg {
  width: 26px;
  height: 26px;
}

.peak-timing-section {
  overflow: hidden;
}

.peak-timing-heading {
  align-items: center;
}

.peak-timing-controls {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(108px, 1fr));
  padding: 3px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.peak-timing-control {
  min-height: 34px;
  padding: 5px 9px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
}

.peak-timing-control[aria-checked="true"] {
  color: white;
  background: var(--forest);
}

.peak-timing-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
}

.peak-timing-legend-scale {
  width: 96px;
  height: 8px;
  display: inline-block;
  background: linear-gradient(90deg, #eff4f2, var(--peak-color));
  border: 1px solid color-mix(in srgb, var(--peak-color) 38%, var(--line));
  border-radius: 2px;
}

.peak-timing-legend-marker {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: var(--tile-marker);
  background: #f7faf8;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.peak-timing-readout {
  min-height: 38px;
  margin: 0;
  padding: 9px 20px;
  color: var(--ink-soft);
  background: #f7faf8;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.peak-timing-scroll {
  overflow-x: auto;
  padding: 16px 20px 20px;
}

.peak-timing-grid {
  min-width: 780px;
  display: grid;
  gap: 4px;
}

.peak-timing-row {
  min-height: 30px;
  display: grid;
  grid-template-columns: 112px repeat(24, minmax(20px, 1fr));
  gap: 4px;
}

.peak-timing-header {
  min-height: 24px;
  align-items: end;
}

.peak-timing-row-label,
.peak-timing-hour-label {
  min-width: 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.peak-timing-row-label {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.peak-timing-row-label strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peak-timing-row-label small {
  color: var(--ink-faint);
  font-size: 9px;
  white-space: nowrap;
}

.peak-timing-hour-label {
  display: grid;
  place-items: end center;
  min-height: 20px;
  font-size: 9px;
}

.peak-timing-hour-label.is-muted {
  color: transparent;
}

.peak-timing-row > [role="cell"] {
  min-width: 0;
  min-height: 30px;
}

.peak-timing-cell {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--tile-marker);
  background: color-mix(in srgb, var(--peak-color) calc(var(--heat) * 78%), #f5f7f6);
  border: 1px solid color-mix(in srgb, var(--peak-color) calc(var(--heat) * 54%), var(--line));
  border-radius: 2px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.peak-timing-cell:hover,
.peak-timing-cell:focus-visible,
.peak-timing-cell.is-selected {
  z-index: 1;
  outline: 2px solid var(--forest);
  outline-offset: 1px;
  transform: scale(1.08);
}

.peak-timing-cell.is-empty {
  background: #f6f8f7;
  border-color: var(--line);
}

.peak-timing-cell.is-peak {
  box-shadow: inset 0 0 0 2px var(--forest);
}

.peak-timing-section.is-import { --peak-color: #6f9fc1; }
.peak-timing-section.is-export { --peak-color: #e6b34c; }

.peak-timing-empty {
  min-height: 132px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 22px;
  color: var(--ink-faint);
  text-align: center;
  font-size: 13px;
}

.peak-timing-empty svg {
  width: 26px;
  height: 26px;
}

.insights-section {
  padding: 24px 0 5px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.insight-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 11px;
  padding: 16px 18px 22px;
  border-left: 1px solid var(--line);
}

.insight-item:first-child {
  border-left: 0;
  padding-left: 0;
}

.insight-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 4px;
}

.insight-icon svg {
  width: 18px;
  height: 18px;
}

.insight-amber .insight-icon { color: #8a620d; background: var(--solar-soft); }
.insight-green .insight-icon { color: var(--green); background: var(--green-soft); }
.insight-blue .insight-icon { color: var(--blue); background: var(--blue-soft); }
.insight-coral .insight-icon { color: var(--coral); background: var(--coral-soft); }
.insight-slate .insight-icon { color: var(--ink-soft); background: var(--slate-soft); }

.insight-label {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.insight-item strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  line-height: 1.25;
}

.insight-item p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.good-solar-section {
  overflow: hidden;
}

.good-solar-heading {
  align-items: center;
}

.good-solar-method {
  min-height: 38px;
  margin: 0;
  padding: 9px 20px;
  color: var(--ink-soft);
  background: #f7faf8;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.good-solar-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 20px 20px;
}

.good-solar-card {
  min-width: 0;
  min-height: 190px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  gap: 8px 10px;
  padding: 14px;
  color: var(--ink);
  background: #f8faf8;
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: 4px;
  text-align: left;
}

.good-solar-card:hover,
.good-solar-card:focus-visible {
  z-index: 1;
  background: #f2f8f4;
  border-color: #8db89f;
  outline: 2px solid var(--forest);
  outline-offset: 1px;
}

.good-solar-rank {
  grid-column: 1 / -1;
  color: var(--forest-2);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.good-solar-score {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.good-solar-score small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.good-solar-score strong {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 30px;
  line-height: 1;
}

.good-solar-score em {
  color: var(--ink-faint);
  font-size: 10px;
  font-style: normal;
}

.good-solar-date {
  align-self: end;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.good-solar-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.good-solar-metrics span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.good-solar-metrics small {
  color: var(--ink-faint);
  font-size: 9px;
}

.good-solar-metrics strong {
  overflow: hidden;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.good-solar-empty {
  min-height: 132px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 22px;
  color: var(--ink-faint);
  text-align: center;
  font-size: 13px;
}

.good-solar-empty svg {
  width: 26px;
  height: 26px;
}

.distribution-section {
  overflow: hidden;
}

.distribution-heading {
  align-items: center;
}

.distribution-controls {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  padding: 3px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.distribution-control {
  min-height: 34px;
  padding: 5px 8px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
}

.distribution-control[aria-checked="true"] {
  color: white;
  background: var(--forest);
}

.distribution-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 9px;
  padding: 12px 20px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.distribution-legend-band,
.distribution-legend-median,
.distribution-legend-p90 {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  color: var(--tile-marker);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.distribution-legend-band { background: color-mix(in srgb, var(--distribution-color) 36%, white); }
.distribution-legend-median { background: white; }
.distribution-legend-p90 { background: #f7faf8; }

.distribution-readout {
  min-height: 38px;
  margin: 0;
  padding: 9px 20px;
  color: var(--ink-soft);
  background: #f7faf8;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.distribution-rows {
  padding: 12px 20px 20px;
}

.distribution-row-heading {
  display: grid;
  grid-template-columns: 126px minmax(80px, 1fr) 90px;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--ink-faint);
  font-size: 10px;
}

.distribution-row-heading span:last-child {
  text-align: right;
}

.distribution-radio-list {
  display: grid;
  gap: 7px;
}

.distribution-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: 126px minmax(80px, 1fr) 90px;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 3px;
  text-align: left;
}

.distribution-row:hover:not(:disabled),
.distribution-row:focus-visible,
.distribution-row.is-selected {
  z-index: 1;
  background: #f2f8f4;
  outline: 2px solid var(--forest);
  outline-offset: 1px;
}

.distribution-row:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.distribution-row > span:first-child {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
}

.distribution-row > span:first-child strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-row > span:first-child small {
  color: var(--ink-faint);
  font-size: 9px;
  white-space: nowrap;
}

.distribution-track {
  height: 18px;
  position: relative;
  overflow: hidden;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.distribution-iqr {
  height: 100%;
  position: absolute;
  top: 0;
  background: color-mix(in srgb, var(--distribution-color) 52%, white);
  border-left: 1px solid color-mix(in srgb, var(--distribution-color) 80%, var(--line));
  border-right: 1px solid color-mix(in srgb, var(--distribution-color) 80%, var(--line));
}

.distribution-median,
.distribution-p90 {
  width: 2px;
  height: 100%;
  position: absolute;
  top: 0;
  background: var(--tile-marker);
  transform: translateX(-1px);
}

.distribution-p90 {
  width: 8px;
  height: 8px;
  top: 4px;
  background: var(--tile-marker);
  border: 1px solid white;
  border-radius: 50%;
  transform: translateX(-4px);
}

.distribution-row > strong {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.distribution-section.is-production { --distribution-color: #5fa87f; }
.distribution-section.is-household { --distribution-color: #7b8a82; }
.distribution-section.is-import { --distribution-color: #6f9fc1; }
.distribution-section.is-export { --distribution-color: #e6b34c; }

.distribution-empty {
  min-height: 132px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 22px;
  color: var(--ink-faint);
  text-align: center;
  font-size: 13px;
}

.distribution-empty svg {
  width: 26px;
  height: 26px;
}

.weather-section {
  overflow: hidden;
}

.weather-heading {
  align-items: center;
}

.weather-controls {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(108px, 1fr));
  padding: 3px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.weather-control {
  min-height: 34px;
  padding: 5px 9px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
}

.weather-control[aria-checked="true"] {
  color: white;
  background: var(--forest);
}

.weather-correlation,
.weather-readout {
  min-height: 38px;
  margin: 0;
  padding: 9px 20px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.weather-correlation {
  background: #f7faf8;
}

.weather-readout {
  background: color-mix(in srgb, var(--weather-color) 10%, white);
}

.weather-scatter {
  padding: 18px 20px 22px;
}

.weather-scatter-layout {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.weather-scatter-y-title {
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 10px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.weather-scatter-chart {
  min-width: 0;
  position: relative;
  padding: 0 8px 42px 42px;
}

.weather-scatter-plot {
  height: 260px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(to top, rgba(35, 48, 41, 0.12) 1px, transparent 1px) 0 0 / 100% 50%,
    #f8faf8;
  border: 1px solid var(--line-strong);
  border-radius: 3px 3px 0 0;
}

.weather-scatter-y-ticks {
  width: 38px;
  position: absolute;
  top: 0;
  bottom: 42px;
  left: 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.weather-scatter-y-ticks span {
  position: absolute;
  right: 4px;
  bottom: calc(var(--tick) * 1%);
  transform: translateY(50%);
  white-space: nowrap;
}

.weather-scatter-x-ticks {
  height: 24px;
  position: absolute;
  right: 8px;
  bottom: 18px;
  left: 42px;
  color: var(--ink-faint);
  font-size: 9px;
}

.weather-scatter-x-ticks span {
  position: absolute;
  top: 5px;
  left: calc(var(--tick) * 1%);
  transform: translateX(-50%);
  white-space: nowrap;
}

.weather-scatter-x-title {
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 42px;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: center;
}

.weather-scatter-point {
  width: 22px;
  height: 22px;
  position: absolute;
  bottom: var(--y);
  left: var(--x);
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--tile-marker);
  background: color-mix(in srgb, var(--weather-color) 48%, white);
  border: 2px solid color-mix(in srgb, var(--weather-color) 78%, var(--line));
  border-radius: 50%;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 700;
  transform: translate(-50%, 50%);
}

.weather-scatter-point:hover,
.weather-scatter-point:focus-visible,
.weather-scatter-point.is-selected {
  z-index: 3;
  outline: 2px solid var(--forest);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--weather-color) 78%, white);
  transform: translate(-50%, 50%) scale(1.12);
}

.weather-section.is-precipitation { --weather-color: #6f9fc1; }
.weather-section.is-temperature { --weather-color: #d98776; }

.weather-empty {
  min-height: 160px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 22px;
  color: var(--ink-faint);
  text-align: center;
  font-size: 13px;
}

.weather-empty svg {
  width: 26px;
  height: 26px;
}

.daily-archetype-section {
  overflow: hidden;
}

.daily-archetype-heading {
  align-items: center;
}

.daily-archetype-summary {
  min-height: 38px;
  margin: 0;
  padding: 10px 20px;
  color: var(--ink-soft);
  background: #f7faf8;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.daily-archetype-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 14px 20px 12px;
}

.daily-archetype-filter {
  min-height: 38px;
  display: inline-grid;
  grid-template-columns: 20px auto auto;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.daily-archetype-filter:hover,
.daily-archetype-filter:focus-visible {
  color: var(--ink);
  background: #f7faf8;
  border-color: var(--forest-2);
}

.daily-archetype-filter.is-active {
  color: white;
  background: var(--forest);
  border-color: var(--forest);
}

.daily-archetype-filter svg {
  width: 15px;
  height: 15px;
}

.daily-archetype-filter small {
  color: inherit;
  font-size: 10px;
  opacity: 0.78;
}

.daily-archetype-filter.is-solar-surplus:not(.is-active) { color: #9b6205; background: #fff8e5; border-color: #e8cf93; }
.daily-archetype-filter.is-grid-heavy:not(.is-active) { color: #22608e; background: var(--blue-soft); border-color: #a6c4d9; }
.daily-archetype-filter.is-high-use:not(.is-active) { color: #176344; background: var(--green-soft); border-color: #a6d1bb; }
.daily-archetype-filter.is-anomaly:not(.is-active) { color: #9a4939; background: var(--coral-soft); border-color: #dfb6ac; }
.daily-archetype-filter.is-typical:not(.is-active) { color: var(--ink-soft); background: var(--slate-soft); }
.daily-archetype-filter.is-incomplete:not(.is-active) { color: var(--ink-faint); background: #f5f6f4; }

.daily-archetype-scroll {
  overflow-x: auto;
  padding: 4px 20px 20px;
}

.daily-archetype-grid {
  min-width: 980px;
  display: grid;
  gap: 4px;
}

.daily-archetype-row {
  min-height: 30px;
  display: grid;
  grid-template-columns: 112px repeat(31, minmax(24px, 1fr));
  gap: 4px;
}

.daily-archetype-header {
  min-height: 25px;
  align-items: end;
}

.daily-archetype-row-label,
.daily-archetype-day-label {
  min-width: 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.daily-archetype-row-label {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.daily-archetype-row-label strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-archetype-row-label small {
  color: var(--ink-faint);
  font-size: 9px;
  white-space: nowrap;
}

.daily-archetype-day-label {
  display: grid;
  place-items: end center;
  min-height: 20px;
  font-size: 9px;
}

.daily-archetype-day-label.is-muted {
  color: transparent;
}

.daily-archetype-row > [role="cell"] {
  min-width: 24px;
  min-height: 30px;
}

.daily-archetype-tile {
  position: relative;
  width: 100%;
  min-width: 24px;
  min-height: 30px;
  display: block;
  padding: 0;
  cursor: pointer;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: opacity 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.daily-archetype-marker {
  display: grid;
  place-items: center;
  color: var(--tile-marker);
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.daily-archetype-coverage-marker {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 10px;
  height: 10px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--tile-marker);
  border: 1px solid white;
  border-radius: 1px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.daily-archetype-tile:hover {
  z-index: 1;
  box-shadow: 0 0 0 2px var(--forest);
  transform: scale(1.08);
}

.daily-archetype-tile:focus-visible {
  z-index: 1;
  outline: 2px solid var(--forest);
  outline-offset: 1px;
}

.daily-archetype-tile.is-dimmed {
  opacity: 0.22;
}

.daily-archetype-tile.is-solar-surplus { background: #e6b34c; border-color: #ce911d; }
.daily-archetype-tile.is-grid-heavy { background: #6e9dc1; border-color: #4b7fa9; }
.daily-archetype-tile.is-high-use { background: #5fa87f; border-color: #398060; }
.daily-archetype-tile.is-anomaly { background: #d98776; border-color: #be6150; }
.daily-archetype-tile.is-typical { background: #aebbb4; border-color: #8d9e95; }
.daily-archetype-tile.is-incomplete {
  background: repeating-linear-gradient(135deg, #f5f6f4 0 4px, #e1e6e2 4px 6px);
  border-color: var(--line-strong);
}

.daily-archetype-tile.is-grid-incomplete:not(.is-incomplete) {
  outline: 2px dashed var(--tile-marker);
  outline-offset: -4px;
}

.daily-archetype-blank {
  min-width: 24px;
  min-height: 30px;
  background: #f7f8f7;
  border: 1px solid #edf0ee;
  border-radius: 2px;
}

.surplus-heatmap-section {
  overflow: hidden;
}

.surplus-heatmap-heading {
  align-items: center;
}

.surplus-heatmap-legend {
  display: grid;
  grid-template-columns: auto auto 96px auto;
  align-items: center;
  gap: 7px;
  color: var(--ink-faint);
  font-size: 10px;
  white-space: nowrap;
}

.surplus-heatmap-legend > span:first-child {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.surplus-heatmap-legend strong {
  color: var(--ink-soft);
  font-size: 10px;
}

.surplus-heatmap-scale {
  height: 8px;
  background: linear-gradient(90deg, #f9f3e2, #f2b134 54%, #b76e0a);
  border: 1px solid rgba(167, 101, 11, 0.22);
  border-radius: 2px;
}

.surplus-heatmap-selection {
  min-height: 22px;
  margin: 0;
  padding: 7px 20px;
  color: var(--ink-soft);
  background: #fbf7eb;
  border-bottom: 1px solid #eadfc8;
  font-size: 12px;
}

.surplus-heatmap-scroll {
  overflow-x: auto;
  padding: 16px 20px 20px;
}

.surplus-heatmap-grid {
  min-width: 780px;
  display: grid;
  gap: 4px;
}

.surplus-heatmap-row {
  min-height: 30px;
  display: grid;
  grid-template-columns: 112px repeat(24, minmax(20px, 1fr));
  gap: 4px;
}

.surplus-heatmap-row > [role="cell"] {
  min-width: 0;
  min-height: 30px;
}

.surplus-heatmap-header {
  min-height: 24px;
  align-items: end;
}

.surplus-heatmap-row-label,
.surplus-hour-label {
  min-width: 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.surplus-heatmap-row-label {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.surplus-heatmap-row-label strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surplus-heatmap-row-label small {
  color: var(--ink-faint);
  font-size: 9px;
  white-space: nowrap;
}

.surplus-hour-label {
  display: grid;
  place-items: end center;
  min-height: 20px;
  font-size: 9px;
}

.surplus-hour-label.is-muted {
  color: transparent;
}

.surplus-heatmap-cell {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  display: block;
  padding: 0;
  cursor: pointer;
  appearance: none;
  background: color-mix(in srgb, #b76e0a calc(var(--heat) * 100%), #fbf7eb);
  border: 1px solid color-mix(in srgb, #b76e0a calc(var(--heat) * 58%), #e8dfca);
  border-radius: 2px;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.surplus-heatmap-cell:hover {
  z-index: 1;
  box-shadow: 0 0 0 2px var(--forest);
  transform: scale(1.08);
}

.surplus-heatmap-cell.is-peak {
  box-shadow: inset 0 0 0 2px var(--forest);
}

.surplus-heatmap-cell.is-selected,
.surplus-heatmap-cell:focus-visible {
  z-index: 1;
  outline: 2px solid var(--forest);
  outline-offset: 1px;
  box-shadow: inset 0 0 0 2px white;
}

.surplus-heatmap-cell.is-unavailable {
  background: repeating-linear-gradient(135deg, #f5f6f4 0 4px, #e8ece9 4px 6px);
  border-color: var(--line);
}

.surplus-heatmap-empty {
  min-height: 132px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 22px;
  color: var(--ink-faint);
  text-align: center;
  font-size: 13px;
}

.surplus-heatmap-empty svg {
  width: 26px;
  height: 26px;
  color: var(--ink-soft);
}

.calendar-section {
  padding-bottom: 18px;
}

.panel-heading-inline {
  align-items: center;
}

.select-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 12px;
}

.select-label select {
  min-width: 190px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 14px 18px 0;
}

.calendar-weekday {
  padding: 2px 6px 7px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.calendar-blank,
.calendar-day {
  min-height: 84px;
}

.calendar-day {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: space-between;
  justify-items: start;
  padding: 8px;
  text-align: left;
  color: var(--ink);
  background: color-mix(in srgb, var(--green) calc(var(--heat) * 58%), white);
  border: 1px solid color-mix(in srgb, var(--green) calc(var(--heat) * 45%), var(--line));
  border-radius: 3px;
}

.calendar-day.is-export {
  background: color-mix(in srgb, var(--solar) calc(var(--heat) * 58%), white);
  border-color: color-mix(in srgb, #b3780c calc(var(--heat) * 45%), var(--line));
}

.calendar-day:hover,
.calendar-day:focus-visible {
  z-index: 2;
  outline: 2px solid var(--forest);
  outline-offset: 1px;
}

.calendar-date {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
}

.calendar-day strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-flags {
  position: absolute;
  top: 7px;
  right: 7px;
  display: inline-flex;
  gap: 3px;
}

.calendar-flags svg {
  width: 12px;
  height: 12px;
}

.day-detail-section {
  padding: 22px 0 0;
  border-top: 1px solid var(--line-strong);
}

.day-facts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.day-fact {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 16px;
  border-left: 1px solid var(--line);
}

.day-fact:first-child {
  border-left: 0;
}

.day-fact svg {
  width: 18px;
  height: 18px;
  margin-bottom: 5px;
  color: var(--forest-2);
}

.day-fact span {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.day-fact strong {
  overflow-wrap: anywhere;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
}

.day-fact small {
  color: var(--ink-soft);
  font-size: 10px;
}

.day-quality {
  margin: 10px 0 0;
  padding: 12px 12px 12px 32px;
  color: #6d5114;
  background: #fff8e5;
  border: 1px solid #ead49d;
  border-radius: 4px;
  font-size: 12px;
}

.ranking-section {
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}

.ranking-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ranking-row {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px 120px minmax(80px, 1fr) 90px 18px;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  text-align: left;
  background: var(--paper);
  border: 0;
  border-top: 1px solid var(--line);
}

.ranking-row:first-child {
  border-top: 0;
}

.ranking-row:hover,
.ranking-row:focus-visible {
  background: #f7faf8;
}

.ranking-position {
  color: var(--ink-faint);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
}

.ranking-date {
  font-weight: 500;
}

.ranking-bar {
  height: 7px;
  overflow: hidden;
  background: var(--canvas);
  border-radius: 2px;
}

.ranking-bar span {
  height: 100%;
  display: block;
  background: var(--green);
}

.ranking-row strong {
  text-align: right;
  font-size: 13px;
}

.ranking-row svg {
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
}

.health-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.health-panel summary {
  min-height: 50px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.health-panel summary::-webkit-details-marker {
  display: none;
}

.health-summary-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.health-summary-title svg,
.summary-chevron {
  width: 17px;
  height: 17px;
}

.health-panel summary > span:nth-child(2) {
  color: var(--ink-soft);
  font-size: 12px;
}

.health-panel[open] .summary-chevron {
  transform: rotate(180deg);
}

.health-body {
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(300px, 1fr);
  gap: 28px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.health-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.health-body li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.health-body li span,
.health-body p {
  color: var(--ink-soft);
}

.health-body p {
  margin: 0;
  font-size: 12px;
}

.site-footer {
  color: rgba(255, 255, 255, 0.72);
  background: #102f25;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
}

.footer-inner > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-inner strong {
  color: white;
  font-family: "Space Grotesk", sans-serif;
}

.footer-inner a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}

.footer-inner a:hover {
  color: white;
}

.footer-inner svg {
  width: 15px;
  height: 15px;
}

.noscript-message {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 100;
  padding: 14px;
  color: white;
  background: var(--coral);
  border-radius: var(--radius);
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analysis-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-diagram {
    min-height: 0;
  }

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

  .insight-item:nth-child(3) {
    border-left: 0;
  }

  .day-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .day-fact:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .day-fact:nth-child(5),
  .day-fact:nth-child(6) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  .page-width {
    width: min(calc(100% - 28px), var(--page));
  }

  .header-inner {
    min-height: 68px;
  }

  .source-status .status-pill:last-child {
    display: none;
  }

  .period-toolbar {
    grid-template-columns: 1fr auto;
  }

  .segment-control {
    grid-column: 1 / -1;
  }

  .period-picker {
    justify-content: flex-start;
  }

  .period-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .metric-key {
    justify-content: flex-start;
  }

  .solar-window-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    padding-top: 28px;
    padding-bottom: 28px;
  }

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

  .calendar-grid {
    gap: 3px;
    padding: 12px 10px 0;
  }

  .surplus-heatmap-heading {
    align-items: flex-start;
  }

  .daily-archetype-heading {
    align-items: flex-start;
  }

  .source-timeline-heading {
    align-items: flex-start;
  }

  .grid-clock-heading {
    align-items: flex-start;
  }

  .peak-timing-heading {
    align-items: flex-start;
  }

  .good-solar-heading {
    align-items: flex-start;
  }

  .overnight-heading {
    align-items: flex-start;
  }

  .weather-heading {
    align-items: flex-start;
  }

  .grid-clock-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .grid-clock-readout {
    width: 100%;
    max-width: 520px;
    justify-self: center;
  }

  .calendar-blank,
  .calendar-day {
    min-height: 68px;
  }

  .calendar-day {
    padding: 6px;
  }

  .calendar-day strong {
    font-size: 9px;
  }

  .calendar-flags {
    top: 5px;
    right: 5px;
  }

  .ranking-row {
    grid-template-columns: 28px 96px minmax(50px, 1fr) 78px 16px;
    gap: 8px;
  }

  .health-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .brand-kicker {
    display: none;
  }

  .brand-lockup strong {
    font-size: 16px;
  }

  .status-pill {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .period-toolbar {
    display: flex;
    flex-wrap: wrap;
  }

  .segment-control {
    width: 100%;
  }

  .period-picker {
    width: 100%;
  }

  .picker-control {
    flex: 1;
  }

  .picker-control input,
  .picker-control select {
    width: 100%;
    min-width: 0;
  }

  #latestPeriod {
    width: 100%;
  }

  .metric-key {
    display: grid;
    grid-template-columns: repeat(2, auto);
  }

  .track-labels {
    grid-template-columns: 1fr 1fr;
  }

  .track-labels > span:nth-child(2) {
    display: none;
  }

  .kpi-grid,
  .insight-grid,
  .day-facts {
    grid-template-columns: 1fr;
  }

  .kpi-card {
    min-height: 132px;
  }

  .kpi-value {
    font-size: 25px;
  }

  .chart-frame {
    height: 320px;
    padding: 10px 8px;
  }

  .flow-nodes {
    grid-template-columns: 1fr;
  }

  .flow-node {
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .flow-node svg {
    margin: 0;
  }

  .utilization-branches {
    grid-template-columns: 1fr;
  }

  .utilization-funnel {
    min-height: 0;
  }

  .insight-item,
  .insight-item:first-child,
  .insight-item:nth-child(3) {
    padding: 16px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .insight-item:first-child {
    border-top: 0;
  }

  .panel-heading-inline {
    align-items: flex-start;
    flex-direction: column;
  }

  .surplus-heatmap-heading {
    flex-direction: column;
    gap: 12px;
  }

  .daily-archetype-heading {
    flex-direction: column;
    gap: 8px;
  }

  .source-timeline-heading {
    flex-direction: column;
    gap: 8px;
  }

  .grid-clock-heading {
    flex-direction: column;
    gap: 8px;
  }

  .peak-timing-heading {
    flex-direction: column;
    gap: 8px;
  }

  .good-solar-heading {
    flex-direction: column;
    gap: 8px;
  }

  .distribution-heading {
    flex-direction: column;
    gap: 8px;
  }

  .good-solar-method,
  .good-solar-cards {
    padding-left: 10px;
    padding-right: 10px;
  }

  .good-solar-cards {
    grid-template-columns: 1fr;
  }

  .good-solar-card {
    min-height: 0;
  }

  .distribution-controls {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .distribution-legend,
  .distribution-readout,
  .distribution-rows {
    padding-left: 10px;
    padding-right: 10px;
  }

  .distribution-row-heading,
  .distribution-row {
    grid-template-columns: 92px minmax(52px, 1fr) 78px;
    gap: 8px;
  }

  .distribution-row > span:first-child small {
    display: none;
  }

  .overnight-heading {
    flex-direction: column;
    gap: 8px;
  }

  .weather-heading {
    flex-direction: column;
    gap: 8px;
  }

  .weather-controls {
    width: 100%;
  }

  .weather-correlation,
  .weather-readout,
  .weather-scatter {
    padding-left: 10px;
    padding-right: 10px;
  }

  .weather-scatter-layout {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 5px;
  }

  .weather-scatter-chart {
    padding-left: 34px;
    padding-bottom: 40px;
  }

  .weather-scatter-plot {
    height: 220px;
  }

  .weather-scatter-y-ticks {
    width: 32px;
    bottom: 40px;
  }

  .weather-scatter-x-ticks,
  .weather-scatter-x-title {
    left: 34px;
  }

  .weather-scatter-point {
    width: 24px;
    height: 24px;
  }

  .overnight-summary {
    grid-template-columns: 1fr;
  }

  .overnight-metric {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .overnight-metric:first-child {
    border-top: 0;
  }

  .overnight-readout,
  .overnight-profile,
  .overnight-months {
    padding-left: 10px;
    padding-right: 10px;
  }

  .overnight-hour-profile,
  .overnight-hour {
    min-height: 136px;
  }

  .overnight-hour-bar-wrap {
    min-height: 66px;
  }

  .overnight-month-row {
    grid-template-columns: 92px minmax(56px, 1fr) 80px;
    gap: 8px;
  }

  .overnight-month-row span:first-child small {
    display: none;
  }

  .peak-timing-controls {
    width: 100%;
  }

  .peak-timing-legend,
  .peak-timing-readout {
    padding-left: 10px;
    padding-right: 10px;
  }

  .peak-timing-scroll {
    padding: 12px 10px 16px;
  }

  .peak-timing-grid {
    min-width: 680px;
  }

  .peak-timing-row {
    grid-template-columns: 88px repeat(24, minmax(18px, 1fr));
    gap: 3px;
  }

  .peak-timing-row-label small {
    display: none;
  }

  .grid-clock-legend {
    padding-left: 10px;
    padding-right: 10px;
  }

  .grid-clock-body {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px 10px 20px;
  }

  .grid-clock-face {
    --clock-size: 270px;
    --clock-offset: -102px;
  }

  .grid-clock-face::after {
    inset: 52px;
  }

  .grid-clock-hour {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .grid-clock-center {
    inset: 78px;
  }

  .grid-clock-readout {
    max-width: 360px;
    justify-self: center;
    width: 100%;
  }

  .source-timeline-legend,
  .source-timeline-selection {
    padding-left: 10px;
    padding-right: 10px;
  }

  .source-timeline-scroll {
    padding: 12px 10px 16px;
  }

  .source-timeline-grid {
    min-width: max(560px, calc(var(--timeline-days) * 4px + 92px));
  }

  .source-timeline-row {
    grid-template-columns: 92px repeat(var(--timeline-days), minmax(4px, 1fr));
    gap: 3px;
  }

  .daily-archetype-summary,
  .daily-archetype-filters {
    padding-left: 10px;
    padding-right: 10px;
  }

  .daily-archetype-filter {
    flex: 1 1 150px;
  }

  .daily-archetype-scroll {
    padding: 4px 10px 16px;
  }

  .daily-archetype-grid {
    min-width: 960px;
  }

  .daily-archetype-row {
    grid-template-columns: 92px repeat(31, minmax(24px, 1fr));
    gap: 4px;
  }

  .daily-archetype-row-label small {
    display: none;
  }

  .surplus-heatmap-legend {
    grid-template-columns: auto auto 74px auto;
    width: 100%;
  }

  .surplus-heatmap-scroll {
    padding: 12px 10px 16px;
  }

  .surplus-heatmap-selection {
    padding: 7px 10px;
  }

  .surplus-heatmap-grid {
    min-width: 680px;
  }

  .surplus-heatmap-row {
    grid-template-columns: 88px repeat(24, minmax(18px, 1fr));
    gap: 3px;
  }

  .surplus-heatmap-row-label small {
    display: none;
  }

  .select-label {
    width: 100%;
    justify-content: space-between;
  }

  .select-label select {
    min-width: 0;
    max-width: 210px;
  }

  .calendar-weekday {
    padding: 2px 2px 5px;
    text-align: center;
    font-size: 8px;
  }

  .calendar-blank,
  .calendar-day {
    min-height: 54px;
  }

  .calendar-day strong {
    display: none;
  }

  .calendar-flags svg:nth-child(n + 2) {
    display: none;
  }

  .day-fact,
  .day-fact:nth-child(n) {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .day-fact:first-child {
    border-top: 0;
  }

  .day-fact svg {
    grid-row: 1 / 3;
    margin: 0;
  }

  .day-fact small {
    grid-column: 2 / 4;
  }

  .ranking-row {
    grid-template-columns: 26px minmax(90px, 1fr) 80px 16px;
  }

  .ranking-bar {
    display: none;
  }

  .health-panel summary {
    grid-template-columns: 1fr auto;
  }

  .health-panel summary > span:nth-child(2) {
    display: none;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 16px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}