.doctor-profile,
.doctor-profile-referral {
  --profile-ink: #101a31;
  --profile-muted: #485570;
  --profile-accent: #f9726c;
  --profile-paper: #f4f5f7;
  --profile-border: #dbe0e8;
  width: min(100% - 64px, 1280px);
  margin-inline: auto;
  color: var(--profile-ink);
}

.doctor-profile *,
.doctor-profile-referral * {
  box-sizing: border-box;
}
/* The shared fixed header does not reserve layout space. */
body.cesi-enhancements .doctor-profile {
  padding-block-start: 104px;
}
.doctor-profile :is(h1, h2, h3, p, figure, ol, ul) {
  margin: 0;
}
.doctor-profile p,
.doctor-profile li {
  line-height: 1.56;
}
.doctor-profile p {
  color: var(--profile-muted);
}
.doctor-profile a,
.doctor-profile-referral a {
  color: inherit;
  text-underline-offset: 4px;
}
.doctor-profile :is(a, button, summary):focus-visible,
.doctor-profile-referral a:focus-visible {
  outline: 2px solid #a43433;
  outline-offset: 4px;
}
.doctor-profile [id],
#viniry {
  scroll-margin-top: 115px;
}

.doctor-profile__breadcrumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 18px;
  font-size: 14px;
  color: var(--profile-muted);
}
.doctor-profile__hero {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  min-width: 0;
  border-radius: 30px;
  background: var(--profile-paper);
  overflow: hidden;
}
.doctor-profile__identity {
  align-self: center;
  padding: clamp(32px, 5vw, 75px);
}
.doctor-profile__eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.045em;
  color: #90413f;
  margin-bottom: 14px;
}
.doctor-profile h1 {
  font-size: clamp(37px, 4.7vw, 68px);
  font-weight: 550;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.doctor-profile h2 {
  font-size: clamp(30px, 3.7vw, 51px);
  font-weight: 550;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.doctor-profile h3 {
  font-size: 20px;
  font-weight: 650;
  line-height: 1.21;
}
.doctor-profile .doctor-profile__intro {
  font-size: clamp(17px, 1.55vw, 21px);
  margin-top: 22px;
  max-width: 55ch;
}
.doctor-profile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}
.doctor-profile__tags span {
  border: 1px solid var(--profile-border);
  padding: 7px 11px;
  border-radius: 18px;
  font-size: 13px;
}
.doctor-profile__tags span:first-child {
  background: white;
  font-weight: 650;
}
.doctor-profile__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 30px;
}
.doctor-profile .doctor-profile__booking {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 53px;
  padding: 10px 17px 10px 21px;
  color: var(--profile-ink) !important;
  background-color: var(--profile-accent) !important;
  border: 1px solid transparent;
  border-radius: 50px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}
.doctor-profile__booking span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #fff;
  color: var(--profile-ink);
}
.doctor-profile .doctor-profile__booking:is(:hover, :focus-visible) {
  background: #fa8882 !important;
}
.doctor-profile__actions a {
  font-size: 14px;
}
.doctor-profile .doctor-profile__location {
  margin-top: 17px;
  font-size: 13px;
}
.doctor-profile__portrait {
  align-self: stretch;
  min-width: 0;
  background: #e9e8e7;
}
.doctor-profile__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 690px;
  min-height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.doctor-profile__contents {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding: 22px 0;
  border-bottom: 1px solid var(--profile-border);
}
.doctor-profile__contents a {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.doctor-profile__contents a:hover {
  text-decoration: underline;
}
.doctor-profile__section {
  margin-top: clamp(54px, 7vw, 100px);
}
.doctor-profile__section h2 + :is(div, ol, ul) {
  margin-top: 26px;
}
.doctor-profile__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.doctor-profile__cards article {
  background: var(--profile-paper);
  padding: 26px;
  border-radius: 18px;
}
.doctor-profile__cards p,
.doctor-profile__steps p,
.doctor-profile__method-list p,
.doctor-profile__timeline p {
  margin-top: 9px;
}
.doctor-profile__methods {
  background: var(--profile-ink);
  color: #fff;
  border-radius: 25px;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(28px, 5vw, 68px);
}
.doctor-profile__methods :is(h2, h3) {
  color: #fff;
}
.doctor-profile__methods p {
  color: #dce3f1;
  margin-top: 12px;
}
.doctor-profile__methods .doctor-profile__eyebrow,
.doctor-profile__final .doctor-profile__eyebrow {
  color: #ffaaa5;
}
.doctor-profile__method-list article {
  border-top: 1px solid #536078;
  padding: 17px 0;
}
.doctor-profile__method-list article:first-child {
  border-top: 0;
  padding-top: 0;
}
.doctor-profile__method-list article:last-child {
  padding-bottom: 0;
}
.doctor-profile__chapter {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: 14px clamp(26px, 5vw, 66px);
  padding-block: clamp(22px, 3vw, 38px);
  border-top: 1px solid var(--profile-border);
}
.doctor-profile__chapter:last-child {
  border-bottom: 1px solid var(--profile-border);
}
.doctor-profile__chapter h3 {
  font-size: clamp(21px, 2.4vw, 33px);
  text-wrap: balance;
}
.doctor-profile__chapter-body {
  min-width: 0;
  max-width: 78ch;
}
.doctor-profile .doctor-profile__chapter-intro {
  color: var(--profile-ink);
  font-size: clamp(17px, 1.8vw, 21px);
}
.doctor-profile__chapter-body p + p {
  margin-top: 12px;
}
.doctor-profile__chapter-body ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 13px;
  padding: 0;
  list-style: none;
}
.doctor-profile__chapter-body a {
  display: inline-block;
  padding-block: 5px;
  text-decoration-color: #a43433;
}
.doctor-profile .doctor-profile__media {
  margin-top: 21px;
}
.doctor-profile__media :is(img, video) {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: min(58vh, 520px);
  object-fit: contain;
  border-radius: 14px;
  background: var(--profile-paper);
}
.doctor-profile__media video {
  background: var(--profile-ink);
  width: min(100%, 460px);
}
.doctor-profile__media figcaption {
  color: var(--profile-muted);
  font-size: 14px;
  line-height: 1.45;
  margin-top: 8px;
}
.doctor-profile__steps {
  list-style: none;
  padding: 0;
  counter-reset: visit;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 16px;
}
.doctor-profile__steps li {
  padding: 22px 20px 12px;
  border-top: 1px solid var(--profile-border);
  counter-increment: visit;
}
.doctor-profile__steps li::before {
  content: '0' counter(visit);
  display: block;
  color: #90413f;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 14px;
}
.doctor-profile__prepare,
.doctor-profile__team {
  background: var(--profile-paper);
  padding: 22px 26px;
  border-radius: 18px;
  margin-top: 25px;
}
.doctor-profile__prepare ul {
  padding-left: 21px;
  margin-top: 10px;
}
.doctor-profile__prepare li + li {
  margin-top: 5px;
}
.doctor-profile__team p {
  margin-top: 8px;
  max-width: 82ch;
}
.doctor-profile__practice,
.doctor-profile__visit-extras:has(.doctor-profile__media) {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.63fr);
  gap: clamp(22px, 4vw, 48px);
}
.doctor-profile__practice > .doctor-profile__media {
  width: min(100%, 360px);
  margin-top: 0;
}
.doctor-profile__visit-extras .doctor-profile__media {
  width: min(100%, 530px);
}
.doctor-profile__timeline {
  list-style: none;
  padding: 0;
}
.doctor-profile__timeline li {
  border-bottom: 1px solid var(--profile-border);
  display: grid;
  grid-template-columns: minmax(100px, 0.24fr) minmax(0, 1fr);
  gap: 17px;
  padding: 17px 0;
}
.doctor-profile__year {
  font-size: 15px;
  color: #90413f;
  font-weight: 650;
}
.doctor-profile__timeline h3 {
  font-size: 18px;
}
.doctor-profile .doctor-profile__source {
  font-size: 14px;
}
.doctor-profile .doctor-profile__training-title {
  margin-top: 30px;
}
.doctor-profile__disclosure {
  border: 1px solid var(--profile-border);
  padding: 0 19px;
  margin-top: 16px;
  border-radius: 16px;
}
.doctor-profile summary {
  cursor: pointer;
  padding: 15px 0;
  min-height: 44px;
  font-weight: 650;
}
.doctor-profile summary::marker {
  color: #a33a37;
}
.doctor-profile__disclosure .doctor-profile__timeline {
  padding-bottom: 12px;
}

.doctor-profile__documents {
  margin-top: 38px;
}
.doctor-profile__documents > p {
  margin-top: 8px;
}
.doctor-profile__document-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-top: 16px;
}
.doctor-profile__disclosure .doctor-profile__document-grid {
  padding-bottom: 17px;
}
.doctor-profile__document {
  min-width: 0;
}
.doctor-profile__document a {
  display: grid;
  position: relative;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 1.38;
  border: 1px solid var(--profile-border);
  border-radius: 13px;
  background: var(--profile-paper);
  padding: 8px;
}
.doctor-profile__document img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.doctor-profile__document a span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  color: #fff;
  background: var(--profile-ink);
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 12px;
}
.doctor-profile__document figcaption {
  padding: 9px 1px 2px;
  overflow-wrap: anywhere;
  line-height: 1.35;
  font-size: 14px;
}
.doctor-profile__document figcaption small {
  display: block;
  color: var(--profile-muted);
  margin-top: 4px;
  font-size: 12px;
}
.doctor-profile__viewer {
  color: var(--profile-ink);
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(94vw, 1000px);
  max-height: 93vh;
  max-height: 93dvh;
  padding: 14px;
  border: 0;
  border-radius: 18px;
  overflow: auto;
  background: #fff;
}
.doctor-profile__viewer::backdrop {
  background: rgb(16 26 49 / 0.8);
}
.doctor-profile__viewer img {
  display: block;
  margin-inline: auto;
  width: 100%;
  max-height: 73vh;
  max-height: 73dvh;
  object-fit: contain;
}
.doctor-profile__viewer figcaption {
  padding: 10px 0 5px;
  white-space: pre-line;
}
.doctor-profile__viewer button {
  position: sticky;
  top: 0;
  float: right;
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  border: 1px solid var(--profile-border);
  background: #fff;
  color: var(--profile-ink);
  cursor: pointer;
  font-size: 26px;
  z-index: 1;
}
.doctor-profile__viewer [data-profile-original] {
  display: inline-block;
  padding: 6px 0;
}
html:has(.doctor-profile__viewer[open]) {
  overflow: hidden;
}

.doctor-profile__faq details {
  border-top: 1px solid var(--profile-border);
}
.doctor-profile__faq details:last-child {
  border-bottom: 1px solid var(--profile-border);
}
.doctor-profile__faq p {
  max-width: 76ch;
  padding: 0 0 15px;
}
.doctor-profile__related ul {
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.doctor-profile__related a {
  display: inline-block;
  padding: 8px 0;
}
.doctor-profile__final {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  border-radius: 24px;
  background: var(--profile-ink);
  color: #fff;
  padding: clamp(25px, 4vw, 54px);
  margin-bottom: 55px;
}
.doctor-profile__final :is(h2, a) {
  color: #fff;
}
.doctor-profile__final p {
  color: #dce3f1;
  margin-top: 10px;
}
.doctor-profile__final > div:last-child {
  display: grid;
  gap: 12px;
  justify-items: start;
  flex: 0 0 auto;
}
.doctor-profile-referral {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  border-radius: 17px;
  background: var(--profile-paper);
  margin-block: 22px 45px;
  padding: 20px 25px;
}
.doctor-profile-referral a {
  font-weight: 650;
}
body.cesi-enhancements:has(#cesi-doctor-profile) .cesi-booking .cesi-booking__back[hidden] {
  display: none !important;
}
body.cesi-enhancements .cesi-booking[data-cesi-named-booking] [data-booking-header-help] {
  display: block;
}

@media (max-width: 1000px) {
  .doctor-profile,
  .doctor-profile-referral {
    width: min(100% - 40px, 1280px);
  }
  .doctor-profile__identity {
    padding: 31px;
  }
  .doctor-profile__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .doctor-profile,
  .doctor-profile-referral {
    width: calc(100% - 28px);
  }
  .doctor-profile [id],
  #viniry {
    scroll-margin-top: 88px;
  }
  .doctor-profile__hero {
    grid-template-columns: 1fr;
    border-radius: 19px;
  }
  .doctor-profile__identity {
    padding: 23px;
  }
  .doctor-profile h1 {
    font-size: clamp(33px, 8.3vw, 46px);
  }
  .doctor-profile__portrait {
    max-height: 430px;
  }
  .doctor-profile__portrait img {
    height: min(104vw, 430px);
    min-height: 0;
    object-position: center 22%;
  }
  .doctor-profile__actions {
    margin-top: 22px;
  }
  .doctor-profile__contents {
    gap: 12px 16px;
    padding-block: 17px;
  }
  .doctor-profile__cards,
  .doctor-profile__methods,
  .doctor-profile__chapter,
  .doctor-profile__practice,
  .doctor-profile__visit-extras:has(.doctor-profile__media),
  .doctor-profile__steps {
    grid-template-columns: 1fr;
  }
  .doctor-profile__visit-extras .doctor-profile__media {
    margin-top: 0;
  }
  .doctor-profile__cards article {
    padding: 20px;
  }
  .doctor-profile__methods {
    border-radius: 19px;
  }
  .doctor-profile__steps li {
    padding-inline: 0;
  }
  .doctor-profile__timeline li {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .doctor-profile__document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .doctor-profile__document a span {
    font-size: 10px;
  }
  .doctor-profile__final {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 639px) {
  body.cesi-enhancements .doctor-profile {
    padding-block-start: 80px;
  }
}
