/*
  HOME HERO FIT | 2026-11-10
  Keep the existing typography, palette, navigation and constellation.
  The homepage alone needs a smaller vertical rhythm so its two CTAs stay
  inside the true visible chapter, not underneath the next-chapter footer.
*/
@media (max-width:650px) and (orientation:portrait) {
  #chapters #home.chapter {
    padding-top:clamp(63px,9svh,81px) !important;
    padding-bottom:clamp(95px,12svh,110px) !important;
  }
  #chapters #home .chapter-content {
    min-height:0 !important;
    overflow-y:auto !important;
    overflow-x:visible !important;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
  }
  #chapters #home .chapter-content-inner {
    min-height:0 !important;
    height:auto !important;
    justify-content:flex-start !important;
    align-items:flex-start !important;
    gap:clamp(5px,.78svh,8px) !important;
    row-gap:clamp(5px,.78svh,8px) !important;
    padding:0 5px 12px 0 !important;
    margin:0 !important;
  }
  #chapters #home .hero-identity {
    gap:3px !important;
    margin:0 !important;
  }
  #chapters #home .hero-name {
    font-size:clamp(1.65rem,7.4vw,2.1rem) !important;
    line-height:1.04 !important;
  }
  #chapters #home .hero-role {
    font-size:clamp(10px,2.55vw,11.5px) !important;
    line-height:1.22 !important;
    letter-spacing:.057em !important;
  }
  #chapters #home .chapter-content-inner > h1 {
    font-size:clamp(2.65rem,12vw,3.7rem) !important;
    line-height:1.015 !important;
    letter-spacing:-.055em !important;
    margin:2px 0 0 !important;
  }
  #chapters #home .chapter-content-inner > p {
    font-size:clamp(.83rem,3.55vw,.96rem) !important;
    line-height:1.39 !important;
    margin:2px 0 0 !important;
    max-width:100% !important;
  }
  #chapters #home .chips {
    display:flex !important;
    flex-wrap:wrap !important;
    gap:6px !important;
    padding:3px 5px !important;
    margin:2px -5px 0 !important;
    width:auto !important;
  }
  #chapters #home .chip {
    font-size:clamp(10px,2.8vw,12px) !important;
    line-height:1.15 !important;
    padding:5px 9px !important;
  }
  #chapters #home .cta {
    display:inline-flex !important;
    flex:0 0 auto !important;
    min-height:44px !important;
    padding:10px 16px !important;
    margin:5px 0 0 !important;
    font-size:clamp(14px,3.7vw,17px) !important;
    line-height:1.2 !important;
  }
  #chapters #home .hero-secondary {
    display:inline-flex !important;
    flex:0 0 auto !important;
    align-self:flex-start !important;
    width:max-content !important;
    max-width:100% !important;
    min-height:36px !important;
    margin:1px 0 0 !important;
    padding:7px 0 !important;
    font-size:clamp(12px,3.2vw,14px) !important;
    line-height:1.25 !important;
    white-space:normal !important;
  }
  #chapters #home .next-section {
    bottom:clamp(30px,5.5svh,46px) !important;
  }
}
@media (max-width:375px) and (orientation:portrait) {
  #chapters #home.chapter {
    padding-top:clamp(59px,8.5svh,72px) !important;
    padding-bottom:clamp(85px,11svh,100px) !important;
  }
  #chapters #home .chapter-content-inner {
    gap:4px !important;
    row-gap:4px !important;
  }
  #chapters #home .hero-name {font-size:clamp(1.55rem,7.2vw,1.9rem) !important;}
  #chapters #home .hero-role {font-size:10px !important;line-height:1.17 !important;}
  #chapters #home .chapter-content-inner > h1 {
    font-size:clamp(2.38rem,11.3vw,2.85rem) !important;
    margin:1px 0 0 !important;
  }
  #chapters #home .chapter-content-inner > p {
    font-size:clamp(12px,3.65vw,13.5px) !important;
    line-height:1.32 !important;
  }
  #chapters #home .chips {gap:4px !important;padding-block:2px !important;}
  #chapters #home .chip {font-size:10px !important;padding:4px 7px !important;}
  #chapters #home .cta {min-height:40px !important;margin:2px 0 0 !important;padding:8px 13px !important;}
  #chapters #home .hero-secondary {margin:0 !important;min-height:32px !important;padding:5px 0 !important;}
  #chapters #home .next-section {bottom:clamp(24px,5svh,37px) !important;}
}
@media (max-width:650px) and (orientation:portrait) and (max-height:700px) {
  #chapters #home.chapter {padding-top:59px !important;padding-bottom:87px !important;}
  #chapters #home .chapter-content-inner {gap:4px !important;row-gap:4px !important;}
  #chapters #home .chapter-content-inner > p {line-height:1.31 !important;}
  #chapters #home .chips {margin-top:0 !important;}
  #chapters #home .next-section {bottom:26px !important;}
}
/* Do not interfere with the existing landscape split composition. */
@media (orientation:landscape) and (max-height:560px) {
  #chapters #home .chapter-content-inner > h1 {margin-block:0 !important;}
  #chapters #home .hero-secondary {position:relative;z-index:5;}
}
@media (prefers-reduced-motion:reduce) {
  #chapters #home .chapter-content {scroll-behavior:auto !important;}
}
