/* Rich-text line breaks must not become separate items in button rows. */
.si-referral-actions > br { display: none; }

/* Keep the complete menu reachable on short screens and under browser chrome. */
@media (max-width: 1280px) {
  body #masthead {
    position: sticky !important;
    top: 0 !important;
  }
  body .si-header-shell .si-primary-nav {
    width: 100%;
    max-height: calc(100vh - 180px);
    max-height: calc(100dvh - 180px);
    overflow-y: auto;
    overscroll-behavior: contain;
    justify-self: stretch;
  }
  body.admin-bar .si-header-shell .si-primary-nav {
    max-height: calc(100vh - 226px);
    max-height: calc(100dvh - 226px);
  }
}
@media (min-width: 601px) and (max-width: 782px) {
  body.admin-bar #masthead { top: 46px !important; }
}
@media (min-width: 783px) and (max-width: 1280px) {
  body.admin-bar #masthead { top: 32px !important; }
}
@media (max-width: 900px) {
  body.sci-has-mobile-contact {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Scope treatment typography to its component, avoiding Elementor's 22px base. */
@media (max-width: 767px) {
  body .sci-core {
    font-size: 17px;
    line-height: 1.65;
    overflow-wrap: break-word;
  }
  body .sci-core .sci-wrap {
    width: calc(100% - 32px);
    max-width: 1180px;
    min-width: 0;
  }
  body .sci-core .sci-hero { min-height: 0; }
  body .sci-core .sci-hero__copy {
    width: 100%;
    padding: 36px 0;
  }
  body .sci-core .sci-hero h1 {
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.18 !important;
    margin-bottom: 18px;
  }
  body .sci-core h2 { font-size: 27px; line-height: 1.25; }
  body .sci-core h3 { font-size: 21px; line-height: 1.35; }
  body .sci-core .sci-hero__lead,
  body .sci-core .si-in-short,
  body .sci-core .si-answer { font-size: 17px; line-height: 1.65; }
  body .sci-core .sci-eyebrow {
    font-size: 12px;
    line-height: 1.65;
    letter-spacing: .08em;
    margin-bottom: 16px;
  }
  body .sci-core .sci-eyebrow::before { flex-shrink: 0; }
  body .sci-core .sci-section { padding: 44px 0; }
  body .sci-core .sci-grid--2,
  body .sci-core .sci-grid--3,
  body .sci-core .sci-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  body .sci-core .sci-card__body,
  body .sci-core .sci-note,
  body .sci-core .sci-evidence__item { padding: 20px; }
  body .sci-core .sci-step { min-height: 0; padding: 22px 18px 22px 62px; }
  body .sci-core .sci-step::before { left: 16px; top: 22px; width: 32px; height: 32px; }
  body .sci-core .sci-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  body .sci-core .sci-btn,
  body .sci-core .uroir-cta-button {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    font-size: 17px;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
  }
  body .sci-core .sci-trust { display: grid; gap: 10px; font-size: 14px; }
  body .sci-core .sci-cta { flex-direction: column; align-items: stretch; padding: 24px; }
  body .sci-core .sci-cta h2 { font-size: 26px; }
  body .sci-core .uroir-inline-cta { margin: 0 16px 32px; padding: 20px; }
  body .sci-core .uroir-inline-cta h2 { font-size: 24px; }

  /* Card labels come from each table's actual headings, including evidence tables. */
  body .sci-core .sci-table,
  body .sci-core .sci-table tbody,
  body .sci-core .sci-table tr,
  body .sci-core .sci-table td { display: block; width: 100%; min-width: 0; }
  body .sci-core .sci-table thead { display: none; }
  body .sci-core .sci-table tr { padding: 12px 0; border-bottom: 1px solid var(--line, #d9e6eb); }
  body .sci-core .sci-table tr:last-child { border-bottom: 0; }
  body .sci-core .sci-table td { border: 0; padding: 8px 16px; }
  body .sci-core .sci-table td::before { content: none; }
  body .sci-core .sci-table td[data-sci-label]::before {
    content: attr(data-sci-label);
    display: block;
    margin-bottom: 4px;
    color: var(--teal, #0b7d7b);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  body .si-referral-page h1 { font-size: clamp(28px, 8vw, 36px); }
  body .si-contact-hero h1 {
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.2;
  }
  body .si-contact-info .elementor-heading-title {
    font-size: 26px !important;
    line-height: 1.25;
  }
}
