:root {
  --audit-blue: #064b86;
  --audit-deep: #04477f;
  --audit-light: #e6f6fc;
  --audit-orange: #f79a23;
  --audit-text: #174f7c;
  --audit-muted: #526f86;
}

html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; color: var(--audit-text); }
body p, body li { color: inherit; }
.wrap, .rm-page .wrap { width: min(1180px, calc(100% - 40px)); }

/* Internal pages should carry Celebrate's quieter scale at 100% browser zoom. */
.rm-page h2, .sm-page h2, .master-faq h2 { font-size: clamp(25px, 2.05vw, 35px); }
.rm-page p, .sm-page p { color: var(--audit-muted); font-size: 15px; }
.rm-section, .sm-section { padding-top: 62px; padding-bottom: 62px; }
.rm-hero, .sm-hero { min-height: 390px; }
.rm-hero h1, .sm-hero h1 { font-size: clamp(35px, 3.45vw, 54px); }

/* Slim breadcrumbs used by every internal page. */
.breadcrumb-bar {
  min-height: 42px;
  padding: 0 !important;
  background: #edf8fc;
  border-color: #d5e8f0;
}
.breadcrumb-bar .wrap {
  min-height: 42px;
  font-size: 11px !important;
  letter-spacing: .05em;
}
.breadcrumb-bar a { color: var(--audit-blue); text-decoration: none; }

/* Consistent line-art service icon family. */
.rm-line-icon, .sm-icon {
  width: 68px;
  height: 68px;
  border: 0 !important;
  border-radius: 50%;
  color: transparent !important;
  font-size: 0 !important;
  background-color: #f0f8fb;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 42px 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23064b86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c-7 2-10 9-9 17 1 9 5 25 10 27 5 2 5-13 10-13s5 15 10 13c5-2 9-18 10-27 1-8-2-15-9-17-5-2-8 2-11 2s-6-4-11-2Z'/%3E%3Cpath d='M23 25h18M26 21v8M32 21v8M38 21v8'/%3E%3C/svg%3E");
}

/* One FAQ system: pale section, white cards, navy text, clear controls. */
.master-faq, .rm-faq, .sm-faq {
  background: var(--audit-light) !important;
  padding: 66px 20px !important;
}
.master-faq h2, .rm-faq h2, .sm-faq h2 {
  color: var(--audit-blue);
  text-align: center;
  margin-bottom: 34px;
}
.master-faq-list, .rm-faq .master-faq-list, .sm-faq > .sm-wrap {
  width: min(980px, 100%);
  max-width: 980px !important;
  margin-left: auto;
  margin-right: auto;
}
.master-faq-list details, .rm-faq details, .sm-faq details {
  background: #fff;
  border: 0 !important;
  margin: 0 0 12px;
  padding: 0 !important;
  box-shadow: 0 2px 10px rgba(6, 75, 134, .07);
}
.master-faq-list summary, .rm-faq summary, .sm-faq summary {
  position: relative;
  display: block;
  cursor: pointer;
  color: var(--audit-blue) !important;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  padding: 21px 58px 21px 24px !important;
  list-style: none;
}
.master-faq-list summary::-webkit-details-marker,
.rm-faq summary::-webkit-details-marker,
.sm-faq summary::-webkit-details-marker { display: none; }
.master-faq-list summary::after, .rm-faq summary::after, .sm-faq summary::after {
  content: "+" !important;
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  font-weight: 300;
}
.master-faq-list details[open] summary::after,
.rm-faq details[open] summary::after,
.sm-faq details[open] summary::after { content: "-" !important; }
.master-faq-list details p, .rm-faq details p, .sm-faq details p {
  margin: 0 !important;
  padding: 0 58px 22px 24px !important;
  color: var(--audit-muted) !important;
  font-size: 15px;
  text-align: left;
}

/* Strong shared appointment CTA. */
.appointment-cta {
  background: var(--audit-deep) !important;
  color: #fff !important;
  padding: 62px 0 !important;
}
.appointment-cta-grid {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.35fr);
  gap: 70px;
  align-items: center;
}
.appointment-cta h2 { color: #fff !important; font-size: clamp(29px, 2.5vw, 40px); text-align: left; }
.appointment-cta p, .appointment-cta li { color: #fff !important; opacity: 1 !important; }
.appointment-cta li { font-size: 16px; margin: 13px 0; }
.appointment-cta .rm-btn, .appointment-cta .sm-btn { margin-top: 14px; }

/* Shared images stay crisp and predictable. */
.rm-split img, .sm-split > img, .rm-promo > img, .sm-card img, .rm-image-grid img,
.rm-doctors img { object-position: center; }
.rm-doctors img { height: 290px; }
.rm-doctors h3 { margin: 0; }
video[autoplay] { background: #dfeff5; }
.braces-hero-media video { object-fit: cover; object-position: center; }
.teeth-model { display: flex; align-items: center; justify-content: center; background: transparent !important; }
.teeth-model img { display: block; width: min(100%, 470px); height: auto; max-height: 350px; object-fit: contain; }
.aligner-art { background: #fff !important; display: flex; align-items: center; justify-content: center; padding: 28px; }
.aligner-art img { width: min(100%, 620px); height: auto; object-fit: contain; }

/* Footer density and badge proportions match the reference more closely. */
.cd-footer { padding-top: 50px !important; }
.cd-social { margin-bottom: 72px !important; }
.cd-social p { font-size: 20px !important; }
.social-icons { gap: 18px !important; }
.social-icons a { width: 28px; height: 28px; }
.social-icons svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.cd-footer-grid {
  grid-template-columns: 1.05fr 1.65fr 1.25fr 1.5fr 1.25fr 1.45fr !important;
  gap: 24px !important;
}
.cd-footer-grid h3 { font-size: 19px !important; margin-bottom: 15px !important; }
.cd-footer-grid a { font-size: 12.5px !important; line-height: 1.35 !important; margin-bottom: 8px !important; letter-spacing: .02em !important; }
.provider-badge {
  position: relative;
  margin-top: 26px !important;
  padding-top: 58px;
  color: #fff;
  font-size: 18px !important;
  line-height: 1.1;
}
.provider-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 42px !important;
  height: 42px !important;
  border: 6px solid #fff !important;
  border-top-color: transparent !important;
  transform: rotate(45deg);
  opacity: .95;
}
.cd-footer-bottom { font-size: 12px !important; padding: 14px 22px !important; }

/* Contrast repairs for pale copy introduced by older page CSS. */
.rm-page .rm-intro, .sm-page .sm-intro, .sm-page .sm-references,
.rm-page .rm-card p, .sm-page .sm-card p { color: var(--audit-muted) !important; opacity: 1; }
.rm-blue p, .sm-blue p, .rm-promo p, .appointment-cta p { color: #fff !important; }

@media (max-width: 1100px) {
  .cd-footer-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .appointment-cta-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 760px) {
  .wrap, .rm-page .wrap { width: min(100% - 32px, 1180px); padding-left: 0; padding-right: 0; }
  .rm-section, .sm-section, .master-faq, .rm-faq, .sm-faq { padding-top: 48px !important; padding-bottom: 48px !important; }
  .rm-hero, .sm-hero { min-height: 390px; }
  .rm-hero h1, .sm-hero h1 { font-size: 34px; }
  .appointment-cta-grid { grid-template-columns: 1fr; gap: 26px; }
  .appointment-cta h2 { font-size: 29px; }
  .appointment-cta .rm-btn, .appointment-cta .sm-btn { width: 100%; }
  .cd-footer-grid { grid-template-columns: 1fr 1fr !important; }
  .cd-footer-grid > div:last-child { grid-column: 1 / -1 !important; }
  .master-faq-list summary, .rm-faq summary, .sm-faq summary { font-size: 15px; padding: 18px 50px 18px 18px !important; }
  .master-faq-list details p, .rm-faq details p, .sm-faq details p { padding: 0 18px 18px !important; }
}

@media (max-width: 480px) {
  .cd-footer-grid { grid-template-columns: 1fr !important; }
  .cd-footer-grid > div:last-child { grid-column: auto !important; }
  .cd-footer-bottom { flex-direction: column; gap: 7px; text-align: center; }
  .rm-card-grid, .sm-grid, .rm-doctors { gap: 16px; }
}
