.week-categories {
  display: grid;
  gap: 0;
}

.week-category {
  border-top: 1px solid #e9eef5;
}

.week-category:first-child {
  border-top: 0;
}

.week-category-heading {
  padding: 16px 22px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.week-category-heading h3 {
  margin: 0;
  font-size: .92rem;
}

.week-category-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.45;
}

.week-category-count {
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  display: inline-grid;
  place-items: center;
  color: var(--navy);
  background: #eef3f8;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
}

.week-category-followup .week-category-heading {
  background: #f7f9fc;
}

.week-category-followup .week-category-count {
  color: #7a5410;
  background: #fff7df;
}

.week-category-completed .week-category-heading {
  background: #f7faf8;
}

.week-category-completed .week-category-count {
  color: #276749;
  background: #eaf7ef;
}

.week-category-empty {
  padding: 19px 10px 22px;
  display: grid;
  gap: 4px;
  text-align: center;
}

.week-category-empty strong {
  color: #64748b;
  font-size: .82rem;
}

.week-category-empty span {
  color: #94a3b8;
  font-size: .75rem;
}

.incomplete-tag,
.followup-added-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: .69rem;
  font-weight: 800;
  white-space: nowrap;
}

.incomplete-tag {
  color: #b42318;
  background: #fff0ee;
  border: 1px solid #ffd0ca;
}

.followup-added-tag {
  color: #8a5b00;
  background: #fff7df;
  border: 1px solid #f3d68b;
}

.task-row.past-incomplete {
  margin: 4px 0;
  padding-left: 11px;
  padding-right: 11px;
  background: #fff8f7;
  border: 1px solid #f5d0cb;
  border-radius: 11px;
}

.task-row.past-incomplete + .task-row {
  border-top: 0;
}

.followup-family {
  margin: 10px 12px 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e4eaf2;
  border-radius: 14px;
  box-shadow: 0 2px 9px rgba(15, 23, 42, .035);
}

.followup-family + .followup-family {
  margin-top: 16px;
}

.followup-family-root {
  background: #fffaf0;
  border-bottom: 1px solid #f1e5c7;
}

.followup-family-root .task-row {
  padding-left: 14px;
  padding-right: 14px;
}

.followup-family-context {
  padding: 14px 16px;
  display: grid;
  gap: 3px;
  background: #fffaf0;
  border-bottom: 1px solid #f1e5c7;
}

.followup-family-context span {
  color: #8a6a2c;
  font-size: .68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.followup-family-context strong {
  color: var(--navy);
  font-size: .86rem;
}

.followup-family-summary {
  padding: 8px 16px;
  color: #7a6a4c;
  background: #fffdf8;
  border-bottom: 1px solid #edf1f5;
  font-size: .7rem;
  font-weight: 700;
}

.followup-family-children {
  padding: 4px 0 7px;
}

.followup-family-child {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: stretch;
  margin-left: calc((min(var(--family-depth), 4) - 1) * 18px);
}

.followup-family-branch {
  padding-top: 18px;
  color: #94a3b8;
  text-align: center;
  font-size: .9rem;
  line-height: 1;
}

.followup-family-child-row {
  min-width: 0;
  border-left: 2px solid #e9eef5;
}

.followup-family-child-row .task-row {
  min-width: 0;
  padding-left: 12px;
  padding-right: 12px;
}

.followup-family-child:last-child .followup-family-child-row {
  border-left-color: transparent;
}

.followup-family-child .task-row.completed {
  background: #fbfdfb;
}

@media (max-width: 720px) {
  .week-category-heading {
    align-items: flex-start;
  }

  .week-category .task-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .week-category .task-tags {
    grid-column: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .followup-family {
    margin-left: 7px;
    margin-right: 7px;
  }

  .followup-family-child {
    grid-template-columns: 18px minmax(0, 1fr);
    margin-left: calc((min(var(--family-depth), 3) - 1) * 10px);
  }

  .followup-family-branch {
    font-size: .76rem;
  }
}