.legacy-main {
  width: min(calc(100% - 36px), 1404px);
  margin: 18px auto 0;
  padding-inline: 26px;
}

/* Client feedback release: shared subnavigation and real before/after pairs. */
.legacy-hero--plain {
  background:
    radial-gradient(circle at 78% 20%, rgb(144 174 225 / 48%), transparent 38%),
    linear-gradient(145deg, #315aa8, #172e59 80%);
}
.legacy-hero--plain .legacy-hero__overlay {
  background: linear-gradient(110deg, rgb(17 38 77 / 12%), rgb(49 90 168 / 8%));
}

.legacy-subnav { display: none; }

.legacy-before-after {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 28px);
  margin: 34px 0 44px;
}
.legacy-content .legacy-before-after figure { margin: 0; }
.legacy-content .legacy-before-after img {
  width: 100%;
  max-height: none;
  aspect-ratio: 1.58;
  margin: 0;
  object-fit: cover;
  border: 0;
  border-radius: 18px;
  box-shadow: none;
}
.legacy-content .legacy-before-after figcaption {
  margin-top: 10px;
  color: #315aa8;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.legacy-feature-media {
  margin: 0 0 42px;
}
.legacy-content .legacy-feature-media img {
  width: min(100%, 760px);
  max-height: 520px;
  margin: 0 auto;
  object-fit: contain;
}

.emergency-call {
  display: grid;
  width: min(100%, 420px);
  margin: 34px auto 12px;
  padding: 22px 28px;
  color: #fff !important;
  background: linear-gradient(135deg, #315aa8, #173464);
  border-radius: 16px;
  box-shadow: 0 16px 34px rgb(23 52 100 / 18%);
  font-size: clamp(25px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}
.emergency-call span {
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.emergency-call:hover,
.emergency-call:focus-visible { background: #11264d; }

.legacy-treatment-block {
  margin: 0 0 28px;
  color: #173464;
  font-size: 16px;
  line-height: 1.65;
}

.route-new-patient-problems-we-solve .legacy-content > p:empty { display: none; }

@media (max-width: 620px) {
  .legacy-before-after {
    gap: 10px;
    margin: 26px 0 34px;
  }
  .legacy-content .legacy-before-after img { border-radius: 12px; }
  .legacy-content .legacy-before-after figcaption { font-size: 11px; }
}

.legacy-hero {
  position: relative;
  min-height: 500px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 64px;
  color: #fff;
  text-align: center;
  background: linear-gradient(145deg, #315aa8, #172e59 78%);
  border-radius: 24px;
  isolation: isolate;
}

.legacy-hero__image,
.legacy-hero__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.legacy-hero__image { z-index: -2; object-fit: cover; }
.legacy-hero__overlay { z-index: -1; background: linear-gradient(120deg, rgb(13 31 62 / 82%), rgb(40 83 148 / 52%)); }
.legacy-hero--plain .legacy-hero__overlay { background: radial-gradient(circle at 78% 20%, rgb(142 169 220 / 46%), transparent 36%); }
.legacy-hero__content { width: min(900px, 100%); min-width: 0; }
.legacy-parent-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
}
.legacy-parent-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.legacy-eyebrow,
.legacy-section-heading > p,
.legacy-contact-card > p {
  margin: 0 0 14px;
  color: #b9cbeb;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.legacy-hero h1,
.legacy-section-heading h2,
.legacy-contact-card h2,
.legacy-content h2,
.legacy-content h3,
.legacy-content h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: .96;
  text-transform: uppercase;
}

.legacy-hero h1 { max-width: 1000px; margin: 0 auto; font-size: clamp(52px, 6vw, 82px); }
.legacy-summary { max-width: 760px; margin: 26px auto 0; font-size: 17px; line-height: 1.5; }

.legacy-subnav {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: min(1180px, calc(100% - 44px));
  margin: -28px auto 74px;
  padding: 13px;
  background: rgb(247 250 255 / 97%);
  border: 1px solid rgb(222 181 116 / 62%);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgb(23 52 100 / 14%);
}

.legacy-subnav a {
  padding: 10px 13px;
  color: #173464;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}

.legacy-subnav a:hover,
.legacy-subnav a:focus-visible,
.legacy-subnav a[aria-current="page"] {
  color: #fff;
  background: #315aa8;
}

.legacy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  align-items: start;
  width: min(1180px, calc(100% - 44px));
  margin: -52px auto 90px;
  position: relative;
  z-index: 2;
}

.legacy-content {
  min-width: 0;
  padding: clamp(32px, 5vw, 72px);
  color: #173464;
  background: linear-gradient(180deg, rgb(229 237 251 / 96%), #fff 44%);
  border: 1px solid rgb(222 181 116 / 62%);
  border-radius: 24px;
  box-shadow: 0 24px 58px rgb(23 52 100 / 13%);
}

.legacy-content h2 { margin: 52px 0 18px; color: #173464; font-size: clamp(38px, 4vw, 56px); }
.legacy-content h3,
.legacy-content h4 { margin: 38px 0 14px; color: #315aa8; font-size: clamp(28px, 3vw, 40px); }
.legacy-content > h2:first-child,
.legacy-content > h3:first-child { margin-top: 0; }
.legacy-content p,
.legacy-content li { font-size: 16px; line-height: 1.65; }
.legacy-content p { margin: 0 0 20px; }
.legacy-content ul,
.legacy-content ol { margin: 18px 0 28px; padding-left: 24px; }
.legacy-content li + li { margin-top: 9px; }
.legacy-content a { color: #315fb8; text-underline-offset: 3px; }
.legacy-content img { display: block; width: auto; max-width: 100%; max-height: 720px; margin: 30px auto; object-fit: contain; border-radius: 18px; }
.legacy-content figure { margin: 32px 0; }
.legacy-content figcaption { margin-top: 8px; color: #61708a; text-align: center; }
.legacy-content blockquote { margin: 28px 0; padding: 18px 24px; color: #315aa8; background: #edf3ff; border-left: 4px solid #315aa8; }
.legacy-content table { width: 100%; margin: 28px 0; border-collapse: collapse; }
.legacy-content th,
.legacy-content td { padding: 10px; border: 1px solid #b9c7dc; text-align: left; }
.legacy-byline { padding-bottom: 16px; color: #61708a; border-bottom: 1px solid #d8e1f0; font-size: 13px !important; }

.legacy-contact-card {
  position: sticky;
  top: 22px;
  margin-top: 100px;
  padding: 34px;
  color: #fff;
  background: linear-gradient(145deg, #315aa8, #172e59 78%);
  border-radius: 22px;
}
.legacy-contact-card h2 { margin: 0 0 28px; color: #fff; font-size: 42px; }
.legacy-contact-card .button { width: 100%; }
.legacy-context-link {
  display: block;
  margin-top: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}
.legacy-context-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.legacy-layout--single { grid-template-columns: 1fr; }

.legacy-smile-cta {
  position: relative;
  display: grid;
  min-height: clamp(440px, 50vw, 650px);
  margin: -30px 0 90px;
  overflow: hidden;
  color: #fff;
  background-color: #173464;
  border-radius: 24px;
  isolation: isolate;
}

.legacy-smile-cta__image {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.legacy-smile-cta__overlay {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(105deg, rgb(23 52 100 / 88%), rgb(49 90 168 / 66%));
}

.legacy-smile-cta__content {
  display: grid;
  align-content: center;
  justify-items: center;
  width: min(1120px, calc(100% - 80px));
  margin: 0 auto;
  padding: 80px 0;
  text-align: center;
}

.legacy-smile-cta h2 {
  max-width: 1080px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(52px, 5.6vw, 82px);
  font-weight: 400;
  line-height: .96;
  text-transform: uppercase;
}

.legacy-smile-cta p {
  max-width: 800px;
  margin: 34px 0;
  color: #fff;
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.35;
}

.legacy-smile-cta .button {
  min-width: min(100%, 390px);
}

.legacy-index,
.legacy-related { width: min(1220px, calc(100% - 44px)); margin: 68px auto 100px; }
.legacy-section-heading { margin-bottom: 28px; text-align: center; }
.legacy-section-heading > p { color: #315aa8; }
.legacy-section-heading h2 { margin: 0; color: #173464; font-size: clamp(48px, 5vw, 68px); }
.legacy-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.legacy-card-grid--related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.legacy-card { overflow: hidden; background: linear-gradient(180deg, #dce8ff, #f7f8fb); border: 1px solid #d6e0ef; border-radius: 16px; box-shadow: 0 15px 34px rgb(23 52 100 / 10%); }
.legacy-card > img { width: 100%; aspect-ratio: 1.75; object-fit: cover; }
.legacy-card > div { padding: 22px; }
.legacy-card h2 { margin: 0 0 12px; color: #173464; font-size: 21px; line-height: 1.18; }
.legacy-card h2 a { text-decoration: none; }
.legacy-card p { margin: 0 0 18px; color: #45618d; font-size: 14px; line-height: 1.45; }
.legacy-read-more { color: #315aa8; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

@media (min-width: 1600px) {
  .legacy-main {
    width: min(calc(100% - 96px), 1720px);
    padding-inline: 34px;
  }
}

@media (max-width: 920px) {
  .legacy-layout { grid-template-columns: 1fr; }
  .legacy-contact-card { position: static; margin-top: 0; }
  .legacy-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .legacy-main {
    width: min(calc(100% - 20px), 1404px);
    margin-top: 10px;
    padding-inline: 14px;
  }
  .legacy-hero { min-height: 390px; padding: 42px 18px; border-radius: 18px; }
  .legacy-hero h1 {
    max-width: 100%;
    font-size: clamp(34px, 9.7vw, 38px);
    line-height: 1;
    overflow-wrap: anywhere;
  }
  .legacy-summary { font-size: 15px; }
  .legacy-subnav { width: calc(100% - 18px); margin-bottom: 48px; padding: 10px; }
  .legacy-subnav a { flex: 1 1 145px; text-align: center; }
  .legacy-layout { width: calc(100% - 16px); margin-top: -24px; }
  .legacy-content { padding: 30px 22px; border-radius: 18px; }
  .legacy-content p,
  .legacy-content li { font-size: 15px; }
  .legacy-content table { display: block; max-width: 100%; overflow-x: auto; }
  .legacy-card-grid,
  .legacy-card-grid--related { grid-template-columns: 1fr; }
  .legacy-index,
  .legacy-related { width: calc(100% - 20px); }
  .legacy-smile-cta {
    min-height: 480px;
    margin: -16px 0 56px;
    border-radius: 18px;
  }
  .legacy-smile-cta__image { object-position: 58% center; }
  .legacy-smile-cta__content {
    width: calc(100% - 40px);
    padding: 64px 0;
  }
  .legacy-smile-cta h2 {
    font-size: clamp(38px, 12vw, 48px);
    overflow-wrap: anywhere;
  }
  .legacy-smile-cta p {
    margin: 26px 0;
    font-size: 17px;
  }
  .legacy-smile-cta .button {
    min-width: 0;
    width: 100%;
  }
}

/* Final cascade for the shared feedback treatments. */
.legacy-hero--plain .legacy-hero__overlay {
  background: linear-gradient(110deg, rgb(17 38 77 / 12%), rgb(49 90 168 / 8%));
}
.legacy-subnav { display: none; }
