:root {
  --color-page: #f2f2f1;
  --color-surface: #fff;
  --color-ink: #242424;
  --color-muted: #767676;
  --color-line: #d8d8d6;
  --color-dark: #191919;
  --color-copper: #8c6554;
  --font-base: "CupraScreen", "Helvetica Neue", Arial, sans-serif;
  --container: 1436px;
  color-scheme: light;
}

@font-face {
  font-display: swap;
  font-family: "CupraScreen";
  font-style: normal;
  font-weight: 300;
  src: url("./fonts/CupraScreen-Light.woff2") format("woff2"),
    url("./fonts/Cupra-Light.otf") format("opentype");
}

@font-face {
  font-display: swap;
  font-family: "CupraScreen";
  font-style: normal;
  font-weight: 350;
  src: url("./fonts/CupraScreen-Book.woff2") format("woff2"),
    url("./fonts/Cupra-Book.otf") format("opentype");
}

@font-face {
  font-display: swap;
  font-family: "CupraScreen";
  font-style: normal;
  font-weight: 400;
  src: url("./fonts/CupraScreen-Regular.woff2") format("woff2"),
    url("./fonts/Cupra-Regular.otf") format("opentype");
}

@font-face {
  font-display: swap;
  font-family: "CupraScreen";
  font-style: normal;
  font-weight: 700;
  src: url("./fonts/CupraScreen-Medium.woff2") format("woff2"),
    url("./fonts/Cupra-Medium.otf") format("opentype");
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-page);
}

body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-ink);
  font-family: var(--font-base);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.calculator {
  margin: 0 auto;
  max-width: var(--container);
  padding: 108px 0 64px;
}

.intro {
  align-items: start;
  display: grid;
  gap: 70px;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1fr);
  margin-bottom: 104px;
}

.eyebrow {
  color: var(--color-muted);
  font-size: 0.875rem;
  margin: 0 0 14px;
}

h1 {
  color: var(--color-ink);
  font-size: clamp(2.5rem, 4vw, 4.75rem);
  font-weight: 300;
  line-height: 1.08;
  margin: 0;
  max-width: 720px;
  text-transform: uppercase;
}

.intro__copy {
  color: #858585;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 300;
  line-height: 1.35;
  margin: 0;
  max-width: 720px;
}

.vehicle-picker {
  align-items: end;
  display: grid;
  gap: 56px;
  grid-template-columns: 420px minmax(360px, 1fr);
  margin-bottom: 28px;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend,
.field span,
.panel h2 {
  color: var(--color-ink);
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  margin: 0;
}

.model-picker legend,
.field span {
  margin-bottom: 16px;
}

.segmented {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option {
  align-items: center;
  background: transparent;
  border: 1px solid #1f1f1f;
  border-radius: 999px;
  color: #2a2a2a;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  text-align: center;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.option[aria-checked="true"] {
  background: #1a1a1a;
  color: #fff;
}

.field {
  display: grid;
  min-width: 0;
}

select {
  appearance: none;
  background: transparent
    linear-gradient(45deg, transparent 50%, #777 50%) right 8px center / 8px 8px no-repeat;
  border: 0;
  border-bottom: 1px solid #777;
  color: var(--color-ink);
  min-height: 48px;
  padding: 0 34px 0 0;
  width: 100%;
}

.field--motor select {
  font-size: 20px;
}

.workspace {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.9fr);
}

.summary {
  background: var(--color-dark);
  color: #f3f3f3;
  min-height: 562px;
  overflow: hidden;
  padding: 34px 42px 48px;
  position: relative;
}

.summary__savings {
  position: relative;
  text-align: center;
  z-index: 1;
}

.summary__savings p {
  color: #f3f3f3;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 20px;
}

.summary__savings strong {
  display: block;
  font-size: clamp(3.8rem, 5.5vw, 5.5rem);
  font-weight: 300;
  line-height: 1;
  overflow-wrap: normal;
}

.summary__savings span {
  color: #b9b9b9;
  display: block;
  font-size: 16px;
  line-height: 24px;
  margin-top: 18px;
}

.summary__vehicle {
  margin-top: 70px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.summary__vehicle h2 {
  font-size: clamp(2.2rem, 2vw, 2rem);
  font-weight: 300;
  line-height: 1.1;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.summary__vehicle p {
  color: #a3a3a3;
  font-size: 16px;
  line-height: 24px;
  margin: 0;
}

.summary__image {
  bottom: 0px;
  filter: drop-shadow(0 20px 18px rgba(0, 0, 0, 0.38));
  left: 50%;
  max-width: 100%;
  overflow: visible;
  position: absolute;
  transform: translateX(-50%);
  width: 610px;
  z-index: 99999999999;
}

.controls {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1.1fr);
  grid-template-rows: auto auto;
}

.panel {
  background: var(--color-surface);
  min-width: 0;
  padding: 34px 40px;
}

.panel--consumption {
  min-height: 208px;
}

.panel--distance {
  min-height: 346px;
}

.panel--prices {
  grid-area: 1 / 2 / 3 / 3;
  padding: 34px 44px;
}

.panel__copy {
  color: #9a9a9a;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.25;
  margin: 26px 0 34px;
}

.numeric-field {
  align-items: end;
  display: flex;
  gap: 20px;
  margin-top: 42px;
}

.numeric-field input,
.price-control input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-line);
  color: #7a7a7a;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.numeric-field input {
  font-size: clamp(3.5rem, 5vw, 5.5rem);
  font-weight: 300;
  line-height: 1;
  max-width: 170px;
}

.numeric-field span {
  color: #6f6f6f;
  font-size: clamp(2rem, 2.5vw, 3rem);
  font-weight: 300;
  line-height: 1.1;
  padding-bottom: 10px;
}

.distance-value {
  color: #7a7a7a;
  font-size: clamp(4rem, 5vw, 5rem);
  font-weight: 300;
  line-height: 1;
  margin: 54px 0 36px;
}

.distance-value span {
  font-size: clamp(2rem, 2.5vw, 3rem);
}

input[type="range"] {
  --range-progress: 47.37%;
  appearance: none;
  background: linear-gradient(to right, #1a1a1a 0 var(--range-progress), #d5d5d5 var(--range-progress) 100%);
  height: 4px;
  margin: 0;
  width: 100%;
}

input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
  height: 4px;
}

input[type="range"]::-moz-range-track {
  background: transparent;
  height: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  background: #1a1a1a;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  height: 22px;
  margin-top: -9px;
  width: 22px;
}

input[type="range"]::-moz-range-thumb {
  background: #1a1a1a;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  height: 22px;
  width: 22px;
}

.range-scale {
  color: #8a8a8a;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  margin-top: 12px;
}

.price-control {
  align-items: center;
  display: grid;
  gap: 20px;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  margin-top: 50px;
}

.stepper {
  align-items: center;
  background: #1a1a1a;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 50px;
  font-weight: 200;
  height: 40px;
  justify-content: center;
  line-height: 1;
  padding: 0px 0 7px;
  width: 40px;
}

.price-control label {
  color: #8f8f8f;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.price-control span {
  font-size: 16px;
  line-height: 20px;
}

.price-control input {
  font-size: 18px;
  min-height: 28px;
}

.price-control a {
  border-bottom: 1px solid currentColor;
  color: #3b3b3b;
  font-size: 15px;
  line-height: 20px;
  width: fit-content;
}

.button {
  align-items: center;
  background: #1a1a1a;
  border: 1px solid #1a1a1a;
  color: #fff;
  display: inline-flex;
  font-weight: 500;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px;
}

.support {
  margin-top: 52px;
}

.support p {
  color: #8b8b8b;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  max-width: 920px;
}

.vehicle-detail {
  align-items: center;
  background: #fff;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-top: 28px;
  padding: 32px 40px;
}

.vehicle-detail h2 {
  font-size: 32px;
  font-weight: 350;
  line-height: 40px;
  margin: 0 0 12px;
}

.vehicle-detail p:last-child {
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0;
}

.vehicle-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 1500px) {
  .calculator {
    padding-left: 64px;
    padding-right: 64px;
  }
}

@media (max-width: 1080px) {
  .intro,
  .vehicle-picker,
  .workspace,
  .support {
    grid-template-columns: 1fr;
  }

  .intro {
    gap: 28px;
    margin-bottom: 56px;
  }

  .vehicle-picker {
    gap: 28px;
  }

  .controls {
    grid-template-columns: 1fr 1fr;
  }

  .panel--prices {
    grid-area: 2 / 1 / 3 / 3;
  }

  .summary {
    min-height: 430px;
  }

  .summary__vehicle {
    margin-top: 42px;
  }

  .summary__image {
    bottom: -8px;
    width: 520px;
  }
}

@media (max-width: 760px) {
  .calculator {
    padding: 40px 18px 48px;
  }

  .intro {
    margin-bottom: 32px;
  }

  h1 {
    font-size: 31px;
    line-height: 1.12;
  }

  .intro__copy {
    font-size: 16px;
  }

  .segmented {
    gap: 10px;
  }

  .option {
    min-height: 42px;
    padding: 0 14px;
  }

  .workspace {
    gap: 0;
    margin-left: -18px;
    width: calc(100% + 36px);
  }

  .summary {
    min-height: 404px;
    padding: 30px 22px 168px;
  }

  .summary__savings strong {
    font-size: 52px;
  }

  .summary__savings span,
  .summary__vehicle p {
    font-size: 13px;
    line-height: 18px;
  }

  .summary__vehicle {
    margin-top: 36px;
  }

  .summary__vehicle h2 {
    font-size: 30px;
  }

  .summary__image {
    bottom: 10px;
    max-width: 132%;
    width: 390px;
  }

  .controls {
    display: grid;
    gap: 0;
    grid-template-columns: 1fr;
  }

  .panel,
  .panel--prices {
    grid-area: auto;
    padding: 28px 22px;
  }

  .panel--consumption,
  .panel--distance {
    min-height: auto;
  }

  .numeric-field {
    margin-top: 24px;
  }

  .numeric-field input,
  .distance-value {
    font-size: 48px;
  }

  .numeric-field span,
  .distance-value span {
    font-size: 24px;
  }

  .distance-value {
    margin: 28px 0 22px;
  }

  .panel__copy {
    font-size: 15px;
    margin: 22px 0 24px;
  }

  .price-control span,
  .price-control a {
    font-size: 13px;
  }

  .support {
    margin: 28px 0 0;
  }

  .support p {
    font-size: 13px;
  }

  .vehicle-detail {
    display: grid;
    margin-left: -18px;
    width: calc(100% + 36px);
    padding: 28px 22px;
  }

}
