:root {
  --color-forest: #0e3a2f;
  --color-mint: #78faae;
  --color-green: #419468;
  --color-ink: #171718;
  --color-page: #f2f2f2;
  --color-surface: #fff;
  --color-muted: #6d7470;
  --color-line: #d9ddda;
  --font-base: "Skoda Next", "Helvetica Neue", Arial, sans-serif;
  --container: 1436px;
  color-scheme: light;
}

@font-face {
  font-display: swap;
  font-family: "Skoda Next";
  font-style: normal;
  font-weight: 300;
  src: url("./fonts/SKODANext-Light.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "Skoda Next";
  font-style: italic;
  font-weight: 300;
  src: url("./fonts/SKODANext-LightItalic.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "Skoda Next";
  font-style: normal;
  font-weight: 400;
  src: url("./fonts/SKODANext-Regular.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "Skoda Next";
  font-style: italic;
  font-weight: 400;
  src: url("./fonts/SKODANext-Italic.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "Skoda Next";
  font-style: normal;
  font-weight: 700;
  src: url("./fonts/SKODANext-Bold.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "Skoda Next";
  font-style: italic;
  font-weight: 700;
  src: url("./fonts/SKODANext-BoldItalic.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "Skoda Next";
  font-style: normal;
  font-weight: 900;
  src: url("./fonts/SKODANext-Black.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "Skoda Next";
  font-style: italic;
  font-weight: 900;
  src: url("./fonts/SKODANext-BlackItalic.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "Skoda Next Expanded";
  font-style: normal;
  font-weight: 900;
  src: url("./fonts/SKODANext-BlackExpanded.ttf") format("truetype");
}

* {
  box-sizing: border-box;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  align-items: center;
  background: var(--color-forest);
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 84px;
  padding: 14px max(24px, calc((100vw - var(--container)) / 2));
}

.brand {
  align-items: center;
  display: inline-flex;
  min-width: 160px;
}

.brand img {
  display: block;
  filter: brightness(0) invert(1);
  height: 42px;
  width: auto;
}

.site-header__actions {
  align-items: center;
  display: flex;
  gap: 16px;
}

.site-header__actions > a:not(.button) {
  color: rgba(255, 255, 255, 0.78);
}

.button {
  align-items: center;
  background: var(--color-ink);
  border: 1px solid var(--color-ink);
  color: #fff;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px;
  text-align: center;
}

.button--accent {
  background: var(--color-mint);
  border-color: var(--color-mint);
  color: var(--color-ink);
}

.button--ghost {
  background: transparent;
  color: var(--color-ink);
}

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

.calculator--embed {
  padding-top: 48px;
}

.hero {
  align-items: start;
  display: grid;
  gap: 72px;
  grid-template-columns: minmax(320px, 0.85fr) minmax(320px, 1fr);
  margin-bottom: 44px;
}

.eyebrow {
  color: var(--color-green);
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0 0 12px;
}

h1 {
  color: var(--color-ink);
  font-size: clamp(2.3rem, 4vw, 4.75rem);
  font-weight: 400;
  line-height: 1.04;
  margin: 0;
  max-width: 780px;
  text-transform: uppercase;
  word-break: break-word;
}

.hero__copy {
  color: var(--color-muted);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.35;
  margin: 0;
  max-width: 740px;
}

.tool-tabs {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 32px;
  max-width: 620px;
}

.tool-tab,
.option {
  align-items: center;
  background: transparent;
  border: 1px solid var(--color-forest);
  border-radius: 999px;
  color: var(--color-forest);
  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, opacity 0.18s ease;
}

.tool-tab[aria-pressed="true"],
.option[aria-checked="true"] {
  background: var(--color-forest);
  color: #fff;
}

.selectors {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 28px;
  position: relative;
  z-index: 2;
}

.field {
  display: grid;
  gap: 12px;
  min-width: 260px;
}

.field--version {
  min-width: 468px;
}

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

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

.tool-panel {
  display: none;
}

.tool-panel.is-active {
  display: block;
}

.workspace {
  display: grid;
  gap: 8px;
  width: 100%;
}

.workspace--charge {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: repeat(2, auto);
}

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

.summary {
  background: var(--color-forest);
  color: #fff;
  min-height: 560px;
  overflow: hidden;
  padding: 32px 40px 48px;
  position: relative;
}

.summary--charge {
  grid-area: 1 / 1 / 3 / 2;
}

.summary__metric,
.summary__range {
  position: relative;
  text-align: center;
  z-index: 1;
}

.summary__metric p,
.summary__range p {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  margin: 0 0 22px;
}

.summary__metric strong {
  display: block;
  font-size: clamp(3.7rem, 6vw, 6rem);
  font-weight: 300;
  line-height: 1.08;
}

.summary__metric span {
  color: rgba(255, 255, 255, 0.74);
}

.summary__range {
  margin-top: 12px;
  padding: 70px 32px 116px;
}

.summary__range strong {
  display: block;
  font-size: clamp(3rem, 5vw, 4.75rem);
  font-weight: 300;
  line-height: 1.05;
}

.summary__range small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 32px;
  font-weight: 300;
  line-height: 40px;
}

.gauge {
  border: 2px solid rgba(120, 250, 174, 0.9);
  border-bottom: 0;
  border-radius: 320px 320px 0 0;
  height: 160px;
  left: 50%;
  position: absolute;
  top: 18px;
  transform: translateX(-50%);
  width: min(100%, 320px);
}

.summary__image {
  bottom: 0;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.28));
  left: 50%;
  max-width: 122%;
  position: absolute;
  transform: translateX(-50%);
  width: 560px;
}

.summary--savings {
  min-height: 562px;
}

.summary--savings .summary__metric {
  text-align: left;
}

.summary--savings .summary__image {
  bottom: 38px;
}

.controls {
  display: contents;
}

.panel {
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 248px;
  padding: 48px 40px;
}

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

.controls--charge .panel:nth-child(2) {
  grid-area: 2 / 2 / 3 / 3;
}

.controls--charge .panel:nth-child(3) {
  grid-area: 2 / 3 / 3 / 4;
}

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

.panel--prices {
  grid-column: 1 / -1;
}

.panel__title {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.panel__copy {
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0;
}

.info {
  background: transparent;
  border: 1px solid var(--color-green);
  border-radius: 50%;
  color: var(--color-green);
  cursor: help;
  height: 20px;
  line-height: 18px;
  padding: 0;
  position: relative;
  width: 20px;
}

.info:focus::after,
.info:hover::after {
  background: var(--color-ink);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 12px;
  line-height: 1.35;
  max-width: 300px;
  padding: 10px 12px;
  position: absolute;
  right: 0;
  top: 28px;
  width: max-content;
  z-index: 4;
}

.segmented,
.power-options {
  display: grid;
  gap: 16px;
}

.segmented--chargers {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.power-options {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.option {
  gap: 8px;
}

.option[aria-disabled="true"] {
  border-color: #cfd7d2;
  color: #aab3ae;
  cursor: not-allowed;
  opacity: 1;
}

.option__icon {
  background-color: currentColor;
  height: 30px;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  width: 30px;
}

.option__icon--domestic-plug {
  mask-image: url("./ico-enchufe-domestico.svg");
  -webkit-mask-image: url("./ico-enchufe-domestico.svg");
}

.option__icon--home-charger {
  mask-image: url("./ico-cargador-domestico.svg");
  -webkit-mask-image: url("./ico-cargador-domestico.svg");
}

.option__icon--public {
  mask-image: url("./ico-estacion-de-carga.svg");
  -webkit-mask-image: url("./ico-estacion-de-carga.svg");
}

.range-labels {
  font-weight: 600;
  height: 22px;
  position: relative;
}

.range-labels output,
.range-output {
  color: #303030;
  font-size: 13px;
  font-weight: 500;
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

#currentSocOutput {
  left: var(--current-pos, calc(10% + 0px));
}

#targetSocOutput {
  left: var(--target-pos, calc(80% + 0px));
}

.dual-slider,
.temperature-slider {
  --thumb-size: 22px;
  --thumb-half: 11px;
  position: relative;
}

.dual-slider {
  display: grid;
  min-height: 64px;
}

.dual-slider::before {
  background: #d5ddd8;
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 15px;
}

.dual-slider input {
  grid-area: 1 / 1;
  pointer-events: none;
  z-index: 3;
}

.dual-slider input::-webkit-slider-thumb {
  pointer-events: auto;
}

.dual-slider input::-moz-range-thumb {
  pointer-events: auto;
}

.dual-slider__track {
  background: var(--color-green);
  height: 4px;
  left: var(--current-pos, calc(10% + 0px));
  pointer-events: none;
  position: absolute;
  top: 15px;
  width: calc(var(--target-pos, calc(80% + 0px)) - var(--current-pos, calc(10% + 0px)));
  z-index: 2;
}

.recommended-marker {
  color: #647069;
  font-size: 12px;
  left: var(--recommended-pos, calc(80% + 0px));
  line-height: 16px;
  padding-top: 28px;
  pointer-events: none;
  position: absolute;
  top: 17px;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 1;
}

.recommended-marker::before {
  background: #647069;
  content: "";
  height: 24px;
  left: 50%;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 1px;
}

input[type="range"] {
  appearance: none;
  background: transparent;
  height: 34px;
  margin: 0;
  width: 100%;
}

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

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

.dual-slider input::-webkit-slider-runnable-track {
  background: transparent;
}

.dual-slider input::-moz-range-track {
  background: transparent;
}

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

input[type="range"]::-moz-range-thumb {
  background: var(--color-forest);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  height: 22px;
  width: 22px;
}

.temperature-slider {
  margin-top: 36px;
}

.range-output {
  left: var(--temperature-pos, 60%);
  top: -24px;
}

.range-scale {
  color: #7d8782;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
}

.numeric-field {
  align-items: baseline;
  display: flex;
  gap: 12px;
}

.numeric-field input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #8d9892;
  color: var(--color-ink);
  font-size: 56px;
  font-weight: 300;
  min-width: 0;
  width: 160px;
}

.numeric-field span,
.distance-value span {
  color: var(--color-muted);
  font-size: 22px;
}

.distance-value {
  color: var(--color-forest);
  font-size: 64px;
  font-weight: 300;
  line-height: 1;
}

.price-control {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
}

.price-control label {
  display: grid;
  gap: 6px;
}

.price-control label span {
  color: var(--color-ink);
  font-weight: 700;
}

.price-label {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.price-label img {
  flex: 0 0 auto;
  height: 28px;
  object-fit: contain;
  width: 28px;
}

.price-control input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #8d9892;
  color: var(--color-ink);
  min-height: 44px;
}

.price-control a {
  color: var(--color-green);
  font-size: 13px;
  font-weight: 700;
}

.stepper {
  background: var(--color-forest);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  height: 46px;
  width: 46px;
}

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

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

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

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

.disclaimer {
  color: var(--color-muted);
  font-size: 12px;
  line-height: 16px;
  margin: 64px 0 0;
}

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

@media (max-width: 1015px) {
  .calculator {
    padding-top: 48px;
  }

  .hero,
  .workspace--savings {
    grid-template-columns: 1fr;
  }

  .workspace--charge {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, auto);
  }

  .summary--charge {
    grid-area: 1 / 1 / 2 / 3;
    min-height: 380px;
    padding: 32px 24px;
  }

  .summary--charge .summary__metric {
    margin-left: 48%;
  }

  .summary--charge .summary__range {
    margin: 0;
    padding: 74px 0 0;
    position: absolute;
    top: 60px;
    width: 48%;
  }

  .summary--charge .summary__image {
    bottom: 1px;
    left: 58%;
    width: 48%;
  }

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

  .controls--charge .panel:nth-child(2) {
    grid-area: 3 / 1 / 4 / 2;
  }

  .controls--charge .panel:nth-child(3) {
    grid-area: 3 / 2 / 4 / 3;
  }
}

@media (max-width: 763px) {
  .site-header {
    min-height: 56px;
    padding: 12px 16px;
  }

  .brand img {
    height: 34px;
  }

  .site-header__actions {
    display: none;
  }

  .calculator {
    padding: 40px 16px 48px;
  }

  .hero {
    display: block;
    margin-bottom: 30px;
  }

  .hero__copy {
    font-size: 18px;
    line-height: 24px;
    margin-top: 22px;
  }

  .tool-tabs,
  .selectors,
  .vehicle-detail,
  .controls--savings {
    display: grid;
    grid-template-columns: 1fr;
  }

  .field,
  .field--version {
    min-width: 100%;
  }

  .workspace {
    grid-template-columns: 1fr;
    margin-left: -16px;
    width: calc(100% + 32px);
  }

  .summary--charge,
  .summary--savings {
    grid-area: auto;
    min-height: 520px;
    padding: 32px 24px 118px;
  }

  .summary--charge .summary__metric {
    margin-left: 0;
  }

  .summary__metric strong {
    font-size: 56px;
  }

  .summary--charge .summary__range {
    margin-top: 22px;
    padding: 74px 0 120px;
    position: relative;
    top: auto;
    width: 100%;
  }

  .summary__range strong {
    font-size: 48px;
  }

  .summary--charge .summary__image,
  .summary__image {
    bottom: 1px;
    left: 50%;
    max-width: 126%;
    width: 430px;
  }

  .panel,
  .panel--wide,
  .controls--charge .panel:nth-child(2),
  .controls--charge .panel:nth-child(3),
  .panel--prices {
    grid-area: auto;
    grid-column: auto;
  }

  .panel {
    min-height: auto;
    padding: 24px;
  }

  .segmented--chargers {
    grid-template-columns: 1fr;
  }

  .power-options {
    display: flex;
    flex-wrap: wrap;
  }

  .option {
    min-width: 78px;
  }

  .vehicle-detail {
    margin-left: -16px;
    width: calc(100% + 32px);
  }

  .price-control {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }
}
