/* Public information pages: final responsive and accessibility pass.
   This sheet is intentionally loaded after vision-ui.css so these fixes stay
   local to the public information, legal, support and registration routes. */

html body.public-info-body {
  max-width: 100%;
  overflow-x: clip;
}

html body.public-info-body :is(.public-page, .public-hero, .public-hero > *, .legal-article, .legal-section, .legal-section > div) {
  min-width: 0;
  max-width: 100%;
}

html body.public-info-body .public-hero h1 {
  width: min(850px, 100%) !important;
  max-width: 100% !important;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  text-wrap: balance;
}

/* A real four-column payment strip at desktop widths. */
html body.public-info-body .footer-payments > div > div {
  width: 100% !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  justify-content: stretch !important;
  gap: 12px !important;
}

html body.public-info-body .footer-payments a {
  min-height: 72px !important;
  padding: 10px 14px !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 12px !important;
}

html body.public-info-body .footer-payments img {
  width: 48px !important;
  max-width: 48px !important;
  height: 48px !important;
  max-height: 48px !important;
  padding: 7px !important;
}

html body.public-info-body .footer-payments b {
  font-size: 13px !important;
  line-height: 1.3 !important;
}

html body.public-info-body .footer-payments > div > span {
  color: #70bcff !important;
}

html body.public-info-body .public-header .public-actions .public-open {
  min-height: 44px !important;
  height: 44px !important;
  font-size: 12px !important;
}

/* The directory is a five-column index on desktop and a compact accordion
   on touch screens. */
html body.public-info-body .footer-directory {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 24px !important;
}

html body.public-info-body .footer-directory > details {
  min-width: 0;
}

html body.public-info-body .footer-directory summary {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #effaff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .09em;
  list-style: none;
  cursor: pointer;
}

html body.public-info-body .footer-directory summary::-webkit-details-marker { display: none; }

html body.public-info-body .footer-directory > details > div {
  display: grid;
  align-content: start;
  gap: 5px;
}

html body.public-info-body .public-footer .footer-directory a {
  min-height: 28px;
  display: flex;
  align-items: center;
  color: #a9c3d1;
  font-size: 12.5px;
  line-height: 1.35;
}

/* Six risk topics become a deliberate 2 × 3 card system instead of a stack. */
html body.public-info-body .legal-article {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

html body.public-info-body .legal-section {
  min-height: 205px;
  padding: 26px 25px !important;
  align-content: start;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  gap: 17px !important;
}

html body.public-info-body .legal-section > div { display: block !important; }
html body.public-info-body .legal-section h2 { font-size: 19px !important; }
html body.public-info-body .legal-section p { font-size: 13.5px !important; line-height: 1.68 !important; }

html:not(.light-theme) body.public-info-body .legal-section {
  color: #f5fbff !important;
  border-color: rgba(83, 164, 219, .3) !important;
  background: linear-gradient(145deg, #0a2b42 0%, #061c2c 100%) !important;
  background-image: linear-gradient(145deg, #0a2b42 0%, #061c2c 100%) !important;
  box-shadow: 0 18px 42px rgba(0, 7, 18, .2) !important;
}

html:not(.light-theme) body.public-info-body .legal-section h2 { color: #f5fbff !important; }
html:not(.light-theme) body.public-info-body .legal-section p { color: #acc5d3 !important; }

html.light-theme body.public-info-body .public-header .public-brand b,
html.light-theme body.public-info-body .public-header .public-login { color: #fff !important; }

html.light-theme body.public-info-body .public-hero h1,
html.light-theme body.public-info-body .public-bottom-cta h2 { color: #f7fbff !important; }

html.light-theme body.public-info-body .public-hero > p,
html.light-theme body.public-info-body .public-bottom-cta p { color: #c6d5df !important; }

html.light-theme body.public-info-body .public-hero > span,
html.light-theme body.public-info-body .public-bottom-cta span { color: #70bcff !important; }

html.light-theme body.public-info-body .public-hero > a:first-child { color: #79b7ff !important; }

html.light-theme body.public-info-body .public-hero .public-secondary {
  color: #f7fbff !important;
  border-color: #4d5b69 !important;
  background: #292d33 !important;
}

html.light-theme body.public-info-body .public-bottom-cta > a {
  color: #fff !important;
  background: #126bff !important;
}

html.light-theme body.public-info-body .public-footer { color: #f4fbff !important; }
html.light-theme body.public-info-body .footer-directory summary { color: #eaf5ff !important; }
html.light-theme body.public-info-body .public-footer .footer-directory a { color: #aec4d2 !important; }
html.light-theme body.public-info-body .public-footer :is(.footer-contact a, .footer-contact span) { color: #f1f8fc !important; }
html.light-theme body.public-info-body .public-footer :is(.footer-contact small, .footer-legal-compact) { color: #93aab8 !important; }
html.light-theme body.public-info-body .public-footer .footer-legal-compact a { color: #d5e7f2 !important; }
html.light-theme body.public-info-body .support-widget > button { color: #fff !important; }

/* contrast.css intentionally uses a five-class light-theme lock.  Keep the
   dark header/footer and CTA readable while giving the light hero a genuine
   white surface; the duplicated class raises specificity without affecting
   any route outside public-info-body. */
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .site-notice {
  background: #e7f1f7 !important;
}
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .site-notice b { color: #084bc7 !important; }
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .site-notice span { color: #31566d !important; }
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .public-header :is(b,a,button,span) { color: #fff !important; }

html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .public-hero {
  color: #173e57 !important;
  border: 1px solid #c5d9e5 !important;
  background: linear-gradient(145deg, #fff 0%, #f3f8fc 100%) !important;
  background-image: linear-gradient(145deg, #fff 0%, #f3f8fc 100%) !important;
  box-shadow: 0 16px 38px rgba(8, 43, 69, .08) !important;
}
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .public-hero h1 { color: #082b45 !important; }
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .public-hero > p { color: #42647a !important; }
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .public-hero > span,
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .public-hero > a:first-child { color: #084bc7 !important; }
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .public-hero .public-secondary {
  color: #173e57 !important;
  border-color: #b5cad7 !important;
  background: #fff !important;
}

html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .public-bottom-cta :is(h2,p,span) { color: #fff !important; }
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .public-bottom-cta > a { color: #fff !important; }
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .support-widget > button :is(b,span) { color: #fff !important; }

html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .public-footer :is(summary,a,b,small,span) { color: #aec4d2 !important; }
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .public-footer :is(.public-brand b,.footer-directory summary,.footer-contact a) { color: #f4fbff !important; }
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .footer-payments > div > span { color: #70bcff !important; }
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .footer-payments b { color: #edf7ff !important; }
html.light-theme.light-theme.light-theme.light-theme.light-theme body.public-info-body.public-info-body .footer-legal-compact a { color: #d5e7f2 !important; }

@media (max-width: 720px) {
  html body.public-info-body .site-notice {
    width: 100%;
    height: 32px;
    min-height: 32px !important;
    padding: 0 10px !important;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    justify-content: stretch !important;
    gap: 8px;
    overflow: hidden;
    font-size: 10.5px !important;
    line-height: 1.2;
    white-space: nowrap;
  }

  html body.public-info-body .site-notice b {
    overflow: hidden;
    font-size: 10px !important;
    text-overflow: ellipsis;
  }

  html body.public-info-body .site-notice span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html body.public-info-body.public-info-body .public-header {
    width: 100% !important;
    height: 58px !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 7px 8px !important;
    gap: 6px !important;
    border-radius: 0 !important;
  }

  html body.public-info-body .public-header > .public-brand { gap: 7px !important; }
  html body.public-info-body .public-header > .public-brand .candle-mark { width: 34px !important; height: 34px !important; border-radius: 10px !important; }
  html body.public-info-body .public-header > .public-brand b { font-size: 13px !important; }

  html body.public-info-body .public-header > .public-menu-button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  html body.public-info-body .public-actions .public-open,
  html body.public-info-body .public-actions .public-login {
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    line-height: 1.1;
  }

  html body.public-info-body .public-navigation {
    top: 64px !important;
    max-height: calc(100dvh - 104px) !important;
  }

  html body.public-info-body .public-hero {
    min-height: 400px !important;
    padding: 58px 0 50px !important;
  }

  html body.public-info-body .public-hero h1 {
    font-size: clamp(32px, 10.2vw, 41px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.045em !important;
  }

  html body.public-info-body .public-mega-footer {
    width: calc(100% - 28px) !important;
    padding: 16px 0 12px !important;
  }

  html body.public-info-body .footer-intro {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important;
    align-items: center !important;
  }

  html body.public-info-body .footer-intro > p { display: none; }
  html body.public-info-body .footer-intro .footer-contact { margin-top: 0 !important; align-content: center; }
  html body.public-info-body .footer-intro .footer-contact > b { display: none; }
  html body.public-info-body .footer-intro .footer-contact > a {
    min-height: 44px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(94, 167, 206, .3);
    border-radius: 11px;
    font-size: 12.5px;
  }

  html body.public-info-body .footer-directory {
    margin-top: 8px !important;
    padding: 4px 0 !important;
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 43vw);
    gap: 8px !important;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-width: thin;
  }

  html body.public-info-body .footer-directory > details {
    scroll-snap-align: start;
    border: 1px solid rgba(91, 151, 187, .28);
    border-radius: 12px;
    background: rgba(9, 37, 55, .44);
  }

  html body.public-info-body .footer-directory > details[open] { width: min(270px, calc(100vw - 42px)); }

  html body.public-info-body .footer-directory summary {
    min-height: 44px;
    padding: 0 12px;
    font-size: 12.5px !important;
    letter-spacing: .075em;
  }

  html body.public-info-body .footer-directory summary::after {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .16s ease;
  }

  html body.public-info-body .footer-directory details[open] summary::after {
    transform: rotate(225deg) translate(-2px, -2px);
  }

  html body.public-info-body .footer-directory > details > div {
    padding: 0 10px 10px;
    gap: 2px;
  }

  html body.public-info-body .public-footer .footer-directory a {
    min-height: 44px;
    padding: 0 3px;
    border-top: 1px solid rgba(101, 158, 191, .15);
    font-size: 13px !important;
  }

  html.light-theme body.public-info-body .footer-directory > details {
    border-color: rgba(99, 157, 194, .28);
    background: rgba(9, 37, 55, .44);
  }

  html body.public-info-body .footer-payments { padding: 10px 0 8px !important; }
  html body.public-info-body .footer-payments > div > div {
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(158px, 46vw);
    gap: 8px !important;
    margin-top: 10px !important;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-width: thin;
  }

  html body.public-info-body .footer-payments a {
    min-height: 66px !important;
    padding: 9px 10px !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 9px !important;
    scroll-snap-align: start;
  }

  html body.public-info-body .footer-payments img {
    width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    max-height: 42px !important;
    padding: 6px !important;
  }

  html body.public-info-body .footer-payments b {
    font-size: 12px !important;
    overflow-wrap: break-word;
  }

  html body.public-info-body .footer-legal-compact {
    margin-top: 10px !important;
    padding-top: 12px !important;
    font-size: 12.5px !important;
    line-height: 1.6;
  }

  html body.public-info-body .legal-article {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  html body.public-info-body .legal-section {
    min-height: 0;
    padding: 20px 18px !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  html body.public-info-body .legal-section > span {
    width: 42px !important;
    height: 42px !important;
  }

  html body.public-info-body .legal-section h2 { margin: 1px 0 8px !important; font-size: 18px !important; }
  html body.public-info-body .legal-section p { font-size: 13.5px !important; }

  /* On phones support participates in document flow, so it never covers copy
     or a conversion action.  The opened form remains a focused bottom sheet. */
  html body.public-info-body .support-widget {
    position: relative !important;
    inset: auto !important;
    z-index: 24;
    width: calc(100% - 28px);
    margin: 0 auto 20px;
  }

  html body.public-info-body .support-widget > button {
    width: 100% !important;
    min-height: 48px !important;
    padding: 0 14px !important;
    justify-content: center;
    border-radius: 13px !important;
  }

  html body.public-info-body .support-widget > button b {
    display: inline !important;
    font-size: 13px !important;
  }

  html body.public-info-body .support-widget > section {
    position: fixed !important;
    inset: auto 10px 10px 10px !important;
    width: auto !important;
    max-height: calc(100dvh - 20px) !important;
    z-index: 120;
  }
}

@media (max-width: 350px) {
  html body.public-info-body.public-info-body .public-header { padding-inline: 6px !important; gap: 4px !important; }
  html body.public-info-body .public-header > .public-brand { gap: 5px !important; }
  html body.public-info-body .public-header > .public-brand b { font-size: 12.5px !important; }
  html body.public-info-body .public-actions .public-open { padding-inline: 6px !important; }
  html body.public-info-body .public-actions .public-open span { display: none; }
}
