/* ==========================================================================
   RESET — minimal, modern, accessibility-preserving
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Anchor targets clear the fixed header. */
:target { scroll-margin-top: calc(var(--rc-header-h) + var(--rc-space-5)); }

body {
  margin: 0;
  background-color: var(--rc-paper);
  color: var(--rc-ink);
  font-family: var(--rc-font-sans);
  font-size: var(--rc-size-body);
  line-height: var(--rc-lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;   /* guarantees no horizontal scroll on mobile */
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button { background: none; border: 0; padding: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

/* Visible focus is never removed — only refined.
   :focus-visible keeps it off for mouse users, on for keyboard users. */
:focus-visible {
  outline: 2px solid var(--rc-on-surface-focus, var(--rc-ink));
  outline-offset: 3px;
}

/* Skip link — visible the moment it receives focus. */
.rc-skip-link {
  position: absolute;
  top: var(--rc-space-3);
  left: var(--rc-space-3);
  z-index: calc(var(--rc-z-overlay) + 1);
  padding: var(--rc-space-3) var(--rc-space-5);
  background: var(--rc-ink);
  color: var(--rc-paper);
  font-size: var(--rc-size-small);
  letter-spacing: var(--rc-track-label);
  text-transform: uppercase;
  transform: translateY(-200%);
  transition: transform var(--rc-dur-micro) var(--rc-ease-out);
}
.rc-skip-link:focus { transform: translateY(0); }

/* Screen-reader-only, still focusable. */
.rc-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

::selection { background: var(--rc-green); color: var(--rc-paper); }
