/* Home Reference v1
   Home-only visual layer matching the approved dashboard reference.
   No data, grading, sharing, permissions, or report logic is changed. */
@media screen{
  .np-home-header{
    border:1px solid #dfeaec!important;
    box-shadow:0 10px 26px rgba(8,43,75,.045)!important;
    background:rgba(255,255,255,.96)!important;
  }
  .np-home-header .np-home-brand{
    justify-self:end!important;
    direction:ltr!important;
    flex-direction:row-reverse!important;
    gap:7px!important;
  }
  .np-home-header .np-home-brand img{
    width:44px!important;height:44px!important;border-radius:12px!important;
  }
  .np-home-header .np-home-brand b{
    font-size:19px!important;letter-spacing:-.2px!important
  }
  .np-home-header .np-home-brand small{
    font-size:9px!important;color:#748892!important
  }
  .np-home-header .np-home-profile{
    justify-self:start!important;
    direction:ltr!important;
    gap:8px!important;
  }
  .np-home-header .np-home-profile>i{
    background:linear-gradient(145deg,#eefaf6,#cceee4)!important;
    border:1px solid #cce8df!important;
    color:#07866b!important;
  }
  .np-home-header .np-home-profile>b{
    direction:ltr!important;text-align:left!important;
  }
  .np-home-select{
    position:relative!important;min-width:0!important;
  }
  .np-home-select select{
    width:100%!important;height:44px!important;
    border-radius:12px!important;
    border:1px solid #dce7ea!important;
    background:#fff!important;
    color:#17384f!important;
    font-weight:750!important;
    box-shadow:0 4px 10px rgba(8,43,75,.025)!important;
    padding-inline-start:36px!important;
  }
  .np-home-select-icon{
    position:absolute!important;z-index:2!important;
    width:17px!important;height:17px!important;
    left:12px!important;top:50%!important;transform:translateY(-50%)!important;
    color:#07866b!important;pointer-events:none!important;
  }

  [data-page="home"] .np-home-hero{
    min-height:164px!important;
    display:grid!important;
    grid-template-columns:105px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    grid-template-areas:"art copy" "art button"!important;
    align-items:center!important;
    gap:5px 10px!important;
    padding:19px 20px!important;
    border-radius:22px!important;
    background:
      radial-gradient(circle at 9% 75%,rgba(41,211,167,.13),transparent 26%),
      radial-gradient(circle at 92% 10%,rgba(26,194,151,.24),transparent 34%),
      linear-gradient(125deg,#07314e 0%,#0a4a67 55%,#07866b 120%)!important;
    box-shadow:0 12px 28px rgba(8,43,75,.12)!important;
  }
  [data-page="home"] .np-home-hero>.npv2-hero-art{display:none!important}
  [data-page="home"] .np-home-hero>div:first-child{
    grid-area:copy!important;direction:rtl!important;text-align:right!important;
    align-self:end!important;
  }
  html[dir="ltr"] [data-page="home"] .np-home-hero>div:first-child{
    direction:ltr!important;text-align:left!important;
  }
  [data-page="home"] .np-home-hero small{
    color:#b9ddd6!important;font-size:10px!important;font-weight:700!important;
  }
  [data-page="home"] .np-home-hero h1{
    margin:4px 0 6px!important;
    color:#fff!important;
    font-size:29px!important;line-height:1.14!important;
    letter-spacing:-.4px!important;
  }
  [data-page="home"] .np-home-hero p{
    margin:0!important;color:#d9ece8!important;
    font-size:11.5px!important;line-height:1.45!important;
  }
  [data-page="home"] .np-home-hero .np-home-cta{
    grid-area:button!important;justify-self:end!important;
    min-height:42px!important;padding:9px 16px!important;
    border-radius:12px!important;background:#fff!important;
    color:#087965!important;border:0!important;
    font-weight:800!important;box-shadow:0 7px 18px rgba(0,0,0,.07)!important;
  }
  html[dir="ltr"] [data-page="home"] .np-home-hero .np-home-cta{justify-self:start!important}
  [data-page="home"] .np-home-hero-art{
    grid-area:art!important;position:relative!important;
    width:98px!important;height:105px!important;
    align-self:center!important;justify-self:center!important;
    opacity:.95!important;pointer-events:none!important;
  }
  [data-page="home"] .np-home-hero-art svg:nth-child(1){
    position:absolute!important;width:76px!important;height:76px!important;
    left:8px!important;bottom:8px!important;color:#39bda3!important;
    stroke-width:1.45!important;opacity:.84!important;
  }
  [data-page="home"] .np-home-hero-art svg:nth-child(2){
    position:absolute!important;width:42px!important;height:42px!important;
    left:40px!important;top:3px!important;color:#86ddca!important;
    stroke-width:1.5!important;opacity:.55!important;
  }
  [data-page="home"] .np-home-hero-art svg:nth-child(3){
    position:absolute!important;width:15px!important;height:15px!important;
    right:2px!important;top:13px!important;color:#e0b650!important;fill:rgba(224,182,80,.16)!important;
  }
  [data-page="home"] .np-home-hero-art svg:nth-child(4){
    position:absolute!important;width:11px!important;height:11px!important;
    right:22px!important;top:36px!important;color:#e0b650!important;fill:rgba(224,182,80,.16)!important;
  }

  [data-page="home"] .stats{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;margin-top:10px!important;
  }
  [data-page="home"] .np-home-stat{
    min-height:92px!important;padding:14px 15px!important;
    border:1px solid #dfe9eb!important;border-radius:16px!important;
    background:#fff!important;box-shadow:0 7px 18px rgba(8,43,75,.045)!important;
    position:relative!important;overflow:hidden!important;
  }
  [data-page="home"] .np-home-stat .np-home-stat-icon{
    position:absolute!important;left:13px!important;top:12px!important;
    width:18px!important;height:18px!important;padding:7px!important;
    box-sizing:content-box!important;border-radius:10px!important;
  }
  [data-page="home"] .np-home-stat-students .np-home-stat-icon{
    color:#1769a5!important;background:#edf5fb!important;
  }
  [data-page="home"] .np-home-stat-average .np-home-stat-icon{
    color:#07866b!important;background:#e9f7f2!important;
  }
  [data-page="home"] .np-home-stat-complete .np-home-stat-icon{
    color:#b9871f!important;background:#fff5df!important;
  }
  [data-page="home"] .np-home-stat-needs .np-home-stat-icon{
    color:#c9433d!important;background:#fff0ef!important;
  }
  [data-page="home"] .np-home-stat b{
    display:block!important;margin-top:23px!important;
    font-size:28px!important;line-height:1!important;color:#0b3250!important;
  }
  [data-page="home"] .np-home-stat span{
    display:block!important;margin-top:6px!important;
    color:#6f838e!important;font-size:11px!important;font-weight:650!important;
  }

  [data-page="home"] .np-home-progress-card{
    padding:14px 16px 12px!important;margin-top:10px!important;
    border-radius:20px!important;border:1px solid #dfe9eb!important;
    box-shadow:0 8px 22px rgba(8,43,75,.045)!important;
  }
  .np-home-progress-head{
    display:flex!important;align-items:center!important;justify-content:space-between!important;
    gap:10px!important;margin-bottom:6px!important;
  }
  .np-home-progress-heading{
    display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;
  }
  .np-home-progress-heading-icon{
    width:31px!important;height:31px!important;border-radius:10px!important;
    display:grid!important;place-items:center!important;
    background:#eaf7f3!important;color:#07866b!important;border:1px solid #d8ece6!important;
    flex:0 0 auto!important;
  }
  .np-home-progress-heading-icon svg{width:17px!important;height:17px!important}
  .np-home-progress-head h2{
    margin:0!important;font-size:20px!important;line-height:1.1!important;color:#123952!important;
  }
  .np-home-progress-head p{
    margin:3px 0 0!important;font-size:9.5px!important;line-height:1.25!important;color:#7a8d97!important;
  }
  .np-home-show-all{
    flex:0 0 auto!important;min-height:31px!important;padding:5px 10px!important;
    border-radius:9px!important;border:1px solid #d6ebe5!important;background:#eff9f6!important;
    color:#087965!important;font-size:10px!important;font-weight:800!important;
  }
  #subjectProgress{margin-top:2px!important}
  #subjectProgress>div{
    display:grid!important;
    grid-template-columns:minmax(118px,.95fr) minmax(70px,1.55fr) 44px!important;
    align-items:center!important;gap:7px!important;
    min-height:49px!important;padding:6px 0!important;
    border-bottom:1px solid #edf2f3!important;position:relative!important;
  }
  #subjectProgress>div>span{
    display:grid!important;grid-template-columns:32px minmax(0,1fr)!important;
    align-items:center!important;gap:7px!important;min-width:0!important;
  }
  #subjectProgress .np-home-subject-icon{
    width:32px!important;height:32px!important;flex-basis:32px!important;
    border-radius:10px!important;box-shadow:none!important;
  }
  #subjectProgress .subject-progress-name{
    font-size:11.5px!important;line-height:1.2!important;font-weight:750!important;
    color:#17384f!important;white-space:normal!important;word-break:normal!important;
  }
  #subjectProgress>div>span>small{
    position:absolute!important;left:0!important;top:7px!important;
    font-size:9px!important;color:#8a99a1!important;font-weight:600!important;
  }
  #subjectProgress>div>i{
    height:7px!important;border-radius:999px!important;
    background:#edf3f2!important;overflow:hidden!important;
  }
  #subjectProgress>div>i>b{
    height:100%!important;border-radius:999px!important;
    background:linear-gradient(90deg,#07866b,#12a27e)!important;
  }
  #subjectProgress>div>strong{
    align-self:end!important;padding-bottom:3px!important;
    font-size:9.5px!important;color:#17384f!important;font-weight:800!important;
  }
  .np-home-progress-card:not(.np-home-expanded) #subjectProgress>div:nth-child(n+5){
    display:none!important;
  }
  #subjectProgress>.np-home-subject-1 .np-home-subject-icon{background:#eaf7f3!important;color:#07866b!important}
  #subjectProgress>.np-home-subject-2 .np-home-subject-icon{background:#fff5df!important;color:#b8871f!important}
  #subjectProgress>.np-home-subject-3 .np-home-subject-icon{background:#edf5fb!important;color:#1769a5!important}
  #subjectProgress>.np-home-subject-4 .np-home-subject-icon{background:#eef9f2!important;color:#398660!important}
  #subjectProgress>.np-home-subject-5 .np-home-subject-icon{background:#fff0ef!important;color:#c85149!important}
  #subjectProgress>.np-home-subject-6 .np-home-subject-icon{background:#f2effb!important;color:#7058a7!important}
  #subjectProgress>.np-home-subject-7 .np-home-subject-icon{background:#eaf7f3!important;color:#07866b!important}

  @media(max-width:760px){
    main{padding:10px 12px 18px!important}
    main>.np-home-header{
      display:grid!important;direction:ltr!important;
      grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
      grid-template-rows:auto auto!important;
      gap:9px 10px!important;padding:11px 12px!important;
      border-radius:18px!important;margin-bottom:10px!important;
    }
    main>.np-home-header .np-home-profile{
      grid-column:1!important;grid-row:1!important;
    }
    main>.np-home-header .np-home-brand{
      grid-column:2!important;grid-row:1!important;
    }
    main>.np-home-header .np-home-year{
      grid-column:1!important;grid-row:2!important;
    }
    main>.np-home-header .np-home-class{
      grid-column:2!important;grid-row:2!important;
    }
    main>.np-home-header .profile>i{
      width:40px!important;height:40px!important;border-radius:12px!important;
    }
    main>.np-home-header .profile b{font-size:13.5px!important}
    main>.np-home-header .profile small{font-size:8.8px!important}
    .np-home-header .np-home-brand img{width:40px!important;height:40px!important}
    .np-home-header .np-home-brand b{font-size:17px!important}
    .np-home-header .np-home-brand small{font-size:8.2px!important}
    .np-home-select select{
      height:42px!important;font-size:12px!important;padding-inline-start:34px!important;
    }

    [data-page="home"] .np-home-hero{
      min-height:152px!important;grid-template-columns:88px minmax(0,1fr)!important;
      padding:16px 17px!important;border-radius:20px!important;
    }
    [data-page="home"] .np-home-hero h1{font-size:25px!important}
    [data-page="home"] .np-home-hero p{font-size:10.8px!important}
    [data-page="home"] .np-home-hero .np-home-cta{
      min-height:39px!important;padding:8px 14px!important;font-size:11.5px!important;
    }
    [data-page="home"] .np-home-hero-art{width:82px!important;height:92px!important}
    [data-page="home"] .np-home-hero-art svg:nth-child(1){width:66px!important;height:66px!important}
    [data-page="home"] .np-home-hero-art svg:nth-child(2){width:36px!important;height:36px!important}

    [data-page="home"] .stats{gap:8px!important;margin-top:9px!important}
    [data-page="home"] .np-home-stat{
      min-height:84px!important;padding:12px 13px!important;border-radius:15px!important;
    }
    [data-page="home"] .np-home-stat .np-home-stat-icon{
      width:16px!important;height:16px!important;padding:6px!important;top:10px!important;left:11px!important;
    }
    [data-page="home"] .np-home-stat b{
      margin-top:21px!important;font-size:26px!important;
    }
    [data-page="home"] .np-home-stat span{font-size:10.5px!important}

    [data-page="home"] .np-home-progress-card{
      padding:13px 14px 10px!important;border-radius:18px!important;
    }
    .np-home-progress-head h2{font-size:18px!important}
    .np-home-progress-head p{font-size:8.8px!important}
    .np-home-progress-heading-icon{width:29px!important;height:29px!important}
    .np-home-show-all{font-size:9.5px!important;padding:5px 9px!important}
    #subjectProgress>div{
      grid-template-columns:minmax(108px,.95fr) minmax(66px,1.55fr) 40px!important;
      min-height:47px!important;gap:6px!important;padding:5px 0!important;
    }
    #subjectProgress>div>span{
      grid-template-columns:30px minmax(0,1fr)!important;gap:6px!important;
    }
    #subjectProgress .np-home-subject-icon{
      width:30px!important;height:30px!important;flex-basis:30px!important;
    }
    #subjectProgress .subject-progress-name{font-size:10.8px!important}
    #subjectProgress>div>span>small{font-size:8.5px!important;top:6px!important}
    #subjectProgress>div>strong{font-size:9px!important}
  }

  @media(max-width:380px){
    main>.np-home-header{gap:8px!important;padding:10px!important}
    .np-home-header .np-home-brand b{font-size:16px!important}
    .np-home-header .np-home-brand small{font-size:7.8px!important}
    main>.np-home-header .profile b{font-size:12.5px!important}
    [data-page="home"] .np-home-hero{
      grid-template-columns:78px minmax(0,1fr)!important;
      padding:15px!important;
    }
    [data-page="home"] .np-home-hero h1{font-size:23px!important}
    #subjectProgress>div{
      grid-template-columns:minmax(100px,.95fr) minmax(58px,1.45fr) 38px!important;
    }
  }
}
@media print{
  .np-home-hero-art,.np-home-progress-heading-icon,.np-home-show-all,.np-home-select-icon{display:none!important}
}

/* Final alignment pass from real-device review */
@media screen{
  .np-home-select{
    direction:ltr!important;
  }
  .np-home-select select{
    -webkit-appearance:none!important;
    appearance:none!important;
    background-image:none!important;
    padding-left:44px!important;
    padding-right:30px!important;
  }
  .np-home-select::after{
    content:""!important;
    position:absolute!important;
    z-index:3!important;
    right:13px!important;
    top:50%!important;
    width:6px!important;
    height:6px!important;
    border-right:1.5px solid #355467!important;
    border-bottom:1.5px solid #355467!important;
    transform:translateY(-64%) rotate(45deg)!important;
    pointer-events:none!important;
  }
  .np-home-year select{
    direction:ltr!important;
    text-align:center!important;
  }
  html[dir="rtl"] .np-home-class select{
    direction:rtl!important;
    text-align:right!important;
    unicode-bidi:plaintext!important;
  }
  html[dir="ltr"] .np-home-class select{
    direction:ltr!important;
    text-align:left!important;
  }

  [data-page="home"] .np-home-hero{
    direction:ltr!important;
  }
  [data-page="home"] .np-home-hero>div:first-child{
    direction:rtl!important;
    text-align:right!important;
  }
  html[dir="ltr"] [data-page="home"] .np-home-hero>div:first-child{
    direction:ltr!important;
    text-align:left!important;
  }
  [data-page="home"] .np-home-hero .np-home-cta{
    justify-self:end!important;
  }
  html[dir="ltr"] [data-page="home"] .np-home-hero .np-home-cta{
    justify-self:start!important;
  }

  @media(max-width:760px){
    .np-home-select select{
      padding-left:42px!important;
      padding-right:28px!important;
    }
    #subjectProgress>div{
      height:52px!important;
      min-height:52px!important;
      max-height:52px!important;
      padding:4px 0!important;
      margin:0!important;
    }
    #subjectProgress>div>span,
    #subjectProgress>div>i,
    #subjectProgress>div>strong{
      margin-top:0!important;
      margin-bottom:0!important;
    }
    #subjectProgress>div>span>small{
      top:5px!important;
    }
  }
}


/* Real-device refinement v2: resolve higher-specificity legacy mobile rules. */
@media screen and (max-width:760px){
  main>.np-home-header .np-home-year #yearTop,
  main>.np-home-header .np-home-class #classTop{
    -webkit-appearance:none!important;
    appearance:none!important;
    background-image:none!important;
    padding-left:50px!important;
    padding-right:30px!important;
  }
  main>.np-home-header .np-home-class #classTop{
    padding-left:54px!important;
  }
  main>.np-home-header .np-home-select-icon{
    left:13px!important;
    width:15px!important;
    height:15px!important;
  }
  main>.np-home-header .np-home-class .np-home-select-icon{
    left:14px!important;
  }

  html body [data-page="home"] .np-home-hero>img.npv2-hero-art{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    width:0!important;
    height:0!important;
  }

  #subjectProgress.progress-list{
    gap:0!important;
    margin-top:2px!important;
  }
  #subjectProgress.progress-list>div{
    min-height:58px!important;
    height:58px!important;
    max-height:58px!important;
    padding:4px 0!important;
    gap:4px 8px!important;
    grid-template-columns:minmax(0,1fr) 44px!important;
    grid-template-rows:32px 8px!important;
  }
  #subjectProgress.progress-list>div>span{
    grid-template-columns:28px minmax(0,1fr) auto!important;
    column-gap:7px!important;
  }
  #subjectProgress.progress-list>div>span>.subject-premium-icon,
  #subjectProgress.progress-list .np-home-subject-icon{
    width:28px!important;
    height:28px!important;
    min-width:28px!important;
    flex-basis:28px!important;
    border-radius:9px!important;
  }
  #subjectProgress.progress-list .subject-progress-name{
    font-size:11.5px!important;
    line-height:1.2!important;
  }
  #subjectProgress.progress-list>div>span>small{
    font-size:9px!important;
    position:static!important;
    align-self:center!important;
  }
  #subjectProgress.progress-list>div>i{
    height:6px!important;
  }
  #subjectProgress.progress-list>div>strong{
    font-size:9px!important;
    align-self:center!important;
    padding:0!important;
  }
}


/* Home closeout: slightly denser hero, no ad placeholder reserved. */
@media screen and (max-width:760px){
  [data-page="home"] .np-home-hero{
    min-height:134px!important;
    padding:13px 15px!important;
    grid-template-columns:76px minmax(0,1fr)!important;
    gap:4px 9px!important;
  }
  [data-page="home"] .np-home-hero h1{
    font-size:24px!important;
    margin:3px 0 5px!important;
  }
  [data-page="home"] .np-home-hero p{
    font-size:10.5px!important;
    line-height:1.4!important;
  }
  [data-page="home"] .np-home-hero .np-home-cta{
    min-height:37px!important;
    padding:7px 13px!important;
  }
  [data-page="home"] .np-home-hero-art{
    width:72px!important;
    height:80px!important;
  }
  [data-page="home"] .np-home-hero-art svg:nth-child(1){
    width:58px!important;
    height:58px!important;
  }
  [data-page="home"] .np-home-hero-art svg:nth-child(2){
    width:31px!important;
    height:31px!important;
  }
}
