/* The 8-week check-in grid and its legend. */
/* the padding leaves room for the hover/pop scale so it never triggers scrollbars */
.calendar-scroll { overflow-x: auto; overflow-y: hidden; padding: 4px; margin: -4px; }

.calendar {
  display: grid;
  grid-template-columns: 44px repeat(7, minmax(0, 1fr));
  gap: 5px;
  min-width: 300px;
}
.calendar__head { font-size: .72rem; color: var(--muted); text-align: center; }
.calendar__week { font-size: .7rem; color: var(--muted); font-family: var(--font-number); display: flex; align-items: center; }

.day-cell {
  aspect-ratio: 1;
  max-width: 100%;
  border-radius: 7px;
  background: var(--surface-2);
  border: 0;
  padding: 0;
  position: relative;
  display: grid;
  place-items: center;
  font-family: var(--font-number);
  font-size: .68rem;
  color: var(--muted);
}
.day-cell--future { background: transparent; border: 1px dashed var(--line); }
.day-cell--done { background: var(--accent); color: var(--accent-ink); }
.day-cell--partial { background: var(--accent-soft); color: var(--accent); }
.day-cell--rest::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  bottom: 4px;
}
.day-cell--today { box-shadow: 0 0 0 2px var(--warm); }
.day-cell--selected { box-shadow: 0 0 0 2px var(--ink); }

.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .76rem; color: var(--muted); }
.legend__swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.legend__swatch--done { background: var(--accent); }
.legend__swatch--partial { background: var(--accent-soft); }
.legend__swatch--rest { background: var(--surface-2); }
.legend__swatch--today { box-shadow: 0 0 0 2px var(--warm) inset; }
