.calculator__title {
  margin-bottom: 60px;
}

.calculator__title h2 {
  text-align: center;
}

.calculator__title h2:before {
  left: calc(50% - 75px);
}

.calculator-form {
  display: grid;
  gap: 20px;
  margin-inline: auto;
  width: min(100% - 40px, 768px);
  --accent: var(--primary, #000);
}

.field {
  display: grid;
}

.field--wide {
  grid-area: 2 / 1 / 3 / 4;
}

.field label {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 6px;
}

.field_group {
  display: grid;
  gap: 20px;
}

.field_range {
  display: flex;
  column-gap: 10px;
}

.field_range-input {
  flex: 1 1 auto;
}

.field_range-input input[type="range"] {
  width: 100%;
  accent-color: var(--accent, #000);
}

.field_range-suffix {
  font-weight: bold;
  min-width: 60px; 
  white-space: nowrap;
  text-align: center;
  display: inline-block;
}

.input-steps {
  margin-left: 1px;
  margin-right: -5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.input-steps span {
  position: relative;
  min-width: 16px;
  text-align: center;
}

.input-steps span:before {
  content: '';
  margin-inline: auto;
  display: block;
  width: 1px;
  height: 8px;
  background-color: currentColor;
}

.field-prefix {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-wrap: nowrap;
  box-shadow: 0 0px 6px 1px rgb(0 0 0 / 8%);
}

.field-prefix:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.field-prefix span {
  font-weight: bold;
  border: 1px solid rgba(0,0,0,.03);
  border-right: 0;
  padding: 1.6rem;
  display: grid;
  place-content: center;
  background: #f1f1f1;
}

.field-prefix input[type="number"] {
  box-shadow: none;
  border-left: 0;
  flex: 1 1 auto;
}

.field_group--third {
  grid-template-columns: repeat(3, 1fr);
}

.field_group--half {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .field_group--third,
  .field_group--half {
    grid-template-columns: 1fr;
  }

  .field--wide {
    grid-area: auto;
  }
  
  .field--info {
  background-color: #f1f1f1;
  padding: 10px 15px;
  border-radius: 5px;
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 15px;
  color: #333;
}
}

.field_group .field {
  margin-top: 0;
}

#output {
  display: none; 

input[type="number"]:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.output-field {
  --_h: 120deg;
  --_s: 52.38%;
  --_l: 85.65%;
  --hsl: hsl(var(--_h) var(--_s) var(--_l));
  font-size: 20px;
  font-weight: bold;
  padding: 12px 20px;
  background-color: var(--hsl);
  border: 1px solid;
  border-color: hsl(var(--_h) var(--_s) 75%);
  box-shadow: 0 5px 20px hsla(var(--_h) var(--_s) 20% / 40%);
}

.calculator-form__hs-form {
  margin-top: var(--margin-top, 0px);
}
