/* Global tweaks with no JS counterpart. Feature-specific styles live alongside
   their js/<feature>.js counterpart (lang-switch.css, listing.css, settings.css). */

/* Override Quarto's grid (specificity must match its #title-block-header... rule) */
#title-block-header.quarto-title-block.default .quarto-title-meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: clamp(3rem, 8vw, 8rem);
}

/* Mobile (<= 768px, mirrors the chat-panel/settings mobile cutoff): drop the
   publish date so author + last-modified fit on one row. */
@media (max-width: 767.98px) {
  #title-block-header.quarto-title-block.default .quarto-title-meta > div:has(p.date) {
    display: none;
  }
}

/* Overview page pointer: `[label]{.detail-link} [text](page.qmd)` */
p:has(> span.detail-link) {
  margin: 0.5em 0 1.25em;
  font-size: 0.92em;
  color: var(--bs-secondary-color, #6c757d);
}

span.detail-link {
  font-weight: 500;
  margin-right: 0.3em;
}

p:has(> span.detail-link) a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

p:has(> span.detail-link) a:hover {
  color: var(--bs-link-color);
  border-bottom-style: solid;
}

/* Long display math scrolls inside its container; `clip` on main catches
   MJX-ASSISTIVE-MML which escapes overflow:auto (clip preserves sticky). */
mjx-container[display="true"] {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}
main { overflow-x: clip; }
