/* Recent Updates column (v7): the still list under the Welcome page's table
   of contents, now set as a quiet panel so it stands apart from the page.
   styles/recent-updates-ticker-v7.js builds it from /changelog/entries.json
   on the Welcome page only; without the script the page is unchanged. A
   light tint of the book's accent fills the panel, with soft corners. The
   "Recent updates" label is bold over a short accent rule; each day's first
   entry carries its date in the accent ink, small and semibold; headlines are
   semibold in the body text color; the chapter line is muted. Still: no
   motion, ticker, pause, counts, arrows, or uppercase. Colors come from each
   handbook's --handbook-accent (set in its _quarto.yml), so one file serves
   all four books; the accent ink caps the accent's lightness for legible
   text. Bryan approved the redesign on 24 October 2026. Canonical copy:
   handbook-recursive/kit/styles/recent-updates-ticker-v7.css. Published
   stylesheets are immutable; future changes need a new version. */

.ru-latest {
  --ru-latest-accent: var(--handbook-accent, #1765ad);
  --ru-latest-ink: var(--handbook-accent, #1765ad);
  --ru-latest-text: #1f2937;
  --ru-latest-muted: #6b7280;
  --ru-latest-rule: #e5e7eb;
  --ru-latest-tint: #f8fafc;
  margin: 1.75rem 0 0;
  padding: 1rem 1.1rem 0.95rem;
  border-radius: 10px;
  background: var(--ru-latest-tint);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ru-latest-text);
}

@supports (background: color-mix(in srgb, red 10%, transparent)) {
  .ru-latest {
    --ru-latest-tint: color-mix(in srgb, var(--ru-latest-accent) 7%, transparent);
    --ru-latest-rule: color-mix(in srgb, var(--ru-latest-accent) 20%, transparent);
  }
}

@supports (color: oklch(from red l c h)) {
  .ru-latest {
    --ru-latest-ink: oklch(from var(--ru-latest-accent) min(l, 0.5) c h);
  }
}

.quarto-dark .ru-latest,
[data-bs-theme="dark"] .ru-latest {
  --ru-latest-text: #e5e7eb;
  --ru-latest-muted: #9ca3af;
  --ru-latest-rule: #3a424d;
  --ru-latest-tint: rgba(255, 255, 255, 0.04);
}

@supports (background: color-mix(in srgb, red 10%, transparent)) {
  .quarto-dark .ru-latest,
  [data-bs-theme="dark"] .ru-latest {
    --ru-latest-tint: color-mix(in srgb, var(--ru-latest-accent) 12%, transparent);
    --ru-latest-rule: color-mix(in srgb, var(--ru-latest-accent) 28%, transparent);
  }
}

@supports (color: oklch(from red l c h)) {
  .quarto-dark .ru-latest,
  [data-bs-theme="dark"] .ru-latest {
    --ru-latest-ink: oklch(from var(--ru-latest-accent) max(l, 0.8) c h);
  }
}

#quarto-margin-sidebar.ru-latest-host {
  --ru-latest-extend: clamp(0px, (100vw - 1500px) * 0.35, 64px);
  width: calc(100% + var(--ru-latest-extend));
}

.ru-latest-title {
  margin: 0 0 0.3rem;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.005em;
  color: var(--ru-latest-text);
}

.ru-latest-title::after {
  content: "";
  display: block;
  width: 1.75rem;
  height: 3px;
  margin-top: 0.45rem;
  border-radius: 2px;
  background: var(--ru-latest-accent);
}

.ru-latest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ru-latest-item {
  padding: 0.75rem 0 0.8rem;
  border-bottom: 1px solid var(--ru-latest-rule);
}

/* Later entries from the same day sit closer to the one above. */
.ru-latest-item.ru-latest-same-day {
  padding-top: 0.55rem;
}

.ru-latest-date {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ru-latest-ink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.ru-latest-headline {
  display: block;
  color: var(--ru-latest-text);
  font-weight: 600;
  line-height: 1.38;
  text-decoration: none;
  overflow-wrap: anywhere;
}

a.ru-latest-headline:hover {
  color: var(--ru-latest-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.ru-latest-in {
  display: block;
  margin-top: 0.22rem;
  color: var(--ru-latest-muted);
  font-size: 0.78rem;
}

.ru-latest-chapter {
  color: var(--ru-latest-muted);
  text-decoration: none;
}

.ru-latest-chapter:hover {
  color: var(--ru-latest-ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.ru-latest a:focus-visible {
  outline: 2px solid var(--ru-latest-ink);
  outline-offset: 2px;
  border-radius: 2px;
}

.ru-latest-foot {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
}

.ru-latest-foot a {
  color: var(--ru-latest-ink);
  font-weight: 600;
  text-decoration: none;
}

.ru-latest-foot a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Quarto drops the margin column below 992px; the in-page list remains. */
@media (max-width: 991.98px) {
  .ru-latest {
    display: none;
  }

  #quarto-margin-sidebar.ru-latest-host {
    width: auto;
  }
}

@media print {
  .ru-latest {
    display: none !important;
  }
}
