.codex-rewrite.inner-page {
  background: #fff;
  color: var(--ink);
}

.codex-rewrite .inner-main {
  overflow: hidden;
  background: #fff;
}

.codex-rewrite .inner-hero {
  position: relative;
  min-height: 310px;
  display: grid;
  place-items: center;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(246, 241, 233, .94), rgba(246, 241, 233, .66)),
    url('/static/img/2024/01/醫療團隊.jpg') center / cover;
}

.codex-rewrite .inner-hero__inner {
  width: min(100%, 1120px);
  padding: 74px 28px;
}

.codex-rewrite .inner-hero__eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .16em;
}

.codex-rewrite .inner-hero__title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.25;
}

.codex-rewrite .inner-content {
  width: 100%;
  padding: 0 0 80px;
}

.codex-rewrite .inner-content.container { max-width: none; }

.codex-rewrite .inner-content .post-content {
  margin: 0;
}

.codex-rewrite .inner-content .fg-section {
  position: relative;
  isolation: isolate;
  padding: clamp(56px, 7vw, 96px) 0;
  overflow: hidden;
}

.codex-rewrite .inner-content .fg-bg {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 0;
  pointer-events: none;
}

.codex-rewrite .inner-content .fg-bg-layer {
  position: absolute;
  inset: 0;
  display: block;
}

.codex-rewrite .inner-content .fg-section > :not(.fg-bg),
.codex-rewrite .inner-content .fg-col > :not(.fg-bg),
.codex-rewrite .inner-content .fg-wrapper > :not(.fg-bg) {
  position: relative;
  z-index: 1;
}

.codex-rewrite .inner-content .fg-col,
.codex-rewrite .inner-content .fg-wrapper { position: relative; }

.codex-rewrite .inner-content .text-center { text-align: center; }
.codex-rewrite .inner-content .text-left { text-align: left; }

.codex-rewrite .inner-content .fg-text-light,
.codex-rewrite .inner-content .fg-text-light p,
.codex-rewrite .inner-content .fg-text-light h1,
.codex-rewrite .inner-content .fg-text-light h2,
.codex-rewrite .inner-content .fg-text-light h3,
.codex-rewrite .inner-content .fg-text-light h4 {
  color: rgba(255, 255, 255, .94);
}

.codex-rewrite .inner-content .fg-container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding-inline: 24px;
}

.codex-rewrite .inner-content .fg-container-medium { max-width: 970px; }
.codex-rewrite .inner-content .fg-container-large { max-width: 1170px; }
.codex-rewrite .inner-content .fg-container-fluid,
.codex-rewrite .inner-content .fg-container-no-padding {
  max-width: none;
  padding-inline: 0;
}

.codex-rewrite .inner-content .fg-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.codex-rewrite .inner-content .fg-col { min-width: 0; }
.codex-rewrite .inner-content .col-xs-12 { grid-column: 1 / -1; }
.codex-rewrite .inner-content .col-xs-3 { grid-column: span 3; }
.codex-rewrite .inner-content .col-xs-4 { grid-column: span 4; }
.codex-rewrite .inner-content .col-xs-6 { grid-column: span 6; }
.codex-rewrite .inner-content .col-md-3 { grid-column: span 3; }
.codex-rewrite .inner-content .col-md-4 { grid-column: span 4; }
.codex-rewrite .inner-content .col-md-5 { grid-column: span 5; }
.codex-rewrite .inner-content .col-md-6 { grid-column: span 6; }
.codex-rewrite .inner-content .col-md-7 { grid-column: span 7; }
.codex-rewrite .inner-content .col-md-12 { grid-column: 1 / -1; }

.codex-rewrite .inner-content img {
  display: block;
  max-width: 100%;
  height: auto;
}

.codex-rewrite .inner-content .fg-paragraph,
.codex-rewrite .inner-content .fg-wrapper {
  max-width: none;
}

.codex-rewrite .inner-content p {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.95;
}

.codex-rewrite .inner-content p:first-child { color: var(--ink); }
.codex-rewrite .inner-content strong { color: var(--ink); }

.codex-rewrite .inner-content .ff-custom-slider-2,
.codex-rewrite .inner-content .ff-one-owl-carousel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.codex-rewrite .inner-content .ff-one-owl-carousel .item { min-width: 0; }

@media (max-width: 820px) {
  .codex-rewrite .inner-hero { min-height: 250px; }
  .codex-rewrite .inner-hero__inner { padding: 56px 20px; }
  .codex-rewrite .inner-hero__title { font-size: 32px; }
  .codex-rewrite .inner-content { padding: 0 20px 64px; }
  .codex-rewrite .inner-content .fg-section { padding-block: 54px; }
  .codex-rewrite .inner-content .fg-container { padding-inline: 0; }
  .codex-rewrite .inner-content .fg-row { grid-template-columns: 1fr; gap: 28px; }
  .codex-rewrite .inner-content .col-md-3,
  .codex-rewrite .inner-content .col-md-4,
  .codex-rewrite .inner-content .col-md-5,
  .codex-rewrite .inner-content .col-md-6,
  .codex-rewrite .inner-content .col-md-7,
  .codex-rewrite .inner-content .col-md-12 { grid-column: 1; }
  .codex-rewrite .inner-content p { font-size: 16px; line-height: 1.85; }
  .codex-rewrite .inner-content .ff-custom-slider-2,
  .codex-rewrite .inner-content .ff-one-owl-carousel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Certification page: keep the title, certificate rails, and mentor rails
   visually grouped instead of stretching each row with the global grid gap. */
.codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-carousel-section > .fg-container > .fg-row {
  row-gap: 16px !important;
}

.codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-carousel-section > .fg-container > .fg-row > .fg-col {
  padding-block: 0 !important;
}

.codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-carousel-section .codex-content-heading {
  margin-top: 24px !important;
  margin-bottom: 12px !important;
}

.codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-carousel-section .divider-v1 {
  margin-top: 24px !important;
  margin-bottom: 12px !important;
}

/* Certification page: the source builder leaves an empty 4-column slot
   between the image rail and its notes.  Keep this article in one clear flow
   and use the requested 5px media rhythm. */
.codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-prose-section > .fg-container > .fg-row {
  gap: 5px !important;
}

.codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-prose-section > .fg-container > .fg-row > .fg-col:empty {
  display: none !important;
}

.codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-prose-section .fg-paragraph > ul {
  margin-top: 5px !important;
  margin-bottom: 5px !important;
}

.codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-carousel-section > .fg-container > .fg-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-carousel-section > .fg-container > .fg-row > .fg-col {
  flex: 0 0 auto !important;
  width: 100% !important;
  grid-column: auto !important;
}

.codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-carousel-section .ff-one-owl-carousel {
  gap: 5px !important;
}

@media (min-width: 821px) {
  .codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-carousel-section .ff-one-owl-carousel > .item {
    flex: 0 0 calc((100% - 10px) / 3) !important;
    width: calc((100% - 10px) / 3) !important;
    min-width: calc((100% - 10px) / 3) !important;
  }
}

@media (max-width: 820px) {
  .codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-carousel-section .ff-one-owl-carousel > .item {
    flex: 0 0 calc((100% - 5px) / 2) !important;
    width: calc((100% - 5px) / 2) !important;
    min-width: calc((100% - 5px) / 2) !important;
  }
}

@media (max-width: 820px) {
  .codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-carousel-section > .fg-container > .fg-row {
    row-gap: 12px !important;
  }

  .codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-carousel-section .codex-content-heading {
    margin-top: 20px !important;
    margin-bottom: 10px !important;
  }

  .codex-rewrite.clinic-dental-implant-certification-page .inner-content .codex-carousel-section .divider-v1 {
    margin-top: 18px !important;
    margin-bottom: 10px !important;
  }
}

@media (min-width: 821px) {
  .codex-rewrite .inner-content .text-md-left { text-align: left; }
  .codex-rewrite .inner-content .col-sm-3 { grid-column: span 3; }
  .codex-rewrite .inner-content .col-sm-4 { grid-column: span 4; }
  .codex-rewrite .inner-content .col-sm-6 { grid-column: span 6; }
  .codex-rewrite .inner-content .col-sm-12 { grid-column: 1 / -1; }
  .codex-rewrite .inner-content .hidden-md,
  .codex-rewrite .inner-content .hidden-lg { display: none !important; }
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content .hidden-xs,
  .codex-rewrite .inner-content .hidden-sm { display: none !important; }
}

/* -------------------------------------------------------------------------
   Static page-builder replacement
   The original page builder supplied these heights and carousel rules with
   JavaScript.  Keep them in CSS so the copied pages render without WordPress.
   ------------------------------------------------------------------------- */
.codex-rewrite .inner-content [data-fg-height] {
  min-height: var(--fg-height-lg, auto);
}

.codex-rewrite .inner-content .fg-row {
  align-items: start;
  gap: clamp(32px, 5vw, 72px);
}

.codex-rewrite .inner-content .fg-section {
  padding-block: clamp(68px, 7vw, 104px);
}

.codex-rewrite .inner-content .fg-section.codex-carousel-section {
  padding-block: 0;
}

.codex-rewrite .inner-content .fg-container {
  padding-inline: 28px;
}

.codex-rewrite .inner-content .fg-bg,
.codex-rewrite .inner-content .fg-bg-layer {
  min-height: 100%;
}

.codex-rewrite .inner-content .ff-owl-carousel {
  display: block;
  width: 100%;
}

.codex-rewrite .inner-content .ff-one-owl-carousel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: 100%;
}

.codex-rewrite .inner-content .ff-one-owl-carousel > .item {
  min-width: 0;
  min-height: var(--fg-height-lg, 300px);
  overflow: hidden;
}

.codex-rewrite .inner-content .ff-one-owl-carousel > .item > .fg-wrapper,
.codex-rewrite .inner-content .ff-one-owl-carousel > .item > .fg-wrapper .fg-bg,
.codex-rewrite .inner-content .ff-one-owl-carousel > .item > .fg-wrapper .fg-bg-layer {
  min-height: var(--fg-height-lg, 300px);
  height: 100%;
}

.codex-rewrite .inner-content .fg-paragraph p,
.codex-rewrite .inner-content .fg-richtext p,
.codex-rewrite .inner-content .fg-col > p {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: .015em;
}

.codex-rewrite .inner-content .fg-section:not(.codex-doctor-section) .fg-paragraph.text-center:not(.codex-doctor-role):not(.codex-doctor-name):not(.codex-doctor-specialty) p,
.codex-rewrite .inner-content .codex-source-heading {
  margin: 0 0 30px;
  color: var(--ink);
  font-size: clamp(25px, 2.8vw, 36px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .04em;
}

.codex-rewrite .inner-content .codex-empty-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.codex-rewrite .inner-content .fg-heading.codex-content-heading {
  margin: 0 0 28px;
  padding-left: 18px;
  border-left: 4px solid var(--gold);
  color: var(--ink);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.45;
}

.codex-rewrite .inner-content .codex-doctor-section .fg-row {
  align-items: start;
}

.codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-5 {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-5 > img,
.codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-5 > .fg-wrapper {
  width: min(100%, 430px);
  margin-inline: auto;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(58, 49, 42, .12);
}

.codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-5 > img {
  object-fit: cover;
}

.codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-5 > .fg-wrapper {
  overflow: hidden;
}

.codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-5 > .fg-wrapper:not(:has(> img)) {
  background: transparent;
  box-shadow: none;
}

@media (min-width: 821px) {
  .codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-5 > .fg-wrapper:has(> img.hidden-md.hidden-lg) {
    background: transparent;
    box-shadow: none;
  }
}

/* Shared article and archive system ------------------------------------------------
   The remaining WordPress routes use the same restrained reading rhythm as the
   redesigned core pages. Source content stays in place; these rules only give
   it a predictable hierarchy, measure and image cadence. */
body.codex-rewrite .inner-content .codex-generic-content {
  color: var(--ink-soft);
}

body.codex-rewrite .inner-content .codex-generic-content .fg-section {
  margin: 0;
  padding: clamp(34px, 5vw, 76px) 0;
}

body.codex-rewrite .inner-content .codex-generic-content .codex-breadcrumb-section {
  padding: 20px 0 14px;
  border: 0 !important;
}

body.codex-rewrite .inner-content .codex-generic-content .codex-breadcrumb-section + .fg-section {
  border-top: 0 !important;
}

body.codex-rewrite .inner-content .codex-generic-content .fg-heading.codex-content-heading,
body.codex-rewrite .inner-content .codex-generic-content h1.codex-content-heading,
body.codex-rewrite .inner-content .codex-generic-content .codex-source-heading {
  max-width: 100%;
  margin: 0 0 24px;
  padding-left: 16px;
  border-left: 3px solid #c89a5b;
  color: var(--ink);
  font-size: clamp(24px, 2.25vw, 34px);
  font-weight: 700;
  line-height: 1.36;
  letter-spacing: .02em;
}

body.codex-rewrite .inner-content .codex-generic-content .fg-paragraph p,
body.codex-rewrite .inner-content .codex-generic-content .fg-richtext p,
body.codex-rewrite .inner-content .codex-generic-content .fg-col > p {
  max-width: none;
  margin: 0 0 1.25em;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.9;
  letter-spacing: .012em;
}

body.codex-rewrite .inner-content .codex-generic-content .fg-paragraph p:last-child,
body.codex-rewrite .inner-content .codex-generic-content .fg-richtext p:last-child,
body.codex-rewrite .inner-content .codex-generic-content .fg-col > p:last-child {
  margin-bottom: 0;
}

body.codex-rewrite .inner-content .codex-generic-content .codex-article-image,
body.codex-rewrite .inner-content .codex-generic-content .fg-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0;
}

body.codex-rewrite .inner-content .codex-generic-content .fg-section:has(.codex-article-image, .fg-bg-type-image) + .fg-section,
body.codex-rewrite .inner-content .codex-generic-content .fg-section:has(.fg-paragraph) + .fg-section:has(.codex-article-image, .fg-bg-type-image) {
  padding-top: clamp(18px, 3vw, 42px);
}

body.codex-rewrite .inner-content .codex-archive-content {
  padding: clamp(42px, 6vw, 82px) 0 clamp(56px, 7vw, 100px);
}

body.codex-rewrite .inner-content .codex-archive-title {
  margin: 0 0 38px;
  padding-left: 16px;
  border-left: 3px solid #c89a5b;
  color: var(--ink);
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.25;
  letter-spacing: .03em;
}

body.codex-rewrite .inner-content .codex-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

body.codex-rewrite .inner-content .codex-archive-card {
  overflow: hidden;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(58, 49, 42, .12);
  background: #fff;
  box-shadow: 0 12px 26px rgba(50, 41, 33, .09);
  transition: transform .2s ease, box-shadow .2s ease;
}

body.codex-rewrite .inner-content .codex-archive-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(50, 41, 33, .14);
}

body.codex-rewrite .inner-content .codex-archive-card .ff-post-featured-image-link-wrapper {
  display: block;
  overflow: hidden;
  background: #eee9e2;
  aspect-ratio: 4 / 3;
}

body.codex-rewrite .inner-content .codex-archive-card .ff-post-featured-image {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

body.codex-rewrite .inner-content .codex-archive-card .blog-grid-box-shadow {
  min-height: 0;
  box-shadow: none;
}

body.codex-rewrite .inner-content .codex-archive-card .blog-grid-content {
  padding: 17px 14px 18px;
}

body.codex-rewrite .inner-content .codex-archive-card .blog-grid-title-md,
body.codex-rewrite .inner-content .codex-archive-card .blog-grid-title-md a {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  text-decoration: none;
}

body.codex-rewrite .inner-content .codex-archive-card .blog-grid-separator {
  display: none;
}

@media (max-width: 767px) {
  body.codex-rewrite .inner-content .codex-generic-content .fg-section {
    padding: 32px 0;
  }

  body.codex-rewrite .inner-content .codex-generic-content .codex-breadcrumb-section {
    padding: 16px 0 10px;
  }

  body.codex-rewrite .inner-content .codex-generic-content .fg-heading.codex-content-heading,
  body.codex-rewrite .inner-content .codex-generic-content h1.codex-content-heading,
  body.codex-rewrite .inner-content .codex-generic-content .codex-source-heading {
    margin-bottom: 18px;
    padding-left: 12px;
    font-size: 24px;
  }

  body.codex-rewrite .inner-content .codex-generic-content .fg-paragraph p,
  body.codex-rewrite .inner-content .codex-generic-content .fg-richtext p,
  body.codex-rewrite .inner-content .codex-generic-content .fg-col > p {
    font-size: 17px;
    line-height: 1.82;
  }

  body.codex-rewrite .inner-content .codex-archive-content {
    padding: 34px 0 52px;
  }

  body.codex-rewrite .inner-content .codex-archive-title {
    margin-bottom: 24px;
    padding-left: 12px;
    font-size: 29px;
  }

  body.codex-rewrite .inner-content .codex-archive-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-5 > .fg-wrapper .fg-bg,
.codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-5 > .fg-wrapper .fg-bg-layer {
  border-radius: inherit;
}

.codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-7 {
  padding-top: 6px;
}

.codex-rewrite .inner-content .codex-doctor-section .codex-doctor-role,
.codex-rewrite .inner-content .codex-doctor-section .codex-doctor-name,
.codex-rewrite .inner-content .codex-doctor-section .codex-doctor-specialty {
  text-align: left;
}

.codex-rewrite .inner-content .codex-doctor-section .codex-doctor-role p {
  margin-bottom: 4px;
  color: var(--accent-dark);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.codex-rewrite .inner-content .codex-doctor-section .codex-doctor-name p,
.codex-rewrite .inner-content .codex-doctor-section > .fg-container .fg-col.col-md-7 > .codex-doctor-name {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.3;
}

.codex-rewrite .inner-content .codex-doctor-section .codex-doctor-specialty p {
  margin-bottom: 24px;
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

.codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-7 > p.codex-doctor-name {
  margin-bottom: 18px;
}

@media (min-width: 821px) and (max-width: 1199px) {
  .codex-rewrite .inner-content .ff-one-owl-carousel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .codex-rewrite .inner-content [data-fg-height] {
    min-height: var(--fg-height-md, var(--fg-height-lg, auto));
  }
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content {
    padding: 0 0 64px;
  }

  .codex-rewrite .inner-content .fg-section {
    padding-block: 52px;
  }

  .codex-rewrite .inner-content .fg-container {
    padding-inline: 20px;
  }

  .codex-rewrite .inner-content [data-fg-height] {
    min-height: var(--fg-height-xs, auto);
  }

  .codex-rewrite .inner-content .ff-one-owl-carousel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .codex-rewrite .inner-content .ff-one-owl-carousel > .item,
  .codex-rewrite .inner-content .ff-one-owl-carousel > .item > .fg-wrapper,
  .codex-rewrite .inner-content .ff-one-owl-carousel > .item > .fg-wrapper .fg-bg,
  .codex-rewrite .inner-content .ff-one-owl-carousel > .item > .fg-wrapper .fg-bg-layer {
    min-height: var(--fg-height-xs, 200px);
  }

  .codex-rewrite .inner-content .fg-paragraph p,
  .codex-rewrite .inner-content .fg-richtext p,
  .codex-rewrite .inner-content .fg-col > p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.85;
  }

  .codex-rewrite .inner-content .fg-section:not(.codex-doctor-section) .fg-paragraph.text-center:not(.codex-doctor-role):not(.codex-doctor-name):not(.codex-doctor-specialty) p,
  .codex-rewrite .inner-content .codex-source-heading {
    margin-bottom: 22px;
    font-size: 24px;
    line-height: 1.5;
  }

  .codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-5 > img,
  .codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-5 > .fg-wrapper {
    width: min(100%, 360px);
    border-radius: 16px;
  }

  .codex-rewrite .inner-content .codex-doctor-section .fg-col.col-md-7 {
    padding-top: 0;
  }

  .codex-rewrite .inner-content .codex-doctor-section .text-center {
    text-align: left;
  }

  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-name p,
  .codex-rewrite .inner-content .codex-doctor-section > .fg-container .fg-col.col-md-7 > .codex-doctor-name {
    font-size: 30px;
  }
}

/* -------------------------------------------------------------------------
   Editorial type system + real horizontal media rails
   ------------------------------------------------------------------------- */
.codex-rewrite .inner-content {
  --copy-space: clamp(16px, 1.8vw, 24px);
  --section-space: clamp(44px, 5vw, 64px);
  --type-body: 18px;
  max-width: 1110px;
  padding-inline: 15px;
}

.codex-rewrite .inner-content .fg-section {
  padding-block: var(--section-space);
}

.codex-rewrite .inner-content .fg-section + .fg-section {
  border-top: 1px solid rgba(59, 54, 50, .035);
}

/* Shared editorial reading rules.  These classes are added by the generator
   on every non-carousel content row, so introduction pages and article-like
   sections use the same hierarchy instead of accumulating one-off fixes. */
.codex-rewrite .inner-content .codex-prose-section:not(.codex-doctor-section) .fg-paragraph p,
.codex-rewrite .inner-content .codex-prose-section:not(.codex-doctor-section) .fg-richtext p,
.codex-rewrite .inner-content .codex-prose-section:not(.codex-doctor-section) .fg-col > p {
  /* The shared 1110px content rail is the reading measure.  Do not apply a
     second narrow cap here: it makes source paragraphs wrap early and breaks
     the intended handoff between adjacent editorial sections. */
  max-width: none;
  margin-bottom: var(--copy-space);
  color: var(--ink);
  font-size: var(--type-body);
  line-height: 1.82;
  letter-spacing: .018em;
}

/* A single unheaded paragraph is an editorial afterword, not a full chapter.
   Keeping it compact preserves the visual handoff to the next section. */
.codex-rewrite .inner-content .codex-prose-section--brief {
  padding-block: 20px;
}

.codex-rewrite .inner-content .codex-prose-section--brief .fg-paragraph p:last-child,
.codex-rewrite .inner-content .codex-prose-section--brief .fg-richtext p:last-child,
.codex-rewrite .inner-content .codex-prose-section--brief .fg-col > p:last-child {
  margin-bottom: 0;
}

/* Respect the source's pale-gray chapter breaks and make them visible across
   the full section. This is intentionally restrained, matching the clinic's
   white, timber and warm-neutral interior palette. */
.codex-rewrite .inner-content .codex-surface-muted {
  border-top-color: transparent;
}

.codex-rewrite .inner-content .codex-surface-muted > .fg-bg > .fg-bg-layer[style*="#f7f8fa"] {
  background-color: #f7f8fa !important;
}

.codex-rewrite .inner-content .fg-heading,
.codex-rewrite .inner-content .codex-source-heading {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: .035em;
  text-wrap: balance;
}

.codex-rewrite .inner-content .fg-heading {
  font-size: clamp(28px, 2.7vw, 34px);
  line-height: 1.4;
}

.codex-rewrite .inner-content .fg-paragraph p,
.codex-rewrite .inner-content .fg-richtext p,
.codex-rewrite .inner-content .fg-col > p {
  max-width: none;
  margin-bottom: var(--copy-space);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.78;
  letter-spacing: .018em;
}

.codex-rewrite .inner-content .fg-image {
  margin-block: 0 var(--copy-space);
}

.codex-rewrite .inner-content .fg-container {
  max-width: 1110px;
  padding-inline: 15px;
}

.codex-rewrite .inner-content .fg-container-fluid {
  width: 100vw;
  max-width: none;
  margin-inline: calc(50% - 50vw);
  padding-inline: 0;
}

/* Inner pages share a contact module after the article body.  This is a
   separate page component, not part of the compact copyright footer. */
.codex-rewrite .inner-content .codex-contact-module {
  margin-top: clamp(56px, 8vw, 112px);
  border-top: 1px solid rgba(59, 54, 50, .12);
}

.codex-rewrite .inner-content .codex-contact-area {
  margin-inline: -15px;
  background: transparent;
}

.codex-rewrite .codex-contact-module__form {
  background: #f7f8fa;
}

.codex-rewrite .codex-contact-module__address {
  background: #eeeae4;
}

.codex-rewrite .codex-contact-area .fg-section,
.codex-rewrite .codex-contact-section {
  padding-block: clamp(56px, 7vw, 96px);
}

.codex-rewrite .codex-contact-area .fg-container,
.codex-rewrite .codex-contact-section .fg-container {
  max-width: 1110px;
  margin-inline: auto;
  padding-inline: 15px;
}

.codex-rewrite .codex-contact-area .fg-row,
.codex-rewrite .codex-contact-section .fg-row {
  align-items: start;
}

.codex-rewrite .codex-contact-area .fg-heading,
.codex-rewrite .codex-contact-section .fg-heading {
  margin-bottom: 28px;
  padding-left: 18px;
  border-left: 4px solid var(--gold);
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.35;
}

.codex-rewrite .codex-contact-area .fg-paragraph p,
.codex-rewrite .codex-contact-section .fg-paragraph p {
  max-width: none;
}

/* Keep the original Quform field treatment and density.  The shared source
   stylesheet already carries the clinic's pale-gray form, dark text and
   outlined fields; adding a new card here made the footer unnecessarily tall. */
.codex-rewrite .codex-contact-area form,
.codex-rewrite .codex-contact-section form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.codex-rewrite .codex-contact-area .quform-label-text,
.codex-rewrite .codex-contact-section .quform-label-text {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.codex-rewrite .codex-contact-area .quform-field,
.codex-rewrite .codex-contact-section .quform-field {
  box-sizing: border-box;
  width: 100%;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid rgba(59, 54, 50, .22);
  border-radius: 0;
  background: #f7f8fa;
  color: var(--ink);
  font: inherit;
}

.codex-rewrite .codex-contact-area .quform-element-row,
.codex-rewrite .codex-contact-section .quform-element-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.codex-rewrite .codex-contact-area .quform-spacer,
.codex-rewrite .codex-contact-section .quform-spacer {
  margin-bottom: 5px;
  padding-bottom: 5px;
}

.codex-rewrite .codex-contact-area .quform-child-elements > .quform-element > .quform-spacer,
.codex-rewrite .codex-contact-section .quform-child-elements > .quform-element > .quform-spacer {
  padding-bottom: 15px;
}

.codex-rewrite .codex-contact-area .quform-button-submit button,
.codex-rewrite .codex-contact-section .quform-button-submit button {
  min-height: 30px;
  padding: 5px 16px;
  border: 1px solid rgba(59, 54, 50, .22);
  border-radius: 0;
  background: #f7f8fa;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.codex-rewrite .codex-contact-module__address .fg-col > p {
  max-width: 62ch;
  color: var(--ink);
}

/* Doctor information has one stable rhythm on every card. */
.codex-rewrite .inner-content .codex-doctor-copy {
  padding-top: 6px;
}

.codex-rewrite .inner-content .codex-doctor-copy > p {
  max-width: 68ch;
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: .018em;
}

.codex-rewrite .inner-content .codex-doctor-copy > .codex-doctor-role {
  margin-bottom: 9px;
  color: var(--accent-dark);
  font-size: var(--type-small);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .08em;
}

.codex-rewrite .inner-content .codex-doctor-copy > .codex-doctor-name {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: clamp(28px, 2.7vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .04em;
}

.codex-rewrite .inner-content .codex-doctor-copy > .codex-doctor-specialty {
  margin: 0 0 22px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(197, 154, 92, .46);
  background: transparent;
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
}

.codex-rewrite .inner-content .codex-doctor-copy > .codex-doctor-credentials-heading {
  margin: 22px 0 7px;
  color: var(--accent-dark);
  font-size: var(--type-small);
  font-weight: 700;
  letter-spacing: .1em;
}

.codex-rewrite .inner-content .codex-doctor-copy > .codex-doctor-credentials {
  margin-bottom: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}

.codex-rewrite .inner-content .codex-doctor-copy > .codex-doctor-bio {
  margin-top: 18px;
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: var(--type-body);
  line-height: 2;
}

/* Actual left/right slider: the old source used Owl Carousel. The static
   version keeps the same number of visible items but moves the image rail. */
.codex-rewrite .inner-content .ff-owl-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.codex-rewrite .inner-content .ff-one-owl-carousel {
  display: flex;
  width: 100%;
  gap: 0;
  overflow: visible;
  transition: transform .72s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

.codex-rewrite .inner-content .ff-one-owl-carousel > .item {
  flex: 0 0 25%;
  width: 25%;
  min-width: 25%;
}

.codex-rewrite .inner-content .codex-carousel-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  color: #fff;
  background: rgba(59, 54, 50, .58);
  font-size: 30px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.codex-rewrite .inner-content .codex-carousel-control:hover {
  background: rgba(59, 54, 50, .86);
  transform: translateY(-50%) scale(1.04);
}

.codex-rewrite .inner-content .codex-carousel-control--prev { left: 16px; }
.codex-rewrite .inner-content .codex-carousel-control--next { right: 16px; }

/* Floating actions: light grey, black labels and explicit separators as
   requested for the clinic's original visual language. */
.codex-rewrite .quick-actions {
  gap: 0;
  padding: 4px;
  border: 1px solid rgba(59, 54, 50, .18);
  background: #f0f0ee;
  box-shadow: 0 10px 24px rgba(59, 54, 50, .12);
}

.codex-rewrite .quick-actions a {
  min-width: 72px;
  padding: 8px 7px;
  border-bottom: 1px solid rgba(59, 54, 50, .28);
  color: #222;
  background: #e7e7e5;
  font-size: 14px;
}

.codex-rewrite .quick-actions a:last-child { border-bottom: 0; }
.codex-rewrite .quick-actions a:hover { background: #d9d9d6; }

@media (min-width: 821px) and (max-width: 1199px) {
  .codex-rewrite .inner-content .ff-one-owl-carousel > .item {
    flex-basis: 33.333333%;
    width: 33.333333%;
    min-width: 33.333333%;
  }
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content .codex-contact-area {
    margin-inline: 0;
  }

  .codex-rewrite .codex-contact-area .fg-container,
  .codex-rewrite .codex-contact-section .fg-container {
    padding-inline: 20px;
  }

  .codex-rewrite .codex-contact-area .quform-element-row,
  .codex-rewrite .codex-contact-section .quform-element-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .codex-rewrite .inner-content .codex-doctor-copy {
    padding-top: 0;
  }

  .codex-rewrite .inner-content .codex-doctor-copy > p {
    font-size: 16px;
    line-height: 1.85;
  }

  .codex-rewrite .inner-content .codex-doctor-copy > .codex-doctor-name {
    font-size: 30px;
  }

  .codex-rewrite .inner-content .codex-doctor-copy > .codex-doctor-specialty {
    font-size: 18px;
  }

  .codex-rewrite .inner-content .ff-one-owl-carousel > .item {
    flex-basis: 50%;
    width: 50%;
    min-width: 50%;
  }

  .codex-rewrite .inner-content .codex-carousel-control {
    width: 36px;
    height: 36px;
    font-size: 25px;
  }

  .codex-rewrite .inner-content .codex-carousel-control--prev { left: 8px; }
  .codex-rewrite .inner-content .codex-carousel-control--next { right: 8px; }
}

/* The source builder wraps doctor paragraphs in an inner fg-wrapper. Keep
   these descendant selectors after the generic rules so the visual hierarchy
   reaches the actual paragraph nodes. */
.codex-rewrite .inner-content .codex-doctor-copy .codex-doctor-role {
  margin: 0 0 9px;
  color: var(--accent-dark);
  font-size: var(--type-small);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .08em;
  text-align: left;
}

.codex-rewrite .inner-content .codex-doctor-copy .codex-doctor-name {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(28px, 2.7vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .04em;
  text-align: left;
}

.codex-rewrite .inner-content .codex-doctor-copy .codex-doctor-specialty {
  margin: 0 0 22px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(197, 154, 92, .46);
  background: transparent;
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  text-align: left;
}

.codex-rewrite .inner-content .codex-doctor-copy .codex-doctor-credentials-heading {
  margin: 22px 0 7px;
  color: var(--accent-dark);
  font-size: var(--type-small);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .1em;
  text-align: left;
}

.codex-rewrite .inner-content .codex-doctor-copy .codex-doctor-credentials {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  text-align: left;
}

.codex-rewrite .inner-content .codex-doctor-copy .codex-doctor-bio {
  margin: 18px 0 24px;
  color: var(--ink-soft);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 2;
  text-align: left;
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content .codex-doctor-copy .codex-doctor-name {
    font-size: 30px;
  }

  .codex-rewrite .inner-content .codex-doctor-copy .codex-doctor-specialty {
    font-size: 18px;
  }

  .codex-rewrite .inner-content .codex-doctor-copy .codex-doctor-bio,
  .codex-rewrite .inner-content .codex-doctor-copy .codex-doctor-credentials {
    font-size: 16px;
    line-height: 1.85;
  }
}

/* Doctor cards: keep the portrait and qualifications together in the top
   summary, then give the longer clinical introduction a calm full-width
   reading area below.  This accommodates the source photos' mixed portrait,
   square and landscape ratios without inventing a crop for any clinician. */
@media (min-width: 821px) {
  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-summary {
    display: grid;
    grid-template-columns: minmax(400px, .92fr) minmax(0, 1.08fr);
    gap: clamp(42px, 5vw, 72px);
    align-items: start;
  }

  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-photo {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
  }

  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-photo.fg-col.col-md-5 > img,
  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-photo > img,
  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-photo > .fg-wrapper {
    width: min(100%, 500px);
    max-height: 600px;
    margin-inline: 0;
  }

  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-photo.fg-col.col-md-5 > img,
  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-photo img {
    display: block;
    width: 100%;
    max-height: 600px;
    object-fit: contain;
  }

  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-details {
    grid-column: 2;
    grid-row: 1;
    padding-top: 4px;
  }

  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-bio-panel {
    grid-column: 1 / -1;
    max-width: none;
    margin-top: clamp(34px, 4vw, 52px);
    padding-top: clamp(28px, 3vw, 40px);
    border-top: 1px solid rgba(59, 54, 50, .14);
  }
}

.codex-rewrite .inner-content .codex-doctor-bio-panel .codex-doctor-bio {
  max-width: none;
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: .018em;
  text-align: left;
}

.codex-rewrite .inner-content .codex-doctor-bio-panel .codex-doctor-bio:last-child {
  margin-bottom: 0;
}

/* Final shared reading scale.  These declarations deliberately come after
   the legacy builder rules above, so every article uses the same hierarchy
   without turning a long clinical heading into display copy. */
.codex-rewrite .inner-content .fg-heading.codex-content-heading,
.codex-rewrite .inner-content .codex-source-heading {
  font-size: clamp(23px, 2.15vw, 30px);
  line-height: 1.42;
}

/* Some older source sections use a centred rich-text paragraph for the
   visible heading.  Bring those into the same conservative heading scale. */
.codex-rewrite .inner-content .codex-prose-section:not(.codex-doctor-section) .fg-paragraph.ff-richtext.text-center > p {
  margin-bottom: 24px;
  color: var(--ink);
  font-size: clamp(23px, 2.15vw, 30px) !important;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: .035em;
}

.codex-rewrite .inner-content .codex-prose-section:not(.codex-doctor-section) .fg-paragraph p,
.codex-rewrite .inner-content .codex-prose-section:not(.codex-doctor-section) .fg-richtext p,
.codex-rewrite .inner-content .codex-prose-section:not(.codex-doctor-section) .fg-col > p {
  font-size: var(--type-body) !important;
}

/* Digital Care needs a quieter opening hierarchy than a campaign headline:
   a compact lead-in, a practical section title, then generous reading copy. */
.codex-rewrite.equipment-page .inner-content .codex-equipment-intro .codex-equipment-lede {
  max-width: 48ch;
  margin-bottom: 34px;
  font-size: clamp(24px, 2.2vw, 30px) !important;
  line-height: 1.5 !important;
}

.codex-rewrite.equipment-page .inner-content .codex-equipment-intro .codex-content-heading {
  margin: 34px 0 20px;
  padding-left: 14px;
  border-left-width: 3px;
  font-size: clamp(22px, 1.9vw, 26px) !important;
  line-height: 1.45;
}

.codex-rewrite.equipment-page .inner-content .codex-equipment-intro .fg-col > p:not(.codex-equipment-lede) {
  font-size: 19px !important;
  line-height: 1.9;
}

@media (max-width: 820px) {
  .codex-rewrite.equipment-page .inner-content .codex-equipment-intro .codex-equipment-lede {
    font-size: 24px !important;
  }

  .codex-rewrite.equipment-page .inner-content .codex-equipment-intro .codex-content-heading {
    font-size: 22px !important;
  }

  .codex-rewrite.equipment-page .inner-content .codex-equipment-intro .fg-col > p:not(.codex-equipment-lede) {
    font-size: 17px !important;
  }
}

.codex-rewrite .inner-content .codex-prose-section:not(.codex-carousel-section),
.codex-rewrite .inner-content .codex-prose-section:not(.codex-carousel-section)[data-fg-height] {
  min-height: 0 !important;
}

.codex-rewrite .inner-content .codex-prose-section:not(.codex-carousel-section) .fg-wrapper:not(:has(.fg-image, .fg-bg-layer[style*="url("]))[data-fg-height] {
  min-height: 0 !important;
}

/* The form and directions remain source content, but are paired deliberately:
   form with clinician portrait, then travel details with the live map. */
@media (min-width: 821px) {
  .codex-rewrite .codex-contact-area .codex-contact-module__form .fg-row,
  .codex-rewrite .codex-contact-area .codex-contact-module__address .fg-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .88fr);
    gap: clamp(42px, 6vw, 84px);
    align-items: center;
  }

  .codex-rewrite .codex-contact-area .codex-contact-module__form .fg-col,
  .codex-rewrite .codex-contact-area .codex-contact-module__address .fg-col {
    grid-column: auto;
    width: auto;
    min-width: 0;
  }
}

.codex-rewrite .codex-contact-area .codex-contact-portrait {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 100%;
}

.codex-rewrite .codex-contact-area .codex-contact-portrait img {
  display: block;
  width: min(100%, 440px);
  max-height: 500px;
  margin: 0;
  object-fit: contain;
  object-position: center bottom;
}

.codex-rewrite .codex-contact-area .codex-contact-map p {
  margin: 0;
}

.codex-rewrite .codex-contact-area .codex-contact-map iframe {
  display: block;
  width: 100%;
  height: clamp(300px, 32vw, 420px);
  border: 0;
  box-shadow: 0 14px 34px rgba(58, 49, 42, .12);
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content .fg-heading.codex-content-heading,
  .codex-rewrite .inner-content .codex-source-heading {
    font-size: 23px;
  }

  .codex-rewrite .inner-content .codex-prose-section:not(.codex-carousel-section) .fg-paragraph p,
  .codex-rewrite .inner-content .codex-prose-section:not(.codex-carousel-section) .fg-richtext p,
  .codex-rewrite .inner-content .codex-prose-section:not(.codex-carousel-section) .fg-col > p,
  .codex-rewrite .inner-content .codex-doctor-bio-panel .codex-doctor-bio {
    font-size: 17px;
    line-height: 1.86;
  }

  .codex-rewrite .codex-contact-area .codex-contact-portrait {
    margin-top: 14px;
  }

  .codex-rewrite .codex-contact-area .codex-contact-portrait img {
    width: min(100%, 340px);
    max-height: 410px;
  }

  .codex-rewrite .codex-contact-area .codex-contact-map {
    margin-top: 8px;
  }

  .codex-rewrite .codex-contact-area .codex-contact-map iframe {
    height: 300px;
  }
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-summary {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-photo {
    grid-column: 1;
    grid-row: auto;
    justify-content: center;
  }

  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-details {
    grid-column: 1;
    grid-row: auto;
  }

  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-photo > img,
  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-photo > .fg-wrapper {
    width: min(100%, 440px);
  }

  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-bio-panel {
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid rgba(59, 54, 50, .14);
  }

  .codex-rewrite .inner-content .codex-doctor-bio-panel .codex-doctor-bio {
    font-size: 16px;
    line-height: 1.85;
  }
}

/* Builder components shared by the About and Digital Care pages.  The source
   content already carries the editorial grouping; these rules make those
   groups readable without replacing them with generic text blocks. */
.codex-rewrite .inner-content .section-heading > h1,
.codex-rewrite .inner-content .section-heading > h2,
.codex-rewrite .inner-content .section-heading > h3 {
  margin: 0 0 22px;
  color: inherit;
  font-size: clamp(30px, 3.3vw, 46px);
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: .035em;
}

.codex-rewrite .inner-content .section-heading > p,
.codex-rewrite .inner-content .section-heading .ff-richtext > p {
  max-width: 76ch;
  margin-bottom: 18px;
  color: inherit;
  font-size: var(--type-body);
  line-height: 1.9;
  letter-spacing: .016em;
}

.codex-rewrite .inner-content .services-v5 {
  padding: 24px 0;
  border-top: 1px solid currentColor;
  border-top-color: color-mix(in srgb, currentColor 18%, transparent);
}

.codex-rewrite .inner-content .services-v5-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.codex-rewrite .inner-content .services-v5-no {
  color: var(--gold);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.codex-rewrite .inner-content .services-v5-body-title {
  margin: 0;
  color: inherit;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
}

.codex-rewrite .inner-content .services-v5-text {
  max-width: 64ch;
  margin: 12px 0 0;
  color: inherit;
  font-size: 17px;
  line-height: 1.85;
}

/* About Artech: source imagery stays dark and cinematic; only hierarchy and
   the four service markers are refined. */
.codex-rewrite.aboutus-page .codex-about-hero,
.codex-rewrite.aboutus-page .codex-about-values,
.codex-rewrite.aboutus-page .codex-about-approach {
  padding-block: clamp(72px, 8vw, 112px);
}

.codex-rewrite.aboutus-page .codex-about-hero .section-heading > h3,
.codex-rewrite.aboutus-page .codex-about-hero .section-heading > p {
  width: 100%;
  max-width: none;
}

.codex-rewrite.aboutus-page .codex-about-hero .ffb-id-1pvdgg02 {
  gap: clamp(14px, 2vw, 24px);
  margin: clamp(34px, 4vw, 54px) 0 18px;
}

.codex-rewrite.aboutus-page .codex-about-hero .ffb-id-1pvdgg02 > .fg-col > .fg-wrapper {
  display: grid;
  place-content: center;
  aspect-ratio: 1;
  min-height: 0 !important;
  overflow: hidden;
  border: 1px solid rgba(215, 171, 72, .52);
  border-radius: 50%;
}

.codex-rewrite.aboutus-page .codex-about-hero .ffb-id-1pvdgg02 .fg-heading {
  margin: 0;
  color: inherit;
  text-align: center;
}

.codex-rewrite.aboutus-page .codex-about-hero .ffb-id-1pvdgg02 h2 {
  color: var(--gold);
  font-size: clamp(42px, 5vw, 74px);
  font-weight: 700;
  font-style: italic;
  line-height: 1;
}

.codex-rewrite.aboutus-page .codex-about-hero .ffb-id-1pvdgg02 h3 {
  padding: 10px 18px 0;
  font-size: 19px;
  line-height: 1.45;
}

/* The four circular value labels should support the numbers visually,
   without competing with the quote and paragraph above them. */
.codex-rewrite.aboutus-page .codex-about-hero .ffb-id-1pvdgg02 h3.codex-content-heading {
  font-size: clamp(24px, 2vw, 28px) !important;
  line-height: 1.25 !important;
}

.codex-rewrite .inner-content .codex-portfolio-section {
  padding-block: clamp(64px, 7vw, 96px);
}

.codex-rewrite .inner-content .ff-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 30px;
}

.codex-rewrite .inner-content .ff-portfolio-grid .cbp-item,
.codex-rewrite .inner-content .ff-portfolio-grid .cbp-caption,
.codex-rewrite .inner-content .ff-portfolio-grid .cbp-caption-defaultWrap {
  min-width: 0;
}

.codex-rewrite .inner-content .ff-portfolio-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Digital Care: opening statement, treatment explanation and equipment are
   intentionally distinct reading modes, rather than one unbroken article. */
.codex-rewrite.equipment-page .codex-breadcrumb-section {
  padding-block: 34px 10px;
}

.codex-rewrite.equipment-page .codex-breadcrumb-section p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
  letter-spacing: .04em;
}

.codex-rewrite.equipment-page .codex-equipment-intro {
  padding-block: clamp(44px, 5vw, 72px);
}

.codex-rewrite.equipment-page .codex-equipment-lede {
  max-width: 35ch;
  margin: 0 0 42px;
  color: var(--ink) !important;
  font-size: clamp(25px, 2.7vw, 38px) !important;
  font-weight: 700;
  line-height: 1.58 !important;
  letter-spacing: .025em;
}

.codex-rewrite.equipment-page .codex-equipment-intro .codex-content-heading,
.codex-rewrite.equipment-page .codex-equipment-feature .codex-content-heading,
.codex-rewrite.equipment-page .codex-equipment-reflection .codex-content-heading {
  margin-top: 44px;
}

.codex-rewrite .inner-content .embed-responsive {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 42px 0 12px;
  overflow: hidden;
  background: #191817;
}

.codex-rewrite .inner-content .embed-responsive > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.codex-rewrite.equipment-page .codex-equipment-showcase {
  padding-block: clamp(54px, 6vw, 82px);
}

.codex-rewrite.equipment-page .codex-equipment-showcase .fg-col > .fg-wrapper {
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(59, 54, 50, .12);
  background: #fff;
}

.codex-rewrite.equipment-page .codex-equipment-showcase .codex-content-heading {
  min-height: 0;
  margin: 0;
  padding: 20px 22px 24px;
  border-left: 0;
  color: var(--ink);
  font-size: clamp(19px, 1.85vw, 25px);
  line-height: 1.48;
  text-align: left;
}

.codex-rewrite.equipment-page .codex-equipment-reflection {
  padding-block: clamp(70px, 7vw, 104px);
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content .section-heading > h1,
  .codex-rewrite .inner-content .section-heading > h2,
  .codex-rewrite .inner-content .section-heading > h3 {
    font-size: 29px;
  }

  .codex-rewrite.aboutus-page .codex-about-hero .ffb-id-1pvdgg02 {
    gap: 14px;
  }

  .codex-rewrite.aboutus-page .codex-about-hero .ffb-id-1pvdgg02 h2 {
    font-size: 46px;
  }

  .codex-rewrite.aboutus-page .codex-about-hero .ffb-id-1pvdgg02 h3 {
    padding-inline: 10px;
    font-size: 16px;
  }

  .codex-rewrite.aboutus-page .codex-about-hero .ffb-id-1pvdgg02 h3.codex-content-heading {
    font-size: 16px !important;
    line-height: 1.3 !important;
  }

  .codex-rewrite .inner-content .ff-portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-top: 22px;
  }

  .codex-rewrite.equipment-page .codex-breadcrumb-section {
    padding-block: 24px 4px;
  }

  .codex-rewrite.equipment-page .codex-equipment-intro {
    padding-block: 38px 52px;
  }

  .codex-rewrite.equipment-page .codex-equipment-lede {
    margin-bottom: 30px;
    font-size: 25px !important;
    line-height: 1.62 !important;
  }

  .codex-rewrite .inner-content .embed-responsive {
    margin-top: 32px;
  }
}

/* Preserve the original compact address/footer composition: the contact
   details remain readable on the left, while the clinician portrait is a
   controlled visual accent instead of expanding the section vertically. */
@media (min-width: 821px) {
  .codex-rewrite .codex-contact-area .ffb-id-3kf4i05c {
    position: relative;
    height: 528px;
    overflow: hidden;
    padding-block: 60px;
  }

  .codex-rewrite .codex-contact-area .ffb-id-3kf4i05c .fg-container,
  .codex-rewrite .codex-contact-area .ffb-id-3kf4i05c .fg-row {
    height: 100%;
  }

  .codex-rewrite .codex-contact-area .ffb-id-3kf4i05c .fg-row {
    position: relative;
    gap: 0;
  }

  .codex-rewrite .codex-contact-area .ffb-id-3kf4i05c .fg-col.col-md-6 {
    grid-column: span 6;
    min-width: 0;
  }

  .codex-rewrite .codex-contact-area .ffb-id-3kf4i05c .fg-col.col-md-6:last-child {
    display: flex;
    justify-content: flex-end;
    align-items: end;
  }

  .codex-rewrite .codex-contact-area .ffb-id-3kf4i05u {
    width: auto;
    max-width: 100%;
    max-height: 510px;
    margin: 0;
    object-fit: contain;
    object-position: right bottom;
  }

  .codex-rewrite .codex-contact-area .ffb-id-3kf4i05c .social-icon-footer {
    display: inline-block;
    margin-right: 16px;
  }
}

/* Final Digital Care typography: this sits after the copied page-builder
   rules, so the clinical reading hierarchy remains authoritative. */
body.codex-rewrite.equipment-page .inner-main .inner-content .post-content .codex-equipment-intro .fg-col .codex-equipment-lede {
  max-width: 48ch;
  margin-bottom: 34px;
  font-size: clamp(24px, 2.2vw, 30px) !important;
  line-height: 1.5 !important;
}

body.codex-rewrite.equipment-page .inner-main .inner-content .post-content .codex-equipment-intro .fg-col .fg-paragraph p:not(.codex-equipment-lede) {
  font-size: 19px !important;
  line-height: 1.9 !important;
}

@media (max-width: 820px) {
  body.codex-rewrite.equipment-page .inner-main .inner-content .post-content .codex-equipment-intro .fg-col .codex-equipment-lede {
    font-size: 24px !important;
  }

  body.codex-rewrite.equipment-page .inner-main .inner-content .post-content .codex-equipment-intro .fg-col .fg-paragraph p:not(.codex-equipment-lede) {
    font-size: 17px !important;
  }
}

/* The first equipment gallery continues the preceding Digital Care article.
   Keep its rule as a subtle divider, rather than stacking two full section
   paddings into an unintended empty band. */
body.codex-rewrite.equipment-page .inner-content .codex-equipment-intro {
  padding-bottom: 12px;
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-intro + .codex-equipment-showcase {
  padding-top: clamp(22px, 2.4vw, 30px);
  border-top: 0;
}

@media (max-width: 820px) {
  body.codex-rewrite.equipment-page .inner-content .codex-equipment-intro {
    padding-bottom: 10px;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-equipment-intro + .codex-equipment-showcase {
    padding-top: 20px;
  }
}

/* Equipment is an image-led comparison. Keep each name modest and centered,
   then use a quiet surface treatment to separate the products from the page. */
body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .fg-col > .fg-wrapper {
  border: 1px solid rgba(59, 54, 50, .14);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(50, 42, 34, .10);
  transition: transform .24s ease, box-shadow .24s ease;
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .fg-col > .fg-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(50, 42, 34, .15);
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .codex-content-heading {
  padding: 16px 18px 18px;
  font-size: clamp(16px, 1.35vw, 19px);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 820px) {
  body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .fg-col > .fg-wrapper:hover {
    transform: none;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .codex-content-heading {
    padding: 14px 14px 16px;
    font-size: 16px;
  }
}

/* Secondary Digital Care articles follow one calm reading rhythm: a compact
   chapter title, a distinct product line, then generous body copy. */
body.codex-rewrite.equipment-page .inner-content .codex-equipment-feature .codex-content-heading,
body.codex-rewrite.equipment-page .inner-content .codex-equipment-reflection .codex-content-heading {
  margin: 0 0 20px;
  padding-left: 14px;
  border-left-width: 3px;
  font-size: clamp(22px, 1.7vw, 26px) !important;
  line-height: 1.42;
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-feature .fg-paragraph p,
body.codex-rewrite.equipment-page .inner-content .codex-equipment-reflection .fg-paragraph p {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 18px !important;
  line-height: 1.9 !important;
  letter-spacing: .012em;
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-feature .fg-paragraph p:first-child,
body.codex-rewrite.equipment-page .inner-content .codex-equipment-reflection .fg-paragraph p:first-child {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 19px !important;
  font-weight: 600;
  line-height: 1.65 !important;
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-feature .fg-paragraph p:last-child,
body.codex-rewrite.equipment-page .inner-content .codex-equipment-reflection .fg-paragraph p:last-child {
  margin-bottom: 0;
}

@media (max-width: 820px) {
  body.codex-rewrite.equipment-page .inner-content .codex-equipment-feature .codex-content-heading,
  body.codex-rewrite.equipment-page .inner-content .codex-equipment-reflection .codex-content-heading {
    margin-bottom: 18px;
    font-size: 22px !important;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-equipment-feature .fg-paragraph p,
  body.codex-rewrite.equipment-page .inner-content .codex-equipment-reflection .fg-paragraph p {
    margin-bottom: 20px;
    font-size: 17px !important;
    line-height: 1.86 !important;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-equipment-feature .fg-paragraph p:first-child,
  body.codex-rewrite.equipment-page .inner-content .codex-equipment-reflection .fg-paragraph p:first-child {
    font-size: 17px !important;
  }
}

/* The founder's Digital Care reflection is a reusable clinician profile, not
   an anonymous ending paragraph.  Share the team page hierarchy and portrait
   treatment while preserving the equipment page's original commentary. */
body.codex-rewrite.equipment-page .inner-content .codex-shen-shared-profile > .fg-bg .fg-bg-layer {
  background-color: #f7f8fa !important;
}

body.codex-rewrite.equipment-page .inner-content .codex-shen-shared-profile .codex-shen-profile-portrait {
  display: block;
  width: 100%;
  max-width: 500px;
  max-height: 600px;
  margin: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(58, 49, 42, .12);
  object-fit: contain;
  object-position: center bottom;
}

body.codex-rewrite.equipment-page .inner-content .codex-shen-shared-profile .codex-shen-profile-topic {
  margin: 26px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(197, 154, 92, .46);
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .02em;
}

body.codex-rewrite.equipment-page .inner-content .codex-shen-shared-profile .codex-doctor-bio-panel {
  margin-top: clamp(34px, 4vw, 52px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid rgba(59, 54, 50, .14);
}

body.codex-rewrite.equipment-page .inner-content .codex-shen-shared-profile .codex-doctor-bio-panel .codex-doctor-bio {
  margin: 0 0 22px;
  font-size: 18px !important;
  line-height: 1.9 !important;
}

@media (max-width: 820px) {
  body.codex-rewrite.equipment-page .inner-content .codex-shen-shared-profile .codex-shen-profile-portrait {
    width: min(100%, 440px);
    margin-inline: auto;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-shen-shared-profile .codex-shen-profile-topic {
    margin-top: 22px;
    padding-top: 16px;
    font-size: 17px;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-shen-shared-profile .codex-doctor-bio-panel .codex-doctor-bio {
    margin-bottom: 20px;
    font-size: 17px !important;
    line-height: 1.86 !important;
  }
}

/* Contact hours use the same page-title and reading hierarchy as articles.
   The source phone line is kept as one clear, tappable information row. */
body.codex-rewrite.contact-page .inner-content .codex-contact-hours-title {
  padding-block: clamp(54px, 6vw, 82px) clamp(34px, 4vw, 48px);
}

body.codex-rewrite.contact-page .inner-content .codex-contact-hours-title .codex-contact-page-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 3.2vw, 44px) !important;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .06em;
  text-align: center;
}

body.codex-rewrite.contact-page .inner-content .codex-contact-hours-content {
  padding-top: 0;
}

body.codex-rewrite.contact-page .inner-content .codex-contact-hours-content .codex-contact-intro,
body.codex-rewrite.contact-page .inner-content .codex-contact-hours-content .codex-contact-hours-copy {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 18px !important;
  line-height: 1.9 !important;
}

body.codex-rewrite.contact-page .inner-content .codex-contact-hours-content .codex-contact-phone-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--ink);
  font-size: 18px !important;
  font-weight: 600;
  line-height: 1.5 !important;
}

body.codex-rewrite.contact-page .inner-content .codex-contact-hours-content .codex-contact-phone-line img {
  display: inline-block;
  flex: 0 0 auto;
  width: auto;
  height: 24px;
  margin: 0;
}

body.codex-rewrite.contact-page .inner-content .codex-contact-hours-content .codex-contact-phone-line img:first-child {
  height: 28px;
}

body.codex-rewrite.contact-page .inner-content .codex-contact-hours-content .codex-contact-phone-line a {
  color: var(--accent-dark);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
}

@media (max-width: 820px) {
  body.codex-rewrite.contact-page .inner-content .codex-contact-hours-title {
    padding-block: 48px 30px;
  }

  body.codex-rewrite.contact-page .inner-content .codex-contact-hours-title .codex-contact-page-title {
    font-size: 32px !important;
  }

  body.codex-rewrite.contact-page .inner-content .codex-contact-hours-content .codex-contact-intro,
  body.codex-rewrite.contact-page .inner-content .codex-contact-hours-content .codex-contact-hours-copy {
    font-size: 17px !important;
    line-height: 1.86 !important;
  }

  body.codex-rewrite.contact-page .inner-content .codex-contact-hours-content .codex-contact-phone-line {
    font-size: 17px !important;
  }
}

/* Shared inner-page footer: treat the form, directions and copyright as one
   continuous composition.  The clinician anchors the form at its lower edge;
   the directions deliberately give the map the larger visual role. */
.codex-rewrite .inner-content.codex-content-with-contact {
  padding-bottom: 0;
}

.codex-rewrite .codex-contact-area .codex-contact-module__form {
  padding-top: clamp(58px, 6vw, 84px);
  padding-bottom: 0;
}

.codex-rewrite .codex-contact-area .codex-contact-module__address {
  padding-block: clamp(58px, 6vw, 82px);
}

.codex-rewrite .codex-contact-area .codex-contact-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 34px;
}

.codex-rewrite .codex-contact-area .codex-contact-brand > img {
  flex: 0 0 auto;
  display: block;
  width: 50px;
  height: auto;
}

.codex-rewrite .codex-contact-area .codex-contact-brand > p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(20px, 1.75vw, 25px);
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.codex-rewrite .codex-contact-area .codex-contact-socials {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 0;
}

.codex-rewrite .codex-contact-area .codex-contact-socials a {
  display: block;
  line-height: 0;
}

.codex-rewrite .codex-contact-area .codex-contact-socials .social-icon-footer {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0;
}

@media (min-width: 821px) {
  .codex-rewrite .codex-contact-area .codex-contact-module__form .fg-row {
    align-items: end;
  }

  .codex-rewrite .codex-contact-area .codex-contact-module__form .codex-contact-portrait {
    align-self: end;
  }

  .codex-rewrite .codex-contact-area .codex-contact-module__address .fg-row {
    grid-template-columns: minmax(0, .8fr) minmax(540px, 1.2fr);
    gap: clamp(48px, 5vw, 72px);
    align-items: center;
  }

  .codex-rewrite .codex-contact-area .codex-contact-map iframe {
    height: clamp(420px, 34vw, 500px);
  }
}

@media (max-width: 820px) {
  .codex-rewrite .codex-contact-area .codex-contact-module__form {
    padding-block: 48px 0;
  }

  .codex-rewrite .codex-contact-area .codex-contact-module__address {
    padding-block: 50px;
  }

  .codex-rewrite .codex-contact-area .codex-contact-brand {
    margin-bottom: 28px;
  }

  .codex-rewrite .codex-contact-area .codex-contact-brand > p {
    font-size: 20px;
  }

  .codex-rewrite .codex-contact-area .codex-contact-socials {
    margin-top: 22px;
  }

  .codex-rewrite .codex-contact-area .codex-contact-map iframe {
    height: 360px;
  }
}

/* Final cross-page refinement: keep source content intact while unifying the
   reading rhythm, article breadth and shared contact presentation. */
.codex-rewrite .inner-content .fg-paragraph p,
.codex-rewrite .inner-content .fg-richtext p,
.codex-rewrite .inner-content .fg-col > p {
  color: var(--ink-soft);
}

.codex-rewrite .codex-contact-area .quform-default-submit {
  display: none !important;
}

.codex-rewrite .codex-contact-area .codex-contact-brand {
  gap: 12px;
  margin-bottom: 28px;
}

.codex-rewrite .codex-contact-area .codex-contact-brand > img {
  width: 42px;
}

.codex-rewrite .codex-contact-area .codex-contact-brand > p {
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: .01em;
}

.codex-rewrite .codex-contact-area .codex-address-continuation {
  display: inline-block;
  padding-left: 3em;
}

@media (min-width: 821px) {
  .codex-rewrite .codex-contact-area .codex-contact-map iframe {
    height: 360px;
  }
}

/* -------------------------------------------------------------------------
   2026-08-03 editorial pass
   Keep the source copy and media intact, but give every inner page the same
   reading rhythm.  This block is intentionally last so it becomes the
   single, easy-to-audit layer over the older page-builder defaults above.
   ------------------------------------------------------------------------- */

.codex-rewrite .inner-content {
  --type-body: 18px;
  --copy-space: clamp(18px, 1.8vw, 28px);
  --section-space: clamp(40px, 5vw, 64px);
}

/* A section is separated by space and background, not by stray hairlines. */
.codex-rewrite .inner-content .fg-section,
.codex-rewrite .inner-content .fg-section + .fg-section,
.codex-rewrite .inner-content .codex-contact-module {
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none;
}

.codex-rewrite .inner-content .fg-section {
  padding-block: var(--section-space);
}

.codex-rewrite .inner-content .fg-container,
.codex-rewrite .inner-content .fg-container-medium {
  width: 100%;
  max-width: 1110px;
  margin-inline: auto;
  padding-inline: 15px;
}

/* Shared article headings: modest scale, visible left accent, useful breathing
   room.  First headings in a section sit naturally against the opening copy. */
.codex-rewrite .inner-content h2:not(.codex-empty-heading),
.codex-rewrite .inner-content .fg-heading.codex-content-heading,
.codex-rewrite .inner-content .codex-source-heading {
  margin: clamp(32px, 4vw, 48px) 0 18px;
  padding: 0 0 0 14px;
  border-left: 3px solid #c89a5b;
  color: var(--ink) !important;
  font-size: clamp(24px, 2.1vw, 30px) !important;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .02em;
  text-wrap: balance;
}

.codex-rewrite .inner-content .fg-wrapper > .fg-heading:first-child,
.codex-rewrite .inner-content .fg-col > .fg-heading:first-child,
.codex-rewrite .inner-content .section-heading > h1:first-child,
.codex-rewrite .inner-content .section-heading > h2:first-child {
  margin-top: 0;
}

.codex-rewrite .inner-content .fg-paragraph p,
.codex-rewrite .inner-content .fg-richtext p,
.codex-rewrite .inner-content .fg-col > p {
  max-width: none !important;
  margin: 0 0 var(--copy-space);
  color: #4a4540 !important;
  font-size: var(--type-body) !important;
  font-weight: 400;
  line-height: 1.82;
  letter-spacing: .012em;
}

.codex-rewrite .inner-content .fg-paragraph p:last-child,
.codex-rewrite .inner-content .fg-richtext p:last-child,
.codex-rewrite .inner-content .fg-col > p:last-child {
  margin-bottom: 0;
}

/* Lists should read as intentional content, not as browser defaults. */
.codex-rewrite .inner-content .fg-paragraph ul,
.codex-rewrite .inner-content .fg-richtext ul,
.codex-rewrite .inner-content .fg-col > ul {
  margin: 12px 0 var(--copy-space);
  padding-left: 1.45em;
  list-style: disc;
}

.codex-rewrite .inner-content .fg-paragraph ol,
.codex-rewrite .inner-content .fg-richtext ol,
.codex-rewrite .inner-content .fg-col > ol {
  margin: 12px 0 var(--copy-space);
  padding-left: 1.65em;
  list-style: decimal;
}

.codex-rewrite .inner-content .fg-paragraph li,
.codex-rewrite .inner-content .fg-richtext li,
.codex-rewrite .inner-content .fg-col > li {
  margin: .28em 0;
  padding-left: .2em;
  color: #4a4540;
  font-size: var(--type-body);
  line-height: 1.65;
}

/* Adjacent prose sections are one article flow.  Retain the source's pale
   background changes, but remove the artificial empty bands between them. */
.codex-rewrite .inner-content .codex-prose-section + .codex-prose-section,
.codex-rewrite .inner-content .codex-prose-section--brief + .fg-section,
.codex-rewrite .inner-content .fg-section:has(.fg-image) + .codex-prose-section {
  padding-top: clamp(22px, 3vw, 36px);
}

/* Real horizontal media rails: no builder min-height can create white bands
   above or below the images. */
.codex-rewrite .inner-content .codex-carousel-section {
  min-height: 0 !important;
  margin-block: 0 !important;
  padding-block: 0 !important;
  overflow: hidden;
}

.codex-rewrite .inner-content .codex-carousel-section .ff-owl-carousel,
.codex-rewrite .inner-content .codex-carousel-section .ff-one-owl-carousel {
  min-height: 0 !important;
  height: auto !important;
  margin: 0;
}

.codex-rewrite .inner-content .codex-carousel-section .ff-one-owl-carousel {
  display: flex;
  gap: 0;
  overflow: visible;
}

.codex-rewrite .inner-content .codex-carousel-section .ff-one-owl-carousel > .item,
.codex-rewrite .inner-content .codex-carousel-section .ff-one-owl-carousel > .item > .fg-wrapper,
.codex-rewrite .inner-content .codex-carousel-section .ff-one-owl-carousel > .item .fg-bg,
.codex-rewrite .inner-content .codex-carousel-section .ff-one-owl-carousel > .item .fg-bg-layer {
  min-height: clamp(220px, 22vw, 300px) !important;
  height: clamp(220px, 22vw, 300px) !important;
}

.codex-rewrite .inner-content .codex-carousel-section + .fg-section {
  padding-top: clamp(34px, 4vw, 56px);
}

/* Waterlase intro: the same editorial two-column component can be reused for
   other treatment explanations without changing the original copy order. */
.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]),
.codex-rewrite .inner-content .fg-section:has(.fg-heading:has(+ .fg-paragraph)) {
  --intro-gap: clamp(28px, 4vw, 54px);
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row {
  align-items: stretch;
  gap: var(--intro-gap);
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row > .fg-col {
  min-width: 0;
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row .fg-wrapper {
  height: 100%;
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row .fg-image {
  width: 100%;
  height: 100%;
  min-height: 330px;
  margin: 0;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(55, 47, 40, .12);
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-col,
.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row + .fg-col {
  margin-top: clamp(26px, 3vw, 44px);
}

/* The advantages chapter is a deliberate brand section, not a regular H2. */
.codex-rewrite .inner-content > .fg-section:has(.services-v5) {
  padding-block: clamp(48px, 6vw, 78px);
  background-color: #302b27;
  color: #fff;
}

.codex-rewrite .inner-content > .fg-section:has(.services-v5) > .fg-container > .fg-row > .fg-col > .fg-row:first-child {
  margin-bottom: 30px;
}

.codex-rewrite .inner-content > .fg-section:has(.services-v5) > .fg-container .fg-heading.codex-content-heading {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  color: #d7ab48 !important;
  font-size: clamp(26px, 2.6vw, 34px) !important;
  text-align: center;
}

.codex-rewrite .inner-content > .fg-section:has(.services-v5) .services-v5 {
  padding: 24px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, .2);
}

.codex-rewrite .inner-content > .fg-section:has(.services-v5) .services-v5-wrap {
  gap: 12px;
}

.codex-rewrite .inner-content > .fg-section:has(.services-v5) .services-v5-no {
  color: #f0c51a;
  font-size: 28px;
}

.codex-rewrite .inner-content > .fg-section:has(.services-v5) .services-v5-body-title {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 21px !important;
  line-height: 1.5;
}

.codex-rewrite .inner-content > .fg-section:has(.services-v5) .services-v5-text {
  max-width: none;
  color: rgba(255, 255, 255, .92);
  font-size: 17px;
  line-height: 1.82;
}

/* The reusable "沈醫師談" card is shared by treatment and equipment pages. */
.codex-rewrite .inner-content .codex-shen-insight {
  padding-block: clamp(48px, 6vw, 78px);
}

.codex-rewrite .inner-content .codex-shen-insight-card {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  overflow: hidden;
  border: 1px solid rgba(59, 54, 50, .18);
  background: #fff;
  box-shadow: 0 14px 30px rgba(55, 47, 40, .10);
}

.codex-rewrite .inner-content .codex-shen-insight-portrait {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  object-position: center top;
}

.codex-rewrite .inner-content .codex-shen-insight-copy {
  padding: clamp(30px, 4vw, 52px);
}

.codex-rewrite .inner-content .codex-shen-insight-title {
  margin: 0 0 22px !important;
  padding-left: 15px !important;
  border-left: 3px solid #c89a5b !important;
  color: var(--ink) !important;
  font-size: clamp(23px, 2vw, 29px) !important;
  line-height: 1.45;
}

.codex-rewrite .inner-content .codex-shen-insight-body {
  margin: 0 0 18px;
  color: #4a4540 !important;
  font-size: 18px !important;
  line-height: 1.86 !important;
}

/* Contact form, directions, map and footer form one continuous ending. */
.codex-rewrite .inner-content.codex-content-with-contact {
  padding-bottom: 0 !important;
}

.codex-rewrite .codex-contact-module {
  margin-top: clamp(48px, 6vw, 82px);
}

.codex-rewrite .codex-contact-area .codex-contact-module__form {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  padding-block: clamp(48px, 5vw, 68px) !important;
}

.codex-rewrite .codex-contact-area .codex-contact-module__form .fg-heading {
  margin-top: 0;
  margin-bottom: 20px;
}

.codex-rewrite .codex-contact-area .codex-contact-portrait {
  align-self: end;
}

.codex-rewrite .codex-contact-area .codex-contact-portrait img {
  max-height: 500px;
}

.codex-rewrite .codex-contact-area .codex-contact-module__address {
  padding-block: clamp(48px, 5vw, 68px) !important;
}

.codex-rewrite .codex-contact-area .codex-contact-brand {
  gap: 10px;
  margin-bottom: 24px;
}

.codex-rewrite .codex-contact-area .codex-contact-brand > img {
  width: 38px;
}

.codex-rewrite .codex-contact-area .codex-contact-brand > p {
  font-size: clamp(19px, 1.65vw, 23px);
  white-space: nowrap;
}

.codex-rewrite .codex-contact-area .codex-address-continuation {
  display: block;
  margin: 0;
  padding-left: 3em;
}

.codex-rewrite .codex-contact-area .codex-contact-socials {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.codex-rewrite .codex-contact-area .codex-contact-map iframe {
  height: 320px !important;
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content {
    --type-body: 17px;
    --copy-space: 20px;
    --section-space: 40px;
  }

  .codex-rewrite .inner-content h2:not(.codex-empty-heading),
  .codex-rewrite .inner-content .fg-heading.codex-content-heading,
  .codex-rewrite .inner-content .codex-source-heading {
    margin-top: 30px;
    font-size: 23px !important;
  }

  .codex-rewrite .inner-content .fg-paragraph p,
  .codex-rewrite .inner-content .fg-richtext p,
  .codex-rewrite .inner-content .fg-col > p,
  .codex-rewrite .inner-content .fg-paragraph li,
  .codex-rewrite .inner-content .fg-richtext li,
  .codex-rewrite .inner-content .fg-col > li {
    font-size: 17px !important;
    line-height: 1.86;
  }

  .codex-rewrite .inner-content .codex-carousel-section .ff-one-owl-carousel > .item,
  .codex-rewrite .inner-content .codex-carousel-section .ff-one-owl-carousel > .item > .fg-wrapper,
  .codex-rewrite .inner-content .codex-carousel-section .ff-one-owl-carousel > .item .fg-bg,
  .codex-rewrite .inner-content .codex-carousel-section .ff-one-owl-carousel > .item .fg-bg-layer {
    min-height: 190px !important;
    height: 190px !important;
  }

  .codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row {
    gap: 22px;
  }

  .codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row .fg-image {
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .codex-rewrite .inner-content > .fg-section:has(.services-v5) .services-v5-body-title {
    font-size: 19px !important;
  }

  .codex-rewrite .inner-content .codex-shen-insight-card {
    grid-template-columns: 1fr;
  }

  .codex-rewrite .inner-content .codex-shen-insight-portrait {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .codex-rewrite .inner-content .codex-shen-insight-copy {
    padding: 28px 24px 30px;
  }

  .codex-rewrite .codex-contact-area .codex-contact-module__form {
    padding-block: 42px 48px !important;
  }

  .codex-rewrite .codex-contact-area .codex-contact-module__address {
    padding-block: 44px 48px !important;
  }

  .codex-rewrite .codex-contact-area .codex-contact-brand > img {
    width: 34px;
  }

  .codex-rewrite .codex-contact-area .codex-contact-brand > p {
    font-size: 19px;
  }

  .codex-rewrite .codex-contact-area .codex-contact-map iframe {
    height: 260px !important;
  }
}

/* Balance the clinic brand row with the address details below it. */
.codex-rewrite .codex-contact-area .codex-contact-brand {
  gap: 8px;
  margin-bottom: 14px;
}

.codex-rewrite .codex-contact-area .codex-contact-brand > img {
  width: 32px !important;
}

.codex-rewrite .codex-contact-area .codex-contact-brand > p {
  font-size: clamp(22px, 1.85vw, 26px) !important;
}

.codex-rewrite .codex-contact-area .codex-contact-brand + p {
  margin-top: 0 !important;
}

@media (max-width: 820px) {
  .codex-rewrite .codex-contact-area .codex-contact-brand > img {
    width: 30px !important;
  }

  .codex-rewrite .codex-contact-area .codex-contact-brand > p {
    font-size: 21px !important;
  }
}

/* Current pass: keep the form readable while the clinician portrait is cropped
   against the bottom edge of its section. The address block stays compact and
   the certification dividers use the same reusable section-title treatment. */
@media (min-width: 821px) {
  .codex-rewrite .codex-contact-area .codex-contact-module__form {
    overflow: hidden !important;
  }

  .codex-rewrite .codex-contact-area .codex-contact-module__form .fg-row > .fg-col:first-child {
    align-self: start;
  }

  .codex-rewrite .codex-contact-area .codex-contact-module__form .codex-contact-portrait {
    transform: translateY(clamp(48px, 5vw, 68px));
  }
}

.codex-rewrite .codex-contact-area .codex-address-continuation {
  display: inline-block !important;
  margin: 0 !important;
  padding-left: 3em !important;
}

.codex-rewrite .inner-content .divider-v1 {
  display: flex;
  align-items: center;
  min-height: 0 !important;
  margin: clamp(42px, 5vw, 68px) 0 24px;
  padding: 13px 20px 14px;
  border: 1px solid rgba(200, 154, 91, .28);
  border-left: 5px solid var(--gold);
  background: linear-gradient(90deg, rgba(247, 242, 233, .96), rgba(247, 242, 233, .35) 72%, transparent);
}

.codex-rewrite .inner-content .divider-v1 .divider-v1-element {
  color: var(--ink);
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .06em;
}

@media (max-width: 820px) {
  .codex-rewrite .codex-contact-area .codex-contact-module__form {
    overflow: visible !important;
  }

  .codex-rewrite .codex-contact-area .codex-contact-module__form .codex-contact-portrait {
    transform: none;
  }

  .codex-rewrite .inner-content .divider-v1 {
    margin: 36px 0 20px;
    padding: 11px 14px 12px;
    border-left-width: 4px;
  }

  .codex-rewrite .inner-content .divider-v1 .divider-v1-element {
    font-size: 20px;
    letter-spacing: .04em;
  }
}

/* Equipment captions must stay smaller than article headings at every breakpoint. */
html body.codex-rewrite.inner-page.equipment-page .inner-content .codex-equipment-showcase h2.codex-content-heading,
html body.codex-rewrite.inner-page.equipment-page .inner-content .codex-equipment-showcase h3.codex-content-heading,
html body.codex-rewrite.inner-page.equipment-page .inner-content .codex-equipment-showcase h4.codex-content-heading {
  margin: 0 !important;
  padding: 14px 10px 16px !important;
  border: 0 !important;
  font-size: 18px !important;
  line-height: 1.45 !important;
  font-weight: 600 !important;
  text-align: center !important;
}

@media (max-width: 820px) {
  html body.codex-rewrite.inner-page.equipment-page .inner-content .codex-equipment-showcase h2.codex-content-heading,
  html body.codex-rewrite.inner-page.equipment-page .inner-content .codex-equipment-showcase h3.codex-content-heading,
  html body.codex-rewrite.inner-page.equipment-page .inner-content .codex-equipment-showcase h4.codex-content-heading {
    padding: 12px 8px 14px !important;
    font-size: 17px !important;
  }
}

html body.codex-rewrite.inner-page.equipment-page .inner-content .codex-equipment-showcase .codex-equipment-card-title {
  margin: 0 !important;
  padding: 14px 10px 16px !important;
  color: #4a4540 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  text-align: center !important;
}

@media (max-width: 820px) {
  html body.codex-rewrite.inner-page.equipment-page .inner-content .codex-equipment-showcase .codex-equipment-card-title {
    padding: 12px 8px 14px !important;
    font-size: 17px !important;
  }
}

/* Keep these overrides last: the legacy equipment rules are loaded before this
   point and otherwise re-enlarge the card captions. */
.codex-rewrite.equipment-page .codex-equipment-showcase .codex-content-heading,
.codex-rewrite.equipment-page .codex-equipment-showcase h2,
.codex-rewrite.equipment-page .codex-equipment-showcase h3,
.codex-rewrite.equipment-page .codex-equipment-showcase h4 {
  margin: 0 !important;
  padding: 14px 10px 16px !important;
  border: 0 !important;
  color: #4a4540 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  text-align: center !important;
}

@media (max-width: 820px) {
  .codex-rewrite.equipment-page .codex-equipment-showcase .codex-content-heading,
  .codex-rewrite.equipment-page .codex-equipment-showcase h2,
  .codex-rewrite.equipment-page .codex-equipment-showcase h3,
  .codex-rewrite.equipment-page .codex-equipment-showcase h4 {
    padding: 12px 8px 14px !important;
    font-size: 17px !important;
  }
}

/* Final shared article pass: keep headings readable and media rails tight. */
.codex-rewrite .inner-content .codex-prose-section .fg-heading.codex-content-heading,
.codex-rewrite .inner-content .fg-section:not(:has(.services-v5, .codex-equipment-showcase)) .fg-heading.codex-content-heading {
  font-size: clamp(23px, 2vw, 27px) !important;
  line-height: 1.45 !important;
  margin-top: clamp(28px, 4vw, 46px) !important;
  margin-bottom: 16px !important;
}

.codex-rewrite .inner-content .codex-prose-section .fg-heading.codex-content-heading:first-child,
.codex-rewrite .inner-content .fg-section:not(:has(.services-v5, .codex-equipment-showcase)) .fg-heading.codex-content-heading:first-child {
  margin-top: 0 !important;
}

.codex-rewrite .inner-content .codex-prose-section ul,
.codex-rewrite .inner-content .codex-prose-section ol {
  margin: 16px 0 24px !important;
  padding-left: 1.45em !important;
}

.codex-rewrite .inner-content .codex-prose-section li {
  margin: 5px 0 !important;
  padding-left: .15em;
  color: #4a4540 !important;
  font-size: var(--type-body) !important;
  line-height: 1.65 !important;
}

/* Some source pages use a plain image rail instead of the carousel class. */
.codex-rewrite .post-content > .fg-section:has(.fg-image):not(:has(.fg-heading, .fg-paragraph, ul, ol, form)) {
  min-height: 0 !important;
  margin-block: 0 !important;
  padding-block: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
}

.codex-rewrite .post-content > .fg-section:has(.fg-image):not(:has(.fg-heading, .fg-paragraph, ul, ol, form)) .fg-image {
  display: block;
  width: 100%;
  margin: 0;
}

/* Equipment names are card captions, not article headings. */
body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .fg-col > .fg-wrapper {
  padding: 6px !important;
  background: #fff !important;
  border: 1px solid rgba(74, 69, 64, .12) !important;
  box-shadow: 0 10px 24px rgba(50, 42, 34, .11) !important;
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .codex-content-heading {
  margin: 0 !important;
  padding: 14px 10px 16px !important;
  border: 0 !important;
  color: #4a4540 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  text-align: center !important;
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-lede {
  max-width: none !important;
  margin-bottom: 28px !important;
  color: #4a4540 !important;
  font-size: clamp(22px, 1.7vw, 26px) !important;
  line-height: 1.7 !important;
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content .codex-prose-section .fg-heading.codex-content-heading,
  .codex-rewrite .inner-content .fg-section:not(:has(.services-v5, .codex-equipment-showcase)) .fg-heading.codex-content-heading {
    font-size: 22px !important;
    margin-top: 32px !important;
    margin-bottom: 14px !important;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .codex-content-heading {
    font-size: 17px !important;
    padding: 12px 8px 14px !important;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-equipment-lede {
    font-size: 21px !important;
    line-height: 1.75 !important;
  }
}

/* Breadcrumbs are navigation, not a chapter divider. */
.codex-rewrite.equipment-page .codex-breadcrumb-section,
.codex-rewrite.equipment-page .codex-breadcrumb-section::before,
.codex-rewrite.equipment-page .codex-breadcrumb-section::after {
  border: 0 !important;
  box-shadow: none !important;
}

.codex-rewrite.equipment-page .codex-breadcrumb-section + .codex-equipment-intro {
  border-top: 0 !important;
}

/* The opening statement is body content: it should use the full article
   column rather than a campaign-style narrow measure. */
body.codex-rewrite.equipment-page .inner-main .inner-content .post-content .codex-equipment-intro .fg-col .codex-equipment-lede {
  max-width: none;
}

/* Equipment cards retain their original photographs, now with a restrained
   white mat and tighter gallery rhythm. */
body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .fg-row {
  gap: 24px;
}

/* The exported equipment markup nests the four cards inside the first
   desktop column. Rebuild that visual group as a real two-column gallery so
   the original card sequence remains intact without a one-column cascade. */
body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase > .fg-container > .fg-row > .fg-col.col-md-6 {
  grid-column: 1 / -1 !important;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase > .fg-container > .fg-row > .fg-col.col-md-6 > *,
body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase > .fg-container > .fg-row > .fg-col.col-md-6 > .fg-col {
  grid-column: auto !important;
  min-width: 0;
  width: auto;
}

/* The first exported card keeps its caption inside the fixed-height image
   wrapper. Reserve the image height and place the caption on the white mat,
   matching the other cards. */
body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase > .fg-container > .fg-row > .fg-col.col-md-6 > .fg-wrapper > .fg-wrapper {
  height: auto !important;
  min-height: 0 !important;
  padding-top: 350px;
  overflow: hidden;
  background: #fff;
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase > .fg-container > .fg-row > .fg-col.col-md-6 > .fg-wrapper > .fg-wrapper > .fg-bg {
  height: 350px !important;
  min-height: 350px !important;
  max-height: 350px !important;
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .fg-col > .fg-wrapper {
  padding: 6px;
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(50, 42, 34, .11);
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .fg-col > .fg-wrapper > .fg-wrapper {
  overflow: hidden;
}

body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .codex-content-heading {
  padding: 15px 14px 13px;
}

/* Reusable \"沈醫師談\" editorial card.  It has its own source heading and
   commentary, distinct from the separate full doctor profile that follows. */
body.codex-rewrite.equipment-page .inner-content .codex-shen-insight > .fg-bg .fg-bg-layer {
  background-color: #f3f1ed !important;
}

body.codex-rewrite.equipment-page .inner-content .codex-shen-insight {
  padding-block: clamp(56px, 6vw, 80px);
}

body.codex-rewrite.equipment-page .inner-content .codex-shen-insight-card {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(59, 54, 50, .18);
  background: #fff;
  box-shadow: 0 14px 30px rgba(55, 47, 40, .10);
}

body.codex-rewrite.equipment-page .inner-content .codex-shen-insight-photo {
  grid-column: auto;
  min-width: 0;
}

body.codex-rewrite.equipment-page .inner-content .codex-shen-insight-portrait {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 410px;
  object-fit: cover;
  object-position: center top;
}

body.codex-rewrite.equipment-page .inner-content .codex-shen-insight-copy {
  grid-column: auto;
  padding: clamp(32px, 4vw, 54px);
}

body.codex-rewrite.equipment-page .inner-content .codex-shen-insight-title {
  margin: 0 0 24px;
  padding-left: 16px;
  border-left: 3px solid #d65e5e;
  color: var(--ink);
  font-size: clamp(24px, 2.15vw, 30px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .025em;
}

body.codex-rewrite.equipment-page .inner-content .codex-shen-insight-body {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.9 !important;
  letter-spacing: .012em;
}

body.codex-rewrite.equipment-page .inner-content .codex-shen-insight-body:last-child {
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .codex-rewrite .codex-contact-area .codex-contact-brand > img {
    width: 38px;
  }

  .codex-rewrite .codex-contact-area .codex-contact-brand > p {
    font-size: 19px;
  }

  .codex-rewrite .codex-contact-area .codex-address-continuation {
    padding-left: 3em;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .fg-row {
    gap: 16px;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase > .fg-container > .fg-row > .fg-col.col-md-6 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase > .fg-container > .fg-row > .fg-col.col-md-6 > .fg-wrapper:first-child > .fg-wrapper {
    padding-top: 220px;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase > .fg-container > .fg-row > .fg-col.col-md-6 > .fg-wrapper:first-child > .fg-wrapper > .fg-bg {
    height: 220px;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-equipment-showcase .fg-col > .fg-wrapper {
    padding: 4px;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-shen-insight-card {
    grid-template-columns: 1fr;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-shen-insight-portrait {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-shen-insight-copy {
    padding: 28px 24px 30px;
  }

  body.codex-rewrite.equipment-page .inner-content .codex-shen-insight-title {
    margin-bottom: 18px;
    font-size: 23px;
  }

body.codex-rewrite.equipment-page .inner-content .codex-shen-insight-body {
    margin-bottom: 16px;
    font-size: 17px !important;
    line-height: 1.86 !important;
  }
}

/* Last-mile corrections for the legacy overrides that precede this file. */
.codex-rewrite .post-content > .fg-section:has(.services-v5) {
  padding-block: clamp(48px, 6vw, 78px) !important;
  color: #fff;
}

.codex-rewrite .post-content > .fg-section:has(.services-v5) .fg-heading.codex-content-heading {
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
  color: #d7ab48 !important;
  font-size: clamp(26px, 2.6vw, 34px) !important;
  text-align: center;
}

.codex-rewrite .post-content > .fg-section:has(.services-v5) .services-v5 {
  padding: 24px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, .2);
}

.codex-rewrite .post-content > .fg-section:has(.services-v5) .services-v5-body-title {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 21px !important;
}

.codex-rewrite .post-content > .fg-section:has(.services-v5) .services-v5-text {
  max-width: none;
  color: rgba(255, 255, 255, .92);
  font-size: 17px;
  line-height: 1.82;
}

.codex-rewrite .codex-contact-area .codex-contact-module__form {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  padding-block: clamp(48px, 5vw, 68px) !important;
}

.codex-rewrite .codex-contact-area .codex-contact-module__address {
  padding-block: clamp(48px, 5vw, 68px) !important;
}

.codex-rewrite .codex-contact-area .codex-contact-brand {
  gap: 10px;
  margin-bottom: 24px;
}

.codex-rewrite .codex-contact-area .codex-contact-brand > img {
  width: 38px !important;
}

.codex-rewrite .codex-contact-area .codex-contact-brand > p {
  font-size: clamp(19px, 1.65vw, 23px) !important;
  white-space: nowrap;
}

.codex-rewrite .codex-contact-area .codex-address-continuation {
  display: block;
  margin: 0;
  padding-left: 3em !important;
}

.codex-rewrite .codex-contact-area .codex-contact-socials {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.codex-rewrite .codex-contact-area .codex-contact-map iframe {
  height: 320px !important;
}

@media (max-width: 820px) {
  .codex-rewrite .post-content > .fg-section:has(.services-v5) .services-v5-body-title {
    font-size: 19px !important;
  }

  .codex-rewrite .codex-contact-area .codex-contact-module__form {
    padding-block: 42px 48px !important;
  }

  .codex-rewrite .codex-contact-area .codex-contact-module__address {
    padding-block: 44px 48px !important;
  }

  .codex-rewrite .codex-contact-area .codex-contact-brand > img {
    width: 34px !important;
  }

  .codex-rewrite .codex-contact-area .codex-contact-brand > p {
    font-size: 19px !important;
  }

  .codex-rewrite .codex-contact-area .codex-contact-map iframe {
    height: 260px !important;
  }
}

/* Final address-brand balance override. */
.codex-rewrite .codex-contact-area .codex-contact-brand {
  gap: 8px;
  margin-bottom: 14px;
}

.codex-rewrite .codex-contact-area .codex-contact-brand > img {
  width: 32px !important;
}

.codex-rewrite .codex-contact-area .codex-contact-brand > p {
  font-size: clamp(22px, 1.85vw, 26px) !important;
}

.codex-rewrite .codex-contact-area .codex-contact-brand + p {
  margin-top: 0 !important;
}

@media (max-width: 820px) {
  .codex-rewrite .codex-contact-area .codex-contact-brand > img {
    width: 30px !important;
  }

  .codex-rewrite .codex-contact-area .codex-contact-brand > p {
    font-size: 21px !important;
  }
}

/* Final article H2 treatment. */
.codex-rewrite .inner-content .codex-generic-content
  .codex-prose-section:not(.codex-doctor-section)
  h2.codex-content-heading {
  margin: clamp(34px, 4vw, 52px) 0 18px !important;
  padding: 8px 18px 9px !important;
  border: 1px solid rgba(200, 154, 91, .28) !important;
  border-left: 4px solid var(--gold) !important;
  background: linear-gradient(90deg, rgba(247, 242, 233, .96), rgba(247, 242, 233, .35) 72%, transparent) !important;
  color: var(--ink) !important;
  font-size: clamp(21px, 1.8vw, 27px) !important;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: .035em;
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content .codex-generic-content
    .codex-prose-section:not(.codex-doctor-section)
    h2.codex-content-heading {
    margin: 30px 0 16px !important;
    padding: 7px 12px 8px !important;
    border-left-width: 4px !important;
    font-size: 20px !important;
    line-height: 1.4;
  }
}

/* Certification groups use a smaller H4 label treatment instead of article H2. */
.codex-rewrite .inner-content .divider-v1 {
  display: flex;
  align-items: center;
  min-height: 0 !important;
  margin: clamp(34px, 4vw, 48px) 0 20px !important;
  padding: 7px 16px 8px !important;
  border: 1px solid rgba(200, 154, 91, .24) !important;
  border-left: 4px solid var(--gold) !important;
  background: rgba(247, 242, 233, .72) !important;
}

.codex-rewrite .inner-content .divider-v1 .divider-v1-element {
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: clamp(18px, 1.55vw, 22px) !important;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .04em;
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content .divider-v1 {
    margin: 28px 0 16px !important;
    padding: 6px 12px 7px !important;
    border-left-width: 4px !important;
  }

  .codex-rewrite .inner-content .divider-v1 .divider-v1-element {
    font-size: 18px !important;
    line-height: 1.4;
  }
}

/* Keep a small, intentional pause between the advantages title and its cards. */
.codex-rewrite .post-content > .fg-section:has(.services-v5) .fg-heading.codex-content-heading {
  margin-bottom: 16px !important;
}

@media (max-width: 820px) {
  .codex-rewrite .post-content > .fg-section:has(.services-v5) .fg-heading.codex-content-heading {
    margin-bottom: 12px !important;
  }
}

/* Shared Waterlase introduction: use the same calm, editorial treatment as
   the founder profile while preserving the source copy and image order. */
.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) {
  margin-block: clamp(28px, 4vw, 54px) !important;
  padding: clamp(28px, 4vw, 52px) clamp(18px, 3vw, 38px) !important;
  border: 0 !important;
  border-radius: 20px;
  background: #f7f8fa !important;
  box-shadow: 0 14px 34px rgba(58, 49, 42, .08);
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container {
  width: 100%;
  max-width: 1160px;
  padding-inline: 0;
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row {
  margin: 0;
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col {
  padding-inline: 0;
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, .96fr);
  gap: clamp(28px, 4vw, 54px);
  align-items: start;
  margin: 0;
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row > .fg-col {
  width: auto;
  min-width: 0;
  padding-inline: 0;
  float: none;
  grid-column: auto !important;
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row > .fg-col:first-child > .fg-wrapper {
  height: 100%;
  padding: clamp(22px, 3vw, 38px);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(58, 49, 42, .10);
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) h2.codex-content-heading {
  margin: 0 0 22px !important;
  padding: 0 0 13px 16px !important;
  border: 0 !important;
  border-left: 4px solid var(--gold) !important;
  border-bottom: 1px solid rgba(197, 154, 92, .42) !important;
  background: transparent !important;
  color: var(--ink) !important;
  font-size: clamp(22px, 2vw, 29px) !important;
  line-height: 1.4 !important;
  letter-spacing: .025em;
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row .fg-paragraph p {
  margin: 0 0 20px;
  color: var(--ink-soft) !important;
  font-size: 18px !important;
  line-height: 1.9 !important;
  letter-spacing: .012em;
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row > .fg-col:nth-child(2) > a {
  display: block;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(58, 49, 42, .12);
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row > .fg-col:nth-child(2) .fg-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto !important;
  border-radius: 12px;
  object-fit: cover;
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row + .fg-col {
  margin-top: clamp(24px, 3vw, 36px);
  padding: 0 clamp(4px, 1vw, 12px);
}

/* The shared Waterlase heading must win over the generic article H2 card. */
.codex-rewrite .inner-content .codex-generic-content .fg-section:has([id^="he_weiWaterlase"]) h2.codex-content-heading {
  margin: 0 0 22px !important;
  padding: 0 0 13px 16px !important;
  border: 0 !important;
  border-left: 4px solid var(--gold) !important;
  border-bottom: 1px solid rgba(197, 154, 92, .42) !important;
  background: transparent !important;
  color: var(--ink) !important;
  font-size: clamp(22px, 2vw, 29px) !important;
  line-height: 1.4 !important;
  letter-spacing: .025em;
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content .codex-generic-content .fg-section:has([id^="he_weiWaterlase"]) h2.codex-content-heading {
    margin-bottom: 18px !important;
    padding: 0 0 10px 12px !important;
    font-size: 21px !important;
  }
}

.codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row + .fg-col p {
  margin: 0;
  color: var(--ink-soft) !important;
  font-size: 18px !important;
  line-height: 1.9 !important;
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) {
    margin-block: 24px !important;
    padding: 24px 16px !important;
    border-radius: 16px;
  }

  .codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row > .fg-col:first-child > .fg-wrapper {
    padding: 20px 18px;
  }

  .codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) h2.codex-content-heading {
    margin-bottom: 18px !important;
    padding: 0 0 10px 12px !important;
    font-size: 21px !important;
  }

  .codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row .fg-paragraph p,
  .codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row + .fg-col p {
    font-size: 17px !important;
    line-height: 1.86 !important;
  }

  .codex-rewrite .inner-content .fg-section:has([id^="he_weiWaterlase"]) > .fg-container > .fg-row > .fg-col > .fg-row > .fg-col:nth-child(2) > a {
    padding: 8px;
  }
}

/* Final aboutus pass: keep the four circular labels quieter than the main
   statement above, after the shared services-heading rules have resolved. */
body.codex-rewrite.aboutus-page .inner-content .post-content > section.codex-about-hero .ffb-id-1pvdgg02 h3.codex-content-heading {
  font-size: clamp(24px, 2vw, 28px) !important;
  line-height: 1.25 !important;
}

@media (max-width: 820px) {
  body.codex-rewrite.aboutus-page .inner-content .post-content > section.codex-about-hero .ffb-id-1pvdgg02 h3.codex-content-heading {
    font-size: 16px !important;
    line-height: 1.3 !important;
  }
}

/* Aboutus gallery: this is a visual break between sections, so it runs
   edge-to-edge instead of inheriting the article container gutters. */
body.codex-rewrite.aboutus-page .inner-content > .post-content > .codex-about-space-gallery {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0 !important;
  overflow: hidden;
}

body.codex-rewrite.aboutus-page .codex-about-space-gallery > .fg-container,
body.codex-rewrite.aboutus-page .codex-about-space-gallery > .fg-container > .fg-row {
  width: 100%;
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
}

body.codex-rewrite.aboutus-page .codex-about-space-gallery > .fg-container > .fg-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 !important;
}

body.codex-rewrite.aboutus-page .codex-about-space-gallery .fg-col {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none;
  grid-column: auto !important;
}

body.codex-rewrite.aboutus-page .codex-about-space-gallery img {
  display: block;
  width: 100% !important;
  max-width: none;
  height: auto;
  margin: 0;
}

@media (max-width: 820px) {
  body.codex-rewrite.aboutus-page .codex-about-space-gallery > .fg-container > .fg-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Aboutus profile motto: keep this as a distinct editorial label rather than
   letting the shared article H2 treatment make it feel like another chapter. */
body.codex-rewrite.aboutus-page .codex-about-profile .codex-source-heading {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 16px !important;
  padding: 4px 0 4px 14px !important;
  border: 0 !important;
  border-left: 4px solid var(--gold) !important;
  color: var(--ink) !important;
  font-size: clamp(23px, 2vw, 29px) !important;
  font-weight: 700;
  line-height: 1.35 !important;
  letter-spacing: .06em;
  text-wrap: balance;
}

body.codex-rewrite.aboutus-page .codex-about-profile .codex-source-heading + p {
  margin: 0 0 26px !important;
  color: var(--ink-soft) !important;
  font-size: clamp(16px, 1.25vw, 19px) !important;
  font-weight: 700;
  line-height: 1.65 !important;
  letter-spacing: .035em;
}

@media (max-width: 820px) {
  body.codex-rewrite.aboutus-page .codex-about-profile .codex-source-heading {
    margin-bottom: 12px !important;
    padding-left: 10px !important;
    border-left-width: 3px !important;
    font-size: 22px !important;
    line-height: 1.4 !important;
  }

  body.codex-rewrite.aboutus-page .codex-about-profile .codex-source-heading + p {
    margin-bottom: 20px !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
  }
}

/* Aboutus patient-image wall: retain the original three-column composition
   while tightening the gutters to a deliberate 5px rhythm. */
body.codex-rewrite.aboutus-page .ffb-id-3jdeg74l > .fg-container > .fg-row {
  gap: 5px !important;
}

body.codex-rewrite.aboutus-page .ffb-id-3jdeg74l > .fg-container > .fg-row > .fg-col {
  min-width: 0;
  padding-inline: 0 !important;
}

body.codex-rewrite.aboutus-page .ffb-id-3jdeg74l > .fg-container > .fg-row > .fg-col img {
  display: block;
  width: 100%;
  height: auto;
}

/* Every long-form article starts with the same quiet navigation trail.  It
   belongs to the article flow, but should never read as another content
   section or introduce a divider line. */
body.codex-rewrite .inner-content .codex-generic-content > .codex-breadcrumb-section {
  margin: 0;
  padding: 14px 0 8px;
  border: 0 !important;
  box-shadow: none !important;
}

body.codex-rewrite .inner-content .codex-generic-content > .codex-breadcrumb-section::before,
body.codex-rewrite .inner-content .codex-generic-content > .codex-breadcrumb-section::after {
  display: none;
  border: 0 !important;
}

body.codex-rewrite .inner-content .codex-article-breadcrumb {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: .025em;
}

body.codex-rewrite .inner-content .codex-article-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.codex-rewrite .inner-content .codex-article-breadcrumb li {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
}

body.codex-rewrite .inner-content .codex-article-breadcrumb li + li::before {
  margin: 0 9px;
  color: #c89a5b;
  content: "/";
}

body.codex-rewrite .inner-content .codex-article-breadcrumb a {
  color: var(--ink-muted);
  text-decoration: none;
}

body.codex-rewrite .inner-content .codex-article-breadcrumb a:hover,
body.codex-rewrite .inner-content .codex-article-breadcrumb a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.codex-rewrite .inner-content .codex-article-breadcrumb li[aria-current="page"] {
  max-width: min(72ch, 100%);
  color: var(--ink-soft);
  font-weight: 600;
}

/* The treatment-case archive needs a visible, local filter in addition to
   the global navigation. Keep it compact so the cards remain the focus. */
body.codex-rewrite .inner-content .codex-case-category-nav {
  margin: 0 0 24px;
  padding: 10px;
  border: 1px solid rgba(200, 154, 91, .32);
  background: #fff;
}

body.codex-rewrite .inner-content .codex-case-category-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.codex-rewrite .inner-content .codex-case-category-nav a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  border: 1px solid #e4e0da;
  border-radius: 3px;
  color: var(--ink);
  background: #faf9f7;
  font-size: 15px;
  line-height: 1.35;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

body.codex-rewrite .inner-content .codex-case-category-nav a:hover,
body.codex-rewrite .inner-content .codex-case-category-nav a:focus-visible,
body.codex-rewrite .inner-content .codex-case-category-nav a.is-active {
  border-color: #c89a5b;
  color: #fff;
  background: #c89a5b;
}

/* The breadcrumb is navigation, not a full-height section. Collapse the
   first article section's inherited top padding to remove the false gap. */
body.codex-rewrite .inner-content .codex-generic-content > .codex-breadcrumb-section + .fg-section {
  padding-top: 14px;
}

@media (max-width: 767px) {
  body.codex-rewrite .inner-content .codex-generic-content > .codex-breadcrumb-section {
    padding: 12px 0 7px;
  }

  body.codex-rewrite .inner-content .codex-generic-content > .codex-breadcrumb-section + .fg-section {
    padding-top: 10px;
  }

  body.codex-rewrite .inner-content .codex-case-category-nav {
    margin-bottom: 18px;
    padding: 8px;
  }

  body.codex-rewrite .inner-content .codex-case-category-nav ul {
    gap: 6px;
  }

  body.codex-rewrite .inner-content .codex-case-category-nav a {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 14px;
  }

  body.codex-rewrite .inner-content .codex-article-breadcrumb {
    font-size: 13px;
  }

  body.codex-rewrite .inner-content .codex-article-breadcrumb li + li::before {
    margin: 0 7px;
  }
}

/* Principal and doctor profiles use a profile hierarchy rather than the
   article-heading treatment. Keep the role line quiet, make the doctor name
   the visual anchor, and use the specialty rule as the divider. */
.codex-rewrite .inner-content .codex-doctor-section .codex-doctor-copy .codex-doctor-role {
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--accent-dark) !important;
  font-size: 16px !important;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .08em;
  text-align: left;
}

.codex-rewrite .inner-content .codex-doctor-section .codex-doctor-copy .codex-doctor-name {
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--ink) !important;
  font-size: clamp(30px, 3vw, 40px) !important;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: .04em;
  text-align: left;
}

.codex-rewrite .inner-content .codex-doctor-section .codex-doctor-copy .codex-doctor-specialty {
  margin: 0 0 22px !important;
  padding: 0 0 13px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(197, 154, 92, .46) !important;
  background: transparent !important;
  color: var(--accent-dark) !important;
  font-size: 18px !important;
  font-weight: 700;
  line-height: 1.6;
  text-align: left;
}

@media (max-width: 820px) {
  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-copy .codex-doctor-role {
    font-size: 15px !important;
  }

  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-copy .codex-doctor-name {
    font-size: 30px !important;
  }

  .codex-rewrite .inner-content .codex-doctor-section .codex-doctor-copy .codex-doctor-specialty {
    margin-bottom: 20px !important;
    padding-bottom: 11px !important;
    font-size: 17px !important;
  }
}

/* Shared contact module: keep the form and clinician portrait visually
   connected instead of leaving a large empty band above and below them. */
.codex-rewrite .inner-content .codex-contact-module {
  margin-top: clamp(36px, 4vw, 56px) !important;
}

.codex-rewrite .codex-contact-area .codex-contact-module__form {
  padding-top: clamp(32px, 3vw, 40px) !important;
  padding-bottom: 0 !important;
}

@media (min-width: 821px) {
  .codex-rewrite .codex-contact-area .codex-contact-module__form .codex-contact-portrait {
    transform: none !important;
  }
}

@media (max-width: 820px) {
  .codex-rewrite .codex-contact-area .codex-contact-module__form {
    padding-block: 32px 36px !important;
  }
}
