/* Base — reset, typography, accessibility primitives (.docs- scope) */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--docs-font-body);
  color: var(--docs-charcoal);
  background: var(--docs-white);
  font-size: 16px;
  line-height: 1.62;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--docs-font-heading);
  color: var(--docs-blue-dark);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--docs-space-3);
}

h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 var(--docs-space-3); max-width: 72ch; }

a { color: var(--docs-blue); text-underline-offset: 3px; }
a:not(.docs-btn):not(.docs-card):not(.docs-nav-link) { text-decoration: underline; }

code, pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85em;
}

pre {
  background: var(--docs-blue-deep);
  color: #E6EEF2;
  padding: var(--docs-space-4);
  border-radius: var(--docs-radius-medium);
  overflow-x: auto;
  line-height: 1.55;
  max-width: 100%;
}

table { border-collapse: collapse; width: 100%; }
th, td {
  text-align: left;
  padding: var(--docs-space-2) var(--docs-space-3);
  border-bottom: 1px solid var(--docs-border);
  vertical-align: top;
}
th { font-family: var(--docs-font-heading); color: var(--docs-blue-dark); font-size: 0.92rem; }

/* Accessible focus — never suppressed */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--docs-yellow);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.docs-skip-link {
  position: absolute;
  left: var(--docs-space-3);
  top: -100px;
  background: var(--docs-blue-dark);
  color: #fff;
  padding: var(--docs-space-2) var(--docs-space-3);
  border-radius: var(--docs-radius-small);
  z-index: 1000;
  transition: top var(--docs-transition-fast);
}
.docs-skip-link:focus {
  top: var(--docs-space-3);
}

img { max-width: 100%; display: block; }

::selection { background: var(--docs-yellow); color: var(--docs-blue-deep); }
