/* ============================================================
   base.css — reset, document defaults, focus, skip link, container
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--fg-base);
  background: var(--bg-page);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
figure,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  color: var(--fg-strong);
}

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

img,
svg {
  display: block;
}

a {
  color: var(--fg-accent);
  text-decoration: none;
  transition: color var(--t-fast) ease;
}

a:hover {
  color: var(--blue-700);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: rgb(17 94 228 / 0.16);
}

/* Focus ------------------------------------------------------
   The prototype shipped no focus styles; production requires them.
   Visible ring on keyboard focus only. */
:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

/* Skip link -------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--bg-surface);
  color: var(--fg-strong);
  border: 1px solid var(--bd-primary);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Container — consumes --rail-width so content aligns with the nav */
.container {
  width: var(--rail-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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