* {
  margin: 0;
  padding: 0;
  font-family: "Space Mono", monospace;
  cursor: default;
  scroll-behavior: smooth;
}

body {
  background-color: hsl(185, 41%, 84%);
  margin: 0;
}

.grid-1 {
  display: grid;
  grid-template-rows: 1fr 4fr;
  height: 100vh;
}
@media (min-width: 600px) {
  .grid-1 {
    grid-template-rows: 1fr 1fr 1fr;
  }
}
.grid-1 #splitter {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 155px;
}
@media (min-width: 600px) and (min-height: 1000px) {
  .grid-1 #splitter {
    align-items: end;
  }
}
.grid-1 #splitter img {
  height: 3.25rem;
  margin-bottom: 0px;
}
@media (min-width: 600px) and (min-height: 1000px) {
  .grid-1 #splitter img {
    margin-bottom: 90px;
  }
}

.grid-2 {
  display: grid;
  background-color: hsl(0, 0%, 100%);
  grid-row: 2/4;
  grid-template-rows: 1fr 1fr;
  padding: 26px;
  gap: 24px;
  border-radius: 26px 26px 0 0;
}
@media (max-height: 900px) and (max-width: 600px) {
  .grid-2 {
    min-height: 725.5px;
  }
}
@media (min-width: 600px) {
  .grid-2 {
    grid-row: 2;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    padding: 24px;
    gap: 24px;
    border-radius: 26px;
    max-width: 777px;
    max-height: 382px;
    margin: auto;
  }
}
@media (min-width: 1200px) {
  .grid-2 {
    padding: 32px;
    gap: 32px;
    border-radius: 26px;
    max-height: 482px;
  }
}

.grid-calc {
  background-color: hsl(0, 0%, 100%);
  color: hsl(184, 14%, 56%);
  padding: 0px 10px;
}
@media (min-width: 374px) {
  .grid-calc {
    max-height: 432px;
  }
}
@media (min-width: 0px) {
  .grid-calc {
    max-height: 462px;
  }
}

.bill {
  display: grid;
  align-items: center;
  margin-top: 12px;
  margin-bottom: 24px;
}
.bill label {
  font-size: 16px;
  margin-bottom: 6px;
  grid-row: 1;
}
.bill span {
  font-size: 16px;
  margin-bottom: 6px;
  text-align: end;
  grid-row: 1;
}
.bill span.active {
  color: hsl(26, 100%, 50%);
}
.bill span.inactive {
  color: hsl(0, 0%, 100%);
}
.bill input {
  background-color: hsl(189, 41%, 97%);
  color: hsl(183, 100%, 15%);
  grid-column: 1/3;
  grid-row: 2;
  font-size: 24px;
  padding: 6px 12px;
  border-radius: 4px;
  border: none;
  text-align: end;
  min-width: 0px;
  min-height: 0px;
}
.bill input.active {
  cursor: pointer;
  background-color: hsl(330, 100%, 96%);
  outline: auto;
  outline-style: solid;
  outline-color: hsl(26, 100%, 50%);
  caret-color: hsl(26, 100%, 50%);
}
.bill input.inactive {
  outline: none;
  caret-color: hsl(172, 67%, 45%);
}
@media (hover: hover) {
  .bill input.inactive:hover {
    outline: auto;
    outline-style: solid;
    outline-color: hsl(172, 67%, 45%);
    cursor: pointer;
  }
}
.bill input::placeholder {
  color: hsl(185, 41%, 84%);
}
.bill img {
  grid-row: 2;
  grid-column: 1;
  height: 45%;
  padding-left: 8px;
}
@media (min-width: 1200px) {
  .bill img {
    padding-left: 12px;
  }
}

.btns {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 0fr 1fr 1fr 1fr;
  margin-bottom: 24px;
}
@media (min-width: 600px) {
  .btns {
    gap: 10px;
    grid-template-rows: 0fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media (min-width: 1200px) {
  .btns {
    grid-template-rows: 0fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr;
    margin-bottom: 42px;
  }
}
.btns legend {
  grid-column: 1/-1;
}
.btns button {
  border: none;
  outline: none;
  font-size: 24px;
  border-radius: 6px;
}
.btns button.inactive {
  background-color: hsl(183, 100%, 15%);
  color: hsl(0, 0%, 100%);
}
.btns button.inactive:hover {
  cursor: pointer;
  background-color: hsl(172, 67%, 75%);
  color: hsl(183, 100%, 15%);
}
.btns button.active {
  background-color: hsl(172, 67%, 45%);
  color: hsl(183, 100%, 15%);
}
.btns input {
  background-color: hsl(189, 41%, 97%);
  color: hsl(183, 100%, 15%);
  padding: 7px;
  border-radius: 4px;
  border: none;
  text-align: right;
  padding-right: 8px;
  font-size: 24px;
  border-radius: 6px;
  padding-right: 16px;
}
@media (min-width: 600px) {
  .btns input {
    font-size: 20px;
  }
}
@media (min-width: 1200px) {
  .btns input {
    font-size: 24px;
    border-radius: 6px;
    padding-right: 16px;
  }
}
.btns input.active {
  outline: auto;
  outline-style: solid;
  outline-color: hsl(172, 67%, 45%);
  caret-color: hsl(172, 67%, 45%);
}
.btns input.inactive {
  outline: none;
}
.btns input.inactive:hover {
  outline: auto;
  outline-style: solid;
  outline-color: hsl(172, 67%, 45%);
  cursor: pointer;
}
.btns input::placeholder {
  color: hsl(184, 14%, 56%);
}

.people {
  display: grid;
  align-items: center;
}
.people label {
  font-size: 16px;
  margin-bottom: 6px;
  grid-row: 1;
}
.people span {
  font-size: 16px;
  margin-bottom: 6px;
  text-align: end;
  grid-row: 1;
}
.people span.active {
  color: hsl(26, 100%, 50%);
}
.people span.inactive {
  color: hsl(0, 0%, 100%);
}
.people input {
  background-color: hsl(189, 41%, 97%);
  color: hsl(183, 100%, 15%);
  grid-column: 1/3;
  grid-row: 2;
  font-size: 24px;
  padding: 6px 12px;
  border-radius: 4px;
  border: none;
  text-align: end;
  min-width: 0px;
  min-height: 0px;
}
.people input.active {
  cursor: pointer;
  background-color: hsl(330, 100%, 96%);
  outline: auto;
  outline-style: solid;
  outline-color: hsl(26, 100%, 50%);
  caret-color: hsl(26, 100%, 50%);
}
.people input.inactive {
  outline: none;
  caret-color: hsl(172, 67%, 45%);
}
@media (hover: hover) {
  .people input.inactive:hover {
    outline: auto;
    outline-style: solid;
    outline-color: hsl(172, 67%, 45%);
    cursor: pointer;
  }
}
.people input::placeholder {
  color: hsl(185, 41%, 84%);
}
.people img {
  grid-row: 2;
  grid-column: 1;
  height: 45%;
  padding-left: 8px;
}
@media (min-width: 1200px) {
  .people img {
    padding-left: 12px;
  }
}

.amount {
  background-color: hsl(183, 100%, 15%);
  color: hsl(184, 14%, 56%);
  display: grid;
  border-radius: 16px;
  padding: 24px;
}
@media (max-width: 600px) {
  .amount {
    max-height: 222px;
  }
}
@media (min-width: 600px) {
  .amount {
    grid-template-rows: 1fr 1fr 2fr;
    padding: 24px;
  }
}
@media (min-width: 1200px) {
  .amount {
    grid-template-rows: 1fr 1fr 2fr;
    padding: 36px;
  }
}
.amount p:nth-child(-n+2) {
  cursor: default;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
@media (min-width: 600px) {
  .amount p:nth-child(-n+2) {
    min-height: 71.5px;
  }
}
.amount p:nth-child(-n+2) span {
  white-space: nowrap;
}
.amount p:nth-child(-n+2) span:first-child {
  font-size: 16px;
  padding: 5px 0px;
}
.amount p:nth-child(-n+2) span:first-child::first-line {
  color: hsl(0, 0%, 100%);
}
.amount p:nth-child(-n+2) span:last-child {
  color: hsl(172, 67%, 45%);
  font-size: 36px;
}
@media (min-width: 600px) {
  .amount p:nth-child(-n+2) span:last-child {
    font-size: 48px;
  }
}
@media (min-width: 1200px) {
  .amount p:nth-child(-n+2) span:last-child {
    font-size: 48px;
  }
}
.amount p:nth-child(3) {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: end;
}
.amount p:nth-child(3) button {
  font-size: 1.75cqh;
  background-color: hsl(172, 67%, 45%);
  border: none;
  color: hsl(183, 100%, 15%);
  padding: 8px;
  font-size: 20px;
  border-radius: 6px;
}
@media (hover: hover) {
  .amount p:nth-child(3) button:hover {
    background-color: hsl(172, 67%, 75%);
    color: hsl(183, 100%, 15%);
    cursor: pointer;
  }
}
.amount p:nth-child(3) button:focus {
  background-color: hsl(172, 67%, 75%);
  color: hsl(183, 100%, 15%);
  outline: none;
}