/* Shared accessibility layer (IS 5568 / WCAG 2.x AA) for the standalone
   pages — blog posts, 404, booking, finance, prompts, mashkaman, demo.
   Loaded after each page's own inline styles so it can correct them.
   index.html carries the equivalent rules in its own stylesheet. */

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 300;
  background: #1C2B3A; color: #fff; padding: 10px 16px;
  font-weight: 600; text-decoration: none; border-radius: 2px;
}
.skip-link:focus { top: 12px; }
html[dir="rtl"] .skip-link { left: auto; right: 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

main:focus { outline: none; }

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--teal, #267474);
  outline-offset: 2px;
}
footer a:focus-visible,
.post-page-footer a:focus-visible { outline-color: #8FD3D3; }

/* Blog: grey meta text was #B8BCBC on off-white (1.8:1). */
.post-page-meta-item { color: #5F6666; }
.post-meta-dot { background: #5F6666; }
.post-body .caption { color: #4A5050; }
.post-body citation { color: #4A5050; }
.post-page-footer p { color: #C9CDCD; } /* on dark slate; older posts used #898A8A (4.2:1) */

/* Blog: horizontally scrollable code blocks and wide tables are keyboard-reachable
   (tabindex added in markup); make that focus visible. */
.post-body pre:focus-visible,
.table-scroll:focus-visible { outline: 3px solid var(--teal, #267474); outline-offset: 2px; }
.table-scroll { overflow-x: auto; }

/* Substack embed placeholder (see /assets/consent.js) */
.consent-embed { max-width: 100%; }
.consent-embed p { font-size: 14px; line-height: 1.6; }
.collection-notice { font-size: 13px; line-height: 1.6; color: #4A5050; margin-top: 12px; }
.collection-notice a { color: var(--teal, #267474); text-decoration: underline; }
.refs-title { margin: 0 0 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
