.tmd-contact-rail,
.tmd-contact-rail * {
  box-sizing: border-box;
}

.tmd-contact-rail {
  position: fixed;
  top: 50%;
  left: 0;
  z-index: 900;
  display: flex;
  width: 48px;
  flex-direction: column;
  overflow: visible;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 10px 28px rgba(38, 46, 79, .24);
  font-family: 'Work Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transform: translateY(-50%);
}

.tmd-contact-rail__link {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  background: #262e4f;
  color: #fff;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}

.tmd-contact-rail__link:first-child {
  border-radius: 0 8px 0 0;
}

.tmd-contact-rail__link:last-child {
  border-bottom: 0;
  border-radius: 0 0 8px 0;
}

.tmd-contact-rail__link:hover,
.tmd-contact-rail__link:focus-visible {
  background: #128ceb;
  color: #fff;
}

.tmd-contact-rail__link:focus-visible {
  z-index: 1;
  outline: 3px solid #ffc33c;
  outline-offset: -3px;
}

.tmd-contact-rail__link > i {
  font-size: 22px;
  line-height: 1;
}

.tmd-contact-rail__label {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  padding: 7px 10px;
  border-radius: 5px;
  background: #262e4f;
  box-shadow: 0 6px 18px rgba(38, 46, 79, .2);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-4px, -50%);
  transition: opacity .16s ease, transform .16s ease;
  visibility: hidden;
  white-space: nowrap;
}

.tmd-contact-rail__label::before {
  position: absolute;
  top: 50%;
  right: 100%;
  border: 5px solid transparent;
  border-right-color: #262e4f;
  content: '';
  transform: translateY(-50%);
}

.tmd-contact-rail__link:hover .tmd-contact-rail__label,
.tmd-contact-rail__link:focus-visible .tmd-contact-rail__label {
  opacity: 1;
  transform: translate(0, -50%);
  visibility: visible;
}

/* Contact page: compact page title. */
body.page-id-57 .tmd-page-hero h1 {
  font-size: clamp(36px, 4vw, 52px) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.035em !important;
}

/* Contact page: compact advisor section. */
body.page-id-57 .tmd-dark-band {
  padding-top: 30px !important;
  padding-bottom: 30px !important;
}

body.page-id-57 .tmd-band-head {
  gap: 14px !important;
  margin-bottom: 18px !important;
}

body.page-id-57 .tmd-band-head h2 {
  font-size: clamp(26px, 2.4vw, 34px) !important;
  line-height: 1.08 !important;
}

body.page-id-57 .tmd-advisors-track {
  gap: 16px !important;
}

body.page-id-57 .tmd-advisor-card {
  padding: 20px !important;
  border-radius: 16px !important;
}

body.page-id-57 .tmd-avatar.tmd-avatar-photo {
  width: 64px !important;
  height: 64px !important;
  margin-bottom: 10px !important;
  border-radius: 14px !important;
}

body.page-id-57 .tmd-advisor-card h3 {
  margin: 8px 0 6px !important;
  font-size: 20px !important;
  line-height: 1.12 !important;
}

body.page-id-57 .tmd-advisor-role,
body.page-id-57 .tmd-advisor-phone {
  font-size: 13px !important;
  line-height: 1.4 !important;
}

body.page-id-57 .tmd-advisor-phone {
  margin-top: 3px !important;
}

body.page-id-57 .tmd-advisor-actions {
  gap: 8px !important;
  margin-top: 14px !important;
}

body.page-id-57 .tmd-call,
body.page-id-57 .tmd-whatsapp {
  min-height: 36px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
}

body.page-id-57 .tmd-round-btn {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
}

/* Contact page: keep the form heading proportional to the form. */
body.page-id-57 .tmd-form-card > h2.tmd-field-wide {
  font-size: clamp(30px, 3vw, 38px) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.03em !important;
}

@media (max-width: 860px) {
  body.page-id-57 .tmd-dark-band {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  body.page-id-57 .tmd-advisor-card {
    padding: 18px !important;
  }

  body.page-id-57 .tmd-form-card > h2.tmd-field-wide {
    font-size: 30px !important;
  }
}

@media (max-width: 767px) {
  .tmd-contact-rail {
    display: none;
  }

  body.page-id-57 .tmd-page-hero h1 {
    font-size: 34px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tmd-contact-rail__link,
  .tmd-contact-rail__label {
    transition: none;
  }
}
