/* The Welcome page's Recent Updates list and its one-line license note.
   The list comes from _recent-updates.qmd, which the changelog renderer writes:
   up to three highlights from the last 30 days, each a date, a title linked to
   its chapter, and a category. Category colors match the Changelog page
   (styles/changelog-v2.css). Identical in all four handbooks. Stylesheets are
   cached as immutable on three of the sites, so change this by adding a -v2
   file, not by editing it. */

.recent-updates {
  --ru-muted: #5b6b7f;
  --ru-rule: #e3e8ef;
  --ru-milestone: #a16207;
  --ru-evidence: #0f766e;
  --ru-policy: #4338ca;
  --ru-developments: #0369a1;
  --ru-content: #047857;
  --ru-accuracy: #be123c;
  margin: 0.25rem 0 2rem;
}

.quarto-dark .recent-updates,
[data-bs-theme="dark"] .recent-updates {
  --ru-muted: #9aa7b6;
  --ru-rule: #343b44;
  --ru-milestone: #facc15;
  --ru-evidence: #2dd4bf;
  --ru-policy: #a5b4fc;
  --ru-developments: #7dd3fc;
  --ru-content: #6ee7b7;
  --ru-accuracy: #fda4af;
}

.recent-updates ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recent-updates li {
  display: grid;
  grid-template-columns: 6.75rem minmax(0, 1fr) auto;
  gap: 0.25rem 1rem;
  align-items: baseline;
  margin: 0;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--ru-rule);
}

.recent-updates li:first-child {
  border-top: 1px solid var(--ru-rule);
}

.recent-updates .ru-date {
  color: var(--ru-muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.recent-updates li > a {
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.recent-updates li > a:hover,
.recent-updates li > a:focus-visible {
  text-decoration: underline;
}

.recent-updates .ru-cat {
  color: var(--ru-cat, var(--ru-muted));
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.recent-updates .ru-cat-milestone { --ru-cat: var(--ru-milestone); }
.recent-updates .ru-cat-evidence { --ru-cat: var(--ru-evidence); }
.recent-updates .ru-cat-policy { --ru-cat: var(--ru-policy); }
.recent-updates .ru-cat-developments { --ru-cat: var(--ru-developments); }
.recent-updates .ru-cat-content { --ru-cat: var(--ru-content); }
.recent-updates .ru-cat-accuracy { --ru-cat: var(--ru-accuracy); }

/* With no highlight in the last 30 days the renderer writes one sentence. */
.recent-updates > p:not(:last-child) {
  color: var(--ru-muted);
  margin: 0;
  padding: 0.7rem 0;
  border-top: 1px solid var(--ru-rule);
  border-bottom: 1px solid var(--ru-rule);
}

.recent-updates .ru-all {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

/* One line of license and citation at the foot of the Welcome page. */
.home-license {
  margin: 2.5rem 0 0.5rem;
  color: #5b6b7f;
  font-size: 0.9rem;
}

.quarto-dark .home-license,
[data-bs-theme="dark"] .home-license {
  color: #9aa7b6;
}

@media (max-width: 575.98px) {
  .recent-updates li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .recent-updates li > a {
    grid-column: 1 / -1;
  }
}
