/* Authorized Path Forward · base.css
   Reset, document defaults, type, links, focus and the helpers
   (DESIGN_SYSTEM §7, §11). Every color and size is a token. */

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

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

/* The page: white, with the code box's green as a band along the top. */
body {
  margin: 0;
  min-height: 100vh;
  border-top: var(--border-band) solid var(--brand-accent-edge);
  background: var(--color-surface-page);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-base);
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-xlg);
  margin-bottom: var(--space-5);
}

h2 {
  font-size: var(--text-lg);
  margin-top: var(--space-7);
}

h3 {
  font-size: var(--text-md);
  letter-spacing: 0;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--text-xxlg);
  }
}

p,
ul,
ol,
dl,
figure,
address {
  margin: 0 0 var(--space-4);
}

ul,
ol {
  padding-left: 1.4em;
}

li + li {
  margin-top: var(--space-2);
}

strong {
  font-weight: var(--weight-semibold);
}

address {
  font-style: normal;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--motion-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-link-hover);
  text-decoration-thickness: 2px;
}

/* Visible focus for every link, from the keyboard. */
:focus-visible {
  outline: var(--outline-width) solid var(--color-focus);
  outline-offset: var(--outline-offset);
}

/* The skip link waits above the page and drops into view on focus. */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-sticky);
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface-page);
  color: var(--color-text-primary);
  border: var(--border-medium) solid var(--color-focus);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transform: translateY(-250%);
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.lead {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
}

.muted {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

@media (prefers-reduced-motion: reduce) {
  a {
    transition: none;
  }
}
