/* Reset, typography, and the accessibility floor every demo inherits. */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor targets clear the sticky header and the disclaimer ribbon. */
  scroll-padding-top: calc(var(--ribbon-height) + 88px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--surface);
  /* The ribbon is fixed at the top of the viewport. */
  padding-top: var(--ribbon-height);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.15;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p,
li {
  max-width: var(--measure);
  text-wrap: pretty;
}

p { margin: 0 0 var(--space-4); }

a {
  color: var(--brand-700);
  text-underline-offset: 0.15em;
}

a:hover { color: var(--brand-600); }

img,
svg,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* One visible focus treatment everywhere. Never remove it -- 2.4.7 depends on it. */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent-600);
  outline-offset: 3px;
  border-radius: 4px;
}

@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;
  }
}

/* Utilities */

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.section {
  padding-block: var(--section-space);
}

/* Desktop section rhythm leaves a dead screenful between blocks on a phone,
 * where most of this traffic actually lands. */
@media (max-width: 640px) {
  .section { padding-block: var(--section-space-tight); }
}

.section--alt {
  background: var(--surface-alt);
}

.section__lede {
  font-size: var(--step-1);
  color: var(--ink-500);
  max-width: 60ch;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin: 0 0 var(--space-2);
}

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

/* Keyboard users land here first. */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: calc(var(--ribbon-height) + var(--space-2));
  z-index: 200;
  transform: translateY(-200%);
  background: var(--brand-700);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}

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