/* Solar planner, wide-screen studio (owner, Nov 15, pass 1). Loads after the planner's own stylesheet
   (solar-profile.css), which stays exactly as it was. On computers and landscape screens wide enough for it:
   - the planner runs up to 1680px wide (S1) and fits one screen (S2)
   - the five step tabs and the save bar share one top row (S4)
   - three columns (S5, option A): the step form on the left, the energy chart in the centre (widest), the roof
     animation, satellite reference and system details on the right; the live-model header runs over the centre and
     right; the step form scrolls inside its column with Back / Next pinned at its foot (S6)
   - the Power On logo signs the planner at its bottom-right corner (S10; shown on every layout)
   No markup moves: .sp-stage and .sp-results become invisible boxes (display: contents) so their children can be
   placed on the workspace grid. Phones, portrait tablets and narrow windows keep the stacked planner. */

.sp-brand-logo { display: block; width: 124px; height: auto; margin: 0 26px 22px auto; opacity: .92; }

@media (min-width: 1180px) and (orientation: landscape) {
  .solar-profile-section .container { width: min(1680px, calc(100vw - 48px)); }
  .solar-profile-section .sp-intro { margin-bottom: 22px; }

  /* top row: the step tabs, then the save bar */
  .sp-tool { --sp-top: 64px; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .sp-step-tabs { grid-column: 1; grid-row: 1; min-width: 0; }
  .sp-step-tab { min-height: var(--sp-top); padding: 10px 14px; gap: 10px; }
  .sp-toolbar { grid-column: 2; grid-row: 1; min-height: var(--sp-top); padding: 10px 16px; gap: 14px; border-left: 1px solid var(--sp-line); background: #030a06; }
  .sp-profile-state { max-width: 250px; }
  .sp-profile-state strong { font-size: 12px; }
  .sp-profile-state span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  @media (max-width: 1599px) { .sp-profile-state { max-width: 190px; } .sp-profile-state span { display: none; } }
  .sp-toolbar-actions { gap: 8px; }
  .sp-toolbar-actions .sp-button { min-height: 40px; padding: 0 14px; }
  .sp-toolbar-actions .sp-icon-button { width: 40px; height: 40px; }

  /* the workspace: one screen tall, three columns */
  .sp-workspace { grid-column: 1 / -1; grid-row: 2; min-height: 0;
    height: clamp(640px, calc(100vh - 84px - var(--sp-top) - 4px), 1020px); height: clamp(640px, calc(100svh - 84px - var(--sp-top) - 4px), 1020px);
    grid-template-columns: minmax(320px, .78fr) minmax(0, 1.5fr) minmax(360px, 1.02fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "form head head" "form chart roof" "form chart sys" "form chart logo" "form sum sum";
    background: #031008; }
  .sp-stage, .sp-results { display: contents; }

  /* left: the step form, scrolling inside its column, Back / Next pinned at its foot */
  .sp-interview { grid-area: form; height: auto; min-height: 0; padding: 20px 22px 0; }
  .sp-interview .sp-navigation { bottom: 0; margin-top: 20px; padding: 14px 0 16px; }

  /* the live-model header over the centre and right */
  .sp-stage-header { grid-area: head; min-height: 0; padding: 12px 20px; }

  /* centre: the chart, filling its column */
  .sp-chart-panel { grid-area: chart; display: flex; flex-direction: column; min-height: 0; margin: 14px 10px 14px 16px; overflow: hidden; }
  .sp-chart-panel > .sp-chart-wrap { flex: 1 1 auto; height: auto; min-height: 220px; }
  .sp-chart-panel > :not(.sp-chart-wrap) { flex: 0 0 auto; }

  /* right: the roof animation and satellite reference, then the system details; the logo in the corner */
  .sp-roof-lab { grid-area: roof; min-width: 0; padding: 14px 16px 0 6px; border-bottom: 0; background: transparent; }
  .sp-roof-visuals { gap: 10px; }
  .sp-array-head, .sp-map-thumbnail-head { min-height: 0; padding: 10px 12px; }
  .sp-array-surface { height: clamp(170px, calc(100vh - 660px), 300px); }
  .sp-map-thumbnail { grid-template-columns: minmax(150px, 46%) minmax(0, 1fr); }
  .sp-roof-details > summary { padding: 8px 4px; min-height: 40px; }
  .sp-system-details { grid-area: sys; align-self: stretch; min-width: 0; min-height: 0; margin: 0; padding: 4px 16px 0 6px; overflow-y: auto; overscroll-behavior-y: contain; }
  .sp-system-details .sp-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-brand-logo { grid-area: logo; align-self: end; justify-self: end; width: 116px; margin: 6px 18px 16px 0; }

  /* the review step's summary runs under the chart and the roof */
  .sp-profile-summary { grid-area: sum; min-width: 0; margin: 0 16px 16px; }

  /* laptop widths: the chart's yearly totals stay on one line each */
  @media (max-width: 1699px) { .sp-graph-metrics strong { font-size: 13.5px; white-space: nowrap; } }
  /* narrower wide screens (a tablet held sideways, small laptops): totals two by two, the animation head wraps */
  @media (max-width: 1365px) {
    .sp-graph-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; }
    .sp-graph-metrics strong { white-space: normal; }
    .sp-array-head { flex-wrap: wrap; }
    .sp-step-tab small { display: none; }
  }
}

/* ---------- pass 2 (owner, Nov 15) ---------- */
/* S3: each step tab shows its answer under the step name (wide layout; the phone tabs are too narrow for it), the
   step's own hint gives way to it */
.sp-tab-answer { display: none; }
@media (min-width: 1180px) and (orientation: landscape) {
.sp-tab-answer { display: block; margin-top: 3px; overflow: hidden; color: var(--sp-green, #6ccb3f); font-size: 10.5px; font-style: normal; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.sp-tab-answer[hidden] { display: none; }
.sp-step-tab-copy:has(.sp-tab-answer:not([hidden])) small { display: none; }
.sp-step-tab[aria-selected="true"] .sp-tab-answer { color: var(--sp-gold, #ffd222); }
}

/* S9: plain-language cards above the chart (every layout); on the year and power tabs they carry the totals strip's
   numbers, so that strip steps aside while they show */
.sp-chart-panel[data-easy-covers] .sp-graph-metrics { display: none; }
.sp-easy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; }
.sp-easy[hidden] { display: none; }
.sp-easy-c { display: grid; align-content: start; gap: 2px; min-width: 0; padding: 9px 12px 10px; border: 1px solid var(--sp-line); border-top: 2px solid var(--sp-cyan, #42d4ed); border-radius: 8px; background: rgba(255, 255, 255, .03); }
.sp-easy-c.is-good { border-top-color: var(--sp-green, #6ccb3f); background: linear-gradient(180deg, rgba(108, 203, 63, .09), rgba(255, 255, 255, .02) 70%); }
.sp-easy-c span { color: var(--sp-muted); font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.sp-easy-c strong { color: var(--sp-white, #f7f8ef); font-size: 19px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.sp-easy-c.is-good strong { color: #b9f29a; }
.sp-easy-c small { color: var(--sp-dim); font-size: 11.5px; line-height: 1.35; }
@media (max-width: 620px) {
  .sp-easy { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .sp-easy-c { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline; }
  .sp-easy-c span { grid-column: 1; }
  .sp-easy-c strong { grid-column: 2; grid-row: 1 / 3; align-self: center; text-align: right; font-size: 17px; }
  .sp-easy-c small { grid-column: 1; }
}

@media (min-width: 1180px) and (orientation: landscape) {
  .sp-step-tab { align-content: center; }

  /* S7: the animation and the satellite photo side by side, two equal squares; the address and note under them */
  .sp-roof-visuals { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "ahead ahead" "anim map" "addr addr"; gap: 0; overflow: hidden; border: 1px solid var(--sp-line); border-radius: 6px; background: #060d08; }
  .sp-array-stage, .sp-map-thumbnail { display: contents; }
  .sp-array-head { grid-area: ahead; flex-wrap: wrap; gap: 8px 12px; border-bottom: 1px solid var(--sp-line); }
  .sp-array-head small { display: none; }
  .sp-array-surface { grid-area: anim; height: auto; aspect-ratio: 1 / 1.2; max-height: clamp(160px, calc(100vh - 680px), 340px); border-right: 1px solid var(--sp-line); }
  .sp-map-thumbnail-viewport { grid-area: map; aspect-ratio: 1 / 1.2; max-height: clamp(160px, calc(100vh - 680px), 340px); border-right: 0; }
  .sp-map-thumbnail-head { grid-area: addr; display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; padding: 8px 12px 0; border-top: 1px solid var(--sp-line); }
  .sp-map-thumbnail-head strong { margin-top: 0; font-size: 12px; }
  .sp-map-thumbnail > small { grid-column: 1 / -1; grid-row: 4; padding: 2px 12px 9px; font-size: 9.5px; }
  /* the roof fold repeats the four system numbers that now sit open below */
  .sp-roof-details { display: none; }

  /* S8: the system numbers open under the roof, two by two (the fold itself is opened by solar-studio.js) */
  .sp-system-details > summary { display: none; }
  .sp-system-details { border-top: 0; margin-bottom: 0; padding-top: 10px; }
  .sp-system-details .sp-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--sp-line); border-radius: 6px; }
  .sp-system-details .sp-metric { padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--sp-line); }
  .sp-system-details .sp-metric:nth-child(odd) { border-right: 1px solid var(--sp-line); }
  .sp-system-details .sp-metric:nth-last-child(-n+2) { border-bottom: 0; }
  .sp-system-details .sp-metric > span { font-size: 10px; letter-spacing: .04em; }
  .sp-system-details .sp-metric strong { margin-top: 2px; font-size: 18px; }
  .sp-system-details .sp-metric small { display: -webkit-box; margin-top: 2px; overflow: hidden; font-size: 10.5px; line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

  /* narrower wide screens: the plain cards stay on one line each, the animation runs full width over the photo */
  @media (max-width: 1365px) {
    .sp-easy-c strong { font-size: 15px; white-space: nowrap; }
    .sp-easy-c small { font-size: 10.5px; }
    .sp-roof-visuals { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "ahead ahead" "anim anim" "map addr"; }
    .sp-array-surface { aspect-ratio: auto; height: clamp(120px, calc(100vh - 700px), 200px); max-height: none; border-right: 0; border-bottom: 1px solid var(--sp-line); }
    .sp-map-thumbnail-viewport { aspect-ratio: 1 / 1; max-height: 170px; border-right: 1px solid var(--sp-line); }
    .sp-map-thumbnail-head { display: block; padding: 10px 12px 0; border-top: 0; }
    .sp-map-thumbnail > small { grid-column: 2; grid-row: 3; align-self: end; }
    .sp-map-thumbnail-viewport { max-height: 140px; }
    .sp-system-details .sp-metric small { display: none; }
    .sp-system-details .sp-metric strong { font-size: 16px; }
  }
}

/* ---------- steps 2-5 clean-up (owner, Nov 15): calmer, easier to read, the optional parts clearly optional ---------- */
.sp-code { display: none !important; }

/* one rhythm for every step: a clear heading, roomy groups, short readable notes */
.sp-interview .sp-pane-head { padding-bottom: 18px; border-bottom: 1px solid var(--sp-line); }
.sp-interview .sp-pane-head h3 { font-size: clamp(22px, 1.7vw, 26px); letter-spacing: -.01em; }
.sp-interview .sp-pane-head p { margin-top: 8px; color: var(--sp-muted); font-size: 13.5px; line-height: 1.55; }
.sp-interview .sp-form-group { padding: 20px 0; }
.sp-interview .sp-form-label span, .sp-interview .sp-form-label { font-size: 13px; }
.sp-interview .sp-help { color: var(--sp-dim); font-size: 12px; line-height: 1.55; }
.sp-interview .sp-form-group > .sp-help:not(:empty), .sp-interview .sp-pane > .sp-help:not(:empty) { margin: 10px 0 0; padding: 8px 12px; border-left: 2px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .02); border-radius: 0 6px 6px 0; }
.sp-interview .sp-help:empty { display: none; }
.sp-interview .sp-scenario-details > summary, .sp-interview details.sp-form-group > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; font-size: 14px; font-weight: 600; }

/* step 02: the ways to give your usage, as one clean choice panel */
.sp-energy-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 6px; }
.sp-energy-paths button { min-height: 46px; padding: 10px 12px; border-color: var(--sp-line); background: rgba(255, 255, 255, .03); font-size: 13px; line-height: 1.3; transition: border-color .2s ease, background-color .2s ease; }
.sp-energy-paths button:hover { border-color: rgba(108, 203, 63, .55); background: rgba(108, 203, 63, .07); }
.sp-energy-paths button:first-child { grid-column: 1 / -1; border-color: rgba(108, 203, 63, .55); background: linear-gradient(180deg, rgba(108, 203, 63, .14), rgba(108, 203, 63, .05)); }
.sp-energy-paths button strong { color: #b9f29a; }
/* the dollar inputs are marked optional */
#spFinancialRates > summary::after, .sp-history > summary::after { content: "Optional"; margin-left: auto; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; color: var(--sp-muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
#spFinancialEnergyContext:not(:empty) { margin-top: 2px; }
.sp-guided-bills { border-radius: 10px; }

/* step 03: the review notes as a tidy checklist */
.sp-readiness-result { padding: 14px 16px; border-color: rgba(255, 210, 34, .28); border-radius: 10px; background: rgba(255, 210, 34, .03); }
.sp-readiness-result > strong { display: flex; align-items: center; gap: 8px; color: var(--sp-gold, #ffd222); font-size: 14px; }
.sp-readiness-result > strong::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.sp-readiness-result ul { display: grid; gap: 6px; margin: 12px 0 8px; padding: 0; list-style: none; }
.sp-readiness-result li { position: relative; padding: 7px 10px 7px 26px; border: 1px solid var(--sp-line); border-radius: 6px; background: rgba(255, 255, 255, .025); color: #dfe6da; font-size: 12.5px; line-height: 1.4; }
.sp-readiness-result li::before { content: ""; position: absolute; top: 12px; left: 11px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 210, 34, .8); }
.sp-readiness-result .sp-help { margin-top: 6px; font-size: 11px; }

/* steps 04 and 05: the dollars block, optional until a bill rate is given */
.sp-financial { border-radius: 10px; }
.sp-optional-card { display: none; }
.sp-financial.is-optional-empty .sp-optional-card { display: grid; gap: 6px; padding: 2px 0 0; }
.sp-financial.is-optional-empty > :not(h4):not(.sp-optional-card) { display: none; }
.sp-financial.is-optional-empty #spFinancialResults, .sp-financial.is-optional-empty #spFinancialReview { display: none; }
.sp-financial.is-optional-empty { padding: 16px; border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .025); }
.sp-financial.is-optional-empty h4 { margin-bottom: 4px; font-size: 16px; color: var(--sp-white, #f7f8ef); }
.sp-opt-k { justify-self: start; padding: 3px 8px; border: 1px solid rgba(255, 210, 34, .45); border-radius: 999px; color: var(--sp-gold, #ffd222); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.sp-optional-card strong { color: var(--sp-white, #f7f8ef); font-size: 15px; }
.sp-optional-card p { margin: 0; color: var(--sp-muted); font-size: 12.5px; line-height: 1.5; }
.sp-optional-card .sp-button { justify-self: start; margin-top: 6px; }
/* once filled in: the planner's lists read as plain rows */
.sp-financial ul { display: grid; gap: 4px; padding-left: 0; list-style: none; }
.sp-financial ul li { padding-left: 14px; position: relative; }
.sp-financial ul li::before { content: ""; position: absolute; left: 0; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 210, 34, .7); }
.sp-financial-scenario { border-radius: 8px; }

/* step 05 on wide screens: the profile summary takes the centre (the review replaces the chart) and scrolls there */
@media (min-width: 1180px) and (orientation: landscape) {
  .sp-tool[data-step="4"] .sp-workspace { grid-template-areas: "form head head" "form sum roof" "form sum sys" "form sum logo"; grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .sp-tool[data-step="4"] .sp-chart-panel { display: none; }
  .sp-tool[data-step="4"] .sp-profile-summary { align-self: stretch; min-height: 0; margin: 14px 10px 14px 16px; padding-right: 4px; overflow-y: auto; overscroll-behavior-y: contain; }
  .sp-tool[data-step="4"] .sp-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-tool[data-step="4"] .sp-conversion { flex-wrap: wrap; gap: 12px; }
}

/* step 05 readiness check: status rows, not tick boxes (nothing to tick there) */
#spPane4 .sp-load-option span { min-height: 0; padding: 8px 10px; background: rgba(255, 255, 255, .025); color: #dfe6da; font-size: 12px; line-height: 1.35; }
#spPane4 .sp-load-option span::before { width: 8px; height: 8px; flex: 0 0 8px; border: 0; border-radius: 50%; background: rgba(255, 210, 34, .8); }

/* ---------- live controls: solar panels and battery size, always within reach beside the graphs (owner, Nov 15) ---------- */
.sp-live { display: grid; gap: 10px; padding: 12px 14px 14px; border: 1px solid rgba(108, 203, 63, .32); border-radius: 10px; background: linear-gradient(180deg, rgba(108, 203, 63, .08), rgba(3, 16, 8, .96) 70%), #041009; box-shadow: 0 10px 28px rgba(0, 0, 0, .28); }
.sp-live-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sp-live-top strong { color: var(--sp-white, #f7f8ef); font-size: 14px; font-weight: 800; }
.sp-live-top small { color: var(--sp-dim, #9aa596); font-size: 11px; }
.sp-live-k { display: inline-flex; align-items: center; gap: 6px; color: var(--sp-green, #6ccb3f); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sp-live-k i { width: 7px; height: 7px; border-radius: 50%; background: var(--sp-green, #6ccb3f); box-shadow: 0 0 0 0 rgba(108, 203, 63, .55); animation: sp-live-pulse 2.4s ease-out infinite; }
@keyframes sp-live-pulse { 0% { box-shadow: 0 0 0 0 rgba(108, 203, 63, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(108, 203, 63, 0); } }
@media (prefers-reduced-motion: reduce) { .sp-live-k i { animation: none; } }
.sp-live-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; align-items: baseline; gap: 2px 10px; margin: 0; cursor: default; }
.sp-live-l { color: #dfe6da; font-size: 12.5px; font-weight: 700; }
.sp-live-row b { color: var(--sp-gold, #ffd222); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.sp-live-row .sp-range { grid-column: 1 / -1; width: 100%; margin: 6px 0 2px; }
.sp-live-row small { grid-column: 1 / -1; color: var(--sp-dim, #9aa596); font-size: 11px; line-height: 1.3; }
.sp-live.is-solar-only .sp-live-row:last-child b { color: var(--sp-muted, #c9d1c4); }

@media (min-width: 1180px) and (orientation: landscape) {
  /* right column: roof, then the live controls, then the system numbers; the logo stays in the corner */
  .sp-workspace { grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "form head head" "form chart roof" "form chart live" "form chart sys" "form chart logo" "form sum sum"; }
  .sp-tool[data-step="4"] .sp-workspace { grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    grid-template-areas: "form head head" "form sum roof" "form sum live" "form sum sys" "form sum logo"; }
  .sp-live { grid-area: live; min-width: 0; margin: 10px 16px 6px 6px; padding: 10px 14px 12px; gap: 6px; }
  .sp-live-row .sp-range { margin: 4px 0 1px; }
  .sp-live { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
  .sp-live-top { grid-column: 1 / -1; }
  /* short screens (a 768px-tall laptop): the controls drop their small print so the system numbers keep their room */
  @media (max-height: 820px) {
    .sp-live { margin-top: 8px; padding: 8px 12px 9px; gap: 2px; }
    .sp-live-top small, .sp-live-row small { display: none; }
    .sp-array-surface { height: clamp(96px, calc(100vh - 700px), 200px); }
    .sp-workspace { height: 700px; }
  }
}

/* phones, portrait tablets and narrow windows: the controls sit just above the graphs and stay pinned under the
   site header while the graphs scroll past */
@media not all and (min-width: 1180px) and (orientation: landscape) {
  /* the planner's outer boxes clip their edges without becoming scroll boxes, so the pinned controls can stick */
  .solar-profile-section, .sp-tool { overflow: clip; }
  .sp-live { position: sticky; top: calc(var(--nav-h, 64px) + 6px); z-index: 6; margin: 0 0 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; padding: 10px 12px 12px; gap: 6px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .sp-live-top { grid-column: 1 / -1; }
  .sp-live-top small { display: none; }
  .sp-live-row b { font-size: 13.5px; }
  .sp-live-l { font-size: 11.5px; }
  .sp-live-row small { font-size: 10.5px; }
}

/* ---------- graphs, round 3 (owner, Nov 15) ---------- */
/* "Your Energy Year": the drag slider and its plain card, like the EV charger's */
.sp-scrub-readout { position: relative; z-index: 2; height: 66px; margin: 10px 12px 0; }
.sp-scrub-readout[hidden], .sp-scrub[hidden] { display: none; }
.sp-scrub-readout::after { content: ""; position: absolute; top: 58px; bottom: -10px; left: var(--stem-x, 50%); width: 1px; background: rgba(255, 210, 34, .75); pointer-events: none; }
.sp-scrub-bubble { position: absolute; top: 0; left: 0; display: grid; gap: 1px; max-width: min(420px, 100%); padding: 7px 11px 8px; border: 1px solid rgba(255, 210, 34, .45); border-radius: 7px; background: rgba(2, 8, 4, .96); box-shadow: 0 10px 26px rgba(0, 0, 0, .4); color: var(--sp-muted, #c9d1c4); font-size: 11.5px; line-height: 1.35; pointer-events: none; }
.sp-scrub-bubble strong { color: var(--sp-gold, #ffd222); font-size: 12.5px; }
.sp-scrub-bubble b { color: var(--sp-white, #f7f8ef); font-variant-numeric: tabular-nums; }
.sp-scrub-bubble em { color: #ef9b98; font-style: normal; }
.sp-scrub { padding: 0 0 4px; }
.sp-scrub .sp-scrub-range { display: block; margin: 0; }
@media (max-width: 620px) {
  .sp-scrub-readout { height: 78px; margin: 8px 8px 0; }
  .sp-scrub-readout::after { top: 70px; }
  .sp-scrub-bubble { font-size: 11px; }
}

/* why "all of it" and "from the grid" can both be true */
.sp-easy-note { grid-column: 1 / -1; margin: 2px 0 0; color: var(--sp-dim, #9aa596); font-size: 11.5px; line-height: 1.45; }

/* the terms, one tap away */
.sp-chart-head { position: relative; }
.sp-terms { position: absolute; top: 14px; right: 14px; z-index: 5; }
.sp-terms > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 10px 4px 5px; border: 1px solid var(--sp-line); border-radius: 999px; background: rgba(255, 255, 255, .03); color: var(--sp-muted, #c9d1c4); font-size: 11.5px; font-weight: 700; list-style: none; cursor: pointer; }
.sp-terms > summary::-webkit-details-marker { display: none; }
.sp-terms > summary span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(66, 212, 237, .16); color: var(--sp-cyan, #42d4ed); font-size: 11px; font-weight: 900; margin: 0; }
.sp-terms[open] > summary, .sp-terms > summary:hover { border-color: rgba(66, 212, 237, .55); color: var(--sp-white, #f7f8ef); }
.sp-terms > summary:focus-visible { outline: 2px solid var(--sp-gold, #ffd222); outline-offset: 2px; }
.sp-terms-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: min(360px, calc(100vw - 48px)); max-height: min(440px, 62vh); overflow-y: auto; padding: 12px 14px 14px; border: 1px solid rgba(66, 212, 237, .35); border-radius: 10px; background: #050f09; box-shadow: 0 18px 44px rgba(0, 0, 0, .55); }
.sp-terms-h { margin: 0 0 8px; color: var(--sp-white, #f7f8ef); font-size: 13px; font-weight: 800; }
.sp-terms dl { display: grid; gap: 7px; margin: 0; }
.sp-terms dt { color: var(--sp-cyan, #42d4ed); font-size: 11.5px; font-weight: 800; }
.sp-terms dd { margin: 1px 0 0; color: var(--sp-muted, #c9d1c4); font-size: 11.5px; line-height: 1.4; }
.sp-chart-head .sp-terms span, .sp-chart-head .sp-terms-pop * { text-transform: none; }

/* "Grid Dependence": one interactive bar */
.sp-mix { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 6px 14px; }
.sp-mix[hidden] { display: none; }
.sp-mix-h { margin: 0; color: var(--sp-white, #f7f8ef); font-size: 14px; font-weight: 800; }
.sp-mix-h small { color: var(--sp-dim, #9aa596); font-size: 11.5px; font-weight: 600; }
.sp-mix-bar { display: flex; height: 58px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.sp-mix-seg { position: relative; flex: 0 0 var(--w); min-width: 0; padding: 0; border: 0; border-right: 2px solid #020804; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 92%, #fff 8%), color-mix(in srgb, var(--c) 70%, #000 30%)); color: #04110a; font: inherit; font-size: 15px; font-weight: 900; cursor: pointer; transform-origin: left center; animation: sp-mix-grow .7s cubic-bezier(.2, .8, .2, 1) both; transition: filter .2s ease, opacity .2s ease; }
.sp-mix-seg:last-child { border-right: 0; }
.sp-mix-bar:hover .sp-mix-seg:not(:hover):not(.is-on), .sp-mix-bar:has(.is-on) .sp-mix-seg:not(.is-on) { opacity: .55; }
.sp-mix-seg.is-on { filter: brightness(1.08) saturate(1.1); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.sp-mix-seg:focus-visible { outline: 2px solid var(--sp-gold, #ffd222); outline-offset: -4px; }
@keyframes sp-mix-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .sp-mix-seg { animation: none; } }
.sp-mix-keys { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.sp-mix-key { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 11px; border: 1px solid var(--sp-line); border-radius: 999px; background: rgba(255, 255, 255, .03); color: var(--sp-muted, #c9d1c4); font: inherit; font-size: 12px; cursor: pointer; }
.sp-mix-key i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.sp-mix-key b { color: var(--sp-white, #f7f8ef); font-variant-numeric: tabular-nums; }
.sp-mix-key.is-export { border-style: dashed; border-color: rgba(255, 210, 34, .45); }
.sp-mix-key.is-on { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--sp-white, #f7f8ef); }
.sp-mix-card { display: flex; gap: 12px; align-items: flex-start; min-height: 86px; padding: 12px 14px; border: 1px solid var(--sp-line); border-radius: 10px; background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)); }
.sp-mix-dot { flex: 0 0 12px; width: 12px; height: 12px; margin-top: 4px; border-radius: 4px; background: var(--c); box-shadow: 0 0 14px var(--c); }
.sp-mix-card strong { display: block; color: var(--sp-white, #f7f8ef); font-size: 13px; }
.sp-mix-card b { display: block; margin-top: 2px; color: var(--sp-gold, #ffd222); font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sp-mix-card p { margin: 4px 0 0; color: var(--sp-muted, #c9d1c4); font-size: 12px; line-height: 1.45; }
@media (max-width: 620px) { .sp-mix { gap: 10px; padding: 4px 6px; } .sp-mix-bar { height: 48px; } .sp-mix-card b { font-size: 16px; } }

/* step 02: quick ways first, bill ways second */
.sp-energy-paths.is-grouped .sp-path-h { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; margin: 6px 0 -2px; color: var(--sp-dim, #9aa596); font-size: 11.5px; }
.sp-energy-paths.is-grouped .sp-path-h b { color: var(--sp-white, #f7f8ef); font-size: 12.5px; }
.sp-energy-paths.is-grouped .sp-path-h:first-child { margin-top: 0; }
.sp-energy-paths.is-grouped button.is-quick { min-height: 54px; border-color: rgba(108, 203, 63, .55); background: linear-gradient(180deg, rgba(108, 203, 63, .14), rgba(108, 203, 63, .05)); color: #fff; font-weight: 700; }
.sp-energy-paths.is-grouped button.is-bill:first-of-type { grid-column: auto; }
.sp-energy-paths.is-grouped button.is-bill { grid-column: auto; border-color: var(--sp-line); background: rgba(255, 255, 255, .03); }
.sp-energy-paths.is-grouped button[data-energy-path="guided"] { grid-column: 1 / -1; }
.sp-est { display: grid; gap: 6px; margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(108, 203, 63, .3); border-radius: 10px; background: rgba(108, 203, 63, .06); }
.sp-est[hidden] { display: none; }
.sp-est-h { margin: 0; color: var(--sp-muted, #c9d1c4); font-size: 13px; }
.sp-est-h b { color: #b9f29a; }
.sp-est-h small { color: var(--sp-dim, #9aa596); }
.sp-est ul { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.sp-est li { display: flex; justify-content: space-between; gap: 10px; color: var(--sp-muted, #c9d1c4); font-size: 12px; }
.sp-est li b { color: var(--sp-white, #f7f8ef); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-est-f { margin: 0; color: var(--sp-dim, #9aa596); font-size: 11px; line-height: 1.4; }
.sp-loads-note[hidden] { display: none; }
.sp-loads-note { margin-top: 10px; color: #b9f29a; }
.sp-chart-head > div:first-child { padding-right: 92px; }
.sp-chart-wrap.is-mix .sp-mix { overflow-y: auto; }
@media not all and (min-width: 1180px) and (orientation: landscape) {
  /* phones and narrow windows: the grid bar sets its own height instead of the chart's */
  .sp-chart-wrap.is-mix { height: auto; min-height: 0; }
  .sp-chart-wrap.is-mix canvas { display: none; }
  .sp-chart-wrap.is-mix .sp-mix { position: static; overflow: visible; }
}

/* "A Day With Solar": rate times mode (owner, Nov 15) */
.sp-day-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 18px 0; }
.sp-day-bar[hidden] { display: none; }
.sp-day-bar .sp-day-view { margin: 0; padding: 0; }
.sp-tou-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; margin: 0; padding: 6px 14px 6px 10px; border: 1px solid rgba(255, 179, 71, .5); border-radius: 999px; background: linear-gradient(180deg, rgba(255, 179, 71, .12), rgba(255, 179, 71, .04)); color: #ffd9a3; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; vertical-align: middle; transition: background-color .2s ease, border-color .2s ease; }
.sp-tou-btn[hidden] { display: none; }
.sp-tou-btn i { width: 18px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, #63a9e8 0 33%, #6ccb3f 33% 66%, #f06463 66%); }
.sp-tou-btn:hover { border-color: #ffb347; }
.sp-tou-btn[aria-pressed="true"] { border-color: #ffb347; background: rgba(255, 179, 71, .2); color: #fff; }
.sp-tou-btn:focus-visible { outline: 2px solid var(--sp-gold, #ffd222); outline-offset: 2px; }
.sp-day-view:not([hidden]) { display: inline-flex; vertical-align: middle; }
.sp-chart-panel.is-tou .sp-chart-head > div:first-child, .sp-chart-panel.is-tou .sp-chart-legend, .sp-chart-panel.is-tou .sp-easy,
.sp-chart-panel.is-tou .sp-accuracy-summary, .sp-chart-panel.is-tou .sp-day-view { display: none !important; }
.sp-tou { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding: 8px 14px 10px; background: #020a05; animation: sp-tou-in .35s ease both; }
.sp-tou[hidden] { display: none; }
@keyframes sp-tou-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sp-tou { animation: none; } }
.sp-tou-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sp-tou-k { display: block; color: #ffb347; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.sp-tou-top strong { display: block; margin-top: 2px; color: var(--sp-white, #f7f8ef); font-size: 18px; font-weight: 800; }
.sp-tou-top small { display: block; margin-top: 2px; color: var(--sp-dim, #9aa596); font-size: 11.5px; }
.sp-tou-exit { flex: 0 0 auto; min-height: 34px; padding: 6px 12px; border: 1px solid var(--sp-line); border-radius: 999px; background: rgba(255, 255, 255, .04); color: var(--sp-muted, #c9d1c4); font: inherit; font-size: 12px; cursor: pointer; }
.sp-tou-exit:hover { color: #fff; border-color: rgba(255, 255, 255, .35); }
.sp-tou-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sp-tou-gap { width: 10px; }
.sp-tou-chip { min-height: 32px; padding: 5px 12px; border: 1px solid var(--sp-line); border-radius: 999px; background: rgba(255, 255, 255, .03); color: var(--sp-muted, #c9d1c4); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.sp-tou-chip small { color: var(--sp-dim, #9aa596); font-weight: 600; }
.sp-tou-chip.is-on { border-color: #ffb347; background: rgba(255, 179, 71, .14); color: #fff; }
.sp-tou-chip:focus-visible, .sp-tou-exit:focus-visible { outline: 2px solid var(--sp-gold, #ffd222); outline-offset: 2px; }
.sp-tou-band { position: relative; height: 64px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; background: rgba(255, 255, 255, .03); }
.sp-tou-seg { position: absolute; top: 0; bottom: 0; display: grid; place-content: center; gap: 1px; border-right: 2px solid #020a05; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 92%, #fff 8%), color-mix(in srgb, var(--c) 68%, #000 32%)); color: #04110a; text-align: center; animation: sp-mix-grow .6s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left center; }
.sp-tou-seg:last-child { border-right: 0; }
.sp-tou-seg b { font-size: 12.5px; font-weight: 900; line-height: 1.1; }
.sp-tou-seg small { font-size: 11px; font-weight: 700; line-height: 1.1; }
.sp-tou-ticks { position: relative; height: 14px; margin: -6px 0 0; }
.sp-tou-ticks span { position: absolute; top: 0; color: var(--sp-dim, #9aa596); font-size: 10.5px; transform: translateX(-50%); white-space: nowrap; }
.sp-tou-ticks span:first-child { transform: none; }
.sp-tou-ticks span:last-child { transform: translateX(-100%); }
.sp-tou-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp-tou-list li { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--sp-line); border-left: 3px solid var(--c); border-radius: 9px; background: rgba(255, 255, 255, .025); }
.sp-tou-list i { flex: 0 0 10px; width: 10px; height: 10px; margin-top: 4px; border-radius: 3px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.sp-tou-list strong { display: block; color: var(--sp-white, #f7f8ef); font-size: 13px; }
.sp-tou-list strong b { margin-left: 4px; color: var(--c); font-weight: 800; }
.sp-tou-list p { margin: 3px 0 0; color: var(--sp-muted, #c9d1c4); font-size: 11.5px; line-height: 1.4; }
.sp-tou-note { margin: 0; color: var(--sp-dim, #9aa596); font-size: 11px; line-height: 1.4; }
@media not all and (min-width: 1180px) and (orientation: landscape) {
  .sp-chart-wrap.is-tou { height: auto; min-height: 0; }
  .sp-chart-wrap.is-tou canvas { display: none; }
  .sp-chart-wrap.is-tou .sp-tou { position: static; overflow: visible; padding: 4px 4px 8px; }
  .sp-day-bar { margin: 10px 12px 0; }
  .sp-tou-ticks .is-minor { display: none; }
  .sp-tou-top strong { font-size: 16px; }
  .sp-tou-seg b { font-size: 11px; }
  .sp-tou-seg small { font-size: 10px; }
}
.sp-chart-panel.is-tou .sp-chart-head { min-height: 46px; }
@media (min-width: 1180px) and (orientation: landscape) { .sp-tou { gap: 16px; padding-top: 4px; } .sp-tou-band { height: 88px; } .sp-tou-seg b { font-size: 14px; } .sp-tou-seg small { font-size: 12px; } }
/* grid bar: small parts carry their number on a tag above the bar */
.sp-mix-tags { position: relative; height: 26px; margin-bottom: -8px; }
.sp-mix-tag { position: absolute; bottom: 0; min-width: 34px; padding: 2px 7px; border: 1px solid var(--c); border-radius: 6px; background: #050f09; color: #fff; font: inherit; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; transform: translateX(-50%); cursor: pointer; }
.sp-mix-tag::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px; border-right: 1px solid var(--c); border-bottom: 1px solid var(--c); background: #050f09; transform: translateX(-50%) rotate(45deg); }
.sp-mix-tag:last-child { transform: translateX(-80%); }
.sp-mix-tag:last-child::after { left: 80%; }
.sp-mix-tag.is-on { background: color-mix(in srgb, var(--c) 22%, #050f09); }
