/* Final local refinement: library, reading, study and results. */
body.cortex-product.cortex-rebrand :is(#oral-overlay,#mindmap-overlay){background:var(--bg)!important;border:0!important;border-radius:0!important;backdrop-filter:none!important}
.cortex-rebrand #oral-overlay>div{background:var(--surface)!important;border:1px solid var(--border)!important;border-radius:20px!important;box-shadow:none!important}
.cortex-rebrand #mindmap-overlay h2{text-shadow:none!important;font-size:26px!important;letter-spacing:-.03em!important}
.cortex-rebrand #quiz-overlay .quiz-header,.cortex-rebrand #quiz-overlay .quiz-question,.cortex-rebrand #quiz-overlay .quiz-options{width:100%;max-width:780px;box-sizing:border-box;margin-inline:auto}
.cortex-rebrand #quiz-overlay .quiz-question{font-size:clamp(21px,2.5vw,30px)!important;font-weight:500!important;line-height:1.5!important;padding:26px 20px!important}
.cortex-rebrand #quiz-overlay .quiz-opt{min-height:60px!important;border-radius:12px!important;padding:17px!important;font-size:15px!important;line-height:1.55!important;box-shadow:none!important}
.cortex-rebrand #quiz-overlay .quiz-opt:not(.correct):not(.wrong){background:var(--surface)!important;border:1px solid var(--border)!important;color:var(--text)!important}
.cortex-rebrand #quiz-overlay .quiz-opt:not(:disabled):hover{border-color:var(--accent)!important}
.cortex-rebrand #quiz-overlay .quiz-opt.correct{background:#203a2d!important;color:#b4efd0!important;border-color:#4d9870!important}.cortex-rebrand #quiz-overlay .quiz-opt.wrong{background:#40282c!important;color:#ffc1c9!important;border-color:#b46673!important}
.cortex-rebrand :is(.plan-header,.ai-plan-viz,.plan-phase){box-shadow:none!important;border-radius:16px!important}.cortex-rebrand .phase-body{font-size:15px!important;line-height:1.75!important}.cortex-rebrand .phase-title{font-size:20px!important}.cortex-rebrand .phase-dates{font-size:12px!important;color:var(--text-muted)!important}
.cortex-rebrand .cortex-editor button:disabled{opacity:.5!important;cursor:not-allowed!important;transform:none!important;box-shadow:none!important}.cortex-rebrand .pdf-status{border-radius:12px!important;font-size:14px!important;line-height:1.6!important}.cortex-rebrand [aria-busy="true"]{cursor:progress}
@media(max-width:600px){.cortex-rebrand #oral-overlay{padding:16px!important}.cortex-rebrand #oral-overlay>div{padding:28px 20px!important;max-height:calc(100dvh - 88px)!important}.cortex-rebrand #mindmap-overlay>div:first-child{top:74px!important;padding:0 20px}.cortex-rebrand #mindmap-overlay h2{font-size:22px!important}.cortex-rebrand #quiz-overlay .quiz-question{padding:22px 16px!important}.cortex-rebrand #quiz-overlay .quiz-opt{font-size:14px!important;padding:14px!important}.cortex-rebrand .phase-body{font-size:14px!important}}
.cortex-rebrand .nebula-card>.cx-material-detail{margin-inline:18px}.cortex-rebrand .cx-library-cover>span{font-family:'Cortex Title',Arial,sans-serif!important}
.cortex-rebrand .cx-library-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:16px;margin:24px 10px 8px}.cortex-rebrand .cx-library-toolbar label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:var(--text-muted)}.cortex-rebrand .cx-library-toolbar input,.cortex-rebrand .cx-library-toolbar select{width:100%;min-width:0}.cortex-rebrand .cx-library-count{font-size:12px;color:var(--text-muted);margin:12px 10px 20px}.cortex-rebrand .cx-no-results{padding:30px;border:1px dashed var(--border);border-radius:16px;margin:12px 10px 24px}.cortex-rebrand .cx-no-results h3{margin:0 0 10px;font-size:19px}.cortex-rebrand .cx-no-results p{color:var(--text-muted);font-size:14px}
.cortex-rebrand .cx-material-detail{border-top:1px solid var(--border);padding-top:12px;margin-bottom:18px}.cortex-rebrand .cx-material-detail summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;cursor:pointer;font-size:13px;color:var(--text-muted)}.cortex-rebrand .cx-material-detail[open] summary{color:var(--accent)}.cortex-rebrand .cx-material-excerpt{white-space:pre-wrap;overflow-wrap:anywhere;max-height:260px;overflow:auto;padding:16px;margin:6px 0 12px;background:var(--bg);border:1px solid var(--border);border-radius:10px;font-size:14px;line-height:1.75}.cortex-rebrand .cx-excerpt-note{font-size:12px;color:var(--text-muted)}
body.cortex-product.cortex-rebrand .nebula-grid{align-items:start}.cortex-rebrand .card-sub-actions{gap:6px!important}.cortex-rebrand .card-more-btn{font-size:22px}.cortex-rebrand .card-progress-row{flex-wrap:wrap;gap:8px}.cortex-rebrand .card-progress-pct{font-size:11px!important}.cortex-rebrand .card-stats-inline{font-size:13px!important}
body.cortex-product.cortex-rebrand #study-overlay{padding:24px!important;border:0!important;border-radius:0!important;overflow-y:auto!important;backdrop-filter:none!important}
body.cortex-product.cortex-rebrand .study-box{max-width:760px!important;width:100%!important;background:transparent!important;border:0!important;padding:0!important;box-shadow:none!important;border-radius:0!important;margin:auto}
body.cortex-product.cortex-rebrand #study-session{padding:24px 0!important;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}
body.cortex-product.cortex-rebrand .study-close{position:relative!important;top:auto!important;right:auto!important;display:flex;margin-left:auto;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid var(--border)!important;border-radius:50%!important;color:var(--text-muted)!important;font-size:22px!important;background:var(--surface)!important}
.cortex-rebrand #study-streak{font-size:12px!important;margin-bottom:8px!important}.cortex-rebrand #study-progress{color:var(--text-muted)!important;font-size:12px!important;letter-spacing:.1em!important}.cortex-rebrand #study-session>.progress-bar{height:3px!important;margin:16px auto 26px!important;max-width:340px}.cortex-rebrand #flip-card{margin-bottom:22px!important;border-radius:20px;outline-offset:5px}
body.cortex-product.cortex-rebrand #flip-inner{height:clamp(310px,48vh,480px)!important}
body.cortex-product.cortex-rebrand :is(.flip-front,.flip-back){border-radius:20px!important;padding:36px!important;background:var(--surface)!important;box-shadow:none!important;overflow-y:auto}
body.cortex-product.cortex-rebrand :is(#card-question,#card-answer){font-size:clamp(20px,2.3vw,30px)!important;font-weight:500!important;line-height:1.55!important;max-width:36ch;margin-block:auto;overflow-wrap:anywhere;flex-shrink:0}
.cortex-rebrand .flip-front>div:last-child{font-size:12px!important;font-weight:500!important;margin-top:24px!important}.cortex-rebrand #rating-buttons{max-width:600px;margin:18px auto 0!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}.cortex-rebrand #rating-buttons button{font-size:14px!important;border-radius:12px!important;min-height:54px;padding:12px!important}
body.cortex-product.cortex-rebrand #session-done{padding:36px!important;border-radius:20px!important;background:var(--surface)!important;border:1px solid var(--border)!important;box-shadow:none!important;margin-top:24px}
.cortex-rebrand #session-done>div:first-child{font-size:28px!important;width:64px;height:64px;display:grid;place-items:center;margin:0 auto 22px!important;border-radius:50%;background:#293b35}.cortex-rebrand #session-done h3{font-size:30px!important;margin:0 0 12px!important}.cortex-rebrand #session-done>p{max-width:42ch;margin:0 auto 28px!important;font-size:14px;line-height:1.6}
.cortex-rebrand #session-stats{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px!important;margin-bottom:24px!important}.cortex-rebrand #session-stats .stat-box{min-width:0!important;background:var(--bg)!important;border:1px solid var(--border)!important;border-radius:12px!important;padding:18px 10px!important}.cortex-rebrand #session-stats .val{font-size:25px!important}.cortex-rebrand #session-stats .lbl{font-size:11px!important;text-transform:none!important;letter-spacing:0!important;margin-top:6px}.cortex-rebrand #study-share-btn{background:var(--surface2)!important;border:1px solid var(--border)!important;border-radius:10px!important;box-shadow:none!important;color:var(--text)!important;font-weight:500!important}.cortex-rebrand #study-share-btn-container{margin:0 0 20px!important}
.cortex-rebrand #session-done>[data-fn="closeStudy"]{min-height:48px;width:100%;max-width:360px}.cortex-rebrand #tolc-sim-overlay h2{font-size:27px!important}.cortex-rebrand #tolc-sim-overlay>div{scrollbar-width:thin;scrollbar-color:#575063 transparent}
@media(max-width:600px){.cortex-rebrand .cx-library-toolbar{grid-template-columns:1fr;margin-inline:0;gap:12px}.cortex-rebrand .cx-library-count{margin-inline:0}.cortex-rebrand .cx-filter{flex-direction:row!important;align-items:center;gap:12px!important}.cortex-rebrand .cx-filter select{flex:1}.cortex-rebrand .cx-material-excerpt{font-size:14px}.cortex-rebrand .cx-material-detail summary{min-height:44px}
 body.cortex-product.cortex-rebrand #study-overlay{padding:16px!important;padding-bottom:calc(16px + env(safe-area-inset-bottom))!important;justify-content:flex-start!important}.cortex-rebrand .study-box{margin:0 auto!important}.cortex-rebrand #study-session{padding-top:16px!important}body.cortex-product.cortex-rebrand #flip-inner{height:clamp(280px,46dvh,440px)!important}body.cortex-product.cortex-rebrand :is(.flip-front,.flip-back){padding:24px!important}.cortex-rebrand #rating-buttons button{font-size:12px!important;padding:10px 6px!important}body.cortex-product.cortex-rebrand #session-done{padding:24px 18px!important}.cortex-rebrand #session-done h3{font-size:25px!important}.cortex-rebrand #session-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cortex-rebrand #session-stats .val{font-size:23px!important}.cortex-rebrand #tolc-sim-overlay h2{font-size:23px!important}
}
