/* ------------------------------------------------------------------ */
/* the hidden attribute has to actually hide                           */
/* ------------------------------------------------------------------ */
/* The browser's own rule for [hidden] is `display: none` at the very
   bottom of the cascade, so ANY class that sets `display` beats it.
   `.tool-card { display: flex }` did, which meant every card the
   landing page "hid" by setting `.hidden = true` stayed on screen at
   full size - the Book card that is not in the initial launch, and
   every card trimForPartner removes for an outside partner, which has
   therefore never worked.
   Found on 29 Oct by measuring the box: hidden was true, display was
   flex, and the card was 260x404 with its text readable. The gate was
   green, because it asserted the attribute and not the rendering.
   `.cf-tip[hidden]` below is the same discovery made once before and
   patched for one component; this is it made general. */
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ */
/* tokens                                                              */
/* ------------------------------------------------------------------ */
:root {
  --bg: #0e1116;
  --bg-raised: #161b23;
  --bg-sunk: #0a0d12;
  --line: #252c37;
  --line-soft: #1c222b;
  --text: #e8edf4;
  --text-dim: #97a3b4;
  --text-faint: #6b7787;
  --accent: #ffb547;
  --accent-strong: #ff9d1e;
  --accent-ink: #241703;
  --good: #4ade80;
  --bad: #f87171;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
  /* The month grid's ramp, measured on this card rather than picked: */
  /* darker is more shade, and sun-down stays apart from both ends.  */
  --shade-lit: #c4d6f2;
  --shade-dark: #2e4a86;
  --shade-night: #242a33;
  --sun-low: #1f252f;
  --sun-high: #ffb547;
  /* The simulator's shade chart: the month grid's blue, lifted to read as a
     line and a wash on this card. */
  --shade-line: #7d9bd8;
  --shade-fill: rgba(125, 155, 216, .28);
  /* What a string inverter loses to mismatch, stacked on the shade. */
  --mismatch: #d0679a;
  /* The MCS sunpath chart: the segments a horizon takes, and the grey
     corners the standard does not count. */
  --sunpath-counted: #e5484d;
  --sunpath-wedge: #4a525e;
  --sunpath-circle: #4cb87a;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f9;
    --bg-raised: #ffffff;
    --bg-sunk: #eaeef4;
    --line: #dfe4ec;
    --line-soft: #eaeef4;
    --text: #131820;
    --text-dim: #56606f;
    --text-faint: #808b9a;
    --accent: #e08600;
    --accent-strong: #c56f00;
    --accent-ink: #ffffff;
    --good: #16a34a;
    --bad: #dc2626;
    --shadow: 0 8px 24px rgba(20, 30, 50, .10);
    --shade-lit: #a8c4ee;
    --shade-dark: #1d3363;
    --shade-night: #f0f1f3;
    --sun-low: #eceef1;
    --sun-high: #b45309;
    --shade-line: #2e4a86;
    --shade-fill: rgba(46, 74, 134, .16);
    --mismatch: #b0427a;
    --sunpath-counted: #d93036;
    --sunpath-wedge: #6b6f76;
    --sunpath-circle: #2f855a;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 620; letter-spacing: -.01em; }

/* ------------------------------------------------------------------ */
/* chrome                                                              */
/* ------------------------------------------------------------------ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-raised);
}

/* WHOSE TOOL, THEN WHAT THE PAGE DOES - left to right, on one row. The
   mark (logo, name) leads; the title and whatever lines sit under it are
   a block beside it, which is why the title block is a single child here
   rather than loose h1 and p siblings. Stacking the brand above the title
   spends a row of header height on every page that draws a mark, and the
   header is a strip the rest of the page is measured against. */
.brand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* WHERE THE ROW GIVES UP AND STACKS AGAIN, said as the width the title
   block needs rather than as a screen size. While the mark and 14em of
   title both fit, they share a row and the title grows into whatever is
   left; when they do not, the title takes a row of its own under the
   mark - the old stacked header, reached deliberately and only where
   there is no room for anything else.

   A SCREEN-WIDTH MEDIA QUERY WAS WRONG HERE, and measured so. The width
   at which this row stops fitting is not a property of the screen but of
   what is in it: this page's subtitle is 492px of text and the menu's is
   a fifth of that, and a brand's legal name moves it again. A fixed
   breakpoint is right for one page and one brand and quietly wrong for
   the rest - and between it and the real limit the row is over-constrained
   and every item shrinks, which at 600px shrank the brand NAME to nothing
   and left a logo with no name beside it. Nothing shrinks here, because
   the title leaves the row before anything has to.

   BOTH HALVES ARE LOAD-BEARING, and one alone is a bug each way. The
   flex-basis is what the line-breaking measures - without it the title's
   whole 492px is measured instead, which on this page comes within a
   pixel of the room there is and would wrap or not by rounding. The
   min-width is what the CONTAINER is measured by - a .brand sized to its
   own content (the menu, the quote tool) does not count a flex-basis, so
   with the basis alone .brand came out 148px wide, narrower than the
   basis it had just been given, and stacked a header that had a thousand
   pixels spare. Measured on landing.html at 1280px. */
.brand > div { flex: 1 1 14em; min-width: 14em; }

/* A brand's own logo, in the place the mark would otherwise hold. Bounded
   rather than sized: the logos are whatever shape the brand supplies, and
   one of them is a wide wordmark while another is nearly square. */
.brand-logo {
  max-height: 34px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
  flex: none;
}

/* The brand's name beside its logo. Bounded and on one line for the same
   reason the logo is bounded: the header is a fixed strip, and a long
   legal name is not allowed to push the title onto a second row. */
/* IT YIELDS BEFORE THE TITLE DOES. `flex: none` here grew the header from
   66px to 84px on a long legal name: the name held its width, the title
   block was squeezed, and its subtitle wrapped onto a second line. So the
   name shrinks and ellipsises instead - min-width:0 because a flex item
   will not shrink below its content without it.
   THAT IS THE LAST RESORT, NOT THE FIRST ONE. A row that has to shrink
   something shrinks this, and a name shrunk far enough is a logo with no
   name beside it - the 31 Oct fault again. The title block leaves the row
   before it comes to that (see .brand above), so this is reached only on
   a screen narrower than the mark alone.
   AND THE CAP IS PART SCREEN, because min-width governs what this SHRINKS
   to while the cap governs what it CONTRIBUTES, and an ancestor sized to
   its own content is floored by the contribution however far the name
   itself would shrink. Measured on a 360px screen with a long legal name:
   the header laid out 440px wide and the page scrolled sideways, because
   the cap was wider than the phone. 35vw keeps a mark inside any screen,
   and is well clear of 220px on anything desktop-sized - the cap there is
   still the flat 220, so no wide header changes. */
.brand-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(220px, 35vw);
  flex: 0 1 auto;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: radial-gradient(circle at 32% 30%, #ffd88a, var(--accent-strong) 62%, #b45c00);
  box-shadow: 0 0 0 1px rgba(255, 181, 71, .35), 0 0 22px rgba(255, 157, 30, .35);
  flex: none;
}

.topbar h1 { font-size: 18px; }
.topbar p { margin: 1px 0 0; font-size: 12.5px; color: var(--text-dim); }

.badges { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  background: var(--bg-sunk);
}

.badge-warn { color: var(--accent); border-color: rgba(255, 181, 71, .4); }

/* ------------------------------------------------------------------ */
/* layout                                                              */
/* ------------------------------------------------------------------ */
.layout {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  gap: 20px;
  padding: 20px 24px 8px;
  align-items: start;
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; padding: 16px; }
  .column-right { order: -1; }
}

.column { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.column-right { position: sticky; top: 20px; }

@media (max-width: 980px) {
  .column-right { position: static; }
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
  margin-bottom: 14px;
}

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

/* ------------------------------------------------------------------ */
/* form                                                                */
/* ------------------------------------------------------------------ */
.field-row { display: flex; gap: 10px; align-items: flex-end; }
.field-row .field { flex: 1; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-row .field { margin-bottom: 0; }

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: .01em;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 181, 71, .18);
}

#postcode { text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

select { cursor: pointer; }

.btn {
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .08s, filter .15s, background .15s;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }

.btn-block { width: 100%; margin-top: 4px; }

.hint { margin: 6px 0 0; font-size: 12.5px; color: var(--text-faint); }
.check-hint { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.check-hint input { margin: 0; }

.notice {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  border: 1px solid var(--line);
  background: var(--bg-sunk);
}

.notice-error {
  border-color: rgba(248, 113, 113, .45);
  background: rgba(248, 113, 113, .08);
  color: var(--bad);
}

.notice-warn {
  margin: -6px 0 16px;
  border-color: rgba(255, 181, 71, .45);
  background: rgba(255, 181, 71, .09);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.notice-warn strong { color: var(--accent); }

/* SOLAR ALREADY ON THE ROOF (the user, 18 Nov 2026): what was found, the choice, and under the figures the network operator's
   approval. The warning follows the figures, so it takes the notice's own margins and not the one that tucks it under a heading. */
.existing-solar { margin: 0 0 16px; line-height: 1.5; }
.existing-solar p { margin: 0 0 8px; }
.existing-solar-title { font-weight: 600; font-size: 14.5px; }
.solar-interest { border: 0; margin: 10px 0 6px; padding: 0; min-width: 0; }
.solar-interest legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.solar-interest-option { display: flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.solar-interest-option input { margin: 0; }
#networkNote { margin: 14px 0 10px; }

/* A BATTERY FOR SOLAR ALREADY ON THE ROOF (18 Nov 2026): the card, and the figures for NEW panels put away while the visitor looks at it. */
.existing-battery { margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-sunk); }
.existing-battery-title { margin: 0 0 10px; font-size: 15px; }
.existing-battery .field { margin-bottom: 10px; }
.existing-battery .summary-table { margin-top: 8px; }
#resultsCard.battery-mode .panel-only { display: none !important; }

/* ------------------------------------------------------------------ */
/* results                                                             */
/* ------------------------------------------------------------------ */
.subject {
  margin: -6px 0 16px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

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

.stat {
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  font-weight: 600;
}

.stat-value {
  margin-top: 4px;
  font-size: 21px;
  font-weight: 660;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.stat-value small { font-size: 13px; font-weight: 600; color: var(--text-dim); margin-left: 2px; }
.stat-sub { margin-top: 2px; font-size: 12px; color: var(--text-faint); }
.stat-hero .stat-value { color: var(--accent); }

.slider-block { margin-top: 18px; }

/* The panel the roof is laid out with, and its edge clearance (19 Sept). */
.module-pick { margin-top: 14px; }
.module-pick .field { margin-bottom: 10px; }
.edge-clearance-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.edge-clearance-row input { max-width: 140px; }
.edge-clearance-row .link-btn { font-size: 12.5px; }
.hint-warn { color: var(--accent); }

.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.slider-value {
  font-size: 13px;
  font-weight: 640;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-raised);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .4);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-raised);
  cursor: pointer;
}

/* MCS -------------------------------------------------------------- */
.basis {
  margin: -6px 0 16px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.55;
  border: 1px solid var(--line);
  background: var(--bg-sunk);
  color: var(--text-dim);
}

.basis strong { color: var(--text); font-weight: 620; }
.basis-on { border-color: rgba(74, 222, 128, .4); background: rgba(74, 222, 128, .07); }
.basis-on strong { color: var(--good); }
.basis-off { border-color: rgba(255, 181, 71, .4); background: rgba(255, 181, 71, .07); }
.basis-off strong { color: var(--accent); }

.mcs-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 520px) { .mcs-inputs { grid-template-columns: 1fr; } }

.mcs-inputs .field { margin-bottom: 0; }
.field-narrow { max-width: 220px; }

.link-btn {
  font: inherit;
  font-size: inherit;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.link-btn:hover { filter: brightness(1.15); }
/* Why the quote takes fewer panels than the roof holds. It sits in the
   slider's hint, which is otherwise all roof facts, so it reads as the
   reason rather than another one of them. */
.slider-why { color: var(--text); }
/* Where to buy a bill line, after what it is for. */
.bill-buy { color: var(--text); }
/* A quantity on the bill that can be corrected, and what the kit worked
   out where somebody has. */
.bill-qty { font: inherit; width: 5.5em; padding: 3px 6px; text-align: right;
  border: 1px solid transparent; border-radius: 5px; background: transparent;
  color: inherit; font-variant-numeric: tabular-nums; }
.bill-qty:hover { border-color: var(--line); background: #fff; }
.bill-qty:focus { border-color: var(--accent); background: #fff; outline: none; }
.bill-was { color: var(--text-dim); font-size: 12px; white-space: nowrap; }
.bill-was .link-btn { margin-left: 5px; }

.mcs-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.mcs-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-dim);
  vertical-align: top;
}

.mcs-table td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 600;
}

.mcs-table tr.mcs-section td {
  padding-top: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

.mcs-table tr:first-child.mcs-section td { padding-top: 4px; }

.mcs-statements { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }

.mcs-statements p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-faint);
  padding-left: 10px;
  border-left: 2px solid var(--line);
}

.mcs-statements .clause {
  display: inline-block;
  font-weight: 700;
  color: var(--text-dim);
  margin-right: 6px;
}

/* battery ---------------------------------------------------------- */
.battery-block {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.battery-block select { margin-bottom: 14px; }

/* which product pays back quickest - MCS designs only */
.advice {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(74, 222, 128, .07);
  border: 1px solid rgba(74, 222, 128, .28);
}

.advice-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--good);
}

.advice-lead {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}

.advice-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.advice-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.advice-row .advice-name { flex: 1 1 180px; color: var(--text); }
.advice-row.is-chosen .advice-name { font-weight: 650; }
.advice-years { white-space: nowrap; }
.advice-pick { white-space: nowrap; }

.advice-sub {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-faint);
}

/* the headline reason for buying storage */
.uplift {
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: rgba(255, 181, 71, .09);
  border: 1px solid rgba(255, 181, 71, .32);
}

.uplift-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
}

.uplift-figure {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.uplift-from {
  font-size: 30px;
  font-weight: 600;
  color: var(--text-faint);
}

.uplift-arrow { font-size: 24px; color: var(--text-faint); }

.uplift-to {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--accent);
}

.uplift-delta {
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 181, 71, .2);
}

.uplift-sub {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
}

.uplift-sub strong { color: var(--text); font-weight: 660; }

@media (max-width: 460px) {
  .uplift-to { font-size: 38px; }
  .uplift-from { font-size: 25px; }
}

.assumption-heading {
  margin: 18px 0 -4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-faint);
}

details {
  margin-top: 16px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 620;
  color: var(--text-dim);
  list-style: none;
  user-select: none;
}

summary::-webkit-details-marker { display: none; }
summary::before { content: "▸ "; color: var(--text-faint); }
details[open] summary::before { content: "▾ "; }

.assumption-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.assumption-grid .field { margin-bottom: 0; }
.assumption-grid input { padding: 8px 10px; font-size: 13.5px; }

.table-scroll { overflow-x: auto; margin-top: 12px; }

.roof-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.roof-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.roof-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-dim);
  white-space: nowrap;
}

.roof-table td:first-child { color: var(--text); font-weight: 600; }

.source-note {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* map                                                                 */
/* ------------------------------------------------------------------ */
.card-map { display: flex; flex-direction: column; padding-bottom: 14px; }

.map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.map-head .card-title { margin-bottom: 12px; }

/* One row, whatever is revealed into it. .map-head wraps, so the tools drop
   below the heading rather than interleaving with it, and this row itself
   never wraps - it scrolls sideways on a narrow pane instead, which keeps
   the page from scrolling sideways with it. */
.map-tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.map-tools .btn { flex: 0 0 auto; white-space: nowrap; }

/* The tools that change what is quoted, opened by Edit: their own row under
   the ones that only look at the roof. Thirteen buttons in a single row had
   to be scrolled sideways to reach the end of (the user, 20 Sept). */
.map-edit-tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: -6px 0 12px;
  padding: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-sunk);
}

.map-edit-tools .btn { flex: 0 0 auto; white-space: nowrap; }

/* The chosen roof segment's own box, over the top-right of the photograph
   so it sits beside the segment rather than in a row above the map. */
.face-tools {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 15.5rem;
  max-width: calc(100% - 24px);
  max-height: calc(100% - 24px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  /* A token, not a literal: this box sits in both themes.
     A hardcoded dark panel was invisible ink on the light one. */
  background: var(--bg-raised);
  box-shadow: var(--shadow);
  font-size: .9rem;
}

.face-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.face-tools .face-name { font-weight: 600; font-size: 1rem; }
.face-close {
  border: 0; background: none; color: var(--text-dim);
  font-size: 1.15rem; line-height: 1; cursor: pointer; padding: 0 2px;
}
.face-close:hover { color: var(--text); }

.face-tools .face-meta { margin: 0; color: var(--text-dim); line-height: 1.45; }

.face-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* A switch, so "in this quote" reads as a state that can be turned off
   rather than as one more tick box in a form. */
.face-switch { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.face-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.face-switch-track {
  width: 38px; height: 21px; border-radius: 999px;
  background: var(--line); transition: background .15s ease;
}
.face-switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--text-faint); transition: transform .15s ease, background .15s ease;
}
.face-switch input:checked + .face-switch-track { background: var(--accent); }
.face-switch input:checked + .face-switch-track::after {
  transform: translateX(17px); background: var(--accent-ink);
}
.face-switch input:focus-visible + .face-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

.face-panels { display: flex; flex-direction: column; gap: 6px; }
.face-panels.is-off { opacity: .55; }
.face-tools .face-count-label { color: var(--text-dim); }
.face-tools .face-count { display: inline-flex; align-items: center; gap: 8px; }
.face-tools .face-count .btn { min-width: 2.2em; font-weight: 600; }
.face-tools .face-count-now {
  min-width: 1.8em; text-align: center;
  font-variant-numeric: tabular-nums; font-size: 1.25em;
}
.face-tools .face-count-of { color: var(--text-dim); font-size: .92em; }

.face-tools .face-limit { margin: 0; color: var(--text-dim); font-size: .86em; line-height: 1.45; }
/* A question standing in for the segment's controls while it is asked, so
   nothing behind it can be pressed and nothing is hidden under the box. */
.face-ask { display: flex; flex-direction: column; gap: 10px; }
.face-ask p { margin: 0; line-height: 1.45; }
.face-ask strong { font-weight: 600; }
.face-ask .panel-ask-buttons { justify-content: flex-start; }

/* Which way the modules lie on this segment. Three small buttons rather
   than a menu: there are only ever three answers and the current one should
   read at a glance. */
.face-lie { align-items: flex-start; flex-wrap: wrap; }
.face-lie.is-off { opacity: .55; }
/* The grid the panels stand on takes the same two-pill shape as the way they
   lie: both settle the lattice rather than filter it, so they read as a pair. */
.face-grid { align-items: flex-start; flex-wrap: wrap; }
.face-grid.is-off { opacity: .55; }
.face-lie-picks, .face-grid-picks { display: flex; flex-wrap: wrap; gap: 4px; }
.face-lie-picks .btn, .face-grid-picks .btn { padding-left: 8px; padding-right: 8px; }
/* Which way a flat face's frames look. A bearing is a number, not one of a
   few answers, so this one takes a field; Auto beside it is the way back to
   the building's own line and lights up only once there is a turn to undo. */
.face-facing { align-items: flex-start; flex-wrap: wrap; }
.face-facing.is-off { opacity: .55; }
.face-facing-pick { display: inline-flex; align-items: center; gap: 4px; }
.face-tools .face-facing-deg {
  width: 5.2em; text-align: right;
  font-variant-numeric: tabular-nums;
}
.face-tools .face-facing-unit { color: var(--text-dim); margin-right: 4px; }
.face-facing-pick .btn { padding-left: 8px; padding-right: 8px; }

.face-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
/* The count of deleted segments and the way back, shown whether or not a
   segment is picked: nothing on the map stands for a deleted one. */
.face-gone { margin-top: 10px; color: var(--text-dim); }
.face-tools .btn { flex: 0 0 auto; white-space: nowrap; }
.face-tools.is-set-aside { display: none; }

@media (max-width: 620px) {
  .face-tools { top: 8px; right: 8px; left: 8px; width: auto; }
}

/* The question asked beside a panel before taking a whole segment out with
   it. Inside a Google InfoWindow, whose own bubble is white in both themes,
   so this sets its own ink rather than the page's. */
.panel-ask {
  max-width: 19rem;
  font: 400 0.9rem/1.45 var(--font);
  color: #1b2430;
}

.panel-ask p { margin: 0 0 10px; }
.panel-ask strong { font-weight: 600; }

.panel-ask-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* The building outlines drawn while a roof is being added or taken out are
   Google Maps polygons, not elements, so their colours live in app.js
   (ROOF_OUTLINE_*). Only the legend that names them is here. */
.roof-outline-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: -6px 0 12px;
  font-size: 12px;
  color: var(--text-dim);
}

.roof-outline-legend .key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.roof-outline-legend .swatch {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  border: 1.5px solid currentColor;
}
.map-edit-tools > .btn.is-set-aside { display: none; }

/* And the row itself, when a mode has taken every tool in it away: an
   empty bordered box under the others is worse than no box (20 Sept). */
.map-edit-tools.is-set-aside { display: none; }

/* While the map is taken over - shading on, the outline being adjusted, the
   laser view - only the tools that belong to it show; renderMapTools in
   app.js decides which. A class of its own rather than field-hidden, so each
   button's own show-and-hide rules are left alone and come back exactly as
   they were. */
.map-tools > .btn.is-set-aside { display: none; }

/* While the shading is on, "Done" is the one tool left in the row and sits at the row's right-hand end (the user, 19 Nov 2026:
   "Change Hide Shading to Done and move to right hand side"). The auto margin puts it there whether the row shares the heading's
   line or has wrapped under it. */
.map-tools.is-ending { margin-left: auto; }

/* 'Daily' and 'Annual' over the shading charts, in the card's own label
   style so they read as part of it. */
.shadow-section {
  margin: 18px 0 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
}

/* How much of the roof is in shade, through the day. Sits under the
   picture, so the two read together. */
.shadow-chart {
  margin: 10px 0 0;
  padding: 0;
}

.shadow-chart canvas {
  display: block;
  width: 100%;
  height: 132px;
}

#shadowMonth { height: 228px; }

/* What the month grid's colours mean. */
.shade-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.shade-key-ramp {
  width: 88px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--shade-lit), var(--shade-dark));
}

.sun-key-ramp {
  width: 88px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--sun-low), var(--sun-high));
}

#shadowClimate { height: 228px; }

/* Each swatch stays with its words when the key wraps. */
.loss-key-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.loss-swatch {
  flex: 0 0 auto;
  width: 12px;
  height: 10px;
  border-radius: 2px;
}
.loss-swatch-shade { background: var(--shade-dark); }
.loss-swatch-wiring { background: var(--mismatch); }

.shade-key-night {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  background: var(--shade-night);
  box-shadow: inset 0 0 0 1px var(--line);
}

.shadow-chart figcaption {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* MCS 032 A1 beside the quote's own factor: two figures side by side, the
   box picked out in the accent where they are more than two points apart. */
.mcs-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 14px;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-sunk);
}
.mcs-compare.is-apart {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.mcs-compare-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mcs-compare-label {
  font-size: 0.78rem;
  color: var(--text-faint);
}
.mcs-compare-sf {
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mcs-compare-loss {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.mcs-compare-verdict {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.mcs-compare.is-apart .mcs-compare-verdict strong { color: var(--accent); }
.sunpath-chart canvas { height: auto; }

/* The shadow's own controls: a date, a time, and a button to run the day.
   Its own row under the tools, because a slider beside buttons reads as a
   button. */
.shadow-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

/* The Shading view's two tabs (17 Nov 2026): the day, and the year's sources. Made plain to see on 18 Nov 2026,
   when the second was not found: both read as buttons at a thumb's height, the open one marked in the accent. */
.shade-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  border-bottom: 2px solid var(--line);
}
.shade-tab {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 18px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-top: 3px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--bg-sunk);
  color: var(--text);
  cursor: pointer;
}
.shade-tab:hover { background: var(--bg-raised, transparent); }
.shade-tab.is-active {
  color: var(--text);
  border-top-color: var(--accent);
  background: var(--bg-raised, transparent);
  margin-bottom: -2px;
}
.shade-sources-box { margin: 0 0 10px; }
.sources-key-ramp {
  width: 120px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 150, 130, 0.35), rgba(255, 30, 30, 0.7), rgba(150, 0, 0, 0.9));
  box-shadow: inset 0 0 0 1px var(--line);
}
.sources-strength { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.sources-strength input[type="range"] { width: 110px; min-width: 80px; }

.shadow-controls label {
  font-size: 0.85rem;
  color: var(--ink-muted, #9aa4b2);
}

.shadow-controls input[type="range"] {
  flex: 1 1 160px;
  min-width: 120px;
}

.shadow-clock {
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  min-width: 72px;
}

/* What a control in use wants said about the map, rather than in its own
   label. Takes the full width under the row. */
.map-hint {
  flex-basis: 100%;
  margin: -4px 0 10px;
  font-size: 0.85rem;
  color: var(--ink-muted, #9aa4b2);
}

.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.tab {
  padding: 5px 13px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 620;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.tab.is-active { background: var(--accent); color: var(--accent-ink); }

.map-stage {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  min-height: 380px;
}

@media (max-width: 980px) {
  .map-stage { min-height: 320px; aspect-ratio: 1 / 1; }
}

.map-surface { position: absolute; inset: 0; width: 100%; height: 100%; }

.map-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(128, 139, 154, .05) 12px 24px),
    var(--bg-sunk);
}

/* The message over the roof while the AI traces its faces (app.js,
   startRoofTidy): top and centre of the picture, above the map's own controls,
   and out of the way of clicks - the picture underneath stays usable. */
.roof-tidy-note {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 13, 18, .82);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #f4f6f9;
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
}

.roof-tidy-note::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #f4f6f9;
  animation: roof-tidy-spin .9s linear infinite;
}

/* A message that is only said, once the work is over, carries no spinner. */
.roof-tidy-note.is-done::before { display: none; }

@keyframes roof-tidy-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .roof-tidy-note::before { animation: none; }
}

.map-legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10, 13, 18, .78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: 11px;
  color: #dfe6ef;
}

.legend-ramp {
  width: 84px;
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, #3b4cc0, #4bb3d1, #7fd47f, #f2d43f, #f2793f);
}

.map-surface.is-picking { cursor: crosshair; }
.map-surface.is-excluding { cursor: crosshair; }
.map-surface.is-removing { cursor: pointer; }
#pickRoof { margin-left: auto; }

/* The 3D view: the Auto Designer's model on a canvas that fills the map (1280 x 960,
   the map's own 4:3), the colours painted by roof-model.js - a pale ground, so
   it is lit in either theme - and a slider to turn it from a strip along the foot. */
.model3d-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #f4f7fa;
  touch-action: none;
  cursor: grab;
}
.model3d-canvas:active { cursor: grabbing; }
.model3d-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #1b2b3c;
  font-size: 12px;
}
.model3d-bar label { color: inherit; }
.model3d-bar input[type="range"] { flex: 1; min-width: 0; }
.model3d-bar span { min-width: 5.5em; text-align: right; font-variant-numeric: tabular-nums; }
.model3d-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  text-align: center;
  background: rgba(244, 247, 250, 0.92);
  color: #1b2b3c;
  font-size: 14px;
}

.map-caption {
  margin: 10px 2px 0;
  font-size: 12px;
  color: var(--text-faint);
  min-height: 18px;
}

/* plan view */
.plan-svg { width: 100%; height: 100%; display: block; }
.plan-bg { fill: var(--bg-sunk); }
.plan-building { fill: rgba(148, 163, 184, .10); stroke: rgba(148, 163, 184, .5); stroke-width: .35; }
.plan-segment { fill: rgba(148, 163, 184, .07); stroke: rgba(148, 163, 184, .28); stroke-width: .2; }
.plan-panel { stroke: rgba(0, 0, 0, .55); stroke-width: .05; }
.plan-label { fill: var(--text-faint); font-size: 1.1px; font-family: var(--font); }

/* ------------------------------------------------------------------ */
/* enquiry                                                             */
/* ------------------------------------------------------------------ */
.action-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.action-row .btn { margin-top: 0; }
@media (max-width: 520px) { .action-row { flex-direction: column; } }

.btn-quiet {
  background: transparent;
  border-color: var(--line);
  color: var(--text-dim);
}

.btn-quiet:hover { color: var(--text); border-color: var(--text-faint); }

.notice-good {
  border-color: rgba(74, 222, 128, .45);
  background: rgba(74, 222, 128, .09);
  color: var(--good);
}

.enquiry-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.enquiry-dialog::backdrop {
  background: rgba(8, 11, 16, .62);
  backdrop-filter: blur(3px);
}

.enquiry-dialog form { padding: 20px; }

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.dialog-head h2 { font-size: 17px; }

.dialog-close {
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.dialog-close:hover { color: var(--text); }

.dialog-intro { margin: 0 0 14px; font-size: 13px; color: var(--text-dim); }

.dialog-summary {
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

.dialog-summary strong { color: var(--text); font-weight: 620; }
.dialog-summary .summary-address { display: block; margin-bottom: 4px; }

.optional { color: var(--text-faint); font-weight: 500; }

textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  min-height: 66px;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 181, 71, .18);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.dialog-privacy {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* footer + busy                                                       */
/* ------------------------------------------------------------------ */
.footer {
  padding: 18px 24px 28px;
  max-width: 900px;
}

.footer p { margin: 0; font-size: 12px; color: var(--text-faint); line-height: 1.6; }

/* ------------------------------------------------------------------ */
/* the summary across the bottom of a customer's page (18 Nov 2026)    */
/* ------------------------------------------------------------------ */
.summary-card { padding: 26px 28px 22px; }
.summary-title { margin: 0 0 18px; font-size: 20px; font-weight: 660; letter-spacing: -.01em; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.summary-col {
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px 14px;
  min-width: 0;
}
.summary-col h3 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
}
.summary-table { width: 100%; border-collapse: collapse; }
.summary-table th,
.summary-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  vertical-align: baseline;
}
.summary-table th { text-align: left; font-weight: 500; color: var(--text-dim); padding-right: 14px; }
.summary-table td { text-align: right; font-weight: 620; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-table td.summary-wrap { white-space: normal; overflow-wrap: anywhere; }
.summary-table tr:last-child th,
.summary-table tr:last-child td { border-bottom: 0; }
.summary-table .summary-total th,
.summary-table .summary-total td { border-top: 2px solid var(--line); border-bottom: 0; font-size: 16px; }
.summary-table .summary-total th { color: var(--text); font-weight: 640; }
.summary-table .summary-total td { color: var(--accent); font-weight: 700; }
.summary-table td.summary-dim { color: var(--text-faint); font-weight: 500; font-size: 13px; }
.summary-foot { margin: 8px 0 0; font-size: 12px; color: var(--text-faint); }
.summary-note { margin: 16px 0 0; font-size: 12px; color: var(--text-faint); line-height: 1.6; }
.summary-note-wide { grid-column: 1 / -1; margin: 0; }
@media (max-width: 980px) {
  .summary-grid { grid-template-columns: minmax(0, 1fr); }
  .summary-card { padding: 20px 16px 16px; }
}

/* The menu a right-click on a roof corner brings up. One item, placed at the pointer
   and dismissed by the next click anywhere - a corner is a small target and a
   menu that lingers over it is in the way of the next drag. */
.point-menu {
  position: fixed;
  z-index: 60;
  min-width: 148px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel, #11161d);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}
.point-menu button {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.point-menu button:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.point-menu button:disabled { color: var(--text-faint); cursor: default; }
.point-menu .why { padding: 2px 10px 6px; font-size: 12px; color: var(--text-faint); }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background: rgba(10, 13, 18, .55);
  backdrop-filter: blur(3px);
  color: #fff;
  font-size: 14px;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  .btn:active { transform: none; }
}

/* THE TIME BAR of a wait that says how long (app.js, waitStart; the user, 24 Nov 2026: "show a moving time bar with an estimate of the time
   left"): a track, a fill that grows towards the time the wait usually takes and never to the end before the work is done, and a sheen that
   keeps moving across the fill so a long wait never looks stopped. */
.wait-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: min(260px, 70vw);
}

.wait-bar {
  display: block;
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .25);
  overflow: hidden;
}

.wait-bar i {
  display: block;
  position: relative;
  overflow: hidden;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width .3s linear;
}

.wait-bar i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
  transform: translateX(-100%);
  animation: wait-sheen 1.4s ease-in-out infinite;
}

@keyframes wait-sheen { to { transform: translateX(100%); } }

.wait-left {
  min-height: 1.3em;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255, 255, 255, .88);
}

/* Under the message over the roof while the AI traces it: the same top and centre, below that message, out of the way of clicks. */
.roof-tidy-wait {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: min(240px, calc(100% - 48px));
  padding: 8px 14px 7px;
  border-radius: 14px;
  background: rgba(10, 13, 18, .82);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #f4f6f9;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .wait-bar i { transition: none; }
  .wait-bar i::after { animation: none; }
}

/* phase + shade factor sit beside the occupancy select */
.mcs-inputs-3 { grid-template-columns: minmax(0, 1fr) 130px 120px; }

@media (max-width: 700px) {
  .mcs-inputs-3 { grid-template-columns: 1fr 1fr; }
  .mcs-inputs-3 .field:first-child { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------ */
/* battery comparison                                                  */
/* ------------------------------------------------------------------ */
.compare-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 20px;
  padding: 20px 24px 8px;
  align-items: start;
}

@media (max-width: 980px) { .compare-layout { grid-template-columns: 1fr; padding: 16px; } }

.compare-picker { position: sticky; top: 20px; }
@media (max-width: 980px) { .compare-picker { position: static; } }

.solution-list {
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-sunk);
  padding: 6px;
}

.solution-group + .solution-group { margin-top: 10px; }

.solution-maker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 8px 8px 5px;
}

.solution {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s;
}

.solution:hover { background: var(--bg-raised); }
.solution.is-picked { background: rgba(255, 181, 71, .12); }
.solution.is-disabled { opacity: .4; cursor: not-allowed; }
.solution input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.solution-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.solution-name { font-size: 13.5px; font-weight: 550; line-height: 1.35; }
.solution-meta { font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.compare-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 30px;
  text-align: center;
  color: var(--text-faint);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}

.compare-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.compare-table th[scope="row"] {
  text-align: left;
  font-weight: 550;
  color: var(--text-dim);
  padding: 9px 12px 9px 2px;
  white-space: nowrap;
  vertical-align: top;
  width: 1%;
}

.compare-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  font-variant-numeric: tabular-nums;
  min-width: 150px;
}

.compare-table tr.compare-section td {
  padding: 16px 12px 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

.compare-table tr.compare-total td { background: rgba(255, 181, 71, .08); }
.compare-table tr.compare-images td { border-bottom: none; padding-bottom: 0; }

.compare-img {
  display: block;
  max-width: 100%;
  max-height: 190px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--bg-sunk);
}

.compare-img-small { max-height: 74px; margin-bottom: 5px; }

.compare-img-missing {
  display: grid;
  place-items: center;
  height: 120px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: center;
  padding: 8px;
}

.compare-flag {
  display: inline-block;
  margin-left: 6px;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 181, 71, .18);
  color: var(--accent);
  white-space: nowrap;
}

.compare-yes { color: var(--good); font-weight: 600; }
.compare-sub { display: block; font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

.backup-toggle { display: flex; gap: 7px; align-items: center; cursor: pointer; font-size: 13px; }
.backup-toggle input { accent-color: var(--accent); }

a.badge { text-decoration: none; }
a.badge:hover { color: var(--text); border-color: var(--text-faint); }

/* handover between the quote and comparison tools */
.btn-compare { margin-top: 12px; }
.compare-use td { padding-top: 14px; border-bottom: none; }
.btn-use { width: 100%; }

body.pick-mode .compare-picker::before {
  content: "Choosing a battery for your solar quote";
  display: block;
  margin: -4px 0 14px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 181, 71, .1);
  border: 1px solid rgba(255, 181, 71, .32);
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 600;
}

/* ---------------------------------------------------------------- */
/* landing page: pick a tool                                         */
/* ---------------------------------------------------------------- */

.landing {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 24px;
}

.landing-intro {
  color: var(--text-dim);
  margin: 0 0 20px;
}

.tool-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tool-icon {
  font-size: 26px;
  line-height: 1;
}

.tool-card h2 {
  margin: 0;
  font-size: 19px;
}

.tool-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  /* Push the link to the bottom so the three cards line up. */
  flex: 1;
}

.tool-go {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* Choosing which brand a tool runs as, inside its card. Like .tool-note it
   must not take a share of the flex above, or the cards stop lining up. */
.tool-pick {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

.tool-pick > span {
  white-space: nowrap;
}

.tool-pick select {
  font: inherit;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-sunk, transparent);
  color: var(--text);
  max-width: 100%;
}

/* A note under a card's description - how to reach something that is not
   simply a link away. It must not take a share of the flex above, or the
   cards stop lining up. */
.tool-card p.tool-note {
  flex: 0 0 auto;
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
  opacity: .85;
}

.tool-card p.tool-note code {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- */
/* day simulator                                                     */
/* ---------------------------------------------------------------- */

/* Three hues carry identity: solar, battery, grid. Sign carries direction,
   so battery-in and battery-out share a colour and sit either side of zero.
   Validated against this surface (#161b23) on all pairs - worst CVD dE 8.4,
   worst normal-vision dE 19.8. */
.sim-layout {
  --tone-solar: #c98500;
  --tone-battery: #199e70;
  --tone-grid: #3987e5;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  padding: 18px 24px 28px;
  align-items: start;
}

@media (max-width: 1080px) {
  .sim-layout { grid-template-columns: minmax(0, 1fr); }
}

/* The Auto Designer's copy of this simulator went on 11 Nov 2026: it has a
   simulation panel of its own now, so the .sim-lab and .lab-grid rules that
   dressed this page down for it have gone with the code that set them. */

.sim-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.site-summary { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.site-summary strong { font-size: 15px; }
.site-summary span { color: var(--text-dim); font-size: 13px; }

.data-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}
.data-note-modelled { color: var(--accent); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 14px 0 4px;
  font-size: 13px;
  color: var(--text-dim);
}
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.legend-sep { margin-left: auto; }

.swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--c, var(--text-faint));
  flex: none;
}
.swatch.tone-solar { --c: var(--tone-solar); }
.swatch.tone-battery { --c: var(--tone-battery); }
.swatch.tone-grid { --c: var(--tone-grid); }
.swatch-line { height: 2px; border-radius: 2px; width: 14px; background: var(--text); }
.swatch-night { background: rgba(57, 135, 229, .16); box-shadow: inset 0 0 0 1px rgba(57, 135, 229, .4); }
.swatch-peak { background: rgba(248, 113, 113, .14); box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .4); }

.chart-stack { position: relative; margin-top: 8px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart-label {
  margin: 10px 0 2px;
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.bar.tone-solar { fill: var(--tone-solar); }
.bar.tone-battery { fill: var(--tone-battery); }
.bar.tone-grid { fill: var(--tone-grid); }

.grid { stroke: var(--line-soft); stroke-width: 1; }
.grid-zero { stroke: var(--line); stroke-width: 1.5; }
.axis { fill: var(--text-faint); font-size: 11px; font-family: var(--font); }

.series-load {
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
  stroke-linejoin: round;
}

.band-night { fill: rgba(57, 135, 229, .10); }
.band-peak { fill: rgba(248, 113, 113, .09); }

.soc-fill { fill: color-mix(in srgb, var(--tone-battery) 45%, transparent); stroke: var(--tone-battery); stroke-width: 1.5; }
.shade-fill { fill: var(--shade-fill); stroke: var(--shade-line); stroke-width: 1.5; stroke-linejoin: round; }
.shade-note { margin: 6px 0 0; }

.crosshair {
  position: absolute;
  top: 26px;
  bottom: 20px;
  width: 1px;
  background: var(--text-faint);
  pointer-events: none;
}

.chart-tip {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  z-index: 3;
  min-width: 168px;
  padding: 9px 11px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 12px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tip-period { color: var(--text-faint); text-transform: capitalize; margin-bottom: 4px; }
.tip-row { display: flex; justify-content: space-between; gap: 14px; color: var(--text-dim); }
.tip-row b { color: var(--text); font-variant-numeric: tabular-nums; }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px;
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}
.tile-label { font-size: 12px; color: var(--text-dim); }
.tile-value { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.tile-note { font-size: 12px; color: var(--text-faint); }

.group-heading {
  margin: 22px 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 6px;
}
.group-heading:first-of-type { margin-top: 6px; }
.group-note { text-transform: none; letter-spacing: 0; color: var(--text-dim); }

.check { display: flex; align-items: center; gap: 9px; margin-top: 10px; font-size: 14px; }

.tariff-grid {
  display: grid;
  grid-template-columns: 1fr repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
}
.tariff-head { font-size: 11px; color: var(--text-faint); text-align: center; }
.tariff-name { font-size: 13px; color: var(--text-dim); }
.tariff-fixed { font-size: 12px; color: var(--text-faint); text-align: center; }
.tariff-grid input { width: 100%; }

#breakdown th { font-weight: 400; color: var(--text-dim); text-align: left; }
#breakdown td { text-align: right; font-variant-numeric: tabular-nums; }
#breakdown .spacer td { padding: 4px 0; }

.btn-simulate { margin-top: 18px; }
/* The energy flow and the simulator stack as one pair (12 Nov 2026): the
   first one shown takes the gap above, the second sits close beneath it.
   The energy flow hides itself where its body cannot be built, and the
   simulator must then keep the gap, hence the :not(). */
.btn-simulate:not(.field-hidden) + .btn-simulate { margin-top: 4px; }
.action-row { margin-top: 10px; }

/* The tick that keeps a roof face in the quote, or takes it out. */
.roof-use { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.roof-use input { margin: 0; cursor: pointer; }
.roof-table tr:has(input[data-segment]:not(:checked)) { opacity: .55; }

.roof-unused td { color: var(--text-faint); }

/* Simulate and Book are the same amber as Enquire, stepped back so the
   primary action still leads. A tinted fill rather than a lighter solid:
   on this dark surface a paler solid reads as MORE prominent, not less. */
.btn-accent-soft {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}
.btn-accent-soft:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
  border-color: var(--accent);
}
/* Deleting a segment takes it off the roof rather than out of the quote, so
   it reads in the warning colour instead of the accent - the same soft
   treatment, so it sits beside Undo without shouting. */
.btn-danger-soft {
  background: color-mix(in srgb, var(--bad) 16%, transparent);
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 42%, transparent);
}
.btn-danger-soft:hover:not(:disabled) {
  background: color-mix(in srgb, var(--bad) 26%, transparent);
  border-color: var(--bad);
}

/* The date drives everything on this page, so it gets its own block rather
   than sitting as one more field in the header. */
.date-pick {
  padding: 12px 14px;
  background: var(--bg-sunk);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  min-width: 250px;
}
.date-pick > label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--accent);
  margin-bottom: 7px;
}
.date-row { display: flex; gap: 6px; align-items: stretch; }
.date-row input {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}
.date-step { padding: 6px 11px; font-size: 15px; line-height: 1; }
.date-shortcuts { display: flex; gap: 12px; margin-top: 8px; }
.date-shortcuts .link-btn { font-size: 12px; }

.hint-live { color: var(--good); }
.tariff-grid input:disabled { opacity: .65; cursor: not-allowed; }

.soc-reserve {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  opacity: .85;
}

/* Import rate chart: total in grid-blue, the supplier's own tariff in solar-
   amber, and DUoS alone in a third hue not otherwise used on this page. */
.rate-total { fill: none; stroke: var(--tone-grid); stroke-width: 2; }
.rate-supplier { fill: none; stroke: var(--tone-solar); stroke-width: 1.5; opacity: .9; }
.rate-duos { fill: none; stroke: #b060d6; stroke-width: 1.5; opacity: .9; }
.legend-rates { margin-top: 6px; }
.rate-total-swatch { background: var(--tone-grid); }
.rate-supplier-swatch { background: var(--tone-solar); }
.rate-duos-swatch { background: #b060d6; }

/* whole-year run */
.year-run { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.year-run > label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.year-row { display: flex; gap: 6px; }
.year-row select { flex: 1; }

.year-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.year-head { display: flex; align-items: baseline; justify-content: space-between; }
.year-head h3 { margin: 0; font-size: 15px; }
.year-count { font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.year-bar {
  height: 4px;
  margin: 10px 0 14px;
  background: var(--bg-sunk);
  border-radius: 2px;
  overflow: hidden;
}
.year-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .12s linear;
}

.year-compare { margin-top: 16px; }

/* The trading table is a separate argument from the comparison above it, so
   it gets a clear gap rather than butting straight up against it. */
.trading-gain { margin-top: 28px; }
.trading-gain:empty { margin-top: 0; }

/* Payback: the loan's three inputs in a row, then twenty years of cash. */
.payback { margin-top: 28px; }
.payback-inputs { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 4px 0 12px; }
.payback-inputs label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.payback-inputs input { width: 6em; }
.payback-summary { margin: 0 0 10px; }
.payback-grid tbody th { font-variant-numeric: tabular-nums; }
.payback-grid td.better { color: var(--good); }
.payback-grid td.worse { color: var(--bad); }

/* The 20 year cash-flow chart. Four series colours, checked for colour-blind
   separation and contrast against the card in both themes (dark first, as the
   site is): capital repaid, interest, the year-one tax saving and the loan
   outstanding. The energy saving is drawn in the text colour. */
.payback-irr { margin: 0 0 8px; font-size: 14px; color: var(--text); }
.payback-irr b { font-size: 20px; font-variant-numeric: tabular-nums; margin: 0 4px; }
.payback-irr-label { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }
.payback-irr.muted, .payback-irr .muted { color: var(--text-dim); font-size: 13px; }
.cashflow {
  --cf-capital: #3987e5;
  --cf-interest: #d95926;
  --cf-tax: #199e70;
  --cf-balance: #9085e9;
  --cf-grid: #d55181;
  position: relative;
  margin: 4px 0 6px;
}
@media (prefers-color-scheme: light) {
  .cashflow {
    --cf-capital: #2a78d6;
    --cf-interest: #eb6834;
    --cf-tax: #1baf7a;
    --cf-balance: #4a3aa7;
    --cf-grid: #e87ba4;
  }
}
.cashflow svg { display: block; width: 100%; height: auto; }
.cf-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--text-dim); margin: 0 0 6px; }
.cf-key { display: inline-flex; align-items: center; gap: 6px; }
.cf-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.cf-sw-line { width: 16px; height: 2px; border-radius: 2px; }
.cf-sw-capital { background: var(--cf-capital); }
.cf-sw-interest { background: var(--cf-interest); }
.cf-sw-tax { background: var(--cf-tax); }
.cf-sw-balance { background: var(--cf-balance); }
.cf-sw-om { background: var(--cf-balance); }
.cf-om { fill: var(--cf-balance); }         /* O&M takes the fourth checked colour */
.cf-sw-grid { background: var(--cf-grid); }
.cf-grid { fill: var(--cf-grid); }          /* grid services, the fifth */
.cf-sw-saving { background: var(--text); }
.cf-capital { fill: var(--cf-capital); }
.cf-interest { fill: var(--cf-interest); }
.cf-tax { fill: var(--cf-tax); }
.cf-balance-line { fill: none; stroke: var(--cf-balance); stroke-width: 2; stroke-linejoin: round; }
.cf-balance-area { fill: var(--cf-balance); fill-opacity: .12; }
.cf-balance-dot { fill: var(--cf-balance); stroke: var(--bg-raised); stroke-width: 2; }
.cf-saving { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; }
.cf-saving-dot { fill: var(--text); stroke: var(--bg-raised); stroke-width: 2; }
/* net cash flow: the same ink as the saving, told apart by the dash and square markers */
.cf-net { fill: none; stroke: var(--text); stroke-width: 2; stroke-dasharray: 6 4; stroke-linejoin: round; }
.cf-net-dot { fill: var(--text); stroke: var(--bg-raised); stroke-width: 2; }
.cf-sw-net { background: repeating-linear-gradient(90deg, var(--text) 0 6px, transparent 6px 9px); }
.cf-panel { fill: var(--text-dim); font-size: 12px; font-family: var(--font); }
.cf-label { fill: var(--text); font-size: 11px; font-family: var(--font); }
.cf-hit { fill: var(--text); fill-opacity: 0; cursor: default; }
.cf-hit.is-on { fill-opacity: .06; }
.cf-axis-note { margin: -4px 0 0; text-align: center; font-size: 11px; color: var(--text-faint); }
.cf-tip {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 190px;
  padding: 8px 10px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--text-dim);
  pointer-events: none;
}
.cf-tip[hidden] { display: none; }
.cf-tip strong { color: var(--text); font-size: 12px; margin-bottom: 2px; }
.cf-tip span { display: flex; justify-content: space-between; gap: 14px; }
.cf-tip b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Sits right under the headline tiles, so it reads as their own footnote
   rather than another argument like the trading table below. */
.network-split { margin-top: 16px; }
.network-split:empty { margin-top: 0; }
.compare-head {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
}
.year-compare td { text-align: right; font-variant-numeric: tabular-nums; }
.year-compare th { font-weight: 400; color: var(--text-dim); text-align: left; }
.diff { font-weight: 650; }
.diff-ok { color: var(--good); }
.diff-over { color: var(--accent); }
.diff-under { color: var(--bad); }

.compare-grid thead th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-faint);
  text-align: right;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}
.compare-grid thead th:first-child { text-align: left; }

/* Keyed on the table, not on its container: these rules used to hang off
   .year-compare, so the same markup rendered elsewhere on the page lost its
   alignment and the values sat left under right-aligned headings. */
.compare-grid tbody td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  /* Without this a narrow column breaks "-£229.21" after the sign, which
     reads as a stray dash above a positive number. */
  white-space: nowrap;
}
.compare-grid tbody th[scope="row"] {
  font-weight: 400;
  color: var(--text-dim);
  text-align: left;
}
/* A section row spans the label column, so style it whichever cell it is. */
.mcs-table tr.mcs-section th {
  padding: 14px 10px 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.compare-grid tr.mcs-section td { text-align: right; }

.compare-notes {
  margin: 10px 0 0;
  padding-left: 16px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.compare-notes li { margin-top: 5px; }

/* The one-line answer to "why is this different from the quote?" */
.why-line {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 620;
  line-height: 1.55;
  color: var(--text);
}
.why-money { color: var(--accent); white-space: nowrap; }

.why-sum {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 620;
  line-height: 1.55;
  color: var(--text);
}

/* It leads the section, so it needs air above it rather than below. */
.why-line { margin: 4px 0 12px; }
.why-sum { margin: -8px 0 14px; }

.mcs-note td {
  color: var(--text-faint);
  font-size: 12px;
  font-style: italic;
  padding-top: 4px;
}

/* battery suggestions from the five-year sweep */
.suggestions { margin-top: 18px; }
.suggestion {
  padding: 14px 16px;
  margin-top: 10px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius-sm);
}
.suggestion-both { border-left-color: var(--good); }
.suggestion-solar { border-left-color: var(--tone-solar, #c98500); }
.suggestion-payback { border-left-color: var(--accent); }
.suggestion p { margin: 0; }
.suggestion-title { font-weight: 650; font-size: 14px; }
.suggestion-product { margin-top: 4px !important; font-size: 13px; color: var(--text-dim); }
.suggestion-why {
  margin-top: 6px !important;
  font-size: 14px;
  font-weight: 620;
  color: var(--accent);
}
.suggestion-detail { margin-top: 4px !important; font-size: 12.5px; color: var(--text-faint); }
.suggestion .btn { margin-top: 10px; }

/* MCS 032 6.3.2 - the pre-contract storage disclosures. Rows the datasheets
   cannot answer are marked rather than hidden, so the gaps are visible. */
.mcs-eess { margin-top: 1.25rem; }
.eess-head { font-weight: 600; margin: 0 0 .3rem; }
.eess-head .clause { font-weight: 500; opacity: .7; margin-left: .4rem; }
.eess-sub { margin: 0 0 .75rem; font-size: .85rem; opacity: .75; line-height: 1.5; }
.eess-table td { vertical-align: top; }
.eess-table .eess-clause { width: 1.6rem; opacity: .55; font-variant-numeric: tabular-nums; }
.eess-table .eess-value { text-align: left; }
.eess-table .eess-open .eess-value { opacity: .7; font-style: italic; }

/* What a whole-year run means, beside the control that starts it. Inside MCS
   scope this carries a compliance warning, so it has to read as a notice
   rather than a caption. */
/* The date box and the note about year runs travel together, so they sit side
   by side when there is room and stack when there is not - rather than the
   note wrapping to its own line under a wide address heading. */
.sim-head-tools {
  display: flex;
  gap: 14px;
  align-items: stretch;
  flex-wrap: wrap;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.year-basis {
  /* Its own box beside the date picker, not part of it: this describes what a
     year run produces, which is a different thing from choosing a date. */
  flex: 1 1 300px;
  min-width: 260px;
  max-width: 460px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-sunk);
}
.year-basis:empty { display: none; }
.year-basis p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
}
.year-basis p + p { margin-top: 8px; }
.year-basis strong { color: var(--text); font-weight: 600; }

/* Days a workplace opens. Checkboxes rather than a "Mon-Fri" preset, because
   the ones that do not fit a preset - a shop shut on Mondays, a plant running
   Saturdays - are exactly the ones worth modelling. */
.day-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 4px;
}
.day-boxes label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-dim);
  text-transform: none;
  letter-spacing: 0;
}
.day-boxes input { accent-color: var(--accent); margin: 0; }

/* Network charges: three bands, two directions. Narrower than the tariff grid
   above it because there are no time columns - the bands have their own. */
.tariff-grid-duos { grid-template-columns: auto 1fr 1fr; }

/* Upstream status, top right. Every service the estimate leans on, and
   whether it answered - a quote built while an upstream was down is wrong in
   ways nothing else on the page would show. */
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.api-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 10px;
  font-size: 11px;
  color: var(--text-faint);
}
.api-item { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.api-mark { font-weight: 700; line-height: 1; }
.api-ok .api-mark { color: var(--good); }
.api-down .api-mark { color: var(--bad); }
.api-down { color: var(--bad); font-weight: 600; }
/* Configured but unprovable without spending money, or switched off. Neither
   is a fault, so neither gets the red that means "this is broken". */
.api-unproven .api-mark, .api-off .api-mark { color: var(--text-faint); }

@media (max-width: 700px) {
  .header-right { align-items: flex-start; }
  .api-status { justify-content: flex-start; }
}

/* Which method produced the figures, said in one word beside the number it
   most affects. Not a warning - a commercial building being outside MCS is
   the normal case, not a fault. */
.basis-tag {
  margin: 5px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.basis-tag-mcs { color: var(--good); }
.basis-tag-non { color: var(--text-faint); }

/* The section heading with MCS / Non-MCS at its right (the user, 20 Nov 2026: "so it always fits on same line"). One row that never
   wraps: the heading is short and the tag does not break, so the two share a line at any width the card can be. */
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.card-head .card-title { margin: 0; min-width: 0; }
.card-head .basis-tag { margin: 0; flex: none; white-space: nowrap; }

/* The tariff choice under Supply (the user, 19 Nov 2026): Selectra's questions as selects in a row that wraps. */
.tariff-pick {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.tariff-pick-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
/* The one line a put-away box keeps: what is chosen, under the title, in ordinary case. */
.tariff-pick-sub {
  display: block;
  margin: 3px 0 0 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-faint);
}
/* Open, the box shows the tariff in full in its note: the line only speaks for it when it is put away. */
.tariff-pick[open] .tariff-pick-sub { display: none; }
.tariff-pick-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.tariff-pick-fields .field { margin-bottom: 0; }
.tariff-pick .hint { margin: 10px 0 0; }
/* The chosen tariff as a table (the user, 20 Nov 2026): a figure to a row, how it was worked out under it. */
.tariff-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tariff-table th,
.tariff-table td {
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
.tariff-table th { width: 38%; padding-right: 12px; font-weight: 600; color: var(--text-dim); }
.tariff-table td { color: var(--text); font-variant-numeric: tabular-nums; }
.tariff-table tr:last-child th,
.tariff-table tr:last-child td { border-bottom: 0; }
.tariff-table-note { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--text-faint); }
.tariff-table-foot { margin: 8px 0 0; font-size: 12px; color: var(--text-faint); }

/* STAFF'S: the assumptions, the MCS table and the roof breakdown (the user, 19 Nov 2026: "Only show assumptions, MCS table
   and roof breakdown in staff mode"). The page puts #resultsCard in .not-staff and lifts it for staff (applyStaffView);
   !important because the MCS table also hides and shows itself with field-hidden, and a member of the public must not see
   it whichever of the two last said so. */
#resultsCard.not-staff .staff-only { display: none !important; }

.mcs-inputs-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* Who the building is registered to. Sits under the address because that is
   what it describes - and it is a different fact from who trades there, so it
   is styled as a stated record rather than as part of the address itself. */
.owner-note {
  margin-top: 8px;
  padding: 9px 11px;
  border-left: 3px solid var(--line);
  background: var(--bg-sunk);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
}
.owner-note:empty { display: none; }
.owner-name { color: var(--text); font-weight: 600; }
.owner-meta { color: var(--text-faint); font-size: 11.5px; }
.owner-note ul { margin: 5px 0 0; padding-left: 16px; }
.owner-note li { margin-top: 3px; }

/* What Companies House says now, beside what the register says. Green for
   confirmation, amber for anything that has moved on - a dissolved or renamed
   proprietor is not an error, it is the thing you needed to know. */
.owner-status { font-size: 11.5px; color: var(--good); }
.owner-status.owner-stale { color: var(--accent); font-weight: 600; }

/* What the proprietor company does, per its own Companies House filing. */
.owner-sic {
  display: inline-block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-faint);
  font-style: italic;
}

/* The proprietor's filed trade is owning property, not occupying it - so the
   consent conversation is with them and not the business on the door. */
.owner-landlord {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 9px;
  background: rgba(255, 181, 71, .14);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

/* A dataset past its refresh. Not down, but not current either. */
.api-stale .api-mark { color: var(--accent); }
.api-stale { color: var(--accent); }

/* A lease with no freehold behind it. The absence is the finding, so it reads
   as a statement rather than as a footnote. */
.owner-gap {
  display: block;
  margin-top: 6px;
  padding-left: 8px;
  border-left: 2px solid var(--accent);
  color: var(--text-dim);
}

/* Who trades here, per the postal address file - the counterpart to the
   registered proprietor below it, and routinely a different company. */
.occupier { margin: 6px 0 0; font-size: 12.5px; }
.occupier:empty { display: none; }
.occupier-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
}
.occupier-name { color: var(--text); font-weight: 600; }
.occupier-meta { color: var(--text-faint); font-size: 11.5px; }

/* A title held by an overseas company. Worth marking: it changes who the
   letter goes to, and explains a freehold that looked absent. */
.owner-overseas {
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(255, 181, 71, .12);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
}

/* Registered leases over the property. A long unexpired term is the thing
   that decides whether a tenant can invest in a roof at all. */
.lease-head {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.lease-term { color: var(--text); font-weight: 600; }
.lease-meta { color: var(--text-faint); font-size: 11.5px; }

/* A metered figure rather than a modelled one - the strongest consumption
   evidence the tool can get, so it is marked as such. */
.epc-metered {
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(74, 222, 128, .14);
  color: var(--good);
  font-size: 10.5px;
  font-weight: 600;
}

/* What was paid for the lease, where a premium was paid at all. */
.lease-price { color: var(--text); font-weight: 600; }

/* Listed status under the address. Red where it is one; faint for a near
   miss, which is a prompt to check and not a finding. */
.heritage-note { margin: 6px 0 0; font-size: 13px; color: var(--text-dim); }
.heritage-note.is-listed { color: var(--bad); }
.heritage-note.is-near { color: var(--text-faint); }
.heritage-note a { color: inherit; text-decoration: underline; }
/* Folded under one line after the first time it is shown; a click opens the full text (20 Nov 2026). */
.heritage-note details { margin: 0; padding-top: 0; border-top: 0; }
.heritage-note summary { font-size: 13px; font-weight: 500; color: inherit; }
.heritage-note .heritage-fold-text { margin: 4px 0 0 16px; }

/* ---- Strings and wiring (staff only for now, 19 Sept) ---- */
/* Below <main>, not in its grid, so the sticky map stops at the grid's end. */
.strings-wide { padding: 12px 24px 8px; }
@media (max-width: 980px) { .strings-wide { padding: 0 16px 8px; } }
.strings-detail .assumption-grid { margin-top: 4px; }
.strings-warn { margin: 8px 0; }
.strings-warn p { margin: 0 0 4px; }
.strings-table td { vertical-align: middle; }
.strings-table .swatch { display: inline-block; vertical-align: -1px; margin-right: 4px; }
.strings-dim { color: var(--text-dim); }
.strings-checks td:first-child { white-space: nowrap; }
.strings-legend {
  left: auto;
  right: 12px;
  bottom: 12px;
  flex-wrap: wrap;
  max-width: 55%;
  border-radius: 12px;
}
.strings-legend .legend-item { gap: 4px; }
.strings-diagrams .string-diagram {
  display: block;
  width: 100%;
  max-width: 1000px;
  min-width: 720px;
  height: auto;
}
.strings-unit { margin: 0 0 18px; break-inside: avoid; display: flex; gap: 16px; align-items: flex-start; }
.strings-unit > .strings-svg { flex: 1 1 auto; min-width: 0; }
/* The battery or inverter, and the module under it, beside the layout they
   belong to (the user, 10 Oct). */
.strings-aside { flex: 0 0 236px; display: flex; flex-direction: column; gap: 12px; }
/* The module's part number and spec sit beside its picture, not under it
   (the user, 10 Oct): the number is what gets ordered and checked on site,
   so it wants to be read across rather than wrapped into a caption. */
.strings-aside .panel-shot { flex-direction: row; align-items: center; gap: 10px; text-align: left; }
.strings-aside .panel-shot > svg, .strings-aside .panel-shot > img { flex: 0 0 auto; max-width: 84px; max-height: 118px; }
.strings-aside .panel-shot figcaption { align-items: flex-start; text-align: left; min-width: 0; }
/* A part number is one long unbroken token: let it break rather than push
   the drawing out of the box. */
.strings-aside .panel-shot figcaption strong { overflow-wrap: anywhere; }
.strings-aside .panel-maker { color: var(--text); }
/* The quantity reads with the part number rather than among the spec: it is
   half of an order line, not another property of the module. */
.strings-aside .panel-count { color: var(--text); font-weight: 650; }
.strings-aside figure { margin: 0; display: flex; flex-direction: column; gap: 6px;
  align-items: center; text-align: center; padding: 10px;
  background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 8px; }
.strings-aside img { max-width: 100%; max-height: 132px; object-fit: contain; }
.strings-aside .product-shot-none { width: 100%; height: 72px; border-radius: 6px;
  border: 1px dashed var(--line); }
.strings-aside figcaption { display: flex; flex-direction: column; gap: 2px;
  font-size: 12px; line-height: 1.3; color: var(--text-dim); }
.strings-aside figcaption strong { color: var(--text); font-weight: 600; }
/* A part number that opens its datasheet. Underlined on hover only, so a
   caption full of numbers does not read as a row of links. */
.sheet-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--text-faint); }
.sheet-link:hover, .sheet-link:focus-visible { text-decoration: underline; border-bottom-color: transparent; }
@media print {
  /* Paper cannot be clicked: the number is just a number again. */
  .sheet-link { border-bottom: 0; text-decoration: none; }
}
@media (max-width: 760px) {
  .strings-unit { flex-direction: column; }
  .strings-aside { flex: 1 1 auto; flex-direction: row; flex-wrap: wrap; width: 100%; }
  .strings-aside figure { flex: 1 1 0; }
  /* On a phone the module takes a line of its own, so its spec still has
     room to sit beside the picture rather than wrapping a word at a time. */
  .strings-aside .panel-shot { flex: 1 1 100%; }
}
@media print {
  /* Wide enough for the part number to read across from the picture, which
     costs the layout drawing about a twelfth of the page. */
  .strings-aside { flex-basis: 190px; }
  .strings-aside img { max-height: 96px; }
  .strings-aside .panel-shot > svg, .strings-aside .panel-shot > img { max-width: 58px; max-height: 86px; }
}
.strings-print-head, .strings-print-table { display: none; }

.string-diagram .sd-title { fill: var(--text); font: 600 14px var(--font); }
.string-diagram .sd-inv { fill: var(--bg-sunk); stroke: var(--line); }
.string-diagram .sd-invname, .string-diagram .sd-mppt { fill: var(--text); font: 600 12px var(--font); }
.string-diagram .sd-label { fill: var(--text-dim); font: 12px var(--font); }
.string-diagram .sd-name { fill: var(--text); font-weight: 700; }
.string-diagram .sd-small { fill: var(--text-dim); font: 11px var(--font); }
.string-diagram .sd-wire { stroke-width: 2; fill: none; }
.string-diagram .sd-term { fill: var(--text); }
.string-diagram .sd-panel { stroke: rgba(0, 0, 0, .35); stroke-width: 1; }
.string-diagram .sd-left { stroke-dasharray: 3 2; }   /* a panel no string reaches */
/* The isolators: a device on the run, drawn as the break and the open blade
   it is. The run that carries several strings into one device is neutral -
   it is no longer any one string's colour. */
.string-diagram .sd-tie { stroke: var(--text-faint); stroke-width: 2; fill: none; }
.string-diagram .sd-blade { stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.string-diagram .sd-iso { fill: var(--bg-sunk); stroke: var(--line); }
.string-diagram .sd-isotext { fill: var(--text); font: 600 10.5px var(--font); }
.string-diagram .sd-isokind { fill: var(--text-faint); font-weight: 700; }
/* Nothing in the catalogue holds it: said on the drawing rather than left
   as a run with no device on it. */
.string-diagram .sd-iso-none { fill: none; stroke: var(--bad); stroke-dasharray: 3 2; }
.string-diagram .sd-isotext-none { fill: var(--bad); }

/* ---- Mounting kit (staff only for now, 19 Sept) ---- */
.mounting-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.mounting-options .field { margin: 0; }
.mounting-table td.num, .mounting-table th.num { text-align: right; font-weight: 600; color: var(--text); }
.mounting-table td { white-space: normal; }
.mounting-table td:first-child { font-family: var(--mono, ui-monospace, SFMono-Regular, Consolas, monospace); font-weight: 500; white-space: nowrap; }
.mounting-table tr.mounting-group td { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; padding-top: 12px; border-bottom: 1px solid var(--line); }
/* the roof face a list of parts belongs to (19 Sept) */
.mounting-table tr.mounting-face td { color: var(--text); font-size: 13px; font-weight: 700; padding-top: 18px; border-bottom: 1px solid var(--accent-soft, var(--line)); }
.mounting-table tr.mounting-face:first-child td { padding-top: 4px; }
/* both headings are prose, not part numbers, whatever the first column says */
.mounting-table tr.mounting-face td, .mounting-table tr.mounting-group td { font-family: inherit; white-space: normal; }
/* the whole roof's totals are a sum of the faces above, not a face */
.mounting-table tr.mounting-total td { border-top: 2px solid var(--accent-soft, var(--line)); color: var(--accent, var(--text)); }
/* a heading stays with its parts, and a part with its note, on paper */
.mounting-table tr.mounting-face td, .mounting-table tr.mounting-group td { break-after: avoid; page-break-after: avoid; }
.mounting-table tr { break-inside: avoid; page-break-inside: avoid; }
.wind-result .roof-table { margin-bottom: 8px; }
.wind-auto { margin: 6px 0 0; font-weight: 600; }
.wind-unsure { margin: 4px 0 8px; padding-left: 18px; }
.wind-result h3 { font-size: 0.95rem; margin: 14px 0 6px; }
.wind-working { margin: 0 0 8px; padding-left: 18px; }
.wind-working li { margin: 3px 0; }
.wind-verdict { font-weight: 600; margin: 10px 0 4px; }
.wind-verdict.ok { color: var(--good); }
.wind-verdict.fail { color: var(--bad); }
.mounting-detail { margin-top: 12px; }
.mounting-detail #mountingFaces td { white-space: normal; }
.mounting-notes { margin: 12px 0 0; padding-left: 18px; }
.mounting-notes li { margin: 2px 0; }

/* Printing the wiring alone: light colours, everything else put away. */
@media print {
  :root {
    --bg: #fff; --bg-raised: #fff; --bg-sunk: #f4f6f9; --line: #c9d0da; --line-soft: #e3e7ee;
    --text: #131820; --text-dim: #4a5361; --text-faint: #6b7584; --shadow: none;
  }
  body { background: #fff; }
  body.print-strings .topbar,
  body.print-strings .footer,
  body.print-strings main.layout,
  body.print-strings #stringsCard .map-tools,
  body.print-strings #busy,
  /* the summary's own copy goes in .strings-print-table, so the on-screen
     table would otherwise print twice (review, 20 Sept) */
  body.print-strings #stringsUnitsWrap,
  body.print-strings #stringsBigNote,
  body.print-strings #technicalSection,
  body.print-strings #mountingSection { display: none !important; }
  body.print-strings .strings-wide { padding: 0; }
  body.print-strings .card { box-shadow: none; border: 0; }
  body.print-strings .strings-print-head,
  body.print-strings .strings-print-table { display: block; }
  body.print-strings .strings-diagrams .string-diagram { min-width: 0; }
  .string-diagram, .swatch { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* the mounting kit list alone */
  body.print-mounting .topbar,
  body.print-mounting .footer,
  body.print-mounting main.layout,
  body.print-mounting #stringsSection,
  body.print-mounting #technicalSection,
  body.print-mounting #mountingCard .map-tools,
  body.print-mounting .mounting-options,
  body.print-mounting #busy { display: none !important; }
  body.print-mounting .strings-wide { padding: 0; }
  body.print-mounting .card { box-shadow: none; border: 0; }
  body.print-mounting #mountingPrintHead { display: block; }
  @page { margin: 12mm; }
}

/* The bill's cost and selling price (7 Nov): the line's total, its price each under it. */
.bill-money { white-space: nowrap; }
.bill-each { display: block; font-size: 11px; color: var(--text-dim); }
.bill-total td { font-weight: 600; }

/* ------------------------------------------------------------------ */
/* FULL TECHNICAL INFORMATION, the last thing on the page (the user, 20 Nov 2026: "At the end of the page add a 'Full Technical   */
/* Information' collapsing section with a detailed explanation of how everything works").                                         */
/* ------------------------------------------------------------------ */
.tech-card { padding: 0; }
.tech-info { margin: 0; padding: 0; border-top: 0; }
.tech-info > summary.tech-title {
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 660;
  letter-spacing: -.01em;
  color: var(--text);
}
.tech-info > summary.tech-title .tech-sub { display: block; margin: 3px 0 0 16px; font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--text-faint); }
.tech-body { padding: 0 24px 20px; font-size: 14px; line-height: 1.65; color: var(--text-dim); }
.tech-body p { margin: 8px 0; }
.tech-body strong { color: var(--text); font-weight: 620; }
.tech-lead { margin-top: 0; }
.tech-tools { margin: 0 0 4px; }
.tech-part { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.tech-part > summary { font-size: 14.5px; font-weight: 640; color: var(--text); }
.tech-part-body { padding: 4px 0 6px 16px; }
.tech-part-body h4 { margin: 16px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.tech-part-body ul, .tech-part-body ol { margin: 6px 0; padding-left: 20px; }
.tech-part-body li { margin: 3px 0; }
.tech-formula {
  margin: 8px 0;
  padding: 9px 12px;
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
}
.tech-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.tech-table th, .tech-table td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.tech-table th { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.tech-table td { font-variant-numeric: tabular-nums; }
.tech-table tr:last-child td { border-bottom: 0; }
/* What THIS property's figures are: a panel under the explanation, filled from the quote on the page. */
.tech-this {
  margin: 12px 0 4px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--bg-sunk);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px;
  color: var(--text);
}
.tech-this-title { display: block; margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); }
.tech-this p { margin: 4px 0; }
.tech-this .tech-table td:first-child { width: 38%; padding-right: 12px; color: var(--text-dim); }
.tech-src { font-size: 12px; color: var(--text-faint); }
@media (max-width: 980px) {
  .tech-info > summary.tech-title { padding: 16px; }
  .tech-body { padding: 0 16px 16px; }
  .tech-part-body { padding-left: 8px; }
}
