/* Dark-only mappings for historic hardcoded light colors. */
html[data-appearance="dark"] .mode-btn.active{color:var(--ink-2)}
html[data-appearance="dark"] .nav-item .badge{color:var(--ink-2)}
html[data-appearance="dark"] .btn.primary{color:var(--ink-2)}
html[data-appearance="dark"] p.blk-content{color:var(--ink-2)}
html[data-appearance="dark"] pre.blk-content{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .sidebar-search input{background:var(--card);border-color:var(--rule)}
html[data-appearance="dark"] .btn{border-color:var(--rule)}
html[data-appearance="dark"] .btn:hover{border-color:var(--rule)}
html[data-appearance="dark"] .btn.primary{background:var(--card);border-color:var(--rule)}
html[data-appearance="dark"] p.blk-content{color:var(--ink-2)}
html[data-appearance="dark"] .empty-page,html[data-appearance="dark"] .community-empty{border:1px dashed var(--rule)}
html[data-appearance="dark"] .auth-card{border-color:var(--rule)}
html[data-appearance="dark"] .auth-tabs{background:var(--card)}
html[data-appearance="dark"] .auth-field input{background:var(--card)}
html[data-appearance="dark"] .community-search input{background:var(--card)}
html[data-appearance="dark"] .community-card{border-color:var(--rule)}
html[data-appearance="dark"] .community-card:hover{border-color:var(--rule)}
html[data-appearance="dark"] .community-meta{color:var(--ink-2)}
html[data-appearance="dark"] .community-tag{border-color:var(--rule)}
html[data-appearance="dark"] .public-view .page-header{border:1px solid var(--rule)}
html[data-appearance="dark"] .mode-switch{background:var(--card);border-color:var(--rule)}
html[data-appearance="dark"] .mode-btn.active{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .sidebar-search input{background:var(--card);border-color:var(--rule)}
html[data-appearance="dark"] .nav-item:hover{background:var(--card)}
html[data-appearance="dark"] .nav-item.active{color:var(--ink-2)}
html[data-appearance="dark"] .course-head:hover{background:var(--card)}
html[data-appearance="dark"] .btn{background:var(--card);border-color:var(--rule)}
html[data-appearance="dark"] .btn:hover{background:var(--card);border-color:var(--rule)}
html[data-appearance="dark"] .btn.primary{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .eyebrow{color:var(--accent)}
html[data-appearance="dark"] .overview-card{border:1px solid var(--rule)}
html[data-appearance="dark"] .course-card-v9{border:1px solid var(--rule)}
html[data-appearance="dark"] .course-card-v9:hover{border-color:var(--rule)}
html[data-appearance="dark"] .course-card-v9:before{background:var(--card)}
html[data-appearance="dark"] .course-open-v9{border:1px solid var(--rule);background:var(--card);color:var(--accent)}
html[data-appearance="dark"] .course-open-v9:hover{color:var(--ink-2)}
html[data-appearance="dark"] .page-link-v9{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .page-link-v9:hover{background:var(--card);border-color:var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .notes-empty-v9{border:1px dashed var(--rule)}
html[data-appearance="dark"] .community-card{border-color:var(--rule)}
html[data-appearance="dark"] .community-card:hover{border-color:var(--rule)}
html[data-appearance="dark"] .home-kicker{color:var(--accent)}
html[data-appearance="dark"] .home-stat{border:1px solid var(--rule)}
html[data-appearance="dark"] .home-panel{border:1px solid var(--rule)}
html[data-appearance="dark"] .home-panel-head{border-bottom:1px solid var(--rule)}
html[data-appearance="dark"] .home-panel-action{color:var(--accent)}
html[data-appearance="dark"] .home-panel-action:hover{color:var(--ink-2)}
html[data-appearance="dark"] .home-course:hover{background:var(--card);border-color:var(--rule)}
html[data-appearance="dark"] .home-course-arrow{color:var(--ink-2)}
html[data-appearance="dark"] .home-note:hover{background:var(--card);border-color:var(--rule)}
html[data-appearance="dark"] .home-quick button{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .home-quick button:hover{background:var(--card);border-color:var(--rule)}
html[data-appearance="dark"] .nav-item.home-active{color:var(--ink-2)}
html[data-appearance="dark"] .course-back{color:var(--accent)!important}
html[data-appearance="dark"] .course-kicker{color:var(--accent)}
html[data-appearance="dark"] .course-add{border:1px solid var(--rule);background:var(--card);color:var(--accent)}
html[data-appearance="dark"] .course-add:hover{border-color:var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .course-note-card{border:1px solid var(--rule)}
html[data-appearance="dark"] .course-note-card:hover{border-color:var(--rule)}
html[data-appearance="dark"] .course-note-icon{background:var(--card);border:1px solid var(--rule)}
html[data-appearance="dark"] .course-note-arrow{color:var(--ink-2)}
html[data-appearance="dark"] .course-root-block{border:1px solid var(--rule)}
html[data-appearance="dark"] .course-root-head{border-bottom:1px solid var(--rule)}
html[data-appearance="dark"] .course-root-notes .course-note-card{background:var(--card)}
html[data-appearance="dark"] .course-empty{border:1px dashed var(--rule)}
html[data-appearance="dark"] .btn.primary{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .sidebar-search input:focus{border-color:var(--rule)}
html[data-appearance="dark"] .course-back{color:var(--accent)!important}
html[data-appearance="dark"] .course-kicker{color:var(--accent)}
html[data-appearance="dark"] .course-desc{color:var(--ink-2)}
html[data-appearance="dark"] .course-mini-stat b{color:var(--ink-2)}
html[data-appearance="dark"] .course-add,html[data-appearance="dark"] .course-open-v9{background:var(--card);border-color:var(--rule)}
html[data-appearance="dark"] .course-add:hover,html[data-appearance="dark"] .course-open-v9:hover{border-color:var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .course-note-card,html[data-appearance="dark"] .course-root-block{border-color:var(--rule);background:var(--card)}
html[data-appearance="dark"] .course-note-card:hover{border-color:var(--rule)}
html[data-appearance="dark"] .course-note-icon,html[data-appearance="dark"] .course-root-head .icon{border-color:var(--rule)}
html[data-appearance="dark"] .course-section-head h2{color:var(--ink-2)}
html[data-appearance="dark"] .course-desc{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-mini-stat{color:var(--accent)!important}
html[data-appearance="dark"] .course-mini-stat b{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-mini-stat span{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-section-head h2{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-section-head p{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-note-info h3{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-note-info p{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-note-arrow{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-root-head h3{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-root-head span{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-more-v9{color:var(--ink-2)!important}
html[data-appearance="dark"] .home-course-info p{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-note-info h3{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-note-info p{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-note-arrow{color:var(--ink-2)!important}
html[data-appearance="dark"] .course-root-head span{color:var(--ink-2)}
html[data-appearance="dark"] .course-section-head p{color:var(--ink-2)}
html[data-appearance="dark"] .course-mini-stat span{color:var(--ink-2)}
html[data-appearance="dark"] .course-desc{color:var(--ink-2)}
html[data-appearance="dark"] .community-kicker{color:var(--accent)}
html[data-appearance="dark"] .community-live-dot{background:var(--card)}
html[data-appearance="dark"] .community-search-icon{color:var(--ink-2)}
html[data-appearance="dark"] .community-search-v12 input::placeholder{color:var(--ink-2)}
html[data-appearance="dark"] .community-clear{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .community-clear:hover{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .community-search-hint{color:var(--ink-2)}
html[data-appearance="dark"] .community-section-kicker{color:var(--accent)}
html[data-appearance="dark"] .community-result-count{color:var(--ink-2)}
html[data-appearance="dark"] .community-profile-card{border:1px solid var(--rule)}
html[data-appearance="dark"] .community-profile-card:hover{border-color:var(--rule)}
html[data-appearance="dark"] .community-avatar{color:var(--ink-2)}
html[data-appearance="dark"] .community-profile-id span{color:var(--ink-2)}
html[data-appearance="dark"] .community-open-icon{color:var(--ink-2)}
html[data-appearance="dark"] .community-stats-v12 div{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .community-stats-v12 strong{color:var(--ink-2)}
html[data-appearance="dark"] .community-stats-v12 span{color:var(--ink-2)}
html[data-appearance="dark"] .community-featured{border-top:1px solid var(--rule)}
html[data-appearance="dark"] .community-mini-label{color:var(--ink-2)}
html[data-appearance="dark"] .community-note-row{color:var(--ink-2)}
html[data-appearance="dark"] .community-snippet-v12{color:var(--ink-2)}
html[data-appearance="dark"] .community-card-footer{border-top:1px solid var(--rule)}
html[data-appearance="dark"] .community-tags-v12 span{border:1px solid var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .community-view-link{color:var(--accent)}
html[data-appearance="dark"] .community-empty-v12{border:1px dashed var(--rule)}
html[data-appearance="dark"] .community-empty-v12 .empty-icon{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .community-empty-v12 p{color:var(--ink-2)}
html[data-appearance="dark"] .community-topbar-v14{border-bottom:1px solid var(--rule)}
html[data-appearance="dark"] .community-symbol-v14{background:var(--card)}
html[data-appearance="dark"] .community-kicker-v14{color:var(--accent)}
html[data-appearance="dark"] .community-title-v14 p{color:var(--ink-2)}
html[data-appearance="dark"] .community-stats-v14{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .community-stats-v14 div{border-left:1px solid var(--rule)}
html[data-appearance="dark"] .community-stats-v14 span{color:var(--ink-2)}
html[data-appearance="dark"] .community-search-v14{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .community-search-v14>span{color:var(--ink-2)}
html[data-appearance="dark"] .community-search-v14 input::placeholder{color:var(--ink-2)}
html[data-appearance="dark"] .community-search-go{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .community-tabs-v14 button{color:var(--ink-2)}
html[data-appearance="dark"] .community-tabs-v14 button.active{background:var(--card);border-color:var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .community-feed-head-v14 span,html[data-appearance="dark"] .rail-kicker-v14{color:var(--ink-2)}
html[data-appearance="dark"] .community-feed-head-v14 small{color:var(--ink-2)}
html[data-appearance="dark"] .community-post-v14{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .community-post-v14:hover{border-color:var(--rule);background:var(--card)}
html[data-appearance="dark"] .post-accent-v14{background:var(--card)}
html[data-appearance="dark"] .post-avatar-v14{background:var(--card);color:var(--accent)}
html[data-appearance="dark"] .post-author-v14 span{color:var(--ink-2)}
html[data-appearance="dark"] .post-open-v14{color:var(--accent)}
html[data-appearance="dark"] .post-label-v14{color:var(--ink-2)}
html[data-appearance="dark"] .post-body-v14 p{color:var(--ink-2)}
html[data-appearance="dark"] .post-notes-v14>div{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .post-notes-v14 span{color:var(--accent)}
html[data-appearance="dark"] .post-notes-v14 em{color:var(--ink-2)}
html[data-appearance="dark"] .post-foot-v14{border-top:1px solid var(--rule)}
html[data-appearance="dark"] .post-tags-v14 span{border:1px solid var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .post-read-v14{color:var(--accent)}
html[data-appearance="dark"] .rail-card-v14{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .rail-step-v14{border-top:1px solid var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .rail-step-v14 b{color:var(--accent)}
html[data-appearance="dark"] .rail-topic-v14{border:1px solid var(--rule);color:var(--ink-2);background:var(--card)}
html[data-appearance="dark"] .rail-cta-v14 p{color:var(--ink-2)}
html[data-appearance="dark"] .community-empty-v14{border:1px dashed var(--rule);background:var(--card)}
html[data-appearance="dark"] .community-empty-v14>div{color:var(--accent)}
html[data-appearance="dark"] .community-empty-v14 p{color:var(--ink-2)}
html[data-appearance="dark"] .public-profile-head{background:var(--card);border:1px solid var(--rule)}
html[data-appearance="dark"] .public-avatar{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .public-profile-kicker,html[data-appearance="dark"] .hub-kicker{color:var(--accent)}
html[data-appearance="dark"] .public-profile-head h1{color:var(--ink-2)}
html[data-appearance="dark"] .public-profile-meta{color:var(--ink-2)}
html[data-appearance="dark"] .notes-hub-toolbar h2{color:var(--ink-2)}
html[data-appearance="dark"] .notes-hub-toolbar p{color:var(--ink-2)}
html[data-appearance="dark"] .hub-count{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .hub-count b{color:var(--ink-2)}
html[data-appearance="dark"] .hub-count span{color:var(--ink-2)}
html[data-appearance="dark"] .reader-course-heading h2{color:var(--ink-2)}
html[data-appearance="dark"] .reader-course-heading span{color:var(--ink-2)}
html[data-appearance="dark"] .reader-note-list{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .reader-note-item{border-bottom:1px solid var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .reader-note-item:hover{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .reader-note-number{color:var(--ink-2)}
html[data-appearance="dark"] .reader-note-arrow{color:var(--ink-2)}
html[data-appearance="dark"] .reader-note-item:hover .reader-note-arrow{color:var(--accent)}
html[data-appearance="dark"] .note-reader-panel{background:var(--card);border:1px solid var(--rule)}
html[data-appearance="dark"] .note-reader-header{border-bottom:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .note-reader-kicker{color:var(--accent)}
html[data-appearance="dark"] .note-reader-header h2{color:var(--ink-2)}
html[data-appearance="dark"] .note-reader-header span{color:var(--ink-2)}
html[data-appearance="dark"] .note-reader-close{border:1px solid var(--rule);background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .note-reader-close:hover{background:var(--card);color:var(--ink-2);border-color:var(--rule)}
html[data-appearance="dark"] .note-reader-block{color:var(--ink-2)}
html[data-appearance="dark"] .note-reader-block-no{color:var(--ink-2)}
html[data-appearance="dark"] .note-reader-empty{color:var(--ink-2)}
html[data-appearance="dark"] .note-reader-footer{border-top:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .note-reader-footer>span{color:var(--ink-2)}
html[data-appearance="dark"] .reader-nav-btn{border:1px solid var(--rule);background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .reader-nav-btn:hover:not(:disabled){background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .muted{color:var(--ink-2)}
html[data-appearance="dark"] .profile-hero{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .profile-avatar{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .profile-kicker{color:var(--accent)}
html[data-appearance="dark"] .profile-identity h1{color:var(--ink-2)}
html[data-appearance="dark"] .profile-identity p{color:var(--ink-2)}
html[data-appearance="dark"] .profile-stats div{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .profile-stats b{color:var(--ink-2)}
html[data-appearance="dark"] .profile-stats span{color:var(--ink-2)}
html[data-appearance="dark"] .profile-section-head>div>span{color:var(--accent)}
html[data-appearance="dark"] .profile-section-head h2{color:var(--ink-2)}
html[data-appearance="dark"] .profile-section-head small{color:var(--ink-2)}
html[data-appearance="dark"] .profile-course{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .profile-course>header{border-bottom:1px solid var(--rule)}
html[data-appearance="dark"] .profile-course-title h3{color:var(--ink-2)}
html[data-appearance="dark"] .profile-course-title small{color:var(--ink-2)}
html[data-appearance="dark"] .profile-course-index{color:var(--ink-2)}
html[data-appearance="dark"] .profile-note-item{border-bottom:1px solid var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .profile-note-item:hover{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .profile-note-item>span{color:var(--ink-2)}
html[data-appearance="dark"] .profile-note-item em{color:var(--accent)}
html[data-appearance="dark"] .profile-private,html[data-appearance="dark"] .profile-empty{border:1px dashed var(--rule);background:var(--card)}
html[data-appearance="dark"] .profile-private h2,html[data-appearance="dark"] .profile-empty h3{color:var(--ink-2)}
html[data-appearance="dark"] .profile-private p,html[data-appearance="dark"] .profile-empty p{color:var(--ink-2)}
html[data-appearance="dark"] .profile-hero-v18{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .profile-cover-v18{border-bottom:1px solid var(--rule)}
html[data-appearance="dark"] .profile-avatar-v18{border:4px solid var(--rule);background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .profile-kicker{color:var(--accent)}
html[data-appearance="dark"] .profile-hero-copy-v18 h1{color:var(--ink-2)}
html[data-appearance="dark"] .profile-handle{color:var(--ink-2)}
html[data-appearance="dark"] .profile-bio{color:var(--ink-2)}
html[data-appearance="dark"] .profile-stats-v18 div{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .profile-stats-v18 b{color:var(--ink-2)}
html[data-appearance="dark"] .profile-stats-v18 span{color:var(--ink-2)}
html[data-appearance="dark"] .profile-section-head-v18 span{color:var(--accent)}
html[data-appearance="dark"] .profile-section-head-v18 h2{color:var(--ink-2)}
html[data-appearance="dark"] .profile-section-head-v18 p{color:var(--ink-2)}
html[data-appearance="dark"] .profile-count-pill-v18{border:1px solid var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .profile-course-v18{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .profile-course-v18:hover{border-color:var(--rule)}
html[data-appearance="dark"] .profile-course-v18.is-open{border-color:var(--rule);background:var(--card)}
html[data-appearance="dark"] .profile-course-icon-v18{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .profile-course-main-v18 h3{color:var(--ink-2)}
html[data-appearance="dark"] .profile-course-main-v18 p{color:var(--ink-2)}
html[data-appearance="dark"] .profile-course-num-v18{color:var(--ink-2)}
html[data-appearance="dark"] .profile-course-chevron-v18{border:1px solid var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .profile-course-v18.is-open .profile-course-chevron-v18{color:var(--accent)}
html[data-appearance="dark"] .profile-course-notes-v18{border-top:0 solid var(--rule)}
html[data-appearance="dark"] .profile-note-row-v18{border-bottom:1px solid var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .profile-note-row-v18:hover{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .profile-note-row-v18>span{color:var(--ink-2)}
html[data-appearance="dark"] .profile-note-row-v18 em{color:var(--accent)}
html[data-appearance="dark"] .profile-note-row-v18 b{color:var(--ink-2)}
html[data-appearance="dark"] .profile-private-v18{border:1px dashed var(--rule);background:var(--card)}
html[data-appearance="dark"] .profile-private-v18 p{color:var(--ink-2)}
html[data-appearance="dark"] .profile-tip-v18{border:1px solid var(--rule);background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .profile-edit-body-v18 label>input,html[data-appearance="dark"] .profile-edit-body-v18 label>textarea{border:1px solid var(--rule);background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .profile-edit-body-v18 label>input:focus,html[data-appearance="dark"] .profile-edit-body-v18 label>textarea:focus{border-color:var(--rule)}
html[data-appearance="dark"] .profile-edit-avatar-line{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .profile-edit-avatar-v18{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .profile-edit-avatar-line p{color:var(--ink-2)}
html[data-appearance="dark"] .profile-edit-count{color:var(--ink-2)}
html[data-appearance="dark"] .saved-head-v20{border-bottom:1px solid var(--rule)}
html[data-appearance="dark"] .saved-kicker-v20{color:var(--accent)}
html[data-appearance="dark"] .saved-head-v20 h1{color:var(--ink-2)}
html[data-appearance="dark"] .saved-head-v20 p{color:var(--ink-2)}
html[data-appearance="dark"] .saved-count-v20{color:var(--ink-2);border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .saved-note-v20{border:1px solid var(--rule);background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .saved-note-v20:hover{border-color:var(--rule);background:var(--card)}
html[data-appearance="dark"] .saved-num-v20{color:var(--ink-2)}
html[data-appearance="dark"] .saved-note-main-v20 small{color:var(--ink-2)}
html[data-appearance="dark"] .saved-arrow-v20{color:var(--accent)}
html[data-appearance="dark"] .saved-empty-v20{border:1px dashed var(--rule);background:var(--card)}
html[data-appearance="dark"] .saved-empty-v20 p{color:var(--ink-2)}
html[data-appearance="dark"] .public-note-head .public-save-note{color:var(--ink-2);background:var(--card);border-color:var(--rule)}
html[data-appearance="dark"] .public-note-head .public-save-note:hover{border-color:var(--rule);color:var(--accent)}
html[data-appearance="dark"] .post-save-v14{border:1px solid var(--rule)!important!important;background:var(--card)!important;color:var(--ink-2)!important}
html[data-appearance="dark"] .post-save-v14:hover{border-color:var(--rule)!important!important;background:var(--card)!important;color:var(--accent)!important}
html[data-appearance="dark"] .post-save-v14:focus-visible{outline:2px solid var(--rule)}
html[data-appearance="dark"] .reader-save-btn{border:1px solid var(--rule)!important!important;border-right:1px solid var(--rule)!important!important;background:var(--card)!important;color:var(--ink-2)!important}
html[data-appearance="dark"] .reader-save-btn:hover,html[data-appearance="dark"] .reader-save-btn.is-saved{border-color:var(--rule)!important!important;background:var(--card)!important;color:var(--accent)!important}
html[data-appearance="dark"] .reader-note-item-wrap{border-bottom:1px solid var(--rule)}
html[data-appearance="dark"] .reader-save-btn{border-right:1px solid var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .reader-save-btn:hover,html[data-appearance="dark"] .reader-save-btn.is-saved{color:var(--accent);background:var(--card)}
html[data-appearance="dark"] .saved-remove-v20{border:1px solid var(--rule);background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .saved-remove-v20:hover{color:var(--ink-2);border-color:var(--rule);background:var(--card)}
html[data-appearance="dark"] .public-back{color:var(--accent)!important}
html[data-appearance="dark"] .public-back:hover{background:var(--card)!important;border-color:var(--rule)!important!important}
html[data-appearance="dark"] .public-profile-head{background:var(--card)!important;border-color:var(--rule)!important!important}
html[data-appearance="dark"] .public-profile-kicker{color:var(--accent)!important}
html[data-appearance="dark"] .public-profile-meta{color:var(--ink-2)!important}
html[data-appearance="dark"] .notes-hub-toolbar p{color:var(--ink-2)!important}
html[data-appearance="dark"] .hub-kicker{color:var(--accent)!important}
html[data-appearance="dark"] .reader-note-list{background:var(--card)!important;border-color:var(--rule)!important!important}
html[data-appearance="dark"] .reader-note-item-wrap{background:var(--card)!important}
html[data-appearance="dark"] .reader-note-item:hover{background:var(--card)!important}
html[data-appearance="dark"] .reader-note-number{color:var(--ink-2)!important}
html[data-appearance="dark"] .reader-note-title{color:var(--ink-2)!important}
html[data-appearance="dark"] .reader-save-btn{border:1px solid var(--rule)!important!important;background:var(--card)!important;color:var(--ink-2)!important}
html[data-appearance="dark"] .reader-save-btn:hover{border-color:var(--rule)!important!important;background:var(--card)!important;color:var(--accent)!important}
html[data-appearance="dark"] .reader-save-btn.is-saved{border-color:var(--rule)!important!important;color:var(--accent)!important}
html[data-appearance="dark"] .note-reader-panel{border-color:var(--rule)!important!important;background:var(--card)!important}
html[data-appearance="dark"] .reader-head-save{border:1px solid var(--rule);background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .reader-head-save:hover,html[data-appearance="dark"] .reader-head-save.is-saved{border-color:var(--rule);background:var(--card);color:var(--accent)}
html[data-appearance="dark"] .community-post-v14{background:var(--card)!important;border-color:var(--rule)!important!important}
html[data-appearance="dark"] .saved-head-v20{background:var(--card)!important;border-color:var(--rule)!important!important}
html[data-appearance="dark"] .saved-note-v20{background:var(--card)!important;border-color:var(--rule)!important!important}
html[data-appearance="dark"] .course-save-v22{border:1px solid var(--rule)!important!important;background:var(--card)!important;color:var(--ink-2)!important}
html[data-appearance="dark"] .course-save-v22:hover,html[data-appearance="dark"] .course-save-v22.is-saved{border-color:var(--rule)!important!important;background:var(--card)!important;color:var(--accent)!important}
html[data-appearance="dark"] .course-focus-v22{border-color:var(--rule)!important!important}
html[data-appearance="dark"] .saved-course-v22{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .saved-course-v22:hover{border-color:var(--rule);background:var(--card)}
html[data-appearance="dark"] .saved-course-icon-v22{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .saved-course-kicker-v22{color:var(--accent)}
html[data-appearance="dark"] .saved-course-main-v22 h2{color:var(--ink-2)}
html[data-appearance="dark"] .saved-course-main-v22 p{color:var(--ink-2)}
html[data-appearance="dark"] .saved-remove-v22{border:1px solid var(--rule);background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .saved-remove-v22:hover{color:var(--ink-2);border-color:var(--rule);background:var(--card)}
html[data-appearance="dark"] .saved-course-arrow-v22{color:var(--accent)}
html[data-appearance="dark"] .notify-badge{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .notification-item{border:1px solid var(--rule);background:var(--card);color:var(--accent)}
html[data-appearance="dark"] .notification-item:hover{border-color:var(--rule);background:var(--card)}
html[data-appearance="dark"] .notification-item.unread{border-color:var(--rule);background:var(--card)}
html[data-appearance="dark"] .notification-icon{background:var(--card)}
html[data-appearance="dark"] .notification-copy strong{color:var(--ink-2)}
html[data-appearance="dark"] .notification-copy small{color:var(--ink-2)}
html[data-appearance="dark"] .notification-dot{background:var(--card)}
html[data-appearance="dark"] .notification-empty{border:1px dashed var(--rule);background:var(--card)}
html[data-appearance="dark"] .notification-empty p{color:var(--ink-2)}
html[data-appearance="dark"] .verify-icon{background:var(--card)}
html[data-appearance="dark"] .sidebar{background:var(--card)}
html[data-appearance="dark"] .sidebar .course-name{color:var(--accent)!important}
html[data-appearance="dark"] .sidebar .page-title{color:var(--ink-2)!important}
html[data-appearance="dark"] .sidebar .page-item.active .page-title{color:var(--ink-2)!important}
html[data-appearance="dark"] .sidebar .page-snippet{color:var(--ink-2)}
html[data-appearance="dark"] .community-eyebrow-v13{color:var(--accent)}
html[data-appearance="dark"] .community-eyebrow-v13 span{background:var(--card)}
html[data-appearance="dark"] .community-topbar-v13 p{color:var(--ink-2)}
html[data-appearance="dark"] .community-top-stats-v13 div{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .community-top-stats-v13 b{color:var(--ink-2)}
html[data-appearance="dark"] .community-top-stats-v13 small{color:var(--ink-2)}
html[data-appearance="dark"] .community-search-wrap-v13{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .community-search-wrap-v13:focus-within{border-color:var(--rule)}
html[data-appearance="dark"] .community-search-wrap-v13>span{color:var(--ink-2)}
html[data-appearance="dark"] .community-search-wrap-v13 input::placeholder{color:var(--ink-2)}
html[data-appearance="dark"] .community-clear-v13{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .community-tab-v13{color:var(--ink-2)}
html[data-appearance="dark"] .community-tab-v13:hover{color:var(--ink-2)}
html[data-appearance="dark"] .community-tab-v13.active{background:var(--card);color:var(--accent)}
html[data-appearance="dark"] .community-tab-count{color:var(--ink-2)}
html[data-appearance="dark"] .community-post-v13{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .community-post-v13:hover{border-color:var(--rule);background:var(--card)}
html[data-appearance="dark"] .community-avatar-v13{color:var(--ink-2)}
html[data-appearance="dark"] .community-author-v13 strong{color:var(--ink-2)}
html[data-appearance="dark"] .community-author-v13 span{color:var(--ink-2)}
html[data-appearance="dark"] .community-open-v13{border:1px solid var(--rule);background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .community-open-v13:hover{color:var(--accent);border-color:var(--rule)}
html[data-appearance="dark"] .community-post-title-v13{color:var(--ink-2)}
html[data-appearance="dark"] .community-post-body-v13 p{color:var(--ink-2)}
html[data-appearance="dark"] .community-note-list-v13{border:1px solid var(--rule)}
html[data-appearance="dark"] .community-note-v13{border-top:1px solid var(--rule)}
html[data-appearance="dark"] .note-index-v13{color:var(--ink-2)}
html[data-appearance="dark"] .community-note-v13 b{color:var(--ink-2)}
html[data-appearance="dark"] .community-note-v13 small{color:var(--ink-2)}
html[data-appearance="dark"] .community-note-v13>span:last-child{color:var(--ink-2)}
html[data-appearance="dark"] .community-post-foot-v13{border-top:1px solid var(--rule)}
html[data-appearance="dark"] .community-tags-v13 span{border:1px solid var(--rule);color:var(--ink-2)}
html[data-appearance="dark"] .community-post-action-v13{color:var(--accent)}
html[data-appearance="dark"] .community-side-card-v13{border:1px solid var(--rule);background:var(--card)}
html[data-appearance="dark"] .side-card-head-v13{border-bottom:1px solid var(--rule)}
html[data-appearance="dark"] .side-card-head-v13 b{color:var(--ink-2)}
html[data-appearance="dark"] .side-card-head-v13 small{color:var(--ink-2)}
html[data-appearance="dark"] .community-steps-v13 div{color:var(--ink-2)}
html[data-appearance="dark"] .community-steps-v13 i{border:1px solid var(--rule);color:var(--accent)}
html[data-appearance="dark"] .community-topic-list-v13 button{color:var(--ink-2)}
html[data-appearance="dark"] .community-topic-list-v13 button:hover{background:var(--card);color:var(--accent)}
html[data-appearance="dark"] .community-topic-list-v13 span{color:var(--ink-2)}
html[data-appearance="dark"] .community-side-note-v13{color:var(--ink-2);border-top:1px solid var(--rule)}
html[data-appearance="dark"] .community-empty-v13{border:1px dashed var(--rule);background:var(--card)}
html[data-appearance="dark"] .community-empty-v13>div{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] .community-empty-v13 p{color:var(--ink-2)}
html[data-appearance="dark"] .public-reader-head{background:var(--card);border:1px solid var(--rule)}
html[data-appearance="dark"] .public-reader-name{color:var(--ink-2)}
html[data-appearance="dark"] .public-reader-meta{color:var(--ink-2)}
html[data-appearance="dark"] .public-course-title{color:var(--ink-2)}
html[data-appearance="dark"] .public-course-count{color:var(--ink-2)}
html[data-appearance="dark"] .public-note{background:var(--card);border:1px solid var(--rule)}
html[data-appearance="dark"] .public-note:hover{border-color:var(--rule);background:var(--card)}
html[data-appearance="dark"] .public-note-head{border-bottom:1px solid var(--rule)}
html[data-appearance="dark"] .public-note-title{color:var(--ink-2)}
html[data-appearance="dark"] .public-block{color:var(--ink-2)}
html[data-appearance="dark"] .public-note-more{color:var(--ink-2);border-top:1px solid var(--rule)}
html[data-appearance="dark"] .public-comment{border-top:1px solid var(--rule)}
html[data-appearance="dark"] .public-comment-body{color:var(--ink-2)}
html[data-appearance="dark"] .public-empty{color:var(--ink-2);border:1px dashed var(--rule)}
html[data-appearance="dark"] body .sidebar .mode-btn.active{background:var(--card);color:var(--ink-2)}
html[data-appearance="dark"] body .sidebar .tree-head .btn{color:var(--accent)}
html[data-appearance="dark"] body .sidebar .page-title{color:var(--ink-2)!important}
html[data-appearance="dark"] .btn.danger-solid{color:var(--ink-2)}
html[data-appearance="dark"] .ux-field input{background:var(--card)}
html[data-appearance="dark"] .ux-toast{background:var(--card)}
html[data-appearance="dark"] .ux-toast.error{background:var(--card)}
/* Theme tokens extend the v31 identity without changing its layout. */
:root { --theme-icon-size:20px; }
html[data-appearance="dark"] {
  color-scheme:dark;
  --paper:#191C1C; --paper-2:#212625; --paper-3:#2B3230; --card:#242A28;
  --ink:#F0EEE8; --ink-2:#CCCFC7; --ink-3:#A0ACA3; --rule:#445149; --rule-soft:#344039;
  --accent:#EE9477; --accent-ink:#F6AC91; --accent-wash:#45312C;
  --moss:#8ECBAA; --moss-wash:#293F33; --ochre:#E3AA6C; --danger-c:#F29287; --danger-wash:#482F2C;
  --sh-1:0 1px 2px #00000033; --sh-2:0 8px 24px -10px #00000088; --sh-3:0 24px 60px -20px #000000AA;
  --ui-accent:var(--accent); --ux-accent:var(--accent); --ux-accent-2:var(--moss);
  --ux-surface:var(--paper-3); --ux-line:var(--rule-soft); --ux-ring:0 0 0 3px var(--accent-wash);
}
html[data-appearance="dark"] body .sidebar .page-title {color:var(--ink-2)!important}
html[data-appearance="dark"] .ux-toast {background:var(--card);color:var(--ink);box-shadow:var(--sh-2)}
html[data-appearance="dark"] .ux-toast.error {background:var(--danger-wash)}
html[data-appearance="dark"] .footer-more {background:var(--paper-2)}
html[data-appearance="dark"] .modal-backdrop,
html[data-appearance="dark"] .note-reader-overlay,
html[data-appearance="dark"] .fc-overlay,
html[data-appearance="dark"] .sidebar-backdrop {background:#00000099!important}
.appearance-toggle svg {width:var(--theme-icon-size);height:var(--theme-icon-size);flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.appearance-toggle {display:inline-flex;align-items:center;justify-content:center;gap:6px}
.auth-card .appearance-toggle {position:relative;z-index:1;float:left;width:38px;padding:6px!important;min-height:38px}
.auth-card>.brand-prompt {padding-left:48px}
.footer-tools {flex-wrap:wrap}

html[data-appearance="dark"] p.blk-content{color:var(--ink)!important}
html[data-appearance="dark"] pre.blk-content{background:var(--paper-2)!important;color:var(--ink)!important}
/* Final contrast rules beat legacy high-specificity patches in both modes. */
html body .btn {background:var(--card)!important;color:var(--ink)!important;border-color:var(--rule)!important}
html body .btn.primary {background:var(--ink)!important;color:var(--card)!important;border-color:var(--ink)!important}
html body .btn.danger {color:var(--danger-c)!important}
html body .btn:disabled {opacity:.5}
html body .nav-item {color:var(--ink-2)!important}
html body .nav-item.active,html body .nav-item.home-active {background:var(--card)!important;color:var(--ink)!important}
html body .mode-btn {color:var(--ink-2)!important}
html body .mode-btn.active {background:var(--ink)!important;color:var(--card)!important}
html body .home-note,html body .home-note-icon,html body .home-note-info strong {color:var(--ink)!important}
html body .home-quick button {background:var(--paper-2)!important;color:var(--ink)!important;border-color:var(--rule)!important}
html body .home-quick small,html body .home-note-time {color:var(--ink-3)!important}
html[data-appearance="dark"] body .home-community-card {background:var(--paper-2)!important;background-image:none!important}

/* =====================================================================
   v33 — Dark contrast pass
   Cause: ~130 legacy rules paint hard-coded beige surfaces and ~180 rules
   hard-code dark-brown text, so in dark mode the tokens flipped (light text)
   but the cards stayed beige -> light text on a light card = faded.
   Fix: in dark mode every one of those surfaces / texts / borders is mapped
   back to the dark tokens. Light mode is untouched.
   ===================================================================== */
/* surfaces: containers */
html[data-appearance="dark"] body .auth-card,
html[data-appearance="dark"] body .community-card,
html[data-appearance="dark"] body .public-view .page-header,
html[data-appearance="dark"] body .overview-card,
html[data-appearance="dark"] body .course-card-v9,
html[data-appearance="dark"] body .home-hero,
html[data-appearance="dark"] body .home-stat,
html[data-appearance="dark"] body .home-panel,
html[data-appearance="dark"] body .course-hero,
html[data-appearance="dark"] body .course-note-card,
html[data-appearance="dark"] body .course-root-block,
html[data-appearance="dark"] body .community-hero-v12,
html[data-appearance="dark"] body .community-profile-card,
html[data-appearance="dark"] body .community-post-v14,
html[data-appearance="dark"] body .rail-card-v14,
html[data-appearance="dark"] body .community-empty-v14,
html[data-appearance="dark"] body .public-profile-head,
html[data-appearance="dark"] body .reader-note-list,
html[data-appearance="dark"] body .note-reader-panel,
html[data-appearance="dark"] body .note-reader-header,
html[data-appearance="dark"] body .note-reader-footer,
html[data-appearance="dark"] body .profile-hero,
html[data-appearance="dark"] body .profile-course,
html[data-appearance="dark"] body .profile-private,
html[data-appearance="dark"] body .profile-empty,
html[data-appearance="dark"] body .profile-hero-v18,
html[data-appearance="dark"] body .profile-cover-v18,
html[data-appearance="dark"] body .profile-course-v18,
html[data-appearance="dark"] body .profile-course-v18.is-open,
html[data-appearance="dark"] body .profile-private-v18,
html[data-appearance="dark"] body .profile-tip-v18,
html[data-appearance="dark"] body .profile-edit-body-v18 label>textarea,
html[data-appearance="dark"] body .notification-item,
html[data-appearance="dark"] body .notification-item.unread,
html[data-appearance="dark"] body .notification-empty,
html[data-appearance="dark"] body .community-post-v13,
html[data-appearance="dark"] body .community-open-v13,
html[data-appearance="dark"] body .community-side-card-v13,
html[data-appearance="dark"] body .community-empty-v13,
html[data-appearance="dark"] body .community-empty-v13>div,
html[data-appearance="dark"] body .public-reader-head{background:var(--card)!important;background-image:none!important;}
/* surfaces: nested chips, buttons, icons, inputs */
html[data-appearance="dark"] body .sidebar-search input,
html[data-appearance="dark"] body .auth-tabs,
html[data-appearance="dark"] body .auth-field input,
html[data-appearance="dark"] body .community-search input,
html[data-appearance="dark"] body .mode-switch,
html[data-appearance="dark"] body .course-open-v9,
html[data-appearance="dark"] body .page-link-v9,
html[data-appearance="dark"] body .home-quick button,
html[data-appearance="dark"] body .course-add,
html[data-appearance="dark"] body .course-note-icon,
html[data-appearance="dark"] body .course-root-notes .course-note-card,
html[data-appearance="dark"] body .community-search-panel,
html[data-appearance="dark"] body .community-clear,
html[data-appearance="dark"] body .community-stats-v12 div,
html[data-appearance="dark"] body .community-empty-v12 .empty-icon,
html[data-appearance="dark"] body .community-stats-v14,
html[data-appearance="dark"] body .community-search-v14,
html[data-appearance="dark"] body .community-tabs-v14 button.active,
html[data-appearance="dark"] body .post-avatar-v14,
html[data-appearance="dark"] body .post-notes-v14>div,
html[data-appearance="dark"] body .rail-topic-v14,
html[data-appearance="dark"] body .hub-count,
html[data-appearance="dark"] body .note-reader-close,
html[data-appearance="dark"] body .reader-nav-btn,
html[data-appearance="dark"] body .profile-stats div,
html[data-appearance="dark"] body .profile-stats-v18 div,
html[data-appearance="dark"] body .profile-course-icon-v18,
html[data-appearance="dark"] body .profile-edit-body-v18 label>input,
html[data-appearance="dark"] body .profile-edit-avatar-line,
html[data-appearance="dark"] body .saved-count-v20,
html[data-appearance="dark"] body .saved-note-v20,
html[data-appearance="dark"] body .saved-empty-v20,
html[data-appearance="dark"] body .public-note-head .public-save-note,
html[data-appearance="dark"] body .post-save-v14,
html[data-appearance="dark"] body .reader-save-btn,
html[data-appearance="dark"] body .reader-save-btn.is-saved,
html[data-appearance="dark"] body .saved-remove-v20,
html[data-appearance="dark"] body .reader-note-item-wrap,
html[data-appearance="dark"] body .reader-head-save,
html[data-appearance="dark"] body .reader-head-save.is-saved,
html[data-appearance="dark"] body .saved-head-v20,
html[data-appearance="dark"] body .course-save-v22,
html[data-appearance="dark"] body .course-save-v22.is-saved,
html[data-appearance="dark"] body .saved-course-v22,
html[data-appearance="dark"] body .saved-course-icon-v22,
html[data-appearance="dark"] body .saved-remove-v22,
html[data-appearance="dark"] body .notification-icon,
html[data-appearance="dark"] body .verify-icon,
html[data-appearance="dark"] body .community-top-stats-v13 div,
html[data-appearance="dark"] body .community-search-wrap-v13,
html[data-appearance="dark"] body .community-clear-v13,
html[data-appearance="dark"] body .community-tab-v13.active,
html[data-appearance="dark"] body .public-note,
html[data-appearance="dark"] body .ux-field input,
html[data-appearance="dark"] body .ux-toast,
html[data-appearance="dark"] body .ux-toast.error,
html[data-appearance="dark"] body .menu-btn{background:var(--paper-3)!important;background-image:none!important;}
/* hover surfaces */
html[data-appearance="dark"] body .community-card:hover,
html[data-appearance="dark"] body .nav-item:hover,
html[data-appearance="dark"] body .course-head:hover,
html[data-appearance="dark"] body .page-link-v9:hover,
html[data-appearance="dark"] body .home-course:hover,
html[data-appearance="dark"] body .home-note:hover,
html[data-appearance="dark"] body .home-quick button:hover,
html[data-appearance="dark"] body .community-clear:hover,
html[data-appearance="dark"] body .community-profile-card:hover,
html[data-appearance="dark"] body .community-post-v14:hover,
html[data-appearance="dark"] body .reader-note-item:hover,
html[data-appearance="dark"] body .note-reader-close:hover,
html[data-appearance="dark"] body .reader-nav-btn:hover:not(:disabled),
html[data-appearance="dark"] body .profile-note-item:hover,
html[data-appearance="dark"] body .profile-note-row-v18:hover,
html[data-appearance="dark"] body .saved-note-v20:hover,
html[data-appearance="dark"] body .post-save-v14:hover,
html[data-appearance="dark"] body .reader-save-btn:hover,
html[data-appearance="dark"] body .saved-remove-v20:hover,
html[data-appearance="dark"] body .public-back:hover,
html[data-appearance="dark"] body .reader-head-save:hover,
html[data-appearance="dark"] body .course-save-v22:hover,
html[data-appearance="dark"] body .saved-course-v22:hover,
html[data-appearance="dark"] body .saved-remove-v22:hover,
html[data-appearance="dark"] body .notification-item:hover,
html[data-appearance="dark"] body .community-post-v13:hover,
html[data-appearance="dark"] body .community-topic-list-v13 button:hover,
html[data-appearance="dark"] body .public-note:hover{background:var(--rule-soft)!important;background-image:none!important;}
/* text hierarchy: primary / secondary / tertiary / accent */
html[data-appearance="dark"] body p.blk-content,
html[data-appearance="dark"] body .nav-item.active,
html[data-appearance="dark"] body .course-open-v9:hover,
html[data-appearance="dark"] body .page-link-v9:hover,
html[data-appearance="dark"] body .home-panel-action:hover,
html[data-appearance="dark"] body .nav-item.home-active,
html[data-appearance="dark"] body .course-add:hover,
html[data-appearance="dark"] body .course-mini-stat b,
html[data-appearance="dark"] body .course-section-head h2,
html[data-appearance="dark"] body .course-note-info h3,
html[data-appearance="dark"] body .course-root-head h3,
html[data-appearance="dark"] body .community-clear:hover,
html[data-appearance="dark"] body .community-avatar,
html[data-appearance="dark"] body .community-stats-v12 strong,
html[data-appearance="dark"] body .community-search-go,
html[data-appearance="dark"] body .community-tabs-v14 button.active,
html[data-appearance="dark"] body .public-avatar,
html[data-appearance="dark"] body .public-profile-head h1,
html[data-appearance="dark"] body .notes-hub-toolbar h2,
html[data-appearance="dark"] body .hub-count b,
html[data-appearance="dark"] body .reader-course-heading h2,
html[data-appearance="dark"] body .reader-note-item:hover,
html[data-appearance="dark"] body .note-reader-header h2,
html[data-appearance="dark"] body .note-reader-close:hover,
html[data-appearance="dark"] body .reader-nav-btn:hover:not(:disabled),
html[data-appearance="dark"] body .profile-avatar,
html[data-appearance="dark"] body .profile-identity h1,
html[data-appearance="dark"] body .profile-stats b,
html[data-appearance="dark"] body .profile-section-head h2,
html[data-appearance="dark"] body .profile-course-title h3,
html[data-appearance="dark"] body .profile-note-item:hover,
html[data-appearance="dark"] body .profile-private h2,
html[data-appearance="dark"] body .profile-empty h3,
html[data-appearance="dark"] body .profile-avatar-v18,
html[data-appearance="dark"] body .profile-hero-copy-v18 h1,
html[data-appearance="dark"] body .profile-stats-v18 b,
html[data-appearance="dark"] body .profile-section-head-v18 h2,
html[data-appearance="dark"] body .profile-course-main-v18 h3,
html[data-appearance="dark"] body .profile-note-row-v18:hover,
html[data-appearance="dark"] body .profile-edit-body-v18 label>input,
html[data-appearance="dark"] body .profile-edit-body-v18 label>textarea,
html[data-appearance="dark"] body .profile-edit-avatar-v18,
html[data-appearance="dark"] body .saved-head-v20 h1,
html[data-appearance="dark"] body .saved-note-v20,
html[data-appearance="dark"] body .reader-note-title,
html[data-appearance="dark"] body .saved-course-main-v22 h2,
html[data-appearance="dark"] body .notification-copy strong,
html[data-appearance="dark"] body .sidebar .page-item.active .page-title,
html[data-appearance="dark"] body .community-top-stats-v13 b,
html[data-appearance="dark"] body .community-tab-v13:hover,
html[data-appearance="dark"] body .community-avatar-v13,
html[data-appearance="dark"] body .community-author-v13 strong,
html[data-appearance="dark"] body .community-post-title-v13,
html[data-appearance="dark"] body .side-card-head-v13 b,
html[data-appearance="dark"] body .public-reader-name,
html[data-appearance="dark"] body .public-course-title,
html[data-appearance="dark"] body .public-note-title{color:var(--ink)!important;}
html[data-appearance="dark"] body pre.blk-content,
html[data-appearance="dark"] body .community-clear,
html[data-appearance="dark"] body .community-note-row,
html[data-appearance="dark"] body .reader-note-item,
html[data-appearance="dark"] body .note-reader-close,
html[data-appearance="dark"] body .note-reader-block,
html[data-appearance="dark"] body .reader-nav-btn,
html[data-appearance="dark"] body .profile-note-item,
html[data-appearance="dark"] body .profile-bio,
html[data-appearance="dark"] body .profile-note-row-v18,
html[data-appearance="dark"] body .public-note-head .public-save-note,
html[data-appearance="dark"] body .post-save-v14,
html[data-appearance="dark"] body .sidebar .page-title,
html[data-appearance="dark"] body .community-clear-v13,
html[data-appearance="dark"] body .community-note-v13 b,
html[data-appearance="dark"] body .public-block,
html[data-appearance="dark"] body .public-comment-body{color:var(--ink-2)!important;}
html[data-appearance="dark"] body .community-meta,
html[data-appearance="dark"] body .course-desc,
html[data-appearance="dark"] body .course-mini-stat span,
html[data-appearance="dark"] body .course-section-head p,
html[data-appearance="dark"] body .course-note-info p,
html[data-appearance="dark"] body .course-note-arrow,
html[data-appearance="dark"] body .course-root-head span,
html[data-appearance="dark"] body .course-more-v9,
html[data-appearance="dark"] body .home-course-info p,
html[data-appearance="dark"] body .community-search-icon,
html[data-appearance="dark"] body .community-profile-id span,
html[data-appearance="dark"] body .community-open-icon,
html[data-appearance="dark"] body .community-mini-label,
html[data-appearance="dark"] body .community-snippet-v12,
html[data-appearance="dark"] body .community-tags-v12 span,
html[data-appearance="dark"] body .community-empty-v12 .empty-icon,
html[data-appearance="dark"] body .community-empty-v12 p,
html[data-appearance="dark"] body .community-title-v14 p,
html[data-appearance="dark"] body .community-stats-v14 span,
html[data-appearance="dark"] body .community-search-v14>span,
html[data-appearance="dark"] body .community-tabs-v14 button,
html[data-appearance="dark"] body .post-body-v14 p,
html[data-appearance="dark"] body .post-tags-v14 span,
html[data-appearance="dark"] body .rail-step-v14,
html[data-appearance="dark"] body .rail-topic-v14,
html[data-appearance="dark"] body .rail-cta-v14 p,
html[data-appearance="dark"] body .public-profile-meta,
html[data-appearance="dark"] body .notes-hub-toolbar p,
html[data-appearance="dark"] body .hub-count span,
html[data-appearance="dark"] body .note-reader-empty,
html[data-appearance="dark"] body .profile-identity p,
html[data-appearance="dark"] body .profile-count-pill-v18,
html[data-appearance="dark"] body .profile-course-chevron-v18,
html[data-appearance="dark"] body .profile-tip-v18,
html[data-appearance="dark"] body .saved-head-v20 p,
html[data-appearance="dark"] body .saved-count-v20,
html[data-appearance="dark"] body .reader-save-btn,
html[data-appearance="dark"] body .saved-remove-v20,
html[data-appearance="dark"] body .reader-head-save,
html[data-appearance="dark"] body .course-save-v22,
html[data-appearance="dark"] body .saved-course-main-v22 p,
html[data-appearance="dark"] body .saved-remove-v22,
html[data-appearance="dark"] body .notification-empty p,
html[data-appearance="dark"] body .community-topbar-v13 p,
html[data-appearance="dark"] body .community-open-v13,
html[data-appearance="dark"] body .community-post-body-v13 p,
html[data-appearance="dark"] body .note-index-v13,
html[data-appearance="dark"] body .community-tags-v13 span,
html[data-appearance="dark"] body .community-steps-v13 div,
html[data-appearance="dark"] body .community-topic-list-v13 button,
html[data-appearance="dark"] body .community-empty-v13>div,
html[data-appearance="dark"] body .public-reader-meta,
html[data-appearance="dark"] body .public-empty{color:var(--ink-3)!important;}
html[data-appearance="dark"] body .eyebrow,
html[data-appearance="dark"] body .course-open-v9,
html[data-appearance="dark"] body .home-kicker,
html[data-appearance="dark"] body .home-panel-action,
html[data-appearance="dark"] body .course-back,
html[data-appearance="dark"] body .course-kicker,
html[data-appearance="dark"] body .course-add,
html[data-appearance="dark"] body .course-mini-stat,
html[data-appearance="dark"] body .community-kicker,
html[data-appearance="dark"] body .community-section-kicker,
html[data-appearance="dark"] body .community-view-link,
html[data-appearance="dark"] body .community-kicker-v14,
html[data-appearance="dark"] body .post-avatar-v14,
html[data-appearance="dark"] body .post-open-v14,
html[data-appearance="dark"] body .post-notes-v14 span,
html[data-appearance="dark"] body .post-read-v14,
html[data-appearance="dark"] body .rail-step-v14 b,
html[data-appearance="dark"] body .community-empty-v14>div,
html[data-appearance="dark"] body .public-profile-kicker,
html[data-appearance="dark"] body .hub-kicker,
html[data-appearance="dark"] body .reader-note-item:hover .reader-note-arrow,
html[data-appearance="dark"] body .note-reader-kicker,
html[data-appearance="dark"] body .profile-kicker,
html[data-appearance="dark"] body .profile-section-head>div>span,
html[data-appearance="dark"] body .profile-note-item em,
html[data-appearance="dark"] body .profile-section-head-v18 span,
html[data-appearance="dark"] body .profile-course-v18.is-open .profile-course-chevron-v18,
html[data-appearance="dark"] body .profile-note-row-v18 em,
html[data-appearance="dark"] body .saved-kicker-v20,
html[data-appearance="dark"] body .saved-arrow-v20,
html[data-appearance="dark"] body .public-note-head .public-save-note:hover,
html[data-appearance="dark"] body .post-save-v14:hover,
html[data-appearance="dark"] body .reader-save-btn:hover,
html[data-appearance="dark"] body .reader-save-btn.is-saved,
html[data-appearance="dark"] body .saved-remove-v20:hover,
html[data-appearance="dark"] body .public-back,
html[data-appearance="dark"] body .reader-head-save:hover,
html[data-appearance="dark"] body .reader-head-save.is-saved,
html[data-appearance="dark"] body .course-save-v22:hover,
html[data-appearance="dark"] body .course-save-v22.is-saved,
html[data-appearance="dark"] body .saved-course-kicker-v22,
html[data-appearance="dark"] body .saved-remove-v22:hover,
html[data-appearance="dark"] body .saved-course-arrow-v22,
html[data-appearance="dark"] body .notification-item,
html[data-appearance="dark"] body .sidebar .course-name,
html[data-appearance="dark"] body .community-eyebrow-v13,
html[data-appearance="dark"] body .community-tab-v13.active,
html[data-appearance="dark"] body .community-open-v13:hover,
html[data-appearance="dark"] body .community-post-action-v13,
html[data-appearance="dark"] body .community-steps-v13 i,
html[data-appearance="dark"] body .community-topic-list-v13 button:hover,
html[data-appearance="dark"] body .sidebar .tree-head .btn{color:var(--accent)!important;}
/* borders */
html[data-appearance="dark"] body .sidebar-search input,
html[data-appearance="dark"] body .btn,
html[data-appearance="dark"] body .empty-page,
html[data-appearance="dark"] body .community-empty,
html[data-appearance="dark"] body .auth-card,
html[data-appearance="dark"] body .community-card,
html[data-appearance="dark"] body .community-tag,
html[data-appearance="dark"] body .public-view .page-header,
html[data-appearance="dark"] body .mode-switch,
html[data-appearance="dark"] body .overview-card,
html[data-appearance="dark"] body .course-card-v9,
html[data-appearance="dark"] body .course-open-v9,
html[data-appearance="dark"] body .page-link-v9,
html[data-appearance="dark"] body .notes-empty-v9,
html[data-appearance="dark"] body .home-stat,
html[data-appearance="dark"] body .home-panel,
html[data-appearance="dark"] body .home-panel-head,
html[data-appearance="dark"] body .home-quick button,
html[data-appearance="dark"] body .course-add,
html[data-appearance="dark"] body .course-note-card,
html[data-appearance="dark"] body .course-note-icon,
html[data-appearance="dark"] body .course-root-block,
html[data-appearance="dark"] body .course-root-head,
html[data-appearance="dark"] body .course-empty,
html[data-appearance="dark"] body .course-root-head .icon,
html[data-appearance="dark"] body .community-profile-card,
html[data-appearance="dark"] body .community-stats-v12 div,
html[data-appearance="dark"] body .community-featured,
html[data-appearance="dark"] body .community-card-footer,
html[data-appearance="dark"] body .community-tags-v12 span,
html[data-appearance="dark"] body .community-empty-v12,
html[data-appearance="dark"] body .community-topbar-v14,
html[data-appearance="dark"] body .community-stats-v14,
html[data-appearance="dark"] body .community-stats-v14 div,
html[data-appearance="dark"] body .community-search-v14,
html[data-appearance="dark"] body .community-tabs-v14 button.active,
html[data-appearance="dark"] body .community-post-v14,
html[data-appearance="dark"] body .post-notes-v14>div,
html[data-appearance="dark"] body .post-foot-v14,
html[data-appearance="dark"] body .post-tags-v14 span,
html[data-appearance="dark"] body .rail-card-v14,
html[data-appearance="dark"] body .rail-step-v14,
html[data-appearance="dark"] body .rail-topic-v14,
html[data-appearance="dark"] body .community-empty-v14,
html[data-appearance="dark"] body .public-profile-head,
html[data-appearance="dark"] body .hub-count,
html[data-appearance="dark"] body .reader-note-list,
html[data-appearance="dark"] body .reader-note-item,
html[data-appearance="dark"] body .note-reader-panel,
html[data-appearance="dark"] body .note-reader-header,
html[data-appearance="dark"] body .note-reader-close,
html[data-appearance="dark"] body .note-reader-block+.note-reader-block,
html[data-appearance="dark"] body .note-reader-footer,
html[data-appearance="dark"] body .reader-nav-btn,
html[data-appearance="dark"] body .profile-hero,
html[data-appearance="dark"] body .profile-stats div,
html[data-appearance="dark"] body .profile-course,
html[data-appearance="dark"] body .profile-course>header,
html[data-appearance="dark"] body .profile-note-item,
html[data-appearance="dark"] body .profile-private,
html[data-appearance="dark"] body .profile-empty,
html[data-appearance="dark"] body .profile-hero-v18,
html[data-appearance="dark"] body .profile-cover-v18,
html[data-appearance="dark"] body .profile-stats-v18 div,
html[data-appearance="dark"] body .profile-count-pill-v18,
html[data-appearance="dark"] body .profile-course-v18,
html[data-appearance="dark"] body .profile-course-v18.is-open,
html[data-appearance="dark"] body .profile-course-icon-v18,
html[data-appearance="dark"] body .profile-course-chevron-v18,
html[data-appearance="dark"] body .profile-course-notes-v18,
html[data-appearance="dark"] body .profile-note-row-v18,
html[data-appearance="dark"] body .profile-private-v18,
html[data-appearance="dark"] body .profile-tip-v18,
html[data-appearance="dark"] body .profile-edit-body-v18 label>input,
html[data-appearance="dark"] body .profile-edit-body-v18 label>textarea,
html[data-appearance="dark"] body .saved-head-v20,
html[data-appearance="dark"] body .saved-count-v20,
html[data-appearance="dark"] body .saved-note-v20,
html[data-appearance="dark"] body .saved-empty-v20,
html[data-appearance="dark"] body .public-note-head .public-save-note,
html[data-appearance="dark"] body .post-save-v14,
html[data-appearance="dark"] body .reader-save-btn,
html[data-appearance="dark"] body .reader-note-item-wrap,
html[data-appearance="dark"] body .saved-remove-v20,
html[data-appearance="dark"] body .reader-head-save,
html[data-appearance="dark"] body .course-save-v22,
html[data-appearance="dark"] body .saved-course-v22,
html[data-appearance="dark"] body .saved-course-icon-v22,
html[data-appearance="dark"] body .saved-remove-v22,
html[data-appearance="dark"] body .notification-item,
html[data-appearance="dark"] body .notification-empty,
html[data-appearance="dark"] body .community-top-stats-v13 div,
html[data-appearance="dark"] body .community-search-wrap-v13,
html[data-appearance="dark"] body .community-post-v13,
html[data-appearance="dark"] body .community-open-v13,
html[data-appearance="dark"] body .community-note-list-v13,
html[data-appearance="dark"] body .community-note-v13,
html[data-appearance="dark"] body .community-post-foot-v13,
html[data-appearance="dark"] body .community-tags-v13 span,
html[data-appearance="dark"] body .community-side-card-v13,
html[data-appearance="dark"] body .side-card-head-v13,
html[data-appearance="dark"] body .community-steps-v13 i,
html[data-appearance="dark"] body .community-side-note-v13,
html[data-appearance="dark"] body .community-empty-v13,
html[data-appearance="dark"] body .public-reader-head,
html[data-appearance="dark"] body .public-note,
html[data-appearance="dark"] body .public-note-head,
html[data-appearance="dark"] body .public-note-more,
html[data-appearance="dark"] body .public-comment,
html[data-appearance="dark"] body .public-empty{border-color:var(--rule)!important;}
html[data-appearance="dark"] body .btn:hover,
html[data-appearance="dark"] body .community-card:hover,
html[data-appearance="dark"] body .page-link-v9:hover,
html[data-appearance="dark"] body .home-course:hover,
html[data-appearance="dark"] body .home-note:hover,
html[data-appearance="dark"] body .course-note-card:hover,
html[data-appearance="dark"] body .profile-course-v18:hover,
html[data-appearance="dark"] body .saved-note-v20:hover,
html[data-appearance="dark"] body .saved-remove-v20:hover,
html[data-appearance="dark"] body .public-back:hover,
html[data-appearance="dark"] body .saved-course-v22:hover,
html[data-appearance="dark"] body .saved-remove-v22:hover,
html[data-appearance="dark"] body .notification-item:hover,
html[data-appearance="dark"] body .community-post-v13:hover,
html[data-appearance="dark"] body .community-open-v13:hover,
html[data-appearance="dark"] body .public-note:hover{border-color:var(--ink-3)!important;}
html[data-appearance="dark"] body .profile-avatar-v18,
html[data-appearance="dark"] body .profile-edit-avatar-line{border-color:var(--card)!important;}

/* hero banners (warm gradient -> dark tinted gradient) */
html[data-appearance="dark"] body .home-hero,
html[data-appearance="dark"] body .course-hero,
html[data-appearance="dark"] body .community-hero-v12,
html[data-appearance="dark"] body .profile-cover-v18{
  background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 13%,var(--card)),var(--card) 62%)!important}
html[data-appearance="dark"] .note-reader-backdrop{background:#000000B3!important}

/* ---------- Extra dark polish (readability + feel) ---------- */
/* stat numbers & card titles must be the brightest text on a card */
html[data-appearance="dark"] body .overview-number,
html[data-appearance="dark"] body .home-stat-number,
html[data-appearance="dark"] body .course-info-v9 h3,
html[data-appearance="dark"] body .course-note-info h3,
html[data-appearance="dark"] body .home-course-info strong{color:var(--ink)!important}
html[data-appearance="dark"] body .overview-label,
html[data-appearance="dark"] body .course-info-v9 p,
html[data-appearance="dark"] body .notes-sub{color:var(--ink-2)!important}
html[data-appearance="dark"] body .course-more-v9{color:var(--ink-3)!important}
html[data-appearance="dark"] body .notes-kicker{color:var(--accent)!important}
/* decorative circle on overview cards: visible but quiet */
html[data-appearance="dark"] .overview-card:after{background:color-mix(in srgb,var(--accent) 16%,transparent)}
/* card edge + hover feedback */
html[data-appearance="dark"] body .overview-card,
html[data-appearance="dark"] body .course-card-v9,
html[data-appearance="dark"] body .home-stat,
html[data-appearance="dark"] body .home-panel,
html[data-appearance="dark"] body .course-note-card{box-shadow:inset 0 1px 0 #FFFFFF0D,0 1px 2px #00000040!important}
html[data-appearance="dark"] body .course-card-v9:hover,
html[data-appearance="dark"] body .course-note-card:hover,
html[data-appearance="dark"] body .home-stat:hover{border-color:color-mix(in srgb,var(--accent) 55%,var(--rule))!important;box-shadow:0 14px 34px -14px #000000B3!important}
/* "open course" button: outlined accent, fills on hover */
html[data-appearance="dark"] body .course-open-v9,
html[data-appearance="dark"] body .course-add{background:transparent!important;color:var(--accent)!important;border-color:color-mix(in srgb,var(--accent) 50%,var(--rule))!important;font-weight:600}
html[data-appearance="dark"] body .course-open-v9:hover,
html[data-appearance="dark"] body .course-add:hover{background:var(--accent)!important;color:#1B1512!important;border-color:var(--accent)!important}
/* sidebar: readable note titles, clear active row */
html[data-appearance="dark"] body .sidebar .page-title{color:var(--ink-2)!important}
html[data-appearance="dark"] body .sidebar .page-item:hover .page-title{color:var(--ink)!important}
html[data-appearance="dark"] body .sidebar .page-item.active{background:color-mix(in srgb,var(--accent) 16%,transparent)!important}
html[data-appearance="dark"] body .sidebar .page-item.active .page-title{color:var(--ink)!important;font-weight:600!important}
html[data-appearance="dark"] body .sidebar .page-toggle,
html[data-appearance="dark"] body .sidebar .tree-head{color:var(--ink-3)!important}
/* disabled undo/redo: dimmed but still legible */
html[data-appearance="dark"] body .btn:disabled,html[data-appearance="dark"] body .btn[disabled]{opacity:.6!important;color:var(--ink-3)!important}
/* inputs / placeholders */
html[data-appearance="dark"] input::placeholder,html[data-appearance="dark"] textarea::placeholder{color:var(--ink-3)!important;opacity:1}
html[data-appearance="dark"] body .search-kbd{background:var(--paper-3)!important;color:var(--ink-2)!important;border-color:var(--rule)!important}
/* links inside notes */
html[data-appearance="dark"] .blk-content a,html[data-appearance="dark"] .note-reader-block a{color:var(--accent-ink)}
/* softer images in dark so they don't glare */
html[data-appearance="dark"] .blk-content img,html[data-appearance="dark"] .note-reader-block img{filter:brightness(.92) contrast(1.02)}
/* thin, visible scrollbars */
html[data-appearance="dark"] *{scrollbar-color:var(--rule) transparent}
html[data-appearance="dark"] ::-webkit-scrollbar-thumb{background:var(--rule);border-color:var(--paper)}
