/* Accessibility fixes for the Zensical theme (WCAG 2.2 AA). The theme has no
   setting for any of these, so this is the one place with hand-written
   selectors. Keep it to contrast and non-colour cues; layout and components
   stay in daisyUI/Tailwind classes (see AGENTS.md). */

/* 1.4.1 Use of Color: links in content are underlined, not only coloured.
   Buttons, hover-only links, heading anchors and tab labels keep their look. */
.md-typeset a:not(.btn, .link-hover, .headerlink, .md-button, .footnote-ref, .footnote-backref) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.md-typeset .tabbed-labels a {
  text-decoration: none;
}

/* 1.4.3 Contrast (Minimum): theme colours that fall just under 4.5:1 on the
   code background. */
[data-md-color-scheme="default"] {
  --md-code-hl-comment-color: #5f6368;
  --md-code-hl-operator-color: #5f6368;
  --md-code-hl-punctuation-color: #5f6368;
}
[data-md-color-scheme="default"] .highlight .gs {
  color: #5f6368;
}
[data-md-color-scheme="slate"] {
  --md-code-hl-number-color: #ee8377;
  --md-code-hl-constant-color: #a698ea;
}
[data-md-color-scheme="slate"] .md-typeset a code {
  color: #7da2e8;
}

/* 2.4.11 Focus Not Obscured (WCAG 2.2): when the keyboard moves focus to a
   control near the top, keep it below the sticky header and tab bar. */
.md-content :is(a, button, summary, input, [tabindex]) {
  scroll-margin-top: 6.5rem;
}

/* Readability: Tailwind's Preflight zeroes paragraph margins and the theme
   relies on the browser default, so Markdown paragraphs ran together. Only
   class-less paragraphs (Markdown output); :where() keeps the specificity of
   a browser default, so every theme rule still wins. */
.md-typeset :where(p:not([class])) {
  margin-block: 1em;
}
