/* base.css — reset, typography, focus, utilities. No components here. */

/* Inter, self-hosted (CSP font-src 'self'): one variable file covers every weight we use. The
   latin subset (~48 KB) covers English and Dutch; add the latin-ext file when a language needs it. */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

/* An author `display` rule beats the browser's [hidden] default; this makes `hidden` always win
   (the old dashboard needed a per-element patch for this, several times). */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
img, svg { display: block; max-width: 100%; }
code, kbd, samp { font-family: var(--font-mono); font-size: 0.92em; }
table { border-collapse: collapse; }
::selection { background: var(--accent-subtle); color: var(--text); }
::placeholder { color: var(--placeholder); opacity: 1; }

/* One focus ring for everything focusable; never removed, only restyled here. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }
main:focus { outline: none; }

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

/* Skip link: first thing a keyboard user reaches. */
.vn-skip-link {
  position: absolute;
  inset-inline-start: var(--space-2);
  inset-block-start: var(--space-2);
  z-index: calc(var(--z-toast) + 10);
  padding: var(--space-2) var(--space-4);
  background: var(--accent-solid);
  color: var(--on-accent);
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transform: translateY(-200%);
}
.vn-skip-link:focus { transform: none; }

/* Motion is decoration here, never information: honour the user's setting. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Windows high-contrast / forced-colors: keep boundaries visible. */
@media (forced-colors: active) {
  .vn-btn, .vn-card, .vn-field__control, .vn-badge, .vn-table-wrap, .vn-switch__track { border: 1px solid CanvasText; }
  .vn-switch input:checked + .vn-switch__track { background: Highlight; }
}
