/* ClearerMe accessibility repair · 2026-11-18.
   One document scroll owner. Text sizing belongs to the reader/browser. */
html {
  font-size: 100%;
  -webkit-text-size-adjust: auto;
  text-size-adjust: auto;
}
/* iOS Dynamic Type supplies the root size; the brand font remains on body/headings. */
@supports (font: -apple-system-body) {
  html { font: -apple-system-body; }
}
:root { --muted: #665f59; }
body { font-size: 1rem; font-weight: 500; line-height: 1.5; }
#app { min-width: 0; }
#app .screen {
  height: auto;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: visible;
}
#app .screen > :is(main, .content, .question-body) {
  flex: 1 0 auto;
  height: auto;
  min-height: auto;
  overflow: visible;
  overscroll-behavior: auto;
}
#app .screen > .actions {
  position: sticky;
  bottom: 0;
  z-index: 6;
  flex: 0 0 auto;
  margin-top: auto;
  padding-bottom: max(1.125rem, env(safe-area-inset-bottom));
}
#app .screen .toolbar { height: auto; min-height: 3.5rem; padding-block: .5rem; }
#app .toolbar-heading { height: auto; min-width: 0; }
#app .toolbar-label { line-height: 1.3; }
#app .screen .actions :is(.primary, .secondary),
#app .screen :is(.primary, .secondary) {
  height: auto;
  min-height: 3.25rem;
  padding: .8rem 1rem;
  white-space: normal;
  line-height: 1.4;
}
#app .screen :is(h1, h2, h3, p, .option-label, .plan-name, .legal, .support) {
  overflow-wrap: break-word;
}
#app .screen .option { height: auto; min-height: 3.5rem; line-height: 1.45; }
#app .screen .option-label { min-width: 0; }
#app .screen .age-grid {
  width: 100%; min-width: 0; max-width: 60rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
#app .screen.entry .age-card .pill {
  font-size: 1rem; font-weight: 600; line-height: 1.35;
  min-height: 2.875rem; padding: .6rem;
}
#app .screen.entry .legal { max-width: 40rem; font-size: .875rem; line-height: 1.6; }
#app .screen :is(.input, input[type="email"], input[type="text"], select) {
  font-size: 1rem; max-width: 100%;
}
#app .beta-selection { flex-wrap: wrap; gap: 1rem; }
#app .beta-selection > div { min-width: 0; }
#app .beta-selection button { flex-shrink: 1; text-align: left; }
#app .beta-registration :is(#waitlist-qualification, #waitlist-purpose),
#app :is(.beta-no-charge, .beta-reconfirm, .beta-price-terms, .beta-marketing) {
  font-size: .9375rem; color: var(--muted); line-height: 1.6;
}
#app :is(.sales-plan-caption, .plan-renewal, .renewal-box, .plan-per-day) {
  font-size: .875rem; line-height: 1.5; white-space: normal;
}
#app .schedule-bar-row > div:first-child { flex-wrap: wrap; gap: .25rem .75rem; }
#app .schedule-bar-row > div:first-child span { font-size: .875rem; }
#app .plan-choice-body { min-width: 0; }
#app .plan-price { white-space: normal; }
#app .plan-ribbon { max-width: 100%; white-space: normal; }
#app .chips { flex-wrap: wrap; }
#app .chip { height: auto; min-height: 3rem; white-space: normal; }
/* Scroll containment is appropriate only inside an open modal, not the page. */
#overlay .modal { max-height: 90svh; max-height: 90dvh; overflow-y: auto; }
#overlay :is(button, input, select) { min-height: 2.75rem; }
#overlay :is(.primary, .secondary) { height: auto; padding: .8rem 1rem; white-space: normal; }
@media (max-width: 600px) {
  #app .screen > :is(.question-heading, .question-body, .content) { padding-inline: 1.25rem; }
  #app .screen .time-portrait-choices { max-width: 100%; }
}
/* Keep two columns only while each answer has room at the reader's text size. */
#app :is(.options.grid, .scene-options .options) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(9rem, 45%)), 1fr));
}
/* Photo answers remain a two-by-two choice, including enlarged text. */
#app .tile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#app .tile-grid .tile:has(img) {
  display: flex;
  flex-direction: column;
}
#app .tile-grid .tile img { flex-shrink: 0; }
#app .tile-grid .tile-label { width: 100%; }

/* Content-sized sheets follow the visible viewport as mobile browser bars move.
   Retire the old 60svh offset / 40svh height, which left a dim strip below the
   sheet and clipped the second answer when text was enlarged. */
#overlay .analysis-backdrop {
  align-items: flex-end;
  padding: 0;
  height: 100svh;
  height: 100dvh;
}
#overlay .modal.analysis-question {
  height: auto;
  max-height: calc(100svh - 1rem);
  max-height: calc(100dvh - 1rem);
  flex-shrink: 0;
  margin: 0;
  border-radius: 22px 22px 0 0;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
#app :is(.tile, .tile-label, .tile-label > span) { min-width: 0; overflow-wrap: break-word; }
@media (min-width: 768px) {
  #app .checkout .plan-options {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  }
}
#app .v5-comparison { container-type: inline-size; }
#app .v5-compare-row p { min-width: 0; }
@container (max-width: 17rem) {
  #app .v5-compare-head { display: none; }
  #app .v5-compare-row { grid-template-columns: minmax(0, 1fr); }
  #app .v5-compare-row > div { display: block; }
  #app .v5-compare-row > div::before { content: 'Today'; display: block; margin-bottom: .35rem; font-size: .9rem; font-weight: 700; }
  #app .v5-compare-row > div + div::before { content: 'Your aim'; }
  #app .v5-compare-row .icon { display: none; }
}

/* Real-device correction: preserve the four age choices as a compact 2 × 2 grid.
   Labels have their own row so enlarged text cannot cover the portraits. */
#app .screen.entry .age-card {
  display: flex;
  flex-direction: column;
  aspect-ratio: auto;
  height: auto;
}
#app .screen.entry .age-card img {
  position: static;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 25%;
}
#app .screen.entry .age-card .pill {
  position: static;
  flex: 1 0 auto;
  width: 100%;
  margin: 0;
  border-radius: 0;
  padding: .5rem .35rem;
  justify-content: center;
  text-align: center;
  overflow-wrap: normal;
}
#app .screen.entry .age-card .pill .icon { display: none; }
/* Supporting copy is information the reader needs, not low-contrast decoration. */
#app .screen :is(.support, .sales-entry-intro, .social-proof-copy > p,
  .reaffirmation-copy > p, .product-affirmation-copy > p, .v5-system-caption,
  .cutscene-copy > p, .v54-payoff-intro, .v55-finding-takeaway > p) {
  color: #403633;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.5;
}
#app .screen :is(.option, .option-label, .tile-label, .chip) {
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.45;
}
@media (min-width: 1024px) {
  #app .screen.entry .age-grid { max-width: 660px; }
}
