:root {
  --green: #0e7864;
  --deep-green: #086b59;
  --gold: #ffc244;
  --white: #ffffff;
  --font-body: "Apis", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #dbeee3;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: #dbeee3;
}

button,
input {
  font: inherit;
}

input[type="number"] {
  appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.figma-page {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 1440 / 1480;
  overflow: hidden;
  background: #dbeee3;
}

.figma-page__art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
}

.desktop-tracker {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 54.459%;
  bottom: 0;
  color: var(--white);
  background-color: var(--green);
  background-image:
    linear-gradient(rgba(7, 116, 95, 0.08), rgba(7, 116, 95, 0.08)),
    url("assets/images/green-texture-top-531738.png");
  background-size: cover, 18vw 16.4vw;
  background-repeat: no-repeat, repeat;
}

.desktop-tracker::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 39vw;
  height: 16vw;
  max-width: 570px;
  max-height: 235px;
  background: url("assets/icons/section-left-decoration.svg") left bottom / contain no-repeat;
  opacity: 0.95;
}

.desktop-tracker__header {
  position: absolute;
  top: 10.2%;
  left: 50%;
  width: min(62vw, 720px);
  transform: translateX(-50%);
  text-align: center;
}

.desktop-tracker__header h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.4rem, 2.78vw, 2.5rem);
  font-weight: 900;
  line-height: 1.1;
}

.desktop-tracker__header img {
  display: block;
  width: min(44.2vw, 636px);
  height: auto;
  margin: 1.1vw auto 0;
}

.desktop-tracker__intro {
  position: absolute;
  top: 29.1%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8vw;
  width: min(70vw, 760px);
  transform: translateX(-50%);
}

.desktop-tracker__intro p {
  margin: 0;
  font-size: clamp(1.2rem, 2.22vw, 2rem);
  line-height: 1.15;
}

.desktop-tracker__icon {
  position: relative;
  flex: 0 0 min(6.05vw, 87px);
  display: grid;
  place-items: center;
  width: min(6.05vw, 87px);
  height: min(6.05vw, 87px);
}

.desktop-tracker__icon img:first-child {
  width: 100%;
  height: 100%;
}

.desktop-tracker__icon img:last-child {
  position: absolute;
  width: 35%;
  height: auto;
}

.desktop-tracker__labels {
  position: absolute;
  top: 46.4%;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.6vw;
  width: min(67.15vw, 967px);
  transform: translateX(-50%);
}

.desktop-tracker__labels div {
  min-height: 5.9vw;
  color: var(--white);
  font-size: clamp(0.7rem, 1.25vw, 1.125rem);
  line-height: 1.05;
  text-align: center;
}

.desktop-tracker__labels span,
.desktop-tracker__labels strong {
  display: block;
}

.desktop-tracker__labels strong {
  margin-top: 0.12em;
  font-weight: 900;
}

.desktop-tracker__labels strong span {
  display: inline;
  font-weight: 400;
}

.reading-form {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.reading-input {
  position: absolute;
  width: 12.153%;
  height: 5.27%;
  border: 0;
  border-radius: max(10px, 1.32vw);
  outline: 0 solid transparent;
  color: var(--deep-green);
  font-size: clamp(0.72rem, 1.7vw, 1.45rem);
  font-weight: 800;
  text-align: center;
  background: var(--white);
  pointer-events: auto;
  transition: background-color 160ms ease, outline-color 160ms ease;
}

.reading-input:focus {
  background: var(--white);
  outline: 3px solid var(--gold);
}

.reading-input.is-invalid {
  outline: 3px solid #ffc244;
  outline-offset: 2px;
}

.reading-input[readonly] {
  cursor: default;
}

.reading-message {
  position: absolute;
  left: 16.458%;
  top: 89.5%;
  width: 67.15%;
  margin: 0;
  color: var(--gold);
  font-size: clamp(0.75rem, 1.3vw, 1.1rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}

.reading-input--1 {
  left: 16.458%;
  top: 83.311%;
}

.reading-input--2 {
  left: 30.208%;
  top: 83.311%;
}

.reading-input--3 {
  left: 43.958%;
  top: 83.311%;
}

.reading-input--4 {
  left: 57.708%;
  top: 83.311%;
}

.reading-input--5 {
  left: 71.458%;
  top: 83.311%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-page {
  display: none;
}

@media (max-width: 640px) {
  html {
    background: var(--green);
  }

  body {
    background: var(--green);
  }

  .figma-page {
    display: none;
  }

  .mobile-page {
    display: block;
    width: min(100%, 390px);
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    background: var(--green);
  }

  .mobile-hero {
    background: #dbeee3;
  }

  .mobile-hero__art {
    display: block;
    width: 100%;
    height: auto;
  }

  .mobile-tracker {
    position: relative;
    min-height: 786px;
    padding: 33px 0 32px;
    color: var(--white);
    background-color: var(--green);
    background-image: url("assets/images/green-texture-long-603a69.png");
    background-repeat: repeat-x;
    background-size: 285px 786px;
  }

  .mobile-tracker__header {
    width: min(254px, calc(100% - 28px));
    height: 53px;
    margin: 0 auto;
    text-align: center;
  }

  .mobile-tracker__header h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    line-height: 19px;
  }

  .mobile-tracker__header img {
    display: block;
    width: 251px;
    max-width: 100%;
    height: auto;
    margin: 13px auto 0;
  }

  .mobile-tracker__intro {
    display: flex;
    align-items: center;
    gap: 11px;
    width: min(327px, calc(100% - 28px));
    height: 39px;
    margin: 0 auto;
  }

  .mobile-tracker__intro p {
    margin: 0;
    font-size: 14px;
    line-height: 19px;
  }

  .mobile-tracker__icon {
    position: relative;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 39px;
  }

  .mobile-tracker__icon img:first-child {
    width: 100%;
    height: 100%;
  }

  .mobile-tracker__icon img:last-child {
    position: absolute;
    width: 12px;
    height: auto;
  }

  .mobile-reading-form {
    position: relative;
    display: grid;
    gap: 16px;
    width: min(326px, calc(100% - 28px));
    margin: 25px auto 0;
  }

  .mobile-reading-card {
    display: block;
    height: 108px;
    color: var(--white);
  }

  .mobile-reading-card span,
  .mobile-reading-card strong {
    display: block;
    line-height: 19px;
  }

  .mobile-reading-card span {
    font-size: 14px;
    font-weight: 400;
  }

  .mobile-reading-card strong {
    margin-top: 0;
    font-size: 14px;
    font-weight: 800;
  }

  .mobile-reading-card .mobile-reading-card__inline {
    display: inline;
    font-size: inherit;
  }

  .mobile-reading-card input {
    display: block;
    width: 100%;
    height: 59px;
    margin-top: 10px;
    padding: 8px 12px;
    border: 0;
    border-radius: 14px;
    color: var(--deep-green);
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    background: var(--white);
    outline: 0 solid transparent;
  }

  .mobile-reading-card input:focus {
    outline: 3px solid var(--gold);
  }

  .mobile-reading-card input.is-invalid {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
  }

  .mobile-reading-form .reading-message {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    color: var(--gold);
    font-size: 12px;
    text-align: left;
  }
}

@media (max-width: 360px) {
  .mobile-tracker__intro p {
    font-size: 13px;
  }
}
