/* Pile-grillage PRO v2 — readability + stable premium layout */
.pg-body *, .pg-body *::before, .pg-body *::after{box-sizing:border-box}
.pg-body main{overflow-x:clip}
.pg-shell,.pg-shell *,.pg-workbench,.pg-controls,.pg-live,.pg-step,.pg-card,.pg-view,.pg-report{min-width:0;max-width:100%}

/* --- Main calculator typography --- */
.pg-shell-head p{font-size:16px;line-height:1.58}
.pg-eyebrow{font-size:12.5px;line-height:1.35}
.pg-mode-switch b{font-size:15px;line-height:1.25}
.pg-mode-switch small{font-size:12px!important;line-height:1.4!important}
.pg-stage-nav button{min-height:72px;padding:11px 12px}
.pg-stage-nav button>span{width:31px;height:31px;font-size:12px}
.pg-stage-nav b{font-size:13px;line-height:1.25}
.pg-stage-nav small{font-size:11.5px!important;line-height:1.32!important}
.pg-current-step{padding:16px 20px}
.pg-current-step>span{font-size:12px}
.pg-current-step b{font-size:15px;line-height:1.3}
.pg-current-step small{font-size:12px!important;line-height:1.4!important}
.pg-step{padding:28px 26px 25px}
.pg-step-head>span{font-size:12px}
.pg-step-head h3{font-size:clamp(24px,2.2vw,30px);line-height:1.18}
.pg-step-head p{font-size:15px;line-height:1.58}
.pg-card{padding:20px;border-radius:18px}
.pg-card h4{font-size:18px;line-height:1.3;margin-bottom:15px}
.pg-card p{font-size:14px;line-height:1.6}
.pg-field{gap:7px}
.pg-field>span{font-size:14px;font-weight:800;line-height:1.35}
.pg-field small{font-size:12.5px!important;line-height:1.48!important}
.pg-field input,.pg-field select{min-height:50px;padding:11px 12px;font-size:16px!important;line-height:1.35!important;border-radius:12px}
.pg-unit b{font-size:13px;padding-inline:11px}
.pg-choice span{min-height:78px;padding:13px 14px}
.pg-choice b{font-size:15px;line-height:1.3}
.pg-choice small{font-size:12.5px!important;line-height:1.42!important}
.pg-check>span{min-height:74px;padding:13px 14px}
.pg-check b{font-size:14px;line-height:1.35}
.pg-check small{font-size:12.5px!important;line-height:1.42!important}
.pg-helper{gap:10px;padding:13px 14px;font-size:13px;line-height:1.55}
.pg-inline-status{padding:12px 14px;font-size:13px;line-height:1.55}
.pg-dynamic-item{padding:15px;border-radius:14px}
.pg-dynamic-head b{font-size:14px}
.pg-add{min-height:46px;font-size:14px}
.pg-step-actions{padding:18px 24px 22px}
.pg-step-actions .btn{min-width:140px;min-height:46px;font-size:15px}

/* --- Structural layout: keep controls readable instead of squeezing fields --- */
.pg-shell-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,390px);gap:26px;padding:30px 32px 26px}
.pg-mode-switch{width:100%;flex:none}
.pg-stage-nav.pro{grid-template-columns:repeat(4,minmax(0,1fr))}
.pg-stage-nav.simple{grid-template-columns:repeat(4,minmax(0,1fr))}
.pg-workbench{grid-template-columns:minmax(560px,640px) minmax(0,1fr)}
.pg-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
.pg-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
.pg-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.pg-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

/* --- Live result: readable, not micro-UI --- */
.pg-live{padding:24px 22px 28px}
.pg-live-head{margin-bottom:14px}
.pg-live-head span{font-size:11.5px}
.pg-live-head b{font-size:19px;line-height:1.25}
.pg-live-head small{font-size:12.5px!important;line-height:1.45!important}
.pg-live-badge{padding:8px 10px;font-size:11.5px}
.pg-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.pg-kpi{padding:13px;border-radius:14px}
.pg-kpi span{font-size:11.5px}
.pg-kpi b{margin-top:5px;font-size:20px;line-height:1.15}
.pg-kpi small{font-size:11px!important;line-height:1.4!important}
.pg-view-tabs{gap:7px;margin-bottom:11px}
.pg-view-tabs button{min-height:44px;padding:9px 8px;font-size:12.5px;line-height:1.25}
.pg-view{min-height:500px;border-radius:20px}
.pg-view svg{min-height:500px}
.pg-axo-tools{position:static;display:grid;grid-template-columns:repeat(7,38px);gap:6px;max-width:none;padding:11px 12px;border-bottom:1px solid #e1e9e5;background:rgba(255,255,255,.94)}
.pg-axo-tools button{width:38px;height:38px;border-radius:10px;font-size:17px}
.pg-legend{gap:12px;padding:11px 13px;font-size:11.5px;line-height:1.35}
.pg-legend i{width:16px;height:5px}
.pg-diags{gap:9px;margin-top:13px}
.pg-diag{grid-template-columns:28px minmax(0,1fr) auto;gap:9px;padding:12px 13px;border-radius:13px}
.pg-diag i{width:25px;height:25px;font-size:11px}
.pg-diag b{font-size:13.5px;line-height:1.35}
.pg-diag p{font-size:12.5px;line-height:1.5}
.pg-diag strong{font-size:11.5px}

/* --- Report/readout --- */
.pg-report{padding:30px;border-radius:26px}
.pg-report-head h3{font-size:29px;line-height:1.18}
.pg-report-head p{font-size:14px;line-height:1.5}
.pg-report-actions .btn{min-height:43px;font-size:14px}
.pg-report-kpis{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.pg-report-kpi{padding:14px;border-radius:14px}
.pg-report-kpi span{font-size:11.5px}
.pg-report-kpi b{font-size:20px;line-height:1.2}
.pg-report-kpi small{font-size:11px!important;line-height:1.4!important}
.pg-report-section{margin-top:18px;border-radius:15px}
.pg-report-title{padding:14px 15px}
.pg-report-title h4{font-size:16px}
.pg-report-title p{font-size:12.5px;line-height:1.45}
.pg-table{min-width:840px}
.pg-table th,.pg-table td{padding:11px 12px;font-size:12.5px;line-height:1.4}
.pg-table th{font-size:11.5px}
.pg-table td small{font-size:11px!important;line-height:1.4!important}
.pg-status{padding:5px 8px;font-size:11px}
.pg-report-note{padding:14px 15px;font-size:12.5px;line-height:1.6}

/* --- Information blocks --- */
.pg-info h2{font-size:clamp(29px,3vw,42px)}
.pg-info p{font-size:16px;line-height:1.72}
.pg-info-grid{gap:14px}
.pg-info-grid article{padding:20px;border-radius:17px}
.pg-info-grid h3{font-size:17px}
.pg-info-grid p{font-size:14px;line-height:1.6}

/* --- Desktop/tablet breakpoints --- */
@media(max-width:1320px){
  .pg-workbench{grid-template-columns:1fr}
  .pg-controls{border-right:0;border-bottom:1px solid #e3eae6}
  .pg-live{position:static}
  .pg-report-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:1180px){
  .pg-shell-head{grid-template-columns:1fr;padding:26px 24px 22px}
  .pg-mode-switch{max-width:620px}
  .pg-stage-nav.simple,.pg-stage-nav.pro{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pg-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:820px){
  .pg-wrap,.pile-hero-grid{width:min(100% - 24px,1500px)}
  .pg-shell{border-radius:22px}
  .pg-shell-head{padding:22px 18px 20px}
  .pg-mode-switch{grid-template-columns:1fr 1fr;max-width:none}
  .pg-stage-nav{padding:12px;gap:8px}
  .pg-stage-nav.simple,.pg-stage-nav.pro{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pg-stage-nav button{min-height:68px}
  .pg-step{padding:22px 16px}
  .pg-card{padding:17px}
  .pg-grid-2,.pg-grid-3,.pg-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pg-live{padding:18px 14px 24px}
  .pg-view{min-height:420px}
  .pg-view svg{min-height:420px}
  .pg-report{padding:22px 15px}
}
@media(max-width:620px){
  .pg-wrap,.pile-hero-grid{width:calc(100% - 18px)}
  .pg-mode-switch{grid-template-columns:1fr}
  .pg-mode-switch button{min-height:64px;padding:12px 14px}
  .pg-stage-nav.simple,.pg-stage-nav.pro{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pg-stage-nav button{grid-template-columns:28px minmax(0,1fr);min-height:70px;padding:9px}
  .pg-stage-nav b{font-size:12.5px}
  .pg-stage-nav small{font-size:11px!important}
  .pg-current-step{padding:13px 12px}
  .pg-step{padding:19px 11px}
  .pg-step-head h3{font-size:23px}
  .pg-step-head p{font-size:14px}
  .pg-card{padding:15px;border-radius:16px}
  .pg-card h4{font-size:17px}
  .pg-grid-2,.pg-grid-3,.pg-grid-4,.pg-choice-grid{grid-template-columns:1fr}
  .pg-field>span{font-size:14px}
  .pg-field input,.pg-field select{min-height:50px;font-size:16px!important}
  .pg-choice span,.pg-check>span{min-height:72px}
  .pg-step-actions{position:sticky;bottom:0;z-index:8;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:11px calc(11px + env(safe-area-inset-right)) calc(11px + env(safe-area-inset-bottom)) calc(11px + env(safe-area-inset-left));background:rgba(255,255,255,.97);backdrop-filter:blur(10px);box-shadow:0 -8px 22px rgba(25,54,41,.07)}
  .pg-step-actions .btn{width:100%;min-width:0;min-height:48px;font-size:15px}
  .pg-live-head{display:block}
  .pg-live-badge{display:inline-flex;margin-top:8px}
  .pg-kpis{grid-template-columns:1fr 1fr}
  .pg-kpi.primary{grid-column:1/-1}
  .pg-view-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pg-view-tabs button{min-height:46px;font-size:13px}
  .pg-view-tabs button:first-child{grid-column:1/-1}
  .pg-view{min-height:360px}
  .pg-view svg{min-height:360px}
  .pg-axo-tools{grid-template-columns:repeat(4,minmax(0,1fr));padding:10px}
  .pg-axo-tools button{width:100%;height:40px}
  .pg-diag{grid-template-columns:26px minmax(0,1fr)}
  .pg-diag strong{grid-column:2;white-space:normal}
  .pg-report-kpis{grid-template-columns:1fr 1fr}
  .pg-report-head{display:block}
  .pg-report-actions{margin-top:12px}
  .pg-info-grid{grid-template-columns:1fr}
  .pg-table{min-width:760px}
  .pg-table th,.pg-table td{font-size:12px}
}
@media(max-width:390px){
  .pg-stage-nav.simple,.pg-stage-nav.pro{grid-template-columns:1fr}
  .pg-kpis,.pg-report-kpis{grid-template-columns:1fr}
  .pg-kpi.primary{grid-column:auto}
  .pg-view-tabs{grid-template-columns:1fr 1fr}
  .pg-view-tabs button:first-child{grid-column:1/-1}
  .pg-shell-head{padding-inline:14px}
}

/* Generic overflow guard for dynamic content */
.pg-body :is(.pg-shell,.pg-stage-nav,.pg-workbench,.pg-controls,.pg-live,.pg-step,.pg-card,.pg-grid-2,.pg-grid-3,.pg-grid-4,.pg-choice-grid,.pg-kpis,.pg-view-tabs,.pg-report,.pg-report-kpis,.pg-info-grid)>*{min-width:0}
.pg-body :is(.pg-stage-nav b,.pg-stage-nav small,.pg-field span,.pg-field small,.pg-choice b,.pg-choice small,.pg-check b,.pg-check small,.pg-kpi span,.pg-kpi b,.pg-kpi small,.pg-diag p,.pg-report-kpi b,.pg-report-kpi small){overflow-wrap:anywhere}

/* Print remains compact but readable. */
@media print{
  .pg-report-head h3{font-size:18pt!important}
  .pg-report-head p,.pg-report-note{font-size:9.5pt!important}
  .pg-report-kpi span,.pg-report-kpi small{font-size:8.5pt!important}
  .pg-report-kpi b{font-size:13pt!important}
  .pg-table th,.pg-table td{font-size:8.5pt!important;line-height:1.3!important;padding:5pt 6pt!important}
  .pg-table th{font-size:8pt!important}
}

/* v3 — premium "Что учитывает калькулятор" section */
.pg-considers{
  padding:64px 0 68px;
  background:
    radial-gradient(circle at 88% 16%,rgba(38,117,87,.08),transparent 24%),
    linear-gradient(180deg,#f8fbf9 0%,#f3f7f5 100%);
  border-block:1px solid #e1e9e5;
  overflow:hidden;
}
.pg-considers,.pg-considers *{box-sizing:border-box}
.pg-considers-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,360px);
  gap:28px;
  align-items:end;
  margin-bottom:24px;
}
.pg-considers-kicker{
  display:inline-flex;
  margin-bottom:8px;
  color:#287057;
  font-size:12px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.pg-considers h2{
  margin:0;
  color:#1c3027;
  font-size:clamp(30px,3.1vw,44px);
  line-height:1.08;
  letter-spacing:-.035em;
}
.pg-considers-head p{
  max-width:920px;
  margin:12px 0 0;
  color:#55675e;
  font-size:16px;
  line-height:1.65;
}
.pg-considers-summary{
  min-width:0;
  padding:18px 20px;
  border:1px solid #d7e4dd;
  border-radius:18px;
  background:rgba(255,255,255,.86);
  box-shadow:0 12px 30px rgba(28,65,48,.055);
}
.pg-considers-summary b,.pg-considers-summary small{display:block}
.pg-considers-summary b{color:#235842;font-size:18px;line-height:1.25}
.pg-considers-summary small{margin-top:5px;color:#697970;font-size:12.5px;line-height:1.45}
.pg-considers-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.pg-consider-card{
  position:relative;
  display:grid;
  grid-template-columns:86px minmax(0,1fr);
  gap:16px;
  align-items:start;
  min-width:0;
  min-height:190px;
  padding:19px;
  border:1px solid #dbe6e0;
  border-radius:20px;
  background:#fff;
  box-shadow:0 12px 30px rgba(26,60,44,.045);
  overflow:hidden;
}
.pg-consider-card:after{
  content:"";
  position:absolute;
  right:-34px;
  bottom:-42px;
  width:100px;
  height:100px;
  border-radius:50%;
  background:rgba(47,126,91,.045);
  pointer-events:none;
}
.pg-consider-icon{
  display:grid;
  place-items:center;
  width:86px;
  height:86px;
  padding:9px;
  border:1px solid #e1ebe6;
  border-radius:18px;
  background:linear-gradient(145deg,#fbfdfc,#eef6f2);
  overflow:hidden;
}
.pg-consider-icon img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  filter:drop-shadow(0 6px 10px rgba(30,91,64,.08));
}
.pg-consider-icon-wide img{object-fit:cover;border-radius:9px}
.pg-consider-copy{min-width:0}
.pg-consider-copy>span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:31px;
  height:25px;
  padding:0 8px;
  border-radius:999px;
  background:#eaf5ef;
  color:#2b6e53;
  font-size:10.5px;
  font-weight:900;
  letter-spacing:.04em;
}
.pg-consider-copy h3{
  margin:8px 0 7px;
  color:#20352b;
  font-size:17px;
  line-height:1.22;
  letter-spacing:-.015em;
}
.pg-consider-copy p{
  margin:0;
  color:#607168;
  font-size:13.5px;
  line-height:1.52;
  overflow-wrap:anywhere;
}
.pg-considers-note{
  display:flex;
  gap:8px 12px;
  align-items:flex-start;
  margin-top:16px;
  padding:15px 18px;
  border:1px solid #cfe1d8;
  border-radius:16px;
  background:#edf7f2;
  color:#52665c;
  font-size:13.5px;
  line-height:1.55;
}
.pg-considers-note b{flex:0 0 auto;color:#245e47}
.pg-considers-note span{min-width:0}
@media(max-width:1180px){
  .pg-considers-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:820px){
  .pg-considers{padding:46px 0 50px}
  .pg-considers-head{grid-template-columns:1fr;gap:16px;align-items:start}
  .pg-considers-summary{max-width:520px}
  .pg-consider-card{min-height:0}
}
@media(max-width:600px){
  .pg-considers{padding:38px 0 42px}
  .pg-considers h2{font-size:30px}
  .pg-considers-head p{font-size:15px;line-height:1.55}
  .pg-considers-grid{grid-template-columns:1fr;gap:10px}
  .pg-consider-card{grid-template-columns:70px minmax(0,1fr);gap:13px;padding:14px;border-radius:17px}
  .pg-consider-icon{width:70px;height:70px;padding:7px;border-radius:15px}
  .pg-consider-copy h3{font-size:16px}
  .pg-consider-copy p{font-size:13px;line-height:1.47}
  .pg-considers-note{display:grid;padding:14px;font-size:13px}
}
@media(max-width:390px){
  .pg-consider-card{grid-template-columns:60px minmax(0,1fr);gap:11px;padding:12px}
  .pg-consider-icon{width:60px;height:60px}
  .pg-consider-copy>span{height:22px;min-width:27px;font-size:9.5px}
}
