.rsm-service-quote {
  width: 100%;
  min-width: 0;
  max-width: 450px;
  container-type: inline-size;
}

.hero .rsm-service-quote > .hero-right {
  box-sizing: border-box;
  width: 100%;
  margin: 0 !important;
  border-radius: 0 0 12px 12px !important;
}

@media (min-width: 992px) {
  .hero:not(.rsm-home-hero) .rsm-service-quote {
    flex: 0 1 450px;
  }
}

.rsm-quote-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  width: 100%;
}

.rsm-quote-navigation .rsm-quote-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  padding: 6px 2px;
  border-radius: 10px 10px 0 0;
  background: #d8dfe5;
  color: #243b50;
  font-size: clamp(12px, 2.8vw, 14px);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.rsm-quote-navigation .rsm-quote-link svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.rsm-quote-navigation .rsm-quote-link--commercial {
  min-height: 56px;
  border-top: 4px solid #45b7b0;
  background: #d7efec;
  color: #123e43;
  font-size: clamp(14px, 3.4vw, 17px);
  font-weight: 800;
}

.rsm-quote-navigation .rsm-quote-link[aria-current="page"] {
  background: #fff;
  color: #0d2a45;
}

.rsm-quote-navigation .rsm-quote-link:hover:not([aria-current="page"]) {
  background: #edf5f5;
}

.rsm-quote-navigation .rsm-quote-link:focus-visible {
  outline: 2px solid #0d2a45;
  outline-offset: -4px;
}

.rsm-specialty-hero {
  padding: 100px 20px;
  background: linear-gradient(118deg, #102c45, #143955);
}

.rsm-specialty-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
  margin-inline: auto;
  padding-inline: 40px;
}

.rsm-specialty-intro {
  width: 100%;
  max-width: 650px;
  min-width: 0;
}

.rsm-specialty-intro h1 {
  margin: 0 0 20px;
  color: #fff;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.13;
}

.rsm-specialty-intro p {
  max-width: 48ch;
  margin: 0;
  color: #e5eef6;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
}

.rsm-specialty-card {
  padding: clamp(16px, 4vw, 28px);
  border-radius: 0 0 12px 12px;
  background: #fff;
  color: #0d2a45;
}

.rsm-specialty-card h2,
.rsm-specialty-card > p {
  margin: 0 0 12px;
  text-align: center;
}

.rsm-specialty-card label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.rsm-specialty-card .input-wrapper {
  position: relative;
  margin-bottom: 14px;
}

.rsm-specialty-card .input-wrapper > svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: #52687a;
  stroke-width: 1.5;
  pointer-events: none;
}

.rsm-specialty-card input[type="text"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 45px;
  padding: 8px 10px 8px 36px;
  border: 1px solid #bfcad2;
  border-radius: 7px;
  font-size: 16px;
}

.rsm-specialty-card .hero-btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border: 0;
  border-radius: 7px;
  background: #45b7b0;
  color: #0d2a45;
  font-weight: 800;
  cursor: pointer;
}

.rsm-specialty-card .secure-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  color: #52687a;
  font-size: 12px;
}

.rsm-specialty-card .secure-text svg {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: currentColor;
}

.rsm-specialty-services ul {
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.rsm-specialty-services a {
  display: block;
  padding: 14px;
  border: 1px solid #dae4eb;
  border-radius: 8px;
  color: #0d2a45;
  font-weight: 700;
}

@media (max-width: 1240px) {
  .rsm-specialty-grid {
    padding-inline: 30px;
  }
}

@media (max-width: 990px) {
  .rsm-specialty-grid {
    padding-inline: 20px;
  }
}

@media (min-width: 992px) {
  .rsm-specialty-hero {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 115px);
    padding: 140px 20px 60px;
  }

  .rsm-specialty-grid {
    display: grid;
    /* Reserve the same desktop space as the Commercial quote panel with its trust badges. */
    min-height: 631px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 450px);
    align-items: start;
    gap: 60px;
  }
}

@media (max-width: 768px) {
  .rsm-specialty-hero {
    padding-block: 90px 25px;
  }

  .rsm-specialty-intro h1 {
    margin-bottom: 8px;
  }

  .rsm-service-quote {
    max-width: none;
  }

  .rsm-specialty-grid {
    gap: 12px;
  }
}

@media (max-width: 375px) {
  .rsm-quote-navigation .rsm-quote-link svg {
    display: none;
  }
}

@container (max-width: 325px) {
  .rsm-quote-navigation .rsm-quote-link svg {
    display: none;
  }
}

@container (max-width: 260px) {
  .rsm-quote-navigation {
    grid-template-columns: minmax(0, 1.32fr) repeat(2, minmax(0, 1fr));
  }

  .rsm-quote-navigation .rsm-quote-link:not(.rsm-quote-link--commercial) {
    font-size: 11px;
  }
}
