[hidden] {
  display: none !important;
}

body.layer-open {
  overflow: hidden;
}

.home-shell {
  padding-bottom: max(22px, env(safe-area-inset-bottom));
}

.home-header {
  display: grid;
  height: 72px;
  align-items: center;
  padding: 0 20px;
  grid-template-columns: 44px 1fr 44px;
}

.icon-button,
.profile-shortcut {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #202320;
  box-shadow: 0 5px 15px rgba(31, 51, 24, 0.07);
  cursor: pointer;
  place-items: center;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.icon-button:hover,
.profile-shortcut:hover {
  background: #f3f8f1;
  box-shadow: 0 7px 18px rgba(31, 51, 24, 0.11);
}

.icon-button svg,
.profile-shortcut svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.brand {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 8px;
  color: #171917;
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  place-items: center;
}

.brand-mark svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.5;
}

.profile-shortcut {
  justify-self: end;
}

.home-content {
  padding: 0 21px;
}

.welcome {
  position: relative;
  display: flex;
  height: 104px;
  align-items: center;
  padding: 0 9px;
  overflow: hidden;
}

.welcome h1 {
  margin: 4px 0 0;
  font-size: 23px;
  font-weight: 750;
  line-height: 1.35;
}

.today-label {
  margin: 0;
  color: #777a77;
  font-size: 13px;
}

.welcome img {
  position: absolute;
  right: -5px;
  bottom: -12px;
  width: 128px;
  height: 111px;
  object-fit: cover;
  object-position: right bottom;
  pointer-events: none;
}

.basal-card {
  position: relative;
  min-height: 224px;
  padding: 24px;
  overflow: hidden;
  border-radius: 20px;
  background: #143c20;
  color: #fff;
  box-shadow: 0 13px 28px rgba(28, 75, 34, 0.17);
}

.basal-card::after {
  position: absolute;
  right: -37px;
  bottom: -56px;
  width: 155px;
  height: 155px;
  border: 28px solid rgba(111, 211, 82, 0.14);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.basal-card-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #d7e8d7;
  font-size: 13px;
  font-weight: 550;
}

.eyebrow svg {
  width: 18px;
  height: 18px;
  color: #ffd259;
  fill: rgba(255, 210, 89, 0.18);
}

.basal-number {
  display: flex;
  align-items: baseline;
  margin-top: 13px;
  gap: 8px;
}

.basal-number strong {
  font-size: 44px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.basal-number span {
  color: #c6d7c7;
  font-size: 12px;
}

.profile-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #e0e9e0;
  font-size: 11px;
}

.profile-status.complete {
  border-color: rgba(137, 225, 109, 0.26);
  background: rgba(103, 203, 75, 0.16);
  color: #c8f0bc;
}

.basal-hint {
  position: relative;
  z-index: 1;
  margin: 11px 0 19px;
  color: #a9c2ad;
  font-size: 12px;
}

.basal-action {
  position: relative;
  z-index: 1;
  display: flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  border-radius: 22px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 180ms ease;
}

.basal-action:hover {
  background: #55ca3e;
}

.basal-action svg {
  width: 16px;
  height: 16px;
}

.profile-section {
  margin-top: 20px;
  padding: 21px 18px 18px;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(37, 60, 25, 0.07);
}

.section-heading,
.section-heading > div {
  display: flex;
  align-items: center;
}

.section-heading {
  justify-content: space-between;
}

.section-heading > div {
  gap: 10px;
}

.section-heading h2 {
  margin: 0;
  font-size: 16px;
}

.section-heading a {
  min-height: 44px;
  padding: 0 3px;
  color: var(--green-dark);
  font-size: 12px;
  line-height: 44px;
  text-decoration: none;
}

.section-heading a:hover {
  color: #2d8f1c;
}

.section-icon {
  display: grid;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #eff8ec;
  color: var(--green);
  place-items: center;
}

.section-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.profile-grid {
  display: grid;
  margin-top: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  grid-template-columns: repeat(3, 1fr);
}

.profile-grid article {
  min-width: 0;
  padding: 17px 8px 16px;
  text-align: center;
}

.profile-grid article + article {
  border-left: 1px solid var(--line);
}

.profile-grid span {
  display: block;
  margin-bottom: 7px;
  color: #777a77;
  font-size: 11px;
}

.profile-grid strong {
  font-size: 20px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.profile-grid small {
  margin-left: 3px;
  color: #8d908d;
  font-size: 10px;
}

.goal-progress {
  padding: 16px 4px 2px;
}

.goal-progress-copy {
  display: flex;
  justify-content: space-between;
  color: #747774;
  font-size: 11px;
}

.goal-progress-copy strong {
  color: #353835;
  font-weight: 650;
}

.progress-track {
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 4px;
  background: #edf1ec;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 260ms ease;
}

.update-button {
  display: flex;
  width: 100%;
  height: 54px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  border: 1px solid #dcebd8;
  border-radius: 27px;
  background: #f3f9f1;
  color: #318d22;
  gap: 10px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.update-button:hover {
  border-color: #c8e1c1;
  background: #eaf6e7;
}

.update-button svg {
  width: 19px;
  height: 19px;
}

.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: min(100%, 471px);
  margin: 0 auto;
  background: rgba(18, 24, 17, 0.46);
  opacity: 0;
  transition: opacity 220ms ease;
}

.drawer-backdrop.open,
.modal-backdrop.open {
  opacity: 1;
}

.drawer {
  width: min(82%, 330px);
  height: 100%;
  padding: max(24px, env(safe-area-inset-top)) 20px 24px;
  background: #fbfcfb;
  box-shadow: 15px 0 32px rgba(19, 35, 17, 0.17);
  transform: translateX(-102%);
  transition: transform 220ms ease;
}

.drawer-backdrop.open .drawer {
  transform: translateX(0);
}

.drawer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.drawer-brand > div {
  display: flex;
  flex-direction: column;
}

.drawer-brand strong {
  font-size: 16px;
}

.drawer-brand > div span {
  margin-top: 2px;
  color: #858785;
  font-size: 10px;
}

.drawer-nav {
  display: grid;
  margin-top: 32px;
  gap: 8px;
}

.drawer-nav a {
  display: grid;
  min-height: 50px;
  align-items: center;
  padding: 0 14px;
  border-radius: 12px;
  color: #464946;
  font-size: 14px;
  text-decoration: none;
  grid-template-columns: 24px 1fr 18px;
  gap: 11px;
  transition: background-color 180ms ease, color 180ms ease;
}

.drawer-nav a:hover,
.drawer-nav a.active {
  background: #ebf7e8;
  color: #318f22;
}

.drawer-nav svg {
  width: 20px;
  height: 20px;
}

.drawer-nav a > svg:last-child {
  width: 16px;
  height: 16px;
  justify-self: end;
}

.drawer-profile {
  display: flex;
  align-items: center;
  margin-top: 26px;
  padding: 15px;
  border: 1px solid #e8eee6;
  border-radius: 14px;
  background: #fff;
  gap: 12px;
}

.drawer-account {
  display: flex;
  min-width: 0;
  align-items: center;
  margin-top: 22px;
  gap: 11px;
}

.drawer-account img {
  width: 38px;
  height: 38px;
  border: 1px solid #e5e9e3;
  border-radius: 50%;
  object-fit: cover;
}

.drawer-account div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.drawer-account strong,
.drawer-account small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-account strong {
  font-size: 13px;
}

.drawer-account small {
  margin-top: 3px;
  color: #858885;
  font-size: 10px;
}

.drawer-profile > span {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff6dc;
  color: #df9d19;
  place-items: center;
}

.drawer-profile svg {
  width: 19px;
  height: 19px;
}

.drawer-profile div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.drawer-profile small {
  color: #858885;
  font-size: 10px;
}

.drawer-profile strong {
  margin-top: 3px;
  font-size: 13px;
}

.modal-backdrop {
  display: grid;
  padding: 20px;
  place-items: center;
}

.setup-modal {
  position: relative;
  width: min(100%, 355px);
  padding: 24px 25px 21px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(17, 30, 15, 0.25);
  text-align: center;
  transform: translateY(14px);
  transition: transform 220ms ease;
}

.modal-backdrop.open .setup-modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #757875;
  cursor: pointer;
  place-items: center;
  transition: background-color 180ms ease;
}

.modal-close:hover {
  background: #f2f5f1;
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-visual {
  position: relative;
  width: 130px;
  height: 92px;
  margin: 0 auto 8px;
  overflow: hidden;
}

.modal-visual img {
  width: 123px;
  height: 92px;
  object-fit: cover;
}

.modal-visual span {
  position: absolute;
  right: 3px;
  top: 5px;
  z-index: 2;
  display: grid;
  width: 32px;
  height: 32px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #ffd253;
  color: #5b4810;
  place-items: center;
}

.modal-visual span svg {
  width: 16px;
  height: 16px;
}

.setup-modal h2 {
  margin: 4px 0 8px;
  font-size: 20px;
}

.setup-modal p {
  max-width: 270px;
  margin: 0 auto 20px;
  color: #686b68;
  font-size: 13px;
  line-height: 1.7;
}

.modal-primary,
.modal-secondary {
  display: flex;
  width: 100%;
  height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
}

.modal-primary {
  border: 0;
  background: var(--green);
  color: #fff;
  gap: 8px;
  text-decoration: none;
  transition: background-color 180ms ease;
}

.modal-primary:hover {
  background: #3faf29;
}

.modal-primary svg {
  width: 17px;
  height: 17px;
}

.modal-secondary {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #797c79;
  transition: color 180ms ease;
}

.modal-secondary:hover {
  color: #343734;
}

@media (max-width: 390px) {
  .home-header,
  .home-content {
    padding-right: 16px;
    padding-left: 16px;
  }

  .welcome {
    padding-left: 5px;
  }

  .welcome h1 {
    font-size: 21px;
  }

  .welcome img {
    right: -13px;
    width: 116px;
    height: 101px;
  }

  .basal-card {
    padding: 21px 19px;
  }

  .basal-number strong {
    font-size: 39px;
  }

  .profile-section {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-track span,
  .drawer,
  .drawer-backdrop,
  .modal-backdrop,
  .setup-modal {
    transition-duration: 0.01ms !important;
  }
}
