html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  max-width: 100%;
  overflow-x: hidden;
}

*, *::before, *::after {
  min-width: 0;
}

img, svg, video, canvas, iframe {
  max-width: 100%;
}

img, video {
  height: auto;
}

input, textarea, select, button {
  max-width: 100%;
}

textarea {
  overflow-wrap: anywhere;
}

button,
.btn,
.nav a,
.nav-links a,
.nav-pills a,
.footer a,
.footer-links a {
  white-space: normal;
}

table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

h1, h2, h3, h4, p, a, button, label, span, li, textarea, input {
  overflow-wrap: break-word;
}

.wrap,
.section,
.hero-inner,
main,
section,
article,
aside,
form {
  min-width: 0;
}

.button-row,
.actions,
.hero-actions,
.nav-links,
.nav-pills,
.footer-links,
.payment-chip-row,
.journal-actions,
.contact-cards {
  max-width: 100%;
}

.nav-links,
.nav-pills,
.footer-links {
  min-width: 0;
}

.premium-feature,
.premium-lock-banner,
.premium-access,
.hero-panel,
.tool-panel,
.answer-panel,
.modal-card,
.report-card {
  min-width: 0;
}

@media (max-width: 920px) {
  .hero,
  .grid,
  .two,
  .three,
  .four,
  .steps-grid,
  .why-grid,
  .care-grid,
  .care-form-grid,
  .journal-shell,
  .journal-row,
  .test-layout,
  .screening-tools,
  .inline-options,
  .score-strip,
  .character-grid,
  .gym-prompts,
  .gym-stats,
  .metric-grid,
  .game-category-grid,
  .pac-map,
  .option-grid,
  .grid-two,
  .grid-three,
  .compass-layout,
  .weather-grid,
  .trainer-layout,
  .gym-layout,
  .premium-access,
  .insight-grid,
  .score-rings,
  .stats-grid,
  main {
    grid-template-columns: 1fr !important;
  }

  .hero,
  section,
  .section {
    min-height: auto !important;
  }

  .section-head,
  .journal-toolbar,
  .character-toolbar,
  .gym-top,
  .eq-nav-inner,
  .premium-lock-banner,
  .footer {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .hero-visual,
  .hero-panel,
  .compass,
  .transaction-canvas,
  .transaction-diagram {
    max-width: 100% !important;
  }
}

@media (max-width: 760px) {
  nav,
  .nav,
  .topbar {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: .75rem !important;
  }

  .nav-links,
  .nav,
  .nav-pills,
  .topbar .nav,
  .footer-links {
    justify-content: flex-start !important;
    width: 100%;
  }

  .topbar > .nav,
  header.topbar > nav.nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    padding-bottom: .35rem;
    scrollbar-width: thin;
  }

  .topbar > .nav a,
  header.topbar > nav.nav a {
    flex: 0 0 auto;
  }

  .nav-links,
  .nav-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: .45rem !important;
    overflow-x: auto;
    padding-bottom: .35rem;
    scrollbar-width: thin;
  }

  .nav-links li {
    flex: 0 0 auto;
  }

  .nav-links a,
  .nav-pills a {
    flex: 0 0 auto;
  }

  .hero,
  section,
  .section,
  .lab-section,
  .wrap {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .hero {
    padding-top: 2.4rem !important;
    padding-bottom: 2.4rem !important;
  }

  .hero h1,
  .section-title {
    font-size: clamp(2rem, 11vw, 3rem) !important;
    line-height: 1.05 !important;
  }

  .lead,
  .hero-sub,
  .section-subtitle,
  .section-copy {
    font-size: 1rem !important;
    line-height: 1.65 !important;
  }

  .btn,
  .actions .btn,
  .hero-actions .btn,
  .button-row .btn {
    justify-content: center !important;
    text-align: center;
    width: 100%;
  }

  .button-row,
  .actions,
  .hero-actions,
  .compact-fields {
    width: 100%;
  }

  .premium-lock-banner {
    gap: .35rem !important;
    line-height: 1.4;
  }

  .premium-locked .premium-feature {
    max-height: 14rem !important;
  }

  .rating-options {
    grid-template-columns: repeat(5, minmax(44px, 1fr)) !important;
    overflow-x: auto;
    padding-bottom: .25rem;
  }

  .score-line,
  .mini-score {
    grid-template-columns: 1fr !important;
  }

  .character-search {
    grid-template-columns: 1fr !important;
    width: 100%;
  }

  .hero-panel,
  .hero-photo,
  .hero-visual,
  .panel,
  .card,
  .practice-card,
  .mini-card,
  .screening-card,
  .journal-panel,
  .journal-sidebar,
  .care-card,
  .contact-card,
  .tool-panel,
  .answer-panel,
  .premium-access,
  .float-card {
    max-width: 100%;
  }

  .hero-photo,
  .screening-hero-photo,
  .character-portrait {
    object-fit: cover;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 15.5px;
  }

  .nav a,
  .topbar a,
  .nav-links a,
  .nav-pills a,
  .character-tab,
  .tool-tab,
  .btn {
    letter-spacing: 0 !important;
  }

  h1,
  .hero h1,
  .section-title {
    font-size: clamp(1.85rem, 10vw, 2.65rem) !important;
  }

  .panel,
  .card,
  .practice-card,
  .tool-panel,
  .answer-panel,
  .premium-access {
    padding: 1rem !important;
  }
}
