/* ---------- Light theme (default) ---------- */
:root {
  --accent: #20558a;
  --accent-hover: #1a4673;
  --accent-contrast: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #444b52;
  --ink-3: #5f6772;
  --line: #e5e7eb;
  --line-2: #f0f1f3;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --ok: #157040;
  --no: #a23b32;
  --warn-bg: #fdf6ec;
  --warn-line: #f0dcb8;
  --warn-ink: #6f4c0e;
  --warn-icon: #b57d16;
  --focus: #20558a;
  --radius: 12px;
  --radius-sm: 9px;
}

/* ---------- Dark theme (follows system) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #7fb2ee;
    --accent-hover: #a3c8f4;
    --accent-contrast: #0d1520;
    --ink: #e8eaed;
    --ink-2: #c2c7cf;
    --ink-3: #969ca6;
    --line: #2b303a;
    --line-2: #23272f;
    --surface: #14171c;
    --surface-2: #1c2027;
    --ok: #5fc98c;
    --no: #f08a7f;
    --warn-bg: #2a2213;
    --warn-line: #4a3c1c;
    --warn-ink: #e8c98a;
    --warn-icon: #e0b45f;
    --focus: #7fb2ee;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration: none; }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, .dl-item:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link for keyboard / screen-reader users */
.skip-link {
  position: absolute;
  left: 12px;
  top: -50px;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }

.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;
}

/* ---------- NIH site alert ---------- */
.nih-site-alert {
  /* Fixed NIH blue with white text in both themes (not tied to button colors) */
  background: #20558a;
  border: 1px solid #1a4673;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 14.5px;
  margin-bottom: 20px;
}
.nih-site-alert__inner {
  padding: 15px 17px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.nih-site-alert__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #ffffff;
}
.nih-site-alert__content { flex: 1; min-width: 0; }
.nih-site-alert__title { font-weight: 700; margin-bottom: 4px; }
.nih-site-alert__items { padding-left: 18px; }
.nih-site-alert__items li + li { margin-top: 4px; }
.nih-site-alert a { color: #ffffff; font-weight: 600; }
.nih-site-alert a:focus-visible { outline-color: #ffffff; }

/* Keep the decorative second icon from crowding small screens */
@media (max-width: 600px) {
  .nih-site-alert__icon:last-child { display: none; }
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 28px 30px;
}
.logo-img { max-height: 58px; width: auto; display: block; margin-bottom: 24px; }

/* Keep the white-background logo legible on dark surfaces */
@media (prefers-color-scheme: dark) {
  .logo-img {
    background: #ffffff;
    padding: 7px 11px;
    border-radius: 8px;
  }
}

.site-header h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.2;
}
.site-header p.subtitle {
  font-size: 16px;
  color: var(--ink-3);
  max-width: 580px;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 8px 28px 56px;
}
section.block {
  padding: 36px 0;
  border-bottom: 1px solid var(--line-2);
}
section.block:last-of-type { border-bottom: none; }
.block h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}
.block .lead { color: var(--ink-2); margin-bottom: 20px; max-width: 620px; }
.block .lead:last-child { margin-bottom: 0; }

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.18s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn svg { width: 16px; height: 16px; }

/* ---------- Downloads ---------- */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}
.dl-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.dl-item:hover { border-color: var(--ink-3); background: var(--surface-2); }
.dl-item .os { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--ink-2); }
.dl-item .os svg { width: 26px; height: 26px; }
.dl-item .dl-text { flex: 1; min-width: 0; }
.dl-item .dl-title { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 2px; }
.dl-item .dl-sub { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.dl-item .arrow { color: var(--ink-3); flex-shrink: 0; transition: transform 0.18s ease, color 0.18s ease; }
.dl-item:hover .arrow { transform: translateY(2px); color: var(--accent); }

.subhead {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--ink-3); font-weight: 700; margin: 24px 0 12px;
}
.doc-links { display: flex; flex-wrap: wrap; gap: 18px; }
.doc-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--accent); font-weight: 500; }
.doc-link img.pdf-ico { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Callouts ---------- */
.callout { display: flex; gap: 12px; padding: 15px 17px; border-radius: var(--radius-sm); margin-top: 20px; font-size: 14.5px; }
.callout svg.ci { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.callout.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); }
.callout.warn svg.ci { color: var(--warn-icon); }
.callout.note { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.callout.note svg.ci { color: var(--ink-3); }
.callout strong { display: block; margin-bottom: 2px; }

/* ---------- Steps ---------- */
ol.steps { list-style: none; counter-reset: step; }
ol.steps li {
  counter-increment: step;
  display: flex; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
  align-items: flex-start; color: var(--ink-2);
}
ol.steps li:first-child { padding-top: 0; }
ol.steps li:last-child { border-bottom: none; padding-bottom: 0; }
ol.steps li::before {
  content: counter(step);
  width: 26px; height: 26px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.platforms { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 420px; }
table.platforms th, table.platforms td { padding: 13px 18px; text-align: center; border-bottom: 1px solid var(--line-2); }
table.platforms thead th { background: var(--surface-2); color: var(--ink); font-weight: 650; font-size: 13px; }
table.platforms thead th small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11px; margin-top: 2px; }
table.platforms tbody td:first-child, table.platforms thead th:first-child { text-align: left; font-weight: 600; color: var(--ink); }
table.platforms tbody tr:last-child td { border-bottom: none; }
.mark { display: inline-flex; align-items: center; justify-content: center; }
.mark.yes { color: var(--ok); }
.mark.no { color: var(--no); }
.mark svg { width: 17px; height: 17px; }

/* ---------- Support ---------- */
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.support-item { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.support-item .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink-3); font-weight: 700; margin-bottom: 6px; }
.support-item .value { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.support-item .phone { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -0.2px; text-decoration: none; }
.support-item .phone:hover { color: var(--accent); text-decoration: underline; }
.support-item .phone small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.fineprint { margin-top: 22px; font-size: 13px; color: var(--ink-3); }

/* ---------- Footer ---------- */
footer {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12.5px; line-height: 1.9; text-align: center; padding: 26px 24px;
}
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }
footer .foot-links { max-width: 780px; margin: 0 auto 8px; }
footer .foot-links span { color: var(--line); margin: 0 6px; }
footer .addr { margin-bottom: 14px; }
footer .tagline { margin-top: 14px; color: var(--ink-2); font-style: italic; }

@media (max-width: 600px) {
  .site-header h1 { font-size: 26px; }
  .header-inner { padding: 20px 20px 24px; }
  .wrap { padding: 8px 20px 40px; }
  section.block { padding: 30px 0; }
}