/* A person's home page: tabs, a hello with one main button, then one card
   for the week and the cards under it. */
/* The tabs: soft grey words and icons with no box or line, like the admin sidebar.
   The page you are on is in the brand colour. */
.tabs {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1.5rem;
}
.tab {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.625rem 0.5rem;
  color: #5b6b73;
  font-size: 0.8125rem;

  & svg { width: 1.375rem; height: 1.375rem; }
  &:hover { color: var(--color-ink); }
}
.tab--current { color: var(--color-primary); font-weight: 600; }

.home-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;

  @media (min-width: 768px) {
    flex-direction: row;
    justify-content: space-between;
    margin: 4rem 0 2rem;
  }
}
.home-header__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: color-mix(in oklab, var(--color-ink) 80%, transparent);

  @media (min-width: 768px) { font-size: 1.875rem; }
}
.home-header__ask { @media (max-width: 767px) { width: 100%; } }

.home-cards { display: flex; flex-direction: column; gap: 2rem; }

/* The week: a big number in the corner, and a tinted line of facts below. */
.week-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem 1.5rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);

  @media (min-width: 768px) { padding: 1.5rem 2.25rem 2.25rem; }
}
.week-card__head {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;

  @media (min-width: 768px) { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}
.week-card__title { font-size: 1rem; font-weight: 600; @media (min-width: 768px) { font-size: 1.25rem; } }
.week-card__range { margin-top: 0.375rem; font-size: 0.875rem; color: var(--color-text); }
.week-card__figure {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  color: var(--color-text);
  font-size: 0.9375rem;

  & strong { color: var(--color-primary-dark); font-size: 2.5rem; font-weight: 700; line-height: 1; }
}
.week-card__stats {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  background: var(--color-raised);

  @media (min-width: 768px) { flex-direction: row; justify-content: space-between; }
}
.week-card__stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text);
  font-size: 0.9375rem;

  & svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
  & strong { color: var(--color-ink); font-weight: 700; }
}

.home-card {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);

  @media (min-width: 768px) { padding: 1.5rem; }
}
.home-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.home-card__title { font-size: 1.25rem; font-weight: 600; }

.home-suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem; }
.home-suggestion {
  display: block;
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--color-hairline);
  border-radius: 0.75rem;
  background: var(--color-raised);
  font-weight: 500;

  &::before { content: "→ "; color: var(--color-primary); }
  &:hover { border-color: var(--color-border-strong); background: var(--color-sunken); }
}

.home-list { display: flex; flex-direction: column; gap: 0.5rem; }
.home-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;

  &:hover { background: var(--color-page); }
}
.home-item__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);

  & svg { width: 1.25rem; height: 1.25rem; }
}
.home-item__icon--round { border-radius: 50%; }
.home-item__body { display: flex; flex-direction: column; min-width: 0; }
.home-item__title { font-weight: 700; }
.home-item__text { margin-top: 0.125rem; color: var(--color-muted); font-size: 0.875rem; }
