/* Base: reset, typography defaults, focus, utilities */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--wb-surface-canvas);
  color: var(--wb-text);
  font-family: var(--wb-font-sans);
  font-size: var(--wb-text-md);
  line-height: var(--wb-leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--wb-accent); }

:focus { outline: none; }
:focus-visible { box-shadow: var(--wb-focus-ring); border-radius: var(--wb-radius-sm); }
/* Headings focused programmatically after navigation (FocusOnNavigate) get no ring */
[tabindex="-1"]:focus-visible { box-shadow: none; }

::selection { background: var(--wb-accent); color: var(--wb-accent-ink); }

/* Pixel art always renders crisp */
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

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

.skip-link {
  position: absolute; left: var(--wb-space-4); top: -100px; z-index: 100;
  background: var(--wb-accent); color: var(--wb-accent-ink);
  padding: var(--wb-space-2) var(--wb-space-4); border-radius: var(--wb-radius-lg); font-weight: 600;
}
.skip-link:focus { top: var(--wb-space-2); color: var(--wb-accent-ink); }

.mono { font-family: var(--wb-font-mono); }
.accent { color: var(--wb-accent); }

/* Prose blocks inside documents */
.wb-prose { max-width: 68ch; color: var(--wb-text-secondary); font-size: var(--wb-text-base); }
.wb-prose > * + * { margin-top: var(--wb-space-4); }
.wb-prose strong { color: var(--wb-text); font-weight: 600; }
