/* Oppward base styles: reset + element defaults. Loads after tokens.css. */

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

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

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

html,
body {
  /* Safety net: no single component should cause page-level horizontal
     scroll, but wide/marquee content (the hero ticker) makes this cheap
     insurance regardless of the root-cause fix on that component. */
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
  /* overflow-wrap is inherited, so setting it once here covers every
     descendant: real opportunity titles, agency names, and notice IDs are
     unpredictable-length strings from SAM.gov/Grants.gov, and a single long
     unbroken run must wrap rather than force horizontal scroll on a narrow
     viewport. */
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  /* No explicit color: inherit the ambient text color from whichever band
     (.band / .band--alt / a nested white .card) the heading sits in. An
     explicit color here would win over the ancestor's color even though the
     ancestor rule has higher selector specificity -- own declarations always
     beat inheritance, regardless of specificity. See components.css for the
     band/card color tokens this relies on. */
  font-family: var(--font-display);
  font-weight: 560;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  margin: 0;
}

h1 {
  font-size: var(--fs-hero);
}
h2 {
  font-size: var(--fs-2xl);
}
h3 {
  font-size: var(--fs-xl);
}
h4 {
  font-size: var(--fs-md);
  font-weight: 600;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

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

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

/* Real focus states everywhere, no focus removal. */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Tabular figures wherever a dollar amount or count lives. */
.tnum {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.visually-hidden {
  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: absolute;
  left: var(--space-4);
  top: -60px;
  background: var(--accent);
  color: var(--accent-on-accent);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--dur-fast) var(--ease-out);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-4);
}
