/* base.css: reset and element defaults. Load order: tokens, base, components, pages. */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

/* Type scale: display 28/1.15 700 (34 at 1024+), h1 24/1.2 600 (28), h2 18/1.3 600, body 16/1.5,
   small 14/1.45, meta 12/1.4 500, micro 12/1.3 600. */
h1, h2, h3 { margin: 0 0 var(--s3); }
h1 { font-size: 24px; line-height: 1.2; font-weight: 600; }
h2 { font-size: 18px; line-height: 1.3; font-weight: 600; }
h3 { font-size: 16px; line-height: 1.3; font-weight: 600; }
@media (min-width: 1024px) { h1 { font-size: 28px; } }
.display { font-size: 28px; line-height: 1.15; font-weight: 700; }
@media (min-width: 1024px) { .display { font-size: 34px; } }
small, .small { font-size: 14px; line-height: 1.45; }
.meta { font-size: 12px; line-height: 1.4; font-weight: 500; color: var(--muted-fg); }
.micro {
  font-size: 12px; line-height: 1.3; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted-fg);
}
.muted { color: var(--muted-fg); }

a { display: inline-block; color: var(--fg); text-decoration: none; }
.prose a { text-decoration: underline; }
.prose { max-width: 65ch; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

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

button, input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

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

.skip-link {
  position: absolute; top: -3rem; left: var(--s2); z-index: 100;
  background: var(--primary); color: var(--primary-fg);
  padding: var(--s3) var(--s4); border-radius: var(--r-sm);
  transition: top .15s ease-in-out;
}
.skip-link:focus { top: var(--s2); }

/* htmx: the element carrying the request dims while it runs. No page spinner; list loads get
   skeletons (components.css). */
.htmx-request { opacity: .6; transition: opacity .15s ease-in-out; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Minimum target size, including text links and native controls. */
:where(a[href], button, summary, input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])) { min-width: 24px; min-height: 24px; }
:where(a[href]:not([class]):not(:has(img)), .c-crumb a, .breadcrumb-nav a, .pdp-back a) { display: inline-block; padding-block: 4px; }
.c-wordmark { display: inline-flex; align-items: center; }
input, textarea, select { border-color: var(--input-border); }
