:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#17212b;background:#f3f6f8;font-synthesis:none}
*{box-sizing:border-box}body{margin:0}.topbar{height:76px;background:#101e2b;color:#fff;display:flex;align-items:center;padding:0 max(calc((100vw - 1180px)/2),24px);gap:13px}
.brand-mark{width:38px;height:38px;border:1px solid #5f819b;border-radius:9px;display:grid;place-items:center;font-weight:800;color:#a9d5f4;font-size:13px}.brand{font-size:14px;font-weight:800;letter-spacing:1.8px}.subbrand{font-size:9px;letter-spacing:1.5px;color:#9db0bf;margin-top:4px}.version{margin-left:auto;color:#9db0bf;font-size:10px;letter-spacing:1px}
main{max-width:1180px;margin:0 auto;padding:42px 24px 30px}.intro{display:flex;justify-content:space-between;align-items:end;margin-bottom:26px;gap:24px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:2px;color:#668096;margin:0 0 9px}h1{font-size:34px;letter-spacing:-1px;margin:0 0 10px;color:#142536}.lead{margin:0;color:#637383;max-width:660px;line-height:1.55;font-size:14px}.intro-chip{border:1px solid #d8e1e8;background:#fff;border-radius:30px;padding:10px 14px;color:#607487;font-size:11px;white-space:nowrap}
.panel{background:#fff;border:1px solid #e0e7ec;border-radius:13px;padding:24px;margin-bottom:16px;box-shadow:0 3px 12px #20394b08}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.section-head>div{display:flex;align-items:center;gap:12px}.step{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#eaf3f9;color:#286184;font-size:11px;font-weight:800}.section-head h2,.results-head h2{font-size:17px;margin:0;color:#1c2d3d}.unit-note{font-size:11px;color:#8493a0}.fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px}.fields-three{grid-template-columns:repeat(3,minmax(0,1fr));max-width:780px}label{display:flex;flex-direction:column;gap:7px;color:#526373;font-size:12px;font-weight:600}input{width:100%;height:42px;border:1px solid #d6e0e7;border-radius:7px;padding:0 11px;font:14px inherit;color:#1d2b38;background:#fbfcfd;outline:none}input:focus{border-color:#5285a7;box-shadow:0 0 0 3px #5285a71a}
.action-row{display:flex;align-items:center;gap:16px;margin:20px 0 34px}button{background:#17628a;color:#fff;border:0;border-radius:8px;padding:14px 20px;font-size:13px;font-weight:700;cursor:pointer;box-shadow:0 4px 10px #17628a2b}button:hover{background:#104e70}button span{font-size:18px;margin-left:20px}.hint{font-size:11px;color:#8a98a4}
.error{padding:14px 17px;background:#fff0ef;border:1px solid #f0c5c1;color:#a53a30;border-radius:8px;margin-bottom:18px;font-size:13px}.results-head{display:flex;justify-content:space-between;align-items:center;margin:12px 0 18px}.results-head h2{font-size:22px}.status{font-size:11px;color:#31775a;background:#e9f5ee;border-radius:30px;padding:8px 12px}.status i{display:inline-block;width:6px;height:6px;background:#3d9b6e;border-radius:50%;margin-right:6px;vertical-align:1px}
.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.metric{background:#fff;border:1px solid #e0e7ec;border-radius:10px;padding:16px}.metric span{display:block;color:#82919d;font-size:10px;margin-bottom:8px}.metric strong{font-size:21px;color:#1a3448}.metric small{font-size:11px;color:#7e8d99;margin-left:4px}
.result-panel{padding-bottom:16px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:11px;white-space:nowrap}th{background:#f3f6f8;color:#586c7c;font-weight:700;text-align:right;padding:11px 10px;border-bottom:1px solid #dfe6eb}td{padding:10px;border-bottom:1px solid #edf1f4;text-align:right;color:#354654}th:first-child,td:first-child{text-align:left}tbody tr:hover{background:#f8fafb}.positive{color:#23734f} .negative{color:#b04c42}.inactive{color:#a0aab2;font-style:italic}.case-w1 td:first-child{border-left:3px solid #4c88a9}.case-w2 td:first-child{border-left:3px solid #c08b4a}
.notes-panel h3{font-size:13px;margin:0 0 10px}.notes-panel ul{margin:0;padding-left:18px;color:#687987;font-size:11px;line-height:1.7}footer{text-align:center;color:#96a2ab;font-size:10px;padding:20px 0 4px}
@media(max-width:800px){.fields{grid-template-columns:repeat(2,minmax(0,1fr))}.intro{display:block}.intro-chip{display:inline-block;margin-top:18px}.summary-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){main{padding:28px 14px}.topbar{padding:0 14px}.version{display:none}.fields,.fields-three{grid-template-columns:1fr 1fr}.panel{padding:17px}.summary-grid{gap:8px}.metric{padding:12px}.metric strong{font-size:18px}.section-head{align-items:flex-start}.unit-note{max-width:110px;text-align:right}}
.visual-panel{padding-bottom:20px}.visual-toolbar{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}.toggle-group{display:flex;gap:4px;padding:4px;background:#f0f4f7;border-radius:9px}.toggle{background:transparent;color:#617382;box-shadow:none;padding:9px 13px;font-size:11px;border-radius:6px}.toggle:hover{background:#e5edf2;color:#23445a}.toggle.active{background:#fff;color:#175f86;box-shadow:0 1px 4px #1d34451c}.visual-layout{display:grid;grid-template-columns:minmax(0,1fr) 205px;gap:18px}.model-stage{background:linear-gradient(180deg,#f8fafb,#f1f5f7);border:1px solid #e4ebef;border-radius:10px;padding:10px 12px 8px}#hall-model{display:block;width:100%;height:auto;max-height:430px}.zone-shape{stroke:#fff;stroke-width:2.2;cursor:pointer;transition:filter .15s,stroke-width .15s;stroke-linejoin:round}.zone-shape:hover,.zone-shape.selected{stroke:#172f40;stroke-width:4;filter:brightness(1.08)}.zone-text,.zone-value{text-anchor:middle;pointer-events:none;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round;fill:#173144}.zone-text{font-size:13px;font-weight:800}.zone-value{font-size:11px;font-weight:700}.model-caption{text-align:center;color:#83919c;font-size:10px;padding:5px}.visual-side{border:1px solid #e4ebef;border-radius:10px;padding:15px;background:#fff}.legend-title{font-size:12px;font-weight:800;color:#314757;margin-bottom:12px}.visual-scale{height:12px;border-radius:10px;background:linear-gradient(90deg,#3978b8,#9bb8cf,#e7e9e7,#e8b18b,#c85d4d);margin-bottom:7px}.scale-labels{display:flex;justify-content:space-between;font-size:9px;color:#7c8b96}.visual-reading{border-top:1px solid #edf1f4;margin-top:18px;padding-top:14px}.visual-reading span{display:block;font-size:10px;color:#8a98a3;margin-bottom:6px}.visual-reading strong{font-size:25px;color:#18374c}.visual-reading div{font-size:18px;font-weight:700;margin-top:6px;color:#253e50}.visual-reading small{font-size:10px;color:#8996a0}.visual-help{font-size:10px;line-height:1.55;color:#84919c;margin:15px 0 0}@media(max-width:760px){.visual-layout{grid-template-columns:1fr}.visual-side{display:grid;grid-template-columns:1fr 1fr;gap:12px}.visual-reading{border-top:0;border-left:1px solid #edf1f4;margin:0;padding:0 0 0 14px}.visual-help{grid-column:1/-1;margin-top:0}}

#three-model{width:100%;height:470px;min-height:360px;border-radius:8px;overflow:hidden;background:linear-gradient(180deg,#f8fafb,#eaf0f4);position:relative}
#three-model canvas{display:block;width:100%;height:100%;outline:none}
.visual-help{margin-top:15px}
@media(max-width:760px){#three-model{height:380px;min-height:320px}}

#three-model{height:560px;background:linear-gradient(180deg,#f8fafb 0%,#edf3f6 100%)}
#three-model canvas{cursor:grab}#three-model canvas:active{cursor:grabbing}

#three-model{height:600px;min-height:480px;background:linear-gradient(180deg,#f8fafb 0%,#edf2f5 100%)}
#three-model canvas{cursor:grab}
#three-model canvas:active{cursor:grabbing}
.visual-side{min-width:190px}
.visual-scale{height:auto;background:none;margin:8px 0 12px}
.scale-gradient{height:13px;border-radius:10px;background:linear-gradient(90deg,#3978b8 0%,#9bb8cf 25%,#e7e9e7 50%,#e8b18b 75%,#c85d4d 100%)}
.scale-labels{margin-top:5px;font-size:10px}
.zone-geometry{margin-top:14px;padding:10px 0;border-top:1px solid #edf1f4;font-size:11px;line-height:1.55;color:#607586}
.zone-geometry strong{color:#20384a}
@media(max-width:760px){#three-model{height:430px;min-height:350px}}

.zone-geometry{
  margin-top:12px!important;padding:10px 0!important;border-top:1px solid #e5ebef;
  font-size:12px!important;line-height:1.55!important;color:#536b7b!important;
  overflow-wrap:anywhere;max-width:100%
}
.zone-geometry b,.zone-geometry strong{
  display:inline!important;font-size:12px!important;line-height:1.55!important;
  font-weight:700!important;color:#18384d!important
}
.visual-reading{min-width:0}
.visual-reading #selected-zone{font-size:26px!important}
.visual-reading #selected-value{font-size:20px!important}

#zone-geometry{
  font-size:13px!important;line-height:1.5!important;
  font-weight:500!important;color:#304b5e!important;
  overflow-wrap:anywhere;max-width:100%
}
#zone-geometry b,#zone-geometry strong{
  font-size:13px!important;line-height:1.5!important;
  font-weight:750!important;color:#102f45!important
}
#selected-zone{font-size:28px!important}
#selected-value{font-size:22px!important}

.zone-geometry{font-size:12px!important;line-height:1.45!important}

.visual-help,#zone-geometry{display:none!important}
.visual-side .visual-reading{margin-top:14px}

/* WIND ENGINEER v1.1 — układ wejście + podgląd 3D */
.workspace{display:grid;grid-template-columns:minmax(270px,350px) minmax(0,1fr);gap:18px;align-items:stretch}
.input-column{display:flex;flex-direction:column;gap:14px;min-width:0}
.input-column .panel{margin:0;padding:20px}
.fields-one{display:grid;grid-template-columns:1fr;gap:12px}
.fields-one input{height:40px}
.input-column .section-head{margin-bottom:16px}
.input-column .action-row{margin:0}
.input-column .action-row button{width:100%}
.live-note{display:flex;align-items:center;gap:8px;margin-top:16px;color:#668092;font-size:10px;line-height:1.45}
.live-note i{width:7px;height:7px;border-radius:50%;background:#25a477;box-shadow:0 0 0 3px #25a47720;flex:none}
.workspace>.visual-panel{margin:0;min-width:0;padding:20px}
.workspace .visual-layout{grid-template-columns:minmax(0,1fr) 150px;gap:12px}
.workspace .visual-side{min-width:0;padding:12px}
.workspace #three-model{height:600px;min-height:480px}
.workspace .visual-toolbar{gap:8px}
.workspace .toggle{padding:8px 9px;font-size:10px}
#results{margin-top:24px}
#results>.result-panel{margin-bottom:16px}
@media(max-width:980px){.workspace{grid-template-columns:1fr}.workspace .visual-layout{grid-template-columns:minmax(0,1fr) 180px}.workspace #three-model{height:500px}}
@media(max-width:620px){.workspace .visual-layout{grid-template-columns:1fr}.workspace #three-model{height:390px;min-height:330px}.workspace .visual-side{display:flex;flex-direction:column}.workspace .visual-reading{border:0;padding:12px 0 0;margin-top:10px}}

/* WIND ENGINEER 1.3 — clean engineering viewport */
.model-stage{position:relative;overflow:hidden;background:linear-gradient(180deg,#f7f9fa 0%,#eef2f4 100%)}
.workspace #three-model{height:620px;min-height:500px;background:transparent;position:relative;z-index:1}
#three-model canvas{display:block;width:100%;height:100%;outline:none;cursor:grab}
#three-model canvas:active{cursor:grabbing}
#model-overlay{position:absolute;inset:10px 12px 34px;pointer-events:none;overflow:hidden;z-index:4}
.model-label{position:absolute;left:0;top:0;transform:translate(-50%,-50%);white-space:nowrap;pointer-events:none;
  color:#142f43;background:rgba(255,255,255,.97);border:1px solid #29495f;border-radius:4px;
  box-shadow:0 1px 3px rgba(20,45,60,.18);font-family:Arial,sans-serif;font-variant-numeric:tabular-nums;
  line-height:1.15;padding:4px 7px}
.zone-label{font-size:12px;font-weight:700;letter-spacing:.1px}
.dimension-label{font-size:11px;font-weight:700;background:rgba(255,255,255,.96);padding:3px 6px;border-color:#617d8e}
.zone-legend-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px 8px;padding:4px 0}
.zone-legend-grid span{display:flex;align-items:center;gap:5px;font-size:10px;color:#506677;font-weight:700}
.zone-legend-grid i{display:inline-block;width:12px;height:12px;border-radius:3px;border:1px solid rgba(18,42,58,.25);flex:0 0 auto}
.visual-scale{height:auto!important;background:none!important;margin:10px 0 8px!important}
.visual-side .visual-reading{margin-top:12px;padding-top:12px}
.visual-side .visual-reading strong{font-size:25px}
.visual-side .visual-reading #selected-value{font-size:22px}
.visual-side .visual-reading small{display:block;margin-top:4px}
@media(max-width:980px){
 .workspace #three-model{height:520px;min-height:420px}
}
@media(max-width:620px){
 .workspace #three-model{height:420px;min-height:360px}
 #model-overlay{inset:6px 8px 28px}
 .zone-label{font-size:11px}
 .dimension-label{font-size:10px}
}

.model-viewport{position:relative;width:100%;height:620px}
.workspace .model-viewport #three-model{height:100%;min-height:0}
#model-overlay{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:4}
@media(max-width:980px){.workspace .model-viewport{height:520px}}
@media(max-width:620px){.workspace .model-viewport{height:420px}}

/* WIND ENGINEER v1.4 - climatic input and norm case controls */
select{width:100%;height:42px;border:1px solid #d6e0e7;border-radius:7px;padding:0 10px;font:13px inherit;color:#1d2b38;background:#fbfcfd;outline:none}
select:focus{border-color:#5285a7;box-shadow:0 0 0 3px #5285a71a}
input[readonly]{background:#eef3f6;color:#30566e;font-weight:700;border-color:#dce6ec}
.field-note{font-size:10px;color:#82919d;line-height:1.5;margin:12px 0 0}
.derived-tag{font-size:9px;font-weight:500;color:#8297a5}
.case-options{flex-wrap:wrap;max-width:100%}
.case-options .toggle{white-space:nowrap}
#wind-summary td:last-child{min-width:240px}
@media(max-width:620px){.case-options{width:100%;overflow-x:auto;flex-wrap:nowrap}.case-options .toggle{flex:0 0 auto}}


/* WIND ENGINEER v1.5: full-width 3D viewport with legend below */
.visual-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.visual-layout .model-stage{width:100%;min-width:0}
.visual-side{width:100%;min-width:0;display:grid;grid-template-columns:1fr;gap:6px;padding:12px 16px}
.visual-side .legend-title{margin:0;font-size:12px}
.visual-side .visual-scale{margin:0!important}
.visual-side .zone-legend-grid{display:flex;flex-wrap:wrap;align-items:center;gap:8px 15px;padding:4px 0}
.visual-side .zone-legend-grid span{font-size:11px}
.visual-side .zone-legend-grid i{width:13px;height:13px}
.visual-side .visual-reading{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-top:1px solid #edf1f4;border-left:0;margin:4px 0 0;padding:9px 0 0}
.visual-side .visual-reading span{margin:0}
.visual-side .visual-reading strong{font-size:19px}
.visual-side .visual-reading #selected-value{font-size:16px;margin:0}
.visual-side .visual-reading small{margin:0}
@media(max-width:620px){.visual-side{padding:10px}.visual-side .zone-legend-grid{gap:7px 10px}.visual-side .visual-reading{gap:8px}}


/* WIND ENGINEER v1.5.1 — wymuszony układ: model na pełną szerokość, legenda pod modelem, tabele poniżej całego workspace.
   Reguła .workspace .visual-layout ma większą specyficzność niż wcześniejszy .visual-layout,
   dlatego jawnie nadpisujemy ją tutaj. */
.workspace .visual-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:stretch;
  gap:10px;
}
.workspace .visual-layout .model-stage{
  width:100%;
  min-width:0;
}
.workspace .visual-side{
  width:100%;
  min-width:0;
  min-height:0;
  height:auto;
  display:grid;
  grid-template-columns:max-content minmax(0,1fr) max-content;
  align-items:center;
  column-gap:16px;
  row-gap:8px;
  padding:12px 16px;
}
.workspace .visual-side .legend-title{
  grid-column:1;
  grid-row:1;
  margin:0;
  white-space:nowrap;
}
.workspace .visual-side #visual-scale{
  grid-column:2;
  grid-row:1;
  min-width:0;
  margin:0!important;
}
.workspace .visual-side .zone-legend-grid{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
  gap:7px 13px;
  padding:2px 0;
}
.workspace .visual-side .zone-legend-grid span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
  font-size:11px;
}
.workspace .visual-side .zone-legend-grid i{
  width:13px;
  height:13px;
}
.workspace .visual-side .visual-reading{
  grid-column:3;
  grid-row:1;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  min-width:0;
  border:0;
  border-left:1px solid #e7edf1;
  margin:0;
  padding:0 0 0 14px;
}
.workspace .visual-side .visual-reading span{display:inline;margin:0;white-space:nowrap}
.workspace .visual-side .visual-reading strong{font-size:19px;line-height:1}
.workspace .visual-side .visual-reading #selected-value{font-size:17px;margin:0;line-height:1.1}
.workspace .visual-side .visual-reading small{display:inline;margin:0;white-space:nowrap}
/* Wyniki i tabele są osobną sekcją pod całym układem wejście + model. */
#results:not([hidden]){
  display:block;
  width:100%;
  max-width:none;
  clear:both;
  margin:24px 0 0;
}
#results > .result-panel,
#results > .notes-panel{
  width:100%;
  max-width:none;
}
@media(max-width:760px){
  .workspace .visual-side{
    grid-template-columns:minmax(0,1fr);
    row-gap:8px;
  }
  .workspace .visual-side .legend-title,
  .workspace .visual-side #visual-scale,
  .workspace .visual-side .visual-reading{
    grid-column:1;
    grid-row:auto;
  }
  .workspace .visual-side .visual-reading{
    border-left:0;
    border-top:1px solid #e7edf1;
    padding:8px 0 0;
  }
}

/* WIND ENGINEER 1.6 — neutral zoning, 2D wind diagrams and global force resultants */
.workspace .visual-side,
.workspace .visual-side .legend-title { color:#48545d; }
.workspace .visual-side .zone-legend-grid i { border-color:#66727b55; }
.case-postvisual-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,1fr);gap:12px;margin-top:12px;align-items:stretch}
.panel-subtle{background:#fbfcfd;border-color:#e2e7ea;box-shadow:none;padding:15px;margin:0;min-width:0}
.compact-head{margin-bottom:10px}
.compact-head h3{font-size:14px;margin:0;color:#243744}
.compact-head .step{width:27px;height:27px}
.diagram-grid{display:grid;grid-template-columns:1fr;gap:10px}
.diagram-card{border:1px solid #e6ebee;border-radius:9px;background:#fff;padding:10px;min-width:0}
.diagram-card h4{margin:0 0 8px;font-size:11px;color:#4b5e6b}
.diagram-svg{width:100%;overflow:hidden}
.diagram-svg svg{display:block;width:100%;height:auto;max-height:265px}
.diagram-note{margin:7px 0 0;color:#7b8993;font-size:9px;line-height:1.45}
.section-ground{stroke:#727e86;stroke-width:3;fill:none}
.section-building{stroke:#3e4b54;stroke-width:3;fill:#eef1f3;stroke-linejoin:round}
.section-roof-line{stroke:#3e4b54;stroke-width:4;fill:none;stroke-linejoin:round}
.section-roof-edge{stroke:#66727a;stroke-width:1.4;fill:none;stroke-dasharray:5 4}
.diagram-zone{font-size:17px;font-weight:800;fill:#27343d;text-anchor:middle}
.diagram-value{font-size:12px;font-weight:700;fill:#374650;text-anchor:middle}
.diagram-callout{font-size:11px;font-weight:650;fill:#53616a}
.diagram-caption{font-size:11px;fill:#7a8790}
.pressure-arrow{stroke:#46545e;stroke-width:2.1;fill:none;stroke-linecap:round}
.arrow-positive{stroke:#34434c}
.arrow-negative{stroke:#596770;stroke-dasharray:3 2}
.wind-arrow{stroke:#087e8a;stroke-width:3;fill:none;stroke-linecap:round;stroke-linejoin:round}
.wind-text{font-size:12px;font-weight:800;fill:#087e8a}
.dimension-line{stroke:#71808a;stroke-width:1.2;fill:none}
.dimension-text{font-size:11px;font-weight:700;fill:#56656f;text-anchor:middle}
.plan-outline{fill:#edf0f2;stroke:#46535c;stroke-width:3}
.plan-roof{fill:#e3e7e9;stroke:#4e5a63;stroke-width:2}
.plan-zone-light{fill:#d6dbde;opacity:.95}
.plan-zone-mid{fill:#c1c8cc;opacity:.95}
.plan-zone-dark{fill:#aeb7bd;opacity:.95}
.plan-zone-corner{fill:#969fa5;stroke:#6b757c;stroke-width:1.2}
.plan-boundary{stroke:#66737c;stroke-width:1.5;stroke-dasharray:5 4}
.wall-band{fill:#c1c8cd;stroke:#64717a;stroke-width:1}
.wall-band-strong{fill:#929ca3}
.case-resultants{display:flex;flex-direction:column;gap:10px}
.resultant-highlight-grid{display:grid;grid-template-columns:1fr;gap:8px}
.resultant-highlight{border:1px solid #e0e6e9;border-radius:8px;background:#fff;padding:10px 11px}
.resultant-highlight span{display:block;color:#6f7d86;font-size:10px;margin-bottom:4px}
.resultant-highlight strong{display:block;color:#293943;font-size:19px;font-variant-numeric:tabular-nums}
.resultant-highlight small{display:block;margin-top:3px;color:#7f8b93;font-size:9px}
.resultant-table-wrap{max-height:210px;overflow:auto;border:1px solid #e7ecef;border-radius:7px;background:#fff}
#resultants-table{font-size:10px}
#resultants-table th,#resultants-table td{padding:8px 7px}
#resultants-table .resultant-active{background:#edf1f3}
.diagram-note{overflow-wrap:anywhere}
.case-formulas{margin-top:12px}
.case-formulas summary{cursor:pointer;font-size:12px;font-weight:750;color:#354955;list-style:none}
.case-formulas summary::-webkit-details-marker{display:none}
.case-formulas summary:after{content:"＋";float:right;color:#72818b}
.case-formulas[open] summary:after{content:"−"}
.formula-summary{font-size:10px;line-height:1.55;color:#64737e;padding:10px 0 6px}
.formula-summary p{margin:4px 0 8px}
.formula-summary b{color:#374953}
.formula-equations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:8px}
.formula-equations span{background:#f2f5f6;border:1px solid #e6ebee;border-radius:6px;padding:8px;color:#475760}
#case-coeff-table{font-size:10px}
#case-coeff-table th,#case-coeff-table td{padding:8px 7px}
/* Keep numeric signed values immediately readable: + is pressure, - is suction. */
.positive{font-weight:700}
.negative{font-weight:700}
@media(max-width:1100px){.case-postvisual-grid{grid-template-columns:1fr}.resultant-highlight-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.diagram-grid{grid-template-columns:1fr}}
@media(max-width:620px){.panel-subtle{padding:11px}.resultant-highlight-grid{grid-template-columns:1fr}.formula-equations{grid-template-columns:1fr}.diagram-svg svg{max-height:none}.case-postvisual-grid{gap:9px}}

/* v1.6.1: full global-equilibrium table stays readable on desktop and scrolls horizontally on narrow screens. */
.resultant-table-wrap{overflow-x:auto}
#resultants-table{min-width:760px}
#resultants-table td,#resultants-table th{white-space:nowrap}


/* WIND ENGINEER v1.6.2 — textual zone values replace color-swatch legend. */
.workspace .visual-side{
  display:grid;
  grid-template-columns:minmax(180px,max-content) minmax(0,1fr) max-content;
  align-items:start;
  column-gap:16px;
  row-gap:8px;
}
.workspace .visual-side #zone-legend-title{
  grid-column:1;
  grid-row:1;
  white-space:normal;
  line-height:1.35;
  padding-top:4px;
}
.workspace .visual-side #visual-scale.zone-values-legend{
  grid-column:2;
  grid-row:1;
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:8px 22px;
  min-width:0;
  margin:0!important;
  height:auto;
  border:0;
  border-radius:0;
  background:none;
}
.zone-values-group{display:flex;flex-wrap:wrap;align-items:center;gap:6px 9px;min-width:0}
.zone-group-title{font-size:10px;letter-spacing:.05em;color:#73808a;white-space:nowrap}
.zone-values-list{display:flex;flex-wrap:wrap;align-items:center;gap:5px 8px}
.zone-value-chip{
  display:inline-flex;align-items:baseline;gap:3px;
  padding:4px 7px;border:1px solid #dfe4e7;border-radius:5px;
  background:#f8f9fa;color:#3f4b54;font-size:11px;line-height:1.2;
  font-variant-numeric:tabular-nums;white-space:nowrap;cursor:pointer;
}
.zone-value-chip strong{font-size:11px;color:#26343d}
.zone-value-chip:hover,.zone-value-chip.selected{background:#e9edf0;border-color:#9ca8b0}
.workspace .visual-side .visual-reading{grid-column:3;grid-row:1}
@media(max-width:760px){
  .workspace .visual-side{grid-template-columns:minmax(0,1fr);align-items:start}
  .workspace .visual-side #zone-legend-title,
  .workspace .visual-side #visual-scale.zone-values-legend,
  .workspace .visual-side .visual-reading{grid-column:1;grid-row:auto}
  .workspace .visual-side #visual-scale.zone-values-legend{gap:10px}
  .workspace .visual-side .visual-reading{border-left:0;border-top:1px solid #e7edf1;padding:8px 0 0}
}

/* WIND ENGINEER 1.6.3 — interactive transverse section and visible cutting plane. */
.dynamic-section-panel{display:flex;flex-direction:column;gap:10px}
.section-control-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.section-slider-label{font-size:10px;color:#64727b;font-weight:650}
.section-slider-value{display:flex;align-items:baseline;gap:10px;color:#34434c;font-size:11px;font-variant-numeric:tabular-nums}
.section-slider-value strong{font-size:13px}
.section-slider-value span{color:#7c8991}
.section-slider{width:100%;accent-color:#66747d;cursor:pointer;margin:0}
.section-svg-wrap{border:1px solid #e5eaed;border-radius:8px;background:linear-gradient(180deg,#fff,#f8fafb);padding:5px 8px;min-width:0}
#dynamic-section-svg svg{display:block;width:100%;height:auto;max-height:390px}
.section-shell-fill{fill:#f0f2f3;stroke:none}
.section-outline{fill:none;stroke:#46525a;stroke-width:3;stroke-linejoin:round}
.section-ground-line{fill:none;stroke:#77828a;stroke-width:2.5}
.section-zone-label{font-size:15px;font-weight:800;fill:#26343d;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round}
.section-zone-value{font-size:11px;font-weight:700;fill:#35434c;paint-order:stroke;stroke:#fff;stroke-width:2.5px;stroke-linejoin:round}
.section-load-arrow{stroke:#46545e;stroke-width:2;fill:none;stroke-linecap:round}
.section-load-arrow.suction{stroke-dasharray:3 2;stroke:#69757d}
.section-wind-arrow{stroke:#66757f;stroke-width:2.5;fill:none;stroke-linecap:round;stroke-linejoin:round}
.section-wind-dot{fill:#66757f;stroke:#fff;stroke-width:2}
.section-wind-label{font-size:11px;font-weight:750;fill:#64727b}
.section-dimension{stroke:#7b878e;stroke-width:1.2;fill:none}
.section-dimension-text{font-size:11px;font-weight:750;fill:#56636c}
.section-elevation-text{font-size:10px;fill:#79858d}
.section-axis-label{font-size:10px;fill:#8a959c}
.section-dimensions{padding:7px 9px;border:1px solid #e6ebee;border-radius:6px;background:#f4f6f7;color:#56636c;font-size:10px;line-height:1.4;font-variant-numeric:tabular-nums}
@media(max-width:620px){
  .section-control-row{align-items:flex-start;flex-direction:column;gap:5px}
  .section-slider-value{width:100%;justify-content:space-between}
  #dynamic-section-svg svg{max-height:none}
}

/* WIND ENGINEER v1.6.4 — finalny układ przekroju, oznaczenia ciśnienia i wypadkowe. */
.topbar .version{white-space:nowrap}

/* Legenda: dokładnie dwa poziome rzędy — ściany oraz dach. */
.workspace .visual-side{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:start;
  gap:7px;
  padding:12px 16px;
}
.workspace .visual-side #zone-legend-title,
.workspace .visual-side #visual-scale,
.workspace .visual-side .visual-reading{
  grid-column:1;
  grid-row:auto;
}
.workspace .visual-side #zone-legend-title{white-space:normal;margin:0;padding:0}
.workspace .visual-side #visual-scale.zone-values-legend{
  display:grid;
  grid-template-columns:1fr;
  gap:6px;
  padding:0;
  margin:0!important;
}
.zone-values-group{display:flex;flex-direction:row;align-items:center;gap:12px;min-height:30px}
.zone-group-title{flex:0 0 64px;font-size:10px;font-weight:800;letter-spacing:.04em;color:#63727c}
.zone-values-list{display:flex;flex:1;flex-wrap:nowrap;align-items:center;gap:6px;min-width:0}
.zone-value-chip{padding:5px 10px;border:1px solid #24699f;border-radius:3px;background:#fff;min-width:78px;justify-content:center;font-variant-numeric:tabular-nums}
.zone-value-chip strong{color:#1d3f58}
.zone-value-chip[data-pressure-state="pressure"] span{color:#d9272e;font-weight:800}
.zone-value-chip[data-pressure-state="suction"] span{color:#1268ce;font-weight:800}
.zone-value-chip:hover,.zone-value-chip.selected{background:#eef4f8;border-color:#145a91;box-shadow:0 0 0 1px #145a9122}
.workspace .visual-side .visual-reading{display:flex;align-items:center;gap:10px;border-top:1px solid #e6ebee;border-left:0;margin:3px 0 0;padding:8px 0 0}
.workspace .visual-side .visual-reading span{margin:0}
.workspace .visual-side .visual-reading #selected-value{margin:0}
@media(max-width:760px){
  .zone-values-group{align-items:flex-start;flex-direction:column;gap:4px}
  .zone-group-title{flex:0 0 auto}
  .zone-values-list{flex-wrap:wrap}
  .zone-value-chip{min-width:70px}
}

/* Model 3D: niebieska ramka, czerwony tekst parcia, niebieski tekst ssania. */
.model-label.zone-label{
  border:1.5px solid #23669d;
  border-radius:3px;
  background:rgba(255,255,255,.98);
  padding:5px 8px;
  font-size:12px;
  font-weight:800;
  line-height:1.15;
  box-shadow:0 1px 4px rgba(16,49,73,.22);
}
.model-label.zone-label.pressure{color:#d9272e}
.model-label.zone-label.suction{color:#1268ce}

/* Przekrój: pełna szerokość modelu 3D i większa grafika. */
.case-postvisual-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:12px}
.dynamic-section-panel,.case-resultants{width:100%;min-width:0}
.section-svg-wrap{width:100%;padding:10px 12px;background:#fff}
#dynamic-section-svg{width:100%;overflow:visible}
#dynamic-section-svg svg{display:block;width:100%;height:auto;max-height:none;overflow:visible}
.section-shell-fill{fill:#eceeef;stroke:none}
.section-outline{fill:none;stroke:#263640;stroke-width:5;stroke-linejoin:round;stroke-linecap:round}
.section-ground-line{stroke:#263640;stroke-width:3}
.section-wall-zone{stroke:#a6a6a6;stroke-width:17;stroke-linecap:butt}
.section-roof-zone{fill:none;stroke:#a6a6a6;stroke-width:18;stroke-linecap:butt}
.section-zone-name{font-size:11px;font-weight:800;fill:#193d59}
.section-zone-value{font-size:13px;font-weight:850;paint-order:stroke;stroke:#fff;stroke-width:2px;stroke-linejoin:round}
.section-load-arrow{fill:none;stroke-width:4;stroke-linecap:round}
.section-load-arrow.pressure{stroke:#d9272e}
.section-load-arrow.suction{stroke:#1268ce}
.section-wind-arrow{stroke:#334b5b;stroke-width:3;fill:none;stroke-linecap:round;stroke-linejoin:round}
.section-wind-dot{fill:#334b5b;stroke:#fff;stroke-width:2}
.section-wind-label{font-size:14px;font-weight:850;fill:#344c5d}
.section-dimension{stroke:#56636c;stroke-width:1.6;fill:none}
.section-dimension-text{font-size:14px;font-weight:800;fill:#34444e}
.section-elevation-text{font-size:12px;font-weight:700;fill:#61717b}
.section-axis-label{font-size:11px;fill:#78858d}
.section-cpi-box{fill:#fff;stroke:#647989;stroke-width:1.5}
.section-cpi-text{font-size:15px;font-weight:800;fill:#203d53}
.section-dimensions{font-size:12px;font-weight:700;background:#f4f6f7;color:#465762;padding:8px 10px}
.section-slider{height:10px;accent-color:#526b7b}
.section-slider::-webkit-slider-thumb{cursor:pointer}

/* Wypadkowe: schemat sił i momentu zamiast przewijanej tabeli. */
.case-resultants{display:flex;flex-direction:column;gap:9px}
.resultant-schematic{width:100%;border:1px solid #e2e8ec;border-radius:8px;background:#fff;padding:8px 12px 4px}
.resultant-schematic svg{display:block;width:100%;height:auto;max-height:390px}
.resultant-building-fill{fill:#f1f3f4}
.resultant-building-outline{fill:none;stroke:#283b48;stroke-width:5;stroke-linejoin:round;stroke-linecap:round}
.resultant-ground{fill:none;stroke:#53616a;stroke-width:3}
.resultant-main-line{font-size:22px;font-weight:850;fill:#1d3546;paint-order:stroke;stroke:#fff;stroke-width:4px;stroke-linejoin:round}
.resultant-moment-line{font-size:15px;font-weight:750;fill:#334956;paint-order:stroke;stroke:#fff;stroke-width:3px}
.resultant-current-caption{margin-top:4px;text-align:center;font-size:12px;color:#60717d}
.resultant-extremes-title{font-size:12px;font-weight:850;color:#334955;margin-top:4px}
.resultant-extremes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.resultant-extreme-card{min-width:0;border:1px solid #dfe6ea;border-radius:7px;background:#fff;padding:10px 12px}
.resultant-extreme-title{font-size:11px;font-weight:800;color:#60717d;margin-bottom:5px}
.resultant-extreme-card>strong{display:block;font-size:19px;line-height:1.25;color:#243b4b;font-variant-numeric:tabular-nums}
.resultant-extreme-secondary{margin-top:5px;font-size:10px;line-height:1.5;color:#4d616f;overflow-wrap:anywhere}
.resultant-extreme-card small{display:block;margin-top:7px;font-size:10px;font-weight:750;color:#536b7b}
@media(max-width:850px){.resultant-extremes{grid-template-columns:1fr}}
@media(max-width:620px){
 .section-svg-wrap{padding:6px}
 .resultant-schematic{padding:4px}
 .resultant-main-line{font-size:25px}
 .resultant-extremes{grid-template-columns:1fr}
}

.visual-reading #selected-value.pressure{color:#d9272e!important}
.visual-reading #selected-value.suction{color:#1268ce!important}
.resultant-moment-line{font-size:18px;font-weight:850;fill:#263f50;paint-order:stroke;stroke:#fff;stroke-width:3px}

.resultant-axis-label{font-size:13px;font-weight:850;fill:#344e60}


/* v1.6.5 — przekrój schematyczny: lekkie linie, drobne strzałki i widoczne pola. */
#dynamic-section-svg svg{max-width:100%;}
.section-shell-fill{fill:#f4f5f5;}
.section-outline{stroke:#202a30;stroke-width:4.4;stroke-linejoin:round;stroke-linecap:round;}
.section-ground-line{stroke:#202a30;stroke-width:2.6;}
.section-roof-zone{stroke:#a6a6a6;stroke-width:4;stroke-linecap:round;fill:none;}
.section-load-arrow{stroke-width:2.3;stroke-linecap:round;stroke-dasharray:none;}
.section-load-arrow.pressure{stroke:#d9272e;}
.section-load-arrow.suction{stroke:#1268ce;}
.section-load-arrow.zero{display:none;}
.section-zone-boundary{stroke:#3d484f;stroke-width:1.4;stroke-dasharray:5 4;fill:none;}
.section-zone-name{font-size:10px;font-weight:850;fill:#193d59;}
.section-zone-value{font-size:12px;font-weight:850;paint-order:stroke;stroke:#fff;stroke-width:1.4px;stroke-linejoin:round;}
.section-dimension{stroke:#28343b;stroke-width:1.35;fill:none;}
.section-dimension-text{font-size:12px;font-weight:800;fill:#202a30;}
.section-cpi-box{fill:#fff;stroke:#23669d;stroke-width:1.4;}
.section-cpi-text{font-size:15px;font-weight:850;fill:#203d53;}
.section-wind-arrow{stroke:#283f4e;stroke-width:2.6;}
.section-wind-label{font-size:13px;font-weight:850;fill:#283f4e;}
.section-dimensions{font-size:11px;line-height:1.5;color:#33434c;}


/* WIND ENGINEER v1.6.5 — legible dynamic section and guaranteed zone separators. */
.section-position-info{
  border:1px solid #dce5ea;
  border-left:4px solid #527184;
  border-radius:6px;
  padding:9px 12px;
  background:#f4f7f8;
  color:#3f515d;
  font-size:11px;
  line-height:1.5;
  font-weight:600;
}
.section-zone-boundary{
  stroke:#253a48;
  stroke-width:2.2;
  stroke-dasharray:5 3;
  stroke-linecap:butt;
  fill:none;
  vector-effect:non-scaling-stroke;
}
.section-load-arrow{stroke-width:2.6;}
.section-load-arrow.pressure{stroke:#d9272e;}
.section-load-arrow.suction{stroke:#1268ce;}

/* WIND ENGINEER v1.6.7 — engineering drawing refinement and cpi indication */
#dynamic-section-svg svg{display:block;width:100%;height:auto;max-height:none;background:#fff}
.section-shell-fill{fill:#fff;stroke:none}
.section-outline{fill:none;stroke:#151c20;stroke-width:4.4;stroke-linejoin:round;stroke-linecap:round}
.section-ground-line{fill:none;stroke:#151c20;stroke-width:2.8}
.section-load-field,.section-wall-load{pointer-events:none}
.section-distributed-rail{fill:none;stroke-width:2.2;stroke-linecap:round}
.section-distributed-tick{fill:none;stroke-width:1.45;stroke-linecap:round}
.section-distributed-tick.pressure{stroke:#d9272e}
.section-distributed-tick.suction{stroke:#1268ce}
.section-load-value{font-size:15px;font-weight:800;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round}
.section-wall-value{font-size:15px}
.section-zone-boundary{stroke:#6c777e;stroke-width:1.3;stroke-dasharray:4 4;fill:none}
.section-dimension{stroke:#26343d;stroke-width:1.3;fill:none}
.section-dimension-extension{stroke:#73818a;stroke-width:1;fill:none}
.section-dimension-text{font-size:13px;font-weight:800;fill:#202a30;paint-order:stroke;stroke:#fff;stroke-width:3px}
.section-elevation-text{font-size:12px;font-weight:700;fill:#66737b}
.section-cpi-text{font-size:16px;font-weight:800;fill:#263e4c;paint-order:stroke;stroke:#fff;stroke-width:4px}
.section-wind-arrow{stroke:#263e4c;stroke-width:2.6;fill:none;stroke-linecap:round;stroke-linejoin:round}
.section-wind-label{font-size:13px;font-weight:850;fill:#263e4c}
.section-dimensions{margin-top:5px;border:1px solid #dfe5e8;border-radius:6px;background:#f6f8f9;padding:8px 11px;color:#40515c;font-size:12px;font-weight:700;line-height:1.4;font-variant-numeric:tabular-nums}
.section-position-info{border:0;border-left:3px solid #91a2ac;border-radius:0;background:#f7f9fa;padding:5px 10px;color:#566671;font-size:11px;line-height:1.35;font-weight:650}
.section-svg-wrap{background:#fff;border:1px solid #e0e6e9;border-radius:8px;padding:8px 12px}

/* Global resultants: compact vector diagram with each signed value next to its arrow. */
.resultant-schematic{width:100%;border:1px solid #e0e6e9;border-radius:8px;background:#fff;padding:8px 12px 4px}
.resultant-schematic svg{display:block;width:100%;height:auto;max-height:330px}
.resultant-building-fill{fill:#fafbfb}
.resultant-building-outline{fill:none;stroke:#202a30;stroke-width:4;stroke-linejoin:round;stroke-linecap:round}
.resultant-ground{fill:none;stroke:#45525a;stroke-width:2.5}
.result-vector{fill:none;stroke:#263e4c;stroke-width:3.2;stroke-linecap:round}
.result-vector-value{font-size:17px;font-weight:850;fill:#253b49;paint-order:stroke;stroke:#fff;stroke-width:4px;stroke-linejoin:round}
.result-vector-symbol{fill:#fff;stroke:#263e4c;stroke-width:3}
.result-vector-symbol-fill{fill:#263e4c}
.result-vector-symbol-cross{fill:none;stroke:#263e4c;stroke-width:3;stroke-linecap:round}
.result-axis-note{font-size:13px;font-weight:800;fill:#536671}
.result-moment-vector{fill:none;stroke:#263e4c;stroke-width:3.1;stroke-linecap:round}
.resultant-current-caption{margin-top:5px;text-align:center;font-size:11px;color:#586a75;line-height:1.4}
.resultant-extremes-title{font-size:12px;font-weight:850;color:#334955;margin-top:6px}
.resultant-extremes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.resultant-extreme-card{min-width:0;border:1px solid #dfe6ea;border-radius:7px;background:#fff;padding:9px 10px}
.resultant-extreme-title{font-size:11px;font-weight:800;color:#60717d;margin-bottom:5px}
.resultant-extreme-card>strong{display:block;font-size:17px;line-height:1.25;color:#243b4b;font-variant-numeric:tabular-nums}
.resultant-extreme-secondary{margin-top:5px;font-size:10px;line-height:1.45;color:#4d616f;overflow-wrap:anywhere}
.resultant-extreme-card small{display:block;margin-top:6px;font-size:10px;font-weight:750;color:#536b7b}
@media(max-width:760px){.resultant-extremes{grid-template-columns:1fr}.section-load-value{font-size:13px}.section-dimension-text{font-size:11px}}
.section-load-value,.section-dimension-text,.section-elevation-text,.section-cpi-text{stroke:none!important;paint-order:normal!important}
.result-vector-value{font-size:16px;font-weight:850;fill:#253b49;stroke:none!important;paint-order:normal!important}
.result-moment-vector{fill:none;stroke:#263e4c;stroke-width:3.1;stroke-linecap:round}

/* Internal pressure acting on the envelope: positive pushes outward, negative sucks inward. */
.section-cpi-arrow{fill:none;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.section-cpi-arrow.positive{stroke:#d9272e}
.section-cpi-arrow.negative{stroke:#1268ce}
.section-cpi-arrows{pointer-events:none}

/* Navigation link to the independent localization map module */
.topbar .map-back{margin-left:auto;color:var(--text);text-decoration:none;font-size:12px;font-weight:700;border:1px solid var(--line);padding:9px 12px;border-radius:9px;white-space:nowrap}.topbar .map-back:hover{border-color:var(--accent);color:var(--accent)}
