/* Overflow-safe responsive layer shared by all ten US calculators and their hub. */
.usc,
.usc * {
  box-sizing: border-box;
}

.usc > *,
.usc-layout > *,
.usc-fields > *,
.usc-hub-grid > * {
  min-width: 0;
}

.usc-fields {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.usc-segment {
  max-width: 100%;
}

.usc-row > *,
.usc-tool-link h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.usc .tool-backend-html-section {
  max-width: 100%;
  overflow: hidden;
}

.usc .tool-backend-html-section img,
.usc .tool-backend-html-section video,
.usc .tool-backend-html-section iframe {
  max-width: 100%;
  height: auto;
}

.usc .tool-backend-html-section table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.usc .tool-backend-html-section pre,
.usc .tool-backend-html-section code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .usc-hub-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .usc-tool-link {
    padding: 19px;
  }

  .usc-tool-link p {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .usc-inline-select {
    align-items: stretch;
    flex-direction: column;
  }

  .usc-inline-select select {
    width: 100%;
  }

  .usc-debt-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .usc {
    width: 100%;
    padding: 20px 12px 50px;
    overflow: hidden;
  }

  .usc-crumb {
    max-width: 100%;
    padding-bottom: 4px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .usc-hero {
    align-items: flex-start;
    gap: 13px;
  }

  .usc-hero > div:last-child {
    min-width: 0;
  }

  .usc-hero h1 {
    font-size: clamp(24px, 8vw, 34px);
    overflow-wrap: anywhere;
  }

  .usc-hero p {
    font-size: 13px;
  }

  .usc-fields {
    grid-template-columns: 1fr;
  }

  .usc-form,
  .usc-results,
  .usc-info-grid article,
  .usc-faq {
    padding: 17px;
    border-radius: 16px;
  }

  .usc-card-heading {
    gap: 12px;
  }

  .usc-card-heading h2,
  .usc-results h2,
  .usc-info-grid h2,
  .usc-faq h2 {
    font-size: 20px;
  }

  .usc-segment {
    width: 100%;
  }

  .usc-segment button {
    flex: 1;
    min-width: 0;
    padding: 9px 8px;
    white-space: normal;
  }

  .usc-main-result {
    padding: 16px 10px;
  }

  .usc-main-result strong {
    font-size: clamp(27px, 10vw, 34px);
    overflow-wrap: anywhere;
  }

  .usc-row {
    align-items: flex-start;
  }

  .usc-row span {
    flex: 1;
  }

  .usc-row strong {
    flex: 0 1 55%;
    max-width: 55%;
  }
}

@media (max-width: 380px) {
  .usc-debt-row {
    grid-template-columns: 1fr;
  }

  .usc-debt-row strong,
  .usc-debt-row input:last-child,
  .usc-debt-row select:last-child {
    grid-column: auto;
  }
}

@media (max-width: 360px) {
  .usc-hero {
    display: block;
  }

  .usc-hero-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
  }

  .usc-row {
    display: block;
  }

  .usc-row strong {
    display: block;
    max-width: none;
    margin-top: 4px;
    text-align: left;
  }
}
