/* SolarFlow Dashboard ------------------------------------------------------
   Energy hues are fixed per entity and validated for colour-vision deficiency:
   solar, battery, grid, home – light and dark have their own steps.          */

:root {
  --bg: #edf1f5;
  --panel: #f8fafc;
  --line: #dce3ea;
  --line-strong: #c3ced9;
  --ink: #172338;
  --ink-2: #4a5a70;
  --ink-3: #6f7e93;
  --solar: #d9920f;
  --battery: #2a9d74;
  --grid: #3f74d6;
  --home: #a2509a;
  --bad: #c43d3d;
  --ok: #2a9d74;
  --focus: #3f74d6;
  --sys1: #c7731c;
  --sys2: #7a62cf;
  --sys3: #24918f;
  --sys4: #b8487c;
  --wallbox: #5e7d1f;
  --radius-l: 22px;
  --radius-m: 14px;
  --font: "Barlow", "Bahnschrift", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
  --font-narrow: "Barlow Semi Condensed", "Barlow", "Bahnschrift", "DIN Condensed", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1322;
    --panel: #111c2e;
    --line: #22324a;
    --line-strong: #31445f;
    --ink: #e6edf6;
    --ink-2: #a9b7ca;
    --ink-3: #8193ab;
    --solar: #cc8019;
    --battery: #2ba078;
    --grid: #5c88ee;
    --home: #cf6ba4;
    --bad: #f07272;
    --ok: #3cbf8f;
    --focus: #8fb0f5;
    --sys1: #e08f3a;
    --sys2: #9a86ea;
    --sys3: #3bb3ad;
    --sys4: #dc6aa0;
    --wallbox: #9cbf4a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1322;
  --panel: #111c2e;
  --line: #22324a;
  --line-strong: #31445f;
  --ink: #e6edf6;
  --ink-2: #a9b7ca;
  --ink-3: #8193ab;
  --solar: #cc8019;
  --battery: #2ba078;
  --grid: #5c88ee;
  --home: #cf6ba4;
  --bad: #f07272;
  --ok: #3cbf8f;
  --focus: #8fb0f5;
  --sys1: #e08f3a;
  --sys2: #9a86ea;
  --sys3: #3bb3ad;
  --sys4: #dc6aa0;
  --wallbox: #9cbf4a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.45 var(--font);
  font-feature-settings: "lnum" 1;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.page { max-width: 1320px; margin: 0 auto; padding: 16px 20px 48px; }
@media (max-width: 640px) { .page { padding: 10px 12px 40px; } }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  --hero-ink: #10213a;
  --hero-ink-2: rgba(16, 33, 58, 0.72);
}
.hero-top {
  position: absolute; inset: 0 0 auto 0;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 18px 22px; z-index: 2; color: var(--hero-ink);
  pointer-events: none;
}
.hero-top > * { pointer-events: auto; }
.site-name { margin: 0; font: 600 26px/1.1 var(--font); letter-spacing: -0.01em; }
.site-sub { margin: 4px 0 0; font-size: 15px; color: var(--hero-ink-2); }
.hero-right { text-align: right; }
.clock { font: 500 26px/1.1 var(--font-narrow); font-variant-numeric: tabular-nums; }
.status {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 6px;
  padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: rgba(255, 255, 255, 0.55); color: #10213a;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0.85; }
@media (max-width: 640px) {
  .hero-top { padding: 12px 14px; }
  .site-name { font-size: 20px; }
  .site-sub { font-size: 13px; max-width: 30ch; }
  .clock { font-size: 20px; }
  .status { font-size: 13px; padding: 2px 8px 2px 7px; }
}
.status { white-space: nowrap; }
.status[data-kind="live"] .dot { animation: pulse 2s ease-in-out infinite; }
.status[data-kind="error"] { color: #8e1f1f; }
@keyframes pulse { 50% { opacity: 0.25; } }

.flow { display: block; width: 100%; height: auto; }
.flow text { font-family: var(--font); fill: var(--ink); }
.flow .v { font-family: var(--font-narrow); font-weight: 600; font-size: 40px; }
.flow .l { font-size: 20px; fill: var(--ink-2); }
.flow .s { font-size: 17px; fill: var(--ink-3); }
.flow .sky-text { fill: var(--hero-ink); }
.flow .sky-text-2 { fill: var(--hero-ink-2); }
.flow .track { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-linecap: round; }
.flow .stream {
  fill: none; stroke-linecap: round; stroke-dasharray: 0.1 22;
  animation: stream var(--dur, 2s) linear infinite;
}
.flow .stream.rev { animation-direction: reverse; }
.flow .stream.off { display: none; }
@keyframes stream { to { stroke-dashoffset: -22.1; } }
.flow .node { fill: var(--panel); stroke-width: 3; }
.flow .icon { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.flow .sun-glow { transition: opacity 1s; }
@media (prefers-reduced-motion: reduce) {
  .flow .stream { animation: none; stroke-dasharray: none; opacity: 0.55; }
  .status[data-kind="live"] .dot { animation: none; }
}

.banner {
  margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius-m);
  border: 1px solid var(--bad); color: var(--ink); background: var(--panel);
  display: flex; gap: 10px; align-items: flex-start; font-size: 15px;
}
.banner svg { flex: none; margin-top: 2px; color: var(--bad); }
.banner[hidden] { display: none; }

/* ------------------------------------------------------------ today row */
.today {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 26px 4px 22px;
}
.stat { padding: 2px 18px; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .label { font-size: 15px; color: var(--ink-2); }
.stat .value { font: 600 34px/1.15 var(--font-narrow); letter-spacing: -0.01em; white-space: nowrap; }
.stat .value small { font-size: 20px; font-weight: 500; color: var(--ink-2); margin-left: 3px; }
.stat .note { font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.meter { height: 6px; border-radius: 3px; background: var(--line); margin-top: 8px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 3px; background: var(--solar); width: 0; transition: width 0.6s; }
@media (max-width: 900px) {
  .today { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .stat, .stat:first-child { border-left: 0; padding: 0 0 0 12px; border-left: 3px solid var(--line); }
  .stat:last-child { grid-column: span 2; }
}

/* ---------------------------------------------------------------- grid */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.span-8 { grid-column: span 8; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-12 { grid-column: span 12; }
.span-3 { grid-column: span 3; }
@media (max-width: 1100px) {
  .span-8, .span-4, .span-6, .span-3 { grid-column: span 12; }
  /* tiles that sit side by side: two per row, an odd last one takes the full row */
  .grid .pair { grid-column: span 6; }
  .grid .pair.last-odd { grid-column: span 12; }
}
@media (max-width: 700px) { .grid .pair, .grid .pair.last-odd { grid-column: span 12; } }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 18px 20px 20px; min-width: 0;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel h2 { margin: 0; font: 600 20px/1.2 var(--font); letter-spacing: -0.005em; }
.panel .sub { color: var(--ink-3); font-size: 14px; }
.quiet { background: transparent; border-style: dashed; }

/* legends & controls */
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px; padding: 0; list-style: none; font-size: 14px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.key-line { width: 16px; height: 0; border-top: 2px solid var(--c); border-radius: 2px; }
.key-line.dash { border-top-style: dashed; }
.key-rect { width: 11px; height: 11px; border-radius: 3px; background: var(--c); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 2px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 4px 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; color: var(--ink-2);
}
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); font-weight: 600; }
.daynav { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; color: var(--ink-2); }
.daynav > button, .cal .cal-nav { border: 1px solid var(--line); background: transparent; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.daynav > button:disabled { opacity: 0.35; cursor: default; }
.daynav { position: relative; }
.daynav .day-label {
  width: auto; min-width: 104px; padding: 0 10px; font-size: 15px; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.daynav .day-label::after {
  content: ""; width: 6px; height: 6px; border: solid var(--ink-3); border-width: 0 1.6px 1.6px 0;
  transform: translateY(-2px) rotate(45deg);
}
.daynav .day-label[aria-expanded="true"] { background: var(--bg); }

/* calendar popover */
.cal {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: 316px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 12px 36px rgba(10, 20, 40, 0.18); padding: 12px; color: var(--ink);
}
.cal[hidden] { display: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-month { font: 600 16px var(--font); }
.cal .cal-nav { width: 32px; height: 32px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-wd { font-size: 12px; color: var(--ink-3); text-align: center; padding: 2px 0 4px; }
.cal-day {
  --tint: 0%;
  height: 46px; width: 100%; border: 0; border-radius: 8px; cursor: pointer; padding: 3px 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px;
  background: color-mix(in srgb, var(--solar) var(--tint), transparent);
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.cal-day .n { font: 500 15px/1.2 var(--font); }
.cal-day .k { font-size: 11px; line-height: 1.2; color: var(--ink-2); }
.cal-day:hover:not(:disabled) { outline: 1px solid var(--line-strong); }
.cal-day.is-today .n { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.cal-day[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal-day:disabled { cursor: default; color: var(--ink-3); opacity: 0.5; background: transparent; }
.cal-day.nocurve:not(:disabled) .n { color: var(--ink-2); }
.cal-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.cal-foot button { border: 1px solid var(--line); background: transparent; border-radius: 8px; padding: 4px 10px; font-size: 13px; color: var(--ink); cursor: pointer; }
.split-empty { margin: 4px 0 0; font-size: 14px; color: var(--ink-3); }

/* charts */
.chart { position: relative; width: 100%; touch-action: pan-y; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gridline { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart .zero { stroke: var(--line-strong); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { font: 400 12px var(--font); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .now { stroke: var(--ink-3); stroke-width: 1; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; }
.chart .loading { opacity: 0.45; transition: opacity 0.2s; }
.chart .empty { font: 400 14px var(--font); fill: var(--ink-3); }
.tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 10px; font-size: 13px; box-shadow: 0 6px 24px rgba(10, 20, 40, 0.14);
  opacity: 0; transition: opacity 0.12s;
}
.tip.on { opacity: 1; }
.tip .t { color: var(--ink-3); margin-bottom: 4px; }
.tip .r { display: grid; grid-template-columns: 14px auto 1fr; align-items: center; gap: 6px; }
.tip .r b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.tip .r span { color: var(--ink-2); }
.tip .r i { display: block; width: 12px; border-top: 2px solid var(--c); }

details.table { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
details.table summary { cursor: pointer; width: max-content; }
details.table .scroll { max-height: 260px; overflow: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; }
details.table table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
details.table th, details.table td { padding: 4px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
details.table th:first-child, details.table td:first-child { text-align: left; }
details.table th { position: sticky; top: 0; background: var(--panel); font-weight: 600; color: var(--ink); }

/* energy split bars */
.split { margin: 6px 0 20px; }
.split h3 { margin: 0 0 2px; font: 500 16px/1.3 var(--font); }
.split .tot { color: var(--ink-3); font-size: 14px; margin-bottom: 8px; }
.bar { display: flex; height: 18px; gap: 2px; border-radius: 4px; overflow: hidden; background: var(--line); }
.bar > i { display: block; height: 100%; background: var(--c); min-width: 0; transition: flex-grow 0.6s; }
.bar-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; font-size: 14px; }
.bar-legend div { display: flex; flex-direction: column; }
.bar-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.bar-legend b { font: 600 17px var(--font-narrow); padding-left: 17px; }
.ratio { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.ratio .value { font: 600 30px/1.1 var(--font-narrow); }
.ratio .label { color: var(--ink-2); font-size: 15px; }
.ratio .note { color: var(--ink-3); font-size: 13px; }

/* battery */
.cell { display: flex; align-items: center; gap: 4px; margin: 4px 0 14px; }
.cell-body {
  position: relative; flex: 1; height: 64px; border: 3px solid var(--ink-2); border-radius: 12px; padding: 4px; overflow: hidden;
}
.cell-cap { width: 7px; height: 26px; border-radius: 0 4px 4px 0; background: var(--ink-2); }
.cell-fill { height: 100%; border-radius: 6px; background: var(--battery); width: 0; transition: width 0.8s; position: relative; }
.cell-fill.charging::after {
  content: ""; position: absolute; inset: 0; border-radius: 6px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: sweep 2.4s ease-in-out infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .cell-fill.charging::after { animation: none; } }
.cell-min { position: absolute; top: 2px; bottom: 2px; width: 0; border-left: 2px solid var(--ink-3); }
.cell-soc {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 600 30px/1 var(--font-narrow); color: var(--ink);
}
.cell-soc.on-fill { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.lead { font-size: 16px; margin: 0 0 12px; color: var(--ink); }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 15px; }
dl.facts dt { color: var(--ink-2); }
dl.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--line-strong); color: var(--ink-2);
}
.badge.attn { border-color: var(--solar); color: var(--ink); }

/* battery packs */
.pack-summary { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 0 0 16px; }
.pack-summary .label { font-size: 14px; color: var(--ink-2); }
.pack-summary .value { font: 600 22px/1.2 var(--font-narrow); }
.pack-summary .note { font-size: 13px; color: var(--ink-3); }
.pack-hint { margin: 0 0 14px; font-size: 15px; color: var(--ink-2); max-width: 70ch; }
.pack-hint[hidden] { display: none; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.pack { background: var(--bg); border-radius: 12px; padding: 14px 16px 12px; min-width: 0; }
.pack-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pack-head h3 { margin: 0; font: 600 17px/1.2 var(--font); }
.pack-head span { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.pack-soc { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; }
.pack-soc .value { font: 600 30px/1 var(--font-narrow); min-width: 64px; }
.pack-bar { flex: 1; height: 14px; border-radius: 4px; background: var(--line); overflow: hidden; position: relative; }
.pack-bar > i { display: block; height: 100%; width: 0; background: var(--battery); border-radius: 0 4px 4px 0; transition: width 0.8s; }
.pack-energy { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.pack dl.facts { font-size: 14px; gap: 4px 10px; }
.pack dl.facts dd small { color: var(--ink-3); font-size: 13px; margin-left: 4px; }
.pack .mini-title { margin: 12px 0 2px; font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; }
.pack .mini-title b { font-weight: 500; color: var(--ink-3); }
.pack .chart { height: auto; }
.pack-age { margin: -4px 0 10px; font-size: 13px; line-height: 1.35; color: var(--ink-2); border-left: 2px solid var(--solar); padding-left: 8px; }
.pack-age[hidden] { display: none; }
.pack.stale .pack-soc .value, .pack.stale dl.facts dd { color: var(--ink-3); }
.pack.stale .pack-bar > i { opacity: 0.45; }
.diag-note { margin: 8px 0 6px; font-size: 14px; color: var(--ink-2); max-width: 80ch; }
details.table td.keys { text-align: left; white-space: normal; min-width: 260px; color: var(--ink-3); font-size: 12px; }

/* pv strings */
.strings { display: grid; gap: 14px; }
.string-row { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 10px; }
.string-row .name { font-weight: 600; color: var(--ink-2); }
.string-row .w { font: 600 20px var(--font-narrow); min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.string-row .kwh { grid-column: 2 / 4; margin-top: -10px; font-size: 13px; color: var(--ink-3); }
.track-h { height: 12px; border-radius: 4px; background: var(--line); overflow: hidden; }
.track-h > i { display: block; height: 100%; width: 0; background: var(--solar); border-radius: 0 4px 4px 0; transition: width 0.6s; }
.strings-foot { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.strings-foot b { color: var(--ink); font-weight: 600; }

/* sun & weather */
.sunline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.sunline .label { color: var(--ink-2); font-size: 14px; }
.sunline .value { font: 600 22px var(--font-narrow); }
.days { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.day h3 { margin: 0 0 4px; font: 600 16px var(--font); }
.day .wx { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; }
.day .wx svg { flex: none; color: var(--ink-2); }
.day .fc { font: 600 24px var(--font-narrow); margin-top: 4px; }
.day .fc small { display: block; font: 400 14px/1.3 var(--font); color: var(--ink-3); }
.mini { margin-top: 12px; }

/* lifetime */
.big-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.big-facts .value { font: 600 27px/1.1 var(--font-narrow); white-space: nowrap; }
.big-facts .value small { font-size: 17px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }
.big-facts .label { font-size: 14px; color: var(--ink-2); }
.big-facts .note { font-size: 13px; color: var(--ink-3); }
.amort { border-top: 1px solid var(--line); padding-top: 14px; }
.amort .meter > i { background: var(--battery); }
.amort p { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
@media (max-width: 520px) { .big-facts { grid-template-columns: 1fr 1fr; } }

/* system */
.sys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.sys h3 { margin: 0 0 8px; font: 600 16px var(--font); }
@media (max-width: 1000px) { .sys { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .sys { grid-template-columns: 1fr; } }
.signal { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; vertical-align: -2px; margin-right: 6px; }
.signal i { width: 4px; background: var(--line-strong); border-radius: 1px; }
.signal i.on { background: var(--ink-2); }

footer { margin-top: 26px; color: var(--ink-3); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.foot-controls { display: inline-flex; gap: 18px; align-items: center; flex-wrap: wrap; }
footer select {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 3px 6px; margin-left: 4px;
}
.hero-wx { margin: 6px 0 0; font-size: 15px; color: var(--hero-ink); }
.hero-wx[hidden] { display: none; }
@media (max-width: 640px) { .hero-wx { font-size: 13px; } }
footer button { border: 0; background: none; color: var(--ink-2); cursor: pointer; text-decoration: underline; padding: 0; font-size: 13px; }

.skeleton .value, .skeleton .flow .v { opacity: 0.35; }

/* ===================================================== SolarFlow additions */
a { color: var(--grid); }
.head-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hint { margin: 10px 0 0; font-size: 14px; color: var(--ink-3); }
.hint[hidden] { display: none; }
.btn-link { font-size: 14px; color: var(--grid); text-decoration: none; border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px; }
.btn-link:hover { border-color: var(--line-strong); }
.hero .settings-link { pointer-events: auto; }

/* live loads under the flow */
.loads { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 18px; margin-top: -6px; }
.loads:empty { display: none; }
.load {
  display: grid; grid-template-columns: 22px auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  padding: 7px 12px 8px 10px; border-radius: 12px; background: var(--bg); min-width: 128px; flex: 1 1 128px; max-width: 240px;
}
.load svg { grid-row: span 2; color: var(--c, var(--home)); }
.load .n { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.load .w { font: 600 19px/1.15 var(--font-narrow); font-variant-numeric: tabular-nums; }
.load .w small { font: 400 12px var(--font); color: var(--ink-3); margin-left: 6px; }
.load.idle .w { color: var(--ink-3); }
.load.offline { opacity: 0.6; }
@media (max-width: 640px) { .loads { padding: 0 12px 12px; gap: 6px; } .load { min-width: 108px; padding: 6px 10px; } }

/* SolarFlow tiles */
.sf { display: flex; flex-direction: column; }
.sf .panel-head { margin-bottom: 6px; }
.sf h2 { display: flex; align-items: center; gap: 8px; }
.sf h2 .swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.sf .sf-model { color: var(--ink-3); font-size: 14px; margin: 0 0 10px; }
.sf-top { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.sf-top .label { font-size: 13px; color: var(--ink-2); }
.sf-top .value { font: 600 24px/1.15 var(--font-narrow); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sf-top .note { font-size: 12px; color: var(--ink-3); }
.sf .strings { gap: 10px; }
.sf .string-row { grid-template-columns: 74px 1fr auto; }
.sf .string-row .name { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf .string-row .w { font-size: 18px; }
.sf .string-row .kwh { margin-top: -8px; }
.sf-bat { margin: 16px 0 6px; }
.sf-bat .row { display: flex; align-items: center; gap: 12px; }
.sf-bat .value { font: 600 26px/1 var(--font-narrow); min-width: 62px; }
.sf-bat .pack-bar { height: 14px; }
.sf-bat .note { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.sf dl.facts { font-size: 14px; gap: 4px 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.sf.offline .sf-top .value, .sf.offline .string-row .w { color: var(--ink-3); }
.sf .err { margin: 0 0 10px; font-size: 14px; color: var(--ink); border-left: 3px solid var(--bad); padding-left: 8px; }
.sf .err[hidden] { display: none; }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); font-weight: 500; }
.pill.ok { border-color: var(--ok); color: var(--ink); }
.pill.bad { border-color: var(--bad); color: var(--ink); }

/* battery packs grouped by system */
.pack-group { margin-top: 16px; }
.pack-group:first-child { margin-top: 0; }
.pack-group > h3 { margin: 0 0 10px; font: 600 16px var(--font); display: flex; align-items: center; gap: 8px; }
.pack-group > h3 .swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.pack-group > h3 small { font-weight: 400; color: var(--ink-3); font-size: 14px; }

/* consumers */
.consumers { display: grid; gap: 4px; }
.crow {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) 84px 92px; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.crow:last-child { border-bottom: 0; }
.crow svg { color: var(--c); }
.crow .nm { min-width: 0; }
.crow .nm b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow .nm .track-h { height: 6px; margin-top: 5px; }
.crow .nm .track-h > i { background: var(--c); }
.crow .w { font: 600 19px var(--font-narrow); text-align: right; font-variant-numeric: tabular-nums; }
.crow .d { text-align: right; font-size: 13px; color: var(--ink-2); line-height: 1.25; font-variant-numeric: tabular-nums; }
.crow .d small { display: block; color: var(--ink-3); }
.crow.off .w { color: var(--ink-3); }
.crow.total { border-top: 1px solid var(--line-strong); border-bottom: 0; margin-top: 2px; }
.crow.total .nm b { font-weight: 600; }
@media (max-width: 460px) { .crow { grid-template-columns: 22px minmax(0, 1fr) 70px 78px; gap: 8px; } }

/* phases */
.phases { display: grid; gap: 14px; }
.phase { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: start; }
.phase .ph { font: 600 26px/1 var(--font-narrow); text-align: center; padding-top: 2px; }
.phase .ph small { display: block; font: 400 12px var(--font); color: var(--ink-3); margin-top: 4px; }
.phase .div-bar { position: relative; height: 12px; border-radius: 4px; background: var(--line); margin: 4px 0 8px; }
.phase .div-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; border-left: 1px solid var(--ink-3); }
.phase .div-bar > i { position: absolute; top: 0; bottom: 0; background: var(--grid); border-radius: 3px; }
.phase dl.facts { grid-template-columns: repeat(4, auto); font-size: 14px; gap: 2px 12px; }
.phase dl.facts dd { text-align: left; font-weight: 600; }
.phase .grid-v { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-3); }
.phase .grid-v b { color: var(--ink); font-weight: 600; font-size: 15px; }
@media (max-width: 520px) { .phase dl.facts { grid-template-columns: auto 1fr; } .phase dl.facts dd { text-align: right; } }

/* price */
.price-now { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; margin-bottom: 8px; }
.price-now .value { font: 600 34px/1.1 var(--font-narrow); white-space: nowrap; }
.price-now .value.small { font-size: 26px; padding-top: 6px; }
.price-now .value small { font-size: 18px; font-weight: 500; color: var(--ink-2); margin-left: 3px; }
.price-now .label { font-size: 14px; color: var(--ink-2); }
#price-chart { margin: 4px 0 12px; }
.badge.win { border-color: var(--battery); color: var(--ink); }

/* statistics */
.hist-sum { display: flex; flex-wrap: wrap; gap: 8px 30px; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.hist-sum b { display: block; font: 600 20px var(--font-narrow); color: var(--ink); }

/* devices */
.scroll-x { overflow-x: auto; }
.devtable { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.devtable th, .devtable td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.devtable th { color: var(--ink-2); font-weight: 600; }
.devtable td.err { white-space: normal; color: var(--ink); min-width: 180px; }
.devtable .st { display: inline-flex; align-items: center; gap: 6px; }
.devtable .st i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.devtable .st.bad i { background: var(--bad); }
.diag-pick { display: inline-flex; gap: 8px; align-items: center; margin: 4px 0 8px; }
.diag-pick select, .raw { font-size: 13px; }
.diag-pick select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; }
pre.raw { max-height: 360px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 0; color: var(--ink); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre; }
footer a { color: var(--ink-2); }
dl.facts.money { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
#pack-groups.packs { display: flex; flex-wrap: wrap; gap: 14px; }
#pack-groups .pack { flex: 1 1 calc((100% - (var(--cols, 3) - 1) * 14px) / var(--cols, 3)); min-width: 240px; border-top: 3px solid var(--c); }
.pack-sys { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.pack-sys .swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.seg { flex-wrap: wrap; max-width: 100%; }
.head-controls { max-width: 100%; min-width: 0; }
.load .w { white-space: nowrap; }
.load .w small { display: block; margin: 1px 0 0; font-size: 12px; }
.load { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.load.dragging { cursor: grabbing; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); opacity: .95; }
.load.placeholder { background: transparent; border: 2px dashed var(--line-strong); min-width: 0; }
.loads[data-hidden]:not([data-hidden=""])::after { content: attr(data-hidden); flex-basis: 100%; font-size: 12px; color: var(--ink-3); margin-top: -2px; }
.tgl { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tgl input { width: 16px; height: 16px; accent-color: var(--grid); }
.panel-head h2 .sub { font-size: 13px; font-weight: 400; margin-left: 6px; }
.hint:empty { display: none; }
.phase.sum { border-top: 1px solid var(--line-strong); padding-top: 12px; }
.phase.sum .ph { font-size: 28px; }
.daynav.small { gap: 4px; align-items: center; font-size: 13px; color: var(--ink-2); }
.daynav.small button { width: 28px; height: 28px; }
.daynav.small span { min-width: 92px; text-align: center; }
.sun-sub { margin: -6px 0 10px; font-size: 14px; color: var(--ink-3); }
.heat-note { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 12px; color: var(--ink-3); }
.heat-note[hidden] { display: none; }
.heat-note i { width: 14px; height: 8px; background: #e0703b; opacity: .35; border-radius: 2px; }
.bar-legend { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); }
.sf .panel-head .sub { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
/* PV modules on the roof */
.roof-wrap { display: grid; grid-template-columns: minmax(0, auto) minmax(220px, 1fr); gap: 24px; align-items: start; }
.roof { display: grid; gap: 4px; padding: 14px; border-radius: 12px; background: repeating-linear-gradient(135deg, var(--bg) 0 10px, color-mix(in srgb, var(--bg) 80%, var(--line)) 10px 20px); justify-self: start; max-width: 100%; overflow-x: auto; }
.roof:empty { display: none; }
.module {
  position: relative; min-height: 66px; border-radius: 5px; padding: 6px 7px 5px; display: flex; flex-direction: column; justify-content: space-between;
  background: color-mix(in srgb, var(--c) var(--lvl, 10%), var(--panel)); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); font-variant-numeric: tabular-nums; min-width: 0;
}
.module::before { content: ""; position: absolute; inset: 0; border-radius: 4px; pointer-events: none;
  background-image: linear-gradient(to right, rgba(255, 255, 255, .12) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, .12) 1px, transparent 1px);
  background-size: 33.3% 16.6%; opacity: .7; }
.module .mv { font: 600 17px/1.1 var(--font-narrow); position: relative; }
.module .mk { font-size: 11.5px; color: var(--ink-2); position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.module .mn { font-size: 11px; color: var(--ink-3); position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.module.shared::after { content: "⧉"; position: absolute; right: 5px; top: 3px; font-size: 11px; color: var(--ink-3); }
.module.empty { visibility: hidden; }
.roof-side dl.facts { font-size: 14px; }
.roof-side .legend { margin-top: 10px; }
.daynav .day-label.static { cursor: default; min-width: 150px; text-align: center; }
@media (max-width: 760px) { .roof-wrap { grid-template-columns: 1fr; } .module { min-height: 58px; } .module .mv { font-size: 15px; } }
/* export */
.export-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 8px 0 6px; }
.export-form label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--ink-2); }
.export-form label[hidden] { display: none; }
.export-form select, .export-form input { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 8px; }
.export-form .btn-link { cursor: pointer; background: var(--grid); color: #fff; border-color: var(--grid); padding: 6px 14px; font-weight: 600; }
.lp-label { min-width: 150px; text-align: center; font-size: 14px; color: var(--ink); align-self: center; }
.module .mn { color: var(--ink-2); }
footer select { width: auto; max-width: 180px; }
.diag-pick { display: flex; max-width: 100%; } .diag-pick select { flex: 1 1 auto; min-width: 0; max-width: 100%; }

/* ===================================================================== 1.2 */
/* view popover */
.hero-tools { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.view-btn {
  display: inline-flex; align-items: center; gap: 6px; font: 500 14px var(--font); color: var(--hero-ink);
  background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 4px 11px;
  cursor: pointer; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.view-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.view-btn:hover { background: rgba(255, 255, 255, 0.75); }
.hero-right { position: relative; }
.view-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(440px, calc(100vw - 32px)); text-align: left;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 12px 34px rgba(10, 20, 40, 0.22); padding: 14px 16px 10px;
}
.view-pop[hidden] { display: none; }
.vp-group { margin-bottom: 10px; }
.vp-title { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; font-weight: 500; }
.view-pop .seg { display: flex; flex-wrap: wrap; }
.view-pop .seg button { flex: 1 1 auto; }
.vp-note { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 4px; line-height: 1.4; }
.vp-note a { color: var(--ink-2); }
.linkish { border: 0; background: none; color: var(--ink-2); cursor: pointer; text-decoration: underline; padding: 0; font: inherit; font-size: 13px; }

/* energy flow styles */
.flow .station.active .node { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--c) 55%, transparent)); }
.flow .ring-bg, .flow .gauge-bg { fill: none; stroke: var(--line); stroke-width: 5; }
.flow .gauge-bg { stroke-width: 7; stroke-dasharray: 75 100; stroke-linecap: round; }
.flow .ring, .flow .gauge { fill: none; stroke-width: 5; stroke-linecap: butt; }
.flow .gauge { stroke-width: 7; }
.flow .bar-bg { fill: var(--line); }
.flow .v.cv { font-size: 30px; }
.flow .v.gv { font-size: 25px; }
.flow .icon-g.colored .icon { stroke: var(--c); stroke-width: 2.2; }
.flow .node.ghost { fill: none; stroke-dasharray: 3 6; }
.flow .track.thin { stroke-width: 1.5; }
.flow .stream.a-pulse {
  stroke-dasharray: 34 300; stroke-linecap: round; animation-name: pulse;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--c) 70%, transparent));
}
@keyframes pulse { to { stroke-dashoffset: -334; } }
.flow .stream.a-particles { animation: none; stroke-dasharray: none; stroke-opacity: 0.22; }
.flow .stream.a-calm { animation: none; stroke-dasharray: none; stroke-opacity: 0.75; }
.flow .particles circle { filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7)); }
@media (prefers-reduced-motion: reduce) { .flow .particles { display: none; } }

/* KPI tiles */
.today { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 22px 0 22px; }
.today .stat, .today .stat:first-child {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px 12px;
  border-left: 1px solid var(--line);
}
.today .stat .label { display: flex; align-items: center; gap: 7px; }
.kpi-ic {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; flex: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
}
.today .stat .value { font-size: 31px; }
@media (max-width: 1100px) { .today { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .today .stat, .today .stat:first-child { border-left: 1px solid var(--line); padding: 10px 12px; }
  .today .stat:last-child { grid-column: auto; }
}
@media (max-width: 640px) { .today { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .today .stat .value { font-size: 27px; } }

/* boxes: folding, charts at the bottom */
.panel:has(> .fill-chart) { display: flex; flex-direction: column; }
.fill-chart { margin-top: auto; padding-top: 14px; }
.mini-h { margin: 0 0 6px; font: 500 14px var(--font); color: var(--ink-2); }
.mini-h .sub { font-weight: 400; color: var(--ink-3); }
.legend.small { font-size: 13px; margin-bottom: 4px; }
.key-rect.band { opacity: 0.35; }
.fold {
  margin-left: 4px; border: 1px solid var(--line); background: transparent; color: var(--ink-3); border-radius: 8px;
  width: 28px; height: 28px; display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.fold svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; transition: transform 0.2s; }
.fold:hover { color: var(--ink); border-color: var(--line-strong); }
.panel.folded .fold svg { transform: rotate(-90deg); }
.panel.folded > :not(.panel-head) { display: none !important; }
.panel.folded { align-self: start; }
.panel-head { gap: 10px; }
.chart.xy { min-height: 40px; }
.chart.xy.clickable { cursor: pointer; }
.chart .sel { fill: var(--ink-3); opacity: 0.12; }
.big-facts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 460px) { .big-facts.three .value { font-size: 22px; } }

/* Sankey */
.sankey { width: 100%; }
.sankey svg { display: block; width: 100%; overflow: visible; }
.sankey .band { opacity: 0.42; transition: opacity 0.15s; }
.sankey .band:hover { opacity: 0.7; }
.sankey .sk-n { font: 500 14px var(--font); fill: var(--ink); }
.sankey .sk-v { font: 400 12.5px var(--font); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.sankey .empty { font: 400 14px var(--font); fill: var(--ink-3); }
@media (max-width: 520px) { .sankey .sk-n { font-size: 12.5px; } .sankey .sk-v { font-size: 11px; } }

/* cross-unit charging */
#cross-now.warn { color: var(--ink); border-left: 3px solid var(--solar); padding-left: 10px; }
.table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }

/* Wiener Netze */
.meter-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; }
@media (max-width: 900px) { .meter-grid { grid-template-columns: minmax(0, 1fr); } }

/* full cycles */
.pack-cycles { margin: 14px 0 6px; }
.cyc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.cyc { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; padding: 8px 12px; }
.cyc > b { display: block; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.cyc .cv { font: 600 26px/1.15 var(--font-narrow); }
.cyc ul { list-style: none; margin: 4px 0; padding: 0; font-size: 13px; color: var(--ink-2); }
.cyc li { display: flex; justify-content: space-between; gap: 8px; }
.cyc small { font-size: 12px; color: var(--ink-3); }

/* WLAN signal */
.wifi { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.wifi svg rect { fill: var(--line-strong); }
.wifi svg rect.on { fill: var(--ok); }
.wifi[data-lvl="1"] svg rect.on { fill: var(--solar); }
.wifi[data-lvl="0"] svg rect.on, .wifi[data-lvl="1"] { color: var(--ink); }

/* module charts */
.module-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 10px; }
/* full width: as many charts in a row as the roof grid has columns */
@media (min-width: 1100px) { .module-charts { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); } }
.mchart .mh { flex-wrap: wrap; row-gap: 0; }
.mchart { border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 10px; padding: 8px 10px 4px; min-width: 0; }
.mchart .mh { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 2px; }
.mchart .mh b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mchart .mh span { color: var(--ink-3); white-space: nowrap; }
.roof-charts[hidden], .roof-wrap[hidden] { display: none; }
#roof-stats { margin-top: 12px; }
.meter-grid > div { min-width: 0; }
.big-facts > div { min-width: 0; }
.panel[data-box] { position: relative; }
.panel[data-box] > .panel-head { padding-right: 38px; }
.panel[data-box] > .panel-head > .fold { position: absolute; top: 14px; right: 14px; margin: 0; }
#mt-facts, #cx-facts, #roof-facts { grid-template-columns: auto minmax(0, 1fr); }
#mt-facts dd, #cx-facts dd, #roof-facts dd { overflow-wrap: anywhere; min-width: 0; }
.daynav { position: relative; }
.lp-label.pick { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.lp-label.pick:hover { background: var(--bg); }
.lp-label.pick::after { content: " ▾"; color: var(--ink-3); font-size: 0.8em; }
.pick-in { position: absolute; left: 50%; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
#mt-q-h { margin-top: 14px; }
