/* HOME-REPAIR: restore discoverable navigation and give the score cards their own surface.
   This stylesheet follows practice-home.css and practice-glass.css. It changes presentation only. */
body.nr-site{
  --repair-ink:#174662;
  --repair-muted:#456c82;
  --repair-edge:rgba(62,116,151,.30);
  --repair-frost:rgba(249,253,255,.89);
  --repair-hover:rgba(110,189,222,.19);
}
body.nr-site.dark{
  --repair-ink:#e3f4fc;
  --repair-muted:#b6d3e3;
  --repair-edge:rgba(163,210,233,.31);
  --repair-frost:rgba(20,42,60,.91);
  --repair-hover:rgba(103,184,218,.24);
}

/* The previous dark-header icon colors became invisible when the header turned pale. */
body.nr-site .nr-header .nr-header-actions :is(a,button),
body.nr-site .nr-header .nr-primary-nav :is(a,button){
  color:var(--repair-ink)!important;
}
body.nr-site .nr-header .nr-header-actions :is(a,button){
  border:1px solid var(--repair-edge)!important;
  background:var(--repair-frost)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.72),0 3px 12px rgba(25,75,105,.10)!important;
  backdrop-filter:blur(14px) saturate(1.15);
  -webkit-backdrop-filter:blur(14px) saturate(1.15);
}
body.nr-site.dark .nr-header .nr-header-actions :is(a,button){
  box-shadow:inset 0 1px rgba(255,255,255,.09),0 3px 14px rgba(0,0,0,.18)!important;
}
body.nr-site .nr-header .nr-primary-nav :is(a,button):hover,
body.nr-site .nr-header .nr-primary-nav .nr-current,
body.nr-site .nr-header .nr-header-actions :is(a,button):hover{
  background:var(--repair-hover)!important;
}
body.nr-site .nr-header .nr-primary-nav a[href="/subscription/"]{
  border:1px solid var(--repair-edge)!important;
  background:var(--repair-frost)!important;
  font-weight:750;
}
body.nr-site .nr-header :is(.nr-primary-nav,.nr-header-actions) :is(a,button):focus-visible{
  outline:3px solid #238aba!important;
  outline-offset:2px!important;
}

/* Player keeps its original search and score dimensions. Its existing menu opens over the score. */
body.nr-site.practice-header .nr-header #homeMenu,
body.nr-site.practice-header .nr-header #themeQuick{display:grid!important}
body.nr-site.practice-header .nr-header #homeNav{display:none!important}
body.nr-site.practice-header .nr-header #homeNav.nr-open{
  display:grid!important;
  position:absolute!important;
  inset:calc(100% + 5px) 8px auto auto!important;
  width:min(420px,calc(100vw - 16px))!important;
  max-height:calc(100dvh - 88px);
  overflow:auto;
  z-index:95;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
  padding:10px;
  border:1px solid var(--repair-edge);
  border-radius:18px;
  background:var(--repair-frost)!important;
  box-shadow:0 18px 42px rgba(16,52,78,.24);
  backdrop-filter:blur(22px) saturate(1.2);
  -webkit-backdrop-filter:blur(22px) saturate(1.2);
}
body.nr-site.practice-header .nr-header #homeNav.nr-open :is(a,button){
  display:flex!important;
  justify-content:center;
  align-items:center;
  min-width:0;
  min-height:40px;
  padding:5px 8px;
  white-space:normal;
  text-align:center;
  font-size:12px;
}
body.nr-site.practice-header .nr-header #homeNav.nr-open a[href="/subscription/"]{
  grid-column:1/-1;
}

/* On large, tall player screens the full navigation fits; shorter screens keep the compact menu. */
@media(min-width:1280px) and (min-height:651px){
  body.nr-site.practice-header .nr-header #homeNav,
  body.nr-site.practice-header .nr-header #homeNav.nr-open{
    display:flex!important;
    position:static!important;
    width:auto!important;
    min-width:0;
    flex:0 0 auto;
    gap:1px;
    padding:0;
    border:0;
    background:none!important;
    box-shadow:none;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }
  body.nr-site.practice-header .nr-header #homeNav :is(a,button){
    min-height:38px;
    padding:5px 8px;
    font-size:11px;
  }
  body.nr-site.practice-header .nr-header #homeMenu{display:none!important}
  body.nr-site.practice-header .compact-search{max-width:270px}
}

/* Existing mobile navigation stays in the real header and remains keyboard accessible. */
@media(max-width:767px){
  body.nr-site:not(.practice-header) .nr-header #homeNav.nr-open{
    display:grid!important;
    position:absolute;
    inset:calc(100% + 5px) 8px auto 8px;
    width:auto;
    max-height:calc(100dvh - 95px);
    overflow:auto;
    z-index:95;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:5px;
    padding:10px;
    border:1px solid var(--repair-edge);
    border-radius:18px;
    background:var(--repair-frost)!important;
    box-shadow:0 18px 42px rgba(16,52,78,.24);
    backdrop-filter:blur(22px) saturate(1.2);
    -webkit-backdrop-filter:blur(22px) saturate(1.2);
  }
  body.nr-site:not(.practice-header) .nr-header #homeNav.nr-open :is(a,button){
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:6px 8px;
    white-space:normal;
    text-align:center;
  }
  body.nr-site:not(.practice-header) .nr-header #homeNav.nr-open a[href="/subscription/"]{grid-column:1/-1}
  /* Restore the existing subscription link as a small direct action below the banner. */
  body.nr-home #library .nr-shortcuts .subscription-entry{
    display:flex!important;
    justify-content:flex-start;
    align-items:center;
    min-height:42px;
    margin:2px 0 4px;
    padding:0;
    border:0;
    background:none;
    box-shadow:none;
  }
  body.nr-home #library .nr-shortcuts .subscription-entry h2{display:none!important}
  body.nr-home #library .nr-shortcuts .subscription-entry .academy-entry-link{
    min-height:38px;
    margin:0;
    padding:5px 13px;
    border:1px solid var(--repair-edge);
    border-radius:18px;
    background:var(--repair-frost);
    color:var(--repair-ink);
    box-shadow:0 3px 12px rgba(25,75,105,.08);
  }
}

/* Preserve the photo and controls while making the lower glass panel distinct from the page. */
body.nr-home #library .work-card{
  border-color:var(--repair-edge)!important;
  background:var(--repair-frost)!important;
  box-shadow:0 11px 28px rgba(20,64,97,.16),inset 0 1px rgba(255,255,255,.65)!important;
}
body.nr-home #library .work-card .score-glass{
  border-top:1px solid var(--repair-edge)!important;
  background:rgba(250,253,255,.93)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.9);
}
body.nr-home #library .work-card .score-glass::after{
  background:linear-gradient(140deg,rgba(252,254,255,.92),rgba(227,241,250,.85))!important;
}
body.nr-home #library .work-card .card-actions{
  border-top:1px solid var(--repair-edge)!important;
  background:rgba(250,253,255,.86)!important;
}
body.nr-home.dark #library .work-card{
  box-shadow:0 11px 28px rgba(0,0,0,.30),inset 0 1px rgba(255,255,255,.09)!important;
}
body.nr-home.dark #library .work-card .score-glass{
  background:rgba(20,43,61,.92)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.08);
}
body.nr-home.dark #library .work-card .score-glass::after{
  background:linear-gradient(140deg,rgba(27,57,78,.85),rgba(13,35,54,.93))!important;
}
body.nr-home.dark #library .work-card .card-actions{
  background:rgba(19,45,63,.93)!important;
}

@media(prefers-reduced-motion:reduce){
  body.nr-site .nr-header :is(.nr-primary-nav,.nr-header-actions) :is(a,button){transition:none!important}
}
