/* APS Accessibility 0.2.1 - standalone accessibility declaration styling
   Visual language aligned with a dark Bootstrap/Darkroom gallery without loading the theme itself. */

:root {
  color-scheme: dark;
  --aps-bg: #212529;
  --aps-surface: #2b3035;
  --aps-text: #f8f9fa;
  --aps-muted: #ced4da;
  --aps-border: #495057;
  --aps-link: #8ec5ff;
  --aps-link-hover: #cfe7ff;
  --aps-focus: #ffffff;
  --aps-max-width: 1140px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 2rem max(1rem, calc((100vw - var(--aps-max-width)) / 2));
  background: var(--aps-bg);
  color: var(--aps-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

body > :first-child {
  margin-top: 0;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--aps-text);
  line-height: 1.25;
  font-weight: 500;
  scroll-margin-top: 1rem;
}

h1 {
  margin: 0 0 1.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--aps-border);
  font-size: clamp(2rem, 4vw, 2.6rem);
}

h2 {
  margin: 2.4rem 0 1rem;
  padding-top: 0.35rem;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

h3 {
  margin: 1.8rem 0 0.8rem;
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
}

p, ul, ol, dl {
  margin-top: 0;
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 1.6rem;
}

li + li {
  margin-top: 0.35rem;
}

strong, b {
  font-weight: 700;
}

a {
  color: var(--aps-link);
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--aps-link-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--aps-focus);
  outline-offset: 3px;
  border-radius: 0.15rem;
}

hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--aps-border);
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--aps-muted);
  background: var(--aps-surface);
}

code, pre {
  background: #16191c;
  color: var(--aps-text);
}

code {
  padding: 0.1rem 0.35rem;
  border-radius: 0.2rem;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--aps-border);
  border-radius: 0.3rem;
}

/* Optional semantic wrapper if the declaration already uses <main>. */
main {
  display: block;
  width: 100%;
}

/* Visually separated sections without changing document semantics. */
main > section {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid var(--aps-border);
  border-radius: 0.3rem;
  background: var(--aps-surface);
}

/* Accessible skip link if one is added to the declaration HTML. */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  padding: 0.65rem 0.9rem;
  background: #ffffff;
  color: #000000;
  border-radius: 0.25rem;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (max-width: 575.98px) {
  body {
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
  }

  h1 {
    font-size: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    padding: 0;
    background: #ffffff;
    color: #000000;
  }

  a {
    color: #000000;
    text-decoration: underline;
  }
}
