:root {
  font-family: "DM Sans", sans-serif;
  --clr-soft-red: 10, 79%, 65%;
  --clr-cyan: 186, 34%, 60%;
  --clr-dark-brown: 25, 47%, 15%;
  --clr-med-brown: 28, 10%, 53%;
  --clr-pale-orange: 27, 66%, 92%;
  --clr-cream: 33, 100%, 98%;
  --fs-48: 3rem;
  --fs-32: 2rem;
  --fs-30: 1.875rem;
  --fs-24: 1.5rem;
  --fs-18: 1.125rem;
  --fs-16: 1rem;
  --fs-15: 0.9375rem;
}

/* MODERN CSS RESET */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p {
  margin: 0;
  font-weight: 400;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  background-color: hsl(var(--clr-pale-orange));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.wrapper {
  margin: 0 auto;
  width: 90vw;
  max-width: 540px;
  max-height: 660px;
  min-height: 534px;
}

.balance-container {
  background-color: hsl(var(--clr-soft-red));
  color: #fff;
  justify-content: space-between;
  align-items: center;
  height: 97px;
  padding: 32px;
  border-radius: 10px;
}

@media screen and (min-width: 810px) {
  .balance-container {
    height: 125px;
    border-radius: 20px;
  }
}

.balance-container > p > span:first-of-type {
  font-size: var(--fs-15);
}

.balance-container > p > span:nth-child(2) {
  font-size: var(--fs-24);
  font-weight: 700;
}

img {
  width: 60px;
  height: 40px;
}

@media screen and (min-width: 810px) {
  .balance-container > p > span:first-of-type {
    font-size: var(--fs-18);
  }

  .balance-container > p > span:nth-child(2) {
    font-size: var(--fs-32);
    font-weight: 700;
  }

  img {
    width: 72px;
    height: 48px;
  }
}

.spending-container {
  margin-top: 16px;
  background-color: hsl(var(--clr-cream));
  padding: 24px 20px;
  border-radius: 10px;
}

.spending-container h2 {
  font-weight: 700;
  color: hsl(var(--clr-dark-brown));
  font-size: var(--fs-24);
  margin-bottom: 16px;
}

.spending-container hr {
  color: hsl(var(--clr-pale-orange));
  border: 1px hsl(var(--clr-pale-orange)) solid;
  margin: 24px 0;
}

@media screen and (min-width: 810px) {
  .spending-container {
    margin-top: 24px;
    padding: 24px 40px;
    border-radius: 20px;
  }

  .spending-container h2 {
    font-size: var(--fs-32);
    margin-bottom: 24px;
  }

  .spending-container hr {
    margin: 32px 0;
  }
}

.total-container {
  justify-content: space-between;
  align-items: flex-end;
  font-size: var(--fs-15);
}

.total-container > div:first-of-type {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.total-container > div:first-of-type > p:first-of-type,
.total-container > div:last-of-type > p:last-of-type {
  color: hsl(var(--clr-med-brown));
}

.total-container > div:first-of-type > p:last-of-type,
.total-container > div:last-of-type > p:first-of-type {
  font-weight: 700;
  color: hsl(var(--clr-dark-brown));
}

.total-container > div:first-of-type > p:first-of-type {
  line-height: 3;
}

.total-container > div:first-of-type > p:last-of-type {
  font-size: var(--fs-30);
  line-height: 1;
}

.total-container > div:last-of-type {
  text-align: right;
}

@media screen and (min-width: 810px) {
  .total-container {
    font-size: var(--fs-18);
  }

  .total-container > div:first-of-type > p:last-of-type {
    font-size: var(--fs-48);
  }
}

.attribution {
  margin-top: 16px;
  font-size: var(--fs-15);
  color: hsl(var(--clr-med-brown));
}

.attribution a {
  text-decoration: none;
  font-weight: 700;
  color: hsl(var(--clr-med-brown));
}
