html,
body {
  overflow-x: hidden;
}

.load-calculator-page {
  color: rgb(12, 26, 45);
}

.load-calculator-workbench {
  display: grid;
  grid-template-columns: minmax(250px, 0.55fr) minmax(0, 2.45fr);
  gap: clamp(14px, 1.8vw, 20px);
  margin: 10px;
  padding: clamp(14px, 2.4vw, 24px);
  border: 2px solid rgb(12, 26, 45);
  border-radius: 8px;
  background: #f7f7f7;
  box-shadow: 0 16px 46px rgba(12, 26, 45, 0.24);
}

.load-calculator-controls {
  display: grid;
  align-content: start;
  gap: 1rem;
  min-width: 0;
}

.load-calculator-intro {
  display: grid;
  gap: 0.45rem;
}

.load-calculator-kicker {
  justify-self: start;
  margin: 0;
  padding: 0.22em 0.55em;
  background: rgb(12, 26, 45);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.load-calculator-intro h2 {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 3px solid var(--accent);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgb(12, 26, 45);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: 0;
  line-height: 1.1;
  text-align: left;
}

.load-calculator-intro p {
  margin: 0;
  color: #334155;
  font-size: 1.02rem;
  line-height: 1.42;
}

.load-input-group {
  display: grid;
  gap: 0.45rem;
}

.load-input-group label {
  color: rgb(12, 26, 45);
  font-size: 1rem;
  font-weight: 900;
}

.load-number-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 128px);
  align-items: center;
  gap: 0.75rem;
}

.load-number-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.load-number-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 2.55rem;
  border: 1px solid rgba(12, 26, 45, 0.28);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.load-number-field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0.42rem 0.4rem 0.42rem 0.55rem;
  color: rgb(12, 26, 45);
  font: inherit;
  font-weight: 800;
}

.load-number-field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.load-number-field span {
  padding: 0 0.55rem;
  color: #46566d;
  font-size: 0.9rem;
  font-weight: 900;
}

.load-result-panel {
  display: grid;
  gap: 0.3rem;
  min-height: 8rem;
  padding: 0.85rem;
  border: 2px solid rgba(12, 26, 45, 0.18);
  border-left-width: 8px;
  border-radius: 8px;
  background: #fff;
}

.load-result-panel.is-safe {
  border-left-color: #1f7a3a;
  background: #f0fbf3;
}

.load-result-panel.is-caution {
  border-left-color: #d28a12;
  background: #fff8e8;
}

.load-result-panel.is-warning {
  border-left-color: #b32121;
  background: #fff2f2;
}

.load-result-label {
  justify-self: start;
  padding: 0.2em 0.55em;
  background: rgb(12, 26, 45);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.load-result-panel.is-safe .load-result-label {
  background: #1f7a3a;
}

.load-result-panel.is-caution .load-result-label {
  background: #c47a00;
}

.load-result-panel.is-warning .load-result-label {
  background: #b32121;
}

.load-result-panel strong {
  color: rgb(12, 26, 45);
  font-size: clamp(1.2rem, 2.1vw, 1.45rem);
  line-height: 1.12;
}

.load-result-panel span:last-child {
  color: #344054;
  line-height: 1.35;
}

.load-capacity-plate {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(12px, 1.7vw, 18px);
  align-items: stretch;
  min-width: 0;
  padding: clamp(14px, 2vw, 20px);
  border: 8px solid #171c22;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.84), rgba(235,232,224,0.92)),
    #eeeae0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7), 0 8px 18px rgba(12, 26, 45, 0.18);
}

.load-capacity-table-wrap {
  display: grid;
  align-content: start;
  gap: 1rem;
  min-width: 0;
}

.load-capacity-editor,
.load-calculated-panel {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.load-table-heading {
  display: grid;
  gap: 0.25rem;
}

.load-table-heading h2 {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 2px solid var(--accent);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #101820;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  letter-spacing: 0;
  line-height: 1.15;
  text-align: left;
}

.load-table-heading p {
  margin: 0;
  color: #475467;
  font-size: 0.9rem;
  line-height: 1.35;
}

.load-capacity-summary,
.load-capacity-values {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: rgba(255, 255, 255, 0.72);
  color: #101820;
  font-size: clamp(0.78rem, 0.95vw, 0.92rem);
}

.load-capacity-summary caption {
  padding: 0.45rem;
  border: 1px solid #565f6b;
  border-bottom: 0;
  background: #dce7ee;
  color: #101820;
  font-weight: 900;
}

.load-capacity-summary th,
.load-capacity-summary td,
.load-capacity-values th,
.load-capacity-values td {
  border: 1px solid #565f6b;
  padding: 0.42rem 0.5rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.load-capacity-summary th,
.load-capacity-values th {
  text-align: left;
}

.load-capacity-values thead th {
  background: #101820;
  color: #fff;
  text-align: center;
}

.load-capacity-values tbody td {
  text-align: center;
}

.load-capacity-input-table th:nth-child(1),
.load-capacity-input-table th:nth-child(2) {
  width: 43%;
}

.load-capacity-input-table th:nth-child(3) {
  width: 14%;
}

.load-capacity-input-table input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(16, 24, 32, 0.2);
  border-radius: 4px;
  padding: 0.38rem 0.32rem;
  background: #fff;
  color: #101820;
  font: inherit;
  font-weight: 800;
  text-align: right;
}

.load-capacity-input-table input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.load-capacity-input-table tr.is-invalid input {
  border-color: #b32121;
  background: #fff2f2;
}

.load-capacity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.load-add-row,
.load-reset-rows,
.load-remove-row {
  border: 0;
  border-bottom: 3px solid rgb(12, 26, 45);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  line-height: 1.1;
}

.load-add-row,
.load-reset-rows {
  min-height: 2.35rem;
  padding: 0.48rem 0.7rem;
}

.load-reset-rows {
  background: rgb(31, 73, 125);
}

.load-remove-row {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: #b32121;
  font-size: 1.25rem;
}

.load-add-row:hover,
.load-add-row:focus,
.load-reset-rows:hover,
.load-reset-rows:focus,
.load-remove-row:hover,
.load-remove-row:focus {
  background: rgb(12, 26, 45);
  color: #fff;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.load-calculated-values tr.is-current td {
  background: rgba(255, 152, 0, 0.22);
  font-weight: 900;
}

.load-calculated-values tr.is-plate-value td {
  color: rgb(12, 26, 45);
}

.load-warning-note {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid #b68b00;
  border-left: 8px solid #d19a00;
  background: #f6c33d;
  color: #101820;
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  font-weight: 800;
  line-height: 1.35;
}

.load-disclaimer-note {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(16, 24, 32, 0.18);
  border-left: 8px solid #101820;
  background: rgba(255, 255, 255, 0.72);
  color: #334155;
  font-size: clamp(0.78rem, 0.95vw, 0.88rem);
  font-weight: 700;
  line-height: 1.35;
}

.load-chart-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.7rem;
  min-width: 0;
  margin: 0;
}

.load-chart-panel figcaption {
  color: #101820;
  font-size: clamp(1rem, 1.55vw, 1.35rem);
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.load-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 320px;
  overflow: visible;
}

.load-chart-bg {
  fill: rgba(255, 255, 255, 0.28);
  stroke: rgba(16, 24, 32, 0.25);
  stroke-width: 1;
}

.load-chart-grid-line {
  stroke: rgba(16, 24, 32, 0.32);
  stroke-width: 1;
}

.load-chart-grid-label,
.load-chart-capacity-label,
.load-chart-axis-label,
.load-chart-user-label {
  fill: #475467;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.load-chart-capacity-label {
  fill: #101820;
  font-size: 14px;
}

.load-chart-axis {
  fill: none;
  stroke: #101820;
  stroke-linecap: square;
  stroke-width: 18;
}

.load-chart-line {
  fill: none;
  opacity: 0.38;
  stroke: #5b6878;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.load-chart-line.is-selected {
  opacity: 1;
  stroke: #c81e1e;
  stroke-width: 5;
}

.load-chart-capacity-dot {
  opacity: 0.32;
  fill: #5b6878;
  stroke: rgba(16, 24, 32, 0.46);
  stroke-width: 3;
}

.load-chart-capacity-dot.is-selected {
  opacity: 1;
  fill: #e47731;
  stroke: rgba(120, 45, 20, 0.46);
}

.load-chart-capacity-label {
  opacity: 0;
}

.load-chart-capacity-label.is-selected {
  opacity: 1;
}

.load-chart-allowed-point {
  fill: #f6c33d;
  stroke: #101820;
  stroke-width: 4;
}

.load-chart-allowed-label {
  fill: #101820;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-linejoin: round;
  stroke-width: 5px;
}

.load-chart-guide {
  stroke: rgba(31, 73, 125, 0.82);
  stroke-dasharray: 8 7;
  stroke-width: 2;
}

.load-chart-user-point {
  fill: #1f7a3a;
  stroke: #fff;
  stroke-width: 4;
}

.load-chart-user-point.is-caution {
  fill: #d28a12;
}

.load-chart-user-point.is-warning {
  fill: #b32121;
}

.load-chart-user-label {
  fill: rgb(12, 26, 45);
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-linejoin: round;
  stroke-width: 5px;
}

.load-calculator-info p {
  margin: 0 0 0.8em;
}

@media (max-width: 1040px) {
  .load-calculator-workbench,
  .load-capacity-plate {
    grid-template-columns: 1fr;
  }

  .load-chart-svg {
    min-height: 280px;
  }
}

@media (max-width: 700px) {
  .load-calculator-workbench {
    margin: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .load-capacity-plate {
    padding: 10px;
    border-width: 5px;
  }

  .load-number-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .load-number-field {
    width: min(100%, 11rem);
  }

  .load-capacity-values {
    font-size: 0.72rem;
  }

  .load-capacity-summary th,
  .load-capacity-summary td,
  .load-capacity-values th,
  .load-capacity-values td {
    padding: 0.34rem 0.28rem;
  }

  .load-capacity-input-table input {
    padding: 0.32rem 0.2rem;
    font-size: 0.74rem;
  }

  .load-remove-row {
    width: 1.65rem;
    height: 1.65rem;
  }

  .load-chart-svg {
    min-height: 240px;
  }
}
