

        :root {

            color-scheme: dark;

            --page: #071522;

            --panel: #102235;

            --panel-2: #0b1b2a;

            --line: #263d52;

            --text: #f2f7fc;

            --muted: #a8bfd3;

            --blue: #62adff;

            --green: #42d6a0;

            --yellow: #ffca4b;

            --orange: #ff956c;

            --purple: #ba9bff;

            --red: #ff6675;

            --shadow: 0 14px 34px rgba(0, 0, 0, .15);

        }



        body[data-theme="light"] {

            color-scheme: light;

            --page: #edf3f8;

            --panel: #ffffff;

            --panel-2: #f5f8fb;

            --line: #d5e0e9;

            --text: #172b3d;

            --muted: #60778b;

            --blue: #1672c4;

            --green: #138c65;

            --yellow: #ad7600;

            --orange: #c3542f;

            --purple: #704ab8;

            --red: #c53143;

            --shadow: 0 8px 24px rgba(24, 54, 78, .08);

        }



        * { box-sizing: border-box; }

        body {

            margin: 0;

            min-height: 100vh;

            background:

                radial-gradient(ellipse at 10% 0%, rgba(50, 130, 190, .12), transparent 36%),

                var(--page);

            color: var(--text);

            font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

        }



        a { color: inherit; text-decoration: none; }

        button, select, input { font: inherit; }

        .page { width: min(1540px, calc(100% - 36px)); margin: 0 auto; padding: 18px 0 34px; }



        .header {

            display: grid;

            grid-template-columns: minmax(210px, 1fr) auto minmax(245px, 1fr);

            align-items: center;

            gap: 18px;

            margin-bottom: 20px;

        }



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

        .brand-icon {

            width: 48px; height: 48px; display: grid; place-items: center;

            border-radius: 15px; background: linear-gradient(145deg, #318ef0, #1559b2);

            color: white; font-size: 23px; box-shadow: var(--shadow);

        }

        .brand-title { font-size: 21px; font-weight: 760; }

        .brand-subtitle { margin-top: 3px; color: var(--muted); font-size: 12px; }

        .nav { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }

        .nav a, .tool-button {

            padding: 9px 11px; border: 0; border-radius: 10px;

            background: transparent; color: var(--text); font-size: 12px; cursor: pointer;

            white-space: nowrap;

        }

        .nav a:hover, .nav a:focus-visible, .tool-button:hover {

            outline: none; background: #1b5fa8; color: white;

        }

        .nav a.nav-active { background: #1765b8; color: white; }



        .header-tools { display: flex; justify-content: flex-end; align-items: center; gap: 9px; }

        .header-datetime { min-width: 102px; text-align: right; }

        .header-date { color: var(--text); font-size: 12px; font-weight: 650; white-space: nowrap; }

        .clock-value { margin-top: 2px; font-size: 16px; font-weight: 780; }

        .tool-button { border: 1px solid var(--line); background: var(--panel); }



        .section { margin-top: 19px; scroll-margin-top: 12px; }

        .section-head, .panel-head {

            display: flex; justify-content: space-between; align-items: center; gap: 10px;

            margin-bottom: 10px;

        }

        h2, h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }

        .section-note, .panel-note { color: var(--muted); font-size: 11px; text-align: right; }



        .surface, .summary-card, .metric, .small-card, .consumer-card {

            border: 1px solid var(--line);

            background: linear-gradient(150deg, var(--panel), var(--panel-2));

            box-shadow: var(--shadow);

        }



        .summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }

        .summary-card { min-height: 72px; padding: 12px 14px; border-radius: 14px; }

        .summary-label { color: var(--muted); font-size: 12px; }

        .summary-value { margin-top: 6px; font-size: 16px; font-weight: 720; }

        .good { color: var(--green); } .warning { color: var(--yellow); }



        .hero-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }

        .metric {

            position: relative;

            display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; min-height: 122px; padding: 13px;

            border-radius: 16px; min-width: 0;

        }

        .metric-icon {

            width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center;

            border-radius: 14px; background: rgba(255,255,255,.08); font-size: 23px;

        }

        .metric-icon img { width: 41px; height: 41px; object-fit: contain; border-radius: 8px; }

        .metric-icon .tower-icon { width: 27px; height: 36px; }

        .metric.green .metric-icon { color: var(--green); }

        .metric.neutral .metric-icon { color: var(--muted); }

        .metric.purple .metric-icon { border-radius: 50%; background: rgba(186,155,255,.16); }

        .metric-trend-icon { position: absolute; right: 0; bottom: 0; width: 28px; height: 23px; fill: none; stroke: var(--purple); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

        .metric-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 5px; min-width: 0; min-height: 94px; }

        .metric-main { min-width: 0; }

        .metric-label { color: var(--text); font-size: 15px; font-weight: 730; line-height: 1.2; }

        .metric-value { margin-top: 4px; font-size: clamp(22px, 1.9vw, 29px); font-weight: 830; line-height: 1.1; white-space: nowrap; }

        .metric-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(58px, .85fr); align-items: end; gap: 6px; min-width: 0; margin-top: auto; }

        .metric-details { min-width: 0; }

        .metric-detail { margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 720; line-height: 1.3; overflow-wrap: anywhere; }

        .metric-detail-secondary { color: var(--text); font-size: 13px; font-weight: 760; }

        .metric-net-value { margin-top: 3px; font-size: 14px; font-weight: 820; }

        .metric-viz { position: relative; min-width: 0; min-height: 31px; }

        .sparkline { height: 31px; display: flex; align-items: end; gap: 2px; margin-top: 0; }

        .sparkline i { flex: 1 1 0; min-width: 2px; max-width: 10px; border-radius: 2px 2px 0 0; background: currentColor; opacity: .86; }

        .sparkline.yellow { color: var(--yellow); } .sparkline.blue { color: var(--blue); }

        .sparkline.green { color: var(--green); } .sparkline.orange { color: var(--orange); }

        .sparkline.purple { color: var(--purple); } .sparkline.red { color: var(--red); }

        .sparkline-empty { height: 31px; }

        .yellow .metric-value { color: var(--yellow); }

        .blue .metric-value { color: var(--blue); }

        .green .metric-value { color: var(--green); }

        .neutral .metric-value { color: var(--muted); }

        .orange .metric-value { color: var(--orange); }

        .purple .metric-value { color: var(--purple); }

        .red .metric-value, .metric.red .metric-icon { color: var(--red); }

        .metric .metric-icon.metric-icon-live-export { color: var(--green); }

        .metric .metric-icon.metric-icon-live-import { color: var(--red); }

        .metric .metric-icon.metric-icon-live-neutral { color: var(--muted); }

        .net-day-import { color: var(--red); font-weight: 760; }

        .net-day-export { color: var(--green); font-weight: 760; }

        .net-day-neutral { color: var(--muted); font-weight: 700; }

        .metric-net-value.net-day-import { color: var(--red); }

        .metric-net-value.net-day-export { color: var(--green); }

        .metric-net-value.net-day-neutral { color: var(--muted); }

        .metric-value.metric-live-export { color: var(--green); }

        .metric-value.metric-live-import { color: var(--red); }

        .metric-value.metric-live-neutral { color: var(--muted); }



        .main-grid { display: grid; grid-template-columns: minmax(390px, .95fr) minmax(0, 1.5fr); align-items: stretch; gap: 10px; }

        .balance-stack { display: grid; grid-template-rows: auto auto; align-content: start; gap: 10px; min-width: 0; }

        .energy-chart-card { min-height: 235px; display: flex; flex-direction: column; }

        .energy-chart-card .panel-head { flex-wrap: wrap; margin-bottom: 4px; }

        .energy-chart-card.chart-is-expanded, .energy-chart-card:fullscreen { display: flex; flex-direction: column; }

        .energy-chart-card.chart-is-expanded .energy-chart-svg, .energy-chart-card:fullscreen .energy-chart-svg { width: 100%; max-height: 72vh; flex: 1 1 auto; }

        .energy-chart-svg { width: 100%; height: auto; flex: 1; overflow: visible; }

        .energy-gridline { stroke: var(--line); stroke-width: 1; }

        .energy-gridline.vertical { stroke-dasharray: 2 4; opacity: .7; }

        .energy-axis-label { fill: var(--muted); font-size: 13px; }

        .energy-series { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

        .energy-series.is-hidden, .energy-series-point.is-hidden { display: none; }

        .energy-chart-empty { flex: 1; display: grid; place-items: center; min-height: 190px; color: var(--muted); font-size: 13px; text-align: center; }

        .energy-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding-top: 5px; color: var(--muted); font-size: 11px; }

        .energy-legend button { display: inline-flex; align-items: center; gap: 5px; padding: 2px 3px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }

        .energy-legend button:hover, .energy-legend button[aria-pressed="true"] { color: var(--text); background: var(--panel-2); }

        .energy-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }

        .energy-legend i.solar { background: var(--yellow); }

        .energy-legend i.home { background: var(--blue); }

        .energy-legend i.heat { background: var(--orange); }

        .energy-legend i.net { background: var(--green); }

        .energy-heading-controls { display: flex; align-items: center; gap: 8px; }

        .energy-date-controls { margin: 0; gap: 5px; }

        .energy-date-controls .date-title { min-width: 110px; font-size: 12px; }

        .energy-date-controls a, .energy-date-controls .price-nav-disabled { padding: 4px 8px; }

        .system-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 10px; min-width: 0; }

        .system-stack { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); align-content: stretch; gap: 10px; min-width: 0; }

        .system-grid > article, .system-stack > * { min-width: 0; }

        [data-price-panel].is-loading, [data-energy-panel].is-loading { opacity: .58; pointer-events: none; }

        .surface { min-width: 0; padding: 14px; border-radius: 17px; }

        .panel-head { margin-bottom: 12px; }

        [data-price-panel] > .panel-head .price-unit-note { margin-right: 34px; }

        .balance-diagram { position: relative; isolation: isolate; min-height: 212px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 82px 1fr; gap: 0 12px; padding: 4px 3px 1px; }

        .balance-node { position: relative; z-index: 1; display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-left: 3px solid currentColor; border-radius: 13px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); box-shadow: 0 5px 14px rgba(0, 0, 0, .12); }

        .balance-node.solar { color: var(--yellow); }

        .balance-node.home { color: var(--blue); background: linear-gradient(145deg, color-mix(in srgb, var(--blue) 15%, var(--panel-2)), var(--panel)); border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); box-shadow: 0 7px 18px rgba(0, 0, 0, .18); }

        .balance-node.home .balance-label { color: var(--text); }

        .balance-node.net.exporting { color: var(--green); }

        .balance-node.net.importing { color: var(--red); }

        .balance-node img { width: 42px; height: 42px; padding: 5px; flex: 0 0 auto; border-radius: 12px; background: color-mix(in srgb, currentColor 13%, transparent); object-fit: contain; }

        .balance-node .tower-icon { width: 36px; height: 46px; flex: 0 0 auto; padding: 5px; border-radius: 12px; background: color-mix(in srgb, currentColor 13%, transparent); }

        .balance-copy { min-width: 0; }

        .balance-label { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .01em; }

        .balance-value { margin-top: 4px; font-size: clamp(15px, 1.45vw, 20px); font-weight: 820; letter-spacing: -.025em; white-space: nowrap; }

        .balance-direction { margin-top: 2px; font-size: 10px; font-weight: 700; }

        .balance-node.net.importing .balance-direction { color: var(--red); }

        .balance-node.net.exporting .balance-direction { color: var(--green); }

        .balance-arrows { position: absolute; z-index: 0; inset: 45px 0 0; width: 100%; height: 150px; overflow: visible; pointer-events: none; }

        .balance-hp { grid-column: 1 / 4; justify-self: center; align-self: end; z-index: 1; display: flex; align-items: center; justify-content: flex-start; gap: 13px; width: min(54%, 270px); min-height: 72px; padding: 9px 15px; border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: 13px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); box-shadow: 0 5px 16px rgba(0, 0, 0, .16); color: var(--text); text-align: left; }

        .balance-hp img { width: 76px; height: 49px; padding: 3px; border-radius: 9px; background: color-mix(in srgb, var(--orange) 12%, transparent); object-fit: contain; }

        .balance-hp-value { margin-top: 3px; color: var(--orange); font-size: 17px; font-weight: 820; letter-spacing: -.02em; }

        .balance-hp-label { color: var(--muted); font-size: 11px; font-weight: 650; }



        .price-chart-wrap { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 5px; height: 184px; }

        .price-y-axis { display: flex; flex-direction: column; justify-content: space-between; padding: 0 0 25px; color: var(--muted); font-size: 11px; text-align: right; }

        .price-chart { min-width: 0; height: 100%; display: flex; align-items: end; gap: 1px; padding: 8px 3px 26px; border-bottom: 1px solid var(--line); position: relative; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--line) calc(25% - 1px), var(--line) 25%); }

        .price-bar-wrap { height: 100%; flex: 1; min-width: 2px; display: flex; align-items: end; position: relative; }

        .price-bar { width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--green); }

        .price-bar.cheap { background: var(--green); }

        .price-bar.normal { background: #ff9a52; }

        .price-bar.expensive { background: #f05259; }

        .price-tick { position: absolute; bottom: -21px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 10px; white-space: nowrap; }

        .price-dst-repeat { position: absolute; z-index: 1; top: 3px; bottom: 26px; background: rgba(166, 139, 255, .10); border-left: 1px solid rgba(166, 139, 255, .45); border-right: 1px solid rgba(166, 139, 255, .45); pointer-events: none; }

        .price-dst-marker { position: absolute; z-index: 3; top: 3px; bottom: 26px; border-left: 2px dashed var(--purple); pointer-events: none; }

        .price-dst-marker span { position: absolute; top: 0; left: 3px; padding: 2px 4px; border-radius: 4px; background: var(--panel); color: var(--purple); font-size: 8px; font-weight: 700; white-space: nowrap; }

        .price-current-quarter-marker { position: absolute; z-index: 4; top: 3px; bottom: 26px; border-left: 1px dotted var(--text); opacity: .85; pointer-events: none; }

        .date-controls { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin: 7px 0 10px; }

        .date-controls a, .period-tabs a {

            display: inline-block; padding: 5px 9px; border: 1px solid var(--line);

            border-radius: 8px; background: var(--panel-2); color: var(--text); font-size: 10px;

        }

        .date-controls .price-nav-disabled { display: inline-block; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); opacity: .42; }

        .date-controls a:hover, .period-tabs a:hover, .period-tabs a.active { background: #195da5; color: white; }

        .date-title { font-size: 13px; font-weight: 720; text-align: center; }

        .cheap-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

        .cheap-title { margin-bottom: 7px; font-size: 13px; font-weight: 760; }

        .cheap-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; color: var(--muted); font-size: 12px; }

        .cheap-row strong { color: var(--green); font-size: 12px; white-space: nowrap; }

        .cheap-runs { margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line); }

        .cheap-runs .cheap-row { font-size: 12px; }



        .equipment-layout { display: grid; grid-template-columns: minmax(190px, .78fr) minmax(0, 1.35fr); align-items: center; gap: 14px; }

        .equipment-gallery { display: grid; grid-template-columns: 1fr; align-items: center; gap: 10px; }

        .equipment-figure { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); text-align: center; }

        .product-image { display: block; width: 100%; height: 170px; object-fit: contain; }

        .equipment-caption { margin-top: 5px; color: var(--muted); font-size: 10px; }

        .equipment-data { min-width: 0; }

        .equipment-readings { display: grid; grid-template-columns: 1fr; gap: 0; }

        .equipment-summary { display: grid; grid-template-columns: 1fr; gap: 7px; margin-top: 9px; }

        .onecta-reading { display: grid; grid-template-columns: 23px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-width: 0; padding: 6px 2px; border-bottom: 1px solid var(--line); }

        .onecta-icon { color: var(--blue); text-align: center; font-size: 15px; line-height: 1; }

        .onecta-reading-label { min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.25; }

        .onecta-reading-value { color: var(--text); font-size: 14px; font-weight: 740; white-space: nowrap; }

        .onecta-note { margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.35; }

        .equipment-pill { display: flex; flex-direction: column; justify-content: space-between; gap: 3px; min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); font-size: 11px; line-height: 1.3; overflow-wrap: break-word; word-break: normal; hyphens: auto; }

        .equipment-pill strong { margin: 0; color: var(--text); font-size: 12px; white-space: nowrap; }

        .brand-house { width: 46px; height: 46px; flex: 0 0 auto; object-fit: contain; border-radius: 12px; }

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

        .temp-card { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }

        .temp-label { min-width: 0; color: var(--muted); font-size: clamp(10px, .75vw, 12px); line-height: 1.25; overflow-wrap: anywhere; word-break: normal; hyphens: auto; }

        .temp-value { margin-top: 4px; font-size: clamp(15px, 1.1vw, 18px); font-weight: 700; white-space: nowrap; }

        .badge { padding: 5px 8px; border: 1px solid rgba(66,214,160,.3); border-radius: 999px; color: var(--green); font-size: 9px; white-space: nowrap; }



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

        .battery-layout { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 13px; }

        .battery-image { display: block; width: 128px; max-width: 100%; height: 168px; object-fit: contain; }

        .battery-lines { display: grid; grid-template-columns: 1fr; min-width: 0; }

        .weather-header { display: flex; align-items: center; gap: 5px; min-width: 98px; }

        .weather-header-icon { display: grid; place-items: center; width: 42px; height: 42px; font-size: 31px; line-height: 1; }

        .weather-header-icon img { display: block; width: 39px; height: 39px; object-fit: contain; }

        .weather-header-copy { min-width: 50px; }

        .weather-header-temp { font-size: 14px; font-weight: 760; white-space: nowrap; }

        .weather-header-place { color: var(--muted); font-size: 10px; white-space: nowrap; }

        .weather-main { display: flex; align-items: center; gap: 12px; }

        .weather-temperature { font-size: 23px; font-weight: 760; }

        .notice { margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.55; }



        .meter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }

        .small-card { min-height: 62px; padding: 9px; border-radius: 11px; box-shadow: none; }

        .small-label { color: var(--muted); font-size: 11px; }

        .small-value { margin-top: 6px; font-size: 15px; font-weight: 700; }

        .today-energy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 9px; }

        .today-energy-card { padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); }



        .history-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }

        .history-period-title { font-size: 13px; font-weight: 800; }

        .period-tabs { display: flex; gap: 4px; }

        .history-panels { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, .9fr); gap: 11px; }

        .history-panel { position: relative; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); display: flex; flex-direction: column; }

        .history-panel h3 { margin: 0 34px 10px 0; font-size: 14px; font-weight: 740; }

        .history-chart-layout { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: stretch; }

        .history-y-axis { height: 150px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding: 7px 5px 20px 0; color: var(--muted); font-size: 9px; line-height: 1; white-space: nowrap; }

        .history-chart { height: 150px; display: flex; align-items: stretch; gap: 3px; overflow-x: auto; padding: 7px 3px 20px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--line) calc(25% - 1px), var(--line) 25%); }

        .history-chart-day { gap: 1px; overflow-x: hidden; }

        .history-chart-day .history-bar-wrap { min-width: 0; }

        .history-chart-quarter { overflow-x: auto; }

        .history-chart-quarter .history-bar-wrap { min-width: 12px; }

        .history-chart-quarter .history-bar-group { gap: 0; }

        .history-chart-quarter .history-day { font-size: 9px; }

        .history-chart-day .history-total-wrap { min-width: 48px; flex: 0 0 48px; }

        .history-bar-wrap { position: relative; min-width: 20px; flex: 1 0 0; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; }

        .history-bar-stack { width: min(24px, 78%); height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: stretch; }

        .history-bar-group { width: min(38px, 96%); height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }

        .history-total-wrap { min-width: 42px; flex-grow: 0; margin-left: 4px; padding-left: 4px; border-left: 1px dashed var(--muted); }

        .history-total-wrap .history-bar-group { width: 100%; }

        .history-bar { display: block; min-width: 1px; width: auto; min-height: 0; border-radius: 3px 3px 0 0; }

        .history-bar-group > .history-bar { flex: 1 1 0; }

        .history-bar-stack > .history-bar { flex: 0 0 auto; width: 100%; }

        .history-bar.solar { background: var(--yellow); } .history-bar.home { background: var(--blue); }

        .history-bar.import { background: var(--orange); } .history-bar.export { background: var(--green); }

        .history-bar.heat { border-radius: 4px 4px 0 0; background: var(--orange); }

        .history-bar.price { border-radius: 4px 4px 0 0; background: var(--purple); }

        .history-day { position: absolute; bottom: -17px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }

        .history-legend { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; color: var(--muted); font-size: 10px; }

        .history-legend button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }

        .history-legend button:hover, .history-legend button[aria-pressed="true"] { color: var(--text); background: var(--panel); border-color: var(--line); }

        .history-legend i { width: 8px; height: 8px; border-radius: 50%; }

        .history-legend .solar { background: var(--yellow); } .history-legend .home { background: var(--blue); }

        .history-legend .import { background: var(--orange); } .history-legend .export { background: var(--green); }

        .history-day-totals { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }

        .history-day-total { min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }

        .history-day-total span { display: block; overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

        .history-day-total strong { display: block; margin-top: 4px; font-size: clamp(13px, 1vw, 15px); font-weight: 800; white-space: nowrap; }

        .history-day-total .solar { color: var(--yellow); } .history-day-total .home { color: var(--blue); }

        .history-day-total .import { color: var(--orange); } .history-day-total .export { color: var(--green); }

        .history-day-total .heat { color: var(--orange); }

        .history-day-total .price-average { color: var(--purple); }

        .history-period-totals { min-height: 60px; margin-top: auto; padding-top: 12px; align-items: stretch; }

        .history-period-totals .history-day-total { box-sizing: border-box; min-height: 60px; display: flex; flex-direction: column; justify-content: center; }

        .history-heat-total, .history-price-total { grid-template-columns: minmax(0, 1fr); }

        .history-bar.is-hidden { display: none !important; }

        .chart-expand-button { position: absolute; z-index: 2; top: 8px; right: 8px; width: 27px; height: 27px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); cursor: pointer; }

        .chart-expand-button.chart-expand-inline { position: static; z-index: auto; flex: 0 0 27px; margin-left: 1px; }

        .chart-expand-button:hover { border-color: var(--blue); color: var(--blue); }

        .chart-expand-button svg { width: 15px; height: 15px; }

        body.chart-view-open { overflow: hidden; }

        .energy-chart-card, [data-price-panel] { position: relative; }

        .history-panel:fullscreen, .energy-chart-card:fullscreen, [data-price-panel]:fullscreen,

        .chart-is-expanded { box-sizing: border-box; position: fixed; z-index: 99999; inset: 0; width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: clamp(18px, 3vw, 42px); overflow: auto; border: 0; border-radius: 0; background: var(--panel); color: var(--text); }

        .history-fullscreen-surface:fullscreen, .history-fullscreen-surface.chart-is-expanded { display: flex; flex-direction: column; }

        .history-fullscreen-surface:fullscreen .history-toolbar, .history-fullscreen-surface.chart-is-expanded .history-toolbar { flex: 0 0 auto; }

        .history-fullscreen-surface:fullscreen .history-panels, .history-fullscreen-surface.chart-is-expanded .history-panels { flex: 1 1 auto; min-height: 0; grid-template-columns: minmax(0, 1fr); }

        .history-fullscreen-surface:fullscreen .history-panel:not(.is-focus-expanded), .history-fullscreen-surface.chart-is-expanded .history-panel:not(.is-focus-expanded) { display: none; }

        .history-fullscreen-surface:fullscreen .history-panel.is-focus-expanded, .history-fullscreen-surface.chart-is-expanded .history-panel.is-focus-expanded { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }

        .history-fullscreen-surface:fullscreen .history-chart, .history-fullscreen-surface.chart-is-expanded .history-chart { height: min(62vh, 680px); flex: 0 0 auto; }

        .history-fullscreen-surface:fullscreen .history-y-axis, .history-fullscreen-surface.chart-is-expanded .history-y-axis { height: min(62vh, 680px); flex: 0 0 auto; }

        .history-fullscreen-surface:fullscreen .history-day-totals, .history-fullscreen-surface.chart-is-expanded .history-day-totals,

        .history-panel:fullscreen .history-day-totals, .history-panel.chart-is-expanded .history-day-totals { flex: 0 0 auto; gap: clamp(10px, 1.1vw, 20px); margin-top: clamp(16px, 2vh, 28px); }

        .history-fullscreen-surface:fullscreen .history-day-total, .history-fullscreen-surface.chart-is-expanded .history-day-total,

        .history-panel:fullscreen .history-day-total, .history-panel.chart-is-expanded .history-day-total { padding: clamp(12px, 1.3vw, 22px); border-radius: 12px; }

        .history-fullscreen-surface:fullscreen .history-day-total span, .history-fullscreen-surface.chart-is-expanded .history-day-total span,

        .history-panel:fullscreen .history-day-total span, .history-panel.chart-is-expanded .history-day-total span { font-size: clamp(15px, 1.2vw, 21px); }

        .history-fullscreen-surface:fullscreen .history-day-total strong, .history-fullscreen-surface.chart-is-expanded .history-day-total strong,

        .history-panel:fullscreen .history-day-total strong, .history-panel.chart-is-expanded .history-day-total strong { margin-top: 6px; font-size: clamp(21px, 1.8vw, 32px); }

        .history-fullscreen-surface:fullscreen .history-day, .history-fullscreen-surface.chart-is-expanded .history-day,

        .history-panel:fullscreen .history-day, .history-panel.chart-is-expanded .history-day { bottom: -24px; font-size: clamp(15px, 1.15vw, 20px); }

        .history-panel:fullscreen .history-chart, .chart-is-expanded .history-chart { height: min(64vh, 680px); }

        .history-panel:fullscreen .history-y-axis, .chart-is-expanded .history-y-axis { height: min(64vh, 680px); }

        .energy-chart-card:fullscreen .energy-chart-svg, .chart-is-expanded .energy-chart-svg { max-height: 72vh; }

        [data-price-panel]:fullscreen .price-chart-wrap, .chart-is-expanded .price-chart-wrap { height: min(62vh, 650px); }

        .history-fullscreen-surface:fullscreen .history-toolbar .period-tabs a,

        .history-fullscreen-surface.chart-is-expanded .history-toolbar .period-tabs a,

        .history-fullscreen-surface:fullscreen .history-toolbar > a,

        .history-fullscreen-surface.chart-is-expanded .history-toolbar > a,

        .energy-chart-card:fullscreen .energy-date-controls a,

        .energy-chart-card.chart-is-expanded .energy-date-controls a,

        .energy-chart-card:fullscreen .energy-date-controls .price-nav-disabled,

        .energy-chart-card.chart-is-expanded .energy-date-controls .price-nav-disabled,

        [data-price-panel]:fullscreen .date-controls a,

        [data-price-panel].chart-is-expanded .date-controls a,

        [data-price-panel]:fullscreen .date-controls .price-nav-disabled,

        [data-price-panel].chart-is-expanded .date-controls .price-nav-disabled { min-width: 42px; padding: 10px 15px; font-size: clamp(15px, 1.2vw, 20px); line-height: 1.2; text-align: center; }

        .history-fullscreen-surface:fullscreen .history-toolbar .period-tabs,

        .history-fullscreen-surface.chart-is-expanded .history-toolbar .period-tabs { gap: 9px; }

        .history-fullscreen-surface:fullscreen .history-toolbar > strong,

        .history-fullscreen-surface.chart-is-expanded .history-toolbar > strong,

        .energy-chart-card:fullscreen .energy-date-controls .date-title,

        .energy-chart-card.chart-is-expanded .energy-date-controls .date-title,

        [data-price-panel]:fullscreen .date-controls .date-title,

        [data-price-panel].chart-is-expanded .date-controls .date-title { min-width: 180px; font-size: clamp(17px, 1.5vw, 24px); font-weight: 800; }

        .chart-is-expanded .history-legend, .history-panel:fullscreen .history-legend,

        .chart-is-expanded .energy-legend, .energy-chart-card:fullscreen .energy-legend { gap: 10px; font-size: clamp(15px, 1.4vw, 20px); }

        .chart-is-expanded .history-legend button, .history-panel:fullscreen .history-legend button,

        .chart-is-expanded .energy-legend button, .energy-chart-card:fullscreen .energy-legend button { gap: 8px; padding: 9px 12px; }

        .chart-is-expanded .history-legend i, .history-panel:fullscreen .history-legend i,

        .chart-is-expanded .energy-legend i, .energy-chart-card:fullscreen .energy-legend i { width: 12px; height: 12px; }

        .history-price-extremes { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; margin: -2px 0 8px; font-size: 11px; font-weight: 700; }

        .history-price-extremes .lowest { color: var(--green); }

        .history-price-extremes .highest { color: var(--red); }

        .history-chart-empty { min-height: 150px; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }

        .history-nav-disabled { min-width: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); opacity: .45; text-align: center; }

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

        .consumer-card { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 12px; border-radius: 12px; box-shadow: none; }

        .consumer-card.is-running { border-color: color-mix(in srgb, var(--green) 62%, var(--line)); }

        .consumer-card.is-running .consumer-image { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--green) 52%, transparent)); }

        .consumer-image { display: block; flex: 0 0 60px; width: 60px; height: 76px; object-fit: contain; }

        .consumer-copy { min-width: 0; flex: 1; }

        .consumer-name { font-size: 14px; font-weight: 700; }

        .consumer-state { display: inline-block; margin-top: 8px; padding: 4px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted); font-size: 9px; }

        .consumer-card.is-running .consumer-state { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }

        .consumer-readings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }

        .consumer-reading { min-width: 0; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }

        .consumer-reading-label { display: block; color: var(--muted); font-size: 10px; line-height: 1.25; }

        .consumer-reading strong { display: block; margin-top: 3px; color: var(--text); font-size: 12px; white-space: nowrap; }



        .db-error { margin: 0 0 14px; padding: 12px; border: 1px solid #9c5151; border-radius: 11px; background: #51232e; color: #ffe0e0; font-size: 11px; }

        footer { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; text-align: center; }



        @media (max-width: 1180px) {

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

            .nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }

            .main-grid { grid-template-columns: 1fr; }

            .equipment-layout { grid-template-columns: minmax(210px, .8fr) minmax(0, 1.2fr); }

            .hero-grid { grid-template-columns: repeat(3, 1fr); }

            .lower-grid { grid-template-columns: 1fr; }

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

            .history-panels { grid-template-columns: 1fr; }

        }

        @media (max-width: 720px) {

            .page { width: calc(100% - 22px); padding-top: 11px; }

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

            .header { gap: 9px; }

            .brand-house { width: 41px; height: 41px; }

            .main-grid, .system-grid, .lower-grid { grid-template-columns: 1fr; }

            .system-stack { height: auto; grid-template-rows: auto auto; align-content: start; }

            .main-grid > :first-child { grid-column: auto; }

            .balance-stack { grid-template-rows: auto auto; }

            .equipment-layout { grid-template-columns: 1fr; }

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

            .metric { grid-template-columns: 43px minmax(0, 1fr); gap: 8px; padding: 10px; }

            .metric-icon { width: 42px; height: 42px; }

            .metric-icon img { width: 36px; height: 36px; }

            .metric-copy { min-height: 94px; }

            .metric-label { font-size: 13px; }

            .metric-value { font-size: clamp(19px, 5.1vw, 25px); }

            .metric-detail { font-size: 11px; }

            .metric-bottom { grid-template-columns: minmax(0, 1fr) minmax(42px, .8fr); gap: 4px; }

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

            .product-image { height: 155px; }

        }

        @media (max-width: 440px) {

            .hero-grid, .consumer-grid { grid-template-columns: 1fr; }

            .header-tools { gap: 3px; }

            .header-date { font-size: 10px; }

            .header-datetime { min-width: 68px; }

            .header-tools .tool-button { padding: 7px 8px; }

            .weather-header { gap: 2px; min-width: 64px; }

            .weather-header-icon { width: 32px; height: 32px; font-size: 24px; }

            .weather-header-icon img { width: 30px; height: 30px; }

            .weather-header-place { display: none; }

            .balance-diagram { min-height: 190px; gap: 0 4px; }

            .balance-node { flex-direction: column; gap: 2px; padding: 5px 2px; }

            .balance-node img { width: 30px; height: 30px; }

            .balance-node .tower-icon { width: 26px; height: 35px; }

            .balance-label { font-size: 9px; }

            .balance-value { font-size: 12px; }

            .balance-direction { font-size: 8px; }

            .balance-hp { width: 72%; }

            .energy-heading-controls { gap: 4px; }

            .energy-date-controls .date-title { min-width: 0; font-size: 10px; }

            .energy-date-controls a, .energy-date-controls .price-nav-disabled { padding: 4px 6px; }

            .price-chart-wrap { height: 160px; grid-template-columns: 43px minmax(0, 1fr); }

            .price-y-axis { font-size: 9px; }

            .cheap-title { font-size: 12px; }

            .cheap-row, .cheap-row strong { font-size: 10px; }

            .today-energy-grid { grid-template-columns: 1fr; }

            .cheap-columns { grid-template-columns: 1fr; }

            .meter-grid { grid-template-columns: 1fr; }

            .equipment-gallery { gap: 6px; }

            .equipment-figure { padding: 7px; }

            .product-image { height: 125px; }

        }



        .date-jump { display:flex; align-items:center; justify-content:center; gap:6px; min-width:0; margin:6px 0 12px; }

        .date-jump-select { max-width:100%; min-width:0; cursor:pointer; border:1px solid var(--line); border-radius:8px; padding:7px 24px 7px 9px; background:var(--panel); color:var(--text); font:inherit; font-size:12px; font-weight:750; }

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

        .date-jump option, .date-jump optgroup { background:var(--panel); color:var(--text); font-size:14px; }

        .history-panel .date-jump { flex:0 0 auto; }

        .chart-is-expanded .date-jump-select, :fullscreen .date-jump-select { font-size:clamp(17px,1.5vw,24px); padding:10px 30px 10px 12px; }

        [data-price-panel].chart-is-expanded .cheap-columns, [data-price-panel]:fullscreen .cheap-columns { gap:clamp(24px,4vw,70px); margin-top:24px; }

        [data-price-panel].chart-is-expanded .cheap-title, [data-price-panel]:fullscreen .cheap-title { font-size:clamp(18px,1.5vw,25px); margin:14px 0 10px; }

        [data-price-panel].chart-is-expanded .cheap-row, [data-price-panel]:fullscreen .cheap-row { font-size:clamp(17px,1.4vw,24px); line-height:1.55; padding:7px 0; gap:18px; }

        [data-price-panel].chart-is-expanded .cheap-row strong, [data-price-panel]:fullscreen .cheap-row strong { font-size:clamp(20px,1.7vw,28px); font-weight:800; }

        [data-price-panel].chart-is-expanded .price-tick, [data-price-panel]:fullscreen .price-tick { font-size:14px; }

        [data-price-panel].chart-is-expanded .price-y-axis, [data-price-panel]:fullscreen .price-y-axis { font-size:15px; }

        .solar-estimate-note { margin-top:8px; line-height:1.45; }



        .energy-insights { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0 16px; }

        .insight-card { min-width:0; padding:18px; border:1px solid var(--line); border-radius:14px; background:var(--panel); display:flex; align-items:center; gap:18px; }

        .insight-copy { min-width:0; flex:1; }

        .insight-card h3 { margin:0 0 7px; font-size:14px; }

        .insight-value { color:var(--green); font-size:27px; font-weight:800; line-height:1.2; }

        .insight-cost .insight-value { color:var(--purple); }

        .insight-card p { margin:5px 0; color:var(--muted); font-size:12px; line-height:1.5; }

        .insight-card .insight-note { font-size:11px; }

        .insight-donut { --self:0; width:110px; height:110px; flex:0 0 110px; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--yellow) calc(var(--self)*1%),var(--blue) 0); position:relative; }

        .insight-donut:before { content:''; position:absolute; inset:13px; border-radius:50%; background:var(--panel); }

        .insight-donut strong { position:relative; font-size:26px; }

        .insight-balance { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 15px; margin:10px 0; font-size:12px; }

        .insight-badge { display:inline-block; margin-left:6px; border:1px solid var(--line); border-radius:12px; padding:2px 7px; color:var(--muted); font-size:10px; }

        .history-insights-expanded { display:none; }

        .history-fullscreen-surface.chart-is-expanded .history-insights-overview, .history-fullscreen-surface:fullscreen .history-insights-overview { display:none; }

        .history-fullscreen-surface.chart-is-expanded .is-focus-expanded .history-insights-expanded, .history-fullscreen-surface:fullscreen .is-focus-expanded .history-insights-expanded { display:block; }

        @media(max-width:760px) { .energy-insights { grid-template-columns:minmax(0,1fr); } .insight-card { padding:13px; gap:12px; } .insight-donut { width:86px; height:86px; flex-basis:86px; } .insight-donut strong { font-size:22px; } }

    .automation-panel{position:relative}.automation-panel h3{padding-right:40px}.automation-log{max-height:420px;overflow:auto;overscroll-behavior:contain;margin:16px 0}.automation-action{padding:15px 8px;border-bottom:1px solid var(--border,#cbd5e1)}.automation-action p{white-space:normal;line-height:1.55;margin:8px 0}.automation-action-head{display:flex;gap:14px;justify-content:space-between;align-items:center}.automation-status{border:1px solid #a17a25;border-radius:16px;padding:3px 10px;font-size:12px;white-space:nowrap}.automation-panel.chart-is-expanded{position:fixed;inset:0;display:flex;flex-direction:column;width:100%;height:100dvh;max-height:100dvh;overflow:hidden;padding:clamp(16px,3vw,36px)}.automation-panel.chart-is-expanded .automation-log{flex:1 1 auto;min-height:0;max-height:none;overflow:auto}.automation-panel.chart-is-expanded>h3,.automation-panel.chart-is-expanded>p,.automation-panel.chart-is-expanded>details{flex:0 0 auto}.automation-panel.chart-is-expanded>.chart-expand-button{position:absolute;top:12px;right:12px;width:40px;height:40px}.automation-panel.chart-is-expanded .automation-action{padding:18px 8px}.automation-panel.chart-is-expanded .automation-action p{font-size:16px}

.price-resolution-switch{justify-content:center;margin:8px 0}.price-average-note{text-align:center;color:var(--muted);font-size:12px;margin:6px 0 10px}[data-price-panel].chart-is-expanded .price-resolution-switch a{font-size:17px;padding:10px 18px}

/* Shared rows align the five cards. Hidden cards never reserve a column. */

.main-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch}

.main-grid .balance-stack,.main-grid .system-grid,.main-grid .system-stack{display:contents}

.main-grid .surface{min-width:0;margin:0}

.main-grid.main-cards-0{display:none}

.main-grid.main-cards-1{grid-template-columns:minmax(0,1fr)}

.main-grid.main-cards-2,.main-grid.main-cards-4{grid-template-columns:repeat(2,minmax(0,1fr))}

.main-grid.main-cards-5{grid-template-columns:minmax(0,1.2fr) repeat(2,minmax(0,1fr));grid-template-rows:auto auto}

.main-cards-5 #balance{grid-column:1;grid-row:1}.main-cards-5 #energy-history{grid-column:1;grid-row:2}

.main-cards-5 #prices{grid-column:2;grid-row:1 / span 2}.main-cards-5 #heat-pump{grid-column:3;grid-row:1}

.main-cards-5 #battery{grid-column:3;grid-row:2}

.header-logout{margin:0;display:flex}.account-button{display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;padding:7px!important;flex:0 0 35px;text-decoration:none}

.account-button svg{display:block}

@media(max-width:1150px){.main-grid.main-cards-5{grid-template-columns:repeat(2,minmax(0,1fr))}.main-cards-5 #heat-pump{grid-column:1;grid-row:3}.main-cards-5 #battery{grid-column:2;grid-row:3}.equipment-layout{grid-template-columns:minmax(130px,.8fr) minmax(0,1.2fr)}}

@media(max-width:760px){.main-grid,.main-grid.main-cards-1,.main-grid.main-cards-2,.main-grid.main-cards-3,.main-grid.main-cards-4,.main-grid.main-cards-5{grid-template-columns:minmax(0,1fr)}.main-cards-5 #balance,.main-cards-5 #energy-history,.main-cards-5 #prices,.main-cards-5 #heat-pump,.main-cards-5 #battery{grid-column:auto;grid-row:auto}.main-grid #balance{order:0}.main-grid #energy-history{order:1}.main-grid #prices{order:2}.main-grid #heat-pump{order:3}.main-grid #battery{order:4}}


/* Phone layout: keep navigation and tools inside the page width. */
@media(max-width:720px){
.header{grid-template-columns:minmax(0,1fr);gap:12px}
.brand{min-width:0}.brand-title{font-size:20px}
.header-tools{grid-column:1;grid-row:2;justify-content:flex-start;flex-wrap:wrap;min-width:0;gap:7px}
.nav{grid-column:1;grid-row:3;min-width:0;max-width:100%;overflow-x:auto;justify-content:flex-start;padding-bottom:5px}
.nav a{flex:0 0 auto;min-height:40px;display:inline-flex;align-items:center}
.header-tools .tool-button{min-height:36px;min-width:36px}
.equipment-layout{grid-template-columns:minmax(0,1fr)}
.equipment-figure{max-width:240px;width:100%;justify-self:center}
.surface,.section,.history-panel{min-width:0;max-width:100%}
.energy-heading-controls{flex-wrap:wrap;justify-content:flex-end}
}


@media(max-width:720px){.price-bar-wrap{min-width:0}.price-chart{gap:.5px}}
@media(max-width:440px){.header-tools{gap:3px}.weather-header{min-width:0}.weather-header-copy{min-width:24px}.brand-subtitle{font-size:10px}}


.solar-forecast-card{margin:20px 0;max-width:860px}
.solar-forecast-card h2{margin-bottom:20px}
.solar-forecast-bars{display:flex;gap:28px;align-items:flex-end;padding:4px 10px 20px}
.solar-forecast-column{flex:1;max-width:190px;display:flex;flex-direction:column;gap:7px;text-align:center}
.solar-forecast-column>strong{font-size:28px;color:#bf8615}
.solar-forecast-column>strong small{font-size:14px}
.solar-forecast-column>span{font-size:13px;opacity:.75}
.solar-forecast-track{height:110px;border-bottom:1px solid var(--border,#cbd5e1);display:flex;align-items:flex-end;justify-content:center}
.solar-forecast-fill{width:65%;background:linear-gradient(0deg,#df9b20,#f2cc66);border-radius:8px 8px 0 0}
.solar-check-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;margin:20px 0 12px}
.solar-check-legend span{display:flex;gap:6px;align-items:center}
.solar-check-legend i{width:11px;height:11px;border-radius:3px;display:inline-block}
.solar-predicted{background:#dca326}
.solar-measured{background:#1976b8}
.solar-check-row{display:flex;gap:16px;align-items:center;margin:12px 0}
.solar-check-row>b{font-size:12px;min-width:40px}
.solar-check-pair{flex:1;min-width:0;padding-right:35px}
.solar-check-pair>div{height:17px;display:flex;align-items:center;gap:6px;margin:3px 0}
.solar-check-pair span{height:11px;min-width:2px;border-radius:3px;flex-shrink:0}
.solar-check-pair small{font-size:11px}


.solar-forecast-card{max-width:none;margin:0}
#solar-history{margin:24px 0}
.daikin-page{display:grid;gap:20px}
.daikin-hero{display:flex;align-items:center;gap:30px;padding:26px}
.daikin-product{width:180px;max-width:32%;object-fit:contain}
.daikin-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.daikin-metric{display:flex;flex-direction:column;gap:12px;padding:20px}
.daikin-metric>span{font-size:13px;opacity:.75}
.daikin-metric>strong{font-size:26px;color:#237bbb}
.daikin-settings{padding:24px}
.daikin-settings summary{cursor:pointer;font-weight:600;margin:20px 0}
.daikin-table-scroll{overflow:auto}
.daikin-table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}
.daikin-table td,.daikin-table th{padding:12px 10px;border-bottom:1px solid var(--border,#d7e2ec);vertical-align:top;overflow-wrap:anywhere}
.daikin-table th{font-size:12px;opacity:.8}
.daikin-table td:first-child{max-width:330px}
.daikin-access{font-size:11px;white-space:nowrap;background:#2780b414;padding:4px 7px;border-radius:6px}
.daikin-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:16px 0;overflow:auto}
.daikin-day{min-width:90px;background:#7180960a;padding:10px;border-radius:9px}
.daikin-day>b{display:block;margin-bottom:12px;font-size:12px}
.daikin-event{border-left:3px solid #377ea8;background:#377ea80d;border-radius:5px;padding:8px;margin:6px 0;font-size:12px}
.daikin-event.comfort{border-color:#dc9d2b;background:#dc9d2b12}
.daikin-event strong,.daikin-event span{display:block}
@media(max-width:1000px){.daikin-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.daikin-week{grid-template-columns:repeat(7,110px)}}
@media(max-width:600px){.daikin-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.daikin-hero{padding:18px;gap:15px}.daikin-settings{padding:16px}.daikin-metric>strong{font-size:23px}}


.daikin-field-code{display:block;font-size:10px;opacity:.55;margin-top:5px}
.daikin-search{display:flex;flex-direction:column;gap:8px;font-size:13px}
.daikin-search input{width:100%;max-width:520px;padding:13px 16px;border:1px solid var(--border,#cbd5e1);border-radius:10px;background:var(--surface,#fff);color:inherit;font:inherit}

.history-panels{grid-template-columns:repeat(2,minmax(0,1fr))}
.solar-history-panel{min-width:0}
.solar-period-chart{height:215px;display:flex;gap:14px;overflow-x:auto;align-items:stretch;padding:24px 10px 8px;border-bottom:1px solid var(--border,#d7e2ec)}
.solar-period-column{flex:1;min-width:48px;max-width:180px;display:flex;flex-direction:column;gap:8px;text-align:center}
.solar-period-column>span{font-size:11px}
.solar-period-pair{display:flex;align-items:flex-end;gap:5px;height:155px;padding-top:16px}
.solar-period-bar-wrap{position:relative;flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}
.solar-period-bar-wrap>i{width:100%;max-width:50px;border-radius:5px 5px 0 0;flex-shrink:0;display:block}
.solar-period-bar-wrap>small{font-size:10px;margin-bottom:4px}
.solar-no-data{opacity:.4}
.solar-total{color:#1976b8}.solar-forecast-total{color:#bf8615}
.history-fullscreen-surface.chart-is-expanded .history-panels{grid-template-columns:minmax(0,1fr)}
@media(max-width:850px){.history-panels{grid-template-columns:minmax(0,1fr)}}


.home-main-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.home-main-grid #balance{grid-column:auto;grid-row:1;order:0}
.home-main-grid #energy-history{grid-column:auto;grid-row:1;order:1}
.home-main-grid #solar-forecast{grid-column:auto;grid-row:1;order:2}
.home-main-grid #prices{grid-column:1 / -1;grid-row:2;order:3}
.home-main-grid #prices .chart-scroll{max-height:none}
.nexus-page:empty{display:none}
@media(max-width:1150px){.home-main-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.home-main-grid #balance{grid-column:1 / -1;grid-row:1}.home-main-grid #energy-history,.home-main-grid #solar-forecast{grid-row:2}.home-main-grid #prices{grid-row:3}}
@media(max-width:760px){.home-main-grid{grid-template-columns:minmax(0,1fr)!important}.home-main-grid #balance,.home-main-grid #energy-history,.home-main-grid #solar-forecast,.home-main-grid #prices{grid-column:auto;grid-row:auto}}


/* Aligned historical panels, contained notes, and forecast error comparison. */
.history-panels{align-items:stretch}
.history-panels>.history-panel{height:100%;margin-top:0!important;box-sizing:border-box;min-width:0}
.history-panel .history-chart-layout{flex:1;min-height:210px;max-height:330px}
.solar-history-panel{display:flex;flex-direction:column;gap:12px}
.solar-history-panel .solar-period-chart{flex:1;min-height:250px;margin:0;padding-top:14px}
.solar-history-panel .solar-period-column{min-width:85px}
.solar-history-panel .solar-period-bar-wrap{min-width:20px}
.solar-history-panel .solar-period-pair{gap:5px}
.solar-history-panel .history-period-totals{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:0}
.solar-history-panel .history-day-total{min-width:0}
.solar-history-panel .history-day-total span{white-space:normal}
.solar-history-note{font-size:12px;line-height:1.5;text-align:left;white-space:normal;overflow-wrap:anywhere;margin:0;color:var(--muted)}
.solar-difference{background:#b27de8!important}.solar-difference-total{color:#b27de8}
.cost-completion-table{overflow-x:auto;margin-top:10px}
.cost-completion-table table{width:100%;border-collapse:collapse;font-size:12px}
.cost-completion-table th,.cost-completion-table td{text-align:left;padding:7px;border-bottom:1px solid var(--border)}
@media(max-width:600px){.solar-history-panel .history-period-totals{grid-template-columns:1fr}}

.history-panel[data-history-kind="prices"] .history-chart-layout{max-height:none;min-height:250px;flex:1}
.history-panel[data-history-kind="prices"] .history-chart{height:100%;min-height:250px;box-sizing:border-box}
.solar-history-panel .solar-period-pair{height:auto;min-height:180px;flex:1}
.solar-history-panel .solar-period-column{padding-bottom:8px}
.solar-history-panel .solar-period-bar-wrap{height:100%;min-height:180px}
.solar-history-panel .history-period-totals{margin-top:0!important}

.history-panel[data-history-kind="prices"] .history-y-axis{height:100%;min-height:250px;box-sizing:border-box}

/* Dashboard: balance + power, followed by forecast + electricity prices. */
.home-main-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.home-main-grid #balance{grid-column:1;grid-row:1;order:0}
.home-main-grid #energy-history{grid-column:2;grid-row:1;order:1}
.home-main-grid #solar-forecast{grid-column:1;grid-row:2;order:2}
.home-main-grid #prices{grid-column:2;grid-row:2;order:3}
@media(max-width:760px){.home-main-grid{grid-template-columns:minmax(0,1fr)!important}.home-main-grid #balance,.home-main-grid #energy-history,.home-main-grid #solar-forecast,.home-main-grid #prices{grid-column:auto;grid-row:auto}}

/* Energy and forecast above; live balance next to prices below. */
.home-main-grid #energy-history{grid-column:1;grid-row:1;order:0}
.home-main-grid #solar-forecast{grid-column:2;grid-row:1;order:1}
.home-main-grid #balance{grid-column:1;grid-row:2;order:2;display:flex;flex-direction:column}
.home-main-grid #prices{grid-column:2;grid-row:2;order:3}
.home-main-grid #balance .balance-diagram{flex:1;min-height:360px;grid-template-rows:112px 1fr;gap:0 14px;padding-top:15px}
.home-main-grid #balance .balance-node{padding:16px 10px;flex-direction:column;justify-content:center;text-align:center;gap:8px}
.home-main-grid #balance .balance-node img{width:52px;height:52px}
.home-main-grid #balance .balance-node .tower-icon{width:44px;height:54px}
.home-main-grid #balance .balance-label{font-size:12px}
.home-main-grid #balance .balance-value{font-size:24px}
.home-main-grid #balance .balance-arrows{top:100px;height:calc(100% - 140px)}
.home-main-grid #balance .balance-hp{align-self:center;margin-top:75px;margin-bottom:28px;padding:20px 24px;min-width:220px}
.home-main-grid #balance .balance-hp img{width:76px;height:62px}
.home-main-grid #balance .balance-hp-value{font-size:25px}
@media(max-width:760px){.home-main-grid #balance,.home-main-grid #energy-history,.home-main-grid #solar-forecast,.home-main-grid #prices{grid-column:auto;grid-row:auto}.home-main-grid #balance .balance-diagram{min-height:290px}.home-main-grid #balance .balance-value{font-size:18px}.home-main-grid #balance .balance-node img{width:38px;height:38px}.home-main-grid #balance .balance-node{padding:10px 4px}.home-main-grid #balance .balance-hp{margin-top:45px;min-width:180px}}

.home-main-grid #balance .balance-diagram{grid-template-rows:160px 1fr}
.home-main-grid #balance .balance-arrows{top:95px;height:330px}
@media(max-width:760px){.home-main-grid #balance .balance-diagram{grid-template-rows:140px 1fr}.home-main-grid #balance .balance-arrows{top:80px;height:240px}}

/* Overview hierarchy: live + prices, daily insights, then power + forecast. */
.home-main-grid #balance{grid-column:1;grid-row:1;order:0}
.home-main-grid #prices{grid-column:2;grid-row:1;order:1}
.home-main-grid .home-insights-row{grid-column:1 / -1;grid-row:2;order:2;min-width:0}
.home-insights-row .energy-insights{margin:0}
.home-main-grid #energy-history{grid-column:1;grid-row:3;order:3}
.home-main-grid #solar-forecast{grid-column:2;grid-row:3;order:4}
.home-main-grid #balance .balance-diagram{flex:0 0 auto;min-height:270px;height:270px;grid-template-rows:90px 160px;gap:0 10px;padding:4px 2px;margin:auto 0}
.home-main-grid #balance .balance-node{flex-direction:row;justify-content:flex-start;text-align:left;padding:10px 9px;gap:8px;border-radius:13px}
.home-main-grid #balance .balance-node img{width:40px;height:40px}
.home-main-grid #balance .balance-node .tower-icon{width:34px;height:44px}
.home-main-grid #balance .balance-label{font-size:11px}
.home-main-grid #balance .balance-value{font-size:20px}
.home-main-grid #balance .balance-hp{align-self:end;justify-self:center;width:min(54%,270px);min-width:0;min-height:80px;margin:0;padding:10px 15px;gap:13px}
.home-main-grid #balance .balance-hp img{width:76px;height:49px}
.home-main-grid #balance .balance-hp-value{font-size:20px}
.home-main-grid #balance .balance-arrows{top:50px;height:180px}
@media(max-width:760px){.home-main-grid #balance,.home-main-grid #prices,.home-main-grid .home-insights-row,.home-main-grid #energy-history,.home-main-grid #solar-forecast{grid-column:auto;grid-row:auto}.home-main-grid #balance .balance-diagram{min-height:250px;height:250px;grid-template-rows:90px 140px;margin:10px 0}.home-main-grid #balance .balance-node{flex-direction:column;justify-content:center;text-align:center;padding:7px 3px;gap:3px}.home-main-grid #balance .balance-node img{width:32px;height:32px}.home-main-grid #balance .balance-label{font-size:10px}.home-main-grid #balance .balance-value{font-size:17px}.home-main-grid #balance .balance-hp{width:65%;min-height:70px}.home-main-grid #balance .balance-arrows{top:48px;height:160px}}

/* A balanced flow composition that uses the complete live panel. */
.home-main-grid #balance{padding:20px;gap:14px}
.home-main-grid #balance .panel-head{margin:0}
.home-main-grid #balance .balance-diagram{display:block;position:relative;flex:1 1 auto;width:100%;height:auto;min-height:420px;margin:0;padding:0}
.home-main-grid #balance .balance-node{position:absolute;top:clamp(24px,8%,42px);width:calc((100% - 28px)/3);height:116px;box-sizing:border-box;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:16px 12px;gap:11px;border:1px solid var(--line);border-left:3px solid currentColor;border-radius:14px;box-shadow:0 8px 24px rgba(0,0,0,.09)}
.home-main-grid #balance .balance-node.solar{left:0}
.home-main-grid #balance .balance-node.home{left:50%;transform:translateX(-50%)}
.home-main-grid #balance .balance-node.net{right:0}
.home-main-grid #balance .balance-node img{width:46px;height:46px;padding:6px;border-radius:11px;box-sizing:border-box}
.home-main-grid #balance .balance-node .tower-icon{width:38px;height:48px;padding:4px;box-sizing:border-box}
.home-main-grid #balance .balance-label{font-size:11px;font-weight:600;line-height:1.4}
.home-main-grid #balance .balance-value{font-size:clamp(19px,1.8vw,26px);line-height:1.2;margin-top:7px;font-variant-numeric:tabular-nums;letter-spacing:-.03em}
.home-main-grid #balance .balance-direction{font-size:10px;margin-top:4px}
.home-main-grid #balance .balance-hp{position:absolute;bottom:clamp(28px,8%,42px);left:50%;transform:translateX(-50%);width:58%;max-width:330px;height:110px;min-height:0;box-sizing:border-box;margin:0;padding:18px 22px;gap:18px;border-radius:15px;box-shadow:0 10px 28px rgba(0,0,0,.1)}
.home-main-grid #balance .balance-hp img{width:86px;height:60px;padding:6px;box-sizing:border-box;border-radius:10px}
.home-main-grid #balance .balance-hp-label{font-size:12px;font-weight:600}
.home-main-grid #balance .balance-hp-value{font-size:28px;line-height:1.2;margin-top:7px;font-variant-numeric:tabular-nums}
.home-main-grid #balance .balance-arrows{inset:0;width:100%;height:100%;overflow:visible}
.home-main-grid #balance .balance-arrows>path{stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
@media(max-width:760px){.home-main-grid #balance{padding:16px}.home-main-grid #balance .balance-diagram{height:350px;min-height:350px;flex:0 0 auto}.home-main-grid #balance .balance-node{height:112px;top:14px;flex-direction:column;justify-content:center;text-align:center;padding:9px 4px;gap:4px;width:calc((100% - 16px)/3)}.home-main-grid #balance .balance-node img{width:34px;height:34px}.home-main-grid #balance .balance-node .tower-icon{width:30px;height:36px}.home-main-grid #balance .balance-label{font-size:10px}.home-main-grid #balance .balance-value{font-size:18px;margin-top:2px}.home-main-grid #balance .balance-direction{font-size:9px;margin-top:1px}.home-main-grid #balance .balance-hp{bottom:18px;width:70%;height:96px;padding:14px 18px;gap:14px}.home-main-grid #balance .balance-hp img{width:72px;height:54px}.home-main-grid #balance .balance-hp-value{font-size:24px}}

/* House-centered composition with prominent pictograms. */
.home-main-grid #balance .balance-diagram{min-height:470px}
.home-main-grid #balance .balance-node{top:48%;transform:translateY(-50%);height:174px;width:27%;flex-direction:column;justify-content:center;text-align:center;gap:8px;padding:15px 8px;background:linear-gradient(145deg,var(--panel-2),var(--panel));box-shadow:0 10px 28px rgba(0,0,0,.1)}
.home-main-grid #balance .balance-node.solar{left:0}
.home-main-grid #balance .balance-node.net{right:0}
.home-main-grid #balance .balance-node.home{left:50%;top:40%;transform:translate(-50%,-50%);width:35%;height:208px;background:linear-gradient(145deg,color-mix(in srgb,var(--blue) 17%,var(--panel-2)),var(--panel));border:1px solid color-mix(in srgb,var(--blue) 50%,var(--line));box-shadow:0 14px 35px rgba(0,0,0,.15)}
.home-main-grid #balance .balance-node img{width:76px;height:76px;padding:8px;border-radius:17px;background:color-mix(in srgb,currentColor 10%,transparent)}
.home-main-grid #balance .balance-node.home img{width:102px;height:102px;padding:13px;border-radius:23px}
.home-main-grid #balance .balance-node .tower-icon{width:72px;height:82px;padding:7px;border-radius:16px}
.home-main-grid #balance .balance-label{font-size:12px;line-height:1.3}
.home-main-grid #balance .balance-value{font-size:26px;line-height:1.15;margin-top:5px}
.home-main-grid #balance .balance-node.home .balance-value{font-size:32px}
.home-main-grid #balance .balance-hp{bottom:20px;width:57%;height:112px;max-width:330px;padding:15px 22px;gap:20px}
.home-main-grid #balance .balance-hp img{width:106px;height:80px;padding:6px;border-radius:14px}
.home-main-grid #balance .balance-hp-value{font-size:28px}
.home-main-grid #balance .balance-arrows>path{stroke-width:2.5;opacity:.95}
@media(max-width:760px){.home-main-grid #balance .balance-diagram{height:440px;min-height:440px}.home-main-grid #balance .balance-node{top:45%;width:27%;height:154px;padding:10px 3px;gap:6px}.home-main-grid #balance .balance-node.home{top:38%;width:35%;height:184px}.home-main-grid #balance .balance-node img{width:56px;height:56px;padding:5px}.home-main-grid #balance .balance-node.home img{width:80px;height:80px;padding:9px}.home-main-grid #balance .balance-node .tower-icon{width:52px;height:64px;padding:5px}.home-main-grid #balance .balance-label{font-size:10px}.home-main-grid #balance .balance-value{font-size:19px}.home-main-grid #balance .balance-node.home .balance-value{font-size:23px}.home-main-grid #balance .balance-hp{width:76%;bottom:16px;height:104px;padding:12px 18px;gap:16px}.home-main-grid #balance .balance-hp img{width:92px;height:72px}.home-main-grid #balance .balance-hp-value{font-size:25px}}

/* Sources in the upper corners; restrained central house pictogram. */
.home-main-grid #balance .balance-node.solar,.home-main-grid #balance .balance-node.net{top:24px;transform:none}
.home-main-grid #balance .balance-node.home img{width:86px;height:86px;padding:10px;border-radius:19px}
@media(max-width:760px){.home-main-grid #balance .balance-node.solar,.home-main-grid #balance .balance-node.net{top:12px;transform:none}.home-main-grid #balance .balance-node.home img{width:68px;height:68px;padding:8px;border-radius:16px}}

/* Stronger house pictogram with a more compact surrounding tile. */
.home-main-grid #balance .balance-node.home{width:32%;height:188px;padding:12px 8px;gap:5px}
.home-main-grid #balance .balance-node.home img{width:100px;height:100px;padding:5px;border-radius:18px;background:transparent}
.home-main-grid #balance .balance-node.home .balance-value{font-size:29px;margin-top:3px}
@media(max-width:760px){.home-main-grid #balance .balance-node.home{width:33%;height:172px;padding:10px 5px;gap:5px}.home-main-grid #balance .balance-node.home img{width:82px;height:82px;padding:4px;border-radius:15px}.home-main-grid #balance .balance-node.home .balance-value{font-size:23px}}

.home-main-grid #balance .balance-arrows>path{stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;opacity:.9}
