/* VidyutLearn PC6.1 — professional reading chrome
   Purpose: make learning controls visually consistent while returning vertical
   space to the lesson. Desktop chrome is compact; touch targets stay generous
   on tablet/mobile. Loaded last so it can safely normalise the legacy cascade. */

@media (min-width:960px){
  body.student-study-active .app-header .header-main,
  body.course-home-active .app-header .header-main{
    min-height:56px!important;
    padding:3px clamp(18px,2vw,30px)!important;
  }
  body.student-study-active .app-header .brand,
  body.course-home-active .app-header .brand{gap:9px!important;}
  body.student-study-active .app-header .brand-emblem,
  body.course-home-active .app-header .brand-emblem{
    width:44px!important;height:44px!important;flex:0 0 44px!important;
  }
  body.student-study-active .app-header .brand-icon,
  body.course-home-active .app-header .brand-icon{width:44px!important;height:44px!important;}
  body.student-study-active .app-header h1,
  body.course-home-active .app-header h1{font-size:1.28rem!important;}
  body.student-study-active .app-header .brand-title-row,
  body.course-home-active .app-header .brand-title-row{gap:13px!important;flex-wrap:nowrap!important;}
  body.student-study-active .app-header .brand-subjects,
  body.course-home-active .app-header .brand-subjects{font-size:.67rem!important;}
  body.student-study-active .header-learning-guide-link,
  body.course-home-active .header-learning-guide-link{
    margin-left:auto!important;
    min-height:32px!important;
    padding:4px 0!important;
    font-size:.69rem!important;
  }

  body.student-study-active .study-context-bar,
  body.course-home-active .study-context-bar{
    grid-template-columns:minmax(600px,.98fr) minmax(430px,1.02fr)!important;
    min-height:54px!important;
  }
  body.student-study-active .course-book-strip,
  body.course-home-active .course-book-strip{
    min-height:54px!important;
    padding:6px 14px 6px clamp(18px,2vw,30px)!important;
  }
  body.student-study-active .course-book-stack,
  body.course-home-active .course-book-stack{
    display:flex!important;
    align-items:center!important;
    gap:12px!important;
    min-width:0;
  }
  body.student-study-active .course-book-identity,
  body.course-home-active .course-book-identity{
    flex:1 1 auto!important;
    min-width:220px!important;
    gap:8px!important;
  }
  body.student-study-active .course-class-label,
  body.course-home-active .course-class-label{
    min-height:28px!important;
    padding:4px 9px!important;
    border-radius:999px!important;
    white-space:nowrap!important;
    font-size:.68rem!important;
  }
  body.student-study-active .course-book-copy,
  body.course-home-active .course-book-copy{
    width:auto!important;
    min-width:0!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    gap:7px!important;
  }
  body.student-study-active .course-book-copy>span,
  body.course-home-active .course-book-copy>span{font-size:.65rem!important;}
  body.student-study-active .course-book-copy strong,
  body.course-home-active .course-book-copy strong{font-size:.76rem!important;}

  body.student-study-active .course-book-actions,
  body.course-home-active .course-book-actions{
    flex:0 0 auto!important;
    display:flex!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    min-height:32px!important;
  }
  body.student-study-active .course-book-actions .ui-action,
  body.course-home-active .course-book-actions .ui-action,
  body.student-study-active .course-book-actions .ui-external-link,
  body.course-home-active .course-book-actions .ui-external-link,
  body.student-study-active .course-book-actions .learning-tab,
  body.course-home-active .course-book-actions .learning-tab{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:32px!important;
    height:32px!important;
    box-sizing:border-box!important;
    margin:0!important;
    padding:5px 10px!important;
    border:1px solid rgba(239,191,98,.40)!important;
    border-radius:8px!important;
    background:rgba(255,255,255,.055)!important;
    box-shadow:none!important;
    color:#f5d58c!important;
    font:750 .68rem/1 var(--font-ui)!important;
    text-decoration:none!important;
    white-space:nowrap!important;
    transform:none!important;
  }
  body.student-study-active .course-book-actions .ui-action:hover:not(:disabled),
  body.course-home-active .course-book-actions .ui-action:hover:not(:disabled),
  body.student-study-active .course-book-actions .ui-external-link:hover,
  body.course-home-active .course-book-actions .ui-external-link:hover,
  body.student-study-active .course-book-actions .learning-tab:hover:not(:disabled),
  body.course-home-active .course-book-actions .learning-tab:hover:not(:disabled){
    background:rgba(232,163,61,.16)!important;
    border-color:#efbf62!important;
    color:#fff7e4!important;
  }
  body.student-study-active .course-book-actions .subject-textbook-links,
  body.course-home-active .course-book-actions .subject-textbook-links{gap:6px!important;flex-wrap:nowrap!important;}
  body.student-study-active .course-book-actions .subject-textbook-link,
  body.course-home-active .course-book-actions .subject-textbook-link{font-size:.68rem!important;}
  body.student-study-active .course-book-actions .learning-tabs,
  body.course-home-active .course-book-actions .learning-tabs{
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
    grid-template-columns:none!important;
    margin:0!important;
    border:0!important;
  }
  body.student-study-active .course-book-actions .learning-tabs[hidden],
  body.course-home-active .course-book-actions .learning-tabs[hidden]{display:none!important;}
  body.student-study-active .course-book-actions .learning-tab,
  body.course-home-active .course-book-actions .learning-tab{min-width:66px!important;}
  body.student-study-active .course-book-actions .learning-tab.active,
  body.student-study-active .course-book-actions .learning-tab[aria-selected="true"],
  body.course-home-active .course-book-actions .learning-tab.active,
  body.course-home-active .course-book-actions .learning-tab[aria-selected="true"]{
    background:#f0c46d!important;
    border-color:#f0c46d!important;
    color:#173f34!important;
  }

  body.student-study-active .breadcrumb,
  body.course-home-active .breadcrumb{
    min-height:54px!important;
    padding:6px 18px!important;
  }
  body.student-study-active .study-context,
  body.course-home-active .study-context{gap:14px!important;align-items:center!important;}
  body.student-study-active .subject-course-field,
  body.course-home-active .subject-course-field{flex:0 0 clamp(190px,16vw,240px)!important;gap:3px!important;}
  body.student-study-active .subject-course-field>span,
  body.course-home-active .subject-course-field>span,
  body.student-study-active .study-context-label,
  body.course-home-active .study-context-label{font-size:.57rem!important;line-height:1!important;}
  body.student-study-active .subject-course-field select,
  body.course-home-active .subject-course-field select{
    min-height:32px!important;
    height:32px!important;
    padding:4px 28px 4px 10px!important;
    border-radius:8px!important;
    font-size:.7rem!important;
  }
  body.student-study-active .study-topic-wrap,
  body.course-home-active .study-topic-wrap{gap:3px!important;}
  body.student-study-active .breadcrumb .tag,
  body.course-home-active .breadcrumb .tag{font-size:.76rem!important;line-height:1.2!important;}

  body.student-study-active #chat{padding-top:8px!important;padding-bottom:28px!important;}
  body.student-study-active .book-learning-card,
  body.student-study-active .chapter-opening-card,
  body.student-study-active .source-only-chapter-card{margin-top:12px!important;}
  body.student-study-active .curriculum-sidebar-head,
  body.course-home-active .curriculum-sidebar-head{padding:13px 16px 10px!important;}
}

@media (min-width:960px) and (max-width:1280px){
  body.student-study-active .study-context-bar,
  body.course-home-active .study-context-bar{grid-template-columns:minmax(540px,1fr) minmax(380px,.82fr)!important;}
  body.student-study-active .course-book-stack,
  body.course-home-active .course-book-stack{gap:8px!important;}
  body.student-study-active .course-book-copy strong,
  body.course-home-active .course-book-copy strong{max-width:210px!important;}
  body.student-study-active .course-book-actions .ui-action,
  body.course-home-active .course-book-actions .ui-action,
  body.student-study-active .course-book-actions .ui-external-link,
  body.course-home-active .course-book-actions .ui-external-link,
  body.student-study-active .course-book-actions .learning-tab,
  body.course-home-active .course-book-actions .learning-tab{padding-left:8px!important;padding-right:8px!important;}
}

@media (max-width:959px){
  body.student-study-active .course-book-actions,
  body.course-home-active .course-book-actions{gap:7px!important;}
  body.student-study-active .course-book-actions .ui-action,
  body.course-home-active .course-book-actions .ui-action,
  body.student-study-active .course-book-actions .learning-tab,
  body.course-home-active .course-book-actions .learning-tab{min-height:44px!important;border-radius:9px!important;}
  body.student-study-active .course-book-actions .ui-external-link,
  body.course-home-active .course-book-actions .ui-external-link{
    min-height:44px!important;
    padding:8px 10px!important;
    border:1px solid #d9d0c0!important;
    border-radius:9px!important;
    background:#f4efe5!important;
    text-decoration:none!important;
  }
}

@media (min-width:960px) and (max-width:1199px){
  body.student-study-active .study-context-bar,
  body.course-home-active .study-context-bar{min-height:64px!important;}
  body.student-study-active .course-book-strip,
  body.course-home-active .course-book-strip{min-height:64px!important;padding-top:5px!important;padding-bottom:5px!important;}
  body.student-study-active .course-book-stack,
  body.course-home-active .course-book-stack{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:3px!important;}
  body.student-study-active .course-book-identity,
  body.course-home-active .course-book-identity{min-width:0!important;}
  body.student-study-active .course-book-copy strong,
  body.course-home-active .course-book-copy strong{max-width:none!important;}
  body.student-study-active .course-book-actions,
  body.course-home-active .course-book-actions{min-height:30px!important;}
  body.student-study-active .course-book-actions .ui-action,
  body.course-home-active .course-book-actions .ui-action,
  body.student-study-active .course-book-actions .ui-external-link,
  body.course-home-active .course-book-actions .ui-external-link,
  body.student-study-active .course-book-actions .learning-tab,
  body.course-home-active .course-book-actions .learning-tab{height:30px!important;min-height:30px!important;font-size:.64rem!important;}
  body.student-study-active .breadcrumb,
  body.course-home-active .breadcrumb{min-height:64px!important;}
}

/* PC6.12 learner context hierarchy. */
@media (min-width:960px){
  body.student-study-active .study-context-bar,
  body.course-home-active .study-context-bar{
    display:flex!important;
    flex-direction:column!important;
    min-height:0!important;
    background:#15382f!important;
  }
  body.student-study-active .course-book-strip,
  body.course-home-active .course-book-strip{
    width:100%!important;
    min-height:46px!important;
    padding:5px clamp(18px,2vw,30px)!important;
    border-right:0!important;
    border-bottom:1px solid rgba(255,255,255,.13)!important;
    box-sizing:border-box!important;
  }
  body.student-study-active .course-book-stack,
  body.course-home-active .course-book-stack{
    display:flex!important;
    align-items:center!important;
    width:100%!important;
    gap:10px!important;
  }
  body.student-study-active .course-book-identity,
  body.course-home-active .course-book-identity{
    display:flex!important;
    align-items:center!important;
    flex:0 1 auto!important;
    min-width:0!important;
    gap:10px!important;
  }
  body.student-study-active .course-class-label,
  body.course-home-active .course-class-label{
    display:inline-flex!important;
    flex:0 0 auto!important;
    min-height:32px!important;
    padding:5px 10px!important;
    background:#f5ecd8!important;
    color:#15382f!important;
    font-size:.69rem!important;
    cursor:default!important;
  }
  body.student-study-active .course-book-identity .learner-subject-field,
  body.course-home-active .course-book-identity .learner-subject-field{
    display:grid!important;
    flex:0 1 clamp(220px,22vw,330px)!important;
    width:clamp(220px,22vw,330px)!important;
    gap:2px!important;
  }
  body.student-study-active .course-book-identity .learner-subject-field>span,
  body.course-home-active .course-book-identity .learner-subject-field>span{
    color:#d8bd81!important;
    font-size:.53rem!important;
  }
  body.student-study-active .course-book-identity .learner-subject-field select,
  body.course-home-active .course-book-identity .learner-subject-field select{
    width:100%!important;
    min-height:31px!important;
    height:31px!important;
    padding:4px 30px 4px 10px!important;
    border:1px solid rgba(239,191,98,.46)!important;
    border-radius:8px!important;
    background:#fbf7ec!important;
    color:#15382f!important;
    font:750 .7rem/1.2 var(--font-ui)!important;
  }
  body.student-study-active .course-book-actions,
  body.course-home-active .course-book-actions{
    margin-left:auto!important;
    min-width:0!important;
  }

  body.student-study-active .breadcrumb,
  body.course-home-active .breadcrumb{
    width:100%!important;
    min-height:36px!important;
    padding:4px clamp(18px,2vw,30px)!important;
    background:#f7f3e9!important;
    border-bottom:1px solid #d9d1c3!important;
    box-sizing:border-box!important;
  }
  body.student-study-active .study-context,
  body.course-home-active .study-context{
    display:grid!important;
    grid-template-columns:minmax(320px,.82fr) minmax(0,1.18fr) auto!important;
    align-items:center!important;
    width:100%!important;
    gap:18px!important;
  }
  body.student-study-active .study-context>.course-book-copy,
  body.course-home-active .study-context>.course-book-copy{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:center!important;
    gap:7px!important;
    min-width:0!important;
    width:auto!important;
  }
  body.student-study-active .study-context>.course-book-copy>span,
  body.course-home-active .study-context>.course-book-copy>span,
  body.student-study-active .study-context .study-context-label,
  body.course-home-active .study-context .study-context-label{
    color:#8b7448!important;
    font-size:.55rem!important;
  }
  body.student-study-active .study-context>.course-book-copy strong,
  body.course-home-active .study-context>.course-book-copy strong{
    min-width:0!important;
    max-width:none!important;
    color:#23483d!important;
    font-size:.75rem!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.student-study-active .study-topic-wrap,
  body.course-home-active .study-topic-wrap{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:center!important;
    gap:7px!important;
    min-width:0!important;
  }
  body.student-study-active .breadcrumb .tag,
  body.course-home-active .breadcrumb .tag{
    color:#173f34!important;
    font-size:.76rem!important;
    font-weight:760!important;
  }
}

@media (max-width:959px){
  body.student-study-active .study-context-bar,
  body.course-home-active .study-context-bar{
    display:flex!important;
    flex-direction:column!important;
    background:#15382f!important;
  }
  body.student-study-active .course-book-strip,
  body.course-home-active .course-book-strip{
    width:100%!important;
    padding:8px 10px!important;
    border:0!important;
    border-bottom:1px solid rgba(255,255,255,.13)!important;
  }
  body.student-study-active .course-book-stack,
  body.course-home-active .course-book-stack{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    gap:8px!important;
  }
  body.student-study-active .course-book-identity,
  body.course-home-active .course-book-identity{
    display:flex!important;
    align-items:center!important;
    width:100%!important;
    gap:8px!important;
  }
  body.student-study-active .course-class-label,
  body.course-home-active .course-class-label{
    display:inline-flex!important;
    flex:0 0 auto!important;
    min-height:36px!important;
    background:#f5ecd8!important;
    color:#15382f!important;
  }
  body.student-study-active .course-book-identity .learner-subject-field,
  body.course-home-active .course-book-identity .learner-subject-field{
    display:grid!important;
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    gap:2px!important;
  }
  body.student-study-active .course-book-identity .learner-subject-field>span,
  body.course-home-active .course-book-identity .learner-subject-field>span{color:#d8bd81!important;}
  body.student-study-active .course-book-identity .learner-subject-field select,
  body.course-home-active .course-book-identity .learner-subject-field select{
    width:100%!important;
    min-height:44px!important;
    background:#fbf7ec!important;
    color:#15382f!important;
  }
  body.student-study-active .course-book-actions,
  body.course-home-active .course-book-actions{
    width:100%!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    padding-bottom:1px!important;
    scrollbar-width:none!important;
  }
  body.student-study-active .course-book-actions::-webkit-scrollbar,
  body.course-home-active .course-book-actions::-webkit-scrollbar{display:none!important;}
  body.student-study-active .breadcrumb,
  body.course-home-active .breadcrumb{
    width:100%!important;
    padding:7px 10px!important;
    background:#f7f3e9!important;
    border-bottom:1px solid #d9d1c3!important;
  }
  body.student-study-active .study-context,
  body.course-home-active .study-context{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:5px!important;
    width:100%!important;
  }
  body.student-study-active .study-context>.course-book-copy,
  body.course-home-active .study-context>.course-book-copy,
  body.student-study-active .study-topic-wrap,
  body.course-home-active .study-topic-wrap{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:center!important;
    gap:7px!important;
    min-width:0!important;
  }
  body.student-study-active .study-context>.course-book-copy>span,
  body.course-home-active .study-context>.course-book-copy>span,
  body.student-study-active .study-context .study-context-label,
  body.course-home-active .study-context .study-context-label{color:#8b7448!important;}
  body.student-study-active .study-context>.course-book-copy strong,
  body.course-home-active .study-context>.course-book-copy strong,
  body.student-study-active .breadcrumb .tag,
  body.course-home-active .breadcrumb .tag{color:#173f34!important;}
}

/* PC6.13 compact learner toolbar: one row only. */
body.student-study-active .study-context-bar,
body.course-home-active .study-context-bar{
  display:block!important;
  min-height:0!important;
  background:#15382f!important;
}
body.student-study-active .breadcrumb,
body.course-home-active .breadcrumb{
  display:none!important;
}
body.student-study-active .course-book-strip,
body.course-home-active .course-book-strip{
  width:100%!important;
  min-height:54px!important;
  padding:7px clamp(18px,2vw,30px)!important;
  border:0!important;
  box-sizing:border-box!important;
}
body.student-study-active .course-book-stack,
body.course-home-active .course-book-stack{
  display:flex!important;
  align-items:center!important;
  width:100%!important;
  gap:12px!important;
}
body.student-study-active .course-book-identity,
body.course-home-active .course-book-identity{
  display:flex!important;
  align-items:center!important;
  flex:1 1 auto!important;
  min-width:0!important;
  gap:12px!important;
}
body.student-study-active .course-book-copy,
body.course-home-active .course-book-copy,
body.student-study-active .course-path-field,
body.course-home-active .course-path-field,
body.student-study-active .subject-group-field,
body.course-home-active .subject-group-field{
  display:none!important;
}
body.student-study-active .learner-subject-field,
body.course-home-active .learner-subject-field{
  display:block!important;
  flex:0 1 clamp(230px,22vw,340px)!important;
  width:clamp(230px,22vw,340px)!important;
  min-width:180px!important;
  margin:0!important;
}
body.student-study-active .learner-subject-field>.learner-subject-label,
body.course-home-active .learner-subject-field>.learner-subject-label{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
body.student-study-active .learner-subject-field select,
body.course-home-active .learner-subject-field select{
  width:100%!important;
  min-height:40px!important;
  height:40px!important;
  margin:0!important;
  padding:6px 34px 6px 12px!important;
  border:1px solid rgba(239,191,98,.52)!important;
  border-radius:9px!important;
  background:#fbf7ec!important;
  color:#15382f!important;
  font:750 .75rem/1.2 var(--font-ui)!important;
}
body.student-study-active .course-book-actions,
body.course-home-active .course-book-actions{
  margin-left:auto!important;
  flex:0 0 auto!important;
}
body.student-study-active .curriculum-sidebar-kicker,
body.course-home-active .curriculum-sidebar-kicker{
  display:none!important;
}
@media (max-width:959px){
  body.student-study-active .course-book-stack,
  body.course-home-active .course-book-stack{flex-wrap:wrap!important;}
  body.student-study-active .course-book-identity,
  body.course-home-active .course-book-identity{width:100%!important;}
  body.student-study-active .learner-subject-field,
  body.course-home-active .learner-subject-field{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
  }
  body.student-study-active .learner-subject-field select,
  body.course-home-active .learner-subject-field select{
    min-height:44px!important;
    height:44px!important;
  }
  body.student-study-active .course-book-actions,
  body.course-home-active .course-book-actions{
    width:100%!important;
    overflow-x:auto!important;
    scrollbar-width:none!important;
  }
  body.student-study-active .course-book-actions::-webkit-scrollbar,
  body.course-home-active .course-book-actions::-webkit-scrollbar{display:none!important;}
}

/* PC6.14 mobile reading flow: the document itself scrolls.
   The desktop shell intentionally uses internal panes, but on phones/tablets that
   pattern traps the lesson between a fixed-height flex shell and the footer.
   Let the browser own vertical scrolling so every page, key-point card, example,
   question and footer remains reachable with normal touch gestures. */
@media (max-width:959px){
  html{height:auto!important;min-height:100%;overflow-y:auto!important;}
  body{
    height:auto!important;
    min-height:100dvh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
  }
  body.student-study-active .study-shell,
  body.course-home-active .study-shell{
    display:block!important;
    flex:0 0 auto!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
  body.student-study-active .learning-workspace,
  body.course-home-active .learning-workspace{
    display:block!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
  body.student-study-active .learning-workspace .page-wrap,
  body.course-home-active .learning-workspace .page-wrap{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    padding-bottom:24px!important;
  }
  body.student-study-active .learning-workspace #chat,
  body.course-home-active .learning-workspace #chat{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    overscroll-behavior:auto!important;
    scrollbar-gutter:auto!important;
  }
  .app-footer{
    position:relative!important;
    inset:auto!important;
    flex:0 0 auto!important;
    width:100%!important;
  }
}
/* vidyutlearn-initial-welcome-styles */
/* Welcome-screen supporting dialogs: parent access, disclaimer, feedback. */
.onboarding-family-footer.welcome-link-bar{
  margin-top:16px !important;
  padding-top:14px !important;
  border-top:1px solid color-mix(in srgb,currentColor 13%,transparent);
  /* Centred as one group, not as three equal columns.

     Three equal-width cells each centre their own label, which centres the
     columns rather than the text: "Parents & teachers" carries about twice the
     ink of "Feedback", so the row's visible centre sat 14px to the left of the
     card's. Laying the links out in a centred flex row makes the gaps between
     them equal instead of the cells, and the ink lands on the card's centre. */
  display:flex !important;
  /* Stated explicitly: a narrow-screen rule elsewhere sets this footer to a
     column, which was inert while this bar was a grid and would stack the
     links the moment it became a flex row. */
  flex-direction:row !important;
  justify-content:center !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:12px 22px !important;
  width:100%;
  font-size:.84rem;
  line-height:1.35;
}
.welcome-link-bar .welcome-meta-link{
  appearance:none;
  border:0 !important;
  padding:4px 2px !important;
  margin:0 !important;
  /* Sized to its own label, so the row centres on the text rather than on
     three equal cells. */
  width:auto !important;
  flex:0 0 auto !important;
  min-width:0 !important;
  min-height:32px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  place-self:auto !important;
  position:static !important;
  background:transparent !important;
  color:inherit !important;
  font:inherit !important;
  font-weight:500 !important;
  line-height:1.35 !important;
  text-align:center !important;
  text-decoration:underline;
  text-underline-offset:3px;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:none !important;
  transform:none !important;
}
.welcome-link-bar #onboardingAdultBtn{order:1 !important;}
.welcome-link-bar #welcomeDisclaimerBtn{order:2 !important;}
.welcome-link-bar #welcomeFeedbackBtn{order:3 !important;}
.welcome-link-bar .welcome-meta-link:hover,
.welcome-link-bar .welcome-meta-link:focus-visible{
  text-decoration-thickness:2px;
}

.family-password-modal{
  width:min(92vw,540px);
  max-height:min(86vh,700px);
  overflow:auto;
  border-radius:18px;
  background:var(--surface,#fffdf8);
  color:var(--text,#17312b);
  box-shadow:0 20px 55px rgba(8,35,29,.22);
}
.family-password-modal .modal-head{
  padding:16px 20px;
  background:#123f35;
  color:#fffdf8;
  border-bottom:2px solid #e4a33a;
}
.family-password-modal .modal-head h2{
  margin:0;
  color:inherit;
  font-size:1.08rem;
  line-height:1.25;
}
.family-password-modal .close-x{color:inherit !important;opacity:.92;}
.family-password-modal .family-password-copy{
  margin:0;
  padding:16px 20px 4px;
  line-height:1.5;
  color:var(--muted,#59645f);
}
.family-password-modal .family-password-form{
  display:grid;
  gap:14px;
  padding:10px 20px 20px;
}
.family-password-modal .family-password-form label{display:grid;gap:6px;}
.family-password-modal .family-password-form label>span{font-weight:650;}
.family-password-modal .family-password-form input{
  box-sizing:border-box;
  width:100%;
  min-height:48px;
  border:1px solid color-mix(in srgb,currentColor 22%,transparent);
  border-radius:10px;
  background:var(--surface,#fff);
  color:inherit;
  font:inherit;
  padding:.68rem .75rem;
}
.family-password-modal .family-password-form .ui-action{width:100%;margin-top:2px;}
.family-password-modal .family-password-status{min-height:1.1rem;}
.family-password-modal .family-password-note{
  margin:2px 0 0;
  font-size:.78rem;
  line-height:1.5;
  color:var(--muted,#59645f);
}

.welcome-support-overlay{z-index:1190;}
.welcome-support-modal{
  width:min(92vw,680px);
  max-height:min(84vh,760px);
  overflow:auto;
  border-radius:18px;
  background:var(--surface,#fffdf8);
  color:var(--text,#17312b);
  box-shadow:0 20px 55px rgba(8,35,29,.22);
}
.welcome-support-modal .modal-head{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 20px;
  background:#123f35;
  color:#fffdf8;
  border-bottom:2px solid #e4a33a;
}
.welcome-support-modal .modal-head h2{
  margin:0;
  color:inherit;
  font-size:1.08rem;
  line-height:1.25;
}
.welcome-support-modal .close-x{
  color:inherit !important;
  opacity:.92;
}
.welcome-dialog-body{
  padding:18px 20px 20px;
  color:var(--text,#17312b);
}
.welcome-dialog-intro{
  margin:0 0 14px;
  line-height:1.55;
  color:var(--muted,#59645f);
}
.disclaimer-grid{display:grid;gap:12px;}
.disclaimer-block{
  padding:14px 15px;
  border:1px solid color-mix(in srgb,currentColor 12%,transparent);
  border-radius:12px;
  background:color-mix(in srgb,currentColor 2.5%,transparent);
}
.disclaimer-block h3{margin:0 0 6px;font-size:.98rem;}
.disclaimer-block p,.disclaimer-block ul{margin:0;line-height:1.55;}
.disclaimer-block ul{padding-left:1.2rem;display:grid;gap:.35rem;}
.disclaimer-authority{
  margin:14px 0 0;
  padding-top:12px;
  border-top:1px solid color-mix(in srgb,currentColor 12%,transparent);
  font-size:.84rem;
  line-height:1.5;
  color:var(--muted,#59645f);
}
/* What the learner is reporting, quoted back to them before they describe it.

   A report form that silently attaches context is asking somebody to trust an
   invisible payload. Showing the question means a learner can see the report
   is about the right one, and a parent can see exactly what is being sent. */
.feedback-subject{
  border:1px solid color-mix(in srgb,currentColor 16%,transparent);
  border-radius:12px;
  padding:12px 14px;
  background:color-mix(in srgb,currentColor 4%,transparent);
}
.feedback-subject-label{margin:0 0 6px;font-size:.78rem;font-weight:650;color:var(--muted,#59645f);}
.feedback-subject blockquote{margin:0;font-weight:600;line-height:1.45;}
.feedback-subject-meta{margin:6px 0 0;font-size:.78rem;color:var(--muted,#59645f);}

.feedback-form{display:grid;gap:14px;}
.feedback-form label{display:grid;gap:6px;font-weight:650;}
.feedback-form select,.feedback-form input,.feedback-form textarea{
  box-sizing:border-box;
  width:100%;
  border:1px solid color-mix(in srgb,currentColor 22%,transparent);
  border-radius:10px;
  background:var(--surface,#fff);
  color:inherit;
  font:inherit;
  padding:.68rem .75rem;
}
.feedback-form textarea{min-height:118px;resize:vertical;line-height:1.5;}
.feedback-form .feedback-optional{font-size:.78rem;font-weight:500;color:var(--muted,#59645f);}
.feedback-turnstile{min-height:68px;display:flex;align-items:center;}
.feedback-status{min-height:1.25rem;margin:0;font-size:.86rem;line-height:1.45;color:var(--muted,#59645f);}
.feedback-status[data-state="error"]{color:#8a2b20;}
.feedback-status[data-state="success"]{color:#155c3d;}
.feedback-submit-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.feedback-privacy-note{margin:0;max-width:31rem;font-size:.78rem;line-height:1.45;color:var(--muted,#59645f);}
.feedback-config-note{padding:10px 12px;border-radius:10px;background:color-mix(in srgb,currentColor 4%,transparent);font-size:.82rem;line-height:1.45;color:var(--muted,#59645f);}

/* Branded first paint. This replaces the unstyled white/cream flash and its
   stray notebook-rule fragment while the learner state is being resolved. */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:90;
  pointer-events:none;
  border:0;
  outline:0;
  background-color:#FBF8F0;
  background-image:
    linear-gradient(rgba(251,248,240,.88),rgba(251,248,240,.88)),
    url('../img/vidyutlearn-logo.png');
  background-repeat:no-repeat,no-repeat;
  background-position:center,center calc(50% - 34px);
  background-size:auto,clamp(150px,22vw,230px) auto;
  opacity:1;
  visibility:visible;
  transition:opacity .18s ease,visibility .18s ease;
  animation:vidyutFirstPaintSafetyHide 0s 6s forwards;
}
body::after{
  content:"विद्या परमो धर्मः";
  position:fixed;
  left:50%;
  top:calc(50% + 86px);
  z-index:91;
  pointer-events:none;
  transform:translateX(-50%);
  border:0;
  color:#754719;
  font-family:"Tiro Devanagari Sanskrit","Noto Serif Devanagari","Kohinoor Devanagari","Nirmala UI","Mangal",serif;
  font-size:clamp(.96rem,1.6vw,1.12rem);
  font-weight:600;
  letter-spacing:0;
  line-height:1.35;
  white-space:nowrap;
  text-rendering:optimizeLegibility;
  font-feature-settings:"liga" 1,"kern" 1;
  text-shadow:0 1px 0 rgba(255,255,255,.82);
  opacity:.92;
  visibility:visible;
  transition:opacity .18s ease,visibility .18s ease;
  animation:vidyutFirstPaintSafetyHide 0s 6s forwards;
}
body.course-home-active::before,
body.course-home-active::after,
body.student-study-active::before,
body.student-study-active::after{
  opacity:0;
  visibility:hidden;
  animation:none;
}

/* The actual first/welcome page carries the same motto directly below the logo. */
.onboarding-mark::after{
  content:"विद्या परमो धर्मः";
  display:block;
  margin-top:8px;
  color:#754719;
  font-family:"Tiro Devanagari Sanskrit","Noto Serif Devanagari","Kohinoor Devanagari","Nirmala UI","Mangal",serif;
  font-size:1rem;
  font-weight:600;
  letter-spacing:0;
  line-height:1.4;
  text-align:center;
  text-rendering:optimizeLegibility;
  font-feature-settings:"liga" 1,"kern" 1;
  text-shadow:0 1px 0 rgba(255,255,255,.82);
}

@keyframes vidyutFirstPaintSafetyHide{
  to{opacity:0;visibility:hidden;}
}

@media(max-width:640px){
  .onboarding-family-footer.welcome-link-bar{flex-direction:row !important;justify-content:center;gap:8px 14px;}
  .welcome-link-bar .welcome-meta-link{font-size:.76rem !important;white-space:normal;}
  .family-password-modal,.welcome-support-modal{width:min(94vw,680px);max-height:88vh;border-radius:15px;}
  .family-password-modal .modal-head,.welcome-support-modal .modal-head{padding:14px 16px;}
  .family-password-modal .family-password-copy{padding:14px 16px 4px;}
  .family-password-modal .family-password-form{padding:10px 16px 18px;}
  .welcome-dialog-body{padding:15px 16px 18px;}
  .feedback-submit-row{align-items:stretch;}
  .feedback-submit-row .ui-action{width:100%;}
  body::before{background-position:center,center calc(50% - 28px);background-size:auto,clamp(135px,46vw,190px) auto;}
  body::after{top:calc(50% + 72px);font-size:.94rem;}
  .onboarding-mark::after{font-size:.92rem;margin-top:7px;}
}

@media(prefers-reduced-motion:reduce){
  body::before,body::after{transition:none;}
}

