.wf-eco-wrap {
  width: min(var(--wf-wrap, 1216px), calc(100% - 2 * clamp(20px, 5vw, 72px)));
  margin-inline: auto;
  color: var(--wf-ink, #081d3a);
}

.wf-connect,
.wf-ecosystem {
  padding-block: clamp(76px, 10vw, 144px) 0;
  scroll-margin-top: 40px;
}

.wf-ecosystem {
  padding-bottom: clamp(84px, 10vw, 140px);
}

.wf-eco-heading {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(30px, 5vw, 59px);
}

.wf-eco-heading--split {
  grid-template-columns: minmax(0, 1.6fr) minmax(245px, 0.75fr);
  align-items: end;
}

.wf-eco-heading h2 {
  font-family: var(--wf-display, var(--sans, system-ui));
  font-size: clamp(2.45rem, 6.15vw, 5.55rem);
  font-weight: 530;
  line-height: 0.99;
  letter-spacing: -0.068em;
  text-wrap: balance;
}

.wf-eco-heading em {
  font-style: normal;
  color: #205ec4;
}

.wf-eco-heading p {
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.55;
  color: var(--wf-muted, #405b7d);
  text-wrap: pretty;
  max-width: 36ch;
}

.wf-eco-heading--split p {
  padding-bottom: 4px;
}

.wf-join {
  --wf-join-progress: .28;
  position: relative;
  margin: 0;
  isolation: isolate;
}

.wf-join-stage {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(354px, 39vw, 515px);
  border-radius: clamp(20px, 3vw, 40px);
  padding: 45px 24px;
  border: 1px solid #bed9f6;
  background:
    radial-gradient(ellipse at 54% 80%, #86baff9c 0%, transparent 59%),
    radial-gradient(ellipse at 82% 11%, #b5d8ffba 0%, transparent 45%),
    linear-gradient(138deg, #f4f9ff 9%, #e6f3ff 42%, #cde4fe 85%);
}

.wf-join-current {
  position: absolute;
  pointer-events: none;
  z-index: -1;
  width: 120%;
  height: 56%;
  border-radius: 50%;
  border: 1px solid #fff9;
  box-shadow:
    0 0 0 12px #ffffff41,
    0 0 0 21px #d6e7fb70,
    0 0 0 22px #f8fbff6e,
    0 0 0 43px #78b5ff1b,
    0 15px 50px #e8f6ff8c;
  transform: translateY(calc((1 - var(--wf-join-progress)) * 38px)) rotate(-14deg);
}

.wf-join-current--first { top: 14%; left: -16%; }

.wf-join-current--second {
  top: 25%;
  left: 5%;
  opacity: .64;
  transform: translateY(calc(var(--wf-join-progress) * -40px)) rotate(12deg);
}

.wf-fragment {
  --wf-move-x: 0px;
  --wf-move-y: 0px;
  --wf-tilt: 0deg;
  position: absolute;
  z-index: 0;
  display: grid;
  justify-items: center;
  gap: 9px;
  min-width: 95px;
  padding: 14px 13px;
  border: 1px solid #fff;
  border-radius: 17px;
  color: #294d7b;
  background: #f9fcffdf;
  box-shadow: 0 14px 32px -15px #416a9e55;
  font-size: .825rem;
  font-weight: 630;
  white-space: nowrap;
  transform:
    translate(calc(var(--wf-move-x) * var(--wf-join-progress)), calc(var(--wf-move-y) * var(--wf-join-progress)))
    rotate(calc(var(--wf-tilt) * (1 - var(--wf-join-progress))))
    scale(calc(1 - var(--wf-join-progress) * .18));
  opacity: calc(1 - var(--wf-join-progress) * .30);
}

.wf-fragment--agenda { top: 19%; left: 10%; --wf-move-x: clamp(30px, 16vw, 210px); --wf-move-y: 57px; --wf-tilt: -13deg; }
.wf-fragment--messages { top: 60%; left: 5%; --wf-move-x: clamp(50px, 20vw, 245px); --wf-move-y: -27px; --wf-tilt: -7deg; }
.wf-fragment--sheet { top: 40%; right: 5%; --wf-move-x: clamp(-240px, -19vw, -35px); --wf-tilt: 14deg; }
.wf-fragment--docs { top: 17%; right: 17%; --wf-move-x: clamp(-150px, -12vw, -25px); --wf-move-y: 92px; --wf-tilt: 9deg; }
.wf-fragment--payment { right: 14%; bottom: 12%; --wf-move-x: clamp(-188px, -15vw, -26px); --wf-move-y: -45px; --wf-tilt: -8deg; }

.wf-symbol {
  display: block;
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 7px;
  border: 1px solid #bdd8fa;
  color: #215eb3;
  background: #e2efff;
}

.wf-symbol::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px solid currentColor;
}

.wf-symbol--calendar::after { border-radius: 2px; border-top-width: 4px; }
.wf-symbol--grid::after { background: linear-gradient(to right, transparent 43%, currentColor 43%, currentColor 57%, transparent 57%), linear-gradient(to bottom, transparent 43%, currentColor 43%, currentColor 57%, transparent 57%); }
.wf-symbol--messages::after { inset: 6px 5px 7px; border-radius: 5px 5px 5px 1px; }
.wf-symbol--document::after { inset-inline: 7px; border-radius: 1.5px; background: repeating-linear-gradient(to bottom, transparent 0 3px, #5c85c5 3px 4px); }
.wf-symbol--payment::after { inset: 7px 4px; border-radius: 2px; background: linear-gradient(transparent 25%, currentColor 25%, currentColor 42%, transparent 42%); }

.wf-record {
  width: min(100%, 380px);
  isolation: isolate;
  position: relative;
  z-index: 1;
  border: 1px solid #f7fbff;
  border-radius: 17px;
  overflow: hidden;
  background: #fafdff;
  box-shadow:
    0 0 0 7px #f9fcff65,
    0 24px 52px -25px #164b8d7d;
  transform: translateY(calc((1 - var(--wf-join-progress)) * 12px));
}

.wf-record-bar {
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  background: #eff6fe;
  border-bottom: 1px solid #ddeafb;
  color: #365379;
  font-size: .8125rem;
  font-weight: 600;
}

.wf-record-bar b {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #132d52;
  font-size: 1.15rem;
  letter-spacing: -.06em;
}

.wf-record-bar i {
  width: 18px;
  aspect-ratio: 473 / 432;
  background: currentColor;
  mask: url('/assets/we.png') center / contain no-repeat;
}

.wf-record-main { padding: 20px 18px 13px; }

.wf-record-patient {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  padding-bottom: 14px;
}

.wf-record-patient h3 {
  margin: 3px 0 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -.045em;
}

.wf-record-patient small, .wf-record-links dt { color: #4b6586; font-size: .8125rem; }
.wf-eco-status { padding: 5px 9px; border: 1px solid #cce0f7; border-radius: 6px; color: #254c79; font-size: .8125rem; white-space: nowrap; background: #edf6ff; }
.wf-record-links { margin: 0; }
.wf-record-links > div { min-height: 39px; border-top: 1px solid #deebf7; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wf-record-links dd { margin: 0; font-size: .875rem; font-weight: 620; text-align: right; }

.wf-join figcaption {
  padding-top: 13px;
  color: var(--wf-muted, #405b7d);
  font-size: .8125rem;
}

.wf-eco-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.55vw, 21px);
}

.wf-module {
  min-width: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: clamp(17px, 2vw, 24px);
  padding: clamp(19px, 3vw, 36px);
  border: 1px solid var(--wf-line, #d4e3f5);
  background: #fff;
}

.wf-module-copy h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -.048em;
}

.wf-module-copy p {
  margin-top: 8px;
  color: var(--wf-muted, #405b7d);
  font-size: 1rem;
  line-height: 1.48;
  text-wrap: pretty;
  max-width: 39ch;
}

.wf-module--schedule {
  display: grid;
  grid-column: span 7;
  grid-template-columns: .76fr 1fr;
  align-items: start;
  gap: clamp(12px, 2vw, 24px);
  min-height: 302px;
  background: radial-gradient(ellipse at 78% 95%, #b8d8fc 0%, transparent 67%), #f7fbff;
}

.wf-module--finance {
  display: grid;
  grid-column: span 5;
  gap: 22px;
  background: linear-gradient(137deg, #ebf5ff 13%, #deedff 75%, #cbdffd);
}

.wf-module--patients,
.wf-module--docs,
.wf-module--team {
  grid-column: span 4;
}

.wf-module--patients { background: #f5faff; }
.wf-module--docs { background: linear-gradient(154deg, #fff 0 28%, #ebf4ff 90%); }
.wf-module--team { background: #f8fbff; }

.wf-module--intelligence {
  grid-column: 1 / -1;
  min-height: 216px;
  display: grid;
  grid-template-columns: 1fr .74fr;
  align-items: center;
  gap: 30px;
  color: #fff;
  border-color: #213c64;
  background: radial-gradient(ellipse at 78% 220%, #367bdf 0%, transparent 73%), #10294d;
}

.wf-module--intelligence .wf-module-copy p { color: #c8defb; }

.wf-schedule-preview {
  overflow: hidden;
  border: 1px solid #cfdef0;
  background: #fafdff;
  border-radius: 13px;
  box-shadow: 0 22px 34px -24px #1a4f9074;
  transform: translateY(8px);
}

.wf-schedule-preview > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px;
  padding: 12px 11px;
  border-bottom: 1px solid #dce8f4;
}

.wf-schedule-preview > header div { display: grid; gap: 2px; }
.wf-schedule-preview > header strong { font-size: .875rem; }
.wf-schedule-preview > header small, .wf-schedule-preview > header > span { color: #4a6285; font-size: .75rem; }
.wf-calendar-days { display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 8px; gap: 2px; }
.wf-calendar-days span { display: grid; gap: 2px; text-align: center; padding: 4px 1px; font-size: .75rem; color: #4a6588; }
.wf-calendar-days b { color: #1c406f; }
.wf-calendar-days .wf-calendar-today { border-radius: 5px; color: #154783; background: #dcedff; }

.wf-calendar-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 8px 7px;
  padding: 7px 7px 7px 9px;
  border-radius: 5px;
  border-left: 3px solid #4c86da;
  background: #e1eeff;
  font-size: .8125rem;
}

.wf-calendar-entry div { display: grid; min-width: 0; }
.wf-calendar-entry time { font-variant-numeric: tabular-nums; color: #244978; }
.wf-calendar-entry span { color: #3d597b; font-size: .75rem; }
.wf-calendar-entry--light { border-left-color: #8bacd2; background: #eef5fd; }

.wf-balance {
  display: grid;
  gap: 4px;
}

.wf-balance > small { color: #3b587d; font-size: .875rem; }
.wf-balance > strong { font-size: clamp(2.35rem, 4.1vw, 3.75rem); font-weight: 570; line-height: 1; letter-spacing: -.064em; }

.wf-balance-track {
  height: 9px;
  background: #c4d5ee;
  overflow: hidden;
  border-radius: 99px;
  margin: 12px 0 4px;
}

.wf-balance-track i {
  display: block;
  width: 66.666%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6298f5, #2464ce);
}

.wf-balance dl { display: flex; justify-content: space-between; gap: 10px; margin: 0; }
.wf-balance dl div { display: grid; gap: 3px; }
.wf-balance dl div:last-child { text-align: right; }
.wf-balance dt { font-size: .8125rem; color: #445e7e; }
.wf-balance dd { font-size: .9375rem; font-weight: 650; margin: 0; }

.wf-mini-patient,
.wf-team-snapshot > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.wf-mini-patient {
  margin-top: 20px;
  padding: 11px 10px;
  border: 1px solid #d7e6f6;
  border-radius: 9px;
  background: #fff;
}

.wf-mini-patient > div:last-child,
.wf-timeline > div { display: grid; gap: 3px; }

.wf-initials {
  min-width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #244d83;
  background: #dcecff;
  font-size: .75rem;
  font-weight: 700;
}

.wf-mini-patient small,
.wf-timeline small,
.wf-doc small,
.wf-team-snapshot small { color: #4a6384; font-size: .8125rem; }

.wf-timeline {
  position: relative;
  display: flex;
  align-items: start;
  gap: 10px;
  margin: 14px 0 0 13px;
  font-size: .875rem;
}

.wf-timeline > span {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 100%;
  border: 2px solid #3779cc;
  background: #f0f7ff;
  box-shadow: 0 0 0 3px #d9eaff;
}

.wf-doc-stack { margin-top: 20px; display: grid; gap: 7px; }

.wf-doc {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  min-height: 47px;
  border: 1px solid #d7e6f6;
  border-radius: 7px;
  background: #fff;
}

.wf-doc img { width: 34px; height: 28px; object-fit: cover; background: #eff5fb; border-radius: 3px; }
.wf-doc > div { min-width: 0; display: grid; gap: 2px; font-size: .875rem; }

.wf-team-snapshot { margin-top: 19px; }
.wf-team-snapshot > div { min-height: 36px; border-bottom: 1px solid #dde7f3; padding-block: 5px; font-size: .875rem; }
.wf-team-snapshot small { margin-left: auto; text-align: right; }
.wf-team-snapshot .wf-initials { min-width: 25px; height: 25px; }
.wf-team-snapshot > div:nth-child(2) .wf-initials { background: #dfe9f6; }
.wf-team-snapshot > div:nth-child(3) .wf-initials { background: #e2e9ee; color: #344d62; }

.wf-source-preview {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 17px 19px;
  border: 1px solid #6e9ac887;
  border-radius: 11px;
  color: #f1f7ff;
  background: linear-gradient(140deg, #87bbf42e, #80adf20f);
}

.wf-source-preview span, .wf-source-preview small { color: #cce2ff; font-size: .875rem; }
.wf-source-preview b { font-size: clamp(1.5rem, 3vw, 2.6rem); font-weight: 580; line-height: 1; letter-spacing: -.045em; }

.wf-eco-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #ebf5ff;
  text-decoration-color: #86aedd;
  text-underline-offset: 4px;
  font-size: .875rem;
  font-weight: 600;
  transition: color 160ms, text-decoration-color 160ms;
}

.wf-eco-link:hover { color: #fff; text-decoration-color: #fff; }
.wf-eco-link:focus-visible { outline-color: #a1d0ff; }

@media (max-width: 1000px) {
  .wf-module--schedule { grid-template-columns: 1fr; }
  .wf-schedule-preview { transform: none; }
  .wf-module--finance { align-content: space-between; }
  .wf-module--patients, .wf-module--docs { grid-column: span 6; }
  .wf-module--team { grid-column: span 5; }
  .wf-module--intelligence { grid-column: span 7; grid-template-columns: 1fr; }
}

@media (max-width: 690px) {
  .wf-eco-heading--split { grid-template-columns: 1fr; align-items: start; }
  .wf-join-stage { padding: 70px 13px; min-height: 396px; }
  .wf-record { width: min(100%, 380px); transform: none; }
  .wf-record-bar { padding-inline: 11px; }
  .wf-record-main { padding-inline: 11px; }
  .wf-fragment { min-width: 0; display: flex; align-items: center; gap: 5px; padding: 5px 7px; font-size: .75rem; border-radius: 8px; --wf-move-x: 0px; }
  .wf-fragment .wf-symbol { width: 22px; height: 22px; }
  .wf-fragment .wf-symbol::after { inset: 5px; }
  .wf-fragment--agenda { top: 8%; left: 5%; --wf-move-y: 31px; }
  .wf-fragment--messages { top: 8%; left: auto; right: 6%; --wf-move-y: 33px; }
  .wf-fragment--payment { right: 5%; bottom: 9%; --wf-move-y: -28px; }
  .wf-fragment--docs { top: auto; right: auto; left: 9%; bottom: 8%; --wf-move-y: -26px; }
  .wf-fragment--sheet { display: none; }
  .wf-eco-grid { grid-template-columns: 1fr; }
  .wf-eco-grid .wf-module { grid-column: auto; }
  .wf-module--schedule { min-height: 0; }
  .wf-module--intelligence { gap: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .wf-join { --wf-join-progress: .42; }
  .wf-eco-link { transition: none; }
}

.wf-finance-open {
  justify-self: start;
  color: #1d4b83;
  text-decoration-color: #527eae;
}

.wf-finance-open:hover {
  color: #112e52;
  text-decoration-color: currentColor;
}

.wf-finance-open:focus-visible { outline-color: #1e5a9f; }

.wf-finance-dialog {
  width: min(1120px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: clamp(12px, 3vw, 27px);
  border: 1px solid #cedff1;
  border-radius: 16px;
  color: #081d3a;
  background: #f8fbff;
  box-shadow: 0 24px 65px #08224650;
}

.wf-finance-dialog::backdrop { background: #07162ed4; }

.wf-finance-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
}

.wf-finance-dialog header h3 { font-size: clamp(1rem, 2.1vw, 1.3rem); }

.wf-finance-dialog button {
  min-height: 44px;
  padding-inline: 12px;
  border: 1px solid #9db7d5;
  border-radius: 7px;
  color: #1a426b;
  background: #fff;
}

.wf-finance-dialog img {
  width: 100%;
  height: auto;
  border: 1px solid #d4e2f1;
  border-radius: 8px;
  background: #e7f0f9;
}

.wf-finance-dialog figcaption { margin-top: 12px; color: #405b7d; font-size: .875rem; }
.wf-finance-dialog figcaption a { display: inline-block; padding-block: 12px; font-weight: 600; }
body:has(.wf-finance-dialog[open]) { overflow: hidden; }
