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;
  }
}

/* Homepage navigation polish after adding Labs + ADHD Planner. */
body > nav {
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

body > nav .nav-logo {
  flex: 0 0 auto;
}

body > nav .nav-links {
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 1.2vw, 1.1rem);
  justify-content: flex-end;
  margin: 0;
}

body > nav .nav-links a {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  min-height: 34px;
  padding: 0.42rem 0.62rem;
  white-space: nowrap;
}

body > nav .nav-tool-tab {
  background: rgba(255, 255, 255, 0.44);
}

body > nav .nav-cta {
  min-height: 36px;
  padding: 0.48rem 1rem;
}

@media (max-width: 1180px) {
  body > nav {
    padding-left: clamp(1rem, 3vw, 2rem) !important;
    padding-right: clamp(1rem, 3vw, 2rem) !important;
  }

  body > nav .nav-logo-text {
    font-size: clamp(1rem, 2vw, 1.18rem);
    letter-spacing: 0.04em;
  }

  body > nav .nav-links a {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    padding-left: 0.54rem;
    padding-right: 0.54rem;
  }
}

@media (max-width: 900px) {
  body > nav {
    align-items: center !important;
    flex-direction: row !important;
    gap: 0.75rem !important;
    min-height: 72px;
  }

  body > nav .nav-logo {
    max-width: calc(100% - 60px);
  }

  body > nav .nav-logo img {
    height: 38px;
    width: 38px;
  }

  body > nav .nav-logo-text {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
  }

  body > nav .nav-menu-toggle {
    border-radius: 999px;
    flex: 0 0 44px;
    margin-left: auto;
  }

  body > nav .nav-links {
    align-items: stretch !important;
    background: rgba(250, 248, 242, 0.98);
    border: 1px solid rgba(45, 122, 107, 0.12);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 20px 44px rgba(31, 50, 44, 0.13);
    display: none !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 0.48rem !important;
    left: 0.75rem;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    padding: 0.85rem !important;
    position: absolute;
    right: 0.75rem;
    top: calc(100% + 0.35rem);
    width: auto !important;
  }

  body > nav.is-menu-open .nav-links {
    display: flex !important;
  }

  body > nav .nav-links li {
    flex: 0 0 auto;
    width: 100%;
  }

  body > nav .nav-links a {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(45, 122, 107, 0.1);
    border-radius: 8px;
    color: #263b35 !important;
    display: flex;
    font-size: 0.84rem;
    justify-content: space-between;
    letter-spacing: 0.08em;
    min-height: 44px;
    padding: 0 0.95rem !important;
    width: 100%;
  }

  body > nav .nav-tool-tab {
    background: rgba(237, 247, 244, 0.92);
    border-color: rgba(45, 122, 107, 0.18);
  }

  body > nav .nav-cta {
    background: #2d7a6b !important;
    color: #ffffff !important;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  body > nav {
    padding: 0.78rem 0.9rem !important;
  }

  body > nav .nav-logo-text {
    font-size: 0.94rem;
  }

  body > nav .nav-links {
    left: 0.5rem;
    right: 0.5rem;
  }
}
