/* The deadline timeline — dashboard strip and full page.
 *
 * Two rules run through all of it. Urgency is never carried by colour alone:
 * every coloured thing here also has a word or a mark beside it. And every
 * row is readable at 360px, because a musmach reads this on his phone in the
 * five minutes he has between sedarim, not at a desk. */

.dl-strip { border-left: 4px solid var(--evergreen); }
.dl-strip-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.5rem;
}
.dl-strip-title {
  font-family: Georgia, serif; color: var(--evergreen-dark);
  font-size: 1.1rem; margin: 0;
}
.dl-more { font-size: 0.9rem; white-space: nowrap; }

.dl-next {
  border: 1px solid var(--line); border-left: 4px solid var(--evergreen);
  border-radius: 6px; padding: 0.75rem 0.9rem; margin: 0.7rem 0;
  background: #fbfcfa;
}
.dl-next.dl-overdue { border-left-color: var(--danger); background: #fdf6f6; }
.dl-next.dl-today { border-left-color: var(--gold); background: #fdfaf2; }
.dl-next.dl-soon { border-left-color: var(--gold); }
.dl-next-eyebrow {
  margin: 0; font-size: 0.72rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted);
}
.dl-next-title {
  font-family: Georgia, serif; font-size: 1.25rem; margin: 0.15rem 0 0.3rem;
  color: var(--evergreen-dark);
}

.dl-when { margin: 0.2rem 0 0.5rem; font-size: 0.95rem; }
.dl-when .dl-overdue { color: var(--danger); }
.dl-when .dl-today { color: #8a5f10; }
.dl-when .dl-soon { color: #8a5f10; }
.dl-when .dl-later { color: var(--evergreen-dark); }

.dl-action { margin-top: 0.35rem; }
.dl-pending {
  margin: 0.35rem 0 0; padding: 0.5rem 0.65rem; border-radius: 5px;
  background: #f4f1e6; border: 1px dashed var(--gold);
  color: #6b5216; font-size: 0.9rem;
}

.dl-late { margin-top: 0.6rem; }
.dl-late-head {
  margin: 0 0 0.25rem; font-weight: 700; color: var(--danger);
  font-size: 0.92rem;
}
.dl-late-list { margin: 0; padding-left: 1.1rem; font-size: 0.92rem; }
.dl-late-list li { margin-bottom: 0.15rem; }

.dl-progress { margin-top: 0.8rem; }
.dl-bar {
  height: 8px; border-radius: 4px; background: #e4e9dd; overflow: hidden;
}
.dl-bar-fill { height: 100%; background: var(--evergreen); }
.dl-progress-label {
  margin: 0.3rem 0 0; font-size: 0.85rem; color: var(--muted);
}
.dl-strip-foot { margin: 0.6rem 0 0; font-size: 0.85rem; }
.dl-allclear { margin: 0.5rem 0; }

.dl-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.dl-chip {
  font-size: 0.8rem; font-weight: 700; padding: 0.15rem 0.5rem;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
}
.dl-chip.dl-overdue { color: var(--danger); border-color: #e2bcbc; background: #fdf6f6; }
.dl-chip.dl-soon { color: #8a5f10; border-color: #e6d5a8; background: #fdfaf2; }
.dl-chip.dl-done { color: var(--ok); border-color: #bcd8c7; background: #f5faf6; }

.dl-pill {
  font-size: 0.75rem; font-weight: 700; padding: 0.1rem 0.5rem;
  border-radius: 999px; border: 1px solid var(--line); white-space: nowrap;
}
.dl-pill.tone-good { color: var(--ok); border-color: #bcd8c7; background: #f5faf6; }
.dl-pill.tone-warn { color: var(--danger); border-color: #e2bcbc; background: #fdf6f6; }
.dl-pill.tone-open { color: var(--muted); background: #fff; }
.dl-pill.tone-muted { color: var(--muted); background: #f1f3ee; }

/* The list itself. The rail is the timeline spine; it is decorative, and
 * every row still reads correctly with it turned off. */
.dl-list { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.dl-item { display: flex; gap: 0.75rem; padding: 0 0 0.9rem; }
.dl-rail {
  flex: 0 0 10px; margin-top: 0.45rem; border-left: 2px solid var(--line);
  position: relative;
}
.dl-rail::before {
  content: ""; position: absolute; left: -6px; top: 0;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--muted);
}
.dl-item.dl-overdue > .dl-rail::before { border-color: var(--danger); background: var(--danger); }
.dl-item.dl-today > .dl-rail::before,
.dl-item.dl-soon > .dl-rail::before { border-color: var(--gold); background: var(--gold); }
.dl-item.dl-settled > .dl-rail::before { border-color: var(--ok); background: var(--ok); }
.dl-item:last-child > .dl-rail { border-left-color: transparent; }

.dl-body {
  flex: 1 1 auto; min-width: 0;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); padding: 0.7rem 0.85rem;
}
.dl-item.dl-overdue > .dl-body { border-left: 3px solid var(--danger); }
.dl-item.dl-today > .dl-body,
.dl-item.dl-soon > .dl-body { border-left: 3px solid var(--gold); }
.dl-item.dl-settled > .dl-body { background: #fbfcfa; }
.dl-item.dl-waived > .dl-body { background: #f4f5f2; }

.dl-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  justify-content: space-between;
}
.dl-title {
  font-family: Georgia, serif; font-size: 1.02rem; margin: 0;
  color: var(--evergreen-dark);
}
.dl-num { color: var(--muted); font-weight: 400; margin-right: 0.25rem; }
.dl-desc { margin: 0.25rem 0; font-size: 0.92rem; color: var(--ink); }
.dl-note { margin: 0.25rem 0; font-size: 0.88rem; color: var(--muted); }
.dl-list-done .dl-body { opacity: 0.86; }
.dl-summary { border-left: 4px solid var(--evergreen); }

@media (max-width: 560px) {
  .dl-item { gap: 0.5rem; }
  .dl-rail { flex-basis: 8px; }
  .dl-body { padding: 0.6rem 0.65rem; }
  .dl-next-title { font-size: 1.1rem; }
  .dl-head { align-items: flex-start; }
  .dl-action { display: block; width: 100%; text-align: center; }
  .dl-more { font-size: 0.85rem; }
}

@media print {
  .dl-action, .dl-strip-foot, .dl-more { display: none; }
  .dl-body { break-inside: avoid; }
}

/* ── Dashboard checklist cards ────────────────────────────────────────────
 * The cards are now rendered from the same server payload as the timeline,
 * so their urgency colours come from the same tokens the timeline uses and
 * cannot drift apart from it. Every colour here is paired with a word. */
.lede-2 { color: var(--muted); margin: 0 0 0.6rem; }

.section-card.card-overdue { border-left: 4px solid var(--danger); }
.section-card.card-soon { border-left: 4px solid var(--gold); }
.section-card.card-waived { background: #f4f5f2; }

.sc-num { color: var(--muted); font-weight: 400; }
.sc-requirement {
  margin: 0.35rem 0 0; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.02em; color: var(--evergreen-dark);
}
.sc-requirement.muted { color: var(--muted); font-weight: 400; }
.sc-due { margin: 0.4rem 0 0; font-size: 0.86rem; }
.sc-detail {
  margin: 0.35rem 0 0; font-size: 0.86rem; color: var(--ink);
  font-weight: 600;
}
.sc-detail.muted { font-weight: 400; color: var(--muted); }
.sc-note { margin: 0.35rem 0 0; font-size: 0.82rem; color: var(--muted); }
.section-card a.sc-button { align-self: flex-start; margin-top: 0.6rem; }

@media (max-width: 560px) {
  .section-card a.sc-button { align-self: stretch; text-align: center; }
}

.sc-also { margin: 0.45rem 0 0; font-size: 0.85rem; }
