/* ==========================================================================
   Base: reset, typography, focus, utilities
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: var(--cursor-hand); }
/* Everything that can be clicked shows the brand hand pointer */
a[href], button, summary, select, label[for], [role="button"], [role="option"], [role="menuitem"], [role="tab"], [data-act], [data-open], [data-doc-act], [data-nav],
input[type="checkbox"], input[type="radio"], input[type="submit"], input[type="file"], input[type="file"]::file-selector-button, .check, .chip, .stat-card, .sr-item, .nav-link { cursor: var(--cursor-hand); }
button:disabled, [aria-disabled="true"], select:disabled, input:disabled { cursor: not-allowed; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

.icon { display: inline-block; flex: none; vertical-align: -0.18em; }

/* Visible keyboard focus everywhere (light surfaces) ----------------------- */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
.sidebar :focus-visible,
.hero :focus-visible,
.toast :focus-visible { outline-color: var(--focus-on-dark); }

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

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--r-md);
  font-weight: 600; transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.nowrap { white-space: nowrap; }
.muted { color: var(--text-muted); }
.num { font-variant-numeric: tabular-nums; }

/* No-JS notice */
.noscript { padding: 48px 24px; text-align: center; color: var(--navy); font-weight: 600; }

/* Respect reduced-motion preferences --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
