/* ============================================================================
   FLEXECARE BASE, reset, element defaults, typography, accessibility
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--h-sticky) + 12px);
}

body {
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--fc-body-text);
  background: var(--fc-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

a, p, li, td, th, dd, dt, label {
  overflow-wrap: anywhere;
}

/* ---- Headings ------------------------------------------------------------ */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--fc-navy);
  line-height: var(--lh-heading);
  font-weight: 700;
  overflow-wrap: break-word;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }
h4 { font-size: 1.0625rem; font-weight: 600; }

p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.25em; margin: 0 0 1.1em; }
li { margin-bottom: 0.45em; }
li::marker { color: var(--fc-cyan); }

strong { color: var(--fc-navy); font-weight: 600; }

blockquote {
  margin: 0 0 1.1em;
  padding: 0.35em 0 0.35em 1.1em;
  border-left: 3px solid var(--fc-cyan);
  color: var(--fc-navy);
}

hr {
  border: 0;
  border-top: 1px solid var(--fc-line);
  margin: 2rem 0;
}

/* ---- Links ---------------------------------------------------------------- */

a {
  color: var(--fc-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: color var(--dur) var(--ease);
}

a:hover { color: var(--fc-cyan-deep); }

/* ---- Media ----------------------------------------------------------------- */

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

/* ---- Forms (element level, component skins live in components.css) -------- */

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

button { cursor: pointer; background: none; border: 0; padding: 0; }

/* ---- Tables ------------------------------------------------------------------ */

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.25em;
}

.table-scroll > table { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25em;
  font-size: var(--fs-small);
}

th, td {
  text-align: left;
  padding: 0.7em 0.9em;
  border-bottom: 1px solid var(--fc-line);
}

th {
  font-family: var(--font-ui);
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  color: var(--fc-navy);
  background: var(--fc-white);
}

/* ---- Selection / focus (cyan ring) ------------------------------------------- */

::selection { background: var(--fc-cyan); color: var(--fc-navy-deep); }

:focus-visible {
  outline: 3px solid rgba(79, 187, 112, 0.65);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Skip link ------------------------------------------------------------------ */

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 999;
  background: var(--fc-navy);
  color: var(--fc-white);
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus { top: 12px; color: var(--fc-white); }

/* ---- Utilities ---------------------------------------------------------------------- */

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

.nowrap { white-space: nowrap; }

/* ---- Reduced motion ---------------------------------------------------------------------- */

@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;
  }
}
