/* HOA V8.90.68 P18 — phone-first homepage and interaction polish.
   Keeps the blue + golden-yellow identity, existing routes and handlers.
   The top Student Login repair is in hoa-head-runtime-v8.19.js; this file is visual only. */

body.hoa-public-front #hoaFrontPage {
  --hoa-p18-navy: #092b4c;
  --hoa-p18-blue: #1558a8;
  --hoa-p18-blue-soft: #edf5ff;
  --hoa-p18-gold: #f1bd38;
  --hoa-p18-gold-soft: #fff6dc;
  --hoa-p18-line: #dce6f1;
  --hoa-p18-muted: #50677e;
  -webkit-tap-highlight-color: rgba(21, 88, 168, .12);
  text-rendering: optimizeLegibility;
}

body.hoa-public-front #hoaFrontPage :is(button, a, summary) {
  -webkit-tap-highlight-color: rgba(21, 88, 168, .12);
}

body.hoa-public-front #hoaFrontPage :is(button, a):focus-visible,
body.hoa-public-front #hoaGlobalPublicFooter :is(button, a):focus-visible {
  outline: 3px solid rgba(241, 189, 56, .9) !important;
  outline-offset: 3px !important;
}

@media (max-width: 600px) {
  /* The top bar becomes three deliberate rows rather than squeezing the brand and two tiny buttons together. */
  body.hoa-public-front #hoaFrontPage .hoa-p7-announcement {
    min-height: 35px;
    box-sizing: border-box;
    padding: 8px 12px;
    gap: 7px;
    font-size: 11px !important;
    line-height: 1.4;
  }

  body.hoa-public-front #hoaFrontPage > .hoa-front-nav {
    position: sticky !important;
    top: env(safe-area-inset-top, 0px) !important;
    z-index: 1200 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: calc(100% - 16px) !important;
    margin: 7px auto 12px !important;
    padding: 11px 12px 9px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(9, 43, 76, .12) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .97) !important;
    box-shadow: 0 7px 21px rgba(9, 43, 76, .09) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  body.hoa-public-front #hoaFrontPage .hoa-p7-brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-self: stretch !important;
    width: 100%;
    min-width: 0;
    max-width: none;
    gap: 10px !important;
    margin: 0 !important;
  }

  body.hoa-public-front #hoaFrontPage .hoa-p7-brand img {
    flex: 0 0 42px !important;
    width: 42px !important;
    height: 42px !important;
    object-fit: contain;
    border-radius: 10px !important;
    background: #fff;
  }

  body.hoa-public-front #hoaFrontPage .hoa-p7-brand-copy {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-width: 0 !important;
    gap: 4px !important;
  }

  body.hoa-public-front #hoaFrontPage .hoa-front-brand-name {
    display: block;
    max-width: 100% !important;
    overflow: visible !important;
    font-size: clamp(13px, 3.8vw, 15px) !important;
    line-height: 1.15 !important;
    letter-spacing: -.015em !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    color: var(--hoa-p18-navy) !important;
  }

  body.hoa-public-front #hoaFrontPage .hoa-front-brand-tag {
    font-size: 9.5px !important;
    line-height: 1.2 !important;
    letter-spacing: .025em !important;
    white-space: normal !important;
  }

  body.hoa-public-front #hoaFrontPage .hoa-p7-navlinks { display: contents !important; }

  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-actions {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    justify-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-actions button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 9px 7px !important;
    border: 1px solid var(--hoa-p18-navy) !important;
    border-radius: 11px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
  }

  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-actions .hoa-p7-login-button {
    background: linear-gradient(135deg, #0a3266 0%, #1558a8 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(10, 50, 102, .14) !important;
  }

  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-actions .hoa-p7-register-button {
    border-color: #e2b332 !important;
    background: linear-gradient(135deg, #fff8e7 0%, #ffedb5 100%) !important;
    color: #092b4c !important;
    box-shadow: 0 4px 10px rgba(204, 153, 31, .10) !important;
  }

  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-actions .hoa-p7-register-button::after { display: none !important; }

  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-destinations {
    grid-column: 1 !important;
    grid-row: 3 !important;
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 6px !important;
    padding: 8px 0 2px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-top: 1px solid #e8eef5 !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-destinations::-webkit-scrollbar { display: none !important; }

  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-destinations button {
    flex: 0 0 auto !important;
    min-height: 40px !important;
    min-width: 44px !important;
    padding: 0 11px !important;
    border: 1px solid #e4ebf4 !important;
    border-radius: 10px !important;
    background: #f5f8fc !important;
    color: #173a5c !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    scroll-snap-align: start;
  }

  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-destinations button:active { background: var(--hoa-p18-gold-soft) !important; border-color: var(--hoa-p18-gold) !important; }

  /* Keep scroll targets visible below the taller, touch-friendly sticky navigation. */
  body.hoa-public-front #hoaFrontPage :is(#hoaP7Preparation, #hoaDynamicShowcase, #hoaV648StudentOptions, #hoaFrontFeatures, .hoa-p7-faq-section, #hoaFrontSocialFooter) {
    scroll-margin-top: 170px !important;
  }

  /* Hero: readable text, one dominant action, clear branding and visible study image. */
  body.hoa-public-front #hoaFrontPage .hoa-p8-brand-hero {
    box-sizing: border-box !important;
    gap: 17px !important;
    padding-top: 24px !important;
    padding-bottom: 21px !important;
    padding-left: max(26px, calc(env(safe-area-inset-left, 0px) + 24px)) !important;
    padding-right: max(14px, calc(env(safe-area-inset-right, 0px) + 10px)) !important;
    background-image: linear-gradient(180deg, rgba(255,253,248,.96) 0%, rgba(255,253,248,.91) 54%, rgba(255,253,248,.70) 100%), url('../assets/hoa-hero-student.webp?v=8.90.59') !important;
    background-size: cover !important;
    background-position: 68% center !important;
  }

  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-brand-lockup { align-items: center !important; gap: 10px !important; margin-bottom: 16px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-logo { flex: 0 0 54px !important; width: 54px !important; height: 54px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-brand-copy { min-width: 0 !important; gap: 4px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-brand-name { font-size: clamp(17px, 4.9vw, 22px) !important; line-height: 1.1 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-brand-tagline { font-size: 8.3px !important; line-height: 1.35 !important; letter-spacing: .055em !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-eyebrow { margin-bottom: 10px !important; font-size: 9px !important; letter-spacing: .075em !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-title { max-width: 100% !important; font-size: clamp(28px, 7.7vw, 34px) !important; line-height: 1.09 !important; letter-spacing: -.035em !important; margin-bottom: 11px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-copy-text { max-width: 100% !important; font-size: 14px !important; line-height: 1.58 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-actions { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; width: 100% !important; gap: 9px !important; margin-top: 17px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-actions .hoa-p4-button { width: 100% !important; min-height: 48px !important; padding: 11px 13px !important; border-radius: 12px !important; font-size: 13px !important; line-height: 1.25 !important; white-space: normal !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-actions .hoa-p4-button:first-child { grid-column: 1 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-proof { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 9px 12px !important; margin-top: 14px !important; font-size: 10.5px !important; line-height: 1.4 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-proof span { min-width: 0 !important; gap: 6px !important; }

  /* The in-hero motivation panel stays on-theme, but every line is readable on a phone. */
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-poster { padding: 15px !important; gap: 7px !important; border-radius: 15px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-poster-brand { gap: 9px !important; padding-bottom: 10px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-poster-brand img { flex: 0 0 42px !important; width: 42px !important; height: 42px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-poster-brand strong { font-size: 11px !important; line-height: 1.25 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-poster-brand span { font-size: 8.5px !important; letter-spacing: .045em !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-poster-slogan { gap: 5px 8px !important; font-size: clamp(18px, 5.1vw, 22px) !important; line-height: 1.15 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-poster-tagline { font-size: 8.5px !important; letter-spacing: .045em !important; line-height: 1.4 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-poster-steps { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-poster-steps span { min-width: 0 !important; min-height: 38px !important; padding: 6px 4px !important; gap: 4px !important; font-size: 9px !important; letter-spacing: 0 !important; white-space: normal !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-poster-steps b { flex: 0 0 17px !important; width: 17px !important; height: 17px !important; font-size: 8px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-poster-note { margin-top: 5px !important; font-size: 10px !important; line-height: 1.45 !important; }

  /* Four key destinations: clean two-column cards and comfortable type. */
  body.hoa-public-front #hoaFrontPage .hoa-p7-quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: calc(100% - 20px) !important;
    gap: 0 !important;
    margin: 16px auto 27px !important;
    overflow: hidden !important;
    border: 1px solid var(--hoa-p18-line) !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 7px 22px rgba(9, 43, 76, .055) !important;
  }

  body.hoa-public-front #hoaFrontPage .hoa-p7-quick-links > button {
    min-height: 124px !important;
    padding: 13px !important;
    gap: 8px 6px !important;
    background: #fff !important;
    transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
  }
  body.hoa-public-front #hoaFrontPage .hoa-p7-quick-links > button:active { background: #f3f8ff !important; box-shadow: inset 0 0 0 2px rgba(21,88,168,.12) !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-quick-links b { font-size: 12.5px !important; line-height: 1.3 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-quick-links small { font-size: 11.5px !important; line-height: 1.45 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-quick-arrow { font-size: 16px !important; }

  /* Less dense page sections with a stable gutter and readable body copy. */
  body.hoa-public-front #hoaFrontPage .hoa-p7-section,
  body.hoa-public-front #hoaFrontPage .hoa-p7-student-section,
  body.hoa-public-front #hoaFrontPage #hoaFrontFeatures,
  body.hoa-public-front #hoaFrontPage .hoa-p7-faq-section,
  body.hoa-public-front #hoaFrontPage .hoa-p7-final-cta {
    width: calc(100% - 28px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 30px !important;
  }
  body.hoa-public-front #hoaFrontPage .hoa-p7-section-heading { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 8px !important; margin-bottom: 16px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-section-heading h2,
  body.hoa-public-front #hoaFrontPage .hoa-p7-faq-intro h2 { font-size: clamp(24px, 6.5vw, 28px) !important; line-height: 1.16 !important; letter-spacing: -.025em !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-section-heading > p,
  body.hoa-public-front #hoaFrontPage .hoa-p7-faq-intro p { font-size: 13.5px !important; line-height: 1.6 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-section-kicker { font-size: 9px !important; line-height: 1.4 !important; letter-spacing: .10em !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-path-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 11px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-path-card { min-height: 0 !important; padding: 18px !important; border-radius: 16px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-path-card h3 { font-size: 18px !important; line-height: 1.25 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-path-card p,
  body.hoa-public-front #hoaFrontPage .hoa-p7-feature-card p { font-size: 13px !important; line-height: 1.62 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-path-card > button { min-height: 44px !important; font-size: 12.5px !important; }

  /* Poster carousel: preserve swipe support and give portrait updates their requested height. */
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase {
    width: calc(100% - 16px) !important;
    margin: 0 auto 30px !important;
    padding: 19px 11px 15px !important;
    border: 1px solid #dce6f1 !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, #fff 0%, #f6f9ff 78%, #fff9e9 100%) !important;
    box-shadow: 0 10px 28px rgba(9,43,76,.07) !important;
  }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase::before { right: 14px !important; left: 14px !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase .hoa-v3d-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 11px !important;
    width: 100% !important;
    margin-bottom: 13px !important;
  }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase .hoa-v3d-head h2 { font-size: clamp(24px, 6.4vw, 28px) !important; line-height: 1.12 !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase .hoa-v3d-head p { max-width: none !important; font-size: 12px !important; line-height: 1.5 !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase .hoa-v3d-head-actions { justify-content: flex-start !important; align-self: start !important; gap: 8px !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase .hoa-v3d-control { width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; border-radius: 12px !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase .hoa-v3d-control svg { width: 17px !important; height: 17px !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase #hoaV3DStage {
    width: 100% !important;
    height: clamp(650px, 170vw, 760px) !important;
    min-height: 650px !important;
    max-height: 760px !important;
    border-radius: 13px !important;
    touch-action: pan-y pinch-zoom !important;
  }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase .hoa-v3d-card { padding: 6px !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase .hoa-v3d-card img { border-radius: 10px !important; }
  /* Keep the no-posters state compact even though populated portrait posters get a taller stage. */
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase:has(.hoa-v3d-empty) #hoaV3DStage { height: 104px !important; min-height: 104px !important; max-height: 104px !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase .hoa-v3d-indicators { min-height: 26px !important; gap: 8px !important; padding-top: 12px !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase .hoa-v3d-dot { min-width: 10px !important; min-height: 10px !important; width: 10px !important; height: 10px !important; flex-basis: 10px !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase .hoa-v3d-dot.is-active { width: 24px !important; flex-basis: 24px !important; }

  /* FAQs and floating contact controls: make each interaction easy to tap. */
  body.hoa-public-front #hoaFrontPage .hoa-p7-faq-list details { border-radius: 12px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-faq-list summary { min-height: 48px !important; display: flex !important; align-items: center !important; gap: 10px !important; padding: 13px 14px !important; font-size: 13px !important; line-height: 1.4 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-faq-list details p { padding: 0 14px 14px !important; font-size: 12.5px !important; line-height: 1.6 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-final-cta { padding: 22px 17px !important; border-radius: 17px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-final-cta p { font-size: 13px !important; line-height: 1.58 !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-final-cta .hoa-p4-button { min-height: 46px !important; font-size: 12.5px !important; }

  body.hoa-public-front #hoaGlobalPublicFooter .hoa-footer-inner { padding: 25px 18px 19px !important; gap: 20px !important; }
  body.hoa-public-front #hoaGlobalPublicFooter .hoa-footer-links a,
  body.hoa-public-front #hoaGlobalPublicFooter .hoa-footer-link-coming-soon,
  body.hoa-public-front #hoaGlobalPublicFooter .hoa-footer-contact a { min-height: 36px; display: inline-flex; align-items: center; font-size: 12px !important; }
  body.hoa-public-front #hoaGlobalPublicFooter .hoa-footer-bottom { padding: 13px 16px max(13px, env(safe-area-inset-bottom)) !important; font-size: 11px !important; }
}

@media (max-width: 380px) {
  body.hoa-public-front #hoaFrontPage .hoa-front-brand-name { font-size: 12.5px !important; letter-spacing: -.02em !important; }
  body.hoa-public-front #hoaFrontPage .hoa-front-brand-tag { font-size: 9px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-actions button { font-size: 11.5px !important; padding-inline: 5px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-destinations button { font-size: 11px !important; padding-inline: 10px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-title { font-size: 28px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-copy-text { font-size: 13.5px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-quick-links > button { min-height: 128px !important; padding: 11px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-quick-links b { font-size: 12px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-quick-links small { font-size: 11px !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase #hoaV3DStage { height: clamp(620px, 180vw, 720px) !important; min-height: 620px !important; max-height: 720px !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase:has(.hoa-v3d-empty) #hoaV3DStage { height: 104px !important; min-height: 104px !important; max-height: 104px !important; }
}

@media (min-width: 601px) and (max-width: 820px) {
  body.hoa-public-front #hoaFrontPage > .hoa-front-nav { gap: 10px !important; padding: 12px 14px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-actions button { min-height: 44px !important; padding-inline: 12px !important; font-size: 12px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p7-nav-destinations button { min-height: 40px !important; font-size: 11.5px !important; }
  body.hoa-public-front #hoaFrontPage .hoa-p8-hero-copy-text { font-size: 14px !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase #hoaV3DStage { height: clamp(650px, 90vw, 760px) !important; min-height: 650px !important; max-height: 760px !important; }
  body.hoa-public-front #hoaFrontPage #hoaDynamicShowcase:has(.hoa-v3d-empty) #hoaV3DStage { height: 104px !important; min-height: 104px !important; max-height: 104px !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.hoa-public-front #hoaFrontPage *,
  body.hoa-public-front #hoaGlobalPublicFooter * {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
