/* ============================================================
   CDI Premium V6 - brand launch, footer geometry and compact
   mobile discovery rails. Loaded last to neutralise legacy rules.
   ============================================================ */

:root{
  --cdi-v6-mobile-gutter:16px;
  --cdi-v6-rail-gap:9px;
  --cdi-v6-chip-border:#d8e1eb;
  --cdi-v6-chip-bg:#ffffff;
}

/* Installed app launch screen: icon first, full CDI wordmark beneath. */
.cdi-launch-inner{
  width:min(88vw,430px)!important;
}
.cdi-launch-icon{
  width:88px!important;
  height:88px!important;
  border-radius:22px!important;
  box-shadow:0 20px 54px rgba(0,0,0,.3),0 0 0 1px rgba(255,255,255,.13)!important;
}
.cdi-launch-logo{
  width:min(68vw,278px)!important;
  height:auto!important;
  object-fit:contain!important;
  margin-top:22px!important;
  opacity:0;
  transform:translateY(10px) scale(.98);
  filter:drop-shadow(0 12px 30px rgba(0,0,0,.24));
  animation:cdiV6LogoReveal .48s .68s cubic-bezier(.2,.8,.2,1) forwards;
}
.cdi-launch-name{
  margin-top:15px!important;
  color:rgba(255,255,255,.82)!important;
  font-size:12px!important;
  font-weight:600!important;
  letter-spacing:.045em!important;
  text-transform:uppercase;
  animation-delay:.94s!important;
}
.cdi-launch-line{
  margin-top:7px!important;
  color:#fff!important;
  font-size:14px!important;
  font-weight:600!important;
  letter-spacing:.02em!important;
  animation-delay:1.04s!important;
}
.cdi-launch-progress{
  margin-top:24px!important;
  width:132px!important;
}
@keyframes cdiV6LogoReveal{
  to{opacity:1;transform:translateY(0) scale(1)}
}

/* Footer uses its own inner wrapper, avoiding all historic .container rules. */
.site-footer{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:48px 0 0!important;
  overflow:hidden!important;
}
.site-footer .cdi-footer-inner{
  width:min(1200px,calc(100% - 48px))!important;
  max-width:1200px!important;
  margin:0 auto!important;
  padding:0!important;
  box-sizing:border-box!important;
}
.site-footer .foot-grid,
.site-footer .foot-brand,
.site-footer .foot-col,
.site-footer .foot-bottom{
  min-width:0!important;
  box-sizing:border-box!important;
}

/* Never reserve PWA navigation space in the normal browser. */
body{
  margin-bottom:0!important;
  padding-bottom:0!important;
}
html.pwa-standalone body{
  padding-bottom:calc(68px + env(safe-area-inset-bottom))!important;
}

/* Repair the escaped check glyph visible in instructor benefit pills. */
.gltick::before{
  content:'✓'!important;
}

@media(max-width:768px){
  /* Exact one-gutter footer geometry on phones. */
  .site-footer{
    padding:34px 0 0!important;
    margin-bottom:0!important;
  }
  .site-footer .cdi-footer-inner{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0 var(--cdi-v6-mobile-gutter) 0!important;
  }
  .site-footer .foot-grid{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0 0 24px!important;
    grid-template-columns:1fr!important;
    gap:22px!important;
  }
  .site-footer .foot-brand,
  .site-footer .foot-col,
  .site-footer .foot-bottom{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding-left:0!important;
    padding-right:0!important;
    transform:none!important;
  }
  .site-footer .foot-logo{
    display:block!important;
    width:164px!important;
    max-width:164px!important;
    height:auto!important;
    margin:0!important;
  }
  .site-footer .foot-brand p{
    max-width:none!important;
    margin:13px 0 0!important;
    padding:0!important;
  }
  .site-footer .foot-social{
    margin:15px 0 0!important;
  }
  .site-footer .foot-col h4,
  .site-footer .foot-col ul,
  .site-footer .foot-col li,
  .site-footer .foot-col a{
    margin-left:0!important;
    padding-left:0!important;
  }
  .site-footer .foot-bottom{
    margin:0!important;
    padding:17px 0 max(14px,env(safe-area-inset-bottom))!important;
  }
  .site-footer .foot-bottom p{
    margin-left:0!important;
    margin-right:0!important;
  }

  /* Four links visible as a 2 x 2 board, then horizontal swipe. */
  .seo-interlinks-grid,
  .related-searches-rail,
  .sl-rail{
    display:grid!important;
    grid-auto-flow:column!important;
    grid-template-rows:repeat(2,minmax(48px,auto))!important;
    grid-auto-columns:calc((100% - var(--cdi-v6-rail-gap))/2)!important;
    gap:var(--cdi-v6-rail-gap)!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x mandatory!important;
    scroll-padding-inline:0!important;
    overscroll-behavior-inline:contain!important;
    -webkit-overflow-scrolling:touch!important;
    padding:2px 18px 8px 0!important;
    margin:0!important;
    scrollbar-width:none!important;
  }
  .seo-interlinks-grid::-webkit-scrollbar,
  .related-searches-rail::-webkit-scrollbar,
  .sl-rail::-webkit-scrollbar{display:none!important}

  .seo-interlink,
  .related-searches-rail .acchip,
  .sl-rail a{
    width:100%!important;
    min-width:0!important;
    min-height:48px!important;
    max-height:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    margin:0!important;
    padding:9px 11px!important;
    border:1px solid var(--cdi-v6-chip-border)!important;
    border-radius:13px!important;
    background:var(--cdi-v6-chip-bg)!important;
    color:#0b1f3d!important;
    box-shadow:0 2px 7px rgba(6,20,38,.035)!important;
    font-size:11.5px!important;
    font-weight:600!important;
    line-height:1.25!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    text-decoration:none!important;
    box-sizing:border-box!important;
    scroll-snap-align:start!important;
  }

  /* Compact two-column Quick Answer content. */
  .aeo-facts,
  .aeo-links{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    max-width:100%!important;
  }
  .aeo-fact,
  .aeo-link{
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    margin:0!important;
    padding:8px 10px!important;
    border-radius:13px!important;
    box-sizing:border-box!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    font-size:11.5px!important;
    line-height:1.28!important;
  }
  .aeo-fact:last-child:nth-child(odd),
  .aeo-link:last-child:nth-child(odd){
    grid-column:auto!important;
  }

  /* Filter and active-state pills remain a deliberate single swipe row. */
  .acchips,
  .qf-pills,
  .ph2-qf,
  .filter-pills,
  .chip-row{
    display:flex!important;
    flex-wrap:nowrap!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    gap:8px!important;
    padding:2px 16px 7px 0!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .acchips::-webkit-scrollbar,
  .qf-pills::-webkit-scrollbar,
  .ph2-qf::-webkit-scrollbar,
  .filter-pills::-webkit-scrollbar,
  .chip-row::-webkit-scrollbar{display:none!important}
  .acchips>* ,
  .qf-pills>* ,
  .ph2-qf>* ,
  .filter-pills>* ,
  .chip-row>*{
    flex:0 0 auto!important;
    white-space:nowrap!important;
  }

  /* Small trust and benefit groups use compact two-column cards. */
  .gl-trust,
  .fm-hero-pills{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
  }
  .gl-trust .gltick,
  .fm-hero-pills>div{
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    justify-content:flex-start!important;
    box-sizing:border-box!important;
  }
}

@media(max-width:360px){
  .seo-interlinks-grid,
  .related-searches-rail,
  .sl-rail{
    grid-auto-columns:calc((100% - 8px)/2)!important;
    gap:8px!important;
  }
  .seo-interlink,
  .related-searches-rail .acchip,
  .sl-rail a{
    font-size:10.8px!important;
    padding:8px 9px!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .cdi-launch-logo{animation:none!important;opacity:1!important;transform:none!important}
}
