/*
 * Patrium marketing site — shared styles for every page.
 * Firebase serves css/js with `immutable` caching (see firebase.json), so never edit a
 * published version in place: copy it to the next version (site.v4.css …) and repoint the pages.
 * v3: homepage platform story (five-stage hero stepper, team handoff, care planning,
 * quality review, who uses Patrium).
 */

@font-face {
  font-family: "Uncut Sans";
  src: url("../cdn.prod.website-files.com/64ba60db4ea0e4d87b3945fb/64ba60de4ea0e4d87b394bc2_UncutSans-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Redaction";
  src: url("../cdn.prod.website-files.com/64ba60db4ea0e4d87b3945fb/64ba60de4ea0e4d87b394bbf_Redaction.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Redaction";
  src: url("../cdn.prod.website-files.com/64ba60db4ea0e4d87b3945fb/64ba60de4ea0e4d87b394bc1_RedactionItalic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Brand */
  --navy-900: #0b1c36;
  --navy-800: #0f2340;
  --navy-700: #1e375c; /* logo wordmark */
  --teal-500: #00bfd3;
  --teal-400: #6dcad6; /* logo mark */
  --teal-100: #d7f3f6;
  --teal-50: #ecfafb;
  --mint-100: #dcf6ec;
  --lavender-100: #e9e6fb;
  --sand-100: #f8ecd6;

  /* Surfaces & text */
  --bg: #f8faf9;
  --surface: #ffffff;
  --surface-2: #f1f5f4;
  --line: #e2e8e7;
  --ink: #0f2340;
  --ink-2: #3a4a5c;
  --muted: #5b6878;
  --on-dark: #eef4f7;
  --on-dark-muted: #9fb0c3;

  --ok: #1d7a5a;
  --ok-bg: #dcf6ec;
  --warn: #8a5a12;
  --warn-bg: #fbeed3;

  /* Type */
  --font-sans: "Uncut Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Redaction", Georgia, "Times New Roman", serif;

  /* Layout */
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgb(15 35 64 / 0.06), 0 12px 32px -12px rgb(15 35 64 / 0.18);

  interpolate-size: allow-keywords;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  font-size-adjust: from-font;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h1 em,
h2 em,
h3 em {
  font-style: italic;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(64px, 9vw, 120px);
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-700);
}

.section-head {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  display: grid;
  gap: 16px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
}

.section-head p {
  color: var(--muted);
  font-size: 18px;
}

.visually-hidden {
  position: absolute !important;
  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: 16px;
  top: -100px;
  z-index: 100;
  background: var(--navy-800);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 550;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, translate 0.2s;
}

.btn:hover {
  translate: 0 -1px;
}

.btn-primary {
  background: var(--navy-800);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-700);
}

.btn-soft {
  background: var(--teal-100);
  color: var(--navy-800);
}

.btn-soft:hover {
  background: #c4edf2;
}

.btn-ghost {
  background: transparent;
  color: var(--navy-800);
  border-color: rgb(15 35 64 / 0.2);
}

.btn-ghost:hover {
  background: var(--surface);
}

.btn-on-dark {
  background: var(--teal-100);
  color: var(--navy-900);
}

.btn-on-dark:hover {
  background: #fff;
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 550;
  color: var(--navy-800);
  text-decoration: none;
}

.link-arrow::after {
  content: "→";
  transition: translate 0.2s;
}

.link-arrow:hover::after {
  translate: 3px 0;
}

/* ---------- Announcement bar ---------- */

.announce {
  background: var(--teal-100);
  color: var(--navy-800);
  font-size: 14px;
  text-align: center;
  padding: 9px var(--gutter);
}

.announce a {
  font-weight: 600;
  text-underline-offset: 3px;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(248 250 249 / 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.nav-logo {
  display: inline-flex;
  flex: none;
}

.nav-logo img {
  width: 132px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-login {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 12px;
}

.nav-login:hover {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.mobile-menu {
  display: none;
}

@media (max-width: 900px) {
  .nav {
    justify-content: space-between;
  }

  .nav-links,
  .nav-login {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .mobile-menu {
    border-top: 1px solid var(--line);
    padding: 12px var(--gutter) 24px;
    background: var(--bg);
  }

  .mobile-menu:not([hidden]) {
    display: block;
  }

  .mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
  }

  .mobile-menu li a {
    display: block;
    padding: 14px 4px;
    font-size: 18px;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
  }

  .mobile-menu .mobile-menu-actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
  }
}

@media (max-width: 420px) {
  .nav-actions .btn {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(48px, 6vw, 72px);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  max-width: 19ch;
  margin-inline: auto;
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 40rem;
  font-size: clamp(18px, 2vw, 21px);
  color: var(--ink-2);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.hero-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

/* Product stage: blurred home-visit photo behind a live-looking UI mock */
.stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: clamp(40px, 6vw, 64px);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 5vw, 64px) clamp(12px, 4vw, 48px) clamp(20px, 4vw, 40px);
  text-align: left;
  background: linear-gradient(135deg, var(--teal-50), var(--lavender-100));
}

.stage-bg {
  position: absolute;
  inset: -40px;
  z-index: -1;
  width: calc(100% + 80px);
  max-width: none;
  height: calc(100% + 80px);
  object-fit: cover;
  filter: blur(14px) saturate(1.05);
  opacity: 0.9;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(248 250 249 / 0.15), rgb(15 35 64 / 0.18));
}

/* Five-stage workflow stepper (ARIA tabs). A rail runs behind the stage numbers and fills up
   to the selected stage; stages before it read as done. */
.stage-tabs {
  --tab-n: 28px;
  --pad-x: 6px;
  --k: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 940px;
  margin: 0 auto 22px;
  padding: 14px var(--pad-x) 12px;
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 2px rgb(15 35 64 / 0.08);
}

.stage-tabs::before,
.stage-tabs::after {
  content: "";
  position: absolute;
  top: calc(14px + var(--tab-n) / 2 - 1px);
  left: calc(var(--pad-x) + (100% - 2 * var(--pad-x)) / 10);
  height: 2px;
  border-radius: 2px;
}

.stage-tabs::before {
  right: calc(var(--pad-x) + (100% - 2 * var(--pad-x)) / 10);
  background: #cfdadd;
}

.stage-tabs::after {
  width: calc((100% - 2 * var(--pad-x)) / 5 * var(--k));
  background: var(--teal-500);
  transition: width 0.3s ease;
}

.stage-tabs:has(> :nth-child(2)[aria-selected="true"]) {
  --k: 1;
}

.stage-tabs:has(> :nth-child(3)[aria-selected="true"]) {
  --k: 2;
}

.stage-tabs:has(> :nth-child(4)[aria-selected="true"]) {
  --k: 3;
}

.stage-tabs:has(> :nth-child(5)[aria-selected="true"]) {
  --k: 4;
}

.stage-tab {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14.5px;
  font-weight: 550;
  line-height: 1.25;
  padding: 0 6px 2px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  text-align: center;
  text-wrap: balance;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s;
}

.tab-n {
  width: var(--tab-n);
  height: var(--tab-n);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 2px solid #c6d3d6;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.stage-tab:hover {
  color: var(--ink);
}

.stage-tab:hover .tab-n {
  border-color: var(--navy-700);
}

.stage-tab[aria-selected="true"] {
  color: var(--ink);
}

.stage-tab:has(~ .stage-tab[aria-selected="true"]) .tab-n {
  background: var(--teal-100);
  border-color: var(--teal-500);
  color: var(--navy-800);
}

.stage-tab[aria-selected="true"] .tab-n {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
  box-shadow: 0 0 0 4px rgb(0 191 211 / 0.22);
}

/* Short stage names on phones, where five full names do not fit */
.tab-short {
  display: none;
}

@media (max-width: 600px) {
  .stage-tab {
    font-size: 13px;
    padding-inline: 2px;
  }

  .tab-full {
    display: none;
  }

  .tab-short {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-tabs::after {
    transition: none;
  }
}

.stage-panels {
  max-width: 780px;
  margin-inline: auto;
}

.mock {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: 0 30px 60px -24px rgb(15 35 64 / 0.4), 0 2px 6px rgb(15 35 64 / 0.08);
  overflow: hidden;
}

.mock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.mock-title {
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-title small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}

.mock-body {
  padding: 20px;
  display: grid;
  gap: 16px;
  font-size: 15px;
}

.mock-sample {
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pill-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.pill-warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.pill-info {
  background: var(--teal-100);
  color: var(--navy-800);
}

.pill-rec {
  background: #fde6e6;
  color: #a12b2b;
}

.pill-rec::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
  --animation-reduced: none;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 560px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}

.field {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.code {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-right: 6px;
}

/* Thin strips, centred; on narrow screens the outer strips are clipped. min-width: 0 stops
   the strips' total width from stretching the mock's grid column on phones. */
.wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
  min-width: 0;
  overflow: clip;
}

.wave span {
  flex: 0 0 3px;
  border-radius: 2px;
  background: var(--teal-400);
  height: var(--h, 40%);
  animation: wave 1.2s ease-in-out infinite alternate;
  animation-delay: var(--d, 0s);
  --animation-reduced: none;
}

@keyframes wave {
  to {
    scale: 1 0.45;
  }
}

.note-section h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-700);
}

.note-section p {
  color: var(--ink-2);
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.checklist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.checklist li:last-child {
  border-bottom: 0;
}

.mock-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* ---------- Proof strip ---------- */

.proof {
  padding-block: 8px clamp(56px, 7vw, 88px);
}

.proof-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 12px;
}

.proof-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.proof-card strong {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 2.9rem);
  line-height: 1;
  color: var(--navy-800);
}

.proof-card span {
  color: var(--muted);
  font-size: 15px;
}

.proof-card.chap {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
}

.proof-card.chap img {
  width: 76px;
}

.proof-card.chap p {
  font-size: 15px;
  color: var(--ink-2);
}

.proof-card.chap b {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.proof-footnote {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 960px) {
  .proof-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-card.chap {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .proof-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Statement ---------- */

.statement {
  text-align: center;
  padding-block: clamp(40px, 6vw, 72px) clamp(64px, 8vw, 104px);
}

.statement blockquote {
  margin: 0 auto;
  max-width: 22ch;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.15;
  text-wrap: balance;
}

.statement p {
  margin-top: 18px;
  color: var(--muted);
}

/* ---------- Feature bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.card-visual {
  position: relative;
  height: 340px;
  padding: 28px;
  display: grid;
  place-items: center;
}

.card-visual.tint-teal {
  background: linear-gradient(160deg, var(--teal-50), var(--teal-100));
}

.card-visual.tint-mint {
  background: linear-gradient(160deg, #f0fbf6, var(--mint-100));
}

.card-visual.tint-lavender {
  background: linear-gradient(160deg, #f5f3fe, var(--lavender-100));
}

.card-visual.photo {
  padding: 0;
}

.card-visual.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}

.card-copy {
  padding: 28px 32px 32px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.card-copy h3 {
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
}

.card-copy p {
  color: var(--ink-2);
}

.card-copy .link-arrow {
  margin-top: 6px;
}

.mini {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 18px;
  display: grid;
  gap: 12px;
  font-size: 14.5px;
}

.mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
}

.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface-2);
}

.mini-row span:first-child {
  min-width: 0;
}

.doc-stack {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed #c6d3d6;
  border-radius: 10px;
  color: var(--muted);
}

.doc-stack svg {
  width: 22px;
  height: 22px;
  color: var(--navy-700);
  flex: none;
}

.check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: none;
  font-size: 12px;
  font-weight: 700;
}

.check.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.check.todo {
  background: var(--surface);
  border: 1.5px solid #b9c6cc;
}

.check.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.mini-row .label {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 860px) {
  .bento {
    grid-template-columns: 1fr;
  }

  .card-visual {
    height: auto;
    min-height: 280px;
  }

  .card-copy {
    padding: 24px;
  }
}

/* ---------- Dark "workflows" section ---------- */

.dark {
  background: var(--navy-900);
  color: var(--on-dark);
}

.workflows {
  display: grid;
  grid-template-columns: 1fr 1.3fr auto;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

.workflows-intro {
  display: grid;
  gap: 16px;
}

.workflows-intro h2 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  color: #fff;
}

.workflows-intro p {
  color: var(--on-dark-muted);
}

.ticker {
  position: relative;
  height: 400px;
  overflow: hidden;
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}

.ticker ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  animation: ticker 36s linear infinite;
  --animation-reduced: none;
}

.ticker li {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  line-height: 1.5;
  color: #c9d6e3;
  white-space: nowrap;
}

.ticker li:nth-child(3n + 2) {
  color: #fff;
}

.ticker.is-paused ul {
  animation-play-state: paused;
}

@keyframes ticker {
  to {
    translate: 0 -50%;
  }
}

.ticker-wrap {
  display: grid;
  justify-items: start;
  gap: 12px;
  min-width: 0;
}

.ticker-toggle {
  appearance: none;
  border: 1px solid rgb(255 255 255 / 0.2);
  background: rgb(11 28 54 / 0.7);
  color: var(--on-dark);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* Reduced motion: show the list as a static, wrapped set instead of scrolling */
@media (prefers-reduced-motion: reduce) {
  .ticker {
    height: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .ticker ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
  }

  .ticker li {
    white-space: normal;
    font-size: 1.4rem;
  }

  .ticker li[aria-hidden="true"],
  .ticker-toggle {
    display: none;
  }
}

@media (max-width: 960px) {
  .workflows {
    grid-template-columns: 1fr;
  }

  .ticker {
    height: 300px;
  }
}

/* ---------- How it works ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 24px 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  align-content: start;
  gap: 10px;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--navy-800);
  font-weight: 650;
  font-size: 15px;
}

.step h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.step p {
  color: var(--ink-2);
  font-size: 15.5px;
}

@media (max-width: 1080px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    grid-template-columns: auto 1fr;
    column-gap: 16px;
  }

  .step::before {
    grid-row: span 2;
  }
}

/* ---------- Trust ---------- */

.trust {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.trust-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.trust-card h3 {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.trust-card p {
  color: var(--ink-2);
  font-size: 15.5px;
}

.trust-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--teal-50);
  color: var(--navy-700);
}

.trust-card .icon svg {
  width: 22px;
  height: 22px;
}

.trust-card.feature {
  grid-row: span 2;
  background: linear-gradient(170deg, var(--surface) 40%, var(--teal-50));
  gap: 16px;
}

.trust-card.feature img {
  width: 150px;
}

.trust-card.feature h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.6vw, 2.1rem);
  line-height: 1.12;
}

@media (max-width: 960px) {
  .trust {
    grid-template-columns: 1fr 1fr;
  }

  .trust-card.feature {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (max-width: 600px) {
  .trust {
    grid-template-columns: 1fr;
  }
}

/* ---------- Resources ---------- */

.resources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.resource {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  display: grid;
  grid-template-rows: auto 1fr;
  transition: box-shadow 0.2s, translate 0.2s;
}

.resource:hover {
  box-shadow: var(--shadow-card);
  translate: 0 -2px;
}

.resource img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.resource div {
  padding: 20px 22px 24px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.resource .eyebrow {
  font-size: 12px;
  color: var(--muted);
}

.resource h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.resource p {
  color: var(--ink-2);
  font-size: 15px;
}

.resources-more {
  margin-top: 28px;
  text-align: center;
}

@media (max-width: 860px) {
  .resources {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 820px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  font-weight: 550;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 20px;
  font-weight: 400;
  transition: rotate 0.25s;
}

.faq details[open] summary::after {
  rotate: 45deg;
}

.faq details::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete;
}

.faq details[open]::details-content {
  block-size: auto;
}

.faq .answer {
  padding: 0 4px 24px;
  color: var(--ink-2);
  max-width: 68ch;
}

@media (prefers-reduced-motion: reduce) {
  .faq details::details-content,
  .faq summary::after {
    transition: none;
  }
}

/* ---------- Final CTA ---------- */

.final-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(56px, 9vw, 112px) clamp(20px, 5vw, 64px);
  text-align: center;
  background: linear-gradient(135deg, var(--teal-100), var(--lavender-100) 60%, var(--sand-100));
}

.final-cta::before,
.final-cta::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 2px solid rgb(0 191 211 / 0.35);
}

.final-cta::before {
  left: -180px;
  top: -160px;
}

.final-cta::after {
  right: -160px;
  bottom: -200px;
}

.final-cta h2 {
  font-size: clamp(2.3rem, 5.5vw, 4rem);
  max-width: 16ch;
  margin-inline: auto;
}

.final-cta p {
  margin: 18px auto 0;
  max-width: 34rem;
  color: var(--ink-2);
  font-size: 18px;
}

.final-cta .hero-ctas {
  margin-top: 28px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 8px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: 16px;
  max-width: 280px;
}

.footer-brand img {
  width: 140px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 15px;
}

.footer-col h2 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-col a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 15px;
}

.footer-col a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.footer-bottom a {
  color: var(--muted);
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: none;
  }
}

/* ---------- Floating CTA ---------- */

.float-cta {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 40;
  translate: -50% 140%;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.35), 0 12px 30px -8px rgb(11 28 54 / 0.5);
  transition: translate 0.35s ease, opacity 0.35s ease;
}

.float-cta.is-visible {
  translate: -50% 0;
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .float-cta {
    transition: opacity 0.2s;
  }
}

/* Reduced motion: stop the decorative loops case by case (see motion guidance) */
@property --animation-reduced {
  syntax: "*";
  inherits: false;
  initial-value: none;
}

@media (prefers-reduced-motion: reduce) {
  .pill-rec::before,
  .wave span,
  .ticker ul {
    animation: var(--animation-reduced) !important;
  }
}

/* ---------- Cookie banner (cookieconsent) ---------- */

.cc-window.cc-banner {
  font-family: var(--font-sans) !important;
  font-size: 14px !important;
}

/* ---------- EHR integrations (homepage) ---------- */

.ehr-wall {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ehr-tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 116px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  align-content: center;
  gap: 4px;
}

/* Partner logo, faded into the right of the tile */
.ehr-logo {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -18px;
  translate: 0 -50%;
  width: auto;
  max-width: 50%;
  height: var(--logo-h, 40px);
  object-fit: contain;
  object-position: right center;
  opacity: 0.16;
  filter: grayscale(1);
  pointer-events: none;
  user-select: none;
  transition: opacity 0.3s, translate 0.3s;
}

.ehr-logo.invert {
  filter: grayscale(1) invert(1);
}

/* Text stand-in until we have the partner's logo file */
.ehr-logo-text {
  height: auto;
  max-width: none;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  opacity: 0.08;
}

.ehr-tile:hover .ehr-logo {
  opacity: 0.28;
  translate: -6px -50%;
}

.ehr-tile:hover .ehr-logo-text {
  opacity: 0.14;
}

@media (prefers-reduced-motion: reduce) {
  .ehr-logo {
    transition: opacity 0.2s;
  }

  .ehr-tile:hover .ehr-logo {
    translate: 0 -50%;
  }
}

.ehr-name {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--navy-800);
}

.ehr-meta {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--muted);
}

.ehr-tile.more {
  padding: 0;
  border-style: dashed;
  border-color: #c6d3d6;
  background: transparent;
}

.ehr-tile.more a {
  height: 100%;
  padding: 22px 24px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-radius: inherit;
  text-decoration: none;
  transition: background-color 0.2s;
}

.ehr-tile.more a:hover {
  background: var(--surface);
}

.ehr-tile.more .ehr-name {
  font-size: 18px;
}

.ehr-tile.more .ehr-meta::after {
  content: " →";
}

.sync-points {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.sync-point {
  padding: 24px 26px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--teal-50), #f3fbfc);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 16px;
  row-gap: 6px;
}

.sync-point .icon {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--navy-700);
}

.sync-point .icon svg {
  width: 22px;
  height: 22px;
}

.sync-point h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.sync-point p {
  color: var(--ink-2);
  font-size: 15.5px;
}

@media (max-width: 1080px) {
  .sync-points {
    grid-template-columns: 1fr;
  }
}

/* Columns change where the tiles get too narrow to keep the logo clear of the text */
@media (max-width: 1240px) {
  .ehr-wall {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .ehr-wall {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .ehr-tile {
    min-height: 96px;
    padding: 18px 20px;
  }

  .ehr-tile.more a {
    padding: 18px 20px;
  }
}

/* =====================================================================
 * Inner pages (team, careers, resources, contact, demo, privacy)
 * ===================================================================== */

/* ---------- Current page in the nav ---------- */

.nav-links a[aria-current="page"] {
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 900px) {
  .mobile-menu li a[aria-current="page"] {
    font-weight: 600;
  }
}

/* ---------- Page hero ---------- */

.page-hero {
  padding-block: clamp(48px, 7vw, 88px) clamp(48px, 6vw, 80px);
}

.page-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
}

.page-hero .eyebrow {
  margin-bottom: 18px;
}

.page-hero .lead {
  margin-top: 20px;
  max-width: 34rem;
  font-size: clamp(18px, 2vw, 21px);
  color: var(--ink-2);
}

.page-hero .hero-ctas {
  justify-content: flex-start;
}

.page-hero.center {
  text-align: center;
}

.page-hero.center h1 {
  max-width: 16ch;
  margin-inline: auto;
}

.page-hero.center .lead {
  margin-inline: auto;
}

.page-hero.center .hero-ctas {
  justify-content: center;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

@media (max-width: 860px) {
  .page-hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Rounded photo frame used beside or under a page hero */
.figure {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, var(--teal-50), var(--teal-100));
}

.figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure.square {
  aspect-ratio: 1;
}

.figure.wide {
  margin-top: clamp(40px, 6vw, 64px);
  aspect-ratio: 21 / 9;
}

.figure.wide img {
  object-position: 50% 40%;
}

@media (max-width: 600px) {
  .figure.wide {
    aspect-ratio: 4 / 3;
  }
}

/* Illustration on a tinted panel (transparent artwork) */
.figure.art {
  aspect-ratio: 1;
  background: linear-gradient(160deg, #f5f3fe, var(--lavender-100));
}

.figure.art img {
  inset: auto auto 0 50%;
  translate: -50% 0;
  width: auto;
  max-width: none;
  height: 92%;
  object-fit: contain;
}

@media (max-width: 860px) {
  .figure.square,
  .figure.art {
    max-width: 480px;
  }
}

/* ---------- Generic two-column split ---------- */

.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: start;
  gap: clamp(32px, 5vw, 72px);
}

.split-intro {
  display: grid;
  gap: 16px;
}

.split-intro h2 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
}

.split-intro p {
  color: var(--muted);
}

@media (min-width: 961px) {
  .split-intro.sticky {
    position: sticky;
    top: 112px;
  }
}

@media (max-width: 960px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* ---------- Team ---------- */

.team {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.person {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.person-photo {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--teal-50), var(--teal-100));
}

.person:nth-child(4n + 2) .person-photo {
  background: linear-gradient(160deg, #f0fbf6, var(--mint-100));
}

.person:nth-child(4n + 3) .person-photo {
  background: linear-gradient(160deg, #f5f3fe, var(--lavender-100));
}

.person:nth-child(4n + 4) .person-photo {
  background: linear-gradient(160deg, #fdf8ef, var(--sand-100));
}

.person-photo img {
  position: absolute;
  left: 50%;
  bottom: 0;
  translate: -50% 0;
  width: auto;
  max-width: 90%;
  height: calc(100% - 24px);
  object-fit: contain;
  object-position: bottom;
  filter: grayscale(1);
}

.person-copy {
  padding: 28px 32px 32px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
}

.person-copy h3 {
  font-size: clamp(1.7rem, 2.6vw, 2.1rem);
}

.person-role {
  margin-top: 8px;
  display: grid;
  gap: 2px;
  color: var(--navy-700);
  font-size: 16px;
}

.person-creds {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.person-role em {
  font-family: var(--font-serif);
  font-size: 1.2em;
}

.person-bio {
  color: var(--ink-2);
  font-size: 15.5px;
}

@media (max-width: 860px) {
  .team {
    grid-template-columns: 1fr;
  }

  .person-photo {
    height: 260px;
  }

  .person-copy {
    padding: 24px;
  }
}

/* ---------- Value cards (careers) ---------- */

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.value {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.value-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal-100);
}

.value:nth-child(2) .value-icon {
  background: var(--mint-100);
}

.value:nth-child(3) .value-icon {
  background: var(--lavender-100);
}

.value-icon img {
  width: 56px;
  height: 56px;
}

.value h3 {
  margin-top: 4px;
  font-size: clamp(1.5rem, 2.2vw, 1.8rem);
}

.value p {
  color: var(--ink-2);
  font-size: 15.5px;
}

.values-more {
  margin-top: 28px;
  text-align: center;
}

@media (max-width: 860px) {
  .values {
    grid-template-columns: 1fr;
  }
}

/* ---------- Quote card ---------- */

.quote-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal-100), var(--lavender-100));
}

.quote-card figure {
  margin: 0;
  padding: clamp(28px, 5vw, 64px);
  display: grid;
  align-content: center;
  gap: 24px;
}

.quote-card blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  text-wrap: balance;
}

.quote-card figcaption {
  display: grid;
  gap: 2px;
  font-size: 15px;
  color: var(--ink-2);
}

.quote-card figcaption b {
  color: var(--ink);
  font-size: 16px;
}

.quote-card > img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

@media (max-width: 860px) {
  .quote-card {
    grid-template-columns: 1fr;
  }

  .quote-card > img {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}

/* ---------- Open roles ---------- */

.roles {
  max-width: 820px;
  margin-inline: auto;
  display: grid;
  gap: 16px;
}

.roles-empty {
  background: var(--surface);
  border: 1px dashed #c6d3d6;
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.roles-cta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.roles-cta p {
  font-size: 18px;
  font-weight: 550;
}

/* ---------- Resource hub ---------- */

.resource-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.resource-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.resource-card .resource-copy {
  padding: 22px 24px 26px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
}

.resource-card .eyebrow {
  font-size: 12px;
  color: var(--muted);
}

.resource-card h2 {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.resource-card p {
  color: var(--ink-2);
  font-size: 15.5px;
}

.resource-card .btn {
  justify-self: start;
  margin-top: 8px;
}

/* ---------- Metric band (dark) ---------- */

.metric {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 80px);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
}

.metric-emblem {
  position: absolute;
  z-index: -1;
  right: -60px;
  bottom: -80px;
  width: 340px;
  opacity: 0.08;
}

.metric-figure {
  font-family: var(--font-serif);
  font-size: clamp(5rem, 13vw, 9.5rem);
  line-height: 0.9;
  color: #fff;
}

.metric-figure small {
  font-size: 0.42em;
  color: var(--teal-400);
}

.metric-copy {
  display: grid;
  gap: 14px;
  max-width: 40rem;
}

.metric-copy h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  color: #fff;
}

.metric-copy p {
  color: var(--on-dark-muted);
}

.metric-copy p.strong {
  color: var(--on-dark);
  font-weight: 550;
}

@media (max-width: 760px) {
  .metric {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contact ---------- */

.route-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.route-card {
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: start;
  gap: 12px;
  background: var(--teal-100);
}

.route-card.tint-teal {
  background: linear-gradient(160deg, var(--teal-50), var(--teal-100));
}

.route-card.tint-lavender {
  background: linear-gradient(160deg, #f5f3fe, var(--lavender-100));
}

.route-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgb(255 255 255 / 0.7);
  color: var(--navy-800);
}

.route-icon svg {
  width: 24px;
  height: 24px;
}

.route-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.route-card p {
  max-width: 30rem;
  color: var(--ink-2);
}

.route-card .route-value {
  font-size: 18px;
  font-weight: 550;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.route-card .btn {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .route-cards {
    grid-template-columns: 1fr;
  }
}

.contact-photo {
  margin-top: 16px;
  aspect-ratio: 4 / 5;
  max-width: 420px;
}

.contact-photo img {
  object-position: 50% 30%;
  filter: grayscale(1);
}

@media (max-width: 960px) {
  .contact-photo {
    display: none;
  }
}

/* ---------- Demo ---------- */

.demo-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "head form"
    "media form";
  grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 5vw, 72px);
  row-gap: 32px;
}

.demo-head {
  grid-area: head;
}

.demo-head h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
}

.demo-form {
  grid-area: form;
}

.demo-media {
  grid-area: media;
  display: grid;
  align-content: start;
  gap: 16px;
}

@media (max-width: 960px) {
  .demo-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "form"
      "media";
    grid-template-rows: none;
  }
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--navy-900);
  box-shadow: var(--shadow-card);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.secure-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--ink-2);
  font-size: 15.5px;
}

.secure-note svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--navy-700);
}

.fit-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal-100), var(--lavender-100) 60%, var(--sand-100));
}

.fit-card-copy {
  padding: clamp(32px, 6vw, 80px);
  display: grid;
  align-content: center;
  gap: 18px;
}

.fit-card-copy h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
}

.fit-card-copy p {
  font-size: 18px;
  color: var(--ink-2);
}

.fit-card-copy .hero-ctas {
  justify-content: flex-start;
  margin-top: 8px;
}

.fit-card > img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

@media (max-width: 860px) {
  .fit-card {
    grid-template-columns: 1fr;
  }

  .fit-card > img {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}

/* ---------- Forms ---------- */

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(18px, 4vw, 36px);
}

.form {
  display: grid;
  gap: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 18px 16px;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: grid;
  gap: 10px;
}

.form-label,
.form legend {
  padding: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.form legend {
  margin-bottom: 10px;
}

.form legend.form-section-title {
  margin-bottom: 14px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-hint {
  font-weight: 400;
  color: var(--muted);
}

.input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #cdd7d8;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder {
  color: #7d8a98;
  opacity: 1;
}

.input:hover {
  border-color: #aebcc0;
}

.input:focus-visible {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgb(0 191 211 / 0.25);
}

textarea.input {
  min-height: 150px;
  resize: vertical;
}

select.input {
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f2340' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

select.input:invalid {
  color: #7d8a98;
}

select.input option {
  color: var(--ink);
}

.choices {
  display: grid;
  gap: 8px;
}

.choices.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 560px) {
  .choices.cols-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid #cdd7d8;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 15.5px;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.choice:hover {
  border-color: #aebcc0;
}

.choice:has(input:checked) {
  border-color: var(--navy-700);
  background: var(--teal-50);
}

.choice:has(input:focus-visible) {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgb(0 191 211 / 0.25);
}

.choice input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--navy-800);
  cursor: pointer;
}

.choice input:focus-visible {
  outline: none;
}

.choice.plain {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}

.choice.plain:has(input:checked),
.choice.plain:has(input:focus-visible) {
  background: none;
  box-shadow: none;
}

.choice.plain:has(input:focus-visible) input {
  outline: 3px solid var(--teal-500);
  outline-offset: 2px;
}

/* reCAPTCHA renders a fixed 304px iframe; keep it from forcing overflow */
.form .g-recaptcha {
  max-width: 100%;
  min-height: 78px;
}

.form-submit {
  justify-self: start;
  min-width: 180px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  translate: none;
}

/* Webflow form states. webflow.js toggles these, so they start hidden. */
.w-form-done,
.w-form-fail {
  display: none;
}

.w-form-done {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: 550;
  text-align: center;
}

.w-form-fail {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #fde6e6;
  color: #a12b2b;
  font-size: 15px;
}

/* ---------- Long-form text (privacy policy) ---------- */

.prose-wrap {
  max-width: 760px;
  margin-inline: auto;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 56px);
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.65;
}

.prose > * + * {
  margin-top: 1em;
}

.prose h2 {
  margin-top: 2em;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  color: var(--ink);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h2 + * {
  margin-top: 0.75em;
}

.prose h3 {
  margin-top: 1.6em;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--ink);
}

.prose ul {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.3em;
}

.prose a {
  color: var(--navy-800);
  font-weight: 550;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.prose strong {
  color: var(--ink);
}

.prose address {
  font-style: normal;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.prose table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

.prose th,
.prose td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.prose th {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose td:last-child {
  white-space: nowrap;
}

/* Narrow screens: stack each table row (ARIA roles in the markup keep the table semantics) */
@media (max-width: 560px) {
  .table-wrap {
    overflow: visible;
  }

  .prose table {
    min-width: 0;
  }

  .prose thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .prose tr {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }

  .prose tbody tr:last-child {
    border-bottom: 0;
  }

  .prose td {
    display: block;
    padding: 0;
    border: 0;
  }

  .prose td:first-child {
    font-weight: 600;
    color: var(--ink);
  }

  .prose td:last-child {
    font-size: 14px;
    color: var(--muted);
  }
}

.prose-meta {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* =====================================================================
 * Homepage platform story (v3)
 * ===================================================================== */

/* ---------- Statement: wider measure for the longer line, support line beneath ---------- */

.statement {
  padding-block: clamp(48px, 7vw, 88px) clamp(72px, 9vw, 128px);
}

.statement blockquote {
  max-width: 30ch;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.22;
}

.statement .statement-support {
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 16px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.3;
  color: var(--navy-700);
}

/* ---------- CHAP trust card: smaller, more open headline (3 lines at 1440, was 4 tight) ---------- */

.trust-card.feature {
  gap: 18px;
}

.trust-card.feature h3 {
  font-size: clamp(1.5rem, 2.2vw, 1.75rem);
  line-height: 1.22;
}

/* ---------- Extra mock pieces (care plan, quality review) ---------- */

.mock-sub {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.mock-sub + .checklist {
  margin-top: -10px;
}

.pill-lav {
  background: var(--lavender-100);
  color: #463a8c;
}

.pill-neutral {
  background: var(--surface-2);
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.cp-goal {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.cp-goal-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 4px;
  font-weight: 600;
}

.cp-goal-text {
  color: var(--ink-2);
  font-size: 14.5px;
}

.cp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.cp-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 14.5px;
}

/* Discipline tag (RN, HHA, MSW …) */
.disc {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--navy-700);
}

.row-end {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- How it works: team handoff ---------- */

.handoff {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.handoff-step {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  padding: 24px 22px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

/* Line up headings, copy and "Hands off" boxes across the cards in a row */
@supports (grid-template-rows: subgrid) {
  .handoff-step {
    grid-row: span 4;
    grid-template-rows: subgrid;
    row-gap: 12px;
  }
}

/* Arrow to the next team, centred in the gap */
.handoff-step:not(:last-child)::after {
  content: "→";
  content: "→" / "";
  position: absolute;
  z-index: 1;
  top: 50%;
  right: -24px;
  translate: 0 -50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy-800);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.handoff-who {
  display: flex;
  align-items: center;
  gap: 10px;
}

.handoff-n {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--teal-100);
  color: var(--navy-800);
  font-size: 14px;
  font-weight: 650;
}

.handoff-team {
  display: grid;
  font-weight: 600;
  line-height: 1.25;
}

.handoff-team small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.handoff-step h3 {
  font-size: clamp(1.45rem, 2vw, 1.65rem);
}

.handoff-step > p {
  color: var(--ink-2);
  font-size: 15.5px;
}

.handoff-pass {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, var(--teal-50), #f3fbfc);
  border: 1px solid #d3eef1;
  display: grid;
  align-content: start;
  gap: 4px;
}

.handoff-pass-label {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-700);
}

.handoff-pass p {
  font-size: 15px;
  color: var(--ink);
}

@media (max-width: 1080px) {
  .handoff {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .handoff-step:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .handoff {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .handoff-step:not(:last-child)::after {
    display: grid;
    top: auto;
    right: auto;
    bottom: -26px;
    left: 50%;
    translate: -50% 0;
    rotate: 90deg;
  }
}

/* ---------- Feature split (care planning, quality review) ---------- */

/* Named feature-split, not feature: .trust-card.feature already uses that class */
.feature-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.feature-split.reverse .feature-visual {
  order: -1;
}

.feature-copy {
  display: grid;
  align-content: start;
  gap: 18px;
}

.feature-copy h2 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
}

.feature-copy .lead {
  font-size: 18px;
  color: var(--ink-2);
}

.feature-points {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.feature-points li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 4px;
}

.feature-points .icon {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--teal-50);
  color: var(--navy-700);
}

.feature-points .icon svg {
  width: 20px;
  height: 20px;
}

.feature-points h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.feature-points p {
  color: var(--ink-2);
  font-size: 15.5px;
}

.feature-visual {
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 44px);
  display: grid;
  align-content: center;
  gap: 16px;
}

.feature-visual.tint-mint {
  background: linear-gradient(160deg, #f0fbf6, var(--mint-100));
}

.feature-visual.tint-lavender {
  background: linear-gradient(160deg, #f5f3fe, var(--lavender-100));
}

.feature-visual .mini {
  max-width: 420px;
}

.feature-visual .mini:first-child {
  justify-self: start;
}

.feature-visual .mini + .mini {
  justify-self: end;
}

.mini-head small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}

@media (max-width: 960px) {
  .feature-split {
    grid-template-columns: 1fr;
  }

  .feature-split.reverse .feature-visual {
    order: 0;
  }

  .feature-visual .mini {
    max-width: none;
  }
}

/* ---------- Who uses Patrium ---------- */

.roles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

/* Placeholder frame until real screenshots (sample data only) are supplied */
.role-shot {
  aspect-ratio: 16 / 9;
  padding: clamp(18px, 3vw, 32px) clamp(18px, 3vw, 32px) 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, var(--teal-50), var(--teal-100));
}

.role-card:nth-child(2) .role-shot {
  background: linear-gradient(160deg, #f0fbf6, var(--mint-100));
}

.role-card:nth-child(3) .role-shot {
  background: linear-gradient(160deg, #f5f3fe, var(--lavender-100));
}

.role-card:nth-child(4) .role-shot {
  background: linear-gradient(160deg, #fdf8ef, var(--sand-100));
}

.shot-window {
  width: 100%;
  height: 100%;
  border-radius: 12px 12px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.shot-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d5dfe1;
}

.shot-body {
  display: grid;
  grid-template-columns: 22% 1fr;
  min-height: 0;
}

.shot-side {
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  display: grid;
  align-content: start;
  gap: 9px;
}

.shot-main {
  min-width: 0;
  padding: 14px 16px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.sk {
  display: block;
  width: var(--w, 100%);
  height: 8px;
  border-radius: 4px;
  background: #e2e9ea;
}

.sk.strong {
  height: 10px;
  background: #cbd7da;
}

.sk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
}

.sk-row .sk {
  flex: 0 1 var(--w, 50%);
}

.sk-pill {
  flex: none;
  width: 48px;
  height: 14px;
  border-radius: 999px;
  background: var(--teal-100);
}

.sk-pill.ok {
  background: var(--ok-bg);
}

.sk-pill.warn {
  background: var(--warn-bg);
}

.sk-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sk-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  display: grid;
  gap: 7px;
}

.shot-phone {
  width: 44%;
  max-width: 200px;
  height: 100%;
  border: 6px solid var(--navy-800);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: var(--surface);
  padding: 16px 12px 0;
  display: grid;
  align-content: start;
  gap: 8px;
  box-shadow: var(--shadow-card);
}

.shot-phone .sk-rec {
  display: grid;
  place-items: center;
  margin-top: 4px;
}

.shot-phone .sk-rec span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f5c9c9;
  box-shadow: inset 0 0 0 9px #fde6e6;
}

.role-copy {
  padding: 24px 28px 30px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.role-where {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-700);
}

.role-copy h3 {
  font-size: clamp(1.6rem, 2.4vw, 2rem);
}

.role-copy p {
  color: var(--ink-2);
}

@media (max-width: 860px) {
  .roles-grid {
    grid-template-columns: 1fr;
  }

  .role-copy {
    padding: 22px 24px 26px;
  }
}

.visual-note {
  justify-self: center;
  font-size: 12px;
  color: var(--muted);
}

/* =====================================================================
 * Homepage motion (v3, not live yet so edited in place)
 * - Hero tour: a timer ring on the selected stage drives autoplay (see site.v2.js); each
 *   panel replays a short entrance sequence while it has .is-live.
 * - Feature illustrations (.mini cards) reveal on scroll where scroll-driven animations exist.
 * Everything stays on opacity/transform except the note wipe (clip-path). Entrance motion only
 * runs with prefers-reduced-motion: no-preference; without JS the page is static.
 * ===================================================================== */

/* ---------- Tour control and timer ring ---------- */

.stage {
  padding-top: clamp(58px, 5vw, 64px);
}

.stage-toggle {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 2px rgb(15 35 64 / 0.08);
  color: var(--navy-800);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.stage-toggle:hover {
  background: #fff;
}

.stage-toggle svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.stage-toggle .i-play,
.stage-toggle.is-paused .i-pause {
  display: none;
}

.stage-toggle.is-paused .i-play {
  display: block;
}

@property --stage-p {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

.tab-n {
  position: relative;
}

.stage-tabs.is-autoplay .stage-tab[aria-selected="true"] .tab-n::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(var(--teal-500) calc(var(--stage-p) * 1turn), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  animation: stage-timer var(--stage-ms, 8s) linear forwards;
}

@keyframes stage-timer {
  to {
    --stage-p: 1;
  }
}

/* Pause the timer (and so the tour) while someone is reading the tabs or panel, or it is out
   of view. Not on the Pause/Play button itself, so pressing Play visibly resumes the tour.
   !important because the ring's `animation` shorthand resets play-state with higher specificity. */
.stage:is(.is-offscreen, .is-doc-hidden) .tab-n::after,
.stage:has(.stage-tabs:focus-within, .stage-panels:focus-within) .tab-n::after {
  animation-play-state: paused !important;
}

@media (hover: hover) {
  .stage:has(.stage-tabs:hover, .stage-panels:hover) .tab-n::after {
    animation-play-state: paused !important;
  }
}

/* ---------- Status pills that change state during the entrance ---------- */

.swap {
  display: inline-grid;
  justify-items: center;
}

.swap > * {
  grid-area: 1 / 1;
}

.swap-from {
  display: none;
}

/* ---------- Hero panel entrances ---------- */

#panel-intake .field-grid {
  position: relative;
  overflow: clip;
}

#panel-intake .field-grid { --base: 0.15s; --step: 0.2s; }
#panel-careplan .mock-body { --base: 0.1s; --step: 0.75s; }
#panel-careplan .cp-goal:nth-child(1) .cp-list { --base: 0.4s; --step: 0.18s; }
#panel-careplan .cp-goal:nth-child(2) .cp-list { --base: 1.15s; --step: 0.18s; }
#panel-visit .mock-body { --base: 0s; --step: 0.5s; }
#panel-review .checklist { --base: 0.35s; --step: 0.28s; }
#panel-ehr .field-grid { --base: 0.1s; --step: 0.15s; }
#panel-ehr .checklist { --base: 0.5s; --step: 0.32s; }

#panel-intake { --actions-at: 1.5s; }
#panel-careplan { --actions-at: 1.6s; }
#panel-review { --actions-at: 2s; }

@media (prefers-reduced-motion: no-preference) {
  /* Items in a list arrive one after another */
  .mock.is-live [data-stagger] > * {
    animation: tour-rise 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
    animation-delay: calc(var(--base, 0.15s) + (var(--sibling-index, 1) - 1) * var(--step, 0.2s));
    animation-delay: calc(var(--base, 0.15s) + (sibling-index() - 1) * var(--step, 0.2s));
  }

  /* Tags and verdicts land just after their row (same delay, later keyframes) */
  .mock.is-live [data-stagger] > * > :is(.disc, .pill) {
    animation: tour-pop 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
    animation-delay: inherit;
  }

  /* The visit note is written out section by section */
  .mock.is-live .note-section p {
    animation: tour-wipe 1s ease-out backwards;
    animation-delay: inherit;
  }

  .mock.is-live .mock-actions {
    animation: tour-rise 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) var(--actions-at, 1.6s) backwards;
  }

  .mock.is-live .mock-sub {
    animation: tour-fade 0.4s ease 0.1s backwards;
  }

  /* Header status: neutral "working" label, then the result */
  .mock.is-live .swap {
    animation: tour-tint 0.35s ease var(--t, 1.5s) backwards;
  }

  .mock.is-live .swap-from {
    display: block;
    animation: tour-swap-out 0.3s ease var(--t, 1.5s) both;
  }

  .mock.is-live .swap-to {
    animation: tour-swap-in 0.3s ease var(--t, 1.5s) both;
  }

  /* Referral packet being read */
  #panel-intake.is-live .field-grid::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 42%;
    background: linear-gradient(rgb(0 191 211 / 0), rgb(0 191 211 / 0.16), rgb(0 191 211 / 0));
    pointer-events: none;
    animation: tour-scan 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
  }

  /* Hold the entrance while the stage is out of view (!important: see the timer ring) */
  .stage:is(.is-offscreen, .is-doc-hidden) .mock.is-live *,
  .stage:is(.is-offscreen, .is-doc-hidden) .mock.is-live .field-grid::after {
    animation-play-state: paused !important;
  }
}

@keyframes tour-rise {
  from {
    opacity: 0;
    translate: 0 10px;
  }
}

@keyframes tour-pop {
  0%,
  45% {
    opacity: 0;
    scale: 0.6;
  }

  75% {
    opacity: 1;
    scale: 1.06;
  }
}

@keyframes tour-wipe {
  0%,
  35% {
    clip-path: inset(0 100% 0 0);
  }

  100% {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes tour-fade {
  from {
    opacity: 0;
  }
}

@keyframes tour-tint {
  from {
    background-color: var(--surface-2);
    color: var(--ink-2);
  }
}

@keyframes tour-swap-out {
  to {
    opacity: 0;
    translate: 0 -6px;
  }
}

@keyframes tour-swap-in {
  from {
    opacity: 0;
    translate: 0 6px;
  }
}

@keyframes tour-scan {
  from {
    translate: 0 -100%;
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  to {
    translate: 0 240%;
    opacity: 0;
  }
}

/* ---------- Feature illustrations: reveal on scroll ---------- */

/* overflow: hidden would make the card a scroll container and stall view() timelines */
.card {
  overflow: clip;
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .mini > * {
      animation: reveal-rise linear backwards;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }

    .mini :is(.check.ok, .check.warn),
    .mini > * > :is(.pill, .disc) {
      animation: reveal-pop linear backwards;
      animation-timeline: view();
      animation-range: cover 8% cover 26%;
    }
  }
}

@keyframes reveal-rise {
  from {
    opacity: 0;
    translate: 0 14px;
  }
}

@keyframes reveal-pop {
  from {
    opacity: 0;
    scale: 0.4;
  }
}
