.hospital-page {
  color: #444846;
  background:
    radial-gradient(ellipse at 12% 16%, #d9f4e6 0%, transparent 43%) top / 100% 1040px no-repeat,
    radial-gradient(ellipse at 89% 12%, #f1f2d2 0%, transparent 42%) top / 100% 1040px no-repeat,
    linear-gradient(#eef6f1, #fafcfb 76%, white) top / 100% 1160px no-repeat white;
}

.hospital-page main h1,
.hospital-page main h2,
.hospital-page main h3,
.patient-caption blockquote {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

.hospital-page main h1,
.hospital-page main h2,
.hospital-page main h3 {
  color: var(--color-primary);
}

.hospital-hero {
  padding-top: clamp(32px, 3vw, 48px);
  text-align: center;
}

.hospital-hero h1 {
  width: min(calc(100% - 40px), 1060px);
  margin-inline: auto;
  font-size: clamp(36px, 4.45vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.046em;
}

.hero-copy {
  margin: 32px 20px 0;
  font-size: 16px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 22px 20px 0;
}

.hero-actions a {
  height: 54px;
  padding-inline: 29px;
  font-size: 16px;
  font-weight: 600;
}

.hero-actions .btn-login { color: #432b0b; }
.hero-actions .btn-login:hover { box-shadow: 0 4px 14px #855a1724; }

.hero-actions a:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

#patient-examples {
  margin-top: clamp(40px, 4vw, 64px);
  scroll-margin-top: calc(var(--site-header-h) + 14px);
}

.patient-wall {
  --gap: clamp(8px, .8vw, 14px);
  /* Six pitches fill the viewport. The seventh portrait wraps beyond the faded edges. */
  --tile: max(150px, calc(100vw / 6 - var(--gap)));
}

.patient-row {
  position: relative;
  display: flex;
  justify-content: center;
  gap: var(--gap);
  overflow: clip;
  padding-block: 12px;
  mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}

.patient-row:focus-within { mask-image: none; }
.patient-row[data-ready] {
  display: grid;
  grid-template-columns: 100%;
  justify-content: start;
}
.patient-row[data-ready] .patient-card { grid-area: 1 / 1; }

.patient-card {
  flex: none;
  width: var(--tile);
  aspect-ratio: 4 / 5;
  position: relative;
  appearance: none;
  border: 0;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
}

.patient-navigation[hidden] { display: none; }

.patient-portrait,
.patient-portrait img,
.patient-portrait video {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
}

.patient-portrait {
  position: relative;
  overflow: hidden;
  background: #edf3ef;
  transform: perspective(720px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(var(--portrait-scale, 1));
  transition: transform 150ms ease-out, box-shadow 160ms ease-out, opacity 250ms ease-out;
}

.patient-portrait img, .patient-portrait video { object-fit: cover; }
.patient-portrait { opacity: .72; }
.patient-card[data-featured] .patient-portrait { opacity: 1; }
.patient-portrait video { position: absolute; inset: 0; opacity: 0; }
.patient-portrait video.is-playing { opacity: 1; }
.patient-card[data-featured] { --portrait-scale: 1.035; z-index: 1; }
.patient-card[data-featured] .patient-portrait {
  box-shadow: 0 0 0 3px white, 0 0 0 5px #447569, 0 14px 24px -12px #254e46a6;
}

.patient-card:focus-visible, .patient-navigation button:focus-visible {
  outline: 3px solid #174d53;
  outline-offset: 5px;
}

/* The overlaid captions reserve space for the tallest case at each viewport width. */
.patient-caption {
  display: grid;
  max-width: 840px;
  margin: 6px auto;
  min-height: 7rem;
  padding-inline: min(20px, 3vw);
}

.patient-line {
  grid-area: 1 / 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  visibility: hidden;
}

.patient-line[data-featured] { visibility: visible; }
.patient-label {
  padding: 4px 12px;
  border: 1px solid #c4d9ce;
  border-radius: 999px;
  background: #fff;
  color: #245c50;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.patient-caption blockquote {
  color: #191c1b;
  font-size: clamp(19px, 1.75vw, 25px);
  line-height: 1.29;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.patient-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 12px 0;
  font-size: 14px;
}

.patient-navigation button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #b5cec2;
  border-radius: 50%;
  background: white;
  color: #245c50;
  cursor: pointer;
}

.patient-navigation button:hover { background: #edf5f0; }
.patient-navigation :is(.patient-previous, .patient-next)::before {
  content: '';
  width: 8px;
  height: 8px;
  border-top: 2px solid;
  border-right: 2px solid;
  transform: rotate(45deg);
}
.patient-navigation .patient-previous::before { transform: rotate(-135deg); }
.patient-position { min-width: 7ch; color: #245c50; font-variant-numeric: tabular-nums; }
.patient-navigation .patient-motion {
  width: auto;
  min-width: 7.5em;
  padding-inline: 14px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
}
.patient-reduced-help { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .patient-wall[data-revealed] .patient-portrait { animation: patient-reveal .55s ease-out; }
  @keyframes patient-reveal { from { opacity: .25; translate: 0 5px; } }
}

@media (prefers-reduced-motion: reduce) {
  .patient-portrait { transition: none; transform: none; }
  .patient-navigation .patient-motion { display: none; }
  .patient-reduced-help { display: inline; }
}

.patient-note {
  margin: 16px 20px 0;
  font-size: 14px;
  line-height: 1.5;
}

.hospital-scenarios {
  width: min(calc(100% - 48px), 1152px);
  margin: clamp(76px, 8.8vw, 128px) auto;
}

.hospital-scenarios h2,
.hospital-how h2 {
  font-size: clamp(32px, 3.35vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  text-align: center;
  text-wrap: balance;
}

.scenario-intro {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.6;
  text-align: center;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 46px 32px;
  margin-top: clamp(32px, 4.5vw, 64px);
}

.scenario-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.scenario-grid h3 {
  margin-top: 24px;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.scenario-grid p {
  max-width: 510px;
  margin-top: 8px;
  line-height: 1.7;
}

.scenario-grid ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  list-style: none;
}

.scenario-grid li {
  padding: 4px 12px;
  border: 1px solid #cbded4;
  border-radius: 100px;
  background: #eff5f1;
  color: #23594d;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.hospital-how {
  padding: clamp(56px, 6vw, 88px) 0;
  overflow-x: clip;
  background: linear-gradient(120deg, #eaf5ef, #f5f8f4 75%);
}

#how-it-works { scroll-margin-top: calc(var(--site-header-h) + 28px); }

.hospital-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px clamp(24px, 2.4vw, 34px);
  width: min(calc(100% - 48px), 1152px);
  margin: clamp(32px, 4vw, 56px) auto 0;
  list-style: none;
}

/* Cards share the first row (sized by the tallest card) and stretch to it,
   step titles share the second: card edges and titles line up, each title
   sitting the same row gap below its card. */
.hospital-steps > li {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
}

/* One sample-sheet frame for all three examples: an upright white face over a
   pale backing sheet turned a few degrees so only its edge shows. Labels, copy
   and the photo sit on the upright face, so they stay level. */
.step-visual {
  --sheet-tilt: -2.5deg;
  --inset: clamp(18px, 1.8vw, 26px);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 16px;
  padding: var(--inset);
  border-radius: 18px;
  color: #1f3530;
  font-size: 16px;
  line-height: 1.55;
}

.step-visual::before,
.step-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #c4d9ce;
  border-radius: inherit;
  pointer-events: none;
}

.step-visual::before {
  z-index: -2;
  background: #dbe9e1;
  transform: rotate(var(--sheet-tilt));
}

.step-visual::after {
  z-index: -1;
  background: white;
}

.example-label {
  color: #447264;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Shared in-card hierarchy: label, then green subheads, then dark body copy. */
.prompt-patient,
.feedback-example dt {
  color: #245c50;
  font-weight: 600;
}

.prompt-patient {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prompt-patient img { flex: none; border-radius: 50%; object-fit: cover; }

/* The full 16:9 frame, so the patient's face is never cropped. */
.practice-example img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  object-fit: cover;
  background: #e3eee8;
}

/* When the shared row is taller than the feedback, the two notes spread
   through the card instead of leaving its lower half empty. */
.feedback-example { grid-template-rows: auto 1fr; }
.feedback-example dl {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.feedback-example dd { margin-top: 3px; }
.feedback-example dt:not(:first-child) {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #dde8e0;
}

.step-description h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(19px, 1.65vw, 24px);
  letter-spacing: -.025em;
  line-height: 1.3;
}

.step-description h3 span {
  flex: none;
  width: 28px;
  border-radius: 50%;
  background: #447569;
  color: white;
  font: 600 15px/28px 'Inter', sans-serif;
  text-align: center;
}

.step-description p { margin-top: 10px; line-height: 1.65; }

/* Below this width three columns get too narrow for the prompt and photo,
   so the steps stack like the phone layout with a slightly smaller turn. */
@media (max-width: 959px) {
  .hospital-steps {
    grid-template-columns: minmax(0, 1fr);
    width: min(calc(100% - 40px), 480px);
    gap: 44px;
  }
  .hospital-steps > li { grid-row: auto; grid-template-rows: auto auto; gap: 26px; }
  .step-visual { --sheet-tilt: -2deg; }
}

@media (max-width: 640px) {
  .hospital-hero { padding-top: 28px; }
  .hospital-hero h1 { text-wrap: balance; }
  .hero-copy { margin-top: 20px; }
  .hero-actions { gap: 10px; }
  .hero-actions a { height: 48px; padding-inline: 18px; font-size: 14px; }
  .patient-caption { min-height: 10.5rem; }
  .patient-note { margin-top: 12px; }
  .hospital-scenarios { width: calc(100% - 40px); }
  .scenario-grid { grid-template-columns: 1fr; gap: 36px; }
  .scenario-grid h3 { margin-top: 16px; }
}

@media (max-width: 400px) {
  .hospital-page .footer__cols { gap: 24px; }
  .hospital-page .footer-col { flex-basis: 92px; }
}

.hospital-detail {
  padding-block: clamp(48px, 6vw, 88px);
  font-size: 1rem;
  line-height: 1.65;
}

.hospital-detail__inner {
  width: min(calc(100% - 48px), 1152px);
  margin-inline: auto;
}

.hospital-detail h2 {
  font-size: clamp(32px, 3.35vw, 48px);
  line-height: 1.15;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.hospital-detail h3 {
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.3;
  letter-spacing: -.025em;
}

.hospital-feedback .hospital-detail__inner {
  display: grid;
  grid-template-columns: 5fr 4fr;
  align-items: center;
  gap: clamp(36px, 4.5vw, 64px);
}

.hospital-feedback h2 ~ h3 { margin-top: 24px; }
.hospital-detail h3 + p { margin-top: 6px; }

.hospital-feedback__sample {
  --sample-inset: clamp(20px, 2.6vw, 36px);
  border: 1px solid #c4d9ce;
  border-radius: 18px;
  background: white;
}

.hospital-feedback__sample figcaption {
  padding: var(--sample-inset);
  border-radius: 17px 17px 0 0;
  background: #edf5f0;
}

.hospital-feedback__label {
  margin-bottom: 12px;
  color: #447264;
  font-weight: 600;
}

.hospital-feedback__sample dl { padding: var(--sample-inset); }
.hospital-feedback__sample dt { color: #245c50; font-weight: 700; }
.hospital-feedback__sample dd { margin-top: 4px; }
.hospital-feedback__sample dd + dt {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #d5e3db;
}

.hospital-standards { background: #f1f6f3; }
.hospital-standards h2 { text-align: center; }
.hospital-standards ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin-top: clamp(28px, 3vw, 44px);
  list-style: none;
}

.hospital-standards li {
  padding: clamp(20px, 2.3vw, 32px);
  border: 1px solid #d0e0d6;
  border-radius: 16px;
  background: white;
}

.hospital-pilot .hospital-detail__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.hospital-pilot ol { margin-top: 24px; padding-left: 1.5em; }
.hospital-pilot li { padding-left: 4px; }
.hospital-pilot li + li { margin-top: 6px; }
.hospital-pilot li::marker { color: #245c50; font-weight: 700; }
.hospital-pilot .hero-actions { margin: 0; }
.hospital-pilot .btn-login { font-size: 1rem; }

@media (max-width: 800px) {
  .hospital-detail__inner { width: min(calc(100% - 40px), 600px); }
  .hospital-feedback .hospital-detail__inner,
  .hospital-standards ul { grid-template-columns: 1fr; }
  .hospital-pilot .hospital-detail__inner { flex-direction: column; align-items: flex-start; }
}
