/* Reset, document defaults, accessibility basics — from mockup C2. */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }

body {
  background: var(--bg);
  color: var(--text);
  font: 500 var(--fs-body)/var(--lh-base) var(--ui);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: clip;
}
/* soft violet + lime light behind the page (mockup) */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(900px 500px at 50% -180px, rgba(145, 120, 249, .10), transparent 70%),
    radial-gradient(700px 400px at 100% 30%, rgba(200, 240, 74, .035), transparent 70%);
}

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

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

h1, h2, h3, h4 { font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; }
.icon--missing { display: inline-block; width: 18px; height: 18px; outline: 1px dashed var(--danger); }

/* Visible focus is not optional. */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r-sm); }
:focus:not(:focus-visible) { outline: none; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: var(--z-gate);
  padding: var(--space-8) var(--space-16); background: var(--primary); color: var(--primary-ink); font-weight: 700;
  border-radius: var(--r-sm);
}
.skip-link:focus { left: var(--space-8); top: var(--space-8); }

[hidden][hidden] { display: none !important; }

.muted { color: var(--text-muted); }

/* Tap targets via pseudo-element, never padding. */
.tap-target { position: relative; }
.tap-target::after {
  content: ""; position: absolute; inset: 50% 0 auto 0; translate: 0 -50%;
  height: 100%; min-height: 24px; z-index: 1;
}

/* Running text links */
.prose a, .link { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; transition: text-decoration-color var(--dur-fast), color var(--dur-fast); }
.prose a:hover, .link:hover { color: var(--primary); text-decoration-color: currentColor; }
