/* Accessibility preferences. Each is a data-* on <html>; because every token is
   rem-based, changing the root font-size scales the whole interface uniformly,
   and overriding the --sp-* scale re-spaces it independently. Meaning is never
   carried by colour here — these are structural (size, spacing, motion, focus,
   underlines). */

/* ---- Text size: root font-size drives every rem token ---- */
html[data-text="s"]  { font-size: 15px; }
html[data-text="m"]  { font-size: 16px; }
html[data-text="l"]  { font-size: 18px; }
html[data-text="xl"] { font-size: 20px; }

/* ---- Spacing: override the whole --sp-* scale (independent of text size) ---- */
html[data-spacing="compact"] {
  --sp-1: 0.2rem; --sp-2: 0.4rem; --sp-3: 0.6rem; --sp-4: 0.8rem;
  --sp-5: 1.2rem; --sp-6: 1.6rem; --sp-7: 2.4rem; --sp-8: 3.2rem;
}
html[data-spacing="roomy"] {
  --sp-1: 0.325rem; --sp-2: 0.65rem; --sp-3: 0.975rem; --sp-4: 1.3rem;
  --sp-5: 1.95rem; --sp-6: 2.6rem; --sp-7: 3.9rem; --sp-8: 5.2rem;
}

/* ---- Grid density: column count of the card boards ---- */
html[data-grid="1"] .ov-masonry { columns: 1 340px; }
html[data-grid="2"] .ov-masonry { columns: 2 340px; }
html[data-grid="3"] .ov-masonry { columns: 3 340px; }

/* ---- Reduce motion: near-instant transitions/animations ---- */
html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* ---- High-contrast focus: thicker, ink-coloured focus ring ---- */
html[data-focus="hc"] :focus-visible {
  outline: 3px solid var(--c-ink) !important;
  outline-offset: 2px !important;
}

/* ---- Underline content links: never rely on colour alone to mark a link ---- */
html[data-links="underline"] a[href]:not(.nav-item):not(.nav-flyout__link):not(.skip-link):not(.set-card):not(.dash-shortcut) {
  text-decoration: underline;
}
