/* Wspolny naglowek i tokeny MJKM sa osadzane przez PHP; tutaj pozostaja style kalkulatora. */
:root {
  --chart-control-x-min-left: calc(10% + 54px);
  --chart-control-x-min-bottom: 24px;
  --chart-control-x-max-left: calc(80% - 14px);
  --chart-control-x-max-bottom: 24px;
  --chart-control-y-min-left: 36px;
  --chart-control-y-min-top: calc(88.5% - 20px);
  --chart-control-y-max-left: 36px;
  --chart-control-y-max-top: calc(11.2% + 12px);
  --chart-control-auto-left: 40px;
  --chart-control-auto-bottom: 38px;
  --detail-chart-picker-width: max-content;
}



* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-y: scroll;
  background-color: var(--bg);
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
}

button,
input,
select,
table {
  font: inherit;
}

code {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--code-bg);
  color: var(--heading);
  font-size: var(--fs-base);
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.layout {
  display: grid;
  gap: var(--space-grid);
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.94fr) minmax(0, 1.06fr);
  gap: var(--space-grid);
}

.panel-config .panel-grid {
  grid-template-columns: minmax(0, 1fr) 532px;
  column-gap: var(--space-grid);
  justify-content: stretch;
  align-items: stretch;
}

.panel-config .config-choice-stack {
  grid-column: 1;
  min-width: 0;
}

.panel-config .card-general {
  grid-column: 2;
  min-width: 0;
}

.config-choice-stack {
  display: grid;
  gap: var(--space-grid);
  align-content: start;
}

.panel-grid-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-grid);
  margin-bottom: var(--space-grid);
  align-items: start;
}

.results-overview-grid {
  display: block;
  margin-bottom: var(--space-grid);
}

.results-summary-card {
  width: 100%;
  max-width: 100%;
  --summary-metrics-table-width: 260px;
  --summary-family-card-width: 320px;
  --summary-result-card-min-height: 370px;
}

.results-summary-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.38fr) minmax(0, 1fr);
  justify-content: stretch;
  gap: var(--space-grid);
  align-items: stretch;
}

.results-summary-part {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.results-table-sections {
  display: grid;
  gap: var(--space-grid);
}

.results-table-section {
  display: grid;
  gap: var(--space-row);
  padding-top: var(--space-grid);
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.results-table-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.results-section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 10px 20px;
}

.results-section-head h3 {
  margin: 0;
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: var(--fs-heading);
  font-weight: 700;
  line-height: 1.2;
}

.results-section-head .section-label {
  margin-bottom: 6px;
}

.results-table-note {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.55;
  max-width: 70ch;
}

.results-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  justify-content: center;
  gap: var(--space-grid);
  align-items: stretch;
  min-width: 756px;
}

.detail-top-stack {
  display: grid;
  gap: var(--space-grid);
  margin-bottom: var(--space-grid);
}

.theory-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-grid);
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-grid);
}

.how-card-head-wide {
  max-width: none;
}

.how-intro-copy {
  max-width: none;
  font-size: var(--fs-small);
  line-height: 1.62;
  text-wrap: pretty;
}

.how-summary-copy {
  max-width: none;
  font-size: var(--fs-small);
  line-height: 1.62;
  text-wrap: pretty;
}

.how-nowrap-line {
  white-space: nowrap;
}

.theory-card-wide {
  grid-column: auto;
}

.card-general {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  align-self: stretch;
  width: max-content;
  max-width: 100%;
  height: auto;
  gap: var(--space-grid);
  padding-right: 22px;
  padding-left: 22px;
}

.section-label {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-head p {
  margin: 0 0 18px;
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.7;
  text-align: left;
}

.card-general > .card-head p {
  text-align: justify;
}

.card-general > .card-head {
  width: 100%;
  max-width: none;
}

.input-warning {
  margin: 0;
  padding: 0;
  border-top: 0;
  color: var(--danger);
  text-align: justify;
}

.input-warning strong {
  color: var(--danger);
}

.model-warning {
  margin: 0;
  padding: 0;
  border-top: 0;
  color: var(--danger);
  line-height: 1.7;
  text-align: justify;
}

.model-warning strong {
  color: var(--danger);
}

.summary-warning {
  display: block;
  width: calc(100% + 50px);
  max-width: calc(100% + 50px);
  margin: 34px 0 0;
  color: var(--danger);
  font-size: var(--fs-small);
  line-height: 1.55;
  text-align: justify;
}

.summary-warning strong {
  color: var(--danger);
}

.theory-card {
  padding: var(--space-card-y) var(--space-card-x);
}

.theory-card-head-wide {
  max-width: 118ch;
}
.panel-theory > .theory-grid > .theory-card:first-child > .card-head {
  max-width: none;
  margin-bottom: var(--space-grid);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.theory-nowrap-line {
  white-space: nowrap;
}

.theory-formula {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  background: transparent;
}

.theory-formula-ncr .formula-figure {
  max-width: min(100%, 600px);
  padding: 10px 12px;
}

.theory-formula-compact {
  margin-bottom: 0;
}

.formula-gallery {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.equation-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-grid);
  margin-top: var(--space-row);
}

.equation-note {
  padding: var(--space-subcard-y) var(--space-subcard-x);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.equation-note h3 {
  margin: 0 0 6px;
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: var(--fs-heading);
}

.equation-note p {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.65;
}

.formula-caption {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.formula-figure {
  display: block;
  width: auto;
  max-width: min(100%, 900px);
  height: auto;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-plain);
}

.formula-figure-small {
  max-height: 70px;
  padding: 8px 10px;
}

.formula-gallery .theory-formula:nth-child(1) .formula-figure-small,
.formula-gallery .theory-formula:nth-child(3) .formula-figure-small {
  max-height: 92px;
}

.formula-gallery .theory-formula:nth-child(2) .formula-figure-small {
  max-height: 67px;
}

.theory-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: var(--fs-base);
}

.panel-how .theory-list {
  padding-top: 13px;
}

.theory-list li + li {
  margin-top: 8px;
}

.theory-list .theory-warning {
  color: var(--danger);
  font-weight: 800;
}

.theory-list .theory-rkrp-note {
  color: var(--text);
  font-weight: 400;
}

.theory-list .theory-rkrp-note-alert {
  color: var(--text);
  font-weight: 400;
}

.theory-flow {
  display: grid;
  gap: var(--space-row);
}

.theory-section {
  padding: 14px 0;
  border-top: 1px solid var(--line-ghost);
}

.theory-section:first-child {
  border-top: 0;
  padding-top: 2px;
}

.theory-section h3 {
  margin: 0 0 6px;
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: var(--fs-heading);
  font-weight: 700;
}

.theory-section p,
.theory-section .theory-list {
  margin-bottom: 0;
  line-height: 1.7;
}

.how-flow {
  display: grid;
  gap: var(--space-row);
}

.how-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: var(--space-row);
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line-ghost);
}

.how-step:first-child {
  border-top: 0;
  padding-top: 2px;
}

.how-step-number {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface-accent);
  border: 1px solid var(--line);
  color: var(--heading);
  font-weight: 700;
  font-size: var(--fs-base);
}

.how-step h3 {
  margin: 0 0 6px;
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: var(--fs-heading);
  font-weight: 700;
}

.how-step p {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

.how-summary dt {
  min-width: 110px;
}

.how-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.7;
}

.how-notation-list {
  margin-top: 2px;
}

.equation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.equation-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  border-radius: 0;
}

.equation-line {
  margin: 0 0 8px;
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: var(--fs-heading);
  font-weight: 700;
  line-height: 1.45;
}

.equation-text {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.65;
  max-width: 72ch;
}

.theory-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-plain);
}

.theory-card-schemes .card-head {
  align-items: flex-start;
}

.theory-inline-copy {
  white-space: nowrap;
  font-size: var(--fs-small);
}

.theory-table-wrap-fit {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.theory-table-wrap-reference {
  display: block;
  margin-top: 8px;
}

.theory-table-wrap-reference-narrow {
  display: block;
  width: min(100%, 560px);
  max-width: 560px;
  margin-right: auto;
  min-width: 0;
  overflow: hidden;
}

.theory-table.theory-table-fit {
  width: auto;
  min-width: 860px;
}

.theory-reference-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.theory-table-wrap-imperfection {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin-left: auto;
}

.theory-reference-stack {
  display: inline-grid;
  gap: 12px;
  justify-items: start;
  width: min(100%, 560px);
}

.theory-reference-stack-wide {
  display: grid;
  width: 100%;
}

.theory-imperfection-table {
  width: auto;
  min-width: 0;
}

.theory-imperfection-table th,
.theory-imperfection-table td {
  text-align: center;
  width: auto;
  vertical-align: middle;
}

.theory-imperfection-table th:first-child,
.theory-imperfection-table td:first-child {
  text-align: left;
}

.theory-reference-table th,
.theory-reference-table td {
  padding: 14px 16px;
  font-size: var(--fs-base);
  line-height: 1.55;
  vertical-align: middle;
}

.theory-reference-table th {
  font-size: var(--fs-base);
}

.theory-reference-table th:nth-child(1),
.theory-reference-table td:nth-child(1) {
  width: 27%;
}

.theory-reference-table th:nth-child(2),
.theory-reference-table td:nth-child(2) {
  width: 34%;
  text-align: center;
}

.theory-reference-table th:nth-child(3),
.theory-reference-table td:nth-child(3) {
  width: 39%;
  text-align: center;
}

.buckling-curve-reference-table {
  min-width: 720px;
}

.buckling-curve-reference-table caption,
.theory-imperfection-table caption {
  padding: 12px 14px;
  color: var(--heading);
  font-weight: 800;
  text-align: left;
}

.buckling-curve-reference-table th,
.buckling-curve-reference-table td {
  text-align: center;
  vertical-align: middle;
}

.buckling-curve-reference-table th:first-child,
.buckling-curve-reference-table td:first-child,
.buckling-curve-reference-table th:nth-child(2),
.buckling-curve-reference-table td:nth-child(2) {
  text-align: left;
}

.theory-table {
  width: 100%;
  border-collapse: collapse;
}

.theory-table th,
.theory-table td {
  padding: var(--space-cell-y) var(--space-cell-x);
  border-bottom: 1px solid var(--line-faint);
  font-size: var(--fs-base);
  text-align: left;
  vertical-align: top;
}

.theory-table thead th {
  background: var(--panel-soft);
  color: var(--heading);
  font-weight: 700;
}

.revisions-table {
  width: auto;
  min-width: 0;
}

.revisions-table th:nth-child(1),
.revisions-table td:nth-child(1),
.revisions-table th:nth-child(2),
.revisions-table td:nth-child(2) {
  text-align: center;
  width: 1%;
  white-space: nowrap;
}

.revisions-table th:nth-child(3),
.revisions-table td:nth-child(3) {
  text-align: left;
  width: 1%;
  white-space: nowrap;
}

.theory-card-schemes .theory-table th,
.theory-card-schemes .theory-table td {
  text-align: center;
  vertical-align: middle;
}

.theory-card-schemes .theory-table th:first-child,
.theory-card-schemes .theory-table td:first-child {
  width: 1%;
  white-space: nowrap;
}

.theory-card-schemes .theory-table th:nth-child(2),
.theory-card-schemes .theory-table td:nth-child(2) {
  text-align: left;
}

.theory-card-schemes .theory-scheme-cell {
  grid-template-columns: minmax(180px, 1fr) 176px;
  justify-items: start;
}

.theory-card-schemes .theory-scheme-copy {
  text-align: left;
}

.theory-card-schemes .theory-scheme-graphic {
  justify-self: end;
}

.theory-scheme-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 14px;
  align-items: center;
}

.theory-scheme-copy strong {
  display: block;
  color: var(--heading);
  font-size: var(--fs-base);
  line-height: 1.35;
}

.theory-scheme-graphic {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 3px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.theory-scheme-graphic svg,
.theory-scheme-graphic img {
  display: block;
  width: 100%;
  height: auto;
}

.notation-list {
  display: table;
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  border-top: 0;
}

.notation-list div {
  display: table-row;
  background: transparent;
}

.notation-list dt {
  display: table-cell;
  padding: var(--space-cell-y) 30px var(--space-cell-y) 0;
  border-bottom: 0;
  color: var(--heading);
  font-weight: 700;
  white-space: nowrap;
  vertical-align: top;
}

.panel-theory .notation-list dt {
  text-align: center;
}

.notation-list dd {
  display: table-cell;
  width: 100%;
  padding: var(--space-cell-y) 0;
  border-bottom: 0;
  margin: 0;
  color: var(--text);
  vertical-align: top;
}

.notation-list.how-notation-list dd {
  vertical-align: middle;
  white-space: nowrap;
}

.notation-list div:not(:last-child) dt,
.notation-list div:not(:last-child) dd {
  border-bottom: 1px solid var(--line-soft);
}

.bibliography-list {
  margin: 0;
  padding-left: 20px;
}

.bibliography-item {
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 1.7;
}

.bibliography-item + .bibliography-item {
  margin-top: 12px;
}

.scheme-list {
  display: grid;
  gap: var(--space-row);
}

.scheme-list-theory {
  margin-bottom: var(--space-row);
}

.scheme-card {
  border: 1px solid var(--line);
  background: var(--surface-plain);
  border-radius: 14px;
  padding: var(--space-subcard-y) var(--space-subcard-x);
  display: grid;
  grid-template-columns: 18px 240px 210px;
  gap: var(--space-row);
  align-items: center;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  min-height: 118px;
}

.scheme-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.scheme-card.is-selected {
  border-color: var(--brand);
  background: var(--surface-selected);
  box-shadow: var(--shadow);
}

.scheme-card.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.scheme-card input {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  align-self: center;
  justify-self: center;
}

.scheme-indicator {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  align-self: center;
  justify-self: center;
  background: var(--surface-plain);
}

.scheme-card-static {
  cursor: default;
}

.scheme-card-static:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.scheme-copy strong {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: var(--fs-choice);
  line-height: 1.35;
  white-space: nowrap;
}

.scheme-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--brand);
  font-size: var(--fs-small);
  font-weight: 700;
}

.scheme-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-accent);
  border: 1px solid var(--line);
}

.scheme-visual {
  width: 210px;
  min-height: 66px;
  padding: 4px 5px;
  border-radius: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  justify-self: start;
}

.scheme-visual svg,
.scheme-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.scheme-image,
.theory-scheme-image {
  object-fit: contain;
}

.input-grid {
  display: grid;
  gap: var(--space-row);
}

.general-layout {
  display: grid;
  grid-template-columns: max-content 260px;
  justify-content: start;
  gap: 12px;
  align-items: start;
}

.general-form-column {
  --general-label-width: 180px;
  --general-control-width: 108px;
  display: grid;
  gap: var(--space-row);
  padding: var(--space-subcard-y) var(--space-subcard-x);
  padding-right: 16px;
  padding-left: 16px;
  border-radius: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  min-width: 0;
  width: max-content;
  max-width: none;
  align-self: stretch;
  height: 100%;
  box-sizing: border-box;
  justify-items: center;
  text-align: center;
}

.input-grid-general {
  grid-template-columns: 1fr;
  row-gap: var(--space-row);
  max-width: var(--general-label-width);
  justify-items: center;
}

.card-general .field {
  gap: 3px;
  width: var(--general-label-width);
  max-width: 100%;
  justify-items: center;
  text-align: center;
}

.card-general .field > span {
  white-space: nowrap;
  text-align: center;
}

.card-general .field > input,
.card-general .field > select,
.card-general .number-stepper {
  width: min(100%, var(--general-control-width));
  justify-self: center;
}

.card-general .field-note {
  max-width: var(--general-label-width);
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.35;
  text-align: center;
}

.general-form-head {
  width: 100%;
  text-align: center;
}

.general-form-head h2 {
  margin-bottom: 0;
}

.field-centered-control select {
  text-align: center;
  text-align-last: center;
}

.inertia-axis-field {
  position: relative;
  z-index: 20;
}

.inertia-axis-picker {
  position: relative;
  width: min(100%, var(--general-control-width));
  justify-self: center;
}

.inertia-axis-picker-toggle {
  position: relative;
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 24px 0 8px;
  background: var(--surface-plain);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-small);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.inertia-axis-picker-toggle > span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: center;
}

.inertia-axis-picker-toggle:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.inertia-axis-picker-toggle sub,
.inertia-axis-picker-option sub {
  font-size: 75%;
  line-height: 0;
}

.inertia-axis-picker-chevron {
  position: absolute;
  right: 10px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.inertia-axis-picker.is-open .inertia-axis-picker-chevron {
  transform: rotate(225deg) translateY(-1px);
}

.inertia-axis-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 70;
  width: 100%;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.inertia-axis-picker-option {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 6px 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-small);
  text-align: center;
  cursor: pointer;
}

.inertia-axis-picker-option:hover,
.inertia-axis-picker-option:focus,
.inertia-axis-picker-option.is-selected {
  outline: none;
  background: var(--surface-selected);
}

.profile-nested-field {
  position: relative;
  z-index: 30;
}

.profile-picker {
  position: relative;
  width: var(--general-label-width);
  display: grid;
  justify-items: center;
}

.profile-picker-toggle {
  width: min(100%, var(--general-control-width));
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 8px;
  background: var(--surface-plain);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-small);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.profile-picker-toggle:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.profile-picker-chevron,
.profile-picker-family-chevron {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.profile-picker.is-open .profile-picker-chevron,
.profile-picker-family.is-expanded .profile-picker-family-chevron {
  transform: rotate(225deg) translateY(-1px);
}

.profile-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 80;
  width: 260px;
  min-width: 260px;
  max-height: min(620px, calc(100vh - 80px));
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.profile-picker-group + .profile-picker-group {
  margin-top: 4px;
}

.profile-picker-family,
.profile-picker-profile {
  width: 100%;
  border: 0;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.profile-picker-family {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--surface-plain);
  display: grid;
  grid-template-columns: 14px 1fr 14px;
  align-items: center;
  font-size: var(--fs-small);
  font-weight: 700;
  text-align: center;
}

.profile-picker-family > span:first-child {
  grid-column: 2;
  justify-self: center;
}

.profile-picker-family .profile-picker-family-chevron {
  grid-column: 3;
  justify-self: center;
}

.profile-picker-family:hover,
.profile-picker-profile:hover {
  background: var(--surface-selected);
}

.profile-picker-profile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px 2px 2px;
}

.profile-picker-profile-column {
  display: grid;
  gap: 4px;
  align-content: start;
}

.profile-picker-profile {
  min-height: 28px;
  padding: 0 6px;
  border-radius: 7px;
  background: transparent;
  font-size: var(--fs-small);
  text-align: center;
}

.profile-picker-profile.is-selected {
  background: var(--surface-selected);
  color: var(--heading);
  font-weight: 700;
}

body[data-calculator-id="steel-nbrd"].has-profile-picker-modal {
  overflow: hidden;
}

body[data-calculator-id="steel-nbrd"] #profile-picker-menu.profile-picker-menu {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  align-items: center;
  justify-items: center;
  width: auto;
  min-width: 0;
  max-height: none;
  overflow: auto;
  padding: 24px;
  border: 0;
  border-radius: 0;
  background: var(--overlay);
  box-shadow: none;
  transform: none;
}

body[data-calculator-id="steel-nbrd"] #profile-picker-menu.profile-picker-menu[hidden] {
  display: none;
}

body[data-calculator-id="steel-nbrd"] .profile-picker-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  width: min(940px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  padding: var(--space-subcard-y) var(--space-subcard-x);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-plain);
  box-shadow: var(--shadow);
}

body[data-calculator-id="steel-nbrd"] .profile-picker-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

body[data-calculator-id="steel-nbrd"] .profile-picker-dialog-head h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: var(--fs-heading);
}

body[data-calculator-id="steel-nbrd"] .profile-picker-close-button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface-plain);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 700;
  cursor: pointer;
}

body[data-calculator-id="steel-nbrd"] .profile-picker-close-button:hover,
body[data-calculator-id="steel-nbrd"] .profile-picker-close-button:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

body[data-calculator-id="steel-nbrd"] .profile-picker-search {
  display: grid;
  gap: 6px;
  max-width: 360px;
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 700;
}

body[data-calculator-id="steel-nbrd"] .profile-picker-search input {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-base);
}

body[data-calculator-id="steel-nbrd"] .profile-picker-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

body[data-calculator-id="steel-nbrd"] .profile-picker-modal-menu {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

body[data-calculator-id="steel-nbrd"] .profile-picker-modal-menu .profile-picker-group + .profile-picker-group {
  margin-top: 0;
}

body[data-calculator-id="steel-nbrd"] .profile-picker-modal-menu .profile-picker-family {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  font-size: var(--fs-base);
}

body[data-calculator-id="steel-nbrd"] .profile-picker-modal-menu .profile-picker-profile-list {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  min-width: 0;
  gap: 8px;
  padding: 10px 8px 8px;
}

body[data-calculator-id="steel-nbrd"] .profile-picker-modal-menu .profile-picker-profile {
  min-height: 34px;
  padding: 0 10px;
  font-size: var(--fs-base);
  text-align: left;
}

body[data-calculator-id="steel-nbrd"] .profile-picker-modal-menu .profile-picker-profile-list.is-centered-family .profile-picker-profile {
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .profile-picker-empty {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.field > span {
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
}

.field select:disabled,
.field option:disabled {
  color: var(--line-strong);
}

.field-note {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.45;
  text-align: left;
}

.formula-card {
  margin: 0;
  border: 0;
  padding: 14px 0 2px;
  border-top: 1px solid var(--line-ghost);
  border-bottom: 1px solid var(--line-ghost);
  background: transparent;
}

.formula-value-box {
  display: grid;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.formula-value-box span {
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 700;
}

.formula-expression {
  color: var(--text);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.55;
}

.formula-expression math,
.detail-calculation-line math,
.detail-calculation-result math {
  max-width: 100%;
  overflow: visible;
  color: var(--text);
  font-size: 1.08em;
}

.formula-expression math {
  justify-self: start;
}

.detail-calculation-line > div math,
.detail-calculation-result > div math {
  margin: 2px 0 6px;
}

.detail-calculation-line > div p,
.detail-calculation-result > div p {
  margin: 8px 0 0;
}

.mathml-wrap {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0 10px;
}

.mathml-equation {
  display: block;
  width: max-content;
  max-width: none;
  color: var(--text);
  font-family: var(--font-math);
  font-size: var(--fs-heading);
  line-height: 1.6;
}

.detail-mathml-wrap {
  display: block;
  width: 100%;
  padding-bottom: 8px;
  text-align: left;
}

.detail-mathml-stack {
  display: grid;
  justify-content: start;
  justify-items: start;
  gap: 0.3em;
}

.detail-mathml-row {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0;
  text-align: left;
}

.detail-mathml-equation {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0 auto 0 0 !important;
  font-size: var(--fs-base);
  line-height: 1.6;
  text-align: left;
  vertical-align: top;
}

.detail-mathml-result-strong,
.detail-mathml-result-strong mtext {
  font-weight: 700;
}

.formula-card .mathml-wrap,
.detail-calculation-line .mathml-wrap,
.detail-calculation-result .mathml-wrap {
  padding-bottom: 6px;
}

.formula-card .mathml-equation,
.detail-calculation-line .mathml-equation,
.detail-calculation-result .mathml-equation {
  font-size: var(--fs-base);
}

.detail-calculation-line .mathml-wrap + .mathml-wrap {
  margin-top: 8px;
}

.formula-value-box-full {
  justify-self: start;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.card-general .actions {
  margin-top: 2px;
  padding-top: 0;
}

.preview-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  padding: var(--space-subcard-y) var(--space-subcard-x);
  padding-right: 14px;
  padding-left: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-plain);
  box-shadow: none;
  min-width: 0;
  width: 260px;
  max-width: none;
  justify-self: start;
  align-self: stretch;
  height: 100%;
  box-sizing: border-box;
}

.preview-card .card-head h2,
.result-hero .card-head h2,
.result-families .card-head h2,
.table-card .card-head h2 {
  font-size: var(--fs-heading);
}

.preview-card .card-head {
  text-align: center;
}

.preview-card .card-head p {
  text-align: center;
}

.preview-card .card-head,
.table-card .card-head {
  max-width: none;
}

.preview-card .card-head p,
.table-card .card-head p {
  font-size: var(--fs-base);
}

.preview-result {
  display: grid;
  justify-items: center;
  align-self: start;
  align-content: start;
  gap: var(--space-row);
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  text-align: center;
}

.preview-name {
  margin: 0;
  color: var(--good);
  font-family: var(--font-heading);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
}

.preview-result .preview-head {
  display: grid;
  justify-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-align: center;
}

.preview-result .hero-card-head,
.preview-card .hero-card-head {
  display: grid;
  justify-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  text-align: center;
}

.preview-card .hero-card-inner {
  width: 100%;
  justify-items: center;
}

.preview-result .preview-name {
  width: 100%;
  text-align: center;
}

.preview-result .status-pill {
  justify-self: center;
}

.preview-result .status-pill.is-fail {
  border-color: var(--danger);
  background: var(--status-danger-bg);
  color: var(--danger);
}

.preview-result .preview-head:has(.status-pill.is-fail) .preview-name {
  color: var(--danger);
}

.preview-result .hero-card-head:has(.status-pill.is-fail) .preview-name {
  color: var(--danger);
}

.preview-result.is-fail .preview-name {
  color: var(--danger);
}

.preview-result:has(.status-pill.is-pass) .result-metrics div:nth-child(4) dt,
.preview-result:has(.status-pill.is-pass) .result-metrics div:nth-child(4) dd {
  color: var(--good);
}

.preview-result:has(.status-pill.is-fail) .result-metrics div:nth-child(4) dt,
.preview-result:has(.status-pill.is-fail) .result-metrics div:nth-child(4) dd {
  color: var(--danger);
}

.preview-metrics-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--text);
  font-size: var(--fs-small);
  line-height: 1.35;
}

.preview-metrics-table th:first-child,
.preview-metrics-table td:first-child {
  width: 42%;
}

.preview-metrics-table th:last-child,
.preview-metrics-table td:last-child {
  width: 58%;
}

.preview-metrics-table th,
.preview-metrics-table td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
  vertical-align: middle;
}

.preview-metrics-table thead th {
  border-top: 1px solid var(--line-soft);
}

.preview-metrics-table th {
  color: var(--text);
  font-weight: 700;
}

.preview-metrics-table td {
  color: var(--text);
  font-weight: 700;
}

.preview-metrics-table tbody tr:last-child th,
.preview-metrics-table tbody tr:last-child td {
  border-bottom: 1px solid var(--line-soft);
}

.preview-result:has(.status-pill.is-pass) .preview-utilization-row td {
  color: var(--good);
}

.preview-result:has(.status-pill.is-fail) .preview-utilization-row td {
  color: var(--danger);
}

.preview-result.is-pass .preview-utilization-row td {
  color: var(--good);
}

.preview-result.is-fail .preview-utilization-row td {
  color: var(--danger);
}

.preview-mass-ratio-row.is-reference td {
  color: var(--good);
}

.preview-mass-ratio-row.is-heavy td {
  color: var(--danger);
}

.preview-metrics,
.result-metrics,
.family-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
}

.preview-metrics div,
.result-metrics div,
.family-metrics div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  justify-items: center;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  border-radius: 0;
  text-align: center;
}

.preview-metrics div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  text-align: center;
}

.preview-metrics div:last-child,
.result-metrics div:last-child,
.family-metrics div:last-child {
  border-bottom: 0;
}

.preview-metrics dt,
.result-metrics dt,
.family-metrics dt {
  color: var(--muted);
  font-size: var(--fs-small);
  margin: 0;
}

.preview-metrics dd,
.result-metrics dd,
.family-metrics dd {
  margin: 0;
  color: var(--heading);
  font-size: var(--fs-base);
  font-weight: 700;
  text-align: center;
}

.preview-metrics dt,
.preview-metrics dd {
  text-align: center;
}

.preview-result .result-metrics {
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.preview-result .result-metrics div {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  justify-items: stretch;
  column-gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line-soft);
}

.preview-result .result-metrics div:last-child {
  border-bottom: 0;
}

.preview-result .result-metrics dt {
  color: var(--text);
  text-align: left;
}

.preview-result .result-metrics dd {
  color: var(--text);
  text-align: right;
}

.button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface-plain);
  color: var(--text);
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.button-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-inverse);
}

.hero-card {
  min-height: 0;
  padding: var(--space-subcard-y) var(--space-subcard-x);
  border-radius: 12px;
  background: var(--surface-plain);
  border: 1px solid var(--line);
  box-shadow: none;
}

.empty-state {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.6;
}

.empty-state-action-card {
  padding: var(--space-card-y) var(--space-card-x);
}

.empty-state-action {
  display: grid;
  justify-items: center;
  gap: var(--space-row);
  width: 100%;
}

.empty-state-action p {
  margin: 0;
  max-width: 30ch;
}

.best-profile-name {
  margin: 0 0 8px;
  color: var(--good);
  font-family: var(--font-heading);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.04;
  text-align: center;
}

#best-profile-description,
.result-families .card-head p {
  font-size: var(--fs-base);
  line-height: 1.65;
  text-align: left;
  white-space: normal;
  max-width: none;
}

.family-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-row);
}

.family-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--space-subcard-y) var(--space-subcard-x);
  background: var(--surface-plain);
  box-shadow: none;
}

.family-card-profile {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
}

.family-card-placeholder {
  grid-column: 1 / -1;
  min-height: 220px;
  align-content: center;
}

.family-profile-name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-heading);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  color: var(--text);
}

.family-profile-name-empty {
  color: var(--muted);
}

.family-empty-message {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.7;
  text-align: center;
  white-space: normal;
}

.family-empty-message .family-empty-family,
.family-empty-message .family-empty-text {
  display: block;
}

.family-empty-message .family-empty-family {
  font-weight: 700;
}

.family-card-empty {
  justify-items: center;
}

.family-card-empty .family-result-head,
.family-card-empty .section-label {
  width: 100%;
  text-align: center;
}

.family-result-card .section-label {
  margin-bottom: 0;
  color: var(--text);
}

.family-result-card .profile-name-action {
  font-size: var(--fs-heading);
}

.family-result-card .profile-name-action.preview-name {
  font-size: var(--fs-display);
}

.result-families .family-result-card .profile-name-action.preview-name,
.result-families .family-result-card .preview-name {
  color: var(--good);
  font-family: var(--font-heading);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.05;
}

.family-result-card .preview-metrics-table {
  width: min(100%, 260px);
  margin-inline: auto;
  table-layout: auto;
}

.results-summary-card .preview-metrics-table {
  width: min(100%, var(--summary-metrics-table-width));
  max-width: 100%;
  margin-inline: auto;
}

.summary-input-data {
  width: min(270px, 100%);
  margin: 10px 0 0;
  padding-top: 0;
  border-top: 0;
  color: var(--text);
  font-size: var(--fs-small);
  line-height: 1.55;
  text-align: left;
}

.summary-input-data strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 700;
}

.summary-input-data .summary-warning strong {
  display: inline;
  margin-bottom: 0;
  color: var(--danger);
}

.summary-input-data p {
  margin: 0;
}

.summary-input-data dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.summary-input-data dl div {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  align-items: start;
}

.summary-input-data dt,
.summary-input-data dd {
  margin: 0;
}

.summary-input-data dt {
  color: var(--muted);
  font-weight: 700;
}

.summary-input-data dd {
  color: var(--text);
  font-weight: 700;
}

.result-hero,
.result-families,
.detail-metrics-card,
.chart-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.result-hero .hero-card,
.result-families .family-cards {
  flex: 1;
}

.table-card {
  margin-top: 0;
  padding: var(--space-card-y) var(--space-card-x);
  display: flex;
  flex-direction: column;
  gap: var(--space-row);
  width: 100%;
  max-width: none;
  justify-self: stretch;
  height: 100%;
}

.table-wrap {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-plain);
}

.results-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.results-table th,
.results-table td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-faint);
  text-align: center;
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}

.results-table th:first-child,
.results-table td:first-child {
  text-align: left;
  width: 1%;
}

.results-table th:not(:first-child),
.results-table td:not(:first-child) {
  width: 1%;
}

.results-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-table-head);
  color: var(--heading);
  font-weight: 700;
  vertical-align: middle;
  z-index: 1;
}

.table-head-stack {
  display: inline-grid;
  gap: 2px;
  align-items: center;
  justify-items: center;
  line-height: 1.15;
  vertical-align: middle;
}

.results-table tbody tr:nth-child(even) {
  background: var(--surface-table-even);
}

.results-table tbody tr:hover {
  background: var(--surface-table-hover);
}

.results-table tbody td[colspan] {
  padding: 20px 14px;
  color: var(--muted);
  text-align: center;
}

.detail-summary {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: var(--space-row);
  padding: var(--space-subcard-y) var(--space-subcard-x);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-plain);
}

.detail-summary.detail-result-layout {
  width: 100%;
  padding: var(--space-subcard-y) var(--space-subcard-x);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-plain);
  justify-items: start;
  align-content: start;
  grid-template-rows: auto auto auto;
  overflow: visible;
}

.detail-result-content {
  display: grid;
  grid-template-columns: 320px minmax(420px, 1fr);
  gap: var(--space-grid);
  align-items: stretch;
  width: 100%;
  --detail-panel-fixed-height: 620px;
  --detail-summary-fixed-height: 720px;
  --detail-chart-fixed-height: 520px;
}

@media (min-width: 1221px) {
  body[data-calculator-id="steel-nbrd"] .panel-details .detail-result-content {
    grid-template-columns: 320px minmax(420px, 1fr);
  }
}

.detail-result-content .detail-summary {
  width: 100%;
  height: var(--detail-panel-fixed-height);
  min-height: var(--detail-panel-fixed-height);
  align-self: stretch;
}

.detail-result-head {
  display: grid;
  gap: var(--space-row);
}

.detail-result-head h2 {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-heading);
  font-weight: 700;
  line-height: 1.2;
}

.detail-result-head p {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.7;
}

.detail-result-head strong {
  color: var(--text);
  font-weight: 700;
}

.detail-result-preview {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}

.detail-inline-chart-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-row);
  min-width: 0;
  min-height: var(--detail-panel-fixed-height);
  height: var(--detail-panel-fixed-height);
  align-self: stretch;
  overflow: hidden;
  box-sizing: border-box;
  padding: var(--space-subcard-y) var(--space-subcard-x);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-plain);
}

@media (max-width: 860px) {
  .detail-result-content {
    grid-template-columns: 1fr;
  }

  .detail-result-content .detail-summary,
  .detail-result-content .detail-summary.detail-result-layout {
    height: auto;
    min-height: 0;
  }

  .detail-inline-chart-panel {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
  }
}

.detail-result-content .detail-summary.detail-result-layout,
.detail-result-content .detail-inline-chart-panel {
  height: var(--detail-panel-fixed-height);
  min-height: var(--detail-panel-fixed-height);
  align-self: stretch;
}

@media (min-width: 861px) {
  .panel-details .detail-result-content > #checked-profile-card.detail-summary.detail-result-layout,
  .panel-details .detail-result-content > #detail-chart-panel.detail-inline-chart-panel {
    height: var(--detail-panel-fixed-height, 620px);
    min-height: var(--detail-panel-fixed-height, 620px);
  }

  body[data-calculator-id="steel-nbrd"] .panel-details .detail-result-content > #checked-profile-card.detail-summary.detail-result-layout {
    height: auto;
    min-height: var(--detail-summary-fixed-height, 720px);
  }

  body[data-calculator-id="steel-nbrd"] .panel-details .detail-result-content > #detail-chart-panel.detail-inline-chart-panel {
    height: var(--detail-chart-panel-height, var(--detail-summary-fixed-height, 720px));
    min-height: var(--detail-chart-panel-height, var(--detail-summary-fixed-height, 720px));
  }
}

.detail-chart-toolbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto max-content;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.detail-chart-toolbar label {
  color: var(--text);
  font-size: var(--fs-heading);
  font-weight: 700;
  line-height: 1.2;
}

.detail-chart-toolbar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  justify-self: end;
  width: auto;
  max-width: none;
}

.detail-chart-picker {
  position: relative;
  display: grid;
  flex: 0 1 auto;
  width: var(--detail-chart-picker-width);
  max-width: min(100%, calc(100vw - 64px));
  min-width: 0;
}

.detail-chart-picker-sizer {
  grid-area: 1 / 1;
  visibility: hidden;
  min-height: 30px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 32px 0 8px;
  font: inherit;
  font-size: var(--fs-small);
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

.detail-chart-picker-toggle {
  grid-area: 1 / 1;
  width: 100%;
  max-width: none;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 8px;
  background: var(--surface-plain);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-small);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.detail-chart-picker-toggle > span:first-child {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.detail-chart-picker-toggle:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.detail-chart-picker-toggle sub,
.detail-chart-picker-option sub {
  font-size: 75%;
  line-height: 0;
}

.detail-chart-picker-chevron {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.detail-chart-picker-toggle[aria-expanded="true"] .detail-chart-picker-chevron {
  transform: rotate(225deg) translateY(-1px);
}

.detail-chart-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 90;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-chart-picker-option {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 6px 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-small);
  text-align: left;
  white-space: nowrap;
  overflow-wrap: normal;
  cursor: pointer;
}

.detail-chart-picker-option:hover,
.detail-chart-picker-option:focus,
.detail-chart-picker-option.is-selected {
  outline: none;
  background: var(--surface-selected);
}

.detail-chart-range {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  z-index: 5;
  align-self: stretch;
  width: 100%;
  min-height: var(--detail-chart-fixed-height, 520px);
  pointer-events: none;
}

.detail-chart-range:empty {
  display: none;
}

.detail-chart-axis-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.detail-chart-axis-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: var(--fs-chart-control);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  pointer-events: auto;
}

.detail-chart-axis-pill-x-min {
  left: var(--chart-control-x-min-left);
  bottom: var(--chart-control-x-min-bottom);
  transform: translateX(-50%);
}

.detail-chart-axis-pill-x-max {
  left: var(--chart-control-x-max-left);
  bottom: var(--chart-control-x-max-bottom);
  transform: translateX(-50%);
}

.detail-chart-axis-pill-y-min {
  left: var(--chart-control-y-min-left);
  top: var(--chart-control-y-min-top);
  transform: translateY(-50%);
}

.detail-chart-axis-pill-y-max {
  left: var(--chart-control-y-max-left);
  top: var(--chart-control-y-max-top);
  transform: translateY(-50%);
}

.detail-chart-range-reset {
  position: absolute;
  top: auto;
  left: var(--chart-control-auto-left);
  bottom: var(--chart-control-auto-bottom);
  min-height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 2px 8px;
  background: var(--surface-plain);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-chart-control);
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.detail-chart-range-reset:hover,
.detail-chart-range-reset:focus {
  outline: none;
  background: var(--surface-selected);
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: var(--focus-ring);
}

.detail-chart-range-input {
  width: 46px;
  min-width: 0;
  min-height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 1px 4px;
  background: var(--surface-plain);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-chart-control);
  font-weight: 700;
  text-align: center;
  box-sizing: border-box;
  cursor: text;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.detail-chart-range-input:hover {
  border-color: var(--brand);
  background: var(--surface-selected);
}

.detail-chart-range-input:focus {
  position: relative;
  z-index: 1;
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.chart.detail-inline-chart {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  height: var(--detail-chart-fixed-height, 520px);
  min-height: var(--detail-chart-fixed-height, 520px);
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: default;
  pointer-events: none;
  touch-action: auto;
  user-select: auto;
}

.chart.detail-inline-chart svg {
  min-height: 0;
  pointer-events: none;
}

.detail-result-warning {
  margin-top: var(--space-row);
}

.detail-result-warning:empty {
  display: none;
}

.detail-result-preview .preview-metrics-table,
.detail-summary.preview-result .preview-metrics-table {
  width: min(100%, 320px);
  max-width: 100%;
  margin-inline: auto;
  table-layout: fixed;
}

#checked-profile-card .preview-metric-label-col {
  width: 46%;
}

#checked-profile-card .preview-metric-value-col {
  width: 54%;
}

.detail-result-layout .model-warning {
  width: 100%;
  max-width: 100%;
  justify-self: stretch;
  margin-top: var(--space-row);
}

.detail-summary-bottom-warning {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  align-self: stretch;
}

.detail-summary-bottom-warning:empty {
  display: none;
}

.detail-summary-bottom-warning .input-warning {
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.detail-calculation-content .input-warning + .input-warning {
  margin-top: 8px;
}

.detail-summary-note {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.65;
}

.detail-metrics {
  display: block;
}

.detail-empty-state {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-plain);
  color: var(--text);
}

.detail-metrics-table-wrap {
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  margin-right: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-plain);
}

.detail-metrics-table {
  width: auto;
  min-width: 0;
  border-collapse: collapse;
}

.detail-metrics-table th,
.detail-metrics-table td {
  padding: var(--space-cell-y) var(--space-cell-x);
  border-bottom: 1px solid var(--line-ghost);
  font-size: var(--fs-base);
  line-height: 1.55;
  vertical-align: middle;
}

.detail-metrics-table thead th {
  background: var(--panel-soft);
  color: var(--heading);
  font-weight: 700;
  text-align: left;
}

.detail-metrics-table thead th:first-child,
.detail-metrics-table thead th:last-child {
  text-align: center;
}

.detail-metrics-table tbody tr.is-primary {
  background: var(--surface-selected);
}

.detail-metrics-table td:first-child {
  width: 130px;
  color: var(--heading);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.detail-metrics-table td:nth-child(2) {
  width: auto;
  color: var(--text);
}

.detail-metrics-table td:last-child {
  width: 160px;
  color: var(--heading);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.detail-metrics-table tbody tr:last-child > * {
  border-bottom: 1px solid var(--line-ghost);
}

.detail-preview-metrics-table {
  width: 360px;
  max-width: 100%;
}

.detail-preview-metrics-table th:first-child,
.detail-preview-metrics-table td:first-child {
  width: 58%;
}

.detail-preview-metrics-table th:last-child,
.detail-preview-metrics-table td:last-child {
  width: 42%;
}

.detail-preview-metrics-table tbody tr.is-primary {
  background: var(--surface-selected);
}

.detail-calculation-line > span,
.detail-calculation-result > span {
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.detail-calculation-line > div,
.detail-calculation-result > div {
  min-width: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  text-align: left;
  word-break: break-word;
}

.detail-calculation-line .mathml-wrap,
.detail-calculation-result .mathml-wrap {
  display: block;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

.detail-calculation-line .detail-mathml-display-wrap,
.detail-calculation-result .detail-mathml-display-wrap {
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 2px;
}

.detail-calculation-line .detail-mathml-stack,
.detail-calculation-result .detail-mathml-stack {
  display: grid;
  justify-content: start;
  justify-items: start;
}

.detail-calculation-line .mathml-equation,
.detail-calculation-result .mathml-equation {
  margin-left: 0 !important;
  margin-right: auto !important;
}

.detail-calculation-line .mathml-equation.is-display,
.detail-calculation-result .mathml-equation.is-display {
  display: block;
  math-style: normal;
  font-size: 1.05em;
}

.calculation-formula-note {
  display: inline-block;
  margin: 4px 0 0 36px;
  color: var(--text);
  white-space: nowrap;
}

.detail-calculation-line .calculation-formula-note {
  display: block;
  margin-left: 0;
  white-space: normal;
}

.detail-calculation-result .calculation-formula-note {
  display: block;
}

.chart-card-combined {
  grid-column: 1 / -1;
}

.detail-charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-grid);
  align-items: start;
}

.detail-chart-section {
  display: grid;
  gap: var(--space-row);
  min-width: 0;
  padding: var(--space-subcard-y) var(--space-subcard-x);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-plain);
}

.detail-chart-section .card-head {
  max-width: none;
}

.detail-chart-section .card-head h2 {
  font-size: var(--fs-base);
  line-height: 1.25;
}

.detail-chart-section .card-head p {
  font-size: var(--fs-small);
  line-height: 1.45;
}

.chart {
  min-height: 350px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  padding: 10px 12px;
}

.chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-title {
  fill: var(--text);
  font-family: var(--font-heading);
  font-size: var(--fs-chart-title);
  font-weight: 700;
}

.chart-grid line {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

.chart-axis {
  stroke: var(--chart-axis);
  stroke-width: 1.2;
}

.chart-label {
  fill: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-chart-axis-value);
  font-weight: 400;
}

.chart-axis-title {
  font-size: var(--fs-chart-axis-title);
}

.chart-series {
  fill: none;
  stroke-width: 2.1;
}

.chart-point {
  stroke-width: 1.2;
}

.chart-reference {
  stroke: var(--warn);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
}

.chart-reference-primary {
  stroke: var(--chart-series-primary);
}

.chart-reference-secondary {
  stroke: var(--chart-series-secondary);
}

.chart-reference-demand {
  stroke: var(--chart-series-demand);
}

.chart-reference-x {
  stroke: var(--brand-dark);
  stroke-width: 1.25;
  stroke-dasharray: 5 5;
}

.chart-reference-label {
  fill: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-chart-reference);
  font-weight: 400;
}

.chart-legend-line {
  stroke-width: 2.4;
}

.chart-legend-title {
  fill: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-chart-legend);
  font-weight: 400;
}

.chart-legend-label {
  fill: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-chart-legend);
  font-weight: 400;
}

.app-footer {
  margin-top: 28px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  color: var(--brand);
  font-size: var(--fs-small);
  line-height:  1.5;
  font-weight: 400;
  text-align: center;
}

.app-footer-legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: inherit;
}

.results-table-note-centered {
  max-width: 112ch;
  margin: 0 auto;
  text-align: center;
}

.results-table-section:first-child .results-section-head {
  justify-content: flex-start;
  align-items: start;
}

.results-table-section:nth-child(n + 2) .results-section-head {
  justify-content: flex-start;
}

.result-hero {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.result-families {
  width: 100%;
  min-width: 0;
}

.result-families .family-cards {
  gap: 12px;
}

.result-families .family-card {
  min-width: 0;
}

.results-summary-card .result-hero {
  width: 100%;
}

.results-summary-card .result-hero .hero-card {
  flex: 0 0 auto;
  width: min(100%, 300px);
  margin-inline: auto;
  min-height: var(--summary-result-card-min-height);
}

.results-summary-card .result-hero .hero-card.empty-state {
  white-space: normal;
}

.result-hero .hero-card > .mass-reference-note {
  margin-top: 12px;
}

.results-summary-card .result-families {
  width: 100%;
}

.results-summary-card .result-families .family-card {
  min-width: 0;
  overflow-wrap: anywhere;
  min-height: var(--summary-result-card-min-height);
  padding: 14px 10px;
}

.contact-copy {
  max-width: none;
}

.panel-contact .how-grid,
.panel-revisions .theory-grid {
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
}

.panel-contact .theory-card-wide,
.panel-revisions .theory-card-wide {
  width: 100%;
  max-width: none;
  justify-self: stretch;
  box-sizing: border-box;
}

.panel-contact .card-head,
.panel-revisions .card-head,
.panel-revisions .theory-table-wrap {
  width: max-content;
  max-width: 100%;
}

.contact-intro-line {
  display: inline-block;
}

.contact-link {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

.panel-results .results-table-section {
  overflow: visible;
}

.panel-results .results-table-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: var(--space-grid);
  min-width: 0;
}

.panel-results .results-table-grid > .table-card {
  width: 100%;
  min-width: 0;
  max-width: none;
  align-items: stretch;
}

.panel-results .results-table-grid > .table-card .card-head {
  width: 100%;
  text-align: center;
}

.panel-results .results-table-grid > .table-card .card-head h2 {
  text-align: center;
  margin-bottom: 0;
}

.panel-results .results-table-grid .table-wrap {
  width: max-content;
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
  align-self: start;
  justify-self: center;
  overflow-x: auto;
}

.panel-results .results-table-grid .results-table {
  width: max-content;
  min-width: 0;
  max-width: none;
  table-layout: auto;
}

.panel-results .results-table-grid .results-table th,
.panel-results .results-table-grid .results-table td {
  width: auto;
  font-size: calc(var(--fs-base) * 1.2);
}

.panel-results .results-table-grid .results-table-note {
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: center;
}

@media (max-width: 1180px) {
  .panel-results .results-table-grid {
    grid-template-columns: 1fr;
  }
}

/* Wspólny styl zakładek kalkulatora. */
.panel-grid,
.panel-grid-results,
.results-overview-grid,
.results-table-sections,
.results-table-grid,
.detail-top-stack,
.theory-grid,
.how-grid,
.config-choice-stack,
.scheme-list,
.input-grid {
  gap: var(--space-grid);
}

.card,
.theory-card,
.table-card,
.empty-state-action-card {
  padding: var(--space-card-y) var(--space-card-x);
}

.card-head,
.preview-card .card-head,
.table-card .card-head {
  max-width: none;
}

.card-head h2,
.results-section-head h3 {
  margin: 0 0 8px;
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: var(--fs-heading);
  font-weight: 700;
  line-height: 1.2;
}

.card-head p,
.how-step p,
.theory-section p,
.contact-copy,
.detail-summary-note,
#best-profile-description,
.result-families .card-head p {
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.7;
}

/* Szablon justowania: krótkie teksty zostają do lewej, długie bloki dostają klasę poniżej. */
.text-justify-long,
.card-head .input-warning,
.input-warning,
.model-warning {
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
}

.card-head .input-warning,
.input-warning,
.model-warning {
  padding: 0;
  border-top: 0;
  color: var(--danger);
}

.card-head .input-warning strong,
.input-warning strong,
.model-warning strong {
  color: var(--danger);
}

.scheme-card,
.scheme-visual,
.general-form-column,
.preview-card,
.hero-card,
.family-card,
.detail-summary,
.detail-empty-state,
.detail-metrics-table-wrap,
.detail-calculation-step,
.chart,
.table-wrap,
.theory-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.general-form-column,
.hero-card,
.chart,
.detail-calculation-step {
  background: var(--surface-plain);
}

.field input,
.field select,
.button {
  min-height: 42px;
  border-radius: 8px;
  font-size: var(--fs-base);
}

.card-general .field input,
.card-general .field select {
  min-height: 30px;
  padding: 0 8px;
  font-size: var(--fs-small);
}

.theory-table th,
.theory-table td,
.results-table th,
.results-table td,
.detail-metrics-table th,
.detail-metrics-table td {
  padding: var(--space-cell-y) var(--space-cell-x);
  font-size: var(--fs-base);
  line-height: 1.55;
}

.results-table th,
.results-table td {
  white-space: nowrap;
}

.table-wrap {
  overflow: auto;
}

.theory-table thead th,
.results-table thead th,
.detail-metrics-table thead th {
  background: var(--panel-soft);
  color: var(--heading);
  font-weight: 700;
}

.theory-list,
.notation-list dd,
.formula-expression,
.equation-text,
.field-note,
.empty-state {
  font-size: var(--fs-base);
  line-height: 1.7;
}

.section-label,
.field span,
.scheme-meta,
.formula-value-box span,
.preview-metrics dt,
.result-metrics dt,
.family-metrics dt,
.detail-calculation-step-symbol,
.detail-calculation-line > span,
.detail-calculation-result > span,
.detail-calculation-note,
.results-table-note {
  font-size: var(--fs-small);
  line-height: 1.55;
}

.section-label,
.field span,
.scheme-meta,
.formula-value-box span,
.results-table-note,
.detail-calculation-step-symbol,
.detail-calculation-line > span,
.detail-calculation-result > span,
.detail-calculation-note {
  color: var(--text);
}

@media (max-width: 1220px) {
  .panel-grid,
  .results-overview-grid,
  .results-summary-grid,
  .general-layout,
  .panel-grid-results,
  .detail-charts-grid {
    grid-template-columns: 1fr;
  }

  .panel-config .panel-grid {
    grid-template-columns: 1fr;
  }

  .results-summary-card {
    width: 100%;
  }

  .results-summary-card .result-hero,
  .results-summary-card .result-families {
    width: 100%;
  }

  .panel-config .config-choice-stack,
  .panel-config .card-general {
    grid-column: auto;
  }

  .mode-copy p {
    white-space: normal;
  }

}

@media (max-width: 1080px) {

  .card,
  .theory-card {
    padding: 22px;
  }

  .scheme-card {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .scheme-visual {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }

}

@media (max-width: 860px) {
  .detail-result-content {
    grid-template-columns: 1fr;
  }

  .detail-inline-chart-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: auto;
  }

  .detail-chart-range {
    grid-column: 1;
    grid-row: 2;
    height: 350px;
    min-height: 350px;
  }

  .chart.detail-inline-chart {
    grid-column: 1;
    grid-row: 2;
    height: 350px;
    min-height: 350px;
  }

  .detail-chart-toolbar {
    align-items: start;
    flex-direction: column;
  }

  .detail-chart-picker {
    width: 100%;
  }

  .detail-chart-axis-pill {
    gap: 4px;
    padding: 3px 4px 3px 6px;
  }

  .detail-chart-axis-pill span {
    max-width: 54px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .detail-chart-range-input {
    width: 42px;
  }

  .text-justify-long,
  .card-head .input-warning,
  .input-warning,
  .model-warning {
    text-align: left;
    hyphens: manual;
  }

  .theory-nowrap-line {
    white-space: normal;
  }

  .how-nowrap-line {
    white-space: normal;
  }

  .results-section-head {
    align-items: start;
  }

  .results-section-head .results-table-note {
    max-width: none;
  }

  .how-step {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .equation-notes,
  .family-cards {
    grid-template-columns: 1fr;
  }

  .notation-list {
    display: grid;
    width: 100%;
  }

  .notation-list div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .notation-list dt {
    display: block;
    padding-bottom: 0;
    padding-right: 0;
    border-bottom: 0;
    white-space: normal;
  }

  .notation-list dd {
    display: block;
    width: auto;
    padding-top: 4px;
    border-bottom: 0;
  }

  .notation-list.how-notation-list dd {
    white-space: normal;
  }

  .notation-list div:not(:last-child) dt {
    border-bottom: 0;
  }

  .notation-list div:not(:last-child) dd {
    border-bottom: 1px solid var(--line-soft);
  }

  .theory-scheme-cell {
    grid-template-columns: 1fr;
  }

  .theory-inline-copy {
    white-space: normal;
  }

  .theory-table.theory-table-fit {
    width: 100%;
    min-width: 860px;
  }
}

@media (max-width: 760px) {
  .results-summary-card .result-hero,
  .results-summary-card .result-families,
  .summary-input-data {
    width: 100%;
  }

  .panel-results .results-table-grid {
    grid-template-columns: 1fr;
  }

  body {
    font-size: var(--fs-base);
  }

  .input-grid-general {
    max-width: none;
  }
}

.mode-list {
  display: grid;
  gap: var(--space-row);
  margin-bottom: 0;
}

.mode-card {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: var(--space-row);
  align-items: start;
  padding: var(--space-subcard-y) var(--space-subcard-x);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mode-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.mode-card.is-selected {
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
  background: var(--surface-selected);
}

.mode-card input {
  margin-top: 3px;
}

.mode-copy {
  min-width: 0;
}

.mode-copy strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: var(--fs-choice);
  line-height: 1.4;
}

.mode-copy p,
.mode-copy > span {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.6;
  overflow-wrap: break-word;
  white-space: normal;
}

.field.is-hidden {
  display: none;
}

.formula-card-stack {
  padding: 0;
  border: 0;
  background: transparent;
}

.formula-grid {
  display: grid;
  gap: 12px;
}

.formula-result {
  color: var(--heading);
  font-size: var(--fs-heading);
  line-height: 1.2;
}

.formula-value-box-soft {
  background: var(--surface-table-head);
}

.preview-head,
.hero-card-head,
.detail-summary-head,
.family-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: var(--space-row);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill.is-pass {
  border-color: var(--status-good-line);
  background: var(--status-good-bg);
  color: var(--good);
}

.status-pill.is-fail {
  border-color: var(--danger-line);
  background: var(--status-warn-bg);
  color: var(--danger);
}

.hero-card-inner {
  display: grid;
  gap: var(--space-row);
}

.family-card-head .section-label {
  margin-bottom: 0;
}

.profile-name-action {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--good);
  font: inherit;
  font-family: var(--font-heading);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  cursor: pointer;
}

.profile-name-action:hover,
.profile-name-action:focus {
  color: var(--good);
  text-decoration: none;
}

.table-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.table-link:hover,
.table-link:focus {
  color: var(--link-hover);
  text-decoration: none;
}

.detail-summary-note {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.65;
}

.scheme-card p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.55;
}

.preview-result.empty-state,
.hero-card.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--text);
  text-align: center;
}

.preview-result.empty-state.empty-sgu-state,
.hero-card.empty-state.empty-sgu-state,
.detail-empty-state.empty-sgu-state,
.family-empty-message.empty-sgu-state {
  color: var(--danger);
}

.panel-results .results-table tbody td,
.panel-results .results-table .table-link {
  color: var(--text);
}

.panel-results .results-table th,
.panel-results .results-table td {
  padding: 7px 8px;
  font-size: var(--fs-small);
  line-height: 1.3;
}

.panel-results .results-table .table-head-stack {
  gap: 1px;
  line-height: 1.1;
}

.panel-results .results-table tbody td.results-utilization-cell.is-pass {
  color: var(--good);
}

.panel-results .results-table tbody td.results-utilization-cell.is-fail {
  color: var(--danger);
}

.panel-results .results-table tbody td.results-mass-ratio-cell.is-reference {
  color: var(--good);
  background: transparent;
  font-weight: inherit;
}

.panel-results .results-table tbody td.results-mass-ratio-cell.is-heavy {
  color: var(--danger);
  background: transparent;
  font-weight: inherit;
}

.panel-results .results-table tbody td.empty-sgu-table-cell {
  color: var(--danger);
}

.number-stepper input,
.preview-metrics-table,
.summary-input-data,
.detail-metrics-table,
.results-table,
.chart text {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Doprecyzowanie wspólnego stylu dla elementów z końca arkusza. */
.mode-card,
.scheme-card,
.scheme-visual,
.general-form-column,
.preview-card,
.hero-card,
.family-card,
.detail-summary,
.detail-empty-state,
.detail-metrics-table-wrap,
.detail-calculation-step,
.chart,
.table-wrap,
.theory-table-wrap {
  border-radius: var(--radius);
}

.mode-card,
.scheme-card,
.scheme-visual,
.general-form-column,
.hero-card,
.detail-calculation-step {
  background: var(--surface-plain);
}

.mode-card.is-selected,
.scheme-card.is-selected {
  background: var(--surface-selected);
}

.mode-copy p,
.scheme-card p,
.detail-summary-note {
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.7;
}

.formula-grid,
.hero-card-inner {
  gap: var(--space-row);
}

.card.card-general {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-right: 22px;
  padding-left: 22px;
}

.card-general .input-warning {
  width: 100%;
  max-width: none;
  justify-self: stretch;
  overflow-wrap: normal;
}

.access-card {
  width: min(100%, 1360px);
  max-width: 1360px;
  margin: 0 auto;
}

.access-card-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 36px;
  align-items: start;
}

.access-panel {
  min-width: 0;
}





.access-form {
  display: grid;
  gap: 18px;
  max-width: 520px;
  margin-top: 26px;
}

.access-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
}









.access-submit {
  width: fit-content;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--brand);
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}



.access-notice,
.access-response,
.access-dev-link {
  margin-top: 18px;
  color: var(--text);
}

.access-response {
  white-space: pre-line;
}

.access-dev-link a {
  color: var(--link);
  font-weight: 700;
}

@media (max-width: 1220px) {
  .access-card-split {
    grid-template-columns: 1fr;
  }

  .card.card-general {
    width: 100%;
  }

  .card-general .input-warning {
    max-width: none;
  }

  .preview-card {
    width: 100%;
  }

  .mode-copy p {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .detail-calculation-step-head,
  .detail-calculation-line,
  .detail-calculation-result {
    grid-template-columns: 1fr;
  }

  .detail-calculation-step-head {
    display: grid;
  }

  .detail-calculation-step-symbol {
    white-space: normal;
  }
}
body[data-calculator-id="steel-nbrd"] .scheme-picker {
  display: grid;
  gap: 16px;
}

body[data-calculator-id="steel-nbrd"] .axis-card-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-head {
  display: grid;
  gap: 3px;
  justify-items: center;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-head h3 {
  margin: 0;
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: var(--fs-choice);
  line-height: 1.25;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-head p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.45;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-calculator-id="steel-nbrd"] .scheme-select {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-toggle {
  position: relative;
  width: 100%;
  border: 1px solid var(--brand-border);
  background: var(--surface-selected);
  text-align: left;
  cursor: pointer;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-chevron {
  position: absolute;
  right: 14px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

body[data-calculator-id="steel-nbrd"] .scheme-select.is-open .scheme-select-chevron {
  transform: rotate(225deg);
}

body[data-calculator-id="steel-nbrd"] .scheme-select-menu {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  align-items: start;
  justify-items: center;
  overflow: auto;
  padding: 16px 24px 32px;
  background: var(--overlay);
}

body[data-calculator-id="steel-nbrd"] .scheme-select-menu[hidden] {
  display: none;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-menu-panel {
  display: grid;
  gap: 14px;
  width: min(1100px, 100%);
  max-height: min(620px, calc(100vh - 80px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow-lg);
}

body[data-calculator-id="steel-nbrd"] .scheme-select-menu-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-menu-head button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0;
  background: var(--surface-plain);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-heading);
  line-height: 1;
  cursor: pointer;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-option-grid .axis-scheme-card {
  min-height: 260px;
}

body[data-calculator-id="steel-nbrd"] button.axis-scheme-card:not(.scheme-select-toggle) {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: center;
  gap: 12px;
  min-height: 260px;
  padding: 14px 12px;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card .scheme-copy {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  order: 2;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card .scheme-copy strong {
  white-space: normal;
  font-size: var(--fs-base);
  text-align: center;
  text-transform: lowercase;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card .scheme-meta {
  margin-top: 5px;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card .scheme-meta span {
  min-height: 24px;
  padding: 0 8px;
  font-size: var(--fs-base);
  line-height: 1.12;
  white-space: normal;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card p {
  display: none;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card .scheme-visual {
  grid-column: 1 / -1;
  justify-self: stretch;
  order: 1;
  width: 100%;
  min-height: 170px;
  max-height: none;
  padding: 10px;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card .scheme-visual img {
  width: auto;
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}

body[data-calculator-id="steel-nbrd"] .scheme-visual-custom {
  min-height: 170px;
}

body[data-calculator-id="steel-nbrd"] .scheme-visual-custom span {
  color: var(--heading);
  font-size: var(--fs-heading);
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .general-layout {
  --general-form-column-width: minmax(250px, 0.78fr);
  --general-preview-column-width: minmax(0, 1.22fr);
  grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.22fr);
  width: 100%;
  gap: 22px;
  justify-content: stretch;
}

body[data-calculator-id="steel-nbrd"] .general-form-column {
  --general-label-width: 160px;
  --general-control-width: 112px;
  width: 100%;
  max-width: none;
  min-height: 430px;
  justify-self: stretch;
  justify-items: center;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .input-grid-general {
  max-width: var(--general-label-width);
  justify-items: center;
}

body[data-calculator-id="steel-nbrd"] .card-general .field {
  width: var(--general-label-width);
  justify-items: center;
  text-align: center;
  gap: 6px;
}

body[data-calculator-id="steel-nbrd"] .card-general .field > span {
  justify-self: center;
  max-width: 100%;
  white-space: nowrap;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .card-general .field > input,
body[data-calculator-id="steel-nbrd"] .card-general .field > select,
body[data-calculator-id="steel-nbrd"] .card-general .number-stepper {
  width: min(100%, var(--general-control-width));
  min-height: 30px;
}

body[data-calculator-id="steel-nbrd"] #profile-scope-select,
body[data-calculator-id="steel-nbrd"] #profile-family-select,
body[data-calculator-id="steel-nbrd"] #profile-finish-select,
body[data-calculator-id="steel-nbrd"] #steel-grade-select {
  text-align: center;
  text-align-last: center;
}

/* Standardowy kompaktowy picker tekstowy: szerokość zależna od najdłuższej opcji. */
body[data-calculator-id="steel-nbrd"] .standard-text-picker-field {
  position: relative;
  z-index: 20;
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker-field.is-open {
  z-index: 100;
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker {
  position: relative;
  display: inline-grid;
  width: min(100%, var(--standard-text-picker-width, var(--general-control-width)));
  max-width: 100%;
  justify-self: center;
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker-native {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker-measure {
  position: absolute;
  visibility: hidden;
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 0 32px 0 12px;
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker-toggle {
  position: relative;
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 32px 0 12px;
  background: var(--surface-plain);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  cursor: pointer;
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker-display {
  display: block;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: center;
  white-space: nowrap;
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker-toggle:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker-chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker.is-open .standard-text-picker-chevron {
  transform: translateY(-30%) rotate(225deg);
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 70;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-plain);
  box-shadow: var(--shadow);
  overflow: hidden;
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker-menu[hidden] {
  display: none !important;
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker-option {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 6px 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker-option:last-child {
  border-bottom: 0;
}

body[data-calculator-id="steel-nbrd"] .standard-text-picker-option:hover,
body[data-calculator-id="steel-nbrd"] .standard-text-picker-option:focus-visible,
body[data-calculator-id="steel-nbrd"] .standard-text-picker-option.is-selected {
  outline: none;
  background: var(--surface-selected);
}

body[data-calculator-id="steel-nbrd"] .card-general .profile-picker {
  width: var(--general-label-width);
}

body[data-calculator-id="steel-nbrd"] #profile-picker-field-wrap.is-wide-profile,
body[data-calculator-id="steel-nbrd"] .card-general .profile-picker.is-wide-profile {
  width: var(--general-label-width);
}

body[data-calculator-id="steel-nbrd"] .card-general .profile-picker.is-wide-profile #profile-picker-toggle {
  width: var(--profile-picker-dynamic-width, 160px);
  max-width: 100%;
  gap: 6px;
  padding-right: 10px;
  padding-left: 10px;
  font-size: calc(var(--fs-small) * 0.92);
}

body[data-calculator-id="steel-nbrd"] #profile-picker-value {
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .preview-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 365px;
  justify-self: stretch;
  align-self: stretch;
  overflow: hidden;
}

body[data-calculator-id="steel-nbrd"] .preview-card .preview-metrics-table {
  width: min(100%, var(--summary-metrics-table-width));
  max-width: 100%;
  table-layout: fixed;
  justify-self: center;
}

body[data-calculator-id="steel-nbrd"] .panel-results .family-result-card .preview-metrics-table {
  width: min(100%, var(--summary-metrics-table-width));
  max-width: 100%;
  table-layout: fixed;
}

body[data-calculator-id="steel-nbrd"] .preview-card .hero-card-inner {
  display: grid;
  justify-content: center;
  justify-items: center;
}

body[data-calculator-id="steel-nbrd"] .preview-card .preview-result {
  width: 100%;
  min-width: 0;
  min-height: 250px;
}

body[data-calculator-id="steel-nbrd"] #preliminary-result-card {
  justify-items: center;
  overflow: hidden;
}

body[data-calculator-id="steel-nbrd"] #preliminary-result-card .hero-card-inner {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  justify-self: stretch;
  justify-content: stretch;
  justify-items: center;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

body[data-calculator-id="steel-nbrd"] #preliminary-result-card .hero-card-head {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  justify-self: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] #preliminary-result-card .profile-name-action.preview-name {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  justify-self: center;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] #preliminary-result-card .status-pill {
  width: max-content;
  max-width: 100%;
  justify-self: center;
  margin: 0 auto;
  text-align: center;
}

/* Pakiet kalkulatorow: normalizacja paska wykresu w szczegółach. */
body[data-calculator-id="steel-nbrd"] .detail-chart-toolbar,
body[data-calculator-id="steel-nbrd"] .detail-chart-toolbar-controls {
  min-height: 30px;
  align-items: center;
}

body[data-calculator-id="steel-nbrd"] .detail-chart-picker-toggle {
  min-height: 30px;
}

body[data-calculator-id="steel-nbrd"] .card-general .field > input:disabled,
body[data-calculator-id="steel-nbrd"] .card-general .number-stepper:has(input:disabled) {
  border-color: var(--line);
  background: var(--surface-subtle);
  color: var(--muted);
  cursor: not-allowed;
}

body[data-calculator-id="steel-nbrd"] .card-general .number-stepper input:disabled + .number-stepper-button,
body[data-calculator-id="steel-nbrd"] .card-general .number-stepper .number-stepper-button:has(+ input:disabled) {
  color: var(--muted);
  cursor: not-allowed;
}

body[data-calculator-id="steel-nbrd"] .form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: var(--general-label-width);
}

body[data-calculator-id="steel-nbrd"] .primary-button {
  min-height: 40px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--brand);
  color: var(--button-text, var(--mjkm-light-0));
  font-weight: 700;
  cursor: pointer;
}

body[data-calculator-id="steel-nbrd"] .calculation-status {
  margin: 0;
  color: var(--muted);
}

body[data-calculator-id="steel-nbrd"] .calculation-status.is-error {
  color: var(--danger);
}

@media (min-width: 1221px) {
  body[data-calculator-id="steel-nbrd"] .panel-config .panel-grid {
    grid-template-columns: minmax(0, 1fr) 560px;
  }

  body[data-calculator-id="steel-nbrd"] .panel-config .mode-copy > span {
    white-space: normal;
    font-size: var(--fs-base);
    line-height: 1.7;
  }
}

body[data-calculator-id="steel-nbrd"] .result-preview-card,
body[data-calculator-id="steel-nbrd"] .result-main-body,
body[data-calculator-id="steel-nbrd"] .detail-profile-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  padding: var(--space-subcard-y) var(--space-subcard-x);
  align-self: stretch;
}

body[data-calculator-id="steel-nbrd"] .preview-result-value,
body[data-calculator-id="steel-nbrd"] .result-main-value {
  color: var(--heading);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.05;
}

body[data-calculator-id="steel-nbrd"] .result-main-value span {
  font-size: 0.48em;
  font-weight: 700;
}

body[data-calculator-id="steel-nbrd"] .result-axis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-calculator-id="steel-nbrd"] .result-axis {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-plain);
  padding: 14px;
}

body[data-calculator-id="steel-nbrd"] .result-axis span {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.3;
}

body[data-calculator-id="steel-nbrd"] .result-axis strong {
  color: var(--heading);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.08;
}

body[data-calculator-id="steel-nbrd"] .result-axis small {
  font-size: 0.52em;
}

body[data-calculator-id="steel-nbrd"] .result-axis.is-primary {
  border-color: var(--line-strong);
  background: var(--brand-soft);
}

body[data-calculator-id="steel-nbrd"] .preview-result-value.is-pass,
body[data-calculator-id="steel-nbrd"] .result-axis.is-pass strong,
body[data-calculator-id="steel-nbrd"] .result-axis.is-reference strong {
  color: var(--good);
}

body[data-calculator-id="steel-nbrd"] .result-axis.is-pass,
body[data-calculator-id="steel-nbrd"] .result-axis.is-reference {
  border-color: var(--status-good-line);
  background: var(--status-good-bg);
}

body[data-calculator-id="steel-nbrd"] .preview-result-value.is-fail,
body[data-calculator-id="steel-nbrd"] .result-axis.is-fail strong,
body[data-calculator-id="steel-nbrd"] .result-axis.is-heavy strong {
  color: var(--danger);
}

body[data-calculator-id="steel-nbrd"] .result-axis.is-fail,
body[data-calculator-id="steel-nbrd"] .result-axis.is-heavy {
  border-color: var(--danger-line);
}

body[data-calculator-id="steel-nbrd"] .result-warning {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--danger-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--danger) 9%, transparent);
  color: var(--danger);
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .results-summary-card .summary-input-data {
  width: 100%;
}

body[data-calculator-id="steel-nbrd"] .results-grid,
body[data-calculator-id="steel-nbrd"] .details-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: var(--space-grid);
  align-items: start;
}

body[data-calculator-id="steel-nbrd"] .mode-copy p {
  white-space: normal;
}

body[data-calculator-id="steel-nbrd"] .selection-results-card {
  grid-column: 1 / -1;
}

body[data-calculator-id="steel-nbrd"] .selection-results-table th,
body[data-calculator-id="steel-nbrd"] .selection-results-table td {
  text-align: center;
  white-space: nowrap;
}

body[data-calculator-id="steel-nbrd"] .selection-results-table th:first-child,
body[data-calculator-id="steel-nbrd"] .selection-results-table td:first-child {
  text-align: left;
}

body[data-calculator-id="steel-nbrd"] .selection-results-table tr.is-primary th,
body[data-calculator-id="steel-nbrd"] .selection-results-table tr.is-primary td {
  color: var(--heading);
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .selection-results-table tr.is-warning th,
body[data-calculator-id="steel-nbrd"] .selection-results-table tr.is-warning td {
  color: var(--danger);
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .selection-results-table tbody td.results-utilization-cell.is-pass,
body[data-calculator-id="steel-nbrd"] .selection-results-table tbody td.results-mass-ratio-cell.is-reference {
  color: var(--good);
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .selection-results-table tbody td.results-utilization-cell.is-fail,
body[data-calculator-id="steel-nbrd"] .selection-results-table tbody td.results-mass-ratio-cell.is-heavy {
  color: var(--danger);
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .result-parameter-table tr.is-primary th,
body[data-calculator-id="steel-nbrd"] .result-parameter-table tr.is-primary td {
  color: var(--heading);
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .result-parameter-table tr.is-warning th,
body[data-calculator-id="steel-nbrd"] .result-parameter-table tr.is-warning td {
  color: var(--danger);
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .result-parameter-table tr.is-reference th,
body[data-calculator-id="steel-nbrd"] .result-parameter-table tr.is-reference td {
  color: var(--good);
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .result-parameter-table tr.is-heavy th,
body[data-calculator-id="steel-nbrd"] .result-parameter-table tr.is-heavy td {
  color: var(--danger);
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .detail-definition-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

body[data-calculator-id="steel-nbrd"] .detail-definition-list div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

body[data-calculator-id="steel-nbrd"] .detail-definition-list dt {
  color: var(--muted);
  font-weight: 700;
}

body[data-calculator-id="steel-nbrd"] .detail-definition-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

body[data-calculator-id="steel-nbrd"] .detail-metrics-table tbody tr.is-pass td,
body[data-calculator-id="steel-nbrd"] .detail-metrics-table tbody tr.is-reference td,
body[data-calculator-id="steel-nbrd"] .family-metrics .is-pass dt,
body[data-calculator-id="steel-nbrd"] .family-metrics .is-pass dd,
body[data-calculator-id="steel-nbrd"] .family-metrics .is-reference dt,
body[data-calculator-id="steel-nbrd"] .family-metrics .is-reference dd {
  color: var(--good);
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .detail-metrics-table tbody tr.is-fail td,
body[data-calculator-id="steel-nbrd"] .detail-metrics-table tbody tr.is-heavy td,
body[data-calculator-id="steel-nbrd"] .family-metrics .is-fail dt,
body[data-calculator-id="steel-nbrd"] .family-metrics .is-fail dd,
body[data-calculator-id="steel-nbrd"] .family-metrics .is-heavy dt,
body[data-calculator-id="steel-nbrd"] .family-metrics .is-heavy dd {
  color: var(--danger);
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .detail-calculations-body.is-open {
  margin-top: var(--space-row);
}

body[data-calculator-id="steel-nbrd"] .detail-summary .result-axis-grid {
  margin: var(--space-row) 0;
}

body[data-calculator-id="steel-nbrd"] .calculation-steps {
  display: grid;
  gap: 12px;
}

body[data-calculator-id="steel-nbrd"] .calculation-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: var(--space-subcard-y) var(--space-subcard-x);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-plain);
}

body[data-calculator-id="steel-nbrd"] .calculation-step-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--button-text, var(--mjkm-light-0));
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .calculation-step h3 {
  margin: 0 0 6px;
  font-size: var(--fs-base);
}

body[data-calculator-id="steel-nbrd"] .calculation-step ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.55;
}

body[data-calculator-id="steel-nbrd"] .formula-figure {
  margin: 0;
  padding: var(--space-subcard-y) var(--space-subcard-x);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-plain);
}

body[data-calculator-id="steel-nbrd"] .formula-figure img {
  display: block;
  max-width: min(100%, 760px);
  height: auto;
}

@media (max-width: 900px) {
  body[data-calculator-id="steel-nbrd"] .general-layout,
  body[data-calculator-id="steel-nbrd"] .results-grid,
  body[data-calculator-id="steel-nbrd"] .details-grid,
  body[data-calculator-id="steel-nbrd"] .result-axis-grid,
  body[data-calculator-id="steel-nbrd"] .axis-card-picker {
    grid-template-columns: 1fr;
  }
}



body[data-calculator-id="steel-nbrd"] .axis-card-picker {
  align-items: stretch;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-section,
body[data-calculator-id="steel-nbrd"] .axis-scheme-list,
body[data-calculator-id="steel-nbrd"] .scheme-select,
body[data-calculator-id="steel-nbrd"] .scheme-select-toggle {
  height: 100%;
}

body[data-calculator-id="steel-nbrd"] .number-stepper.is-disabled {
  background: var(--surface-subtle);
  color: var(--muted);
}

body[data-calculator-id="steel-nbrd"] .number-stepper.is-disabled .number-stepper-button,
body[data-calculator-id="steel-nbrd"] .number-stepper .number-stepper-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.65;
}

body[data-calculator-id="steel-nbrd"] .number-stepper.is-disabled input {
  color: var(--muted);
  cursor: not-allowed;
}

body[data-calculator-id="steel-nbrd"] .mathml-equation,
body[data-calculator-id="steel-nbrd"] .detail-mathml-row,
body[data-calculator-id="steel-nbrd"] .detail-mathml-equation {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line > div,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result > div,
body[data-calculator-id="steel-nbrd"] .detail-calculation-line p,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result p {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

body[data-calculator-id="steel-nbrd"] .theory-table,
body[data-calculator-id="steel-nbrd"] .theory-table.theory-table-fit,
body[data-calculator-id="steel-nbrd"] .results-table,
body[data-calculator-id="steel-nbrd"] .detail-metrics-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}

body[data-calculator-id="steel-nbrd"] .theory-table th,
body[data-calculator-id="steel-nbrd"] .theory-table td,
body[data-calculator-id="steel-nbrd"] .results-table th,
body[data-calculator-id="steel-nbrd"] .results-table td,
body[data-calculator-id="steel-nbrd"] .detail-metrics-table th,
body[data-calculator-id="steel-nbrd"] .detail-metrics-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(1),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(1) {
  width: 16%;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(2),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(2),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(5),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(5),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(6),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(6) {
  width: 13%;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(3),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(3),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(4),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(4) {
  width: 9%;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(7),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(7) {
  width: 12%;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(8),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(8) {
  width: 14%;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table .table-head-stack {
  min-height: 2.35em;
  justify-content: center;
}

body[data-calculator-id="steel-nbrd"] .preview-result.empty-state,
body[data-calculator-id="steel-nbrd"] .hero-card.empty-state,
body[data-calculator-id="steel-nbrd"] .detail-empty-state {
  text-align: center;
  line-height: 1.45;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table tbody td[colspan] {
  height: 76px;
  padding: 18px 12px;
  color: var(--muted);
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table tbody td.empty-sgu-table-cell {
  color: var(--danger);
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line .detail-mathml-stack,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .detail-mathml-stack {
  gap: 10px;
  justify-content: start;
  justify-items: start;
  width: max-content;
  max-width: 100%;
  margin-left: 0;
  margin-right: auto;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line > div,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result > div {
  display: grid;
  justify-items: start;
  justify-content: start;
  text-align: left;
  word-break: normal;
  overflow-wrap: normal;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-result > div {
  white-space: nowrap;
}

body[data-calculator-id="steel-nbrd"] .detail-mathml-row {
  min-width: 0;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line .mathml-wrap,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .mathml-wrap {
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line .detail-mathml-row,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .detail-mathml-row {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  text-align: left;
  white-space: normal;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line .detail-mathml-equation,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .detail-mathml-equation {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line .detail-mathml-display-wrap,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .detail-mathml-display-wrap {
  display: grid;
  justify-content: start;
  justify-items: start;
  width: fit-content;
  max-width: 100%;
  margin-left: 0;
  margin-right: auto;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line .detail-mathml-equation,
body[data-calculator-id="steel-nbrd"] .detail-calculation-line .detail-mathml-equation *,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .detail-mathml-equation,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .detail-mathml-equation * {
  font-size: var(--fs-base);
  math-depth: 0;
  math-style: normal;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-result .calculation-status.is-pass {
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-result .calculation-status.is-fail {
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-result-value:has(.calculation-status.is-pass),
body[data-calculator-id="steel-nbrd"] .detail-calculation-result-value:has(.calculation-status.is-pass) .detail-mathml-equation,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result-value:has(.calculation-status.is-pass) .detail-mathml-equation * {
  color: var(--good);
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-result-value:has(.calculation-status.is-fail),
body[data-calculator-id="steel-nbrd"] .detail-calculation-result-value:has(.calculation-status.is-fail) .detail-mathml-equation,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result-value:has(.calculation-status.is-fail) .detail-mathml-equation * {
  color: var(--danger);
}

body[data-calculator-id="steel-nbrd"] .calculation-formula-note-spaced {
  line-height: 1.75;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line .calculation-axis-heading-row mtext,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .calculation-axis-heading-row mtext {
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-style: normal;
  font-weight: 400;
}

/* Pakiet kalkulatorow: normalizacja zakladek Teoria i Rewizje. */
body[data-calculator-id="steel-nbrd"] .panel-theory .theory-grid,
body[data-calculator-id="steel-nbrd"] .panel-revisions .theory-grid {
  width: 100%;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  align-items: start;
  gap: var(--space-grid);
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-card,
body[data-calculator-id="steel-nbrd"] .panel-revisions .theory-card {
  width: 100%;
  max-width: none;
  justify-self: stretch;
  box-sizing: border-box;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-card-wide,
body[data-calculator-id="steel-nbrd"] .panel-revisions .theory-card-wide {
  grid-column: 1 / -1;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .card-head,
body[data-calculator-id="steel-nbrd"] .panel-revisions .card-head {
  width: 100%;
  max-width: none;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-card p,
body[data-calculator-id="steel-nbrd"] .panel-theory .theory-card li {
  line-height: 1.65;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-table-wrap,
body[data-calculator-id="steel-nbrd"] .panel-revisions .theory-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-table th,
body[data-calculator-id="steel-nbrd"] .panel-theory .theory-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
  vertical-align: top;
}

body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table th,
body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
  vertical-align: top;
}

body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table th:nth-child(1),
body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table td:nth-child(1),
body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table th:nth-child(2),
body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table td:nth-child(2) {
  width: 18%;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table th:nth-child(3),
body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table td:nth-child(3) {
  width: 64%;
  text-align: left;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-menu-panel {
  max-height: calc(100vh - 32px);
  overflow: auto;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-menu {
  overflow-x: visible;
}

@media (max-width: 760px) {
  body[data-calculator-id="steel-nbrd"] .detail-calculation-line,
  body[data-calculator-id="steel-nbrd"] .detail-calculation-result {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Pakiet kalkulatorow: normalizacja Kontakt i Dostep. */
body[data-calculator-id="steel-nbrd"] .panel-contact .how-grid {
  width: 100%;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  align-items: start;
  gap: var(--space-grid);
}

body[data-calculator-id="steel-nbrd"] .panel-contact .theory-card,
body[data-calculator-id="steel-nbrd"] .panel-contact .theory-card-wide {
  width: 100%;
  max-width: none;
  justify-self: stretch;
  box-sizing: border-box;
}

body[data-calculator-id="steel-nbrd"] .panel-contact .card-head {
  width: 100%;
  max-width: none;
}

body[data-calculator-id="steel-nbrd"] .panel-contact .contact-copy {
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.7;
}

body[data-calculator-id="steel-nbrd"] .panel-contact .contact-intro-line {
  display: inline;
}

body[data-calculator-id="steel-nbrd"] .panel-contact .contact-link {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

body[data-calculator-id="steel-nbrd"] .access-card {
  width: min(100%, 1360px);
  max-width: 1360px;
  margin: 0 auto;
  box-sizing: border-box;
}

body[data-calculator-id="steel-nbrd"] .access-card-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 36px;
  align-items: start;
}

body[data-calculator-id="steel-nbrd"] .access-panel {
  min-width: 0;
}

body[data-calculator-id="steel-nbrd"] .access-panel .card-head {
  width: 100%;
  max-width: none;
  margin-bottom: 22px;
}

body[data-calculator-id="steel-nbrd"] .access-panel .card-head p,
body[data-calculator-id="steel-nbrd"] .access-notice,
body[data-calculator-id="steel-nbrd"] .access-response,
body[data-calculator-id="steel-nbrd"] .access-dev-link {
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.7;
}



body[data-calculator-id="steel-nbrd"] .access-form {
  display: grid;
  gap: 18px;
  max-width: 520px;
  margin-top: 26px;
}



body[data-calculator-id="steel-nbrd"] .access-form .field {
  display: grid;
  gap: 8px;
  width: 100%;
}

body[data-calculator-id="steel-nbrd"] .access-form input {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-base);
  line-height: 1.3;
}



body[data-calculator-id="steel-nbrd"] .access-dev-link a {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

body[data-calculator-id="steel-nbrd"] .access-submit {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font: inherit;
  font-size: var(--fs-base);
  font-weight: 700;
  cursor: pointer;
}

body[data-calculator-id="steel-nbrd"] .access-submit {
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--brand);
  background: var(--brand-soft);
  color: var(--text);
}



@media (max-width: 1220px) {
  body[data-calculator-id="steel-nbrd"] .access-card-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Pakiet kalkulatorow: tabela rewizji dopasowana do zawartosci. */
body[data-calculator-id="steel-nbrd"] .panel-revisions .theory-table-wrap {
  width: max-content;
  max-width: 100%;
  justify-self: start;
  overflow-x: auto;
}

body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table {
  width: auto;
  min-width: 0;
  max-width: 100%;
  table-layout: auto;
}

body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table th,
body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table td {
  line-height: 1.45;
  vertical-align: top;
}

body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table th:nth-child(1),
body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table td:nth-child(1),
body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table th:nth-child(2),
body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table td:nth-child(2) {
  width: 1%;
  white-space: nowrap;
  overflow-wrap: normal;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table th:nth-child(3),
body[data-calculator-id="steel-nbrd"] .panel-revisions .revisions-table td:nth-child(3) {
  width: auto;
  max-width: 76ch;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

/* Pakiet kalkulatorow: tabela schematow dopasowana do zawartosci. */
.panel-theory .theory-card-schemes .theory-table-wrap.theory-table-wrap-fit {
  width: max-content;
  max-width: 100%;
  justify-self: start;
  overflow-x: auto;
}

.panel-theory .theory-card-schemes .theory-table.theory-table-fit {
  width: max-content;
  min-width: 0;
  max-width: none;
  table-layout: auto;
}

.panel-theory .theory-card-schemes .theory-table.theory-table-fit th,
.panel-theory .theory-card-schemes .theory-table.theory-table-fit td {
  width: auto;
  overflow-wrap: normal;
  vertical-align: middle;
}

.panel-theory .theory-card-schemes .theory-table.theory-table-fit th:first-child,
.panel-theory .theory-card-schemes .theory-table.theory-table-fit td:first-child {
  width: 1%;
  min-width: 54px;
  white-space: nowrap;
  text-align: center;
}

/* MJKM-CALC-STEEL-NBRD-0: tablice normowe i wyniki dopasowane do zawartości jak w aplikacjach wzorcowych. */
body[data-calculator-id="steel-nbrd"] .panel-theory .theory-table-wrap-imperfection,
body[data-calculator-id="steel-nbrd"] .panel-theory .theory-table-wrap-reference {
  display: inline-block;
  justify-self: center;
  width: auto;
  max-width: 100%;
  overflow: visible;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-table-wrap-imperfection .theory-table,
body[data-calculator-id="steel-nbrd"] .panel-theory .theory-table-wrap-reference .theory-table {
  width: auto;
  max-width: 100%;
  min-width: 0;
  table-layout: auto;
  margin: 0 auto;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-flow {
  gap: 0;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-section + .theory-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-faint);
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-section {
  border-top: 0;
  padding-top: 0;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-section h3 {
  margin-bottom: 8px;
  padding-bottom: 0;
  border-bottom: 0;
}

body[data-calculator-id="steel-nbrd"] .theory-formula-label {
  margin: 0 0 8px;
  color: var(--heading);
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .formula-card {
  gap: 18px;
  border-top: 0;
  padding-top: 4px;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .formula-expression + .formula-expression {
  margin-top: 10px;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-reference-stack-wide {
  margin-top: 18px;
  justify-items: center;
  gap: 16px;
}

body[data-calculator-id="steel-nbrd"] .theory-imperfection-table caption,
body[data-calculator-id="steel-nbrd"] .buckling-curve-reference-table caption {
  color: var(--heading);
  font-weight: 400;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .theory-imperfection-table caption strong,
body[data-calculator-id="steel-nbrd"] .buckling-curve-reference-table caption strong {
  font-weight: 800;
}

body[data-calculator-id="steel-nbrd"] .theory-imperfection-table th,
body[data-calculator-id="steel-nbrd"] .theory-imperfection-table td,
body[data-calculator-id="steel-nbrd"] .buckling-curve-reference-table th,
body[data-calculator-id="steel-nbrd"] .buckling-curve-reference-table td {
  text-align: center;
  vertical-align: middle;
}

body[data-calculator-id="steel-nbrd"] .theory-imperfection-table tbody th,
body[data-calculator-id="steel-nbrd"] .buckling-curve-reference-table tbody th {
  font-weight: 400;
  vertical-align: middle;
}

body[data-calculator-id="steel-nbrd"] .buckling-curve-reference-table {
  max-width: 760px;
}

body[data-calculator-id="steel-nbrd"] .theory-imperfection-table {
  max-width: 560px;
}

body[data-calculator-id="steel-nbrd"] .buckling-curve-reference-table th,
body[data-calculator-id="steel-nbrd"] .buckling-curve-reference-table td,
body[data-calculator-id="steel-nbrd"] .theory-imperfection-table th,
body[data-calculator-id="steel-nbrd"] .theory-imperfection-table td {
  padding: 9px 14px;
  vertical-align: middle;
}

body[data-calculator-id="steel-nbrd"] .buckling-curve-reference-table tbody th:first-child {
  width: 210px;
}

body[data-calculator-id="steel-nbrd"] .buckling-curve-section-img {
  display: block;
  width: min(160px, 100%);
  height: auto;
  margin: 10px auto 0;
  border-radius: 4px;
}

body[data-calculator-id="steel-nbrd"] .theory-scheme-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

body[data-calculator-id="steel-nbrd"] .theory-scheme-card {
  align-content: start;
  gap: 12px;
  min-height: 390px;
  padding: 16px 10px;
  cursor: default;
  pointer-events: none;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-scheme-card .scheme-visual {
  width: 100%;
  min-height: 280px;
  padding: 10px;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-scheme-card .scheme-visual img {
  width: auto;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-scheme-card .scheme-copy {
  min-width: 0;
  justify-items: center;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .theory-scheme-card .scheme-copy strong {
  min-height: 2.5em;
  text-transform: lowercase;
  white-space: normal;
  text-wrap: balance;
}

@media (max-width: 1100px) {
  body[data-calculator-id="steel-nbrd"] .theory-scheme-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body[data-calculator-id="steel-nbrd"] .theory-scheme-card-grid {
    grid-template-columns: 1fr;
  }
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
  margin-inline: 0;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table th,
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td {
  white-space: nowrap;
  overflow-wrap: normal;
  padding-inline: 5px;
  font-size: 11px;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(1),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(1) {
  width: 15%;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(2),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(2),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(6),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(6),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(7),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(7) {
  width: 12%;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(3),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(3),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(4),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(4),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(5),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(5) {
  width: 7%;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(8),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(8) {
  width: 10%;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(9),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(9) {
  width: 18%;
}

/* Pakiet kalkulatorow: karta schematu rowna wysokosci danych ogolnych. */
@media (min-width: 1221px) {
  body[data-calculator-id="steel-nbrd"] .panel-config .panel-grid {
    align-items: stretch;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body[data-calculator-id="steel-nbrd"] .panel-config .config-choice-stack {
    display: contents;
  }

  body[data-calculator-id="steel-nbrd"] .panel-config .config-choice-stack > .card:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  body[data-calculator-id="steel-nbrd"] .panel-config .config-choice-stack > .card:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    height: auto;
    min-height: 0;
  }

  body[data-calculator-id="steel-nbrd"] .panel-config .card-general {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    height: auto;
  }
}

/* MJKM-CALC-STEEL-NBRD-0: schematy statyczne jak w NCR. */
body[data-calculator-id="steel-nbrd"] .axis-scheme-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-toggle,
body[data-calculator-id="steel-nbrd"] .scheme-select-option {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-toggle {
  position: relative;
  padding-right: 38px;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-toggle .scheme-select-chevron {
  top: 16px;
  right: 14px;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--muted);
  pointer-events: none;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-menu {
  background: var(--overlay);
}

body[data-calculator-id="steel-nbrd"] .scheme-select-menu-panel {
  padding: var(--space-subcard-y) var(--space-subcard-x);
  border-radius: 14px;
  background: var(--surface-plain);
  box-shadow: var(--shadow);
}

body[data-calculator-id="steel-nbrd"] .scheme-select-menu-head {
  gap: 12px;
  color: var(--text);
  font-size: var(--fs-heading);
}

body[data-calculator-id="steel-nbrd"] .scheme-select-option-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: center;
  gap: 12px;
  min-height: 260px;
  padding: 14px 12px;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card .scheme-copy {
  order: 2;
  justify-items: center;
  text-align: center;
  width: 100%;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card .scheme-copy strong {
  font-size: var(--fs-base);
  line-height: 1.25;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-option.axis-scheme-card .scheme-copy strong,
body[data-calculator-id="steel-nbrd"] .scheme-select-toggle.axis-scheme-card .scheme-copy strong {
  text-transform: lowercase;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card .scheme-meta {
  margin-top: 3px;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card .scheme-meta span {
  min-height: 24px;
  padding: 0 7px;
  font-size: var(--fs-base);
  line-height: 1.12;
  white-space: normal;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card .scheme-visual {
  grid-column: 1 / -1;
  grid-row: auto;
  order: 1;
  justify-self: stretch;
  width: 100%;
  min-height: 170px;
  max-height: none;
  padding: 10px;
}

body[data-calculator-id="steel-nbrd"] .axis-scheme-card .scheme-visual img {
  width: auto;
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}

body[data-calculator-id="steel-nbrd"] .scheme-visual-custom,
body[data-calculator-id="steel-nbrd"] .scheme-select-toggle.axis-scheme-card .scheme-visual-custom {
  min-height: 170px;
}

body[data-calculator-id="steel-nbrd"] .scheme-visual-custom span {
  font-size: calc(var(--fs-choice) * 1.5);
  line-height: 1.05;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-toggle.axis-scheme-card {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  align-items: start;
  justify-items: center;
  min-height: 260px;
  padding: 14px 38px 14px 12px;
  text-align: center;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-toggle.axis-scheme-card .scheme-visual {
  grid-column: 1 / -1;
  grid-row: auto;
  order: 1;
  justify-self: stretch;
  width: 100%;
  min-height: 170px;
  max-height: none;
  padding: 10px;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-toggle.axis-scheme-card .scheme-visual img {
  max-height: 150px;
}

body[data-calculator-id="steel-nbrd"] .scheme-select-toggle.axis-scheme-card .scheme-visual-custom {
  min-height: 170px;
}

body[data-calculator-id="steel-nbrd"] .panel-config .axis-scheme-card {
  min-height: 390px;
}

body[data-calculator-id="steel-nbrd"] .panel-config .axis-scheme-card .scheme-visual {
  min-height: 280px;
}

body[data-calculator-id="steel-nbrd"] .panel-config .axis-scheme-card .scheme-visual img {
  width: auto;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}

body[data-calculator-id="steel-nbrd"] .panel-config .axis-scheme-card .scheme-visual-custom {
  min-height: 280px;
}

/* MJKM-CALC-STEEL-NBRD-0: tablice normowe w podstawach teoretycznych wyrównane do lewej. */
body[data-calculator-id="steel-nbrd"] .panel-theory .formula-card {
  border-bottom: 0;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-reference-stack-wide {
  width: max-content;
  max-width: 100%;
  justify-items: start;
  margin-top: 18px;
  margin-left: 0;
  margin-right: auto;
  gap: 16px;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-table-wrap-imperfection,
body[data-calculator-id="steel-nbrd"] .panel-theory .theory-table-wrap-reference {
  justify-self: start;
  margin-left: 0;
  margin-right: auto;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-table-wrap-imperfection .theory-table,
body[data-calculator-id="steel-nbrd"] .panel-theory .theory-table-wrap-reference .theory-table {
  width: auto;
  table-layout: auto;
  margin: 0;
}

body[data-calculator-id="steel-nbrd"] .buckling-curve-reference-table {
  max-width: 760px;
}

body[data-calculator-id="steel-nbrd"] .theory-imperfection-table {
  max-width: 560px;
}

body[data-calculator-id="steel-nbrd"] .buckling-curve-reference-table tbody th:first-child {
  width: 230px;
}

body[data-calculator-id="steel-nbrd"] .buckling-curve-section-img {
  width: min(190px, 100%);
  margin: 10px auto 0;
  border-radius: 4px;
}

body[data-calculator-id="steel-nbrd"] .buckling-curve-section-img-ibeam {
  width: min(160px, 100%);
}

body[data-calculator-id="steel-nbrd"] .buckling-curve-section-img-tube {
  width: min(203px, 100%);
  margin-top: 14px;
}

body[data-calculator-id="steel-nbrd"] .buckling-curve-section-img-channel {
  width: min(75.6px, 100%);
  margin-top: 9px;
}

html[data-theme="light"] body[data-calculator-id="steel-nbrd"] .buckling-curve-section-img--dark,
html:not([data-theme="light"]) body[data-calculator-id="steel-nbrd"] .buckling-curve-section-img--light {
  display: none;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .buckling-curve-reference-table th,
body[data-calculator-id="steel-nbrd"] .panel-theory .buckling-curve-reference-table td,
body[data-calculator-id="steel-nbrd"] .panel-theory .theory-imperfection-table th,
body[data-calculator-id="steel-nbrd"] .panel-theory .theory-imperfection-table td {
  vertical-align: middle;
}

body[data-calculator-id="steel-nbrd"] #preliminary-result-card .preview-metrics-table,
body[data-calculator-id="steel-nbrd"] #checked-profile-card .preview-metrics-table {
  width: 260px;
  min-width: min(100%, 260px);
  max-width: 100%;
  table-layout: fixed;
}

body[data-calculator-id="steel-nbrd"] #preliminary-result-card .preview-metric-label-col,
body[data-calculator-id="steel-nbrd"] #checked-profile-card .preview-metric-label-col {
  width: 48%;
}

body[data-calculator-id="steel-nbrd"] #preliminary-result-card .preview-metric-value-col,
body[data-calculator-id="steel-nbrd"] #checked-profile-card .preview-metric-value-col {
  width: 52%;
}

body[data-calculator-id="steel-nbrd"] #preliminary-result-card .preview-metrics-table th,
body[data-calculator-id="steel-nbrd"] #preliminary-result-card .preview-metrics-table td,
body[data-calculator-id="steel-nbrd"] #checked-profile-card .preview-metrics-table th,
body[data-calculator-id="steel-nbrd"] #checked-profile-card .preview-metrics-table td {
  white-space: nowrap;
}

body[data-calculator-id="steel-nbrd"] #preliminary-result-card .preview-metrics-table {
  width: min(260px, 100%);
  min-width: 0;
  max-width: 100%;
  justify-self: center;
}

body[data-calculator-id="steel-nbrd"] #main-result-card .preview-metrics-table,
body[data-calculator-id="steel-nbrd"] .panel-results .family-result-card .preview-metrics-table {
  width: max-content;
  min-width: 0;
  max-width: 100%;
  table-layout: auto;
}

body[data-calculator-id="steel-nbrd"] #main-result-card .preview-metric-label-col,
body[data-calculator-id="steel-nbrd"] #main-result-card .preview-metric-value-col,
body[data-calculator-id="steel-nbrd"] .panel-results .family-result-card .preview-metric-label-col,
body[data-calculator-id="steel-nbrd"] .panel-results .family-result-card .preview-metric-value-col {
  width: auto;
}

body[data-calculator-id="steel-nbrd"] #main-result-card .preview-metrics-table th,
body[data-calculator-id="steel-nbrd"] #main-result-card .preview-metrics-table td,
body[data-calculator-id="steel-nbrd"] .panel-results .family-result-card .preview-metrics-table th,
body[data-calculator-id="steel-nbrd"] .panel-results .family-result-card .preview-metrics-table td {
  width: auto;
  padding-inline: 8px;
  white-space: nowrap;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table {
  width: 100%;
  table-layout: auto;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table th:nth-child(n),
body[data-calculator-id="steel-nbrd"] .panel-results .results-table td:nth-child(n) {
  width: auto;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-step {
  justify-items: stretch;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result {
  grid-template-columns: 92px minmax(0, 1fr);
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-content {
  display: block;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  text-align: left;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-result-value {
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-result-value *,
body[data-calculator-id="steel-nbrd"] .calculation-nowrap,
body[data-calculator-id="steel-nbrd"] .calculation-nowrap * {
  white-space: nowrap;
}

body[data-calculator-id="steel-nbrd"] .calculation-nowrap {
  display: inline;
  line-height: 1.2;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-result-value:has(> .nbrd-reduction-results) {
  width: 100%;
  white-space: normal;
}

body[data-calculator-id="steel-nbrd"] .nbrd-reduction-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

body[data-calculator-id="steel-nbrd"] .nbrd-reduction-axis {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

body[data-calculator-id="steel-nbrd"] .nbrd-reduction-axis .calculation-nowrap {
  display: block;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-result-value:has(.mathml-wrap) {
  width: 100%;
  white-space: normal;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line .mathml-wrap,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .mathml-wrap,
body[data-calculator-id="steel-nbrd"] .detail-calculation-line .detail-mathml-stack,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .detail-mathml-stack,
body[data-calculator-id="steel-nbrd"] .detail-calculation-line .detail-mathml-row,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .detail-mathml-row {
  width: max-content;
  max-width: 100%;
  margin-left: 0;
  margin-right: auto;
  justify-self: start;
  justify-content: start;
  justify-items: start;
  text-align: left;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line .detail-mathml-equation,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .detail-mathml-equation {
  display: inline-block;
  width: max-content;
  max-width: 100%;
  margin: 0 !important;
  text-align: left;
  overflow-wrap: normal;
  word-break: normal;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line .detail-mathml-equation mtd,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .detail-mathml-equation mtd {
  text-align: left;
}

body[data-calculator-id="steel-nbrd"] .detail-calculation-line .detail-mathml-equation .mathml-empty-row mtd,
body[data-calculator-id="steel-nbrd"] .detail-calculation-result .detail-mathml-equation .mathml-empty-row mtd {
  padding-top: 0.7em;
}

.result-families .card-head {
  order: 1;
}

.result-families .family-cards {
  order: 2;
}

.result-families > .detail-result-warning {
  order: 3;
  align-self: stretch;
}

/* Schematy: wykorzystaj pole wizualne do pionowych marginesow bez powiekszania kart. */
body[data-calculator-id="steel-nbrd"] .panel-theory .theory-scheme-card .scheme-visual,
body[data-calculator-id="steel-nbrd"] .scheme-select-option.axis-scheme-card .scheme-visual,
body[data-calculator-id="steel-nbrd"] .scheme-select-toggle.axis-scheme-card .scheme-visual {
  overflow: hidden;
}

body[data-calculator-id="steel-nbrd"] .panel-theory .theory-scheme-card .scheme-visual img,
body[data-calculator-id="steel-nbrd"] .scheme-select-option.axis-scheme-card .scheme-visual img,
body[data-calculator-id="steel-nbrd"] .scheme-select-toggle.axis-scheme-card .scheme-visual img {
  transform: none;
  transform-origin: center top;
}

/* Zestawienie wynikow: gesty profil MAS-MRD, nadal z tekstem 15 px. */
body[data-calculator-id="steel-nbrd"] .panel-results .results-table-grid {
  grid-template-columns: minmax(0, 1fr);
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table-grid > .table-card {
  width: 100%;
  max-width: 100%;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table-grid .table-wrap {
  display: block;
  width: max-content !important;
  max-width: 100% !important;
  margin-inline: auto;
  overflow-x: auto;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table-grid .results-table {
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
  table-layout: auto !important;
  margin-inline: auto;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table-grid .results-table th,
body[data-calculator-id="steel-nbrd"] .panel-results .results-table-grid .results-table td {
  width: auto !important;
  min-width: 0 !important;
  padding: 8px !important;
  font-size: calc(var(--fs-small) * 1.25) !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table-grid .results-table thead th {
  font-weight: 700;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table-grid .results-table .table-head-stack {
  gap: 2px;
  line-height: 1.05;
}

body[data-calculator-id="steel-nbrd"] .panel-results .results-table-grid .results-table tbody td[colspan] {
  white-space: normal !important;
}

/* Statyczna nazwa przekroju w kartach wynikowych STEEL. */
body[data-calculator-id="steel-nbrd"] .profile-name-heading.preview-name {
  display: block;
  max-width: 100%;
  margin: 0;
  color: var(--good);
  font-family: var(--font-heading);
  font-size: 20px !important;
  font-weight: 700;
  line-height: 1.08 !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  cursor: default;
}

/* Migracja NBRD: wspólny układ i lokalne wyjątki dla treści SGN. */
body[data-layout="results-below-input"] .app-shell.mjkm-layout-frame { margin-top: 0; }
.nbrd-layout-ribbon-main, .nbrd-layout-ribbon-actions { display: flex; align-items: center; gap: 20px; min-width: 0; }
.nbrd-layout-ribbon-actions { gap: 12px; }
.nbrd-layout-brand, .nbrd-layout-hub {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 36px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px;
  color: var(--text); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.nbrd-layout-hub { color: var(--muted); font-weight: 600; }
.nbrd-layout-brand:hover, .nbrd-layout-hub:hover, .nbrd-layout-brand:focus-visible, .nbrd-layout-hub:focus-visible {
  border-color: var(--line); background: var(--panel-soft); color: var(--text); text-decoration: none;
}
.nbrd-layout-brand:focus-visible, .nbrd-layout-hub:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.nbrd-layout-brand-mark, .nbrd-layout-brand-mark img { display: block; width: 28px; height: 28px; flex: 0 0 28px; }
.nbrd-layout-brand-name { display: inline-flex; align-items: baseline; gap: 4px; }
.nbrd-layout-brand-name strong { font-weight: 800; }
.nbrd-layout-brand-name > span { color: var(--muted); font-weight: 400; }
.nbrd-layout-cube-dark, html[data-theme="dark"] .nbrd-layout-cube-light { display: none !important; }
html[data-theme="dark"] .nbrd-layout-cube-dark { display: block !important; }
.nbrd-layout-contact {
  min-height: 36px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer;
}
.nbrd-layout-contact:hover, .nbrd-layout-contact:focus-visible { border-color: var(--line); background: var(--panel-soft); color: var(--text); }
.nbrd-layout-contact:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.nbrd-layout-theme .str-theme-toggle { box-sizing: border-box; width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 4px; }
.nbrd-layout-theme svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nbrd-layout-theme-moon, html[data-theme="light"] .nbrd-layout-theme-sun { display: none; }
html[data-theme="light"] .nbrd-layout-theme-moon { display: block; }
.nbrd-layout-header-body {
  margin-bottom: 16px; padding: 0 24px 14px; border-inline: 1px solid var(--line);
  border-bottom: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: var(--surface-plain);
}
.nbrd-layout-titlebar.topbar { display: block; margin: 0; padding: 24px 0 16px; border: 0; }
.nbrd-layout-titlebar .brand-block > h1 { margin: 0; padding: 0; font-size: 24px; white-space: normal; }
.nbrd-layout-info-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.nbrd-layout-info-content > :is(.panel-how, .panel-theory) > :is(.how-grid, .theory-grid) > .card {
  width: 100%; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.nbrd-layout-info-content > :is(.panel-how, .panel-theory) > :is(.how-grid, .theory-grid) > .card + .card {
  margin-top: var(--space-grid); padding-top: var(--space-grid); border-top: 1px solid var(--line);
}
.nbrd-layout-info-content .panel-theory .theory-grid > .card:first-child > .card-head,
.nbrd-layout-info-content .panel-revisions .card-head,
.nbrd-layout-info-content .panel-contact .card-head h2 { display: none; }
.nbrd-layout-info-content .panel-how .how-step { border-top: 0; }
body[data-calculator-id="steel-nbrd"][data-layout="results-below-input"] .panel-config > .panel-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.34fr); grid-template-rows: auto; align-items: start;
}
.nbrd-layout-input-group { display: grid; gap: var(--space-grid); min-width: 0; }
.nbrd-layout-input-group > .card-head p { margin-bottom: 0; }
.nbrd-layout-input-columns {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 23%, 300px);
  gap: var(--space-grid); align-items: start; min-width: 0;
}
body[data-calculator-id="steel-nbrd"][data-layout="results-below-input"] .panel-config .nbrd-layout-input-columns > .config-choice-stack {
  display: grid; grid-column: auto; grid-row: auto; width: 100%;
}
body[data-calculator-id="steel-nbrd"][data-layout="results-below-input"] .panel-config .nbrd-layout-input-columns > .config-choice-stack > .card { grid-column: auto; grid-row: auto; height: auto; }
body[data-calculator-id="steel-nbrd"][data-layout="results-below-input"] .panel-config .nbrd-layout-input-columns > .card-general {
  grid-column: auto; grid-row: auto; align-self: start; width: 100%; height: auto;
}
body[data-layout="results-below-input"] .card-general .general-layout { grid-template-columns: minmax(0, 1fr); }
body[data-layout="results-below-input"] .card-general .general-form-column { width: 100%; max-width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; }
body[data-calculator-id="steel-nbrd"][data-layout="results-below-input"] .panel-config > .panel-grid > .preview-card {
  width: 100%; max-width: 100%; height: auto; min-height: 0; grid-template-rows: auto auto auto; align-content: start; align-self: start;
}
body[data-layout="results-below-input"] .panel-config > .panel-grid > .preview-card .preview-result { min-height: 0; }
body[data-layout="results-below-input"] .panel-config > .panel-grid > .preview-card > #input-warning { margin-top: var(--space-row); text-align: left; }
.nbrd-layout-result-controls { margin-top: var(--space-grid); overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); }
.nbrd-layout-result-intro { margin: 0; padding: var(--space-row) var(--space-grid); color: var(--muted); line-height: 1.4; }
body[data-layout="results-below-input"] .results-summary-grid { grid-template-columns: minmax(0, 1fr); }
body[data-layout="results-below-input"] .nbrd-layout-results-card,
body[data-layout="results-below-input"] .nbrd-layout-details-card { width: 100%; min-width: 0; }
.nbrd-layout-section-head { margin-bottom: var(--space-grid); padding-bottom: 18px; border-bottom: 1px solid var(--line); }
body[data-layout="results-below-input"] .results-overview-grid { margin-bottom: 0; }
body[data-layout="results-below-input"] .panel-results .results-family-card,
body[data-layout="results-below-input"] .panel-results .results-table-grid > .table-card { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body[data-layout="results-below-input"] .panel-results .results-table-sections { margin-top: var(--space-grid); padding-top: var(--space-grid); border-top: 1px solid var(--line); }
body[data-layout="results-below-input"] .panel-results .results-table-grid { grid-template-columns: minmax(0, 1fr); min-width: 0; }
body[data-layout="results-below-input"] .panel-results .results-table-grid > .table-card + .table-card { margin-top: var(--space-grid); padding-top: var(--space-grid); border-top: 1px solid var(--line); }
body[data-layout="results-below-input"] .panel-details .detail-result-content { display: block; }
body[data-layout="results-below-input"] .panel-details #checked-profile-card { height: auto; min-height: 0; }
body[data-layout="results-below-input"] .panel-details .detail-top-stack { margin-bottom: 0; }
body[data-layout="results-below-input"] .panel-chart > #detail-chart-panel { width: 100%; height: auto; min-height: 620px; grid-template-rows: auto auto auto; }
body[data-layout="results-below-input"] .panel-chart #detail-chart-heading,
body[data-layout="results-below-input"] .panel-chart #detail-chart-range,
body[data-layout="results-below-input"] .panel-chart #detail-chart { width: min(100%, 1100px); justify-self: center; }
@media (min-width: 861px) {
  body[data-layout="results-below-input"] .panel-chart > #detail-chart-panel {
    --chart-control-x-min-left: 12.105%; --chart-control-x-max-left: 81.316%;
    --chart-control-x-min-bottom: 17.333%; --chart-control-x-max-bottom: 17.333%;
    --chart-control-y-min-left: 4.737%; --chart-control-y-max-left: 4.737%;
    --chart-control-y-min-top: calc(73.367% + 15px); --chart-control-y-max-top: 11.7%;
    --chart-control-auto-left: 5.263%; --chart-control-auto-bottom: 19.667%;
    grid-template-rows: auto auto; min-height: 0;
  }
  body[data-layout="results-below-input"] .panel-chart #detail-chart-range,
  body[data-layout="results-below-input"] .panel-chart #detail-chart { height: auto; min-height: 0; aspect-ratio: 760 / 600; }
}
body[data-layout="results-below-input"] .layout { overflow-anchor: none; }
@media (max-width: 1220px) {
  body[data-calculator-id="steel-nbrd"][data-layout="results-below-input"] .panel-config > .panel-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .nbrd-layout-input-columns { grid-template-columns: minmax(0, 1fr); }
  .nbrd-layout-header-body { padding-inline: 14px; }
  .nbrd-layout-ribbon-main, .nbrd-layout-ribbon-actions { flex-wrap: wrap; gap: 8px 12px; }
}




/* BATCH 20261004_MJKM_RESULT_CARDS_TABLES_INPUTS_01 */
body[data-calculator-id="steel-nbrd"] .panel-results :is(.results-table, .selection-results-table, .result-parameter-table) tbody :is(th, td, strong) {
  font-weight: 400 !important;
}
body[data-calculator-id="steel-nbrd"] .panel-config .card-general .general-form-head {
  width: 100%;
  display: flex;
  justify-content: center;
  text-align: center;
}
body[data-calculator-id="steel-nbrd"] .panel-config .card-general .general-form-column,
body[data-calculator-id="steel-nbrd"] .panel-config .card-general .field {
  justify-items: center;
  text-align: center;
}
body[data-calculator-id="steel-nbrd"] .panel-config .card-general .field > :is(input, select, textarea, .number-stepper, .profile-picker) {
  margin-inline: auto;
}

/* Work mode only: override the older, more specific 30px NBRD picker rules. */
body[data-calculator-id="steel-nbrd"] .work-mode-text-picker .standard-text-picker-measure {
  min-height: 48px;
  font-size: 16px;
}
body[data-calculator-id="steel-nbrd"] .work-mode-text-picker .work-mode-picker-toggle {
  min-height: 48px;
  font-size: 16px;
}
body[data-calculator-id="steel-nbrd"] .work-mode-text-picker .standard-text-picker-display {
  text-align: left;
}
body[data-calculator-id="steel-nbrd"] .work-mode-text-picker .standard-text-picker-option {
  min-height: 48px;
  padding: 12px 14px;
  font-size: 16px;
}
