:root {
  color-scheme: dark;
  --bg: #0b1119;
  --panel: #121c28;
  --panel-hi: #182433;
  --line: #2a394a;
  --ink: #e9eff4;
  --muted: #a3b3c4;
  --quiet: #8192a6;
  --accent: #b7e6d6;
  --accent-ink: #0f2a24;
  --solar: #f5c65a;
  --home: #a9c9eb;
  --ev: #58cee2;
  --import: #f58e81;
  --export: #ba9cf1;
  --charge: #72d9a0;
  --discharge: #5ebbaf;
  --warn: #ffd18b;
  --radius: 12px;
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
select,
input[type="datetime-local"] {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-hi);
  color: var(--ink);
  padding: 8px 13px;
}
button {
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover,
select:hover {
  background: #213347;
  border-color: #516a81;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button[aria-pressed="true"] {
  background: #25473f;
  border-color: #72c7ac;
  color: #dbfff2;
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.primary:hover {
  background: #d2f4e8;
  border-color: #d2f4e8;
}
.quiet {
  background: transparent;
}
.badge {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.warn {
  color: var(--warn);
  border-color: #6a5636;
}
.micro {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
}
.dim {
  color: var(--quiet);
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.15em;
  color: var(--muted);
}
a {
  color: inherit;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 21px;
  letter-spacing: -0.025em;
  font-weight: 550;
}
h2 {
  font-size: 19px;
  font-weight: 550;
  letter-spacing: -0.02em;
}
strong,
time,
output {
  font-variant-numeric: tabular-nums;
}
strong {
  font-weight: 600;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 100;
  background: var(--accent);
  color: #000;
  padding: 15px;
}
.skip:focus {
  top: 12px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 19px 28px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.clock-block {
  min-width: 310px;
}
.eyebrow a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sc-figures-mode {
  margin-left: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8aa0b4;
}
.sc-figures-mode[data-mode="yours"] {
  color: #e6c36a;
}
.divider {
  padding: 0 9px;
  color: #536478;
}
.clock-line {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 6px 0 3px;
  line-height: 1.15;
  white-space: nowrap;
}
#date,
#clock {
  font-size: clamp(19px, 1.75vw, 30px);
  font-weight: 550;
  letter-spacing: -0.045em;
}
#clock {
  color: var(--accent);
}
.transport {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.transport #previous,
.transport #next {
  font-size: 26px;
  padding: 0;
  min-width: 34px;
}
.transport #stop {
  padding: 8px 12px;
}
.transport #speed {
  min-width: 65px;
}
.transport #pace {
  width: 100%;
  text-align: center;
  margin-top: 2px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.supply-open-group {
  display: flex;
  align-items: center;
  gap: 9px;
}
.supply-open-group #sc-open {
  text-align: left;
  min-width: 150px;
}
.sc-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-hi);
  color: var(--ink);
  padding: 8px 13px;
  text-align: left;
  white-space: nowrap;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.sc-link:hover,
.sc-link:focus-visible {
  background: #213347;
  border-color: #516a81;
}
.top-actions #range-open {
  text-align: left;
  min-width: 210px;
}
.button-caption {
  font-size: 9px;
  letter-spacing: 0.1em;
  display: block;
  color: var(--muted);
  margin-bottom: 3px;
}
.top-actions #scientist {
  font-size: 12px;
  min-height: 54px;
}
#version-open {
  min-height: 44px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.sc-top-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: none;
}
.sc-version {
  min-height: 44px;
  padding: 0 12px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
#sc-changelog-content {
  max-height: 65dvh;
  overflow: auto;
  line-height: 1.7;
}
#changelog-content {
  max-height: 65dvh;
  overflow: auto;
  line-height: 1.7;
}
main {
  max-width: 1780px;
  margin: auto;
  padding: 20px 28px 126px;
}
.section-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}
.views {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 14px;
}
.views button {
  background: transparent;
  border-color: transparent;
  font-size: 12px;
  min-height: 40px;
  padding: 8px 15px;
  color: var(--muted);
}
.views button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--panel-hi);
  border-color: var(--line);
}
.recording {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.recording button {
  border-radius: 50%;
  min-height: 30px;
  width: 30px;
  padding: 0;
}
.snapshot-panel,
.chart-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 20px 22px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head .eyebrow {
  margin-bottom: 5px;
}
.snapshot-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(390px, 0.9fr);
  gap: 20px;
}
.energy-ledger {
  min-width: 0;
}
.ledger-head,
.energy-row,
.ledger-foot {
  display: grid;
  grid-template-columns: minmax(145px, 0.85fr) minmax(110px, 1fr) minmax(
      130px,
      1fr
    );
  gap: 24px;
  align-items: center;
}
.ledger-head {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 12px;
}
.ledger-head > span:first-child {
  font-size: 10px;
  letter-spacing: 0.12em;
}
.ledger-head > span:not(:first-child) {
  text-align: right;
}
.energy-row {
  min-height: 31px;
}
.energy-row[data-detail] {
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.12s ease;
}
.energy-row[data-detail]:hover,
.energy-row[data-detail]:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}
.energy-row[data-detail]:focus-visible {
  box-shadow: 0 0 0 1.5px #4a6578;
}
.energy-label {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--metric);
  flex-shrink: 0;
}
.bar-cell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.bar-track {
  height: 5px;
  background: #263342;
  border-radius: 4px;
  flex: 1;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--metric);
  border-radius: 4px;
}
.bar-value {
  min-width: 64px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.partial-mark {
  color: var(--warn);
}
.ledger-foot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 10px;
  font-size: 12px;
}
.ledger-foot strong {
  text-align: right;
}
#energy-coverage {
  margin-top: 9px;
}
.hour-card {
  padding: 15px 18px;
  border-left: 1px solid var(--line);
  background: #0e1722;
  border-radius: 0 8px 8px 0;
}
.snapshot-layout {
  align-items: center;
}
.hour-window {
  font-size: 20px;
  margin: 8px 0 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.hour-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  padding: 5px 0;
}
.hour-metric strong {
  font-size: 16px;
}
.hour-metric small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
#hour-note {
  margin-top: 12px;
}
.cli {
  min-width: 0;
  height: 350px;
  overflow: auto;
  padding: 13px 15px;
  border: 1px solid #355347;
  border-radius: 6px;
  background: #07110e;
  color: #9de6aa;
  font: 11px/1.55 "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  white-space: pre;
  tab-size: 2;
  font-variant-numeric: tabular-nums;
  scrollbar-color: #467862 #07110e;
}
.cli .cli-entry + .cli-entry {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #2b4238;
}
.cli .up {
  color: #2f9e5f;
  font-weight: 600;
}
.cli .down {
  color: #e05252;
  font-weight: 600;
}
.cli .flat {
  color: #6f8a7c;
  font-style: italic;
}
.hour-log-open {
  display: block;
  margin-top: 10px;
  color: #b7e6d6;
  min-height: 36px;
  font-size: 12px;
}
#hour-log-dialog {
  width: min(1060px, calc(100% - 24px));
  max-height: min(88dvh, 950px);
}
#hour-log-dialog .dialog-head { margin-bottom: 12px; }
#hour-log-dialog .cli-full {
  height: min(65dvh, 660px);
  max-height: 65dvh;
  font-size: 12px;
  line-height: 1.65;
}
#hour-log-dialog > .micro { margin-top: 10px; color: var(--muted); }
.top-actions #scientist {
  border-color: #477668;
  background: radial-gradient(circle at 50% 35%, #254b3e, #10231f 75%);
  color: #b7f2d5;
  box-shadow: inset 0 0 0 1px #b7e6d620;
}
.top-actions #scientist:hover,
.top-actions #scientist:focus-visible {
  border-color: #a6e7c3;
  background: #265543;
}
.top-actions #scientist svg { filter: drop-shadow(0 0 3px #8de7ae90); }
.context-grid {
  display: grid;
  grid-template-columns: 1.22fr 1fr 1fr 1fr;
  gap: 12px;
  margin: 12px 0 20px;
}
.context-card {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.context-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}
.context-head h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}
.context-head .micro {
  font-size: 10px;
}
.context-card p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
}
.context-card .micro:last-child {
  margin-top: 7px;
  font-size: 10px;
}
.money-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.money-line strong {
  font-size: 25px;
  letter-spacing: -0.035em;
  display: block;
}
.money-line span {
  font-size: 10px;
  color: var(--muted);
}
.money-line > div:last-child {
  text-align: right;
}
.battery-line {
  display: flex;
  align-items: center;
  gap: 12px;
}
.battery-line strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}
.battery-track {
  height: 22px;
  border: 1px solid #4e6970;
  border-radius: 5px;
  position: relative;
  flex: 1;
  background: #0a141c;
  overflow: hidden;
}
.battery-track > div {
  height: 100%;
  background: var(--accent);
  width: 0;
}
.battery-track > span {
  position: absolute;
  left: 10%;
  height: 100%;
  top: 0;
  border-left: 2px dashed #9e7e4a;
}
.battery-line .micro {
  font-size: 9px !important;
  margin: 0 !important;
}
.weather-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.weather-line strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}
.weather-line #weather-icon {
  color: var(--solar);
  font-size: 29px;
  line-height: 1;
}
.weather-line .micro {
  font-size: 10px;
}
.chart-panel {
  padding-bottom: 16px;
}
.chart-head {
  margin-bottom: 10px;
}
#explore {
  scroll-margin-top: 104px;
}
.chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.chart-controls label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.chart-controls select,
.chart-controls button {
  font-size: 11px;
  min-height: 36px;
}
.legend {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.legend button {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  padding: 6px 10px 6px 0;
  min-height: 32px;
  font-size: 11px;
  color: var(--muted);
}
.legend button[aria-pressed="true"] {
  color: var(--ink);
}
.legend button[aria-pressed="false"] {
  opacity: 0.45;
}
.legend .dot {
  width: 8px;
  height: 8px;
}
.chart-wrap {
  position: relative;
  width: 100%;
  height: 255px;
}
.chart-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.chart-cursor {
  position: absolute;
  top: 10px;
  bottom: 29px;
  border-left: 1px solid var(--accent);
  pointer-events: none;
  transition: none;
}
.chart-cursor:before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  left: -3px;
  top: 0;
  background: var(--accent);
  border-radius: 50%;
}
.chart-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: #07101b;
  border: 1px solid #52657b;
  box-shadow: 0 4px 18px #0008;
  padding: 12px;
  border-radius: 7px;
  font-size: 11px;
  min-width: 185px;
  max-width: 280px;
}
.tooltip-heading {
  font-weight: 600;
  margin-bottom: 5px;
}
.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 2px 0;
}
.chart-caption {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 10px;
  color: var(--muted);
  padding: 8px 0;
}
.focus-summary {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
}
.focus-stat {
  font-size: 11px;
  color: var(--muted);
}
.focus-stat strong {
  color: var(--ink);
  font-size: 15px;
  margin-right: 5px;
}
.quality-details {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding: 12px 0;
  color: var(--muted);
  font-size: 11px;
}
summary {
  cursor: pointer;
  min-height: 30px;
  padding: 5px 0;
}
.quality-details #quality-details {
  columns: 2;
  column-gap: 36px;
  line-height: 1.7;
}
.quality-details p {
  margin: 8px 0;
}
.quality-details ul {
  padding-left: 17px;
}
.page-footer {
  font-size: 10px;
  color: var(--quiet);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 0;
}
.scrub-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #111d2b;
  z-index: 21;
  border-top: 1px solid #385065;
  padding: 10px 28px 8px;
  box-shadow: 0 -6px 24px #0003;
}
.scrub-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: var(--muted);
}
.scrub-labels output {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}
.scrub-ticks {
  position: relative;
  height: 13px;
  margin: 0 9px;
  pointer-events: none;
}
.scrub-tick {
  position: absolute;
  left: calc(var(--p) * 1%);
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}
.scrub-tick i {
  width: 1px;
  height: 5px;
  background: #6d8ba3;
}
.scrub-tick:first-child {
  transform: none;
  align-items: flex-start;
}
.scrub-tick:last-child {
  transform: translateX(-100%);
  align-items: flex-end;
}
input[type="range"] {
  display: block;
  width: 100%;
  height: 26px;
  accent-color: var(--accent);
  margin: 2px 0;
  cursor: ew-resize;
}
.scrub-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 9px;
  color: var(--muted);
}
.inspector {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100%);
  background: #111c28;
  border-left: 1px solid #577287;
  box-shadow: -15px 0 50px #0006;
  padding: 22px;
  overflow: auto;
}
.inspector-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
}
.inspector-head button,
.dialog-head button {
  font-size: 25px;
  min-width: 44px;
  padding: 0;
}
.inspector p {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 15px;
}
.inspector-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.inspector-actions button {
  font-size: 12px;
}
pre {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #0a131e;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  margin: 4px 0 18px;
  color: #c8d9df;
}
.json-key {
  color: #a9c9eb;
}
.json-string {
  color: #b7e6d6;
}
.json-number {
  color: #f5c65a;
}
.json-null {
  color: #f58e81;
}
dialog {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid #4a5e71;
  border-radius: 14px;
  width: min(640px, calc(100% - 24px));
  max-height: 90dvh;
  overflow: auto;
  padding: 26px;
  box-shadow: 0 20px 90px #0008;
}
dialog::backdrop {
  background: #040a13bd;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.dialog-head h2 {
  font-size: 24px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 16px;
}
.date-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.date-fields input {
  min-width: 0;
  width: 100%;
  font-size: 12px;
}
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 10px;
}
.presets button {
  font-size: 12px;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}
#range-error {
  color: var(--warn);
  font-size: 12px;
  margin-top: 12px;
}
.prose {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.prose p {
  margin: 0 0 15px;
}
.prose strong {
  color: var(--ink);
}
.prose code {
  font-size: 11px;
  color: var(--accent);
}
.loading {
  padding: 60px 0;
  color: var(--muted);
}
.error {
  border: 1px solid #70513e;
  padding: 24px;
  border-radius: 10px;
  color: var(--warn);
}
@media (min-width: 1700px) {
  .context-card {
    padding: 20px 24px;
  }
  .chart-wrap {
    height: 300px;
  }
  .energy-row {
    min-height: 35px;
  }
  .topbar {
    padding-left: max(28px, calc((100vw - 1724px) / 2));
    padding-right: max(28px, calc((100vw - 1724px) / 2));
  }
}
@media (max-width: 1200px) {
  .topbar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 13px 20px;
  }
  .clock-block {
    flex: 1;
  }
  .top-actions {
    margin-left: auto;
  }
  .supply-open-group {
    order: 4;
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }
  .supply-open-group #sc-open,
  .supply-open-group #hp-open {
    flex: 1;
  }
  .clock-block {
    min-width: 0;
    flex: 1 1 100%;
  }
  .transport {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }
  .transport #pace {
    width: auto;
    margin: 0 0 0 10px;
  }
  .top-actions #range-open {
    min-width: 170px;
  }
  .context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .snapshot-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  }
  .ledger-head,
  .energy-row,
  .ledger-foot {
    gap: 15px;
  }
  main {
    padding: 17px 20px 124px;
  }
}
#hour-log {
  height: calc(20 * 1.55 * 11px + 28px);
}
@media (max-width: 850px) {
  .snapshot-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .hour-card {
    min-width: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 7px;
  }
  .hour-card #hour-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
  }
  .hour-metric {
    gap: 18px;
  }
  .hour-window {
    font-size: 18px;
  }
  .chart-caption {
    flex-direction: column;
    gap: 4px;
  }
  .section-line {
    gap: 4px;
  }
  .views button {
    padding: 8px 11px;
  }
  .context-grid {
    gap: 10px;
  }
  .clock-block {
    min-width: 280px;
  }
  .top-actions #scientist {
    min-height: 44px;
  }
  .top-actions #range-open {
    min-height: 44px;
  }
  .button-caption {
    display: none;
  }
  #range-label {
    font-size: 11px;
  }
  .top-actions {
    flex-wrap: wrap;
  }
  .topbar {
    align-items: flex-start;
  }
  .quality-details #quality-details {
    columns: 1;
  }
}
@media (max-width: 580px) {
  .topbar {
    padding: 12px;
    gap: 10px;
  }
  .clock-block {
    width: 100%;
    flex: initial;
  }
  .clock-line {
    gap: 10px;
  }
  #date,
  #clock {
    font-size: 25px;
  }
  .top-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    max-width: 168px;
    justify-content: flex-end;
  }
  .top-actions #range-open {
    min-width: 0;
    width: 44px;
    padding: 4px;
    font-size: 0;
  }
  .top-actions #range-open:after {
    content: "Date";
    font-size: 11px;
  }
  .top-actions #range-label {
    display: none;
  }
  .top-actions #scientist {
    padding: 5px;
    width: 44px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 0.12em;
  }
  .clock-block > .eyebrow {
    max-width: 260px;
    font-size: 8px;
  }
  .clock-line .badge {
    font-size: 9px;
  }
  .transport {
    gap: 5px;
  }
  .transport button {
    min-height: 38px;
  }
  main {
    padding: 13px 12px 117px;
  }
  .section-line {
    margin-bottom: 10px;
  }
  .views {
    gap: 0;
  }
  .views button {
    padding: 8px 10px;
    min-height: 44px;
    font-size: 11px;
  }
  .recording {
    display: none;
  }
  .snapshot-panel,
  .chart-panel {
    padding: 16px 12px;
  }
  .section-head {
    gap: 8px;
    margin-bottom: 15px;
  }
  h1 {
    font-size: 17px;
  }
  .section-head .badge {
    font-size: 9px;
  }
  .ledger-head,
  .energy-row,
  .ledger-foot {
    grid-template-columns: 1.05fr 0.8fr 0.8fr;
    gap: 7px;
  }
  .ledger-head {
    font-size: 9px;
  }
  .energy-row {
    min-height: 33px;
  }
  .energy-label {
    font-size: 10px;
    gap: 6px;
  }
  .bar-cell {
    gap: 6px;
  }
  .bar-value {
    font-size: 11px;
    min-width: 45px;
  }
  .bar-track {
    height: 3px;
  }
  .ledger-foot {
    font-size: 10px;
  }
  .hour-card {
    padding: 12px;
  }
  .hour-card #hour-values {
    gap: 4px 18px;
  }
  .hour-metric {
    font-size: 11px;
  }
  .context-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 8px 0 14px;
  }
  .context-card {
    padding: 12px;
  }
  .context-head {
    flex-wrap: wrap;
    gap: 3px;
    margin-bottom: 9px;
  }
  .context-head h2 {
    font-size: 12px;
  }
  .context-head .micro {
    font-size: 9px;
  }
  .money-line {
    flex-direction: column;
    gap: 6px;
  }
  .money-line > div:last-child {
    text-align: left;
  }
  .money-line strong {
    font-size: 24px;
  }
  .money-line > div:last-child strong {
    font-size: 18px;
  }
  .battery-line {
    gap: 6px;
    flex-wrap: wrap;
  }
  .battery-line strong {
    font-size: 24px;
  }
  .battery-track {
    min-width: 55px;
  }
  .weather-line {
    flex-wrap: wrap;
    gap: 6px;
  }
  .weather-line strong {
    font-size: 24px;
  }
  .context-card p {
    font-size: 10px;
  }
  .chart-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .chart-controls {
    width: 100%;
    justify-content: space-between;
  }
  .chart-wrap {
    height: 240px;
  }
  .legend {
    gap: 0;
  }
  .legend button {
    font-size: 10px;
    min-height: 40px;
  }
  .chart-caption {
    font-size: 9px;
  }
  .focus-summary {
    gap: 10px 18px;
  }
  .focus-stat {
    font-size: 10px;
  }
  .focus-stat strong {
    font-size: 13px;
  }
  .scrub-dock {
    padding: 9px 12px 7px;
  }
  .scrub-labels {
    font-size: 9px;
  }
  .scrub-labels output {
    font-size: 10px;
  }
  .scrub-bottom {
    font-size: 8px;
  }
  .page-footer {
    flex-direction: column;
    gap: 6px;
  }
  .date-fields {
    grid-template-columns: 1fr;
  }
  .inspector {
    padding: 18px;
  }
  dialog {
    padding: 20px;
  }
  .chart-tooltip {
    font-size: 10px;
    max-width: 230px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.split-col {
  border-left: 1px solid var(--line);
  padding-left: 8px;
}
.head-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.context-card[data-detail] {
  cursor: pointer;
}
.context-card[data-detail]:hover,
.context-card[data-detail]:focus-visible {
  border-color: #4a6578;
  outline: none;
}
.open-hint {
  color: var(--accent);
}
.export-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.export-block h3 {
  font-size: 13px;
  font-weight: 600;
}
.export-block .money-line strong {
  font-size: 18px;
}
dialog.wide {
  width: min(960px, calc(100% - 24px));
}
#detail-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 14px;
}
.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.detail-stat {
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1722;
}
.detail-stat strong {
  display: block;
  font-size: 16px;
}
.detail-stat span,
.day-jump span {
  color: var(--muted);
  font-size: 11px;
}
.day-jump {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
  flex: 1;
  min-width: 220px;
}
.detail-chart {
  margin: 12px 0;
}
.detail-chart-head,
.detail-legend {
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-chart-head {
  justify-content: space-between;
}
.detail-chart h3 {
  font-size: 14px;
  font-weight: 600;
}
.detail-legend {
  color: var(--muted);
  font-size: 11px;
  margin: 4px 0 6px;
}
.detail-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.detail-plot {
  height: 168px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1722;
}
.detail-plot canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: ew-resize;
}
.detail-scrub {
  margin-top: 8px;
}
@media (max-width: 580px) {
  .split-col {
    padding-left: 4px;
  }
  dialog.wide {
    width: calc(100% - 16px);
    padding: 16px;
  }
  .detail-plot {
    height: 140px;
  }
}

.supply-panel {
  margin: 28px 0 8px;
  padding: 20px 22px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.supply-page .supply-panel {
  margin: 18px 0 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}
.supply-page .section-head h1 {
  margin: 0;
  font-size: 1.5rem;
}
.supply-page .sc-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.supply-page .page-footer {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 0 26px;
}
.supply-intro {
  margin: 6px 0 16px;
  max-width: 68ch;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.sc-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.sc-controls label,
.sc-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}
.sc-controls label[hidden] {
  display: none;
}
.sc-controls select,
.sc-fields input {
  min-width: 11rem;
  padding: 8px 10px;
  font: inherit;
  color: var(--fg);
  background: var(--panel-hi);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.sc-controls select:focus-visible,
.sc-fields input:focus-visible {
  outline: 2px solid var(--solar);
  outline-offset: 1px;
}
.sc-assumptions {
  margin-bottom: 16px;
  padding: 10px 12px;
  background: var(--panel-hi);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.sc-assumptions > summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--muted);
}
#sc-battery-readout {
  margin-left: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sc-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.sc-unit {
  font-size: 0.72rem;
  color: var(--muted);
}
.sc-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.sc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}
.sc-hint {
  color: var(--muted);
}
.sc-note {
  margin: 0 0 14px;
  min-height: 1.2em;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
}
.sc-note.sc-error {
  color: var(--import);
}
.sc-note .sc-warn {
  color: var(--solar);
}
.sc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.sc-month-summary {
  margin: 4px 0 22px;
  padding: 16px 18px 4px;
  background: var(--panel-hi);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sc-summary-lede {
  margin: 0 0 12px;
  max-width: 68ch;
  font-size: 0.88rem;
  color: var(--muted);
}
.sc-summary-lede strong {
  color: var(--ink);
}
.sc-provisional {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 9px;
  background: rgba(245, 198, 90, 0.12);
  border: 1px solid rgba(245, 198, 90, 0.45);
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f5c65a;
}
.sc-summary-foot {
  margin: 4px 0 14px;
  font-size: 0.86rem;
  color: var(--muted);
}
.sc-summary-foot strong {
  color: var(--home);
}
.sc-card.sel {
  border-color: #516a81;
  box-shadow: inset 0 0 0 1px #516a81;
}
.sc-busy {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: rgba(114, 217, 160, 0.08);
  border: 1px solid rgba(114, 217, 160, 0.3);
  border-radius: 9px;
  font-size: 0.86rem;
  color: var(--home);
}
[aria-busy="true"] {
  cursor: progress;
}
.sc-busy-text {
  display: block;
}
.sc-busy-bar {
  display: block;
  position: relative;
  margin-top: 7px;
  height: 6px;
  overflow: hidden;
  background: rgba(114, 217, 160, 0.15);
  border-radius: 3px;
}
.sc-busy-bar-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--home);
  border-radius: 3px;
  transition: width 0.2s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .sc-busy-bar-fill {
    transition: none;
  }
}
.sc-detail-link {
  margin: 22px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.sc-detail-link a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  background: var(--panel-hi);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
}
.sc-detail-link a:hover,
.sc-detail-link a:focus-visible {
  background: #213347;
  border-color: #516a81;
}
.sc-card {
  padding: 10px 12px;
  background: var(--panel-hi);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.sc-card span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}
.sc-card b {
  display: block;
  margin: 2px 0;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.sc-card i {
  font-size: 0.72rem;
  font-style: normal;
  color: var(--muted);
}
.sc-export-note {
  display: block;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dotted var(--line);
  font-size: 0.7rem;
  font-style: normal;
  color: var(--muted);
}
.sc-card.good b {
  color: var(--discharge);
}
.sc-card.warn b {
  color: var(--solar);
}
.sc-chart {
  margin-bottom: 12px;
}
.sc-chart canvas {
  width: 100%;
  height: 300px;
  display: block;
}
.sc-readout {
  min-height: 4.5rem;
  margin-bottom: 18px;
  padding: 10px 12px;
  background: var(--panel-hi);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.8rem;
}
.supply-page .legend button {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-hi);
  min-height: 36px;
  cursor: pointer;
}
.supply-page .legend button:hover,
.supply-page .legend button:focus-visible {
  border-color: #516a81;
  color: var(--ink);
}
.supply-page .legend button[aria-pressed="false"] {
  opacity: 0.4;
  background: transparent;
}
.supply-page .legend .dot {
  width: 16px;
  min-width: 16px;
  height: 0;
  border-top: 3px solid var(--metric);
}
.supply-page .legend .dot.dash-hp {
  border-top-style: dashed;
}
.supply-page .legend .dot.dash-ev {
  border-top-style: dotted;
}
.supply-page .legend .dot.dash-gridImport {
  border-top-style: dashed;
  border-top-width: 2px;
}
.supply-page .legend .dot.dash-gridExport {
  border-top-style: dotted;
  border-top-width: 2px;
}
.supply-page .legend .dot.dash-batteryCharge {
  border-top-style: dotted;
}
.supply-page .legend .dot.dash-batteryDischarge {
  border-top-style: double;
}
.sc-pending {
  padding: 18px 10px;
  color: var(--muted);
  font-size: 0.82rem;
}
.sc-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}
.sc-line span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.sc-line i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.sc-has-tip {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.sc-live-tip {
  position: fixed;
  z-index: 80;
  max-width: min(28rem, calc(100vw - 16px));
  padding: 8px 10px;
  background: var(--panel-hi, #15202b);
  color: var(--ink, #e2eef8);
  border: 1px solid var(--line, #2a3b4c);
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.45;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.sc-live-tip[hidden] {
  display: none;
}
.sc-line b {
  font-variant-numeric: tabular-nums;
}
.sc-hour-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.sc-hour-head span {
  font-size: 0.75rem;
  color: var(--muted);
}
.sc-table-wrap {
  overflow-x: auto;
  margin-bottom: 22px;
}
.sc-sticky-table-wrap {
  max-height: 70vh;
  overflow: auto;
}
.sc-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card);
}
.sc-table tfoot th {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: var(--card);
}
.sc-table td.sc-low-band {
  background: rgba(114, 217, 160, 0.2);
}
.sc-table td.sc-other-band {
  background: rgba(225, 91, 100, 0.18);
}
.sc-modelled {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 400;
  white-space: normal;
}
.sc-modelled-row th:first-child {
  min-width: 190px;
}
.sc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}
.sc-table th,
.sc-table td {
  padding: 5px 8px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.sc-table thead th,
.sc-table tfoot th {
  color: var(--muted);
  font-weight: 600;
  text-align: right;
}
.sc-table th:first-child,
.sc-table td:first-child {
  text-align: left;
}
.sc-table tr.cheap td {
  background: rgba(114, 217, 160, 0.07);
}
.sc-table tr.best td {
  background: rgba(94, 187, 175, 0.12);
}
.sc-table tr.gated td {
  color: var(--muted);
}
.sc-table td.note {
  font-style: italic;
  text-align: left;
}
.supply-panel h2 {
  margin: 26px 0 10px;
  font-size: 1rem;
}
@media (max-width: 850px) {
  .supply-panel {
    padding: 16px 14px 18px;
  }
  .sc-chart canvas {
    height: 240px;
  }
  .sc-controls select,
  .sc-fields input {
    min-width: 0;
    width: 100%;
  }
  .sc-controls label,
  .sc-fields label {
    flex: 1 1 100%;
  }
}

.sc-chart-wrap {
  position: relative;
  width: 100%;
}
.sc-chart-wrap canvas {
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.sc-chart-cursor {
  position: absolute;
  top: 14px;
  bottom: 30px;
  border-left: 1px solid var(--accent);
  pointer-events: none;
}
.sc-chart-cursor[hidden] {
  display: none;
}
.sc-hover-hint {
  margin: -4px 0 6px;
  font-size: 0.72rem;
  color: var(--muted);
}
.sc-readout:empty {
  display: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  border: 0;
}

.sc-origin {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.66rem;
  font-style: normal;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.sc-origin:empty {
  display: none;
}
.sc-origin[data-origin="measured"] {
  border-color: rgba(114, 217, 160, 0.45);
  color: var(--home);
}
.sc-origin[data-origin="yours"] {
  border-color: rgba(245, 198, 90, 0.55);
  background: rgba(245, 198, 90, 0.1);
  color: #f5c65a;
}
.sc-origin[data-origin="assumed"] {
  border-color: rgba(163, 179, 196, 0.35);
}
.sc-origin[data-origin="set"],
.sc-origin[data-origin="installed"] {
  border-style: dashed;
}
.sc-assumptions-lede {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}
.sc-assumptions-lede[data-state="yours"] {
  color: #f5c65a;
}
#sc-reset[disabled] {
  opacity: 0.5;
  cursor: default;
}

.sc-card.sc-tariff {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  white-space: normal;
}
.sc-card.sc-tariff:hover,
.sc-card.sc-tariff:focus-visible {
  border-color: #516a81;
  background: #213347;
}
.sc-card.sc-tariff.sel {
  cursor: default;
}
.sc-rates {
  display: block;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dotted var(--line);
  font-size: 0.7rem;
  line-height: 1.45;
  font-style: normal;
  color: var(--muted);
}
.sc-rate-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-style: normal;
}
.sc-rate-list li {
  position: relative;
  margin-top: 3px;
  padding-left: 10px;
}
.sc-rate-list li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.46em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.7;
}
.sc-rate-list li.cheap::before { background: var(--home); opacity: 1; }
.sc-rate-list li.cheap b.sc-band { color: var(--home); }
.sc-rate-list li.high::before { background: #e0a15a; opacity: 1; }
.sc-rate-list li.high b.sc-band { color: #e0a15a; }
.sc-rate-list li.mid::before { background: #f5c65a; opacity: 1; }
.sc-rate-list li.mid b.sc-band { color: #f5c65a; }
.sc-rate-list b.sc-band {
  display: inline-block;
  min-width: 3.2em;
  margin-right: 4px;
  background: none;
  font-size: 0.78em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sc-busy-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(114, 217, 160, 0.55), transparent);
  animation: sc-busy-slide 1.1s linear infinite;
}
@keyframes sc-busy-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .sc-busy-bar::after { animation: none; }
}
.sc-rate-list b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sc-rate-list span {
  color: var(--muted);
}
.sc-rate-foot {
  display: block;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dotted var(--line);
  font-size: 0.66rem;
  line-height: 1.4;
  font-style: normal;
  color: var(--muted);
  opacity: 0.85;
}
.sc-cardrow {
  margin: 0 0 7px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.sc-card.sc-tariff.cur > span {
  color: var(--home);
}
.sc-tariff-hint {
  display: block;
  margin-top: 5px;
  font-size: 0.68rem;
  font-style: normal;
  color: var(--accent);
}
.sc-card.sc-tariff.sel .sc-tariff-hint {
  color: var(--muted);
}
.sc-card.pending b {
  color: var(--muted);
}

.sc-table td.money,
.sc-table th.money {
  text-align: right;
}
.sc-table-note {
  margin: -12px 0 22px;
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--muted);
}
.sc-table-note:empty {
  display: none;
}
#sc-daily-table tbody tr[data-date] {
  cursor: pointer;
}
#sc-daily-table tbody tr[data-date]:hover {
  outline: 1px solid var(--solar);
  outline-offset: -1px;
}
#sc-day-compare .sc-best-pairing {
  background: rgba(27, 109, 78, 0.22);
}
#sc-optimize-day:disabled {
  opacity: 0.65;
  cursor: progress;
}
.sc-observatory {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-hi);
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.sc-observatory:hover,
.sc-observatory:focus-visible {
  border-color: #516a81;
  background: #213347;
}
@media (max-width: 560px) {
  .sc-observatory {
    font-size: 0.72rem;
    padding: 5px 8px;
  }
}

.sc-tolerance {
  color: var(--muted);
  font-style: normal;
  opacity: 0.85;
}

.sc-viewbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.sc-viewtabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.sc-viewtab {
  padding: 6px 13px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  min-height: 34px;
}
.sc-viewtab + .sc-viewtab {
  border-left: 1px solid var(--line);
}
.sc-viewtab.is-on {
  background: var(--panel-hi);
  color: var(--ink);
  font-weight: 600;
}
.sc-viewtab,
.sc-back-month {
  white-space: normal;
}
.sc-back-month {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-hi);
  color: var(--ink);
  font-size: 0.78rem;
  cursor: pointer;
  min-height: 34px;
}
.sc-view-where {
  font-size: 0.72rem;
  color: var(--muted);
}
.sc-month-view-note {
  margin: 0 0 14px;
  padding: 10px 13px;
  background: var(--panel-hi);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}
.sc-month-view-note strong {
  color: var(--ink);
}
.sc-month-view-note b {
  color: var(--ink);
}
.sc-month-view-note .sc-muted {
  color: var(--muted);
  opacity: 0.85;
}

.sc-zoombar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.sc-export-rates {
  display: block;
  margin-top: 0.3rem;
  font-style: normal;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--muted, #555);
}

.hp-page #hp-date {
  font-size: clamp(19px, 1.75vw, 30px);
  font-weight: 550;
  letter-spacing: -0.045em;
  color: var(--accent);
}
.hp-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}
.hp-nav .sc-link { min-width: 150px; }
.hp-main { max-width: 1780px; margin: auto; padding: 20px 28px 126px; }
.hp-overview, .hp-timeline { margin-bottom: 18px; }
.hp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, 0.9fr);
  gap: 20px;
  align-items: stretch;
}
.hp-metrics { display: grid; gap: 10px; align-content: start; }
.hp-metric {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-hi);
}
.hp-metric .dot { background: var(--hp-color); }
.hp-metric strong { display: block; margin-top: 2px; font-size: 20px; }
.hp-log-card { min-height: 100%; }
.hp-cli { overflow: auto; max-height: 230px; }
.hp-log-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.hp-log-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.hp-log-row .delta-up { color: #72d9a0; }
.hp-log-row .delta-down { color: #f58e81; }
#hp-log-note { margin-top: 9px; }
.hp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -3px 0 13px; color: var(--muted); font-size: 12px; }
.hp-legend button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  padding: 6px 10px 6px 0;
  min-height: 32px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.hp-legend button[aria-pressed="true"] { color: var(--ink); }
.hp-legend button[aria-pressed="false"] { opacity: 0.45; }
.hp-legend .dot { width: 8px; height: 8px; background: var(--hp-color); }
.hp-chart-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 10, 16, .2);
}
.hp-chart { display: flex; align-items: stretch; gap: 8px; width: max-content; min-width: 100%; min-height: 280px; padding: 14px; }
.hp-day {
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  justify-items: center;
  gap: 7px;
  width: 88px;
  min-height: 250px;
  padding: 0 5px 5px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  cursor: pointer;
}
.hp-day.is-selected {
  background: rgba(183, 230, 214, 0.08);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.hp-day-weather {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.hp-empty-series {
  align-self: center;
  font-size: 10px;
  color: var(--quiet);
}
.hp-conditions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  min-height: 68px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-hi);
}
.hp-conditions strong { display: block; margin-top: 2px; font-size: 20px; }
.hp-weather-icon { font-size: 28px; line-height: 1; }
.hp-bars { display: flex; align-items: end; justify-content: center; gap: 7px; width: 100%; min-height: 160px; border-bottom: 1px solid #526173; background: repeating-linear-gradient(to top, transparent 0, transparent 39px, rgba(163,179,196,.09) 40px); }
.hp-bar-slot { display: flex; align-items: end; height: 100%; width: 16px; }
.hp-bar { display: block; width: 100%; min-height: 0; height: var(--hp-height); background: var(--hp-color); border-radius: 4px 4px 0 0; }
.hp-day > strong { font-size: 12px; }
.hp-day > .micro { max-width: 100%; font-size: 10px; }
.hp-timeline .chart-caption { margin-top: 9px; }
#hp-changelog-content { max-height: 65dvh; overflow: auto; line-height: 1.7; }
@media (max-width: 760px) {
  .hp-main { padding: 16px 14px 118px; }
  .hp-layout { grid-template-columns: minmax(0, 1fr); }
  .hp-nav { width: 100%; justify-content: flex-start; }
  .hp-nav .sc-link { flex: 1 1 145px; }
}

.cmp-hub-title {
  margin: 4px 0 18px;
  font-size: 1.15rem;
}
.cmp-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.cmp-choice {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-hi);
  color: var(--ink);
  text-decoration: none;
}
.cmp-choice b {
  font-size: 1.05rem;
}
.cmp-choice span:last-child {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}
.cmp-choice:hover,
.cmp-choice:focus-visible {
  border-color: var(--solar);
}
.cmp-controls {
  align-items: flex-end;
}
.cmp-controls input[type="date"],
.cmp-settings select,
.cmp-settings input[type="number"] {
  padding: 7px 10px;
  font: inherit;
  color: var(--ink);
  color-scheme: dark;
  background: var(--panel-hi);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.cmp-controls input[type="date"] {
  min-width: 10rem;
}
.cmp-controls button {
  padding: 8px 12px;
}
.cmp-controls button:disabled {
  opacity: 0.6;
  cursor: progress;
}
.cmp-settings {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--panel-hi);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.cmp-settings > summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
}
.cmp-settings-title {
  color: var(--ink);
  font-weight: 600;
}
.cmp-badge {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid var(--line);
}
.cmp-badge[data-mode="yours"] {
  border-color: var(--warn);
  color: var(--warn);
}
.cmp-settings-readout {
  margin-left: 6px;
  font-size: 0.75rem;
}
.cmp-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.cmp-settings-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}
.cmp-input {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cmp-input input {
  width: 7rem;
}
.cmp-unit {
  font-size: 0.72rem;
}
.cmp-origin {
  font-size: 0.7rem;
  font-style: normal;
  color: var(--quiet);
}
.cmp-origin[data-origin="yours"] {
  color: var(--warn);
}
.cmp-settings-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}
.cmp-status {
  margin: 0 0 16px;
  max-width: 110ch;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}
.cmp-status:empty {
  display: none;
}
.cmp-status[data-kind="error"] {
  color: var(--import);
}
.cmp-status[data-kind="busy"]::before {
  content: "◌ ";
}
.cmp-page h3 {
  margin: 22px 0 10px;
  font-size: 1rem;
}
.cmp-ranking th small,
.cmp-recorded-row small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--muted);
  white-space: normal;
}
.cmp-ranking tbody tr[data-tariff] {
  cursor: pointer;
}
.cmp-ranking tbody tr[data-tariff]:hover,
.cmp-days-table tbody tr[data-date]:hover {
  outline: 1px solid var(--solar);
  outline-offset: -1px;
}
.cmp-days-table tbody tr[data-date] {
  cursor: pointer;
}
.cmp-best {
  background: rgba(27, 109, 78, 0.22);
}
.cmp-selected th:first-child {
  box-shadow: inset 3px 0 0 var(--solar);
}
.cmp-recorded-row th,
.cmp-recorded-row td {
  border-bottom: 2px solid var(--line);
}
.cmp-unavailable td,
.cmp-unavailable th {
  color: var(--quiet);
}
.cmp-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--muted);
}
.cmp-tag.good {
  border-color: #2f8f68;
  color: var(--accent);
}
.cmp-chart .chart-wrap {
  position: relative;
}
.cmp-moved {
  padding: 40px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cmp-th-sub {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--quiet);
}
.cmp-pickable {
  cursor: pointer;
}
.cmp-recorded-row.cmp-pickable:hover {
  outline: 1px solid var(--solar);
  outline-offset: -1px;
}
.cmp-page .sc-table thead th,
.cmp-day-dialog .sc-table thead th,
.cmp-page .sc-table tfoot th,
.cmp-day-dialog .sc-table tfoot th {
  background: var(--panel-hi);
  color: var(--ink);
}
.cmp-page .sc-table thead th,
.cmp-day-dialog .sc-table thead th {
  box-shadow: inset 0 -1px 0 var(--line);
  vertical-align: bottom;
}
.cmp-page .sc-table tfoot th,
.cmp-day-dialog .sc-table tfoot th {
  box-shadow: inset 0 1px 0 var(--line);
}
.cmp-halfhour-table th[data-col] {
  padding-right: 18px;
}
.cmp-col-hide {
  position: absolute;
  top: 3px;
  right: 2px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--quiet);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
}
.cmp-col-hide:hover,
.cmp-col-hide:focus-visible {
  opacity: 1;
  color: var(--ink);
}
.cmp-col-chooser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}
.cmp-col-chooser[hidden] {
  display: none;
}
.cmp-col-chooser button {
  padding: 3px 9px;
  font-size: 0.75rem;
}
.cmp-chart-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.cmp-chart-style {
  display: inline-flex;
  gap: 4px;
}
.cmp-chart-style button {
  padding: 4px 10px;
  font-size: 0.75rem;
}
.cmp-chart-style button[aria-pressed="true"] {
  border-color: var(--solar);
  color: var(--ink);
}
.cmp-run-state {
  align-self: center;
  font-size: 0.78rem;
  color: var(--muted);
}
.cmp-run-state[data-state="done"] {
  color: var(--accent);
}
.cmp-run-state[data-state="stale"] {
  color: var(--warn);
}
#cmp-run:disabled {
  cursor: default;
  opacity: 0.8;
}
dialog.cmp-day-dialog {
  width: min(1380px, calc(100% - 24px));
  max-height: 94dvh;
  padding: 20px 24px;
}
.cmp-day-dialog .dialog-head {
  margin-bottom: 6px;
}
.cmp-dd-nav {
  display: flex;
  gap: 6px;
}
.cmp-dd-nav button {
  min-width: 36px;
  padding: 6px 10px;
}
.cmp-day-dialog .chart-wrap {
  position: relative;
}
.cmp-dd-table {
  max-height: 46dvh;
}
.cmp-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.cmp-billing-note {
  caption-side: bottom;
  text-align: left;
  white-space: normal;
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.cmp-progress {
  --progress: 0%;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 44px 0 16px;
  background: #10261d;
  border-bottom: 2px solid #2f8f5f;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e9fff4;
}
.cmp-progress[hidden] {
  display: none;
}
.cmp-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress);
  background: linear-gradient(90deg, #1f7a4d, #34b36f);
  transition: width 0.35s ease;
}
.cmp-progress:not([data-known]) .cmp-progress-fill {
  width: 100%;
  background: repeating-linear-gradient(-45deg, #1f7a4d 0 14px, #2a9a62 14px 28px);
  background-size: 40px 40px;
  animation: cmp-progress-stripes 0.8s linear infinite;
}
@keyframes cmp-progress-stripes {
  to { background-position: 40px 0; }
}
.cmp-progress-text {
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.cmp-progress-close {
  position: absolute;
  right: 8px;
  top: 4px;
  padding: 2px 9px;
  background: transparent;
  border-color: transparent;
  color: inherit;
}
.cmp-progress[data-state="busy"] .cmp-progress-close {
  display: none;
}
.cmp-progress[data-state="error"] {
  background: #3a1416;
  border-bottom-color: #e0565b;
}
.cmp-progress[data-state="error"] .cmp-progress-fill {
  background: linear-gradient(90deg, #8f2a2f, #c43c42);
}
@media (prefers-reduced-motion: reduce) {
  .cmp-progress:not([data-known]) .cmp-progress-fill { animation: none; }
}
.cmp-chart-stats {
  margin-top: 10px;
}
.cmp-chart-stats:empty {
  display: none;
}
.focus-ghost {
  display: block;
  font-size: 10px;
  color: var(--quiet);
}
.chart-style-toggle {
  display: inline-flex;
  gap: 4px;
}
.chart-style-toggle button {
  padding: 4px 10px;
  font-size: 0.75rem;
}
.chart-style-toggle button[aria-pressed="true"] {
  border-color: var(--solar);
  color: var(--ink);
}

.sw-tariffs {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px 8px;
  margin: 0;
}
.sw-tariffs legend {
  font-size: 11px;
  color: var(--muted);
  padding: 0 4px;
}
.sw-tariffs .cmp-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.cmp-explain {
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 80ch;
}
.cmp-explain summary {
  cursor: pointer;
  color: var(--ink);
}
.sw-runs {
  flex-basis: 100%;
  font-size: 0.9rem;
}
.sw-plan td.sw-win {
  font-weight: 700;
  color: var(--ink);
}
.sw-heat td.sw-cell {
  background: color-mix(in srgb, var(--sw) 28%, transparent);
  color: var(--ink);
  text-align: center;
  font-size: 0.72rem;
  white-space: nowrap;
}
.sw-heat td.sw-yours {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
  font-weight: 700;
}
.sw-tariffs .cmp-check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--ink);
}
