/* ==========================================================================
   Stonebridge Energy theme - colours, fonts and logo styling from stonebridge-energy.co.uk
   Green #018539 | soft green #E5F3EB / #BFE0CD | page grey #F2F3F5 | ink #111111
   Montserrat (body) and Cormorant Garamond (headings). Loads after every other stylesheet.
   The app is always shown in this light skin; the midnight/daylight toggle is hidden.
   ========================================================================== */
:root, :root[data-skin="daylight"], :root[data-skin="midnight"] {
  --font-display: 'Poppins', Arial, Helvetica, sans-serif;
  --font-body: 'Poppins', Arial, Helvetica, sans-serif;
  --font-mono: 'Poppins', Arial, Helvetica, sans-serif;
  --sb-green: #018539; --sb-green-dk: #016B2E; --sb-green-lt: #E5F3EB; --sb-green-md: #BFE0CD; --sb-ink: #111111;

  --amber: #018539; --amber-hi: #2FAE62; --amber-lo: #016B2E; --amber-ink: #FFFFFF;
  --amber-text: #016B2E; --cyan: #018539; --cyan-text: #016B2E;
  --bg: #F2F3F5; --bg-2: #E8EFEA;
  --bg-glow-a: rgba(1, 133, 57, .07); --bg-glow-b: rgba(1, 133, 57, .05);
  --card-top: #FFFFFF; --card-bot: #FBFCFB; --raise: #EEF4F0; --field-bg: #FFFFFF;
  --chrome-bg: rgba(242, 243, 245, .92);
  --edge: rgba(17, 17, 17, .12); --edge-2: rgba(17, 17, 17, .26); --edge-hot: rgba(1, 133, 57, .65);
  --ink: #111111; --ink-2: #4A4E57; --ink-3: #5F646D;
  --good: #018539; --good-bg: rgba(1, 133, 57, .10); --info-bg: rgba(1, 133, 57, .08);
  --s1: #018539; --s2: #111111;
  --shadow-glow: 0 18px 60px rgba(1, 133, 57, .10);
  --r-field: 12px;
  color-scheme: light;
}
body { font-family: var(--font-body); color: var(--ink); }
.disp, h1, h2, .h2, .h3, .ctitle, .login-h, .stage-h { font-family: var(--font-display); letter-spacing: 0; }
.disp, h1, h2, .h2, .login-h, .stage-h { font-weight: 700; }

/* buttons: Stonebridge green with white text, rounded like the website */
.btn, .btn-amber, .btn-ghost { border-radius: 20px; font-family: var(--font-body); }
.btn-amber { background: var(--sb-green); color: #fff; border-color: var(--sb-green); }
.btn-amber:hover:not(:disabled) { background: var(--sb-green-dk); box-shadow: 0 10px 28px rgba(1, 133, 57, .30); }
.stage.on { background: var(--sb-green); color: #fff; border-color: var(--sb-green); box-shadow: 0 8px 24px rgba(1, 133, 57, .25); }
.dgn { background: var(--sb-green); color: #fff; }

/* gradients and glows that were hard-coded amber */
.shine, :root[data-skin] .shine { background-image: linear-gradient(100deg, #016B2E 0%, #2FAE62 40%, #016B2E 60%, #018539 100%); background-size: 220% 100%; }
.side .hud-big, :root[data-skin="daylight"] .side .hud-big { background: none; filter: none; -webkit-text-fill-color: #016B2E; color: #016B2E; text-shadow: none; }
.wiring .st-verify, .wiring .st-action, .wiring .st-document { color: #016B2E; }
.todo-flash { box-shadow: 0 0 0 4px rgba(1, 133, 57, .45); }
.doc-head { border-bottom-color: #018539; }
.price-box { background: #E5F3EB; border-color: #018539; }
:focus-visible { outline-color: #018539; }

/* top bar logo (replaces the Solaris IQ icon and wordmark) */
.brand .sb-logo { display: block; height: 44px; width: auto; max-width: 170px; object-fit: contain; }
@media (max-width: 560px) { .brand .sb-logo { height: 34px; max-width: 130px; } }
.brand-tag { color: var(--sb-green-dk); }
[data-act="skin"] { display: none !important; }

/* ---------- login screen: Stonebridge logo and Summy ---------- */
.lscene.sb-scene { background: linear-gradient(160deg, #FFFFFF 0%, #E5F3EB 62%, #BFE0CD 130%); border: 1px solid var(--sb-green-md); color: var(--ink); min-height: 600px; }
.sb-scene .stage-sky, .sb-scene .live-card, .sb-scene .chip-float { display: none; }
/* Summy stands behind the top-left corner of the box. His picture is placed IN FRONT of the box, with the corner of
   the sign he holds lined up exactly on the box's corner, so his hands grip the top and left edges. --sb-w is his width;
   17% / 55.5% are where the sign's corner sits inside the picture. Nudge those two numbers if the corner is a pixel out. */
.login2:has(.sb-scene) { --sb-w: 220px; padding-top: calc(var(--sb-w) * .493 + 16px); align-items: start; min-height: 0; }
.login2:has(.sb-scene) .login-side { align-self: center; }
.lscene.sb-scene { overflow: visible; min-height: 0; align-self: start; border-top-left-radius: 4px; }
.sb-scene .sb-summy { position: absolute; z-index: 3; width: var(--sb-w); height: auto; pointer-events: none;
  left: calc(var(--sb-w) * -.17); top: calc(var(--sb-w) * -.493); }
.sb-scene .sb-top { padding: calc(var(--sb-w) * .396 + 14px) 32px 0; }
.sb-scene .sb-logo-login { display: block; height: 60px; width: auto; max-width: 70%; object-fit: contain; }
.sb-scene .stage-copy { position: relative; top: auto; left: auto; right: auto; max-width: 480px; padding: 22px 32px 34px; }
.sb-scene .stage-h { color: var(--ink); font-size: clamp(30px, 3.2vw, 46px); line-height: 1.04; }
.sb-scene .stage-list li { color: var(--ink-2); font-weight: 500; }
.sb-scene .stage-list .ic { color: var(--sb-green); }
@media (max-width: 900px) {
  .login2:has(.sb-scene) { --sb-w: 150px; }
  .sb-scene .sb-top { padding-left: 20px; padding-right: 20px; }
  .sb-scene .sb-logo-login { height: 46px; }
  .sb-scene .stage-copy { padding: 18px 20px 26px; }
}
@media (max-width: 480px) { .sb-scene .stage-h { font-size: 28px; } }
.login-card .eyebrow, .eyebrow { color: var(--sb-green-dk); }

/* voice assistant: Summy */
#siqv-fab { background: #fff !important; border: 2px solid #018539; color: #018539 !important; padding: 0; overflow: hidden; }
#siqv-fab img { width: 44px; height: 44px; object-fit: contain; display: block; }
#siqv-panel { --a: 1, 133, 57; --b: 191, 224, 205; }
#siqv-go button.siqv-main { background: #018539 !important; color: #fff !important; }
#siqv-panel button.siqv-i.on { background: rgba(1, 133, 57, .25) !important; color: #5ED58B !important; }

/* login page footer: SolarisIQ technical support (supplier) */
.login-support { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--edge); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; font-size: 13px; color: var(--ink-3); }
.login-support .ls-l { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.login-support .ls-brand { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; }
.login-support .ls-brand .logo-mark { width: 26px; height: 26px; }
.login-support .wordmark { font-family: 'Poppins', sans-serif; font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.login-support .ls-mail { color: var(--sb-green-dk); font-weight: 600; text-decoration: none; }
.login-support .ls-mail:hover, .login-support .ls-mail:focus-visible { text-decoration: underline; }

/* One font everywhere: Poppins. Beats every older hard-coded font (Outfit, Manrope, JetBrains Mono, Cormorant, Montserrat). */
*, *::before, *::after, input, button, select, textarea { font-family: 'Poppins', Arial, Helvetica, sans-serif !important; }

/* Proposal header: clean left-aligned layout */
.doc .doc-head { display:flex !important; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:16px 32px; padding-bottom:16px; border-bottom:2px solid #018539; }
.doc .doc-head .doc-brand { display:flex; align-items:center; gap:14px; flex:1 1 320px; min-width:0; }
.doc .doc-head .doc-meta { display:flex !important; flex-direction:column; align-items:flex-start !important; text-align:left !important; flex:1 1 260px; gap:3px; min-width:0; }
.doc .doc-head .doc-meta .tag { align-self:flex-start; margin:0; }
.doc .doc-head .doc-meta b.disp { font-size:26px; line-height:1.15; color:#111111; text-align:left !important; }
.doc .doc-head .doc-meta span { text-align:left !important; color:#4A4E57; }

/* Proposal header v2: stacked, tidy */
.doc .doc-head { display:block !important; padding-bottom:18px; border-bottom:3px solid #018539 !important; }
.doc .doc-head .doc-brand { display:flex !important; flex-wrap:nowrap; align-items:center; gap:20px; width:100%; }
.doc .doc-head .doc-brand > img, .doc .doc-head .doc-brand > svg, .doc .doc-head .doc-brand > span:first-child { flex:0 0 auto; }
.doc .doc-head .doc-brand > div { flex:1 1 auto; min-width:0; text-align:left; line-height:1.5; }
.doc .doc-head .doc-brand b.disp { display:block; font-size:20px; white-space:nowrap; margin-bottom:2px; }
.doc .doc-head .doc-brand span { font-size:12px; }
.doc .doc-head .doc-meta { display:flex !important; flex-direction:column; align-items:flex-start !important; text-align:left !important; margin-top:22px; padding-top:18px; border-top:1px solid #E1E3E8; gap:4px; }
.doc .doc-head .doc-meta b.disp { font-size:28px; }
@media (max-width:560px){ .doc .doc-head .doc-brand{flex-wrap:wrap} }

/* Proposal header v3 - professional */
.doc .doc-head.dh2 { display:block !important; padding:0 0 22px; border-bottom:0 !important; }
.dh2 .dh-top { display:flex; justify-content:space-between; align-items:center; gap:24px; padding-bottom:20px; border-bottom:3px solid #018539; }
.dh2 .doc-brand { display:block !important; flex:0 0 auto; width:auto; }
.dh2 .dh-co { display:flex; flex-direction:column; align-items:flex-end; text-align:right; gap:3px; min-width:0; }
.dh2 .dh-co b.disp { font-size:17px; color:#111111; font-weight:600; }
.dh2 .dh-co span { font-size:12px; line-height:1.5; color:#4A4E57; }
.dh2 .dh-title { padding:30px 0 22px; display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.dh2 .dh-title .tag { background:#E5F3EB; color:#016B2E; border:0; padding:5px 12px; border-radius:999px; font-size:11px; font-weight:600; letter-spacing:.14em; text-transform:uppercase; }
.dh2 .dh-title b.disp { font-size:34px; line-height:1.1; font-weight:700; color:#111111; letter-spacing:-.01em; }
.dh2 .dh-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:0; border:1px solid #E1E3E8; border-radius:10px; overflow:hidden; background:#F7F8FA; }
.dh2 .dh-grid > div { padding:14px 18px; display:flex; flex-direction:column; gap:4px; min-width:0; }
.dh2 .dh-grid > div + div { border-left:1px solid #E1E3E8; }
.dh2 .dh-grid i { font-style:normal; font-size:10.5px; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:#016B2E; }
.dh2 .dh-grid span { font-size:14px; font-weight:500; color:#111111; line-height:1.4; overflow-wrap:anywhere; }
@media (max-width:640px){ .dh2 .dh-top{flex-direction:column;align-items:flex-start} .dh2 .dh-co{align-items:flex-start;text-align:left} .dh2 .dh-grid{grid-template-columns:1fr} .dh2 .dh-grid > div + div{border-left:0;border-top:1px solid #E1E3E8} .dh2 .dh-title b.disp{font-size:26px} }

/* Wiring diagram: technical drawing labels keep a narrow face so nothing overlaps */
svg[aria-label*="iring diagram"], svg[aria-label*="iring diagram"] *, svg[aria-label*="iring diagram"] text, svg[aria-label*="iring diagram"] tspan { font-family: Arial, Helvetica, sans-serif !important; }
svg[aria-label*="iring diagram"] text { font-weight:500; }

/* Option tiles (battery, modules...): titles never break mid-word, selected tile is mint, not peach */
.opt-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.opt b { font-size: 15px; line-height: 1.3; overflow-wrap: normal; word-break: normal; hyphens: none; }
.opt span { font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.opt em { font-size: 11px; }
.opt.on { border-color: #018539; background: #E5F3EB; box-shadow: 0 0 0 1px #018539 inset; }
.opt.on b { color: #016B2E; }
