/* portal-calculator-system-v728.css
   Final consolidated calculator UI layer.
   Includes: stage UI, calculator top/work area, result normalization,
   mobile rules, Simple/PRO controls and live-visual top reset.
   This file replaces legacy v713/v714/v715/v716/v721/v722/v724/v726 UI overrides.
*/

/* ---- portal-calculator-ui-v713.css ---- */
/* portal-calculator-ui-v713
   Unified stage navigation and hero placement fixes.
   Desktop: one horizontal row above the active calculator stage.
   Tablet/mobile: adaptive grid without horizontal overflow.
*/

/* Stage navigation: final override loaded after local calculator styles. */
.wb-stagebar:not([hidden]),
.aacp-stage-nav:not([hidden]),
.pipe-stagebar-v262:not([hidden]),
.gablepro-stage-nav:not([hidden]),
.rs-stage-nav:not([hidden]),
.sr-stage-nav:not([hidden]),
.rcb-stagebar:not([hidden]),
.ba-stage-nav:not([hidden]),
.guttermaster-stage-nav:not([hidden]),
.timber-stagebar:not([hidden]),
.formwork-stage-nav:not([hidden]),
.pp-stagebar-v282:not([hidden]),
.pf-stage-nav:not([hidden]),
.chim-stagebar:not([hidden]),
.slope-stagebar:not([hidden]),
.gklp-stage-nav:not([hidden]),
.ac-stagebar:not([hidden]),
.truss-stagebar-v275:not([hidden]),
.rct-stagebar:not([hidden]),
.sew-stagebar:not([hidden]),
.paint-wizard-tabs:not([hidden]),
.rbr-stagebar:not([hidden]),
.hs-stagebar:not([hidden]),
.slp-stage-nav:not([hidden]),
.rcw-stagebar:not([hidden]),
.grout-stagebar:not([hidden]),
.rcf-stagebar:not([hidden]),
.snowload-stage-nav:not([hidden]),
.rad-stepper:not([hidden]),
.pg-stage-nav:not([hidden]),
.sp-stage-nav:not([hidden]),
.cbl-stagebar:not([hidden]),
.soil-stagebar:not([hidden]),
.ceil-stagebar-v317:not([hidden]),
.lathpro-stage-nav:not([hidden]),
.cem-stagebar:not([hidden]),
.hippro-stage-nav:not([hidden]),
.electro-steps:not([hidden]),
.bp-stage-nav:not([hidden]),
.rcc-stagebar:not([hidden]),
.sand-stagebar:not([hidden]),
.foundationmaster-stage-nav:not([hidden]),
.loadmaster-stage-nav:not([hidden]),
.beam-stagebar:not([hidden]),
.win-stagebar:not([hidden]),
.siding-stagebar:not([hidden]),
.vent-stage-nav:not([hidden]),
.mt-stage-nav:not([hidden]),
.th-stage-nav:not([hidden]),
.vol-stagebar-v312:not([hidden]),
.walls-stagebar-v259:not([hidden]),
.pl-stagebar:not([hidden]),
.mort-stagebar:not([hidden]),
.framepro-stage-nav:not([hidden]),
.can-stagebar-v292:not([hidden]),
.osb-stagebar:not([hidden]),
.slf-stagebar:not([hidden]),
.met-stagebar:not([hidden]),
.irr-stagebar:not([hidden]),
.lgt-stagebar:not([hidden]),
.fi-stage-nav:not([hidden]),
.ply-stagebar:not([hidden]),
.rcs-stagebar:not([hidden]),
.wfh-stepper:not([hidden]),
.adh-stagebar:not([hidden]),
.hc-stage-nav:not([hidden]),
.door-stagebar:not([hidden]),
.wsup-stagebar:not([hidden]),
.hl-stepper:not([hidden]),
.mono-stagebar:not([hidden]),
.room-stagebar-v272:not([hidden]),
.ds-stagebar:not([hidden]),
.windload-stage-nav:not([hidden]),
.wp-stagebar:not([hidden]),
.roofmaster-stage-nav:not([hidden]),
.sf-stage-nav:not([hidden]),
.calc-wizard-progress-v226:not([hidden]){
  display:grid!important;
  grid-template-columns:none!important;
  grid-template-rows:1fr!important;
  grid-auto-flow:column!important;
  grid-auto-columns:minmax(0,1fr)!important;
  gap:8px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:visible!important;
  box-sizing:border-box!important;
  align-items:stretch!important;
}

.wb-stagebar:not([hidden]) > button,
.wb-stagebar:not([hidden]) > a,
.aacp-stage-nav:not([hidden]) > button,
.aacp-stage-nav:not([hidden]) > a,
.pipe-stagebar-v262:not([hidden]) > button,
.pipe-stagebar-v262:not([hidden]) > a,
.gablepro-stage-nav:not([hidden]) > button,
.gablepro-stage-nav:not([hidden]) > a,
.rs-stage-nav:not([hidden]) > button,
.rs-stage-nav:not([hidden]) > a,
.sr-stage-nav:not([hidden]) > button,
.sr-stage-nav:not([hidden]) > a,
.rcb-stagebar:not([hidden]) > button,
.rcb-stagebar:not([hidden]) > a,
.ba-stage-nav:not([hidden]) > button,
.ba-stage-nav:not([hidden]) > a,
.guttermaster-stage-nav:not([hidden]) > button,
.guttermaster-stage-nav:not([hidden]) > a,
.timber-stagebar:not([hidden]) > button,
.timber-stagebar:not([hidden]) > a,
.formwork-stage-nav:not([hidden]) > button,
.formwork-stage-nav:not([hidden]) > a,
.pp-stagebar-v282:not([hidden]) > button,
.pp-stagebar-v282:not([hidden]) > a,
.pf-stage-nav:not([hidden]) > button,
.pf-stage-nav:not([hidden]) > a,
.chim-stagebar:not([hidden]) > button,
.chim-stagebar:not([hidden]) > a,
.slope-stagebar:not([hidden]) > button,
.slope-stagebar:not([hidden]) > a,
.gklp-stage-nav:not([hidden]) > button,
.gklp-stage-nav:not([hidden]) > a,
.ac-stagebar:not([hidden]) > button,
.ac-stagebar:not([hidden]) > a,
.truss-stagebar-v275:not([hidden]) > button,
.truss-stagebar-v275:not([hidden]) > a,
.rct-stagebar:not([hidden]) > button,
.rct-stagebar:not([hidden]) > a,
.sew-stagebar:not([hidden]) > button,
.sew-stagebar:not([hidden]) > a,
.paint-wizard-tabs:not([hidden]) > button,
.paint-wizard-tabs:not([hidden]) > a,
.rbr-stagebar:not([hidden]) > button,
.rbr-stagebar:not([hidden]) > a,
.hs-stagebar:not([hidden]) > button,
.hs-stagebar:not([hidden]) > a,
.slp-stage-nav:not([hidden]) > button,
.slp-stage-nav:not([hidden]) > a,
.rcw-stagebar:not([hidden]) > button,
.rcw-stagebar:not([hidden]) > a,
.grout-stagebar:not([hidden]) > button,
.grout-stagebar:not([hidden]) > a,
.rcf-stagebar:not([hidden]) > button,
.rcf-stagebar:not([hidden]) > a,
.snowload-stage-nav:not([hidden]) > button,
.snowload-stage-nav:not([hidden]) > a,
.rad-stepper:not([hidden]) > button,
.rad-stepper:not([hidden]) > a,
.pg-stage-nav:not([hidden]) > button,
.pg-stage-nav:not([hidden]) > a,
.sp-stage-nav:not([hidden]) > button,
.sp-stage-nav:not([hidden]) > a,
.cbl-stagebar:not([hidden]) > button,
.cbl-stagebar:not([hidden]) > a,
.soil-stagebar:not([hidden]) > button,
.soil-stagebar:not([hidden]) > a,
.ceil-stagebar-v317:not([hidden]) > button,
.ceil-stagebar-v317:not([hidden]) > a,
.lathpro-stage-nav:not([hidden]) > button,
.lathpro-stage-nav:not([hidden]) > a,
.cem-stagebar:not([hidden]) > button,
.cem-stagebar:not([hidden]) > a,
.hippro-stage-nav:not([hidden]) > button,
.hippro-stage-nav:not([hidden]) > a,
.electro-steps:not([hidden]) > button,
.electro-steps:not([hidden]) > a,
.bp-stage-nav:not([hidden]) > button,
.bp-stage-nav:not([hidden]) > a,
.rcc-stagebar:not([hidden]) > button,
.rcc-stagebar:not([hidden]) > a,
.sand-stagebar:not([hidden]) > button,
.sand-stagebar:not([hidden]) > a,
.foundationmaster-stage-nav:not([hidden]) > button,
.foundationmaster-stage-nav:not([hidden]) > a,
.loadmaster-stage-nav:not([hidden]) > button,
.loadmaster-stage-nav:not([hidden]) > a,
.beam-stagebar:not([hidden]) > button,
.beam-stagebar:not([hidden]) > a,
.win-stagebar:not([hidden]) > button,
.win-stagebar:not([hidden]) > a,
.siding-stagebar:not([hidden]) > button,
.siding-stagebar:not([hidden]) > a,
.vent-stage-nav:not([hidden]) > button,
.vent-stage-nav:not([hidden]) > a,
.mt-stage-nav:not([hidden]) > button,
.mt-stage-nav:not([hidden]) > a,
.th-stage-nav:not([hidden]) > button,
.th-stage-nav:not([hidden]) > a,
.vol-stagebar-v312:not([hidden]) > button,
.vol-stagebar-v312:not([hidden]) > a,
.walls-stagebar-v259:not([hidden]) > button,
.walls-stagebar-v259:not([hidden]) > a,
.pl-stagebar:not([hidden]) > button,
.pl-stagebar:not([hidden]) > a,
.mort-stagebar:not([hidden]) > button,
.mort-stagebar:not([hidden]) > a,
.framepro-stage-nav:not([hidden]) > button,
.framepro-stage-nav:not([hidden]) > a,
.can-stagebar-v292:not([hidden]) > button,
.can-stagebar-v292:not([hidden]) > a,
.osb-stagebar:not([hidden]) > button,
.osb-stagebar:not([hidden]) > a,
.slf-stagebar:not([hidden]) > button,
.slf-stagebar:not([hidden]) > a,
.met-stagebar:not([hidden]) > button,
.met-stagebar:not([hidden]) > a,
.irr-stagebar:not([hidden]) > button,
.irr-stagebar:not([hidden]) > a,
.lgt-stagebar:not([hidden]) > button,
.lgt-stagebar:not([hidden]) > a,
.fi-stage-nav:not([hidden]) > button,
.fi-stage-nav:not([hidden]) > a,
.ply-stagebar:not([hidden]) > button,
.ply-stagebar:not([hidden]) > a,
.rcs-stagebar:not([hidden]) > button,
.rcs-stagebar:not([hidden]) > a,
.wfh-stepper:not([hidden]) > button,
.wfh-stepper:not([hidden]) > a,
.adh-stagebar:not([hidden]) > button,
.adh-stagebar:not([hidden]) > a,
.hc-stage-nav:not([hidden]) > button,
.hc-stage-nav:not([hidden]) > a,
.door-stagebar:not([hidden]) > button,
.door-stagebar:not([hidden]) > a,
.wsup-stagebar:not([hidden]) > button,
.wsup-stagebar:not([hidden]) > a,
.hl-stepper:not([hidden]) > button,
.hl-stepper:not([hidden]) > a,
.mono-stagebar:not([hidden]) > button,
.mono-stagebar:not([hidden]) > a,
.room-stagebar-v272:not([hidden]) > button,
.room-stagebar-v272:not([hidden]) > a,
.ds-stagebar:not([hidden]) > button,
.ds-stagebar:not([hidden]) > a,
.windload-stage-nav:not([hidden]) > button,
.windload-stage-nav:not([hidden]) > a,
.wp-stagebar:not([hidden]) > button,
.wp-stagebar:not([hidden]) > a,
.roofmaster-stage-nav:not([hidden]) > button,
.roofmaster-stage-nav:not([hidden]) > a,
.sf-stage-nav:not([hidden]) > button,
.sf-stage-nav:not([hidden]) > a,
.calc-wizard-progress-v226:not([hidden]) > button,
.calc-wizard-progress-v226:not([hidden]) > a{
  grid-column:auto!important;
  grid-row:auto!important;
  min-width:0!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  min-height:48px!important;
  margin:0!important;
  box-sizing:border-box!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}

/* Shared v226 wizard: keep stage rail visually separated from fields. */
.calc-wizard-progress-v226{
  margin:20px 0 24px!important;
  padding:0!important;
}
.calc-wizard-progress-v226 button b{white-space:normal!important;overflow-wrap:anywhere!important}

/* Cable calculator used a 60-column/two-row algorithm. Reset it to one row. */
.cbl-stagebar > button{grid-column:auto!important;grid-row:auto!important}

/* Hero breadcrumbs/quick navigation returned inside hero for affected PTO tools. */
[data-portal-hero-placement="713"]{
  position:relative;
  z-index:4;
}
[data-portal-hero-placement="713"].portal-breadcrumb-v694{
  width:100%!important;
  max-width:none!important;
  margin:0 0 16px!important;
  padding:0!important;
}
[data-portal-hero-placement="713"][class*="quick-nav"]{
  width:100%!important;
  max-width:none!important;
  margin:22px 0 0!important;
  padding:0!important;
  display:flex!important;
  flex-wrap:wrap!important;
  overflow:visible!important;
}
[data-portal-hero-placement="713"][class*="quick-nav"] > a{
  white-space:normal!important;
}

@media (max-width:900px){
  .wb-stagebar:not([hidden]),
.aacp-stage-nav:not([hidden]),
.pipe-stagebar-v262:not([hidden]),
.gablepro-stage-nav:not([hidden]),
.rs-stage-nav:not([hidden]),
.sr-stage-nav:not([hidden]),
.rcb-stagebar:not([hidden]),
.ba-stage-nav:not([hidden]),
.guttermaster-stage-nav:not([hidden]),
.timber-stagebar:not([hidden]),
.formwork-stage-nav:not([hidden]),
.pp-stagebar-v282:not([hidden]),
.pf-stage-nav:not([hidden]),
.chim-stagebar:not([hidden]),
.slope-stagebar:not([hidden]),
.gklp-stage-nav:not([hidden]),
.ac-stagebar:not([hidden]),
.truss-stagebar-v275:not([hidden]),
.rct-stagebar:not([hidden]),
.sew-stagebar:not([hidden]),
.paint-wizard-tabs:not([hidden]),
.rbr-stagebar:not([hidden]),
.hs-stagebar:not([hidden]),
.slp-stage-nav:not([hidden]),
.rcw-stagebar:not([hidden]),
.grout-stagebar:not([hidden]),
.rcf-stagebar:not([hidden]),
.snowload-stage-nav:not([hidden]),
.rad-stepper:not([hidden]),
.pg-stage-nav:not([hidden]),
.sp-stage-nav:not([hidden]),
.cbl-stagebar:not([hidden]),
.soil-stagebar:not([hidden]),
.ceil-stagebar-v317:not([hidden]),
.lathpro-stage-nav:not([hidden]),
.cem-stagebar:not([hidden]),
.hippro-stage-nav:not([hidden]),
.electro-steps:not([hidden]),
.bp-stage-nav:not([hidden]),
.rcc-stagebar:not([hidden]),
.sand-stagebar:not([hidden]),
.foundationmaster-stage-nav:not([hidden]),
.loadmaster-stage-nav:not([hidden]),
.beam-stagebar:not([hidden]),
.win-stagebar:not([hidden]),
.siding-stagebar:not([hidden]),
.vent-stage-nav:not([hidden]),
.mt-stage-nav:not([hidden]),
.th-stage-nav:not([hidden]),
.vol-stagebar-v312:not([hidden]),
.walls-stagebar-v259:not([hidden]),
.pl-stagebar:not([hidden]),
.mort-stagebar:not([hidden]),
.framepro-stage-nav:not([hidden]),
.can-stagebar-v292:not([hidden]),
.osb-stagebar:not([hidden]),
.slf-stagebar:not([hidden]),
.met-stagebar:not([hidden]),
.irr-stagebar:not([hidden]),
.lgt-stagebar:not([hidden]),
.fi-stage-nav:not([hidden]),
.ply-stagebar:not([hidden]),
.rcs-stagebar:not([hidden]),
.wfh-stepper:not([hidden]),
.adh-stagebar:not([hidden]),
.hc-stage-nav:not([hidden]),
.door-stagebar:not([hidden]),
.wsup-stagebar:not([hidden]),
.hl-stepper:not([hidden]),
.mono-stagebar:not([hidden]),
.room-stagebar-v272:not([hidden]),
.ds-stagebar:not([hidden]),
.windload-stage-nav:not([hidden]),
.wp-stagebar:not([hidden]),
.roofmaster-stage-nav:not([hidden]),
.sf-stage-nav:not([hidden]),
.calc-wizard-progress-v226:not([hidden]){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:none!important;
    grid-auto-flow:row!important;
    grid-auto-columns:auto!important;
    overflow:visible!important;
  }
}

@media (max-width:520px){
  .wb-stagebar:not([hidden]),
.aacp-stage-nav:not([hidden]),
.pipe-stagebar-v262:not([hidden]),
.gablepro-stage-nav:not([hidden]),
.rs-stage-nav:not([hidden]),
.sr-stage-nav:not([hidden]),
.rcb-stagebar:not([hidden]),
.ba-stage-nav:not([hidden]),
.guttermaster-stage-nav:not([hidden]),
.timber-stagebar:not([hidden]),
.formwork-stage-nav:not([hidden]),
.pp-stagebar-v282:not([hidden]),
.pf-stage-nav:not([hidden]),
.chim-stagebar:not([hidden]),
.slope-stagebar:not([hidden]),
.gklp-stage-nav:not([hidden]),
.ac-stagebar:not([hidden]),
.truss-stagebar-v275:not([hidden]),
.rct-stagebar:not([hidden]),
.sew-stagebar:not([hidden]),
.paint-wizard-tabs:not([hidden]),
.rbr-stagebar:not([hidden]),
.hs-stagebar:not([hidden]),
.slp-stage-nav:not([hidden]),
.rcw-stagebar:not([hidden]),
.grout-stagebar:not([hidden]),
.rcf-stagebar:not([hidden]),
.snowload-stage-nav:not([hidden]),
.rad-stepper:not([hidden]),
.pg-stage-nav:not([hidden]),
.sp-stage-nav:not([hidden]),
.cbl-stagebar:not([hidden]),
.soil-stagebar:not([hidden]),
.ceil-stagebar-v317:not([hidden]),
.lathpro-stage-nav:not([hidden]),
.cem-stagebar:not([hidden]),
.hippro-stage-nav:not([hidden]),
.electro-steps:not([hidden]),
.bp-stage-nav:not([hidden]),
.rcc-stagebar:not([hidden]),
.sand-stagebar:not([hidden]),
.foundationmaster-stage-nav:not([hidden]),
.loadmaster-stage-nav:not([hidden]),
.beam-stagebar:not([hidden]),
.win-stagebar:not([hidden]),
.siding-stagebar:not([hidden]),
.vent-stage-nav:not([hidden]),
.mt-stage-nav:not([hidden]),
.th-stage-nav:not([hidden]),
.vol-stagebar-v312:not([hidden]),
.walls-stagebar-v259:not([hidden]),
.pl-stagebar:not([hidden]),
.mort-stagebar:not([hidden]),
.framepro-stage-nav:not([hidden]),
.can-stagebar-v292:not([hidden]),
.osb-stagebar:not([hidden]),
.slf-stagebar:not([hidden]),
.met-stagebar:not([hidden]),
.irr-stagebar:not([hidden]),
.lgt-stagebar:not([hidden]),
.fi-stage-nav:not([hidden]),
.ply-stagebar:not([hidden]),
.rcs-stagebar:not([hidden]),
.wfh-stepper:not([hidden]),
.adh-stagebar:not([hidden]),
.hc-stage-nav:not([hidden]),
.door-stagebar:not([hidden]),
.wsup-stagebar:not([hidden]),
.hl-stepper:not([hidden]),
.mono-stagebar:not([hidden]),
.room-stagebar-v272:not([hidden]),
.ds-stagebar:not([hidden]),
.windload-stage-nav:not([hidden]),
.wp-stagebar:not([hidden]),
.roofmaster-stage-nav:not([hidden]),
.sf-stage-nav:not([hidden]),
.calc-wizard-progress-v226:not([hidden]){
    grid-template-columns:1fr!important;
  }
  .wb-stagebar:not([hidden]) > button,
.wb-stagebar:not([hidden]) > a,
.aacp-stage-nav:not([hidden]) > button,
.aacp-stage-nav:not([hidden]) > a,
.pipe-stagebar-v262:not([hidden]) > button,
.pipe-stagebar-v262:not([hidden]) > a,
.gablepro-stage-nav:not([hidden]) > button,
.gablepro-stage-nav:not([hidden]) > a,
.rs-stage-nav:not([hidden]) > button,
.rs-stage-nav:not([hidden]) > a,
.sr-stage-nav:not([hidden]) > button,
.sr-stage-nav:not([hidden]) > a,
.rcb-stagebar:not([hidden]) > button,
.rcb-stagebar:not([hidden]) > a,
.ba-stage-nav:not([hidden]) > button,
.ba-stage-nav:not([hidden]) > a,
.guttermaster-stage-nav:not([hidden]) > button,
.guttermaster-stage-nav:not([hidden]) > a,
.timber-stagebar:not([hidden]) > button,
.timber-stagebar:not([hidden]) > a,
.formwork-stage-nav:not([hidden]) > button,
.formwork-stage-nav:not([hidden]) > a,
.pp-stagebar-v282:not([hidden]) > button,
.pp-stagebar-v282:not([hidden]) > a,
.pf-stage-nav:not([hidden]) > button,
.pf-stage-nav:not([hidden]) > a,
.chim-stagebar:not([hidden]) > button,
.chim-stagebar:not([hidden]) > a,
.slope-stagebar:not([hidden]) > button,
.slope-stagebar:not([hidden]) > a,
.gklp-stage-nav:not([hidden]) > button,
.gklp-stage-nav:not([hidden]) > a,
.ac-stagebar:not([hidden]) > button,
.ac-stagebar:not([hidden]) > a,
.truss-stagebar-v275:not([hidden]) > button,
.truss-stagebar-v275:not([hidden]) > a,
.rct-stagebar:not([hidden]) > button,
.rct-stagebar:not([hidden]) > a,
.sew-stagebar:not([hidden]) > button,
.sew-stagebar:not([hidden]) > a,
.paint-wizard-tabs:not([hidden]) > button,
.paint-wizard-tabs:not([hidden]) > a,
.rbr-stagebar:not([hidden]) > button,
.rbr-stagebar:not([hidden]) > a,
.hs-stagebar:not([hidden]) > button,
.hs-stagebar:not([hidden]) > a,
.slp-stage-nav:not([hidden]) > button,
.slp-stage-nav:not([hidden]) > a,
.rcw-stagebar:not([hidden]) > button,
.rcw-stagebar:not([hidden]) > a,
.grout-stagebar:not([hidden]) > button,
.grout-stagebar:not([hidden]) > a,
.rcf-stagebar:not([hidden]) > button,
.rcf-stagebar:not([hidden]) > a,
.snowload-stage-nav:not([hidden]) > button,
.snowload-stage-nav:not([hidden]) > a,
.rad-stepper:not([hidden]) > button,
.rad-stepper:not([hidden]) > a,
.pg-stage-nav:not([hidden]) > button,
.pg-stage-nav:not([hidden]) > a,
.sp-stage-nav:not([hidden]) > button,
.sp-stage-nav:not([hidden]) > a,
.cbl-stagebar:not([hidden]) > button,
.cbl-stagebar:not([hidden]) > a,
.soil-stagebar:not([hidden]) > button,
.soil-stagebar:not([hidden]) > a,
.ceil-stagebar-v317:not([hidden]) > button,
.ceil-stagebar-v317:not([hidden]) > a,
.lathpro-stage-nav:not([hidden]) > button,
.lathpro-stage-nav:not([hidden]) > a,
.cem-stagebar:not([hidden]) > button,
.cem-stagebar:not([hidden]) > a,
.hippro-stage-nav:not([hidden]) > button,
.hippro-stage-nav:not([hidden]) > a,
.electro-steps:not([hidden]) > button,
.electro-steps:not([hidden]) > a,
.bp-stage-nav:not([hidden]) > button,
.bp-stage-nav:not([hidden]) > a,
.rcc-stagebar:not([hidden]) > button,
.rcc-stagebar:not([hidden]) > a,
.sand-stagebar:not([hidden]) > button,
.sand-stagebar:not([hidden]) > a,
.foundationmaster-stage-nav:not([hidden]) > button,
.foundationmaster-stage-nav:not([hidden]) > a,
.loadmaster-stage-nav:not([hidden]) > button,
.loadmaster-stage-nav:not([hidden]) > a,
.beam-stagebar:not([hidden]) > button,
.beam-stagebar:not([hidden]) > a,
.win-stagebar:not([hidden]) > button,
.win-stagebar:not([hidden]) > a,
.siding-stagebar:not([hidden]) > button,
.siding-stagebar:not([hidden]) > a,
.vent-stage-nav:not([hidden]) > button,
.vent-stage-nav:not([hidden]) > a,
.mt-stage-nav:not([hidden]) > button,
.mt-stage-nav:not([hidden]) > a,
.th-stage-nav:not([hidden]) > button,
.th-stage-nav:not([hidden]) > a,
.vol-stagebar-v312:not([hidden]) > button,
.vol-stagebar-v312:not([hidden]) > a,
.walls-stagebar-v259:not([hidden]) > button,
.walls-stagebar-v259:not([hidden]) > a,
.pl-stagebar:not([hidden]) > button,
.pl-stagebar:not([hidden]) > a,
.mort-stagebar:not([hidden]) > button,
.mort-stagebar:not([hidden]) > a,
.framepro-stage-nav:not([hidden]) > button,
.framepro-stage-nav:not([hidden]) > a,
.can-stagebar-v292:not([hidden]) > button,
.can-stagebar-v292:not([hidden]) > a,
.osb-stagebar:not([hidden]) > button,
.osb-stagebar:not([hidden]) > a,
.slf-stagebar:not([hidden]) > button,
.slf-stagebar:not([hidden]) > a,
.met-stagebar:not([hidden]) > button,
.met-stagebar:not([hidden]) > a,
.irr-stagebar:not([hidden]) > button,
.irr-stagebar:not([hidden]) > a,
.lgt-stagebar:not([hidden]) > button,
.lgt-stagebar:not([hidden]) > a,
.fi-stage-nav:not([hidden]) > button,
.fi-stage-nav:not([hidden]) > a,
.ply-stagebar:not([hidden]) > button,
.ply-stagebar:not([hidden]) > a,
.rcs-stagebar:not([hidden]) > button,
.rcs-stagebar:not([hidden]) > a,
.wfh-stepper:not([hidden]) > button,
.wfh-stepper:not([hidden]) > a,
.adh-stagebar:not([hidden]) > button,
.adh-stagebar:not([hidden]) > a,
.hc-stage-nav:not([hidden]) > button,
.hc-stage-nav:not([hidden]) > a,
.door-stagebar:not([hidden]) > button,
.door-stagebar:not([hidden]) > a,
.wsup-stagebar:not([hidden]) > button,
.wsup-stagebar:not([hidden]) > a,
.hl-stepper:not([hidden]) > button,
.hl-stepper:not([hidden]) > a,
.mono-stagebar:not([hidden]) > button,
.mono-stagebar:not([hidden]) > a,
.room-stagebar-v272:not([hidden]) > button,
.room-stagebar-v272:not([hidden]) > a,
.ds-stagebar:not([hidden]) > button,
.ds-stagebar:not([hidden]) > a,
.windload-stage-nav:not([hidden]) > button,
.windload-stage-nav:not([hidden]) > a,
.wp-stagebar:not([hidden]) > button,
.wp-stagebar:not([hidden]) > a,
.roofmaster-stage-nav:not([hidden]) > button,
.roofmaster-stage-nav:not([hidden]) > a,
.sf-stage-nav:not([hidden]) > button,
.sf-stage-nav:not([hidden]) > a,
.calc-wizard-progress-v226:not([hidden]) > button,
.calc-wizard-progress-v226:not([hidden]) > a{
    min-height:44px!important;
  }
}

@media print{
  .calc-wizard-progress-v226{display:none!important}
}


/* ---- portal-calculator-top-v714.css ---- */
/* portal-calculator-top-v714
   Unified calculator top controls.
   - desktop: compact single-row stage rail above the work area;
   - tablet/mobile: adaptive grid without horizontal overflow;
   - stable Simple / PRO segmented control;
   - final override loaded after calculator-local and v713 styles.
*/

:root{
  --portal-step-gap-v714:8px;
  --portal-step-radius-v714:12px;
  --portal-step-border-v714:rgba(20,74,53,.14);
  --portal-step-bg-v714:#fff;
  --portal-step-active-bg-v714:#e7f5f2;
  --portal-step-active-border-v714:rgba(12,129,118,.36);
  --portal-step-done-bg-v714:#f3f8f6;
  --portal-step-text-v714:#28433d;
  --portal-step-muted-v714:#62756f;
}

/* Stable segmented mode switch where calculators expose the common label. */
main [aria-label="Режим расчёта"]{
  display:inline-grid!important;
  grid-auto-flow:column!important;
  grid-auto-columns:minmax(86px,auto)!important;
  align-items:stretch!important;
  gap:4px!important;
  min-width:0!important;
  padding:5px!important;
  border-radius:14px!important;
  background:#edf3f1!important;
  box-sizing:border-box!important;
}
main [aria-label="Режим расчёта"] > button{
  min-width:0!important;
  min-height:40px!important;
  height:auto!important;
  margin:0!important;
  padding:8px 14px!important;
  border-radius:10px!important;
  white-space:nowrap!important;
  line-height:1.1!important;
}

/* Real step indicators. Bottom Previous/Next controls named *-stage-nav are
   intentionally excluded unless they carry the `simple` stage-rail marker. */
main :where(
  [class*="stagebar"],
  [class*="stage-nav"].simple,
  .rad-stepper,
  .wfh-stepper,
  .hl-stepper,
  .electro-steps,
  .paint-wizard-tabs,
  .calc-wizard-progress-v226
):not([hidden]){
  display:grid!important;
  grid-template-columns:none!important;
  grid-template-rows:minmax(44px,auto)!important;
  grid-auto-flow:column!important;
  grid-auto-columns:minmax(0,1fr)!important;
  align-items:stretch!important;
  gap:var(--portal-step-gap-v714)!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:44px!important;
  margin:10px 0 16px!important;
  padding:0!important;
  overflow:visible!important;
  box-sizing:border-box!important;
  position:relative!important;
  z-index:2!important;
}

main :where(
  [class*="stagebar"],
  [class*="stage-nav"].simple,
  .rad-stepper,
  .wfh-stepper,
  .hl-stepper,
  .electro-steps,
  .paint-wizard-tabs,
  .calc-wizard-progress-v226
):not([hidden]) > :where(button,a,[role="button"]){
  grid-column:auto!important;
  grid-row:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:44px!important;
  height:100%!important;
  margin:0!important;
  padding:8px 10px!important;
  border:1px solid var(--portal-step-border-v714)!important;
  border-radius:var(--portal-step-radius-v714)!important;
  background:var(--portal-step-bg-v714)!important;
  color:var(--portal-step-text-v714)!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
  font-size:13px!important;
  font-weight:700!important;
  line-height:1.15!important;
  text-align:left!important;
  overflow:hidden!important;
  transform:none!important;
}

main :where(
  [class*="stagebar"],
  [class*="stage-nav"].simple,
  .rad-stepper,
  .wfh-stepper,
  .hl-stepper,
  .electro-steps,
  .paint-wizard-tabs,
  .calc-wizard-progress-v226
) > :where(button,a,[role="button"]) > b{
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:25px!important;
  min-height:25px!important;
  padding:3px 5px!important;
  border-radius:8px!important;
  background:#edf4f2!important;
  color:var(--portal-step-muted-v714)!important;
  font-size:12px!important;
  line-height:1!important;
}

main :where(
  [class*="stagebar"],
  [class*="stage-nav"].simple,
  .rad-stepper,
  .wfh-stepper,
  .hl-stepper,
  .electro-steps,
  .paint-wizard-tabs,
  .calc-wizard-progress-v226
) > :where(button,a,[role="button"]) > span{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

main :where(
  [class*="stagebar"],
  [class*="stage-nav"].simple,
  .rad-stepper,
  .wfh-stepper,
  .hl-stepper,
  .electro-steps,
  .paint-wizard-tabs,
  .calc-wizard-progress-v226
) > :where(button,a,[role="button"]).is-active,
main :where(
  [class*="stagebar"],
  [class*="stage-nav"].simple,
  .rad-stepper,
  .wfh-stepper,
  .hl-stepper,
  .electro-steps,
  .paint-wizard-tabs,
  .calc-wizard-progress-v226
) > :where(button,a,[role="button"])[aria-current="step"],
main :where(
  [class*="stagebar"],
  [class*="stage-nav"].simple,
  .rad-stepper,
  .wfh-stepper,
  .hl-stepper,
  .electro-steps,
  .paint-wizard-tabs,
  .calc-wizard-progress-v226
) > :where(button,a,[role="button"])[aria-selected="true"]{
  border-color:var(--portal-step-active-border-v714)!important;
  background:var(--portal-step-active-bg-v714)!important;
  color:#0d6f67!important;
}

main :where(
  [class*="stagebar"],
  [class*="stage-nav"].simple,
  .rad-stepper,
  .wfh-stepper,
  .hl-stepper,
  .electro-steps,
  .paint-wizard-tabs,
  .calc-wizard-progress-v226
) > :where(button,a,[role="button"]).is-done{
  background:var(--portal-step-done-bg-v714)!important;
}

main :where(
  [class*="stagebar"],
  [class*="stage-nav"].simple,
  .rad-stepper,
  .wfh-stepper,
  .hl-stepper,
  .electro-steps,
  .paint-wizard-tabs,
  .calc-wizard-progress-v226
) > :where(button,a,[role="button"]):focus-visible{
  outline:3px solid rgba(16,130,117,.22)!important;
  outline-offset:2px!important;
}

/* Inline style used by some legacy stagebars must not restore the old rows. */
.cbl-stagebar[data-stage-rows],
.cbl-stagebar[data-stage-count]{
  grid-template-columns:none!important;
  grid-template-rows:minmax(44px,auto)!important;
}
.cbl-stagebar > button[style]{
  grid-column:auto!important;
  grid-row:auto!important;
}

@media (max-width:900px){
  main :where(
    [class*="stagebar"],
    [class*="stage-nav"].simple,
    .rad-stepper,
    .wfh-stepper,
    .hl-stepper,
    .electro-steps,
    .paint-wizard-tabs,
    .calc-wizard-progress-v226
  ):not([hidden]){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:none!important;
    grid-auto-flow:row!important;
    grid-auto-columns:auto!important;
    min-height:0!important;
  }
}

@media (max-width:680px){
  main [aria-label="Режим расчёта"]{
    width:100%!important;
    grid-auto-columns:1fr!important;
  }
  main [aria-label="Режим расчёта"] > button{
    min-height:42px!important;
  }
  main :where(
    [class*="stagebar"],
    [class*="stage-nav"].simple,
    .rad-stepper,
    .wfh-stepper,
    .hl-stepper,
    .electro-steps,
    .paint-wizard-tabs,
    .calc-wizard-progress-v226
  ):not([hidden]){
    gap:7px!important;
    margin-top:8px!important;
    margin-bottom:14px!important;
  }
  main :where(
    [class*="stagebar"],
    [class*="stage-nav"].simple,
    .rad-stepper,
    .wfh-stepper,
    .hl-stepper,
    .electro-steps,
    .paint-wizard-tabs,
    .calc-wizard-progress-v226
  ) > :where(button,a,[role="button"]){
    min-height:42px!important;
    padding:8px 9px!important;
    font-size:12.5px!important;
  }
}

@media (max-width:480px){
  main :where(
    [class*="stagebar"],
    [class*="stage-nav"].simple,
    .rad-stepper,
    .wfh-stepper,
    .hl-stepper,
    .electro-steps,
    .paint-wizard-tabs,
    .calc-wizard-progress-v226
  ):not([hidden]){
    grid-template-columns:1fr!important;
  }
}

@media (prefers-reduced-motion:reduce){
  main :where([class*="stagebar"],[class*="stage-nav"].simple,.rad-stepper,.wfh-stepper,.hl-stepper,.electro-steps,.paint-wizard-tabs,.calc-wizard-progress-v226) *{
    transition:none!important;
    scroll-behavior:auto!important;
  }
}


/* ---- portal-calculator-work-v716.css ---- */
/* portal-calculator-work-v716
   Regression-safe calculator work-area layer.
   IMPORTANT: stateful stage/step panels are deliberately NOT geometry-normalized.
   Their display/visibility/size is owned by each calculator's own stage controller.
*/

:root{
  --portal-work-gap-v716:16px;
  --portal-work-border-v716:rgba(20,74,53,.13);
  --portal-work-focus-v716:rgba(14,124,111,.20);
  --portal-work-primary-v716:#0d786f;
  --portal-work-primary-hover-v716:#09685f;
  --portal-work-muted-v716:#f3f7f6;
}

/* Safe outer geometry only. Never target *-stage-panel, *-step-panel,
   *-stage-content, *-step-content or [data-stage] here. */
main :where(
  form,
  [class*="workbench"],
  [class*="workstation"]
){
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}

/* Grids may shrink, but stage state containers are left untouched. */
main :where(
  [class*="-grid"],
  [class*="fields-grid"],
  [class*="input-grid"],
  [class*="-fields"]
) > *{
  min-width:0!important;
  box-sizing:border-box!important;
}

main :where(
  [class*="-field"],
  .field,
  .field-group
){
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}

main :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea
){
  max-width:100%!important;
  box-sizing:border-box!important;
}

/* Respect semantic hidden state even if a legacy visual rule has stronger
   display declarations. This is intentionally limited to calculator stage
   containers and does not change active-state logic. */
main :where(
  [class*="-stage-panel"],
  [class*="-step-panel"],
  [class*="-stage-content"],
  [class*="-step-content"],
  [data-stage],
  [data-step]
)[hidden],
#stairCalculator .stair-control-section[hidden]{
  display:none!important;
}

main :where(input,select,textarea,button,a):focus-visible{
  outline:3px solid var(--portal-work-focus-v716)!important;
  outline-offset:2px!important;
}

/* Only action rows explicitly audited and marked in HTML are normalized. */
main [data-portal-actionbar-v715="1"]{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  flex-wrap:wrap!important;
  gap:10px 12px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:54px!important;
  margin:18px 0 0!important;
  padding:14px 0 0!important;
  border-top:1px solid var(--portal-work-border-v716)!important;
  box-sizing:border-box!important;
  position:relative!important;
  z-index:1!important;
}

main [data-portal-actionbar-v715="1"] [data-portal-action-v715]{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:126px!important;
  min-height:42px!important;
  max-width:100%!important;
  margin:0!important;
  padding:9px 16px!important;
  border-radius:11px!important;
  box-sizing:border-box!important;
  font-weight:700!important;
  line-height:1.15!important;
  text-align:center!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  text-decoration:none!important;
}

main [data-portal-actionbar-v715="1"] [data-portal-action-v715="back"]{margin-right:auto!important}
main [data-portal-actionbar-v715="1"] [data-portal-action-v715="next"]{margin-left:auto!important}

main [data-portal-actionbar-v715="1"] button[data-portal-action-v715]:not([class]),
main [data-portal-actionbar-v715="1"] a[data-portal-action-v715]:not([class]){
  border:1px solid var(--portal-work-border-v716)!important;
  background:#fff!important;
  color:#24443d!important;
}
main [data-portal-actionbar-v715="1"] button[data-portal-action-v715="next"]:not([class]),
main [data-portal-actionbar-v715="1"] a[data-portal-action-v715="next"]:not([class]){
  border-color:var(--portal-work-primary-v716)!important;
  background:var(--portal-work-primary-v716)!important;
  color:#fff!important;
}
main [data-portal-actionbar-v715="1"] [hidden]{display:none!important}
main [data-portal-actionbar-v715="1"] :disabled,
main [data-portal-actionbar-v715="1"] [aria-disabled="true"]{cursor:not-allowed!important}

/* Wooden staircase: v716 promotes the existing mobile wizard to the canonical
   step controller on every viewport. On desktop the stage rail sits above the
   whole workbench in one row. */
@media (min-width:821px){
  #stairCalculator.stair-mobile-steps-enabled > .stair-mobile-wizard{
    display:block!important;
    position:static!important;
    top:auto!important;
    z-index:3!important;
    width:100%!important;
    padding:12px 16px!important;
    border-bottom:1px solid #e3ebe7!important;
    background:#fbfcfb!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    box-sizing:border-box!important;
  }
  #stairCalculator .stair-mobile-wizard-head,
  #stairCalculator .stair-mobile-progress{display:none!important}
  #stairCalculator .stair-mobile-chips{
    display:grid!important;
    grid-template-columns:repeat(8,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
  }
  #stairCalculator .stair-mobile-chip{
    min-width:0!important;
    min-height:46px!important;
    padding:7px 6px!important;
    border:1px solid rgba(20,74,53,.14)!important;
    border-radius:11px!important;
    background:#fff!important;
    color:#5d706a!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:7px!important;
    text-align:left!important;
    box-shadow:none!important;
    cursor:pointer!important;
  }
  #stairCalculator .stair-mobile-chip span{
    flex:0 0 auto!important;
    width:24px!important;
    height:24px!important;
    border-radius:8px!important;
    display:grid!important;
    place-items:center!important;
    background:#edf4f2!important;
    color:#62756f!important;
    font-size:11px!important;
    font-weight:900!important;
  }
  #stairCalculator .stair-mobile-chip b{
    min-width:0!important;
    font-size:11px!important;
    line-height:1.1!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  #stairCalculator .stair-mobile-chip.is-done{background:#f4f8f6!important;border-color:#d6e5de!important}
  #stairCalculator .stair-mobile-chip.is-active{background:#e7f5f2!important;border-color:rgba(12,129,118,.36)!important;color:#164e46!important}
  #stairCalculator .stair-mobile-chip.is-active span{background:#0d786f!important;color:#fff!important}
  #stairCalculator .stair-mobile-chip:nth-child(7){grid-column:auto!important}

  #stairCalculator.stair-mobile-steps-enabled .stair-controls{
    background:#fbfcfb!important;
  }
  #stairCalculator.stair-mobile-steps-enabled .stair-control-section{
    margin:0!important;
    padding:23px 24px!important;
    border:0!important;
    border-bottom:0!important;
    border-radius:0!important;
    background:#fbfcfb!important;
    box-shadow:none!important;
  }
  #stairCalculator.stair-mobile-steps-enabled .stair-control-section[hidden]{display:none!important}

  #stairCalculator .stair-mobile-actions{
    display:flex!important;
    position:static!important;
    bottom:auto!important;
    z-index:2!important;
    gap:10px!important;
    justify-content:space-between!important;
    padding:14px 24px 18px!important;
    border-top:1px solid #e3ebe7!important;
    background:#fbfcfb!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
  }
  #stairCalculator .stair-mobile-actions .btn{
    width:auto!important;
    min-width:126px!important;
    min-height:42px!important;
    margin:0!important;
    justify-content:center!important;
  }
  #stairCalculator .stair-mobile-actions .stair-mobile-next{margin-left:auto!important}
}

@media (max-width:680px){
  main [data-portal-actionbar-v715="1"]{
    gap:9px!important;
    min-height:0!important;
    margin-top:14px!important;
    padding-top:12px!important;
  }
  main [data-portal-actionbar-v715="1"] [data-portal-action-v715]{
    flex:1 1 calc(50% - 5px)!important;
    min-width:0!important;
    min-height:44px!important;
    padding:9px 12px!important;
  }
}

@media (max-width:480px){
  main [data-portal-actionbar-v715="1"]{display:grid!important;grid-template-columns:1fr!important}
  main [data-portal-actionbar-v715="1"] [data-portal-action-v715]{width:100%!important;min-width:0!important;margin-left:0!important;margin-right:0!important}
  main [data-portal-actionbar-v715="1"] [data-portal-action-v715="back"]{order:1!important}
  main [data-portal-actionbar-v715="1"] [data-portal-action-v715="next"]{order:2!important}
}

@media (prefers-reduced-motion:reduce){
  main [data-portal-actionbar-v715="1"] *,
  main :where(input,select,textarea,button,a){transition:none!important;scroll-behavior:auto!important}
}


/* ---- portal-stage-safety-v718.css ---- */
/* portal-stage-safety-v718
   Regression guard for all calculator wizards.
   `hidden` is semantic state owned by each calculator's controller; no later
   visual stylesheet is allowed to make a hidden calculator element visible.
   No active-stage geometry or calculation behavior is changed here.
*/
main [hidden]{display:none!important}


/* ---- portal-ledger-boundary-v719.css ---- */
/* portal-ledger-boundary-v719
   Structural contract for calculator output:
   live/visual model is an independent block; material ledger is a separate
   sibling-level calculation block. This layer intentionally does not change
   calculator formulas, tabs or local component dimensions. */

[data-portal-visual-root-v719="1"]{
  position:relative;
  min-width:0;
  isolation:isolate;
}

[data-portal-ledger-root-v719="1"]{
  position:relative;
  min-width:0;
  clear:both;
  isolation:isolate;
  scroll-margin-top:24px;
}

/* Dynamic ledger tabs and their ads must stay bounded by the ledger root. */
[data-portal-ledger-root-v719="1"] .ledger-tabs-wrap-v142,
[data-portal-ledger-root-v719="1"] .site-ad-v259--ledger-tab-v142{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}


@media print{
  [data-portal-ledger-root-v719="1"]{isolation:auto;scroll-margin-top:0}
  [data-portal-visual-root-v719="1"]{isolation:auto}
}


/* ---- portal-print-v720.css ---- */
/* portal-print-v720 — common print safety for calculator pages.
   Custom full-ledger export remains authoritative; this layer protects native
   browser printing from ads, cross-promo and horizontal overflow. */
@media print {
  [data-ad-block-id],
  [data-stroykalk-dynamic-ad],
  .site-ad-v259,
  .portal-crosspromo-v704,
  .portal-crosspromo-ad-v704,
  .ya-context-cb,
  .yandex_rtb,
  .full-ledger-export-actions-v429,
  .calc-export-actions-v178,
  [data-ap-blacklist="true"]:not(#fullLedgerPrintHostV429):not(#compactPrintExportV180) {
    display:none!important;
  }

  html,body{overflow:visible!important;max-width:none!important;background:#fff!important}
  table{max-width:100%!important}
  img,svg,canvas{max-width:100%!important}
  pre,code,td,th{overflow-wrap:anywhere!important}
  thead{display:table-header-group}
  tfoot{display:table-footer-group}
  tr{break-inside:avoid-page;page-break-inside:avoid}
  h1,h2,h3,h4{break-after:avoid-page;page-break-after:avoid}
  [hidden]{display:none!important}
}


/* ---- portal-results-v721.css ---- */
/* portal-results-v721
   Safe presentation contract for calculator results.
   IMPORTANT: this layer intentionally does not change display, visibility,
   position, height, stage activity, tabs, formulas or calculation logic. */

body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
  [id="results"],
  [id="report"],
  [id$="Results"],
  [id$="Report"],
  [id$="result"],
  [id$="Result"],
  [class~="results"],
  [class*="-results"],
  [class*="-report"],
  [class*="result-preview"],
  [class*="result-grid"],
  [class*="result-cards"],
  [class*="-kpis"],
  [class*="-summary"],
  [class*="-totals"],
  [class*="-total"]
){
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  overflow-wrap:anywhere;
}

body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
  [class*="result-grid"],
  [class*="result-kpis"],
  [class*="result-cards"],
  [class*="summary-grid"],
  [class*="-kpis"],
  [class*="-totals"]
) > *{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}

body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
  [class*="result-card"],
  [class*="summary-card"],
  [class*="status-card"],
  [class*="result-main"],
  [class*="result-hero"],
  [class*="-kpi"]
){
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  border-radius:max(10px,min(16px,1.1vw));
}

body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
  [class*="result-status"],
  [class*="-status"],
  [class*="check-status"]
){
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  overflow-wrap:anywhere;
  border-radius:12px;
}

body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
  [class*="result"],
  [class*="summary"],
  [class*="-kpi"],
  [class*="-total"]
) :where(strong,b,output,[class*="value"],[class*="number"]){
  font-variant-numeric:tabular-nums;
}

body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
  [id="results"],
  [id$="Results"],
  [id$="Report"],
  [class*="-results"],
  [class*="-report"]
) :where(h2,h3){
  max-width:100%;
  overflow-wrap:anywhere;
  text-wrap:balance;
}

body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
  [class*="result-table-wrap"],
  [class*="results-table-wrap"],
  [class*="report-table-wrap"]
){
  max-width:100%;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
}

body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
  [id="results"],
  [id$="Results"],
  [id$="Report"],
  [class*="-results"],
  [class*="-report"]
) table{
  max-width:100%;
  border-collapse:collapse;
}

body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
  [id="results"],
  [id$="Results"],
  [id$="Report"],
  [class*="-results"],
  [class*="-report"]
) :where(img,svg,canvas){
  max-width:100%;
}

@media (max-width:760px){
  body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
    [class*="result-grid"],
    [class*="result-kpis"],
    [class*="summary-grid"]
  ){
    grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));
  }

  body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
    [class*="result-cards"],
    [class*="-kpis"],
    [class*="-totals"]
  ){
    min-width:0;
    max-width:100%;
  }
}

@media (max-width:480px){
  body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
    [class*="result-grid"],
    [class*="result-kpis"],
    [class*="summary-grid"]
  ){
    grid-template-columns:minmax(0,1fr);
  }

  body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
    [class*="result-card"],
    [class*="summary-card"],
    [class*="status-card"],
    [class*="result-main"],
    [class*="result-hero"]
  ){
    max-width:100%;
  }
}

@media print{
  body[data-portal-page-type="calculator"][data-portal-results-version="721"] :where(
    [id="results"],
    [id$="Results"],
    [id$="Report"],
    [class*="-results"],
    [class*="-report"]
  ){
    max-width:100%;
    overflow-wrap:normal;
  }
}


/* ---- portal-mobile-v722.css ---- */
/* portal-mobile-v722
   Mobile stability layer for calculator pages.
   Scope: <= 768px only. It does NOT change stage visibility, active state,
   calculation logic, fixed heights or positioning of calculator steps. */

@media (max-width:768px){
  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main,
  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main > *,
  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main form,
  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main fieldset,
  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] [data-portal-visual-root-v719="1"],
  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] [data-portal-ledger-root-v719="1"]{
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
    select,
    textarea
  ){
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    font-size:max(16px,1em);
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(
    [class$="-unit"],
    [class*="-unit "],
    [class*="input-unit"],
    [class*="-input-unit"]
  ){
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(
    .fields-grid,
    [class*="-field-grid"],
    [class*="-form-grid"],
    [class$="-fields"].two,
    [class$="-fields"].three,
    [class$="-fields"].four,
    [class*="-grid"].two,
    [class*="-grid"].three,
    [class*="-grid"].four
  ){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(
    .fields-grid,
    [class*="-field-grid"],
    [class*="-form-grid"],
    [class$="-fields"].two,
    [class$="-fields"].three,
    [class$="-fields"].four,
    [class*="-grid"].two,
    [class*="-grid"].three,
    [class*="-grid"].four
  ) > *{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(
    .portal-breadcrumb-v694,
    [class*="breadcrumbs"],
    [class*="hero-tags"],
    [class*="hero-list"],
    [class*="hero-badges"],
    [class*="hero-mini-badges"],
    [class*="quick-nav"]
  ){
    min-width:0!important;
    max-width:100%!important;
    flex-wrap:wrap!important;
    overflow-wrap:anywhere;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(
    [role="tablist"],
    [class*="-tabs"],
    [class*="__tabs"]
  ){
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    flex-wrap:wrap;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(
    [role="tablist"],
    [class*="-tabs"],
    [class*="__tabs"]
  ) > :where(button,a,[role="tab"]){
    min-width:0;
    max-width:100%;
    overflow-wrap:anywhere;
    white-space:normal;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(
    img,
    svg,
    canvas,
    video,
    iframe
  ){
    max-width:100%!important;
    box-sizing:border-box;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(
    div,
    section,
    article
  ):has(> table){
    min-width:0!important;
    max-width:100%!important;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
    box-sizing:border-box!important;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(pre,code){
    max-width:100%;
  }
  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main pre{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main legend{
    max-width:100%;
    white-space:normal;
    overflow-wrap:anywhere;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] :where(
    dialog,
    [role="dialog"],
    [class*="modal"]
  ){
    max-width:calc(100vw - 24px)!important;
    max-height:calc(100dvh - 24px)!important;
    box-sizing:border-box!important;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(button,a.btn,[role="button"]){
    max-width:100%;
    overflow-wrap:anywhere;
  }
}

@media (max-width:520px){
  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(
    .fields-grid,
    [class*="-field-grid"],
    [class*="-form-grid"],
    [class$="-fields"].two,
    [class$="-fields"].three,
    [class$="-fields"].four,
    [class*="-grid"].two,
    [class*="-grid"].three,
    [class*="-grid"].four
  ){
    grid-template-columns:minmax(0,1fr)!important;
  }

  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] main :where(
    [data-portal-actionbar-v715="1"]
  ){
    padding-bottom:max(12px,env(safe-area-inset-bottom))!important;
  }
}

@media print{
  body[data-portal-page-type="calculator"][data-portal-mobile-version="722"] :where(dialog,[role="dialog"],[class*="modal"]){
    max-width:none!important;
    max-height:none!important;
  }
}


/* ---- portal-controls-v724.css ---- */
/* portal-controls-v724
   Unified Simple/PRO mode switch and calculator stage rail.
   Loaded after calculator-local styles; changes presentation/state only.
*/
:root{
  --pc724-green:#146c5a;
  --pc724-green-dark:#0e594a;
  --pc724-green-soft:#e8f4f0;
  --pc724-border:#d6e3de;
  --pc724-ink:#23362f;
  --pc724-muted:#687a73;
  --pc724-bg:#edf3f1;
  --pc724-radius:12px;
}

/* ===== Simple / PRO ===== */
[data-portal-mode-group-v724="true"]{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(88px,1fr))!important;
  grid-auto-flow:column!important;
  gap:4px!important;
  width:min(100%,232px)!important;
  min-width:196px!important;
  max-width:232px!important;
  margin:0!important;
  padding:5px!important;
  border:1px solid rgba(20,108,90,.08)!important;
  border-radius:14px!important;
  background:var(--pc724-bg)!important;
  box-sizing:border-box!important;
  align-items:stretch!important;
  box-shadow:none!important;
}
[data-portal-mode-group-v724="true"] > [data-portal-mode-v724]{
  appearance:none!important;
  -webkit-appearance:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  height:42px!important;
  margin:0!important;
  padding:0 12px!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  background:transparent!important;
  color:#596b65!important;
  box-shadow:none!important;
  font-family:inherit!important;
  font-size:0!important;
  font-weight:800!important;
  line-height:1!important;
  letter-spacing:0!important;
  text-transform:none!important;
  text-align:center!important;
  white-space:nowrap!important;
  cursor:pointer!important;
  transition:background-color .14s ease,border-color .14s ease,color .14s ease,box-shadow .14s ease,transform .08s ease!important;
  overflow:hidden!important;
}
[data-portal-mode-group-v724="true"] > [data-portal-mode-v724] > *{display:none!important}
[data-portal-mode-v724="simple"]::before{content:"Простой"!important}
[data-portal-mode-v724="pro"]::before{content:"PRO"!important}
[data-portal-mode-group-v724="true"] > [data-portal-mode-v724]::before{
  display:block!important;
  font-size:15px!important;
  font-weight:800!important;
  line-height:1!important;
  letter-spacing:.01em!important;
}
[data-portal-mode-group-v724="true"] > [data-portal-mode-v724]:hover:not(.portal-selected-v724):not(.active):not(.is-active){
  background:rgba(255,255,255,.68)!important;
  color:var(--pc724-ink)!important;
}
[data-portal-mode-group-v724="true"] > [data-portal-mode-v724].portal-selected-v724,
[data-portal-mode-group-v724="true"] > [data-portal-mode-v724].active,
[data-portal-mode-group-v724="true"] > [data-portal-mode-v724].is-active,
[data-portal-mode-group-v724="true"] > [data-portal-mode-v724][aria-pressed="true"]{
  border-color:var(--pc724-green)!important;
  background:var(--pc724-green)!important;
  color:#fff!important;
  box-shadow:inset 0 2px 4px rgba(0,0,0,.18),0 1px 1px rgba(20,108,90,.12)!important;
  transform:translateY(1px)!important;
}
[data-portal-mode-group-v724="true"] > [data-portal-mode-v724]:focus-visible{
  outline:3px solid rgba(20,108,90,.22)!important;
  outline-offset:2px!important;
}

/* ===== Calculation stages ===== */
[data-portal-stage-rail-v724="true"]:not([hidden]){
  display:grid!important;
  grid-template-columns:none!important;
  grid-template-rows:minmax(48px,auto)!important;
  grid-auto-flow:column!important;
  grid-auto-columns:minmax(0,1fr)!important;
  gap:8px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:48px!important;
  margin:10px 0 16px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  overflow:visible!important;
  box-sizing:border-box!important;
  align-items:stretch!important;
  position:relative!important;
}
[data-portal-stage-rail-v724="true"]:not([hidden]) > :where(li,div){
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  display:flex!important;
}
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]){
  appearance:none!important;
  -webkit-appearance:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:48px!important;
  height:auto!important;
  margin:0!important;
  padding:9px 10px!important;
  border:1px solid var(--pc724-border)!important;
  border-radius:var(--pc724-radius)!important;
  background:#fff!important;
  color:var(--pc724-ink)!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
  font-family:inherit!important;
  font-size:12.5px!important;
  font-weight:750!important;
  line-height:1.15!important;
  text-align:left!important;
  text-decoration:none!important;
  cursor:pointer!important;
  overflow:hidden!important;
  transform:none!important;
  transition:background-color .14s ease,border-color .14s ease,color .14s ease,box-shadow .14s ease,transform .08s ease!important;
}
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]) :where(b,strong,i):first-child{
  flex:0 0 auto!important;
}
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]) > span{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]):hover:not(.portal-selected-v724):not(.active):not(.is-active){
  border-color:#bed5cd!important;
  background:#f7faf9!important;
}
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).is-done,
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).done,
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).completed{
  border-color:#d4e4de!important;
  background:#f2f8f5!important;
  color:#48625a!important;
}
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).portal-selected-v724,
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).active,
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).is-active,
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).selected,
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"])[aria-current="step"],
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"])[aria-selected="true"]{
  border-color:var(--pc724-green-dark)!important;
  background:var(--pc724-green)!important;
  color:#fff!important;
  box-shadow:inset 0 2px 4px rgba(0,0,0,.18),0 1px 1px rgba(20,108,90,.12)!important;
  transform:translateY(1px)!important;
}
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).portal-selected-v724 :where(b,strong,span,i),
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).active :where(b,strong,span,i),
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).is-active :where(b,strong,span,i),
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"])[aria-current="step"] :where(b,strong,span,i),
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"])[aria-selected="true"] :where(b,strong,span,i){
  color:inherit!important;
}
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]):focus-visible{
  outline:3px solid rgba(20,108,90,.22)!important;
  outline-offset:2px!important;
}

@media(max-width:900px){
  [data-portal-stage-rail-v724="true"]:not([hidden]){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:none!important;
    grid-auto-flow:row!important;
    grid-auto-columns:auto!important;
  }
}
@media(max-width:680px){
  [data-portal-mode-group-v724="true"]{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  [data-portal-stage-rail-v724="true"]:not([hidden]){
    gap:7px!important;
    margin:8px 0 14px!important;
  }
  [data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]){
    min-height:44px!important;
    padding:8px 9px!important;
    font-size:12.5px!important;
  }
}
@media(max-width:480px){
  [data-portal-stage-rail-v724="true"]:not([hidden]){grid-template-columns:1fr!important}
}
@media(prefers-reduced-motion:reduce){
  [data-portal-mode-group-v724="true"] > [data-portal-mode-v724],
  [data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]){transition:none!important}
}
@media print{
  [data-portal-mode-group-v724="true"],[data-portal-stage-rail-v724="true"]{display:none!important}
}



/* ---- portal-controls-visual-fix-v726.css ----
   Unified active stage presentation + live visual top alignment.
   Active stage: mint card + dark teal number chip, matching portal UI.
   Visual roots: clear obsolete sticky top offsets left after v719 isolation.
*/
:root{
  --pc726-stage-active-bg:#e3f3f0;
  --pc726-stage-active-border:#73c5ba;
  --pc726-stage-active-ink:#24453f;
  --pc726-stage-number-bg:#0d8077;
  --pc726-stage-number-ink:#fff;
}

/* v719 turned visual roots into relative blocks; legacy top offsets must not
   shift the whole live scheme down anymore. Keep all natural margins/padding. */
[data-portal-visual-root-v719="1"]{
  top:auto!important;
  inset-block-start:auto!important;
}

/* Active stage card: same appearance everywhere. */
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).portal-selected-v724,
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).active,
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).is-active,
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).selected,
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"])[aria-current="step"],
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"])[aria-selected="true"]{
  border-color:var(--pc726-stage-active-border)!important;
  background:var(--pc726-stage-active-bg)!important;
  color:var(--pc726-stage-active-ink)!important;
  box-shadow:0 1px 2px rgba(13,128,119,.05)!important;
  transform:none!important;
}

/* Numeric chip is annotated by v726 JS, so labels are never styled by mistake. */
[data-portal-stage-rail-v724="true"] [data-portal-stage-number-v726="true"]{
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:24px!important;
  width:24px!important;
  height:24px!important;
  min-height:24px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:7px!important;
  background:#eef4f2!important;
  color:#667a73!important;
  box-shadow:none!important;
  font-size:12px!important;
  font-weight:850!important;
  line-height:1!important;
}
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).portal-selected-v724 [data-portal-stage-number-v726="true"],
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).active [data-portal-stage-number-v726="true"],
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).is-active [data-portal-stage-number-v726="true"],
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"]).selected [data-portal-stage-number-v726="true"],
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"])[aria-current="step"] [data-portal-stage-number-v726="true"],
[data-portal-stage-rail-v724="true"] :where(button,a,[role="button"])[aria-selected="true"] [data-portal-stage-number-v726="true"]{
  background:var(--pc726-stage-number-bg)!important;
  color:var(--pc726-stage-number-ink)!important;
}


/* v729 — calculation integrity guard. Presentation only: never changes formulas or values. */
[data-portal-calc-integrity-v729="invalid"]{
  outline:2px solid rgba(180,70,55,.20);
  outline-offset:3px;
}
.portal-calc-integrity-v729{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:12px 0;
  padding:11px 13px;
  border:1px solid #e5b7ad;
  border-radius:12px;
  background:#fff7f4;
  color:#6d2e22;
  font:600 13px/1.4 inherit;
}
.portal-calc-integrity-v729[hidden]{display:none!important}
.portal-calc-integrity-v729::before{
  content:"!";
  display:grid;
  place-items:center;
  flex:0 0 22px;
  width:22px;height:22px;
  border-radius:7px;
  background:#a94735;
  color:#fff;
  font-weight:800;
}
input[data-portal-input-invalid-v729="true"],
select[data-portal-input-invalid-v729="true"]{
  border-color:#b34d3c!important;
  box-shadow:0 0 0 2px rgba(179,77,60,.10)!important;
}
@media print{.portal-calc-integrity-v729{display:none!important}}
