.dishwasher-calculator {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 52px;
  border: 7px solid #111;
  background: #fff5e9;
  box-shadow: 12px 12px 0 #111;
}

.dishwasher-calculator * { box-sizing: border-box; }

.dwcalc-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: clamp(24px, 4vw, 48px);
  background: #65d9ff;
  border-bottom: 7px solid #111;
}

.dwcalc-kicker,
.dwcalc-step-kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .13em;
}

.dwcalc-head h2 {
  max-width: 820px;
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(42px, 7vw, 86px);
  line-height: .92;
  font-weight: 900;
  text-transform: uppercase;
}

.dwcalc-head p:last-child {
  max-width: 360px;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.dwcalc-form { padding: clamp(20px, 4vw, 42px); }

.dwcalc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.dwcalc-card {
  min-width: 0;
  padding: 22px;
  border: 5px solid #111;
  background: #fff;
}

.dwcalc-card:nth-child(1) { background: #f58220; }
.dwcalc-card:nth-child(2) { background: #ff4fa0; }
.dwcalc-card:nth-child(3) { background: #fff5e9; }
.dwcalc-card:nth-child(4) { background: #65d9ff; }
.dwcalc-card:nth-child(5) { background: #fff; }
.dwcalc-card:nth-child(6) { background: #f58220; }
.dwcalc-card:nth-child(7) { background: #fff5e9; }

.dwcalc-label,
.dwcalc-card legend {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.15;
  text-transform: uppercase;
}

.dwcalc-help {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.dwcalc-readout {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 14px;
}

.dwcalc-readout output {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 58px;
  line-height: 1;
}

.dwcalc-readout span { font-size: 16px; font-weight: 900; }

.dwcalc-range {
  width: 100%;
  height: 18px;
  margin: 4px 0 0;
  appearance: none;
  border: 4px solid #111;
  border-radius: 0;
  background: linear-gradient(to right, #111 0 var(--fill), #fff5e9 var(--fill) 100%);
}

.dwcalc-range::-webkit-slider-thumb {
  width: 30px;
  height: 30px;
  appearance: none;
  border: 4px solid #111;
  border-radius: 50%;
  background: #f58220;
  cursor: pointer;
}

.dwcalc-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 4px solid #111;
  border-radius: 50%;
  background: #f58220;
  cursor: pointer;
}

.dwcalc-range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 900;
}

.dwcalc-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.dwcalc-options--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.dwcalc-option {
  min-height: 58px;
  padding: 11px 10px;
  border: 4px solid #111;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
}

.dwcalc-option:hover,
.dwcalc-option:focus-visible { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 #111; }
.dwcalc-option.is-selected { background: #111; color: #fff; }

.dwcalc-cost-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dwcalc-cost-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 900;
}

.dwcalc-cost-input {
  display: flex;
  align-items: center;
  border: 4px solid #111;
  background: #fff;
}

.dwcalc-cost-input input {
  min-width: 0;
  width: 100%;
  padding: 12px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 20px;
  font-weight: 950;
}

.dwcalc-cost-input span { padding-right: 10px; font-size: 12px; font-weight: 900; white-space: nowrap; }

.dwcalc-submit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 22px;
  padding: 20px;
  border: 5px solid #111;
  background: #111;
  color: #fff;
}

.dwcalc-submit p { margin: 0; max-width: 680px; font-weight: 800; line-height: 1.45; }

.dwcalc-submit button,
.dwcalc-action {
  min-height: 56px;
  padding: 13px 20px;
  border: 4px solid #111;
  background: #f58220;
  color: #111;
  font: inherit;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 5px 5px 0 #fff;
}

.dwcalc-submit button:hover,
.dwcalc-action:hover { transform: translate(-2px, -2px); }

.dwcalc-result {
  margin: 0 clamp(20px, 4vw, 42px) clamp(24px, 4vw, 44px);
  border: 7px solid #111;
  background: #111;
  color: #fff;
}

.dwcalc-result[hidden] { display: none; }

.dwcalc-result-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, .6fr);
  gap: 24px;
  padding: clamp(24px, 4vw, 44px);
  border-bottom: 5px solid #fff;
}

.dwcalc-result-badge {
  display: inline-block;
  margin-bottom: 15px;
  padding: 8px 11px;
  background: #65d9ff;
  color: #111;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .1em;
}

.dwcalc-result h3 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(44px, 7vw, 82px);
  line-height: .94;
  text-transform: uppercase;
}

.dwcalc-result-summary { margin: 16px 0 0; max-width: 760px; font-size: 18px; font-weight: 780; line-height: 1.45; }

.dwcalc-fit {
  align-self: start;
  padding: 18px;
  border: 5px solid #fff;
  background: #ff4fa0;
  color: #111;
}

.dwcalc-fit span { display: block; font-size: 12px; font-weight: 950; letter-spacing: .1em; }
.dwcalc-fit strong { display: block; margin-top: 7px; font-size: 34px; line-height: 1; }
.dwcalc-fit p { margin: 10px 0 0; font-size: 13px; font-weight: 850; }

.dwcalc-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 5px solid #fff;
}

.dwcalc-metric { min-height: 126px; padding: 18px; border-right: 5px solid #fff; }
.dwcalc-metric:last-child { border-right: 0; }
.dwcalc-metric span { display: block; font-size: 11px; font-weight: 950; letter-spacing: .08em; }
.dwcalc-metric strong { display: block; margin-top: 12px; font-size: clamp(24px, 4vw, 42px); line-height: 1; }
.dwcalc-metric small { display: block; margin-top: 8px; opacity: .78; font-weight: 750; }

.dwcalc-analysis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: clamp(22px, 4vw, 38px);
}

.dwcalc-analysis section { padding: 18px; border: 4px solid #fff; }
.dwcalc-analysis h4 { margin: 0 0 13px; font-size: 18px; text-transform: uppercase; }
.dwcalc-analysis ul { margin: 0; padding-left: 20px; }
.dwcalc-analysis li { margin: 9px 0; font-weight: 730; line-height: 1.35; }

.dwcalc-warning { background: #f58220; color: #111; }

.dwcalc-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 clamp(22px, 4vw, 38px) clamp(22px, 4vw, 38px);
}

.dwcalc-action { box-shadow: 5px 5px 0 #fff; text-decoration: none; }
.dwcalc-action--light { background: #fff5e9; }
.dwcalc-status { width: 100%; margin: 5px 0 0; font-size: 13px; font-weight: 800; }

@media (max-width: 850px) {
  .dwcalc-head,
  .dwcalc-submit,
  .dwcalc-result-top { grid-template-columns: 1fr; }
  .dwcalc-grid { grid-template-columns: 1fr; }
  .dwcalc-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dwcalc-metric:nth-child(2) { border-right: 0; }
  .dwcalc-metric:nth-child(-n + 2) { border-bottom: 5px solid #fff; }
}

@media (max-width: 560px) {
  .dishwasher-calculator { width: calc(100% - 18px); border-width: 5px; box-shadow: 7px 7px 0 #111; }
  .dwcalc-head { padding: 22px 18px; border-bottom-width: 5px; }
  .dwcalc-form { padding: 16px; }
  .dwcalc-card { padding: 17px; border-width: 4px; }
  .dwcalc-options,
  .dwcalc-options--three,
  .dwcalc-cost-fields { grid-template-columns: 1fr; }
  .dwcalc-submit { padding: 16px; border-width: 4px; }
  .dwcalc-submit button { width: 100%; }
  .dwcalc-result { margin: 0 16px 22px; border-width: 5px; }
  .dwcalc-metrics { grid-template-columns: 1fr; }
  .dwcalc-metric { border-right: 0; border-bottom: 4px solid #fff; }
  .dwcalc-metric:last-child { border-bottom: 0; }
  .dwcalc-analysis { grid-template-columns: 1fr; padding: 18px; }
  .dwcalc-result-actions { padding: 0 18px 22px; }
  .dwcalc-action { width: 100%; text-align: center; }
}
