:root {
  color-scheme: light;
  --navy: #122535;
  --muted: #526372;
  --line: #d9e2e6;
  --paper: #f2f6f6;
  --green: #11695e;
  --solar: #e9ae3b;
  --battery: #279887;
  --diesel: #657790;
  --charge: #9bd9cc;
  font: 16px/1.55 "Instrument Sans", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--navy); }
a { color: var(--green); text-underline-offset: .24em; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #127e71; outline-offset: 4px; }
.wrap { width: min(1160px, calc(100% - 64px)); margin: auto; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 65px; gap: 16px; }
.brand { color: var(--navy); font-weight: 750; text-decoration: none; }
nav { display: flex; gap: clamp(12px, 3vw, 30px); }
nav a { color: var(--muted); font-size: .87rem; text-decoration: none; }
nav a:hover { text-decoration: underline; }
.intro { padding: 54px 0 35px; display: grid; grid-template-columns: 1.4fr 1fr; align-items: end; gap: 30px; }
.label { margin: 0 0 7px; color: var(--green); font-size: .69rem; font-weight: 800; letter-spacing: .14em; }
h1, h2, h3 { line-height: 1.05; margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2rem); }
h3 { font-size: 1.65rem; }
.lede { color: var(--muted); max-width: 42ch; margin: 16px 0 0; font-size: 1.06rem; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #a9bdbf; padding: 12px 0 0; gap: 16px; }
.summary span { display: block; font-size: .78rem; color: var(--muted); }
.summary strong { font-size: clamp(1.3rem, 3.3vw, 2.35rem); letter-spacing: -.055em; white-space: nowrap; }
.summary small { font-size: .8rem; letter-spacing: normal; font-weight: 600; }
.panel { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: clamp(16px, 3vw, 30px); }
.panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 22px; }
.download { font-weight: 700; font-size: .84rem; white-space: nowrap; text-decoration: none; }
.download:hover { text-decoration: underline; }
.chart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 22px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 13px; color: var(--muted); font-size: .76rem; }
.legend i { display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 2px; }
.solar { background: var(--solar); } .battery { background: var(--battery); } .diesel { background: var(--diesel); }
.charge { background: var(--charge); } .load { background: var(--navy); }
canvas { display: block; width: 100%; height: 315px; }
.slider { display: flex; align-items: center; gap: 12px; font-size: .81rem; font-weight: 700; }
.slider input { flex: 1; min-width: 0; accent-color: var(--green); }
.chart-note { font-size: .78rem; color: var(--muted); margin: 7px 0 0; }
.inspector { background: #edf5f2; border-radius: 10px; padding: 18px; }
dl { margin: 13px 0; font-size: .84rem; }
dl div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #d4e3df; padding: 6px 0; }
dd { margin: 0; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
button { background: #fff; color: var(--green); border: 1px solid #afcbc4; border-radius: 6px; padding: 6px 10px; font-size: .77rem; font-weight: 700; cursor: pointer; }
button:hover { border-color: var(--green); }
#status:empty { display: none; }
.details { margin-top: 18px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.source { margin-top: 18px; }
.source p { color: var(--muted); }
.source pre { margin-bottom: 0; padding: 18px; overflow: auto; border-radius: 9px; color: #edf5f2; background: var(--navy); font: .85rem/1.6 Consolas, monospace; }
ol, ul { padding-left: 1.25em; margin-bottom: 0; color: var(--muted); }
li + li { margin-top: 8px; }
b { color: var(--navy); }
.checks { list-style: none; padding-left: 0; }
.checks li::before { content: "✓"; color: var(--green); margin-right: 9px; font-weight: 800; }
footer { font-size: .84rem; color: var(--muted); padding: 16px 0 26px; }
footer p { margin: 8px 0; }
@media (max-width: 820px) {
  .intro { grid-template-columns: 1fr; padding-top: 35px; gap: 20px; }
  .chart-layout { grid-template-columns: minmax(0, 1fr); }
  .inspector dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 26px); }
  .top-inner { flex-wrap: wrap; padding: 9px 0; gap: 3px 18px; }
  .details { grid-template-columns: 1fr; }
  .inspector dl { grid-template-columns: 1fr; }
  .panel-heading { align-items: start; }
}
