/* ==========================================================================
   PrescribedRx — reset, elements, layout primitives
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px; /* the sticky header must not cover an anchor */
}

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

body {
  margin: 0;
  background: var(--prx-page);
  color: var(--prx-ink);
  font-family: var(--prx-font);
  font-size: var(--prx-text-lg);
  line-height: var(--prx-lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* a full-bleed panel must never create a sideways scroll */
}

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

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; }

a {
  color: var(--prx-ink);
  text-decoration-color: var(--prx-red);
  text-underline-offset: 3px;
}

a:hover { color: var(--prx-red); }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--prx-focus);
  outline-offset: 2px;
  border-radius: var(--prx-r-sm);
}

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

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

/* Visible only to a screen reader, and to a keyboard when focused. */
.prx-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.prx-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--prx-navy);
  color: var(--prx-on-navy);
  padding: 12px 20px;
  border-radius: 0 0 var(--prx-r-md) 0;
  text-decoration: none;
  font-weight: 600;
}

.prx-skip:focus {
  left: 0;
  color: var(--prx-on-navy);
}

/* ==========================================================================
   Type
   ========================================================================== */

.prx-display {
  font-family: var(--prx-display);
  font-weight: 700;
  letter-spacing: var(--prx-track-display);
  line-height: var(--prx-lh-tight);
  color: var(--prx-ink);
  text-wrap: balance;
}

h1.prx-display { font-size: var(--prx-h1); font-weight: 800; }
h2.prx-display { font-size: var(--prx-h2); }
h3.prx-display { font-size: var(--prx-h4); }

.prx-eyebrow {
  font-size: var(--prx-text-sm);
  font-weight: 600;
  letter-spacing: var(--prx-track-caps);
  text-transform: uppercase;
  color: var(--prx-red);
}

.prx-eyebrow--onnavy { color: var(--prx-on-navy-muted); }

.prx-label {
  font-size: var(--prx-text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--prx-muted);
}

.prx-lede {
  font-size: clamp(1.0625rem, 1.02rem + 0.19vw, 1.25rem); /* 17 -> 20 */
  line-height: var(--prx-lh-base);
  color: var(--prx-muted);
  max-width: 34em;
}

.prx-muted { color: var(--prx-muted); }
.prx-faint { color: var(--prx-faint); }
.prx-fine  { font-size: var(--prx-text-sm); line-height: 1.55; color: var(--prx-muted); }

/* ==========================================================================
   Layout
   ========================================================================== */

.prx-wrap {
  width: 100%;
  max-width: var(--prx-max);
  margin-inline: auto;
  padding-inline: var(--prx-gutter);
}

.prx-section { padding-block: 0 var(--prx-section); }
.prx-section--top { padding-block: var(--prx-section) var(--prx-section); }

.prx-stack { display: flex; flex-direction: column; }
.prx-stack-2  { gap: var(--prx-space-2); }
.prx-stack-3  { gap: var(--prx-space-3); }
.prx-stack-4  { gap: var(--prx-space-4); }
.prx-stack-5  { gap: var(--prx-space-5); }
.prx-stack-6  { gap: var(--prx-space-6); }
.prx-stack-7  { gap: var(--prx-space-7); }
.prx-stack-10 { gap: var(--prx-space-10); }

.prx-row {
  display: flex;
  align-items: center;
  gap: var(--prx-space-4);
  flex-wrap: wrap;
}

/* A grid that collapses to one column on a phone without a media query each
   time it is used. --cols is the desktop count; --min is the point at which a
   column would be too narrow to read. */
.prx-grid {
  display: grid;
  gap: var(--prx-space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 260px), 100%), 1fr));
}

.prx-grid-2 { --min: 320px; }
.prx-grid-3 { --min: 280px; }
.prx-grid-4 { --min: 220px; }

/* Explicit two-column split for heroes: copy one side, media the other. */
.prx-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--prx-space-6);
  align-items: center;
}

@media (min-width: 1025px) {
  .prx-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--prx-space-16);
  }
  .prx-split--media-first > :first-child { order: 2; }
  .prx-split--media-first > :last-child  { order: 1; }
  .prx-split--rail { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
  .prx-split--wide { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); align-items: start; }
}

.prx-hide-desktop { display: none; }

@media (max-width: 1024px) {
  .prx-hide-mobile  { display: none !important; }
  .prx-hide-desktop { display: revert; }
}
