/* Student-facing theme. The authenticated admin shell never uses this scope. */
.student-theme{
  --student-bg:var(--student-pc-bg,#16191c);
  --student-ink:var(--student-pc-ink,#f3f4f2);
  --student-muted:var(--student-pc-muted,#b0b2b2);
  --student-surface:var(--student-pc-surface,#23272a);
  --student-raised:var(--student-pc-raised,#2c3033);
  --student-hover:var(--student-pc-hover,#292d30);
  --student-border:var(--student-pc-border,#424649);
  --student-accent:var(--student-pc-accent,#dfbd7c);
  --student-accent-strong:var(--student-pc-accent-strong,#eed5a0);
  --student-header:var(--student-pc-header,#16191cf5);
  --student-gold:var(--student-pc-gold,#dfbd7c);
  --student-gold-hover:var(--student-pc-gold-hover,#eed5a0);
  --student-gold-ink:var(--student-pc-gold-ink,#20262a);
  --student-danger:var(--student-pc-danger,#ffb4aa);
  --student-danger-bg:var(--student-pc-danger-bg,#302727);
  --student-scheme:var(--student-pc-scheme,dark);
  --student-focus:var(--student-accent);
  --cream:var(--student-bg);--paper:var(--student-surface);--ink:var(--student-ink);
  --muted:var(--student-muted);--line:var(--student-border);--orange:var(--student-accent);
  --orange-dark:var(--student-accent-strong);--peach:var(--student-raised);--sage:var(--student-surface);
  --red:var(--student-danger);--shadow:0 14px 36px #0000001f;
  background:var(--student-bg);color:var(--student-ink);color-scheme:var(--student-scheme);
  accent-color:var(--student-accent);
}
.student-theme ::selection{background:var(--student-gold);color:var(--student-gold-ink)}
.student-theme :focus-visible{outline:3px solid var(--student-focus);outline-offset:4px}
.student-theme .skip-link{background:var(--student-gold);color:var(--student-gold-ink)}
.student-theme a,.student-theme button{touch-action:manipulation}
.student-theme .brand,.student-theme .footer-brand{color:var(--student-ink)}
.student-theme .brand-mark{background:linear-gradient(135deg,#eed5a0,#c59d57);color:#20262a}
.student-theme .brand small,.student-theme .eyebrow,.student-theme .muted{color:var(--student-muted)}
.student-theme .button{border-radius:10px}
.student-theme .button-orange,.student-theme .button-dark,.student-theme #account>.button{
  background:var(--student-gold);color:var(--student-gold-ink);border-color:transparent
}
.student-theme .button-orange:hover,.student-theme .button-dark:hover,.student-theme #account>.button:hover{background:var(--student-gold-hover)}
.student-theme .button-light,.student-theme .button-outline{background:var(--student-surface);border-color:var(--student-border);color:var(--student-ink)}
.student-theme .button-light:hover,.student-theme .button-outline:hover{background:var(--student-hover);border-color:var(--student-accent)}
.student-theme .button-danger{background:var(--student-danger-bg);color:var(--student-danger);border-color:var(--student-danger)}
.student-theme .text-link:hover,.student-theme .subtle-button:hover,.student-theme .back-link:hover{color:var(--student-accent-strong)}
.student-theme .icon-button:hover{background:var(--student-hover)}
.student-theme .site-header{background:var(--student-header);border-color:var(--student-border)}
.student-theme .desktop-nav>a{color:var(--student-muted)}
.student-theme .desktop-nav>a.active{color:var(--student-accent-strong)}
.student-theme .desktop-nav>a.active:after{background:var(--student-accent)}
.student-theme .account-trigger{color:var(--student-ink)}
.student-theme .avatar{color:var(--student-gold-ink);background:var(--student-gold)}
.student-theme .account-menu{background:var(--student-raised);color:var(--student-ink);border-color:var(--student-border);box-shadow:0 12px 40px #0004}
.student-theme .account-menu>a:hover,.student-theme .account-menu>button:hover{background:var(--student-hover)}
.student-theme .account-menu .account-name{color:var(--student-muted);border-color:var(--student-border)}
.student-theme:not(.homepage-dark) .home-header-search{display:flex;width:190px;align-items:center;gap:9px;border:1px solid var(--student-border);background:var(--student-surface);border-radius:30px;padding:8px 14px}
.student-theme:not(.homepage-dark) .home-header-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--student-ink);font-size:12px}
.student-theme .home-header-search input::placeholder{color:var(--student-muted)}
.student-theme .home-header-search:focus-within,.student-theme .search-box:focus-within{border-color:var(--student-accent);outline:2px solid var(--student-accent);outline-offset:2px}
.student-theme:not(.homepage-dark) #focus-search{display:none}
.student-theme .section-heading>.text-link,.student-theme .section-heading p,.student-theme .breadcrumbs,.student-theme .results-bar p{color:var(--student-muted)}
.student-theme .breadcrumbs a:hover{color:var(--student-accent-strong)}
.student-theme .search-box{background:var(--student-surface);border-color:var(--student-border)}
.student-theme .search-box input{color:var(--student-ink)}
.student-theme .search-box .icon,.student-theme .search-box input::placeholder{color:var(--student-muted)}
.student-theme .category-list{border-color:var(--student-border)}
.student-theme .category-chip{color:var(--student-muted);border-color:var(--student-border)}
.student-theme .category-chip:hover{background:var(--student-hover);color:var(--student-ink)}
.student-theme .category-chip.active{background:var(--student-gold);border-color:transparent;color:var(--student-gold-ink)}
.student-theme .filter-link{color:var(--student-muted)}
.student-theme .filter-link.active{color:var(--student-accent-strong)}
.student-theme .course-card{background:var(--student-surface);border-color:var(--student-border)}
.student-theme .course-card h3{color:var(--student-ink)}
.student-theme .course-cover,.student-theme .cover-placeholder{background:linear-gradient(135deg,var(--student-raised),var(--student-surface));color:var(--student-accent)}
.student-theme .cover-placeholder:before,.student-theme .cover-placeholder:after{border-color:var(--student-border)}
.student-theme .card-category,.student-theme .course-description,.student-theme .card-meta{color:var(--student-muted)}
.student-theme .card-meta{border-color:var(--student-border)}
.student-theme .card-meta a{color:var(--student-accent-strong)}
.student-theme .card-favorite{background:var(--student-raised);color:var(--student-muted);border:1px solid var(--student-border)}
.student-theme .card-favorite.active{color:var(--student-accent-strong)}
.student-theme .card-favorite.active .icon{fill:var(--student-surface)}
.student-theme .course-badge,.student-theme .course-badge.paid,.student-theme .pill,.student-theme .pill-free{background:var(--student-raised);color:var(--student-accent-strong);border:1px solid var(--student-border)}
.student-theme .progress-line{background:var(--student-border)}
.student-theme .progress-line>span{background:var(--student-accent)}
.student-theme .tab-list{border-color:var(--student-border)}
.student-theme .tab-list button{color:var(--student-muted)}
.student-theme .tab-list button.active{color:var(--student-accent-strong);border-color:var(--student-accent)}
.student-theme .course-intro,.student-theme .course-additional{background:var(--student-surface);border:1px solid var(--student-border)}
.student-theme .course-intro-copy>p,.student-theme .course-intro-meta{color:var(--student-muted)}
.student-theme .course-additional a{color:var(--student-accent-strong)}
.student-theme .course-directory,.student-theme .lesson-content,.student-theme .lesson-sidebar{background:var(--student-surface);border-color:var(--student-border)}
.student-theme .directory-section-heading p,.student-theme .directory-title>p{color:var(--student-muted)}
.student-theme .unit-menu-card{background:var(--student-raised);border-color:var(--student-border);color:var(--student-ink)}
.student-theme .unit-menu-card:hover{background:var(--student-hover);border-color:var(--student-accent)}
.student-theme .unit-menu-icon{background:var(--student-surface);color:var(--student-accent)}
.student-theme .unit-menu-copy small,.student-theme .unit-menu-card>.icon,.student-theme .lesson-row-status,.student-theme .lesson-row.completed .lesson-row-status{color:var(--student-muted)}
.student-theme .lesson-sidebar-head{border-color:var(--student-border)}
.student-theme .lesson-sidebar-head span{color:var(--student-muted)}
.student-theme .lesson-list{scrollbar-color:var(--student-border) transparent}
.student-theme .unit-group>summary{background:var(--student-raised)}
.student-theme .lesson-row{border-color:var(--student-border);color:var(--student-ink)}
.student-theme .lesson-row:hover{background:var(--student-hover)}
.student-theme .lesson-row.active{background:var(--student-raised);color:var(--student-accent-strong);box-shadow:inset 3px 0 var(--student-accent)}
.student-theme .lesson-row .lesson-order,.student-theme .lesson-row>.icon,.student-theme .lesson-row.completed>.icon{color:var(--student-muted)}
.student-theme .lesson-row.active .lesson-order,.student-theme .lesson-row.active>.icon{color:var(--student-accent-strong)}
.student-theme .lesson-heading p{color:var(--student-muted)}
.student-theme .lesson-actions{border-color:var(--student-border)}
.student-theme .lesson-body a{color:var(--student-accent-strong)}
.student-theme .lesson-body td,.student-theme .lesson-body th{border-color:var(--student-border)}
.student-theme .lesson-body th,.student-theme .lesson-body pre,.student-theme .lesson-body blockquote{background:var(--student-raised)}
.student-theme .lesson-body pre{padding:14px;border:1px solid var(--student-border);border-radius:8px}
.student-theme .lesson-body blockquote{border-left:3px solid var(--student-accent);margin:14px 0;padding:12px 18px}
.student-theme .lesson-preview-image:hover{box-shadow:0 0 0 3px var(--student-accent)}
.student-theme .lesson-preview-image:focus-visible{outline-color:var(--student-focus)}
.student-theme .track-button{background:var(--student-surface);color:var(--student-ink);border-color:var(--student-border)}
.student-theme .track-button:hover{border-color:var(--student-accent)}
.student-theme .track-button.active{background:var(--student-gold);color:var(--student-gold-ink);border-color:transparent}
/* Media controls keep a stable dark surface even when the page color is light. */
.student-theme .player-shell,.student-theme .player-shell video,.student-theme .player-shell iframe{background:#121619;color:#f3f4f2;color-scheme:dark}
.student-theme .audio-stage{background:radial-gradient(ellipse at 50% 30%,#34352f,#181b1e 75%);color:#f3f4f2}
.student-theme .audio-disc{background:repeating-radial-gradient(#252a2d 0 2px,#3b3f40 3px 4px);border-color:#68665b}
.student-theme .audio-disc>.icon{color:#dfbd7c}
.student-theme .audio-progress-player{background:linear-gradient(120deg,#24282b,#171b1d);color:#f3f4f2;color-scheme:dark;border:1px solid #4a4a43}
.student-theme .audio-track-icon{background:#dfbd7c12;color:#dfbd7c}
.student-theme .audio-track-heading .eyebrow{color:#c6c7bd}
.student-theme .audio-toggle{background:#dfbd7c;color:#20262a}
.student-theme .audio-toggle:hover{background:#eed5a0}
.student-theme .audio-toggle:focus-visible{outline-color:#eed5a0}
.student-theme .audio-seek::-webkit-slider-runnable-track{background:linear-gradient(to right,#dfbd7c 0 var(--audio-progress),#727571 var(--audio-progress) 100%)}
.student-theme .audio-seek::-moz-range-track{background:linear-gradient(to right,#dfbd7c 0 var(--audio-progress),#727571 var(--audio-progress) 100%)}
.student-theme .audio-seek::-webkit-slider-thumb{background:#dfbd7c;border-color:#fff7e8}
.student-theme .audio-seek::-moz-range-thumb{background:#dfbd7c;border-color:#fff7e8}
.student-theme .audio-times,.student-theme .audio-progress-player .audio-status{color:#d4d5ca}
.student-theme .player-placeholder{color:#d4d5ca}
.student-theme .player-placeholder>.icon{color:#dfbd7c}
.student-theme .player-placeholder h3{color:#f3f4f2}
.student-theme .external-player-link{color:#d4d5ca}
.student-theme .external-player-link a:hover{color:#eed5a0}
.student-theme .player-error{background:var(--student-danger-bg);color:var(--student-danger)}
.student-theme .empty-state,.student-theme .accompaniment-empty{background:var(--student-surface);border-color:var(--student-border)}
.student-theme .empty-icon,.student-theme .accompaniment-art,.student-theme .catalog-card .accompaniment-art{background:var(--student-raised);color:var(--student-accent)}
.student-theme .empty-state p,.student-theme .accompaniment-empty p,.student-theme .accompaniment-card p,.student-theme .catalog-card p,.student-theme .catalog-more{color:var(--student-muted)}
.student-theme .accompaniment-empty>.icon{color:var(--student-accent)}
.student-theme .accompaniment-card,.student-theme .accompaniment-card:nth-child(3n+2),.student-theme .accompaniment-card:nth-child(3n),.student-theme .catalog-card{background:var(--student-surface);border:1px solid var(--student-border)}
.student-theme .loading-panel{background:var(--student-surface);border-color:var(--student-border);color:var(--student-muted)}
.student-theme .error-panel,.student-theme .form-error{background:var(--student-danger-bg);border-color:var(--student-danger);color:var(--student-danger)}
.student-theme .error-panel p{color:var(--student-danger)}
.student-theme .form-input{background:var(--student-raised);color:var(--student-ink);border-color:var(--student-border);color-scheme:var(--student-scheme)}
.student-theme .form-input::placeholder{color:var(--student-muted);opacity:1}
.student-theme .form-input:focus{border-color:var(--student-accent);outline:2px solid var(--student-accent);outline-offset:2px}
.student-theme .form-input:-webkit-autofill{-webkit-text-fill-color:var(--student-ink);box-shadow:0 0 0 1000px var(--student-raised) inset;caret-color:var(--student-ink)}
.student-theme .field-label{color:var(--student-ink)}
.student-theme .subtle-button,.student-theme .back-link{color:var(--student-muted)}
.student-theme .toast{background:var(--student-raised);color:var(--student-ink);border:1px solid var(--student-accent);box-shadow:0 8px 30px #0003}
.student-theme .toast-error{background:var(--student-danger-bg);color:var(--student-danger);border-color:var(--student-danger)}
.student-theme .site-footer{border-color:var(--student-border);color:var(--student-muted)}
.student-theme .mobile-nav{background:var(--student-header);border-color:var(--student-border)}
.student-theme .mobile-nav a{color:var(--student-muted)}
.student-theme .mobile-nav a.active{color:var(--student-accent-strong)}
.student-theme .image-failed{background:var(--student-raised);color:var(--student-muted)}
/* Dialogs belong to the student surface; admin dialogs never inherit this scope. */
.student-theme dialog:not(.image-viewer){background:var(--student-surface);color:var(--student-ink);border:1px solid var(--student-border);border-radius:16px;box-shadow:0 24px 80px #0007}
.student-theme dialog::backdrop{background:#090b0dcc;backdrop-filter:blur(4px)}
.student-theme .image-viewer,.student-theme .image-viewer-stage{background:#101316;color:#f3f4f2;color-scheme:dark}
.student-theme .image-viewer::backdrop{background:#101316}
.student-theme .image-viewer-header,.student-theme .image-viewer-footer{background:#202428;border-color:#494b47}
.student-theme .image-viewer #viewer-count,.student-theme .image-viewer #viewer-status{color:#c6c7bd}
.student-theme .viewer-button{border-color:#72736b;color:#f3f4f2;background:#ffffff05}
.student-theme .viewer-button:hover{background:#dfbd7c18;border-color:#dfbd7c}
.student-theme .viewer-button:focus-visible{outline-color:#dfbd7c}
/* Authentication shares the same page/background settings as every student view. */
.student-theme.auth-body{background:var(--student-bg)}
.student-theme .auth-shell{max-width:1600px;gap:0}
.student-theme .auth-story{background:var(--student-surface);color:var(--student-ink);border-right:1px solid var(--student-border)}
.student-theme .auth-story .brand{color:var(--student-ink)}
.student-theme .auth-story .brand small,.student-theme .auth-story-copy .eyebrow,.student-theme .auth-story-copy p,.student-theme .auth-bottom{color:var(--student-muted)}
.student-theme .auth-story h1 em{color:var(--student-accent-strong)}
.student-theme .auth-notes{opacity:.2}
.student-theme .auth-notes>span{color:var(--student-accent)}
.student-theme .staff-lines{background:repeating-linear-gradient(transparent 0 22px,var(--student-border) 23px 24px)}
.student-theme .auth-form-side{background:var(--student-bg)}
.student-theme .auth-tabs{border-color:var(--student-border)}
.student-theme .auth-tabs>button{color:var(--student-muted)}
.student-theme .auth-tabs>button.active{border-color:var(--student-accent);color:var(--student-accent-strong)}
.student-theme .auth-note,.student-theme .auth-footer{color:var(--student-muted)}
/* Access notices share public appearance settings; the actual admin stays light. */
.student-theme.admin-notice{min-height:100dvh;background:var(--student-bg);color:var(--student-ink)}
.student-theme.admin-notice .admin-gate{width:min(720px,100%);max-width:720px;margin:8vh auto;padding:28px 32px 48px}
.student-theme.admin-notice .admin-notice-brand{display:inline-flex;margin-bottom:30px;font-size:25px;gap:11px}
.student-theme.admin-notice .admin-notice-brand small{font-size:9px}
.student-theme.admin-notice .admin-notice-card{padding:38px;border:1px solid var(--student-border);border-radius:22px;background:var(--student-surface);box-shadow:0 18px 55px #0002}
.student-theme.admin-notice .admin-notice-symbol{display:flex;width:58px;height:58px;align-items:center;justify-content:center;margin-bottom:24px;border:1px solid var(--student-border);border-radius:17px;color:var(--student-accent);background:var(--student-raised)}
.student-theme.admin-notice .admin-notice-symbol .icon{width:27px;height:27px}
.student-theme.admin-notice .admin-notice-card>.eyebrow{font-size:10px;letter-spacing:1px;color:var(--student-muted)}
.student-theme.admin-notice .admin-notice-card h1{margin:13px 0 18px;font-size:clamp(23px,3.2vw,31px);line-height:1.45;overflow-wrap:anywhere}
.student-theme.admin-notice .admin-notice-card>p{margin:0;color:var(--student-muted);font-size:15px;line-height:1.95;overflow-wrap:anywhere}
.student-theme.admin-notice .admin-notice-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}
.student-theme.admin-notice .admin-notice-actions .button{min-height:47px;margin:0;font-size:14px;padding:12px 22px}
/* Textbook tracks stay a compact, single-column list at every viewport width. */
.student-theme .book-track-list{display:flex;flex-direction:column;border-top:1px solid var(--student-border);border-bottom:1px solid var(--student-border)}
.student-theme .book-track-row{display:flex;align-items:center;gap:16px;width:100%;min-width:0;min-height:48px;padding:10px 12px;border-bottom:1px solid var(--student-border);color:var(--student-ink);text-decoration:none;border-radius:0;transition:background .15s}
.student-theme .book-track-row:last-child{border-bottom:0}
.student-theme .book-track-title{flex:1;min-width:0;font-size:14px;line-height:1.7;white-space:normal;overflow-wrap:anywhere}
.student-theme .book-track-row>.icon{width:18px;height:18px;color:var(--student-accent);flex-shrink:0;transition:transform .15s}
.student-theme .book-track-row:hover{background:var(--student-hover);color:var(--student-accent-strong)}
.student-theme .book-track-row:hover>.icon{transform:translateX(2px)}
.student-theme .book-track-row:focus-visible{position:relative;z-index:1;outline:3px solid var(--student-focus);outline-offset:2px;border-radius:4px}
.student-theme .book-track-row[aria-current="page"]{background:var(--student-raised);color:var(--student-accent-strong);box-shadow:inset 3px 0 var(--student-accent)}
.student-theme .book-track-detail h1{font-size:25px;overflow-wrap:anywhere;margin-bottom:14px}
.student-theme .book-track-detail>p{color:var(--student-muted);margin-bottom:20px}
@media(max-width:1100px) and (min-width:901px){.student-theme:not(.homepage-dark) .home-header-search{width:150px}.student-theme:not(.homepage-dark) .desktop-nav{gap:15px}.student-theme:not(.homepage-dark) .header-inner{gap:18px;padding-left:24px;padding-right:24px}}
@media(max-width:900px){
  .student-theme{
    --student-bg:var(--student-mobile-bg,#171a1d);--student-ink:var(--student-mobile-ink,#f3f4f2);
    --student-muted:var(--student-mobile-muted,#b0b2b2);--student-surface:var(--student-mobile-surface,#24282b);
    --student-raised:var(--student-mobile-raised,#2d3134);--student-hover:var(--student-mobile-hover,#2a2e31);
    --student-border:var(--student-mobile-border,#43474a);--student-accent:var(--student-mobile-accent,#dfbd7c);
    --student-accent-strong:var(--student-mobile-accent-strong,#eed5a0);--student-header:var(--student-mobile-header,#171a1df5);
    --student-gold:var(--student-mobile-gold,#dfbd7c);--student-gold-hover:var(--student-mobile-gold-hover,#eed5a0);
    --student-gold-ink:var(--student-mobile-gold-ink,#20262a);--student-danger:var(--student-mobile-danger,#ffb4aa);
    --student-danger-bg:var(--student-mobile-danger-bg,#302727);--student-scheme:var(--student-mobile-scheme,dark)
  }
  .student-theme:not(.homepage-dark) .site-header{height:73px}
  .student-theme:not(.homepage-dark) .header-inner{gap:14px;padding-left:20px;padding-right:20px}
  .student-theme:not(.homepage-dark) .desktop-nav{display:none}
  .student-theme:not(.homepage-dark) .header-actions{margin-left:auto}
  .student-theme:not(.homepage-dark) .home-header-search{display:none;position:absolute;top:100%;left:20px;right:20px;width:auto;border-radius:11px;background:var(--student-surface);box-shadow:0 9px 30px #0003;padding:13px 15px}
  .student-theme:not(.homepage-dark).home-search-open .home-header-search{display:flex}
  .student-theme:not(.homepage-dark) #focus-search{display:inline-flex}
  .student-theme:not(.homepage-dark) .mobile-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:35;padding:9px 10px max(10px,env(safe-area-inset-bottom));border-top:1px solid var(--student-border);backdrop-filter:blur(14px)}
  .student-theme:not(.homepage-dark) .mobile-nav a{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:10px}
  .student-theme:not(.homepage-dark) .mobile-nav .icon{width:22px;height:22px}
  .student-theme:not(.homepage-dark) .site-footer{padding-bottom:105px}
  .student-theme .auth-story{border-right:0;border-bottom:1px solid var(--student-border)}
  .student-theme.admin-notice .admin-gate{margin:4vh auto;padding:24px 20px 40px}
  .student-theme.admin-notice .admin-notice-brand{font-size:23px;margin-bottom:26px}
  .student-theme.admin-notice .admin-notice-card{padding:27px 24px;border-radius:18px}
  .student-theme.admin-notice .admin-notice-symbol{width:52px;height:52px;margin-bottom:22px}
  .student-theme.admin-notice .admin-notice-card>p{font-size:14px}
  .student-theme.admin-notice .admin-notice-actions{flex-direction:column;align-items:stretch}
  .student-theme.admin-notice .admin-notice-actions .button{width:100%;font-size:14px}
  .student-theme .book-track-row{min-height:56px;padding:13px 8px;gap:12px}
  .student-theme .book-track-title{font-size:15px}
  .student-theme .book-track-detail h1{font-size:23px}
}
@media(prefers-reduced-motion:reduce){.student-theme .button,.student-theme .course-card,.student-theme .book-track-row,.student-theme .book-track-row>.icon{transition:none}}
