:root {
  --navy: #071a33;
  --navy2: #0d2b4c;
  --blue: #1677d2;
  --gold: #f2c14e;
  --green: #137a50;
  --bg: #f3f5f1;
  --card: #fff;
  --ink: #102019;
  --muted: #65736b;
  --line: #dce4de;
  --shadow: 0 14px 35px #071a3310;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
}
.top {
  height: 72px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3vw;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 5px 20px #071a3340;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand > div {
  display: flex;
  flex-direction: column;
}
.brand b {
  font-size: 18px;
  letter-spacing: 0.08em;
}
.brand small {
  font-size: 9px;
  letter-spacing: 0.13em;
  color: #b7c9d9;
  margin-top: 3px;
}
.mark {
  width: 42px;
  height: 42px;
  background: var(--gold);
  color: var(--navy);
  clip-path: polygon(50% 0, 100% 100%, 73% 100%, 50% 50%, 26% 100%, 0 100%);
  display: grid;
  place-items: end center;
  padding-bottom: 4px;
  font: 900 14px Arial;
}
.proposalBrand .mark.hasLogo {
  clip-path: none;
  background-color: transparent;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}
.topActions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.offline {
  font-size: 9px;
  color: #8ae0ae;
  letter-spacing: 0.12em;
  margin-right: 10px;
}
button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 15px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
button:hover {
  transform: translateY(-1px);
}
button.dark,
.primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
button.ghost {
  background: transparent;
  color: #fff;
  border-color: #ffffff50;
}
.intro {
  padding: 38px 4vw 30px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  background: linear-gradient(115deg, #fff 62%, #eaf2da 62%);
  border-bottom: 1px solid var(--line);
}
.eyebrow,
.sectionTitle small,
.designBox small {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #648052;
}
.intro h1 {
  font: 700 clamp(30px, 3.3vw, 48px)/1.02 Georgia;
  margin: 10px 0 0;
}
.intro h1 em {
  font-weight: 400;
  color: #67963c;
}
.introStat {
  background: var(--navy);
  color: #fff;
  padding: 18px 24px;
  min-width: 245px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}
.introStat span {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #a9bdce;
}
.introStat strong {
  font: 700 24px Georgia;
  color: var(--gold);
  margin: 6px 0;
}
.introStat small {
  font-size: 10px;
  color: #b8c6d0;
}
.steps {
  display: flex;
  padding: 0 4vw;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 72px;
  z-index: 9;
}
.steps a {
  text-decoration: none;
  color: #5f6c64;
  padding: 15px 24px;
  border-right: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
}
.steps a:first-child {
  border-left: 1px solid var(--line);
}
main {
  padding-bottom: 50px;
}
.panel {
  margin: 24px 3vw;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.sectionTitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 22px;
}
.sectionTitle h2 {
  font: 700 27px Georgia;
  margin: 6px 0 0;
}
.recordActions,
.sectionTitle > div:last-child {
  display: flex;
  gap: 8px;
}
.formGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.formGrid label,
.designGrid label,
label.full,
#settingsFields label,
#pinGate label {
  font-size: 11px;
  font-weight: 800;
  color: #4d5d54;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #cdd8d0;
  border-radius: 6px;
  padding: 11px;
  background: #fbfcfa;
  color: #18281f;
  font: 13px Arial;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #1677d230;
  border-color: var(--blue);
}
.hidden {
  display: none !important;
}
.designBox {
  margin-top: 22px;
  background: #f0f5ec;
  border-left: 4px solid var(--green);
  padding: 20px;
}
.designBox h3 {
  font: 700 20px Georgia;
  margin: 5px 0 16px;
}
.designGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.full {
  margin-top: 18px;
}
.computeBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--navy);
  color: #fff;
  padding: 18px 20px;
  margin-top: 20px;
  border-radius: 7px;
}
.computeBar div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.computeBar small {
  color: #adc0cf;
}
.computeBar .primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.pill {
  background: #e8f3d7;
  color: #426b25;
  padding: 8px 12px;
  border-radius: 30px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.metrics > div {
  background: #f5f7f3;
  border: 1px solid var(--line);
  padding: 17px;
}
.metrics small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.13em;
  color: #728078;
}
.metrics strong {
  font: 700 27px Georgia;
  display: inline-block;
  margin: 7px 5px 0 0;
}
.metrics span {
  font-size: 10px;
  color: #738179;
}
.packageGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
}
.package {
  border: 1px solid var(--line);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.package.recommended {
  border: 2px solid var(--green);
}
.package.future {
  border: 2px solid #d3a524;
}
.ribbon {
  position: absolute;
  right: -40px;
  top: 18px;
  transform: rotate(38deg);
  width: 160px;
  text-align: center;
  padding: 5px;
  background: var(--green);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
}
.future .ribbon {
  background: #d3a524;
  color: #1f2d22;
}
.package > small {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: #6b7b72;
}
.package h3 {
  font: 700 25px Georgia;
  margin: 10px 0;
}
.price {
  font: 700 30px Georgia;
  color: var(--green);
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.package ul {
  columns: 2;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.8;
  color: #516158;
  min-height: 115px;
}
.reason {
  margin-top: 18px;
  background: #eef4e8;
  padding: 18px;
  border-left: 4px solid #7aa843;
}
.reason p {
  margin: 6px 0 0;
  color: #57675e;
  font-size: 13px;
  line-height: 1.6;
}
.proposal {
  max-width: 1020px;
  margin: auto;
  border: 1px solid #cfd9d2;
  background: #fff;
  padding: 42px;
  box-shadow: 0 16px 40px #071a3316;
}
.proposalHead {
  display: flex;
  justify-content: space-between;
  align-items: start;
  border-bottom: 3px solid var(--navy);
  padding-bottom: 17px;
}
.proposalHead > div:last-child {
  text-align: right;
  display: flex;
  flex-direction: column;
  font-size: 11px;
  gap: 5px;
}
.proposalHead > div:last-child span {
  color: #6e7c74;
}
.proposalBrand b {
  color: var(--navy);
}
.proposalBrand small {
  color: #61756a;
}
.clientSummary {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1.1fr;
  gap: 15px;
  padding: 20px 0;
}
.clientSummary > div {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding-right: 12px;
}
.clientSummary small,
.proposalHero small,
.roiGrid small {
  font-size: 8px;
  letter-spacing: 0.15em;
  color: #748178;
}
.clientSummary b {
  margin: 7px 0;
  font-size: 13px;
}
.clientSummary span {
  font-size: 10px;
  color: #6d7972;
}
.proposalHero {
  background: var(--navy);
  color: #fff;
  padding: 27px;
  display: grid;
  grid-template-columns: 1.5fr 0.5fr;
  gap: 20px;
}
.proposalHero h2 {
  font: 700 28px Georgia;
  margin: 8px 0;
}
.proposalHero p {
  color: #c1ced7;
  font-size: 12px;
}
.proposalHero > div:last-child {
  text-align: right;
  display: flex;
  flex-direction: column;
}
.proposalHero strong {
  font: 700 29px Georgia;
  color: var(--gold);
  margin: 8px 0;
}
.proposalHero span {
  font-size: 9px;
  color: #b8c6d0;
}
.subhead {
  font: 700 20px Georgia;
  margin: 26px 0 10px;
}
.proposalTable {
  border-top: 1px solid var(--line);
}
.proposalRow {
  display: grid;
  grid-template-columns: 1fr 2fr;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.proposalRow b,
.proposalRow span {
  padding: 10px;
}
.proposalRow b {
  background: #f3f6f2;
}
.energyProposalGrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 8px;
  margin: 14px 0 8px;
}
.energyProposalGrid > div {
  background: #f3f6f2;
  padding: 12px 14px;
}
.energyProposalGrid small {
  display: block;
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--muted);
}
.energyProposalGrid b {
  display: block;
  margin-top: 5px;
  font: 700 15px Georgia;
  line-height: 1.25;
}
.roiGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 22px 0;
}
.roiGrid > div {
  background: #edf3e7;
  padding: 15px;
}
.roiGrid b {
  display: block;
  margin-top: 6px;
  font: 700 18px Georgia;
}
.termsGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.termsGrid h3 {
  font: 700 15px Georgia;
  margin: 10px 0 5px;
}
.termsGrid p {
  font-size: 10px;
  line-height: 1.55;
  color: #5d6d64;
}
.signature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  margin-top: 45px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 10px;
}
.signature b {
  display: block;
  margin-top: 15px;
}
.diagram {
  background: #f6f8f5;
  border: 1px solid var(--line);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 240px;
  overflow: auto;
}
.node {
  min-width: 125px;
  background: #fff;
  border: 2px solid var(--navy);
  padding: 15px;
  text-align: center;
  box-shadow: 0 7px 18px #071a3310;
}
.node b {
  display: block;
  font-size: 12px;
}
.node span {
  font-size: 9px;
  color: #6c7a72;
  display: block;
  margin-top: 5px;
}
.arrow {
  font-size: 24px;
  color: #7ba33c;
  font-weight: 900;
}
.branch {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.diagramNote {
  text-align: center;
  color: #68776e;
  font-size: 10px;
  line-height: 1.5;
}
.clientMode .ownerOnly,
.clientMode .steps,
.clientMode .topActions .dark {
  display: none;
}
.clientMode .resultPanel,
.clientMode #proposal,
.clientMode #diagram {
  margin-left: 7vw;
  margin-right: 7vw;
}
.clientMode .top {
  position: relative;
}
.clientMode .steps {
  position: relative;
}
dialog {
  border: 0;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 25px 80px #071a3360;
  width: min(850px, 90vw);
}
dialog::backdrop {
  background: #071a3377;
}
.modal {
  padding: 28px;
}
.modal.small {
  max-width: 550px;
}
.modalHead {
  display: flex;
  justify-content: space-between;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
}
.modalHead h2 {
  font: 700 25px Georgia;
  margin: 4px 0;
}
.modalHead button {
  border: 0;
}
.modalActions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
.settingsTabs {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}
.settingsTabs button {
  flex: 1;
}
.settingsTabs button.active {
  background: var(--navy);
  color: #fff;
}
.settingsGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hint {
  font-size: 10px;
  color: #7b8981;
}
.savedItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}
.savedItem span {
  font-size: 11px;
  color: #68776e;
}
.proposalPage {
  margin-top: 24px;
  min-height: 1120px;
  display: flex;
  flex-direction: column;
}
.pageHeading {
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--line);
}
.pageHeading small {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: #748178;
  font-weight: 900;
}
.pageHeading h2 {
  font: 700 27px Georgia;
  margin: 7px 0;
}
.pageHeading p {
  font-size: 11px;
  color: #66756d;
  line-height: 1.55;
  margin: 0;
  max-width: 760px;
}
.proposalFooter {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: #7a8780;
  font-size: 8px;
  letter-spacing: 0.08em;
}
.houseSystemVisual {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #eef6fa, #fff);
  border-radius: 8px;
  padding: 12px;
}
.houseSystemVisual svg {
  display: block;
  width: 100%;
  max-height: 350px;
}
.proposalDiagram {
  min-height: 190px;
  padding: 18px;
  overflow: hidden;
}
.designNotesGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.designNotesGrid > div {
  background: #f3f6f2;
  border: 1px solid var(--line);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.designNotesGrid b {
  font-size: 10px;
}
.designNotesGrid span {
  font-size: 9px;
  line-height: 1.45;
  color: #68776e;
}
.materialsTable {
  margin-top: 18px;
  border: 1px solid var(--line);
}
.materialsHead,
.materialsRow {
  display: grid;
  grid-template-columns: 1.2fr 0.25fr 0.3fr 1.6fr;
  gap: 0;
}
.materialsHead {
  background: var(--navy);
  color: #fff;
  font-size: 8px;
  letter-spacing: 0.1em;
}
.materialsHead b,
.materialsRow > * {
  padding: 9px;
  border-right: 1px solid var(--line);
}
.materialsRow {
  font-size: 9px;
  border-top: 1px solid var(--line);
  align-items: center;
}
.materialsRow:nth-child(even) {
  background: #f6f8f5;
}
.materialsRow input {
  border: 0;
  background: transparent;
  padding: 3px;
  font-size: 9px;
}
.profileGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.profileGrid h3 {
  font: 700 15px Georgia;
  margin: 0 0 6px;
}
.profileGrid p {
  font-size: 9px;
  line-height: 1.55;
  color: #5d6d64;
  white-space: pre-line;
}
.signature span {
  display: block;
  margin-top: 5px;
  color: #78867e;
  font-size: 8px;
}
.catalogEditor {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: auto;
}
.catalogEditor table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 10px;
}
.catalogEditor th,
.catalogEditor td {
  padding: 7px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.catalogEditor th {
  background: #f0f5ec;
}
.catalogEditor input,
.catalogEditor select {
  padding: 7px;
  font-size: 10px;
}
.catalogEditor input[type="checkbox"] {
  width: auto;
}
.settingsWide {
  grid-column: 1/-1;
}
.serviceCalculator {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.serviceProposal {
  min-height: 980px;
  display: flex;
  flex-direction: column;
}
.serviceQuoteTitle {
  margin: 22px 0;
  padding: 22px;
  background: var(--navy);
  color: #fff;
  display: grid;
  grid-template-columns: 1.5fr 0.7fr;
  gap: 24px;
  align-items: center;
}
.serviceQuoteTitle small,
.serviceQuoteTitle span {
  display: block;
  font-size: 8px;
  letter-spacing: 0.12em;
  opacity: 0.78;
}
.serviceQuoteTitle h2 {
  font: 700 25px Georgia;
  margin: 7px 0;
}
.serviceQuoteTitle p {
  font-size: 10px;
  line-height: 1.5;
  margin: 0;
}
.serviceQuoteTitle strong {
  display: block;
  color: var(--gold);
  font: 700 28px Georgia;
  margin: 6px 0;
}
.serviceQuoteTable {
  border: 1px solid var(--line);
  margin-bottom: 22px;
}
.serviceQuoteHead,
.serviceQuoteRow,
.serviceGrand {
  display: grid;
  grid-template-columns: 1fr 180px;
  align-items: center;
}
.serviceQuoteHead {
  background: #eef3ec;
  font-size: 8px;
  letter-spacing: 0.12em;
}
.serviceQuoteHead b,
.serviceQuoteRow > *,
.serviceGrand > * {
  padding: 12px 14px;
}
.serviceQuoteHead b:last-child,
.serviceQuoteRow b,
.serviceGrand strong {
  text-align: right;
}
.serviceQuoteRow {
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.serviceGrand {
  background: var(--navy);
  color: #fff;
}
.serviceGrand strong {
  color: var(--gold);
  font-size: 18px;
}
.serviceTerms {
  margin-top: 6px;
}
.serviceSignature {
  margin-top: 28px;
}
.serviceActions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.modal {
  max-height: 88vh;
  overflow: auto;
}
@media (max-width: 1000px) {
  .formGrid,
  .designGrid {
    grid-template-columns: 1fr 1fr;
  }
  .package ul {
    columns: 1;
  }
  .proposal {
    padding: 25px;
  }
  .diagram {
    justify-content: flex-start;
  }
}
@media (max-width: 700px) {
  .top {
    padding: 0 15px;
  }
  .brand small,
  .offline {
    display: none;
  }
  .topActions button {
    padding: 8px;
    font-size: 10px;
  }
  .intro {
    padding: 25px 18px;
    display: block;
  }
  .introStat {
    margin-top: 20px;
  }
  .steps {
    padding: 0;
    overflow: auto;
  }
  .steps a {
    white-space: nowrap;
  }
  .panel {
    margin: 15px;
    padding: 18px;
  }
  .formGrid,
  .designGrid,
  .metrics,
  .packageGrid,
  .clientSummary,
  .proposalHero,
  .roiGrid,
  .termsGrid {
    grid-template-columns: 1fr;
  }
  .serviceQuoteTitle {
    grid-template-columns: 1fr;
  }
  .serviceQuoteHead,
  .serviceQuoteRow,
  .serviceGrand {
    grid-template-columns: 1fr 120px;
  }
  .computeBar {
    display: block;
  }
  .computeBar button {
    margin-top: 15px;
    width: 100%;
  }
  .sectionTitle {
    align-items: flex-start;
  }
  .proposal {
    padding: 16px;
  }
  .proposalHead {
    display: block;
  }
  .proposalHead > div:last-child {
    text-align: left;
    margin-top: 15px;
  }
  .proposalHero > div:last-child {
    text-align: left;
  }
  .package ul {
    min-height: 0;
  }
  .diagram {
    padding: 20px;
  }
  .settingsGrid {
    grid-template-columns: 1fr;
  }
  .designNotesGrid,
  .profileGrid {
    grid-template-columns: 1fr;
  }
  .proposalPage {
    min-height: auto;
  }
  .materialsHead,
  .materialsRow {
    grid-template-columns: 1.1fr 0.3fr 0.35fr 1.3fr;
  }
  .proposalDiagram {
    overflow: auto;
  }
  .houseSystemVisual svg {
    min-width: 720px;
  }
  .houseSystemVisual {
    overflow: auto;
  }
}
@media print {
  body {
    background: #fff;
  }
  .top,
  .steps,
  .intro,
  #assessment,
  #recommendation,
  .sectionTitle,
  #diagram {
    display: none !important;
  }
  #proposal {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .proposal {
    border: 0;
    box-shadow: none;
    max-width: none;
    padding: 18mm;
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    margin: 0;
    overflow: hidden;
    break-after: page;
    page-break-after: always;
  }
  .proposal * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  dialog {
    display: none;
  }
  .proposal:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  .proposalPage {
    display: flex;
  }
  .houseSystemVisual svg {
    max-height: 285px;
  }
  .proposalDiagram {
    min-height: 150px;
  }
  .materialsRow {
    break-inside: avoid;
  }
  .proposalFooter {
    display: flex !important;
  }
  body:not(.printService) #serviceQuotation {
    display: none !important;
  }
  body.printService > .top,
  body.printService > main > :not(#serviceQuotation),
  body.printService #serviceQuotation > :not(#serviceProposalSheet) {
    display: none !important;
  }
  body.printService #serviceQuotation {
    display: block !important;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  body.printService #serviceProposalSheet {
    display: flex !important;
    border: 0;
    box-shadow: none;
    max-width: none;
    padding: 18mm;
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    margin: 0;
    overflow: hidden;
    break-after: auto;
    page-break-after: auto;
  }
  body.printService #proposal {
    display: none !important;
  }
}

/* Commercial Online foundation — preserves approved visual language */
.accountPanel{padding:4px 0 8px}.planCards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}.planCard{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:16px;text-align:left;border:1px solid var(--line,#d9e0dc);border-radius:12px;background:#fff}.planCard b{font-size:15px}.planCard span{font-weight:700}.planCard small{opacity:.72;line-height:1.35}.planCard.active{outline:2px solid #173328;background:#f4f8f6}@media(max-width:700px){.planCards{grid-template-columns:1fr}.topActions{gap:6px;flex-wrap:wrap}.topActions button,.topActions .offline{font-size:11px}}


/* Commercial account entitlement + currency update */
.accountModal{max-width:850px}.accountState{padding:16px 0;color:var(--muted,#66726a)}
.authTabs{display:flex;gap:8px;margin:12px 0 18px}.authTabs button{border:1px solid var(--line,#d9e0dc);background:#fff;padding:9px 14px;border-radius:9px}.authTabs button.active{background:#173328;color:#fff;border-color:#173328}
.authPanel{display:grid;grid-template-columns:1fr 1fr;gap:12px}.authPanel .authNotice,.authPanel .accountPrimary{grid-column:1/-1}.authPanel label{display:flex;flex-direction:column;gap:6px}.accountPrimary{justify-self:start}.accountMessage{min-height:22px;margin:10px 0 0}.accountMessage.error{color:#a61b1b}.accountIdentityCard{display:flex;flex-direction:column;gap:3px;padding:12px 0}.accountIdentityCard b{font-size:17px}.accountIdentityCard span{font-size:12px;color:var(--muted,#66726a)}.accountSignOut{margin:8px 0 16px}
.activePlanCard{border:2px solid #173328;background:#f4f8f6;border-radius:14px;padding:18px;display:grid;grid-template-columns:1fr auto;gap:8px 18px;align-items:start}.activePlanCard>div{display:flex;flex-direction:column;gap:4px}.activePlanCard small{font-size:10px;letter-spacing:.12em;color:#61745e}.activePlanCard strong{font-size:22px}.activePlanCard>span{font-weight:800}.activePlanCard p{grid-column:1/-1;margin:2px 0 0;color:#405048}.activePlanCard.inactiveSubscription{border-color:#b99849;background:#fffaf0}
.upgradeArea{margin-top:18px}.upgradeArea>small{display:block;font-weight:800;letter-spacing:.1em;font-size:10px;margin-bottom:9px}.upgradeButtons{display:flex;gap:10px;flex-wrap:wrap}.upgradeBtn,.premiumActive{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;border:1px solid #173328;border-radius:10px;padding:11px 14px;font-weight:800;color:#173328;background:#fff}.upgradeBtn.premium{background:#173328;color:#fff}.premiumActive{background:#f4f8f6}.entitlementNote{margin-top:14px}.planHidden{display:none!important}
.currencySettings{padding:4px 0}.currencySettings h3{margin-top:0}.currencySettings #applyCurrencyBtn{margin-top:14px}.currencySymbolInline{font:inherit}
@media(max-width:700px){.authPanel{grid-template-columns:1fr}.activePlanCard{grid-template-columns:1fr}.activePlanCard p{grid-column:1}.upgradeButtons{flex-direction:column}.upgradeBtn{width:100%}}


/* Commercial access gate — calculator remains unavailable until authenticated + active subscription. */
.commercialAccessGate{position:fixed;inset:73px 0 0;z-index:900;background:rgba(7,26,51,.78);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:24px}
.commercialAccessGate.hidden{display:none!important}
.commercialAccessGateCard{width:min(560px,100%);background:#fff;border:1px solid rgba(255,255,255,.25);border-radius:18px;box-shadow:0 24px 70px rgba(0,0,0,.28);padding:32px;text-align:center}
.gateBrand{font-size:11px;font-weight:900;letter-spacing:.18em;color:#687e53;margin-bottom:10px}
.commercialAccessGateCard h2{margin:0 0 10px;color:#10253d;font-size:30px}
.commercialAccessGateCard p{margin:0 auto 20px;max-width:470px;color:#617080;line-height:1.55}
.commercialAccessGateCard button{min-width:210px}
body.appLocked main{user-select:none;pointer-events:none}
body.appLocked #clientModeBtn,body.appLocked #settingsBtn{opacity:.45;cursor:not-allowed}
@media(max-width:700px){.commercialAccessGate{inset:108px 0 0;padding:16px}.commercialAccessGateCard{padding:24px 18px}.commercialAccessGateCard h2{font-size:24px}}
@media print{body.appLocked main,body.appLocked .commercialAccessGate{display:none!important}}


/* Activation-code registration — approved scope only */
.activationHelp{font-size:12px;line-height:1.45;color:#66726a;margin-top:-4px}
.accountActionRow{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.accountActionRow button{min-height:42px}
@media(max-width:640px){.accountActionRow button{width:100%}}


/* Approved commercial plan differentiation */
.activePlanBenefits{grid-column:1/-1;border-top:1px solid rgba(23,51,40,.18);padding-top:10px;margin-top:2px}.activePlanBenefits small{display:block;font-weight:900;letter-spacing:.1em;margin-bottom:6px}.activePlanBenefits ul{margin:0;padding-left:18px;color:#405048;line-height:1.55}.activePlanBenefits li+li{margin-top:3px}

/* Launch plan visibility + transparent Premium roadmap */
.planUpgradeShowcase{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0 0 22px}.upgradeShowcaseCard{border:1px solid var(--line,#d9e0dc);border-radius:16px;background:#fff;padding:18px;box-shadow:0 8px 26px rgba(7,26,51,.05)}.upgradeShowcaseCard h3{margin:7px 0 6px}.upgradeShowcaseCard p{margin:0 0 10px;color:var(--muted,#66726a);line-height:1.45}.upgradeShowcaseCard ul{margin:10px 0 16px;padding-left:20px}.upgradeShowcaseCard li{margin:7px 0}.showcaseBadge{font-size:11px;font-weight:900;letter-spacing:.1em}.premiumShowcase{border-color:#b99849;background:#fffdf7}.activeRoadmap{grid-column:1/-1}.featureStatus{display:inline-block;margin-left:5px;padding:2px 6px;border-radius:999px;background:#f1ead7;color:#6f571e;font-size:9px;font-weight:900;letter-spacing:.06em;vertical-align:1px}.upgradeRefreshNote{border-left:3px solid #b99849;background:#fffaf0;padding:10px 12px;border-radius:8px;line-height:1.45}.premiumComplete>small{display:none}@media(max-width:760px){.planUpgradeShowcase{grid-template-columns:1fr}.activeRoadmap{grid-column:auto}}


/* PREMIUM COMPLETION BUILD */
.premiumBusinessSuite{border:1px solid #d7bd71;background:linear-gradient(180deg,#fffdf7,#fff)}
.premiumToolGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}
.premiumToolCard{border:1px solid var(--line);border-radius:14px;padding:18px;background:#fff;box-shadow:0 8px 24px rgba(7,26,51,.04)}
.premiumToolCard.premiumWide{grid-column:1/-1}.premiumToolHead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.premiumToolHead small{font-weight:800;letter-spacing:.08em;color:#6d7a70}.premiumToolHead h3{margin:4px 0 0;font-size:20px}.premiumQaBadge{font-size:11px;font-weight:800;letter-spacing:.08em;padding:5px 8px;border-radius:999px;background:#fff3cf;color:#725800;border:1px solid #ead38a}.premiumFormGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}.premiumFormGrid.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.premiumFormGrid.one{grid-template-columns:1fr}.premiumFormGrid label,.premiumToolCard>label{font-size:12px;font-weight:700;color:#38453e}.premiumFormGrid input,.premiumFormGrid textarea,.premiumToolCard select,.optionEditCard input,.optionEditCard textarea{width:100%;margin-top:5px}.premiumActions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.premiumMetrics{display:grid;gap:8px;margin-top:14px}.premiumMetrics.four{grid-template-columns:repeat(4,minmax(0,1fr))}.premiumMetrics>div{border:1px solid var(--line);border-radius:10px;padding:12px;background:#f8faf7}.premiumMetrics small{display:block;font-size:10px;font-weight:800;letter-spacing:.07em;color:#718075}.premiumMetrics b{display:block;margin-top:5px;font-size:18px}.premiumMetrics span{font-size:11px;color:#68746d}.profitStatus,.premiumNarrative{margin-top:12px;padding:11px 12px;border-radius:9px;background:#f4f6f3;font-size:13px}.profitStatus.healthy{background:#edf7ee;color:#245b2c}.profitStatus.watch{background:#fff8df;color:#715a00}.profitStatus.low{background:#fff1df;color:#7c4700}.profitStatus.loss{background:#fff0f0;color:#8a2525}.optionEditor{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.optionEditCard{border:1px solid var(--line);border-radius:10px;padding:12px;background:#fafbf9}.optionEditCard label{display:block;font-size:11px;font-weight:700;margin-bottom:8px}.optionEnable{display:flex!important;align-items:center;gap:7px}.optionEnable input{width:auto!important;margin:0!important}.premiumOptionsPreview{margin-top:18px}.optionCompareHead{text-align:center;margin-bottom:12px}.optionCompareHead small{font-weight:800;letter-spacing:.08em}.optionCompareHead h3{margin:4px 0}.optionCompareGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.optionCompareCard{border:1px solid var(--line);border-radius:12px;padding:16px;background:#fff}.optionCompareCard.recommended{border-color:#d4ab34;box-shadow:inset 0 3px 0 #d4ab34}.optionCompareCard small{font-weight:800;color:#718075}.optionCompareCard h3{margin:5px 0}.optionCompareCard strong{font-size:22px;color:#071a33}.optionCompareCard p{font-size:12px}.premiumReportPage{display:none;margin:18px 0 0}.premiumReportPage.reportVisible{display:block}.reportSummaryGrid,.reportMetrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.reportMetrics{grid-template-columns:repeat(4,minmax(0,1fr))}.reportSummaryGrid>div,.reportMetrics>div{padding:14px;border:1px solid var(--line);border-radius:10px}.reportSummaryGrid small,.reportMetrics small{display:block;font-size:10px;font-weight:800;letter-spacing:.07em}.reportSummaryGrid b,.reportMetrics b{display:block;margin-top:5px}.reportSummaryGrid span{font-size:12px;color:#67746d}.reportCostTable{border:1px solid var(--line);border-radius:10px;overflow:hidden}.reportCostTable>div{display:flex;justify-content:space-between;padding:9px 12px;border-bottom:1px solid var(--line)}.reportCostTable>div:last-child{border-bottom:0}
body[data-premium-template="executive"] #proposalSheet,body[data-premium-template="executive"] #proposalDesignPage,body[data-premium-template="executive"] #proposalMaterialsPage{border-radius:18px;border-color:#d7bd71;box-shadow:0 14px 35px rgba(7,26,51,.08)}body[data-premium-template="executive"] .proposalHero{padding:28px;background:linear-gradient(135deg,#f8f4e8,#f1f6ec)}body[data-premium-template="executive"] .proposalTable{font-size:15px}body[data-premium-template="technical"] #proposalSheet,body[data-premium-template="technical"] #proposalDesignPage,body[data-premium-template="technical"] #proposalMaterialsPage{border-radius:2px;box-shadow:none}body[data-premium-template="technical"] .proposalHero{background:#f4f6f7;border:1px solid #cbd3d8}body[data-premium-template="technical"] .proposalRow{font-size:12px}body[data-premium-template="technical"] .subhead{letter-spacing:.06em;text-transform:uppercase}
@media(max-width:900px){.premiumToolGrid{grid-template-columns:1fr}.premiumToolCard.premiumWide{grid-column:auto}.premiumMetrics.four,.reportMetrics{grid-template-columns:repeat(2,1fr)}.optionEditor,.optionCompareGrid,.reportSummaryGrid{grid-template-columns:1fr}.premiumFormGrid,.premiumFormGrid.compact{grid-template-columns:1fr}}
@media print{body.printPremiumReport header,body.printPremiumReport main,body.printPremiumReport dialog,body.printPremiumReport #planUpgradeShowcase{display:none!important}body.printPremiumReport #premiumProjectReport{display:block!important;margin:0!important;box-shadow:none!important;border:0!important}body:not(.printPremiumReport) #premiumProjectReport{display:none!important}}

@media print{body:not(.printPremiumReport) #premiumBusinessSuite,body:not(.printPremiumReport) #premiumProjectReport{display:none!important}.premiumOptionsProposalPage.hidden{display:none!important}.proposalOptionGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.proposalOptionGrid .optionCompareCard{break-inside:avoid}}
\n\n/* PREMIUM NAVIGATION POLISH — approved scope */\n.premiumBusinessSuite{border:0;background:transparent;margin:0;padding:0}\n.premiumNavSection{scroll-margin-top:126px;margin-top:22px}\n.premiumSectionTitle{align-items:center;margin-bottom:0}\n.premiumSectionTitle .hint{margin:6px 0 0;max-width:760px}\n.premiumFinancialGrid,.premiumToolsGrid{gap:14px;margin-top:14px}\n.premiumToolCard{padding:16px}\n.premiumToolHead{margin-bottom:11px}\n.premiumToolHead h3{font-size:18px;line-height:1.22}\n.premiumFormGrid{gap:8px 10px}\n.premiumActions{margin-top:11px}\n.premiumMetrics{margin-top:11px}\n.premiumMetrics>div{padding:10px}\n.profitStatus,.premiumNarrative{margin-top:10px;padding:10px 11px}\n.premiumOptionsPreview{margin-top:14px}\n.premiumToolsGrid{grid-template-columns:repeat(2,minmax(0,1fr))}\n.premiumToolsGrid #multiOptionTool{grid-column:1/-1}\n.premiumToolsGrid #emailTool{grid-column:1/-1}\n.steps a[href="#financials"],.steps a[href="#premiumTools"]{font-weight:800}\n@media(max-width:900px){.premiumToolsGrid{grid-template-columns:1fr}.premiumToolsGrid #multiOptionTool,.premiumToolsGrid #emailTool{grid-column:auto}.premiumNavSection{scroll-margin-top:116px}}\n

/* PREMIUM POLISH PASS 2 — approved label/alignment/spacing QA scope */
.fieldLabelText{display:inline;line-height:1.25;white-space:normal}
.fieldLabelText .currencySymbolInline{display:inline!important;font:inherit!important}
.formGrid>label{min-width:0;align-self:start}
.formGrid input,.formGrid select{width:100%;min-width:0}
.recordActions{align-items:center;flex-wrap:wrap;justify-content:flex-end}
.premiumNavSection{margin-top:18px;margin-bottom:18px}
.premiumFinancialGrid,.premiumToolsGrid{align-items:start}
.premiumToolCard{min-width:0}
.premiumToolCard .hint{line-height:1.4}
.optionCompareGrid{align-items:stretch}
.optionCompareCard{min-width:0}
@media screen{
  #premiumOptionsProposalPage{min-height:0;margin-top:18px;margin-bottom:18px;padding-bottom:18px}
  #premiumOptionsProposalPage .pageHeading{padding-top:18px;padding-bottom:12px}
  #premiumOptionsProposalPage .proposalFooter{margin-top:16px}
}
@media(max-width:1100px){
  .steps{overflow-x:auto;scrollbar-width:thin;padding-left:2vw;padding-right:2vw}
  .steps a{white-space:nowrap;padding-left:18px;padding-right:18px}
}
@media(max-width:760px){
  .recordActions{justify-content:flex-start}
  .premiumNavSection{margin-top:14px;margin-bottom:14px}
}
@media print{
  #premiumOptionsProposalPage{min-height:1120px}
}

/* PREMIUM final repair: compact business-suite spacing without changing core modules */
#premiumBusinessSuite .premiumNavSection{scroll-margin-top:150px}
#premiumBusinessSuite .premiumToolGrid{align-items:start}
#premiumBusinessSuite .premiumToolCard{min-width:0}
#premiumBusinessSuite .premiumOptionsPreview:empty{display:none}
#premiumBusinessSuite .premiumOptionsPreview{margin-bottom:0}
@media (max-width:900px){#premiumBusinessSuite .premiumMetrics.four{grid-template-columns:repeat(2,minmax(0,1fr))}#premiumBusinessSuite .optionEditor,#premiumBusinessSuite .optionCompareGrid{grid-template-columns:1fr}}
@media (max-width:560px){#premiumBusinessSuite .premiumMetrics.four,#premiumBusinessSuite .premiumFormGrid,#premiumBusinessSuite .premiumFormGrid.compact{grid-template-columns:1fr}}
/* Keep the nested PREMIUM report printable after moving it inside the PREMIUM suite. */
@media print{
  body.printPremiumReport main{display:block!important}
  body.printPremiumReport main>*{display:none!important}
  body.printPremiumReport main>#premiumBusinessSuite{display:block!important}
  body.printPremiumReport #premiumBusinessSuite>.premiumNavSection{display:none!important}
  body.printPremiumReport #premiumProjectReport{display:block!important;margin:0!important;box-shadow:none!important;border:0!important}
}

/* PREMIUM FINAL LAUNCH POLISH — approved 2026-08-29
   Scope: customer proposal/quotation print efficiency + Premium dashboard spacing/order only. */

/* Compact the Premium roadmap on screen without removing any entitlement information. */
@media screen {
  #planUpgradeShowcase{gap:10px;margin-bottom:14px}
  #planUpgradeShowcase .upgradeShowcaseCard{padding:14px;border-radius:12px}
  #planUpgradeShowcase .upgradeShowcaseCard h3{margin:5px 0}
  #planUpgradeShowcase .upgradeShowcaseCard p{margin-bottom:7px}
  #planUpgradeShowcase .upgradeShowcaseCard ul{margin:7px 0 10px;padding-left:18px}
  #planUpgradeShowcase .upgradeShowcaseCard li{margin:4px 0}
  #planUpgradeShowcase .activeRoadmap ul{columns:2;column-gap:28px}
  #planUpgradeShowcase .activeRoadmap li{break-inside:avoid}

  /* Premium workspaces: balanced cards, less dead space, no oversized gaps. */
  #premiumBusinessSuite{margin:0;padding:0}
  #premiumBusinessSuite .premiumNavSection{margin-top:16px;margin-bottom:16px;padding:22px}
  #premiumBusinessSuite .premiumSectionTitle{padding-bottom:13px;margin-bottom:0}
  #premiumBusinessSuite .premiumSectionTitle h2{font-size:25px}
  #premiumBusinessSuite .premiumToolGrid{gap:12px;margin-top:12px}
  #premiumBusinessSuite .premiumToolCard{padding:14px;border-radius:12px;box-shadow:0 6px 18px rgba(7,26,51,.035)}
  #premiumBusinessSuite .premiumToolHead{margin-bottom:9px}
  #premiumBusinessSuite .premiumToolHead h3{font-size:17px}
  #premiumBusinessSuite .premiumFormGrid{gap:7px 9px}
  #premiumBusinessSuite .premiumFormGrid input,
  #premiumBusinessSuite .premiumFormGrid textarea,
  #premiumBusinessSuite .premiumToolCard select{margin-top:4px}
  #premiumBusinessSuite .premiumActions{margin-top:9px}
  #premiumBusinessSuite .premiumMetrics{margin-top:9px;gap:7px}
  #premiumBusinessSuite .premiumMetrics>div{padding:9px}
  #premiumBusinessSuite .premiumMetrics b{font-size:17px}
  #premiumBusinessSuite .profitStatus,
  #premiumBusinessSuite .premiumNarrative{margin-top:8px;padding:9px 10px}
  #premiumBusinessSuite .optionEditor{gap:9px}
  #premiumBusinessSuite .optionEditCard{padding:10px}
  #premiumBusinessSuite .premiumOptionsPreview{margin-top:10px}
  #premiumBusinessSuite #emailTool textarea{min-height:92px;resize:vertical}
  #premiumBusinessSuite #premiumProjectReport.reportVisible{margin:16px 3vw 24px}
}

@media screen and (max-width:760px){
  #planUpgradeShowcase .activeRoadmap ul{columns:1}
  #premiumBusinessSuite .premiumNavSection{padding:18px;margin:14px 15px}
}

/* Customer PDF: print only customer-facing proposal pages. Internal roadmap,
   dashboards, Financials, Premium Tools and controls never enter the PDF. */
@media print {
  @page{size:A4;margin:0}
  body:not(.printService):not(.printPremiumReport) main>*{display:none!important}
  body:not(.printService):not(.printPremiumReport) main>#proposal{display:block!important}
  body:not(.printService):not(.printPremiumReport) main>#premiumOptionsProposalPage{display:none!important}
  body:not(.printService):not(.printPremiumReport) #planUpgradeShowcase,
  body:not(.printService):not(.printPremiumReport) #premiumBusinessSuite,
  body:not(.printService):not(.printPremiumReport) #premiumProjectReport{display:none!important}

  /* Exact A4 proposal pages with compact, useful spacing. */
  body:not(.printService):not(.printPremiumReport) .proposal{
    width:210mm;height:297mm;min-height:297mm;padding:13mm 15mm;overflow:hidden;
  }
  body:not(.printService):not(.printPremiumReport) #proposalSheet .clientSummary{padding:12px 0;gap:10px}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .proposalHero{padding:18px 20px;gap:14px}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .proposalHero h2{font-size:24px;margin:5px 0}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .proposalHero strong{font-size:25px;margin:5px 0}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .subhead{margin:16px 0 7px;font-size:17px}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .proposalRow b,
  body:not(.printService):not(.printPremiumReport) #proposalSheet .proposalRow span{padding:7px 8px}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .energyProposalGrid{margin:8px 0 5px;gap:6px}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .energyProposalGrid>div{padding:8px}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .energyProposalGrid b{font-size:12px;margin-top:3px}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .roiGrid{margin:9px 0;gap:6px}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .roiGrid>div{padding:10px}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .roiGrid b{font-size:16px;margin-top:4px}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .termsGrid{gap:20px;padding-top:11px}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .termsGrid h3{margin:6px 0 3px}
  body:not(.printService):not(.printPremiumReport) #proposalSheet .termsGrid p{line-height:1.4;margin:0 0 5px}

  #proposalDesignPage .pageHeading,#proposalMaterialsPage .pageHeading,#premiumOptionsProposalPage .pageHeading{padding:13px 0 10px}
  #proposalDesignPage .pageHeading h2,#proposalMaterialsPage .pageHeading h2,#premiumOptionsProposalPage .pageHeading h2{font-size:23px;margin:5px 0}
  #proposalDesignPage .houseSystemVisual{margin-top:11px;padding:8px}
  #proposalDesignPage .houseSystemVisual svg{max-height:245px}
  #proposalDesignPage .subhead{margin:14px 0 7px;font-size:17px}
  #proposalDesignPage .proposalDiagram{min-height:135px;padding:12px}
  #proposalDesignPage .designNotesGrid{margin-top:10px;gap:7px}
  #proposalDesignPage .designNotesGrid>div{padding:9px}
  #proposalDesignPage .diagramNote{margin:8px 0 0;line-height:1.35}

  #proposalMaterialsPage .materialsTable{margin-top:11px}
  #proposalMaterialsPage .materialsHead b,#proposalMaterialsPage .materialsRow>*{padding:6px 7px}
  #proposalMaterialsPage .profileGrid{gap:18px;margin-top:12px;padding-top:10px}
  #proposalMaterialsPage .profileGrid p{line-height:1.4;margin:4px 0}
  #proposalMaterialsPage .signature{gap:55px;margin-top:20px;padding-top:9px}
  #proposalMaterialsPage .signature b{margin-top:10px}

  #premiumOptionsProposalPage{padding:13mm 15mm!important;min-height:297mm!important;margin:0!important}
  #premiumOptionsProposalPage .optionCompareGrid{gap:8px}
  #premiumOptionsProposalPage .optionCompareCard{padding:12px}
  #premiumOptionsProposalPage .proposalFooter{margin-top:auto}

  /* Service quotation is one clean A4 page for normal content. */
  body.printService #serviceProposalSheet{width:210mm;height:297mm;min-height:297mm;padding:13mm 15mm!important}
  body.printService #serviceProposalSheet .clientSummary{padding:12px 0;gap:10px}
  body.printService #serviceProposalSheet .serviceQuoteTitle{margin:12px 0;padding:16px 18px;gap:16px}
  body.printService #serviceProposalSheet .serviceQuoteTitle h2{font-size:22px;margin:5px 0}
  body.printService #serviceProposalSheet .serviceQuoteTitle strong{font-size:24px;margin:4px 0}
  body.printService #serviceProposalSheet .serviceQuoteTable{margin-bottom:12px}
  body.printService #serviceProposalSheet .serviceQuoteHead b,
  body.printService #serviceProposalSheet .serviceQuoteRow>*,
  body.printService #serviceProposalSheet .serviceGrand>*{padding:8px 10px}
  body.printService #serviceProposalSheet .termsGrid{gap:20px;padding-top:10px}
  body.printService #serviceProposalSheet .termsGrid h3{margin:5px 0 3px}
  body.printService #serviceProposalSheet .termsGrid p{line-height:1.4;margin:0 0 5px}
  body.printService #serviceProposalSheet .signature{gap:55px;margin-top:18px;padding-top:9px}
  body.printService #serviceProposalSheet .signature b{margin-top:9px}
}


/* PREMIUM DASHBOARD CLEANUP — approved 2026-08-29
   Upgrade roadmap hides automatically for active PREMIUM accounts (commercial.js).
   Financials/Premium Tools act as focused workspace folders; feature cards are compact accordions. */
.premiumWorkspaceHidden{display:none!important}
.steps a.premiumWorkspaceActive{background:#fffaf0;color:#8b6500;box-shadow:inset 0 -3px 0 #c99a25}
#premiumBusinessSuite .premiumToolHead[role="button"]{cursor:pointer;user-select:none;position:relative;padding-right:34px;margin-bottom:0}
#premiumBusinessSuite .premiumToolHead[role="button"]::after{content:"+";position:absolute;right:2px;top:50%;transform:translateY(-50%);width:24px;height:24px;border:1px solid #d9dfdc;border-radius:7px;display:grid;place-items:center;font-size:18px;line-height:1;color:#17352b;background:#f8faf8}
#premiumBusinessSuite .premiumToolCard:not(.premiumToolCollapsed)>.premiumToolHead[role="button"]::after{content:"−"}
#premiumBusinessSuite .premiumToolCollapsed>.premiumToolBody{display:none}
#premiumBusinessSuite .premiumToolCard.premiumToolCollapsed{padding:13px 14px}
#premiumBusinessSuite .premiumToolCard.premiumToolCollapsed .premiumToolHead h3{margin-bottom:0}
#premiumBusinessSuite .premiumToolBody{padding-top:11px}
#premiumBusinessSuite .premiumToolGrid{grid-auto-flow:row;align-items:start}
@media(max-width:900px){#premiumBusinessSuite .premiumToolCard.premiumToolCollapsed{padding:12px}}
@media print{
  #premiumBusinessSuite .premiumToolBody{display:block!important}
  #premiumBusinessSuite .premiumToolHead[role="button"]::after{display:none!important}
}

/* PREMIUM INTERNAL REPORT PRINT FIX — approved 2026-08-29
   Prevent a trailing blank PDF page when the report content fits on one A4 sheet.
   Scope: print layout only; no calculations, report data, or other modules changed. */
@media print {
  body.printPremiumReport #premiumProjectReport{
    width:210mm!important;
    height:297mm!important;
    min-height:0!important;
    margin:0!important;
    padding:10mm 12mm!important;
    overflow:hidden!important;
    break-before:auto!important;
    page-break-before:auto!important;
    break-after:auto!important;
    page-break-after:auto!important;
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }
  body.printPremiumReport #premiumProjectReport .proposalHead{padding-bottom:9px!important}
  body.printPremiumReport #premiumProjectReport .pageHeading{padding:9px 0 7px!important}
  body.printPremiumReport #premiumProjectReport .pageHeading h2{margin:3px 0!important;font-size:21px!important}
  body.printPremiumReport #premiumProjectReport .pageHeading p{margin:4px 0!important;line-height:1.3!important}
  body.printPremiumReport #premiumProjectReport .reportSummaryGrid>div,
  body.printPremiumReport #premiumProjectReport .reportMetrics>div{padding:8px 10px!important}
  body.printPremiumReport #premiumProjectReport .subhead{margin:10px 0 5px!important;font-size:16px!important}
  body.printPremiumReport #premiumProjectReport .reportCostTable>div{padding:5px 9px!important}
  body.printPremiumReport #premiumProjectReport .diagramNote{margin:6px 0 0!important;line-height:1.25!important;font-size:10px!important}
  body.printPremiumReport #premiumProjectReport .proposalFooter{margin-top:7px!important;padding-top:6px!important}
}


/* CUSTOMER PROPOSAL PAGINATION FIX — approved 2026-08-29
   Standard proposal = exactly 3 pages.
   Multi-option proposal = exactly 4 pages.
   Prevents a trailing blank page caused by page-break-after on the final visible sheet.
   Print/PDF only; no calculation, proposal data, or feature logic changed. */
@media print {
  body:not(.printService):not(.printPremiumReport) #proposalSheet,
  body:not(.printService):not(.printPremiumReport) #proposalDesignPage {
    break-after: page !important;
    page-break-after: always !important;
  }

  /* Standard proposal: page 3 is the final page. */
  body:not(.printService):not(.printPremiumReport):not(.printCustomerOptions) #proposalMaterialsPage {
    break-after: auto !important;
    page-break-after: auto !important;
  }

  /* Multi-option proposal: page 3 continues to page 4. */
  body.printCustomerOptions:not(.printService):not(.printPremiumReport) #proposalMaterialsPage {
    break-after: page !important;
    page-break-after: always !important;
  }

  /* Page 4 is always the final page when enabled. */
  body.printCustomerOptions:not(.printService):not(.printPremiumReport) #premiumOptionsProposalPage {
  display:none!important;
    display: flex !important;
    break-after: auto !important;
    page-break-after: auto !important;
  }

  body:not(.printCustomerOptions):not(.printService):not(.printPremiumReport) #premiumOptionsProposalPage {
    display: none !important;
  }

  /* Service quotation and internal report must never append an extra trailing page. */
  body.printService #serviceProposalSheet,
  body.printPremiumReport #premiumProjectReport {
    break-after: auto !important;
    page-break-after: auto !important;
  }
}


/* =========================================================
   FINAL STAGING PRINT LAYOUT REPAIR — 2026-08-29
   Approved scope: PRINT/PDF layout only.
   ========================================================= */
@media print {
  body:not(.printService):not(.printPremiumReport) #proposal {
    display: block !important;
  }

  body:not(.printService):not(.printPremiumReport) #proposalSheet,
  body:not(.printService):not(.printPremiumReport) #proposalDesignPage,
  body:not(.printService):not(.printPremiumReport) #proposalMaterialsPage,
  body.printCustomerOptions:not(.printService):not(.printPremiumReport) #premiumOptionsProposalPage {
  display:none!important;
    box-sizing: border-box !important;
    width: 210mm !important;
    min-height: 297mm !important;
    height: 297mm !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body:not(.printService):not(.printPremiumReport) #proposalSheet,
  body:not(.printService):not(.printPremiumReport) #proposalDesignPage {
    break-after: page !important;
    page-break-after: always !important;
  }

  body:not(.printService):not(.printPremiumReport):not(.printCustomerOptions) #proposalMaterialsPage {
    break-after: auto !important;
    page-break-after: auto !important;
  }

  body.printCustomerOptions:not(.printService):not(.printPremiumReport) #proposalMaterialsPage {
    break-after: page !important;
    page-break-after: always !important;
  }

  body.printCustomerOptions:not(.printService):not(.printPremiumReport) #premiumOptionsProposalPage {
  display:none!important;
    display: flex !important;
    position: relative !important;
    break-before: auto !important;
    page-break-before: auto !important;
    break-after: auto !important;
    page-break-after: auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  body:not(.printCustomerOptions):not(.printService):not(.printPremiumReport) #premiumOptionsProposalPage {
    display: none !important;
  }

  body:not(.printService):not(.printPremiumReport) #proposal > *:last-child,
  body:not(.printService):not(.printPremiumReport) #proposalMaterialsPage:last-child,
  body.printCustomerOptions:not(.printService):not(.printPremiumReport) #premiumOptionsProposalPage:last-child {
    break-after: auto !important;
    page-break-after: auto !important;
  }

  body:not(.printService):not(.printPremiumReport) #premiumProjectReport,
  body:not(.printService):not(.printPremiumReport) #serviceProposalSheet,
  body:not(.printService):not(.printPremiumReport) #premiumBusinessSuite {
    display: none !important;
  }

  body.printPremiumReport #premiumProjectReport {
    display: block !important;
    position: static !important;
    width: 210mm !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: 277mm !important;
    margin: 0 auto !important;
    padding: 8mm 10mm 6mm !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    break-before: auto !important;
    page-break-before: auto !important;
    break-after: auto !important;
    page-break-after: auto !important;
  }

  body.printPremiumReport #premiumProjectReport .reportCard,
  body.printPremiumReport #premiumProjectReport .metricCard,
  body.printPremiumReport #premiumProjectReport table,
  body.printPremiumReport #premiumProjectReport .costRow {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.printPremiumReport #premiumProjectReport h1,
  body.printPremiumReport #premiumProjectReport h2,
  body.printPremiumReport #premiumProjectReport h3 {
    margin-top: 2mm !important;
    margin-bottom: 1.5mm !important;
  }

  body.printPremiumReport #premiumProjectReport p,
  body.printPremiumReport #premiumProjectReport .small,
  body.printPremiumReport #premiumProjectReport .muted {
    margin-top: 0 !important;
    margin-bottom: 1.2mm !important;
  }

  body.printService #serviceProposalSheet {
    display: block !important;
    position: static !important;
    width: 210mm !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: 277mm !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    break-before: auto !important;
    page-break-before: auto !important;
    break-after: auto !important;
    page-break-after: auto !important;
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
  }

  @page {
    size: A4 portrait;
    margin: 0;
  }
}


/* =========================================================
   FINAL ISOLATED PRINT ENGINE — STAGING QA
   Only #adwPrintRoot participates in print layout.
   This removes phantom/trailing pages from the application DOM.
   ========================================================= */
#adwPrintRoot { display: none; }

@media print {
  body.adwPrintRootMode > *:not(#adwPrintRoot) {
    display: none !important;
  }

  body.adwPrintRootMode #adwPrintRoot {
    display: block !important;
    position: static !important;
    width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body.adwPrintRootMode #adwPrintRoot > .adwPrintPage {
    display: flex !important;
    position: relative !important;
    box-sizing: border-box !important;
    width: 210mm !important;
    max-width: 210mm !important;
    min-width: 210mm !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    border: 0 !important;
    break-before: auto !important;
    page-break-before: auto !important;
    break-after: page !important;
    page-break-after: always !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Customer proposal pages are intentionally one A4 page each.
     Use a tiny safety allowance to prevent Chrome rounding into an extra page. */
  body.adwPrintRootMode #adwPrintRoot[data-mode^="customer"] > .adwPrintPage {
    height: 296mm !important;
    min-height: 296mm !important;
    max-height: 296mm !important;
  }

  /* Internal report and service quotation should size naturally and remain on
     one page when their normal content fits. */
  body.adwPrintRootMode #adwPrintRoot[data-mode="premium-report"] > .adwPrintPage,
  body.adwPrintRootMode #adwPrintRoot[data-mode="service"] > .adwPrintPage,
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] > .adwPrintPage {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 276mm !important;
    padding-top: 7mm !important;
    padding-bottom: 6mm !important;
  }

  /* The final printed node must never force a following page. */
  body.adwPrintRootMode #adwPrintRoot > .adwPrintPage:last-child {
    break-after: auto !important;
    page-break-after: auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  body.adwPrintRootMode #adwPrintRoot > .adwPrintPage * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body.adwPrintRootMode {
    width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  @page {
    size: A4 portrait;
    margin: 0;
  }
}


/* =========================================================
   PRINT QA PATCH — preserve original page IDs + enlarge comparison
   Approved 2026-08-29
   ========================================================= */
@media print {
  /* Because original nodes are moved (not cloned), all #proposalSheet /
     #proposalDesignPage / #proposalMaterialsPage rules remain intact. */
  body.adwPrintRootMode #adwPrintRoot > .adwPrintPage {
    width: 210mm !important;
    max-width: 210mm !important;
    min-width: 210mm !important;
    height: 296mm !important;
    min-height: 296mm !important;
    max-height: 296mm !important;
    margin: 0 !important;
    padding: 12mm 14mm !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    break-after: page !important;
    page-break-after: always !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.adwPrintRootMode #adwPrintRoot > .adwPrintPage:last-child {
    break-after: auto !important;
    page-break-after: auto !important;
  }

  /* Restore the main proposal's intended full-width layout. */
  body.adwPrintRootMode #proposalSheet,
  body.adwPrintRootMode #proposalDesignPage,
  body.adwPrintRootMode #proposalMaterialsPage {
    display: flex !important;
    flex-direction: column !important;
  }

  /* MAXIMIZED PAGE 4 — move content up and make the option comparison
     substantially larger/easier for the customer to read. */
  body.adwPrintRootMode #premiumOptionsProposalPage {
    display: flex !important;
    flex-direction: column !important;
    padding: 10mm 14mm 10mm !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalPage .proposalHead {
    margin-bottom: 2mm !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalPage .pageHeading {
    padding: 4mm 0 4mm !important;
    margin: 0 !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalPage .pageHeading small {
    font-size: 9px !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalPage .pageHeading h2 {
    font-size: 31px !important;
    margin: 2mm 0 1.5mm !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalPage .pageHeading p {
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    max-width: none !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalGrid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7mm !important;
    margin-top: 7mm !important;
    align-items: stretch !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalGrid .optionCompareCard {
    min-height: 92mm !important;
    padding: 8mm !important;
    border-width: 1.5px !important;
    border-radius: 4mm !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalGrid .optionCompareCard small {
    font-size: 11px !important;
    letter-spacing: .08em !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalGrid .optionCompareCard h3 {
    font-size: 23px !important;
    line-height: 1.15 !important;
    margin: 3mm 0 2mm !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalGrid .optionCompareCard strong {
    font-size: 27px !important;
    line-height: 1.1 !important;
    margin-bottom: 4mm !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalGrid .optionCompareCard p {
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin: 1.8mm 0 !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalPage .diagramNote {
    font-size: 10.5px !important;
    line-height: 1.45 !important;
    margin: 7mm 0 0 !important;
    text-align: center !important;
  }

  body.adwPrintRootMode #premiumOptionsProposalPage .proposalFooter {
    margin-top: auto !important;
  }

  /* Internal report and service quote stay natural, one-page when content fits. */
  body.adwPrintRootMode #adwPrintRoot[data-mode="premium-report"] > .adwPrintPage,
  body.adwPrintRootMode #adwPrintRoot[data-mode="service"] > .adwPrintPage {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 276mm !important;
    padding: 7mm 10mm 6mm !important;
  }
}

/* 2026-08-30 Commercial / Industrial sizing enhancement */
.packageGridThree{grid-template-columns:repeat(3,minmax(0,1fr))}
.package.budget{border-color:#d4b45d;background:linear-gradient(180deg,#fffdf6,#fff)}
.package.budget .ribbon{background:#8a6a1c;color:#fff}
@media(max-width:900px){.packageGridThree{grid-template-columns:1fr}}
body.accountRestricted #computeBtn,body.accountRestricted #serviceComputeBtn,body.accountRestricted #saveBtn,body.accountRestricted [data-min-plan] button:disabled{opacity:.48;cursor:not-allowed}
body.accountRestricted main::before{content:"Account access expired — read-only mode. Your saved data is preserved. Open Account to choose a plan and continue.";display:block;margin:12px auto 0;max-width:1240px;padding:11px 14px;border:1px solid #d6b15c;background:#fff8e6;color:#5a4310;font-weight:700;border-radius:8px}


/* FINAL MASTER CORRECTION — 2026-08-30
   Readable full-page system visualization + wiring layout. */
.diagram{
  padding:24px 20px;
  min-height:300px;
  gap:14px;
  flex-wrap:wrap;
  align-content:center;
  overflow:visible;
}
.diagram .node{
  min-width:150px;
  max-width:205px;
  min-height:92px;
  padding:16px 14px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  overflow-wrap:anywhere;
}
.diagram .node b{font-size:13px;line-height:1.2}
.diagram .node span{font-size:10px;line-height:1.4}
.diagram .node small{font-size:9px;color:#6c7a72}
.diagram .arrow{flex:0 0 auto;font-size:28px}
.fullPageVisual{padding:18px;margin-top:22px}
.fullPageVisual svg{max-height:610px!important;min-height:430px}
.fullPageDiagram{min-height:610px!important;padding:34px 24px!important;gap:18px!important}
.fullPageDiagram .node{min-width:175px;max-width:230px;min-height:118px;padding:20px 16px}
.fullPageDiagram .node b{font-size:15px}
.fullPageDiagram .node span{font-size:11px}
.wiringLegendGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:18px}
.wiringLegendGrid>div{border:1px solid var(--line);background:#f6f8f5;padding:14px;display:flex;flex-direction:column;gap:6px}
.wiringLegendGrid b{font-size:10px}
.wiringLegendGrid span{font-size:9px;line-height:1.45;color:#68776e}
@media screen and (max-width:1000px){
  .diagram{justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap}
  .diagram .node{min-width:170px}
  .fullPageDiagram{overflow-x:auto!important;flex-wrap:nowrap!important}
}
@media print{
  #proposalDesignPage .houseSystemVisual{margin-top:18px;padding:12px!important}
  #proposalDesignPage .houseSystemVisual svg{max-height:520px!important;min-height:430px!important}
  #proposalDesignPage .designNotesGrid{margin-top:18px;gap:10px}
  #proposalWiringPage .pageHeading{padding:13px 0 10px}
  #proposalWiringPage .pageHeading h2{font-size:23px;margin:5px 0}
  #proposalWiringPage .fullPageDiagram{min-height:520px!important;padding:24px 18px!important;gap:12px!important;flex-wrap:wrap!important;overflow:visible!important}
  #proposalWiringPage .node{min-width:145px;max-width:185px;min-height:96px;padding:13px 10px}
  #proposalWiringPage .node b{font-size:12px}
  #proposalWiringPage .node span{font-size:9px}
  #proposalWiringPage .arrow{font-size:22px}
  #proposalWiringPage .wiringLegendGrid{margin-top:12px;gap:8px}
  #proposalWiringPage .wiringLegendGrid>div{padding:10px}
  #proposalWiringPage .diagramNote{margin-top:10px}
  #proposalMaterialsPage .pageHeading{padding:13px 0 10px}
  #proposalMaterialsPage .pageHeading h2{font-size:23px;margin:5px 0}
  #premiumOptionsProposalPage{display:none!important}
}

/* Service quotation compute feedback */
.serviceProposal.serviceQuoteComputed {
  outline: 2px solid rgba(199, 167, 92, .55);
  outline-offset: 4px;
  transition: outline-color .5s ease;
}


/* 2026-08-31 FINAL ADDITIVE ENHANCEMENT — proposal editing/signature/general services */
.proposalMessageBlock{margin:18px 0;padding:14px 16px;border:1px solid #dce5df;border-radius:10px;background:#f8faf8}.proposalMessageBlock h3{margin:0 0 7px}.proposalMessageBlock p{margin:0;white-space:pre-line;line-height:1.55}.proposalCompanyContact{display:flex;gap:14px;flex-wrap:wrap;margin:8px 0 14px;color:#66756e;font-size:12px}.signatureImage{display:block;max-width:145px;max-height:52px;object-fit:contain;margin:3px 0 5px}.signatureImage.hidden{display:none!important}.settingsWide{grid-column:1/-1}.settingsGrid label small{display:block;color:#708079;margin-top:4px;font-size:11px}.generalServicesSection .generalQuoteEditor{margin-bottom:24px}.generalMessageEditor{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end;margin:14px 0}.generalMessageEditor label{display:grid;gap:6px}.gqEditHead,.gqEditRow{display:grid;grid-template-columns:140px minmax(220px,1fr) 90px 90px 140px 42px;gap:7px;align-items:center}.gqEditHead{font-size:11px;color:#65756d;padding:8px 0}.gqEditRow{margin-bottom:7px}.gqEditRow input,.gqEditRow select{width:100%;min-width:0}.gqRemove{background:#fff;color:#7a2626;border-color:#e2c9c9}.generalTermsEditor{margin-top:14px}.gqQuoteTable{margin:18px 0;border:1px solid #dfe6e2;border-radius:10px;overflow:hidden}.gqQuoteHead,.gqQuoteRow{display:grid;grid-template-columns:minmax(260px,1fr) 100px 150px 150px;gap:10px;padding:10px 12px;border-bottom:1px solid #e4e9e6;align-items:center}.gqQuoteHead{background:#f2f6f3;font-size:11px}.gqQuoteRow span:first-child{display:grid;gap:2px}.gqQuoteRow strong{text-align:right}.generalProposal .serviceQuoteTitle p{white-space:pre-line}.generalProposal .clientSummary span{display:block}.generalServicesSection .serviceActions{margin-top:14px}.currencyNameInline{font-size:12px;color:#64736d}
@media(max-width:800px){.gqEditHead{display:none}.gqEditRow{grid-template-columns:1fr 1fr}.gqEditRow input[data-field="description"]{grid-column:1/-1}.generalMessageEditor{grid-template-columns:1fr}.gqQuoteHead,.gqQuoteRow{grid-template-columns:1fr 80px}.gqQuoteHead b:nth-child(3),.gqQuoteHead b:nth-child(4){display:none}.gqQuoteRow span:nth-child(3),.gqQuoteRow strong{justify-self:end}.gqQuoteRow span:first-child{grid-column:1/-1}.gqQuoteRow strong{font-size:15px}}
@media print{.signatureImage{max-width:125px;max-height:44px}.proposalMessageBlock{break-inside:avoid}.generalQuoteEditor{display:none!important}.generalProposal{box-shadow:none!important}}

.proposalQuickEdit{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end;margin:0 0 14px}.proposalQuickEdit label{display:grid;gap:5px}.proposalQuickEdit textarea{width:100%;resize:vertical}.brandContact{font-size:9px!important;color:#718078!important;line-height:1.2;margin-top:2px;max-width:360px}.proposalBrand>div{min-width:0}@media(max-width:700px){.proposalQuickEdit{grid-template-columns:1fr}}


/* FINAL PREMIUM LARGE / MEGA PROJECT ADDITION — additive only */
.megaConstraintGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0 16px}.megaConstraintGrid label{font-size:12px;font-weight:700}.megaRecommendationCards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0}.megaOptionCard{position:relative;border:1px solid #cfd9e5;border-radius:14px;padding:16px;background:#fff;box-shadow:0 6px 18px rgba(7,26,51,.06)}.megaOptionCard.active{border:2px solid #1677d2;background:#f5faff}.megaOptionBadge{position:absolute;right:12px;top:12px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#1677d2;color:#fff;font-weight:900}.megaOptionCard small{display:block;color:#1677d2;font-weight:800;padding-right:34px}.megaOptionCard h3{margin:8px 0;color:#071a33}.megaOptionCard strong{display:block;margin:8px 0;color:#0f5132}.megaOptionCard p{min-height:58px;color:#52606d;font-size:12px;line-height:1.45}.megaOptionCard button{width:100%}.megaEmptyState{grid-column:1/-1;border:1px dashed #9fb4c9;background:#f7fafc;border-radius:12px;padding:18px;display:flex;gap:8px;flex-direction:column}.premiumSellingPoint{max-width:900px}.premiumMegaHidden{display:none!important}.megaProposalTitle{padding:18px 0 8px}.megaProposalTitle small{color:#1677d2;font-weight:900;letter-spacing:.08em}.megaProposalTitle h2{margin:4px 0 6px;color:#071a33}.proposalMegaCards .megaOptionCard button{display:none}.engineeringReviewBanner{display:flex;gap:14px;align-items:flex-start;padding:14px 16px;background:#fff7df;border:1px solid #e2bf55;border-radius:12px;margin:16px 0}.engineeringReviewBanner b{white-space:nowrap;color:#8a6200}.engineeringReviewBanner span{font-size:12px;line-height:1.45}.megaVisualCanvas{border:1px solid #dbe4ee;border-radius:14px;padding:18px;background:#f9fbfd;min-height:360px}.roofConcept{display:flex;align-items:center;justify-content:center;gap:22px;min-height:250px}.roofBlock{flex:1;text-align:center}.roofBlock>b{display:block;color:#071a33;margin-bottom:10px}.roofShape{clip-path:polygon(8% 20%,50% 0,92% 20%,100% 100%,0 100%);min-height:190px;background:#dfe6ea;border:4px solid #24384d;padding:55px 30px 25px}.secondaryShape{clip-path:none;border-radius:8px;background:#e8edf1}.panelGlyphGrid{display:flex;flex-wrap:wrap;justify-content:center;gap:4px}.panelGlyphGrid i,.sldPanels i{display:inline-block;width:24px;height:15px;background:linear-gradient(135deg,#0c4f8a,#1976c9);border:1px solid #fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.25)}.panelGlyphGrid em{font-style:normal;font-weight:800;color:#0c4f8a;padding:2px}.roofArrow{font-size:32px;font-weight:900;color:#1677d2}.megaVisualMetrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:16px}.megaVisualMetrics>div{padding:12px;border-radius:10px;background:#fff;border:1px solid #dbe4ee;text-align:center}.megaVisualMetrics small{display:block;color:#667788;font-size:10px}.megaVisualMetrics b{display:block;color:#071a33;margin-top:4px}.sldLayout{display:flex;align-items:center;gap:10px;overflow:hidden}.sldStrings{display:flex;flex-direction:column;gap:7px;min-width:170px}.sldString{padding:8px;border:1px solid #b9c9d8;border-radius:8px;background:#fff}.sldString b,.sldString span{display:block;font-size:10px}.sldPanels{display:flex;gap:2px;margin-top:5px;flex-wrap:wrap}.sldPanels i{width:12px;height:8px}.sldArrow{font-size:24px;color:#1677d2;font-weight:900}.sldNode{flex:1;min-width:120px;padding:14px 10px;border:2px solid #7890a6;border-radius:10px;background:#fff;text-align:center}.sldNode.blue{border-color:#1677d2;background:#f5faff}.sldNode.green{border-color:#67963c;background:#f6faef}.sldNode b{display:block;font-size:11px}.sldNode span,.sldNode small{display:block;font-size:9px;margin-top:5px}.sldLegend{margin-top:16px;padding:10px;background:#eef5fb;border-radius:8px;font-size:11px}.megaStrategyGrid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}.megaStrategyGrid article{position:relative;border:1px solid #d6e0ea;border-radius:12px;padding:18px 18px 18px 54px;min-height:120px;background:#fff}.megaStrategyGrid article>span{position:absolute;left:14px;top:14px;width:28px;height:28px;border-radius:50%;background:#1677d2;color:#fff;display:grid;place-items:center;font-weight:900}.megaStrategyGrid h3{margin:0 0 7px;color:#071a33}.megaStrategyGrid p{margin:0;color:#52606d;font-size:12px;line-height:1.5}.megaScaleSummary{grid-column:1/-1;padding:14px;background:#eef5fb;border-radius:10px;line-height:1.7}.premiumMegaProposalPage{page-break-before:always}
@media(max-width:900px){.megaConstraintGrid,.megaRecommendationCards,.megaVisualMetrics{grid-template-columns:1fr}.roofConcept,.sldLayout{flex-direction:column}.megaStrategyGrid{grid-template-columns:1fr}.sldArrow{transform:rotate(90deg)}}
@media print{.megaOptionCard{break-inside:avoid}.premiumMegaProposalPage{page-break-before:always}.megaRecommendationCards{grid-template-columns:repeat(3,1fr)}.megaConstraintGrid{display:none}.megaOptionCard p{min-height:0}.sldLayout{overflow:visible}.premiumSellingPoint{display:none}}


/* 2026-08-31 GENERAL SERVICES PRINT HOTFIX — additive only.
   Fixes isolated print root flex layout that squeezed the General Services
   Proposal & Quotation into narrow columns. No calculation or feature changes. */
@media print {
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] > #generalProposalSheet {
    display: block !important;
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 296mm !important;
    padding: 13mm 15mm !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] #generalProposalSheet .proposalHead {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 18px !important;
  }
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] #generalProposalSheet .clientSummary {
    display: grid !important;
    grid-template-columns: 1.5fr .8fr 1fr !important;
    gap: 10px !important;
    padding: 12px 0 !important;
  }
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] #generalProposalSheet .serviceQuoteTitle {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 180px !important;
    gap: 16px !important;
    margin: 12px 0 !important;
    padding: 16px 18px !important;
  }
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] #generalProposalSheet .serviceQuoteTitle h2 {
    font-size: 22px !important;
    margin: 5px 0 !important;
  }
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] #generalProposalSheet .serviceQuoteTitle strong {
    font-size: 24px !important;
  }
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] #generalProposalSheet .gqQuoteHead,
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] #generalProposalSheet .gqQuoteRow {
    grid-template-columns: minmax(0,1fr) 72px 110px 110px !important;
  }
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] #generalProposalSheet .termsGrid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    padding-top: 10px !important;
  }
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] #generalProposalSheet .signature {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 55px !important;
    margin-top: 18px !important;
    padding-top: 9px !important;
  }
}

/* 2026-08-31 GENERAL SERVICES PDF/PRINT SIGNATURE VISIBILITY FIX — additive only.
   Allows the General Services proposal to naturally continue to a second A4 page
   when notes/terms/items exceed one page, while keeping the signature block intact.
   No calculations, pricing, entitlement, Solar, backend, or other modules changed. */
@media print {
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] > #generalProposalSheet {
    height: auto !important;
    min-height: 297mm !important;
    max-height: none !important;
    overflow: visible !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] #generalProposalSheet .signature {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    break-before: auto !important;
    page-break-before: auto !important;
    margin-top: 14px !important;
    padding-top: 9px !important;
  }
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] #generalProposalSheet .proposalFooter {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  body.adwPrintRootMode #adwPrintRoot[data-mode="general-service"] #generalProposalSheet .signatureImage {
    max-width: 125px !important;
    max-height: 44px !important;
    object-fit: contain !important;
  }
}
