:root {
  --red: #b40606;
  --teal: #046c6c;
  --teal-soft: #accccc;
  --ink: #373331;
  --muted: #77716e;
  --line: #d7e3e3;
  --paper: #ffffff;
  --panel: #f2f5f6;
  --steel: #dadee1;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  padding: 0 0 30px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.42857143;
}

.steel-calculator {
  background: var(--paper);
  color: var(--ink);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.55;
}

.steel-calculator a,
.naglowek a,
.site-footer a {
  color: var(--teal);
  text-decoration: none;
}

.steel-calculator a:hover,
.naglowek a:hover,
.site-footer a:hover {
  text-decoration: underline;
}

.steel-calculator a:focus-visible,
.naglowek a:focus-visible,
.site-footer a:focus-visible,
.steel-calculator select:focus-visible,
.steel-calculator input:focus-visible {
  outline: 3px solid rgba(180,6,6,0.22);
  outline-offset: 2px;
}

.calc-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.naglowek {
  background:
    url("../img/naglowek.png") top center,
    url("assets/naglowek.png") top center;
  color: var(--ink);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.42857143;
  margin: 0;
  min-height: 190px;
  overflow: hidden;
  padding: 0;
}

.naglowek .container {
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

.naglowek .row {
  margin-right: -15px;
  margin-left: -15px;
}

@media (max-width: 768px) {
  .naglowek .nav-pills > li{
    padding-left:15px;
  }
}

.naglowek .row::before,
.naglowek .row::after,
.naglowek .container::before,
.naglowek .container::after,
.naglowek .nav::before,
.naglowek .nav::after {
  display: table;
  content: " ";
}

.naglowek .row::after,
.naglowek .container::after,
.naglowek .nav::after {
  clear: both;
}

.naglowek .col-xs-12,
.naglowek .col-sm-4,
.naglowek .col-sm-8 {
  position: relative;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
}

.naglowek .col-xs-12 {
  float: left;
  width: 100%;
}

.naglowek .img-responsive {
  display: block;
  max-width: 100%;
  height: auto;
}

.naglowek .center-block {
  display: block;
  margin-right: auto;
  margin-left: auto;
}

.naglowek .pull-right {
  float: right !important;
}

.naglowek .nav {
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.naglowek .nav > li {
  position: relative;
  display: block;
}

.naglowek .nav > li > a {
  position: relative;
  display: block;
  padding: 10px 15px;
}

.naglowek .nav-pills > li {
  float: left;
}

.naglowek .nav-pills > li + li {
  margin-left: 2px;
}

.naglowek .nav-pills > li > a {
  border-radius: 4px;
}

.logo {
  display: block;
  margin-top: 104px;
  text-align: left;
}

.logo:hover {
  text-decoration: none;
}

.logo img {
  float: left;
}

.menu {
  margin-top: 90px;
}

.menu a {
  color: #9b9b9b;
  font-size: 140%;
  font-weight: bold;
  text-transform: uppercase;
}

.menu .active a,
.menu a:hover {
  background: none !important;
  color: var(--red) !important;
  text-decoration: none;
}

@media (min-width: 768px) {
  .naglowek .container {
    width: 750px;
  }

  .naglowek .col-sm-4,
  .naglowek .col-sm-8 {
    float: left;
  }

  .naglowek .col-sm-4 {
    width: 33.33333333%;
  }

  .naglowek .col-sm-8 {
    width: 66.66666667%;
  }
}

@media (min-width: 992px) {
  .naglowek .container {
    width: 970px;
  }
}

@media (min-width: 1200px) {
  .naglowek .container {
    width: 1170px;
  }
}

@media (max-width: 770px) {
  .menu {
    float: left;
    clear: both;
    width: 100%;
    margin: 20px 0;
  }

  .menu li {
    display: block;
    width: 100%;
  }

  .logo img {
    float: none;
  }
}

.hero-tool {
  min-height: 430px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.84) 52%, rgba(255,255,255,0.46) 100%),
    linear-gradient(135deg, rgba(4,108,108,0.14), rgba(180,6,6,0.08)),
    repeating-linear-gradient(0deg, transparent 0, transparent 35px, rgba(4,108,108,0.08) 36px),
    repeating-linear-gradient(90deg, #eef2f3 0, #eef2f3 35px, #e2e7e8 36px);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  gap: 44px;
  align-items: center;
  min-height: 430px;
  padding: 48px 0;
}

.intro h1 {
  max-width: 760px;
  margin: 0;
  color: var(--red);
  font-size: clamp(32px, 4vw, 53.6px);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}

.intro p:not(.eyebrow) {
  max-width: 680px;
  margin: 24px 0 0;
  font-size: 16.8px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.chooser,
.panel,
.table-section,
.contact-section {
  background: var(--paper);
  border: 1px solid var(--line);
}

.chooser {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.steel-calculator label {
  display: grid;
  gap: 7px;
  color: var(--teal);
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.steel-calculator select,
.steel-calculator input {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--teal-soft);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  padding: 9px 11px;
}

.steel-calculator select:focus,
.steel-calculator input:focus {
  border-color: var(--teal);
  outline: 2px solid rgba(4,108,108,0.14);
}

.steel-calculator select.is-invalid,
.steel-calculator input.is-invalid {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px rgba(180,6,6,0.28);
}

.steel-calculator input:disabled {
  background: #eef2f3;
  color: var(--muted);
  cursor: not-allowed;
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
  padding: 34px 0 0;
}

.panel {
  min-width: 0;
  padding: 22px;
}

.panel h2,
.table-section h2 {
  margin: 0;
  color: var(--red);
  font-size: 20.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-head,
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.meta-copy {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  font-weight: 400;
}

.meta-copy strong {
  color: var(--teal);
}

.mass-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.drawing-wrap {
  margin-top: 20px;
  min-height: 320px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(172,204,204,0.28) 1px, transparent 1px),
    linear-gradient(rgba(172,204,204,0.28) 1px, transparent 1px),
    #f8fafb;
  background-size: 28px 28px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.drawing-wrap svg {
  width: min(100%, 560px);
  height: auto;
  display: block;
}

.shape-fill {
  fill: url(#steelShade);
  stroke: #111;
  stroke-width: 2;
}

.shape-cut {
  fill: #fff;
  stroke: #111;
  stroke-width: 2;
}

.rebar-rib {
  fill: url(#steelShade);
  stroke: #111;
  stroke-width: 2;
}

.dim-line {
  stroke: #1f1f1f;
  stroke-width: 1.2;
  marker-start: url(#arrow);
  marker-end: url(#arrow);
}

.dim-help {
  stroke: #4d4d4d;
  stroke-width: 1;
}

.dim-text,
.drawing-title {
  fill: #111;
  font: 700 14px "Open Sans", Arial, sans-serif;
}

.dim-text {
  font-style: italic;
  font-weight: 400;
  paint-order: stroke fill;
  stroke: #f8fafb;
  stroke-linejoin: round;
  stroke-width: 6px;
}

.drawing-title {
  font-size: 16px;
  font-weight: 800;
}

.calc-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.calc-fields .wide {
  grid-column: 1 / -1;
}

.result-box {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 18px;
  background: var(--panel);
  border-left: 4px solid var(--red);
  font-weight: 400;
}

.result-box strong {
  color: var(--red);
  font-size: 24px;
  font-weight: 800;
}

.result-warning {
  color: var(--red);
  font-weight: 800;
}

.table-section {
  margin-top: 24px;
  padding: 24px;
}

.table-search {
  width: min(340px, 100%);
}

.table-wrap {
  margin-top: 18px;
  overflow: auto;
  border: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

.steel-calculator table {
  width: 100%;
  min-width: 740px;
  border-collapse: collapse;
  font-size: 14.7px;
}

.steel-calculator th,
.steel-calculator td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.steel-calculator th {
  background: var(--steel);
  color: var(--teal);
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.steel-calculator td:first-child {
  color: var(--red);
  font-weight: 800;
}

.steel-calculator tr:nth-child(even) td {
  background: #fbfcfc;
}

.legal-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14.7px;
  font-weight: 400;
}

.legal-note strong {
  color: var(--teal);
  font-weight: 800;
}

.contact-section {
  margin-top: 24px;
  padding: 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  font-style: normal;
}

.contact-grid p {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  background: #fff;
  font-weight: 400;
}

.contact-grid span {
  color: var(--teal);
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-grid strong,
.contact-grid a {
  overflow-wrap: anywhere;
}

.site-footer {
  margin-top: 30px;
  padding: 18px 0;
  color: var(--teal);
  border-top: 1px solid var(--teal-soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 1040px) {
  .hero-grid,
  .workspace {
    grid-template-columns: 1fr;
  }

  .meta-panel {
    order: -1;
  }
}

@media (max-width: 720px) {
  .hero-grid {
    min-height: 0;
    padding: 34px 0;
  }

  .chooser,
  .panel,
  .table-section,
  .contact-section {
    padding: 18px;
  }

  .panel-head,
  .section-title,
  .footer-inner {
    align-items: start;
    flex-direction: column;
  }

  .calc-fields {
    grid-template-columns: 1fr;
  }

  .drawing-wrap {
    min-height: 240px;
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .steel-calculator table {
    min-width: 660px;
  }
}
