/* calendar.css — month diary for meetings. Zine idiom: hard black grid
   frame, white day cells on ruled paper, yellow sticker for today,
   magenta-edged meeting stubs. */

.cal-body {
  padding: 28px 56px 56px;
  max-width: var(--container-wide);
}

.cal-toolbar {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.cal-toolbar-nav { display: flex; gap: 8px; align-items: center; }
.cal-month-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 0 auto;
}

/* 7-column grid with a heavy zine frame and sticker shadow. */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 2.5px solid var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}
.cal-weekday {
  font-family: var(--type);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px 4px;
  background: var(--ink);
  color: var(--paper);
}
.cal-cell {
  min-height: 104px;
  padding: 6px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  overflow: hidden;
  transition: background var(--dur-fast) ease;
}
/* Children 1–7 are the weekday headers, so day cells occupy 8–49 and the
   right-hand column lands on every 7th child (14, 21, … 49). */
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--paper); }
.cal-cell.other { background: var(--paper); }
.cal-cell.other .cal-daynum { opacity: 0.35; }
.cal-daynum {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  padding: 3px 5px;
}
.cal-cell.today .cal-daynum {
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  box-shadow: 1px 1px 0 var(--ink);
  font-weight: 500;
}

/* Meeting stub — a little filed slip with a magenta spine. */
.cal-meeting {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.3;
  background: var(--paper-2);
  border: 0;
  border-left: 3px solid var(--magenta);
  border-radius: 2px;
  padding: 2px 5px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-meeting:hover { background: var(--yellow); }
.cal-meeting-time { font-size: 10px; margin-right: 4px; color: var(--mid); }
.cal-meeting-title { font-weight: 600; }

/* Next up list under the grid. */
.cal-upcoming { margin-top: 32px; max-width: 560px; }
.cal-upcoming ul { list-style: none; margin: 0; padding: 0; }
.cal-upcoming-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 9px 0;
  cursor: pointer;
  font-size: 14px;
  flex-wrap: wrap;
}
.cal-upcoming-row:hover { background: var(--paper-2); }

@media (max-width: 860px) {
  .cal-body { padding: 18px 14px 40px; }
  .cal-cell { min-height: 64px; padding: 4px; }
  .cal-meeting { font-size: 9.5px; padding: 1px 3px; }
  .cal-meeting-time { display: none; }
  .cal-month-title { font-size: 22px; }
}
