/* ============================================================
   OUMA REDESIGN — "ground + hover-card" design system
   Loaded AFTER ouma-shared.css. Implements the 2026 redesign:
   alternating full-bleed grounds with rounded cards that straddle
   the seam between them via a -150px overhang.
   ============================================================ */

:root {
  /* grounds */
  --rd-white: #FFFFFF;
  --rd-sand:  #F5EDE8;
  --rd-cream: #FBF8F5;
  /* brand (mirrors ouma-shared tokens, restated so this file stands alone) */
  --rd-teal:        #0D3A38;
  --rd-teal-mid:    #134847;
  --rd-teal-light:  #1a5c58;
  --rd-accent:      #23B1A6;
  --rd-terracotta:  #C4836A;
  --rd-blush:       #E8C4B8;
  --rd-mint:        #C8EAE4;
  --rd-body:        #33514E;
  --rd-muted:       #6C757D;
  /* system */
  --rd-overhang: 150px;
  --rd-card-radius: 32px;
  --rd-shadow:       0 40px 100px -30px rgba(13,58,56,0.5);
  --rd-shadow-soft:  0 40px 90px -30px rgba(13,58,56,0.22);
  --rd-shadow-mid:   0 40px 90px -30px rgba(13,58,56,0.45);
}

/* ---------- Grounds ---------------------------------------- */
.rd-ground        { position: relative; width: 100%; }
.rd-ground--white { background: var(--rd-white); }
.rd-ground--sand  { background: var(--rd-sand); }
.rd-ground--cream { background: var(--rd-cream); }

/* A ground that must "catch" the overhang of the card above it.
   Usage: <section class="rd-ground rd-ground--sand rd-catch rd-catch--6"> */
.rd-catch    { padding-top: calc(var(--rd-overhang) + 4rem); }
.rd-catch--0 { padding-top: var(--rd-overhang); }
.rd-catch--2 { padding-top: calc(var(--rd-overhang) + 2rem); }
.rd-catch--4 { padding-top: calc(var(--rd-overhang) + 4rem); }
.rd-catch--6 { padding-top: calc(var(--rd-overhang) + 6rem); }
.rd-catch--8 { padding-top: calc(var(--rd-overhang) + 8rem); }

/* Terminal ground — always sand, closes every page under the footer card */
.rd-terminal { background: var(--rd-sand); padding: var(--rd-overhang) 0 2.7rem; }

/* The ground the closing card floats on. Must match the ground ABOVE it (sand),
   so the card reads as straddling one continuous sand field into .rd-terminal.
   flow-root stops the card's top margin collapsing out of this section. */
.rd-close-ground { background: var(--rd-sand); display: flow-root; }

/* ---------- Hover cards ------------------------------------ */
/* Child of the ground ABOVE it; hangs -150px into the ground BELOW. */
.rd-card {
  position: relative;
  width: calc(100% - 2.5rem);
  max-width: 1160px;
  margin: 6rem auto calc(var(--rd-overhang) * -1);
  border-radius: var(--rd-card-radius);
  overflow: hidden;
  box-shadow: var(--rd-shadow);
  background: var(--rd-white);
}
.rd-card--wide   { max-width: 1300px; width: calc(100% - 4rem); }
.rd-card--soft   { box-shadow: var(--rd-shadow-soft); }
.rd-card--mid    { box-shadow: var(--rd-shadow-mid); }
.rd-card--flush  { margin-top: 0; }

/* stacking order: increment down the page so later cards sit above earlier */
.rd-z1 { z-index: 1; } .rd-z2 { z-index: 2; } .rd-z3 { z-index: 3; }
.rd-z4 { z-index: 4; } .rd-z5 { z-index: 5; } .rd-z6 { z-index: 6; }

/* Dark (teal) card — exact layered gradient from the design system */
.rd-card--dark,
.rd-dark-surface {
  background:
    radial-gradient(ellipse 80% 45% at 20% 30%, rgba(200,234,228,0.4) 0%, transparent 60%),
    radial-gradient(ellipse 70% 40% at 84% 8%,  rgba(232,196,184,0.3) 0%, transparent 55%),
    linear-gradient(160deg, #0D3A38 0%, #134847 30%, #1a5c58 52%, #0D3A38 100%);
  color: #fff;
}
/* the design system forces p{color:mid-gray}; dark surfaces must override */
.rd-card--dark p,
.rd-dark-surface p { color: rgba(255,255,255,0.7); }
.rd-card--dark h1, .rd-card--dark h2, .rd-card--dark h3, .rd-card--dark h4,
.rd-dark-surface h1, .rd-dark-surface h2, .rd-dark-surface h3, .rd-dark-surface h4 { color: #fff; }
.rd-card--dark em, .rd-dark-surface em { font-style: italic; color: var(--rd-mint); }

.rd-inner { max-width: 1160px; margin: 0 auto; padding: 0 2.5rem; }

/* ---------- Type ------------------------------------------- */
/* Lora for headings/pull-quotes only; Plus Jakarta Sans everywhere else,
   including ALL numerals/stats — never set a stat in Lora. */
.rd-eyebrow {
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--rd-accent);
}
.rd-dark-surface .rd-eyebrow, .rd-card--dark .rd-eyebrow { color: var(--rd-mint); }
.rd-em { font-style: italic; color: var(--rd-terracotta); }
.rd-stat, .rd-num {
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif) !important;
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1;
}
.rd-lede { font-size: 1.15rem; line-height: 1.7; color: var(--rd-body); }

/* ---------- Buttons ---------------------------------------- */
.rd-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.85rem 1.75rem; border-radius: 100px;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.95rem; font-weight: 600; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.rd-btn:hover { transform: translateY(-2px); }
.rd-btn--primary { background: var(--rd-teal); color: #fff; }
.rd-btn--primary:hover { background: #155755; color: #fff; box-shadow: 0 12px 28px -8px rgba(13,58,56,0.45); }
.rd-btn--light { background: #fff; color: var(--rd-teal); }
.rd-btn--light:hover { color: var(--rd-teal); box-shadow: 0 12px 28px -8px rgba(0,0,0,0.28); }
.rd-btn--ghost { background: transparent; color: var(--rd-teal); border: 1.5px solid rgba(13,58,56,0.25); }
.rd-btn--ghost:hover { border-color: var(--rd-teal); }
.rd-btn--ghost-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.35); }
.rd-btn--ghost-light:hover { border-color: #fff; color: #fff; }

/* ---------- Fused tile grids -------------------------------- */
/* gap:1px + divider-colored container = hairline-fused tiles */
.rd-fused {
  display: grid; gap: 1px;
  background: rgba(13,58,56,0.10);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 18px 48px -24px rgba(13,58,56,0.28);
}
.rd-fused--2 { grid-template-columns: repeat(2, 1fr); }
.rd-fused--3 { grid-template-columns: repeat(3, 1fr); }
.rd-fused--4 { grid-template-columns: repeat(4, 1fr); }
.rd-tile {
  background: #fff; border-radius: 0; border: 0; box-shadow: none;
  padding: 2.25rem 2rem;
  transition: background 0.2s, box-shadow 0.2s;
}
.rd-tile:hover { background: #FBF8F5; box-shadow: inset 3px 0 0 var(--rd-accent); }
.rd-tile-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-top: 1rem; color: var(--rd-accent); font-weight: 600; font-size: 0.9rem;
}

/* ============================================================
   Design-system keyframes (verbatim from the prototype helmet).
   The page markup references these by name in inline `animation:` rules,
   so ALL of them must exist here — a missing one fails silently and the
   element just sits static. Full set: orbA orbB orbC ringP dotP xRot
   sonarIn breathe ambF.
   ============================================================ */
@keyframes orbA { 0%,100%{ transform:translate(0,0) scale(1); } 50%{ transform:translate(26px,-22px) scale(1.08); } }
@keyframes orbB { 0%,100%{ transform:translate(0,0) scale(1); } 50%{ transform:translate(-22px,18px) scale(1.06); } }
@keyframes orbC { 0%,100%{ transform:translate(0,0) scale(1); } 50%{ transform:translate(18px,20px) scale(1.1); } }
@keyframes ringP { 0%,100%{ transform:translate(-50%,-50%) scale(1); opacity:1; } 50%{ transform:translate(-50%,-50%) scale(1.05); opacity:.5; } }
@keyframes dotP { 0%,100%{ opacity:.4; transform:scale(1); } 50%{ opacity:.1; transform:scale(1.6); } }
@keyframes xRot { from{ transform:rotate(0); } to{ transform:rotate(360deg); } }
@keyframes sonarIn { 0%{ opacity:.3; transform:translate(-50%,-50%) scale(1); } 100%{ opacity:0; transform:translate(-50%,-50%) scale(.2); } }
@keyframes breathe {
  0%,100%{ box-shadow:0 4px 24px rgba(13,58,56,.1), 0 0 0 10px rgba(200,234,228,.15), 0 0 0 24px rgba(200,234,228,.08); }
  50%    { box-shadow:0 4px 30px rgba(13,58,56,.14), 0 0 0 12px rgba(35,177,166,.12), 0 0 0 28px rgba(200,234,228,.1); }
}
@keyframes ambF { 0%,100%{ transform:translate(0,0) scale(1); } 50%{ transform:translate(24px,-18px) scale(1.09); } }
/* drives the platform flywheel's dashed ring (44s) and its orbiting node (9s) */
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Platform flywheel ------------------------------- */
/* Sonar pulse from the hub, carried over verbatim from the pre-redesign
   platform page (@keyframes fwSonar / .plat-fw-sonar). The redesign prototype
   dropped it; two rings offset by half the cycle read as a steady outward ping. */
@keyframes fwSonar {
  0%   { transform: scale(0.55); opacity: 0.9; }
  100% { transform: scale(1.9);  opacity: 0; }
}
.rd-fw-sonar {
  position: absolute; inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(35,177,166,0.5);
  animation: fwSonar 4s ease-out infinite;
  pointer-events: none;
}
.rd-fw-sonar--2 { animation-delay: 2s; }

/* Orbit stations. The anchor points are all exactly on the ring (r=164), but
   the prototype centred the WHOLE column — icon + label — on that point. The
   labels differ in line count, so the three two-line ones ("Outcome
   Measurement", "Reporting & Insights", "Process Refinement") pushed their
   icons off the orbit. Anchor the ICON instead and let the label hang below,
   out of flow, where its height can't shift anything. */
.rd-fw-node {
  position: absolute;
  width: 32px; height: 32px;
  transform: translate(-50%, -50%);
}
.rd-fw-node-label {
  position: absolute;
  top: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  width: 88px;
  text-align: center;
  display: block;
}
@media (prefers-reduced-motion: reduce) {
  .rd-fw-sonar { animation: none; opacity: 0.25; }
}

/* respect reduced-motion for the purely decorative animation */
@media (prefers-reduced-motion: reduce) {
  .rd-r-stage *, .rd-r-orbs *, .rd-orb, .rd-ring, .rd-dot { animation: none !important; }
}

/* ============================================================
   Hover easing.
   The design carries hover states as style-hover="..." attributes (a prototype-
   runtime convention that does nothing in a real browser).
   scripts/hoverify-redesign.py converts each into a real .rd-h-<hash>:hover
   rule; this is the transition that makes those changes ease rather than snap.
   ============================================================ */
[class*="rd-h-"] {
  transition:
    background 0.22s ease,
    background-color 0.22s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.28s ease,
    opacity 0.2s ease,
    gap 0.2s ease,
    transform 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}
@media (prefers-reduced-motion: reduce) {
  [class*="rd-h-"] { transition: none !important; }
}

/* ---------- Hero orbs (defined, not blurred blobs) ---------- */
.rd-hero { position: relative; overflow: hidden; }
.rd-orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.rd-orb { position: absolute; border-radius: 50%; }
.rd-orb--mint  { background: radial-gradient(circle at 38% 38%, rgba(200,234,228,0.95) 0%, rgba(200,234,228,0.4) 55%, transparent 100%); }
.rd-orb--blush { background: radial-gradient(circle at 38% 38%, rgba(232,196,184,0.95) 0%, rgba(232,196,184,0.4) 55%, transparent 100%); }
.rd-orb--teal  { background: radial-gradient(circle at 38% 38%, rgba(35,177,166,0.55) 0%, rgba(35,177,166,0.2) 55%, transparent 100%); }
.rd-ring { position: absolute; border-radius: 50%; border: 1.5px solid rgba(13,58,56,0.12); }
.rd-dot  { position: absolute; border-radius: 50%; background: rgba(13,58,56,0.25); }
@keyframes rd-orbA { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(26px,-22px) scale(1.08);} }
@keyframes rd-orbB { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(-22px,18px) scale(1.06);} }
@keyframes rd-orbC { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(18px,20px) scale(1.1);} }
.rd-orb--a { animation: rd-orbA 18s ease-in-out infinite; }
.rd-orb--b { animation: rd-orbB 22s ease-in-out infinite; }
.rd-orb--c { animation: rd-orbC 20s ease-in-out infinite; }

/* ============================================================
   FAQ accordion (details.rd-faq)
   The design ships native <details>/<summary> with a "+" drawn as two SVG
   lines. This adds: a subtle hover highlight, a + that rotates into a −
   when open, and a nudge of the icon chip. The smooth height/padding
   expand is driven by ouma-marketing.js (native <details> can't animate).
   ============================================================ */
.rd-faq summary { list-style: none; outline: none; }
.rd-faq summary::-webkit-details-marker { display: none; }
.rd-faq summary::marker { content: ''; }

/* subtle highlight on hover + keyboard focus */
.rd-faq summary {
  transition: background 0.2s ease;
  border-radius: 12px;
}
.rd-faq summary:hover { background: rgba(200,234,228,0.22); }
.rd-faq summary:focus-visible {
  background: rgba(200,234,228,0.28);
  box-shadow: inset 0 0 0 2px rgba(35,177,166,0.55);
}
.rd-faq[open] summary h3 { color: var(--rd-teal); }

/* the icon chip: gentle emphasis on hover, filled once open */
.rd-faq summary span {
  transition: background 0.22s ease, transform 0.25s cubic-bezier(0.23,1,0.32,1);
}
.rd-faq summary:hover span { transform: scale(1.07); }
.rd-faq[open] summary span { background: var(--rd-accent) !important; }
.rd-faq[open] summary span svg { stroke: #fff !important; }

/* + -> −  : rotate the vertical stroke onto the horizontal one */
.rd-faq summary svg line {
  transition: transform 0.28s cubic-bezier(0.23,1,0.32,1), opacity 0.2s ease;
  transform-origin: 12px 12px;
}
.rd-faq[open] summary svg line:first-child { transform: rotate(90deg); }

/* answer panel: JS animates height/padding; keep it tidy mid-flight */
.rd-faq > summary + * { will-change: height; }

@media (prefers-reduced-motion: reduce) {
  .rd-faq summary, .rd-faq summary span, .rd-faq summary svg line { transition: none !important; }
}

/* ---------- Footnotes (seated at the end of a content block) -- */
.rd-footnotes {
  margin-top: 2.25rem; padding-top: 1.15rem;
  border-top: 1px solid rgba(13,58,56,0.12);
  list-style: none; counter-reset: rdfn;
  /* When the citing block is itself a grid (e.g. the ultrasound hero's
     stat-and-list card), an appended list becomes just another track item and
     gets squeezed into column 1 while the rest of the row sits empty.
     Footnotes belong under the whole block. Ignored by non-grid containers —
     and deliberately NOT flex-basis, which would set HEIGHT in the
     flex-column panels these also live in. */
  grid-column: 1 / -1;
}
.rd-footnotes li {
  position: relative; padding-left: 1.5rem; margin-bottom: 0.5rem;
  font-size: 0.8rem; line-height: 1.55; color: var(--rd-muted);
}
.rd-footnotes li::before {
  content: attr(data-n); position: absolute; left: 0; top: 0.1em;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.68rem; font-weight: 700; color: var(--rd-accent);
}
.rd-dark-surface .rd-footnotes, .rd-card--dark .rd-footnotes { border-top-color: rgba(255,255,255,0.18); }
.rd-dark-surface .rd-footnotes li, .rd-card--dark .rd-footnotes li { color: rgba(255,255,255,0.55); }
/* explicit modifier for blocks whose dark background isn't an .rd-* ancestor
   (several prototype sections paint the dark ground with an inline style) */
.rd-footnotes--dark { border-top-color: rgba(255,255,255,0.18); }
.rd-footnotes--dark li { color: rgba(255,255,255,0.55); }
.rd-footnotes--dark li::before { color: #C8EAE4; }
.rd-footnotes a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.rd-footnotes--dark a { color: rgba(255,255,255,0.75); }
.rd-fnref { font-size: 0.62em; font-weight: 600; color: var(--rd-accent); vertical-align: super; line-height: 0; }
.rd-footnotes--dark ~ * .rd-fnref, .rd-dark-surface .rd-fnref { color: #C8EAE4; }

/* ---------- Convergence capstone ---------------------------- */
/* Nurse Navigation's thesis line sat under the three "why it matters" columns
   as a bare centred <p> — floating, and doing nothing with the fact that it is
   literally the sentence about the three threads being held together.
   So: draw that. Three hairlines rise from the columns above, merge into one,
   and land on a dot that the statement hangs from. Built only from the site's
   existing vocabulary — teal hairline, mint dot, Lora display, terracotta
   italic emphasis — so it reads as part of the system, not a new idea. */
.rd-converge {
  /* full container width so the stems can line up with the columns above;
     the sentence itself is constrained separately */
  position: relative;
  margin: 3.25rem auto 0;
  padding-top: 4.5rem;
  text-align: center;
  /* must match the grid above: 3 equal columns with this gap */
  --rd-cv-gap: 2rem;
  --rd-cv-col: calc((100% - 2 * var(--rd-cv-gap)) / 6);  /* half a column */
}
.rd-converge-thread {
  position: absolute; inset: 0 0 auto;
  height: 4.5rem;
  pointer-events: none;
}
/* The three stems sit on the CENTRE of each column above. Not 16.6%/50%/83.3%
   — that's only true for a gapless grid. With a gap the outer centres pull in,
   so derive them from the same track maths the grid uses. */
.rd-converge-stem {
  position: absolute; top: 0;
  width: 1px; height: 2.1rem;
  background: linear-gradient(to bottom, rgba(35,177,166,0) 0%, rgba(35,177,166,0.55) 100%);
}
/* The bar they merge into, spanning outer stem to outer stem. Solid: it runs
   between two fixed endpoints, so fading its ends just made it look unfinished.
   The stems and the drop keep their gradients — those fade INTO the join, which
   is what sells the threads converging. */
.rd-converge-bar {
  position: absolute; top: 2.1rem;
  left: var(--rd-cv-col);
  right: var(--rd-cv-col);
  height: 1px;
  background: rgba(35,177,166,0.55);
}
/* single thread down to the dot */
.rd-converge-drop {
  position: absolute; top: 2.1rem; left: 50%;
  width: 1px; height: 1.55rem;
  background: linear-gradient(to bottom, rgba(35,177,166,0.55), rgba(35,177,166,0.85));
  transform: translateX(-50%);
}
.rd-converge-dot {
  position: absolute; top: calc(3.65rem - 4px);
  /* Centred with margin, NOT translateX(-50%): the pulse below animates the
     halo only, but any transform-based keyframe would replace the centring
     transform and shove the dot half its width off-axis. */
  left: 50%; margin-left: -4.5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rd-accent, #23B1A6);
  box-shadow: 0 0 0 5px rgba(35,177,166,0.14), 0 0 14px 2px rgba(35,177,166,0.45);
}
/* halo-only pulse — deliberately touches neither transform nor the dot's own
   opacity, so it can't fight the layout */
@keyframes rdConvergePulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(35,177,166,0.14), 0 0 14px 2px rgba(35,177,166,0.45); }
  50%      { box-shadow: 0 0 0 9px rgba(35,177,166,0.05), 0 0 20px 4px rgba(35,177,166,0.62); }
}
.rd-converge p {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--rd-ink, #0D3A38);
  margin: 0 auto;
  max-width: 26em;
  text-wrap: pretty;
}
.rd-converge em {
  font-style: italic;
  color: var(--rd-terracotta, #C4836A);
}

/* The stems sit under three columns. Below the 3-up breakpoint there are no
   three columns to rise from — so drop the stems and the bar and keep just the
   single thread and its dot. (Same trap as the RPM seam icons: a decoration
   pinned to column thirds is a lie the moment the grid reflows.) */
@media (max-width: 1024px) {
  .rd-converge-stem, .rd-converge-bar { display: none; }
  .rd-converge-drop { top: 1.4rem; height: 2.2rem; }
  .rd-converge-dot { top: calc(3.6rem - 4px); }
}
@media (max-width: 600px) {
  .rd-converge { padding-top: 3.5rem; margin-top: 2.25rem; }
  .rd-converge-thread { height: 3.5rem; }
  .rd-converge-drop { top: 0.9rem; height: 1.8rem; }
  .rd-converge-dot { top: calc(2.7rem - 4px); }
  .rd-converge p { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .rd-converge-dot { animation: rdConvergePulse 4.5s ease-in-out infinite; }
}

/* ---------- Article prose (blog / news post bodies) ----------- */
/* The redesign prototype styled every article element inline. Post bodies
   come out of Firestore as plain markdown-converted HTML with no styling
   hooks at all, so the look has to live here, applied by ancestor. Values
   are transcribed from the prototype's inline article styles. */
.rd-prose {
  font-size: 1.075rem;
  line-height: 1.85;
  color: #33514E;
}
.rd-prose > * + * { margin-top: 1.35rem; }

/* Lead paragraph: the prototype gives the opening graf its own weight. */
.rd-prose > p:first-child {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--rd-ink, #0D3A38);
}

.rd-prose h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--rd-ink, #0D3A38);
  line-height: 1.2;
  margin-top: 2.85rem;
}
.rd-prose h3 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--rd-ink, #0D3A38);
  line-height: 1.35;
  margin-top: 1.85rem;
}
.rd-prose h2 + p, .rd-prose h3 + p { margin-top: 0.9rem; }

.rd-prose a {
  color: var(--rd-accent, #23B1A6);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}
.rd-prose a:hover { color: #0D3A38; text-decoration: underline; }

.rd-prose strong { color: var(--rd-ink, #0D3A38); font-weight: 700; }
.rd-prose em { font-style: italic; }

/* Bulleted lists: prototype uses a custom teal marker, not a disc. */
.rd-prose ul { list-style: none; padding: 0.25rem 0; }
.rd-prose ul li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.75rem;
  line-height: 1.75;
}
.rd-prose ul li::before {
  content: '';
  position: absolute;
  left: 0.15rem; top: 0.72em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rd-accent, #23B1A6);
}
.rd-prose ol { padding-left: 1.35rem; }
.rd-prose ol li { margin-bottom: 0.75rem; line-height: 1.75; padding-left: 0.35rem; }
.rd-prose li > ul, .rd-prose li > ol { margin-top: 0.6rem; }

.rd-prose blockquote {
  margin: 2.25rem 0;
  padding: 1.85rem 2rem;
  border-radius: 20px;
  border-left: 4px solid var(--rd-accent, #23B1A6);
  background: radial-gradient(ellipse 70% 60% at 88% 0%, rgba(200,234,228,0.5) 0%, transparent 60%), #F5EDE8;
}
.rd-prose blockquote p {
  margin: 0;
  font-family: 'Lora', Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--rd-ink, #0D3A38);
}

.rd-prose img { max-width: 100%; height: auto; border-radius: 16px; }
.rd-prose hr { border: 0; border-top: 1px solid rgba(13,58,56,0.1); margin: 2.75rem 0; }

.rd-prose table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.rd-prose th, .rd-prose td {
  text-align: left; padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(13,58,56,0.1);
}
.rd-prose th { font-weight: 700; color: var(--rd-ink, #0D3A38); background: #FBF8F5; }

/* A post body may carry its own FAQPage JSON-LD — never render it. */
.rd-prose script { display: none; }

@media (max-width: 600px) {
  .rd-prose { font-size: 1rem; }
  .rd-prose > p:first-child { font-size: 1.08rem; }
  .rd-prose h2 { font-size: 1.45rem; margin-top: 2.25rem; }
  .rd-prose h3 { font-size: 1.12rem; }
  .rd-prose blockquote { padding: 1.5rem 1.35rem; }
  .rd-prose blockquote p { font-size: 1.05rem; }
}

/* ---------- Closing card: CTA + footer on one dark card ------ */
/* Identical on every page. Hangs -150px into the terminal ground. */
.rd-close {
  position: relative; z-index: 4;
  max-width: 1300px; width: calc(100% - 2.5rem);
  margin: 7rem auto calc(var(--rd-overhang) * -1);
  border-radius: var(--rd-card-radius);
  overflow: hidden;
  box-shadow: var(--rd-shadow);
  color: #fff;
  background:
    radial-gradient(ellipse 80% 45% at 20% 30%, rgba(200,234,228,0.4) 0%, transparent 60%),
    radial-gradient(ellipse 70% 40% at 84% 8%,  rgba(232,196,184,0.3) 0%, transparent 55%),
    linear-gradient(160deg, #0D3A38 0%, #134847 30%, #1a5c58 52%, #0D3A38 100%);
}
/* CTA half */
.rd-close-cta { position: relative; text-align: center; padding: 5.5rem 3rem 4.5rem; }
.rd-close-glow {
  position: absolute; top: 6%; left: 50%; transform: translateX(-50%);
  width: 620px; max-width: 90%; height: 300px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(35,177,166,0.28) 0%, transparent 70%);
  filter: blur(20px);
}
.rd-close-cta > .rd-close-cta-inner { position: relative; }
.rd-close-eyebrow {
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.18em; color: rgba(200,234,228,0.85); margin: 0 0 1.125rem;
}
.rd-close-cta h2 {
  font-size: 3.2rem; font-weight: 500; color: #fff;
  line-height: 1.12; margin: 0 auto; max-width: 22ch;
}
.rd-close-cta h2 em { font-style: italic; color: var(--rd-mint); }
.rd-close-sub {
  font-size: 1.15rem; line-height: 1.7; color: rgba(255,255,255,0.62);
  max-width: 30em; margin: 1.375rem auto 0;
}
.rd-close-btns { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2.375rem; flex-wrap: wrap; }

/* Footer half */
.rd-foot { padding: 0 3.5rem 2.75rem; }
.rd-foot-grid {
  display: grid; grid-template-columns: 1.55fr 1fr 1.1fr 1.15fr; gap: 2.5rem;
  padding: 3rem 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.rd-foot--flat .rd-foot-grid { border-top: none; }
.rd-foot-logo { height: 32px; width: auto; }
.rd-foot-blurb { font-size: 0.9rem; line-height: 1.7; color: rgba(255,255,255,0.5); margin-top: 1rem; max-width: 280px; }
.rd-foot h4 {
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: rgba(255,255,255,0.4); margin-bottom: 1.25rem;
}
.rd-foot ul { list-style: none; margin: 0; padding: 0; }
.rd-foot li { margin-bottom: 0.75rem; }
.rd-foot li a { font-size: 0.9rem; color: rgba(255,255,255,0.7); transition: color 0.2s; }
.rd-foot li a:hover { color: #fff; }
.rd-foot-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 1.75rem; font-size: 0.82rem; color: rgba(255,255,255,0.45); flex-wrap: wrap;
}
.rd-foot-bottom a { color: rgba(255,255,255,0.45); }
.rd-foot-bottom a:hover { color: #fff; }

@media (max-width: 960px) {
  .rd-close-cta h2 { font-size: 2.35rem; }
  .rd-foot-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 760px) {
  .rd-close { width: calc(100% - 1.5rem); margin-top: 4rem; }
  .rd-close-cta { padding: 3.5rem 1.5rem 3rem; }
  .rd-close-cta h2 { font-size: 1.95rem; }
  .rd-close-btns { flex-direction: column; align-items: stretch; }
  .rd-close-btns .rd-btn { justify-content: center; }
  .rd-foot { padding: 0 1.5rem 2rem; }
  .rd-foot-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Responsive overrides for design-authored inline styles
   The redesign prototypes are styled with inline style="..." attributes,
   which outrank stylesheets — so breakpoints can't touch them without a
   class hook + !important. scripts/responsify-redesign.py adds the hooks:
     .rd-r-g2/.rd-r-g3/.rd-r-g4  multi-column grids (by track count)
     .rd-r-d1/.rd-r-d2/.rd-r-d3  display type (>=3.2 / >=2.6 / >=2.0 rem)
     .rd-r-orbs                  hero orb cluster (absolute, bleeds off right)
     .rd-r-card                  cards using the -150px overhang
     .rd-r-pad                   wide containers with 2rem side padding
   Keep !important here — it is load-bearing against the inline styles.
   ============================================================ */

/* Never let a bleeding orb or wide card cause sideways scroll.
   MUST be `clip`, not `hidden`: `overflow-x: hidden` forces overflow-y to
   compute to `auto`, which turns the page into a scroll container and silently
   breaks `position: sticky` on the nav (it stops following the scroll).
   `clip` does the same clipping without establishing a scroll container, so
   the sticky nav survives. Do not "simplify" this back to hidden. */
html, body { overflow-x: clip; }
img, svg { max-width: 100%; }

/* tablet: thin the widest grids first */
@media (max-width: 1024px) {
  .rd-r-g4 { grid-template-columns: repeat(2, 1fr) !important; }
  .rd-r-g3 { grid-template-columns: repeat(2, 1fr) !important; }

  /* Decorative chain icons pinned at left:33.333%/66.666% to sit on the seams
     BETWEEN three across (RPM's device ecosystem). The moment the grid isn't
     3-up, those percentages stop landing on seams and the icons float over the
     middle card. They only mean anything in the 3-column layout. */
  .rd-r-seamicon { display: none !important; }
}

/* phone / small tablet: single column, smaller display type, tamed decoration */
@media (max-width: 860px) {
  .rd-r-g2, .rd-r-g3, .rd-r-g4 { grid-template-columns: 1fr !important; }
  .rd-r-grid { gap: 1.25rem !important; }

  .rd-r-d1 { font-size: clamp(2.05rem, 8.2vw, 2.9rem) !important; line-height: 1.14 !important; }
  .rd-r-d2 { font-size: clamp(1.85rem, 7vw, 2.45rem) !important; line-height: 1.16 !important; }
  .rd-r-d3 { font-size: clamp(1.55rem, 6vw, 2.05rem) !important; line-height: 1.2 !important; }

  /* keep the orb art as texture, scaled back so it never fights the headline */
  .rd-r-orbs {
    transform: scale(0.62); transform-origin: top right;
    right: -34vw !important; opacity: 0.65 !important;
  }

  /* cards: fit the viewport, keep the overhang proportional */
  .rd-r-card {
    width: calc(100% - 1.5rem) !important;
    margin-left: auto !important; margin-right: auto !important;
    border-radius: 22px !important;
  }

  /* Two columns separated by a vertical rule (Employers' "End-to-End
     Coverage"). Once the grid collapses to one column that rule is no longer
     between anything — it just indents the second column and draws a stray
     line down its left edge. Drop the gutter padding and the rule; give the
     lower column a horizontal divider instead, which is what a stacked
     layout actually wants. */
  .rd-r-splitrule > * {
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-left: 0 !important;
  }
  .rd-r-splitrule > * + * {
    margin-top: 2.5rem;
    padding-top: 2.5rem !important;
    border-top: 1px solid rgba(13,58,56,0.12);
  }
}

@media (max-width: 640px) {
  .rd-r-pad { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
  /* button rows stack cleanly */
  .rd-r-card .rd-btn, .rd-close-btns .rd-btn { width: 100%; justify-content: center; }
}

/* Fixed-size diagram stages (e.g. the care-team constellation).
   Children are pinned at absolute px coords inside a fixed WxH canvas, so the
   box shrinking does nothing — the pins spill off-screen. `zoom` scales the
   whole stage AND reflows layout, so it stays centred with no leftover gap
   (transform:scale would leave a hole and break the auto margins). */
@media (max-width: 900px) { .rd-r-stage { zoom: 0.82; } }
@media (max-width: 760px) { .rd-r-stage { zoom: 0.66; } }
@media (max-width: 560px) { .rd-r-stage { zoom: 0.52; } }
@media (max-width: 420px) { .rd-r-stage { zoom: 0.42; } }

/* Fallback for engines without standard `zoom`: scale from the top and reclaim
   the leftover height so following sections don't get pushed down. */
@supports not (zoom: 1) {
  @media (max-width: 760px) {
    .rd-r-stage {
      transform: scale(0.66); transform-origin: top center;
      margin-bottom: -211px !important; /* 620px * (1 - 0.66) */
    }
  }
  @media (max-width: 560px) {
    .rd-r-stage {
      transform: scale(0.52);
      margin-bottom: -298px !important; /* 620px * (1 - 0.52) */
    }
  }
}

/* ---------- Responsive -------------------------------------- */
@media (max-width: 1024px) {
  .rd-fused--4 { grid-template-columns: repeat(2, 1fr); }
  .rd-fused--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  :root { --rd-overhang: 90px; --rd-card-radius: 22px; }
  .rd-card { width: calc(100% - 1.5rem); margin-top: 3.5rem; }
  .rd-inner { padding: 0 1.5rem; }
  .rd-fused--2, .rd-fused--3, .rd-fused--4 { grid-template-columns: 1fr; }
  .rd-tile { padding: 1.75rem 1.5rem; }
}
