/* Recent Updates: generated dates, headlines, categories, and source links.
   Canonical copy: handbook-recursive/kit/styles/recent-updates-v5.css.
   Published stylesheets are immutable; future changes need a new version. */

.recent-updates {
  --ru-link: #1765ad;
  --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-link: #8ecaff;
  --ru-muted: #abb8c7;
  --ru-rule: #454d58;
  --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 > ul > li {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) minmax(10rem, 14rem);
  gap: 0.3rem 1rem;
  align-items: baseline;
  margin: 0;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--ru-rule);
}

.recent-updates > ul > 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 .ru-title {
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.recent-updates .ru-title > .ru-headline {
  font-weight: 600;
}

.recent-updates .ru-title > a {
  color: var(--ru-link);
  font-weight: 600;
  text-decoration: none;
}

.recent-updates .ru-title > .ru-chapter {
  display: block;
  width: fit-content;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  font-weight: 400;
  text-decoration: underline;
}

.recent-updates .ru-title > .ru-chapter-duplicate {
  display: none;
}

.recent-updates a:hover {
  text-decoration: underline;
}

.recent-updates a:focus-visible {
  outline: 2px solid var(--ru-link);
  outline-offset: 3px;
  border-radius: 2px;
  text-decoration: underline;
}

.recent-updates .ru-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 0;
  text-align: right;
}

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

.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); }

.recent-updates .ru-sources {
  color: var(--ru-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.recent-updates .ru-sources a {
  color: var(--ru-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Recent Updates stays clear of citation badges; article pages retain them. */
.recent-updates .citation-badge,
.recent-updates .citation-favicon-wrapper {
  display: none !important;
}

/* Preserve the existing empty-state and license treatment. */
.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;
}

.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: 767.98px) {
  .recent-updates > ul > li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }

  .recent-updates .ru-meta {
    align-items: flex-start;
    margin-top: 0.2rem;
    text-align: left;
  }
}
