/* Study appearance preference. Diagrams/photos keep their original colors. */
.study-appearance-toggle{position:relative;flex-shrink:0;margin:0 8px;border:1px solid #4d6677;border-radius:24px;padding:6px 10px;background:#132638;color:#fff;font:600 14px/1.5 system-ui;box-shadow:0 2px 8px #0003;cursor:pointer;min-height:40px;min-width:40px}
.study-appearance-toggle:focus-visible{outline:3px solid #f4bd50;outline-offset:3px}
html[data-study-theme="dark"]{color-scheme:dark;--bs-body-bg:#111c29;--bs-body-color:#e5edf5;--bs-secondary-bg:#233244;--bs-tertiary-bg:#1b2938;--bs-border-color:#526579;--bs-link-color:#96d9ff;--bs-link-hover-color:#c5eaff;--bs-emphasis-color:#fff;--bs-secondary-color:#becbd8;--bs-heading-color:#f5f8fc;--bs-card-bg:#1b2938;--bs-table-bg:#1b2938;--bs-table-color:#e5edf5;--bs-modal-bg:#1b2938;background:#111c29;color:#e5edf5}
html[data-study-theme="dark"] body,html[data-study-theme="dark"] #page,html[data-study-theme="dark"] #page-wrapper{background:#111c29!important;color:#e5edf5!important}
html[data-study-theme="dark"] :is(#page-content,#region-main,.card,.card-body,.activity-item,.course-section,.section-item,.course-content,.drawer,.drawercontent,.drawerheader,.navbar,.secondary-navigation,.moremenu,.dropdown-menu,.modal-content,.popover,.que .content,.que .formulation,.que .info,.generaltable,.list-group-item,.bg-white,.bg-light,.bg-body,.bg-body-secondary,.bg-body-tertiary,.path-mod-quiz .qnbutton,.h5p-content,.h5p-container,.h5p-dialogcards-card-content,.h5p-dialogcards-card-text-wrapper,.h5p-flashcards-card,.h5p-flashcards-container,.h5p-interactive-book,.h5p-column-content,.h5p-advanced-text){background-color:#1b2938!important;color:#e5edf5!important;border-color:#526579!important}
html[data-study-theme="dark"] :is(h1,h2,h3,h4,h5,h6,.text-dark,.text-body,.text-muted,.text-secondary,.dimmed_text,.activityname,.instancename,.nav-link,.dropdown-item,.breadcrumb-item,.courseindex-item,.courseindex-link,.h5p-dialogcards-card-text,.h5p-dialogcards-answer,.h5p-dialogcards-question,.h5p-flashcards-text,.h5p-flashcards-description){color:#e5edf5!important}
html[data-study-theme="dark"] :is(a:not(.btn),.courseindex-link){color:#96d9ff}
html[data-study-theme="dark"] :is(a:not(.btn),.nav-link,.dropdown-item):hover{color:#d2eeff!important}
html[data-study-theme="dark"] :is(.form-control,.form-select,input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),textarea,select,.editor_atto_content,.mce-content-body){background-color:#111c29!important;color:#f0f5fa!important;border-color:#708296!important}
html[data-study-theme="dark"] ::placeholder{color:#b5c3d1!important;opacity:1}
html[data-study-theme="dark"] :is(.table,table,td,th){color:inherit;border-color:#526579}
html[data-study-theme="dark"] :is(.alert-info,.que .outcome,.que .rightanswer,.que .generalfeedback,.h5p-question-feedback){background:#223d50!important;color:#e3f4ff!important;border-color:#76a7c2!important}
html[data-study-theme="dark"] :is(.alert-success,.que .correct,.h5p-flashcards-correct){background:#153e32!important;color:#d5ffea!important}
html[data-study-theme="dark"] :is(.alert-danger,.que .incorrect,.h5p-flashcards-incorrect){background:#512c34!important;color:#ffe1e6!important}
html[data-study-theme="dark"] .btn-primary,html[data-study-theme="dark"] .h5p-joubelui-button{background:#8dd8f8!important;border-color:#8dd8f8!important;color:#102433!important}
html[data-study-theme="dark"] .btn-secondary{background:#35495c!important;border-color:#8194a6!important;color:#f2f6fa!important}
html[data-study-theme="dark"] .study-appearance-toggle{background:#e5edf5;color:#132638;border-color:#e5edf5}
html[data-study-theme="dark"] .courseindex .courseindex-item.pageitem{background:#294d61!important}
html[data-study-theme="dark"] .h5p-dialogcards-cardholder{background:transparent!important}
html[data-study-theme="dark"] .h5p-dialogcards-turn{background:#35495c!important;color:#fff!important}
html[data-study-theme="dark"] .h5p-flashcards-card .h5p-flashcards-front,html[data-study-theme="dark"] .h5p-flashcards-card .h5p-flashcards-back{background:#1b2938!important;color:#e5edf5!important}
@media print{.study-appearance-toggle{display:none}}
/* Moodle Boost containers and H5P Flashcards use additional hard-coded surfaces. */
html[data-study-theme="dark"] :is(.main-inner,#page-header,.secondary-navigation .navigation,.tertiary-navigation,.activity-header,.activity-details,.activity-description,.description-inner,.completion-info,.nav-tabs .nav-link.active,.nav-tabs .nav-link:hover,.message-app,.message-app .header-container,.message-app .footer-container,.message-app .view-overview-body,.notification-area,.popover-region-container,.popover-region-content-container,.bg-secondary,.btn-submit,.h5p-cardholder,.h5p-imageholder,.h5p-foot,.h5p-actions,.h5p-dialogcards-card-footer){background-color:#1b2938!important;color:#e5edf5!important;border-color:#526579!important}
html[data-study-theme="dark"] :is(.btn-link,.btn-outline-secondary,.btn-outline-primary,.activity-navigation a,.h5p-actions li,.h5p-actions button,.h5p-flashcards .h5p-text){color:#96d9ff!important}
html[data-study-theme="dark"] :is(.btn-outline-secondary,.btn-outline-primary){border-color:#859bb0!important}
html[data-study-theme="dark"] :is(.btn-outline-secondary,.btn-outline-primary):hover{background:#35495c!important;color:#fff!important}
html[data-study-theme="dark"] .h5p-clue{background-color:transparent!important}
html[data-study-theme="dark"] .h5p-flashcards .h5p-button{background:#8dd8f8!important;color:#102433!important;border-color:#8dd8f8!important}
html[data-study-theme="dark"] .userinitials{background:#35495c!important;color:#edf6ff!important}
html[data-study-theme="dark"] :is(.tox-tinymce,.tox-editor-header,.tox-toolbar,.tox-toolbar-overlord,.tox-edit-area__iframe,.tox-toolbar__primary,.tox-toolbar__overflow,.tox-menubar,.tox-statusbar,.tox-menu,.tox-dialog,.tox-dialog__header,.tox-dialog__footer,.tox-collection__item,.tox-edit-area){background:#1b2938!important;color:#e5edf5!important;border-color:#526579!important}
html[data-study-theme="dark"] :is(.tox-tbtn,.tox-mbtn,.tox-statusbar__path-item,.tox-statusbar__wordcount,.tox-statusbar__branding a,.tox-collection__item-label,.tox-dialog__title){color:#e5edf5!important;background:transparent!important}
html[data-study-theme="dark"] .tox-tbtn svg{fill:#e5edf5!important}
html[data-study-theme="dark"] :is(.tox-tbtn:hover,.tox-tbtn--enabled,.tox-collection__item--active){background:#35495c!important}
html[data-study-theme="dark"] .study-appearance-toggle{background:#29465c;color:#edf6ff;border-color:#88b6d5}
html[data-study-theme="dark"] :is(.h5p-imagetext,.h5p-flashcards .h5p-answer,.h5p-flashcards .h5p-feedback){color:#edf6ff!important}
html[data-study-theme="dark"] :is(.btn-light,.drawer-toggles .btn,.drawer-toggler .btn,.navbar-toggler){background-color:#29465c!important;color:#edf6ff!important;border-color:#88b6d5!important}
html[data-study-theme="dark"] .navbar-toggler-icon{filter:invert(1)}
html[data-study-theme="dark"] :is(.quizreviewsummary th,.quizreviewsummary td,.qtype_essay_response.readonly){background-color:#1b2938!important;color:#e5edf5!important;border-color:#526579!important}
html[data-study-theme="dark"] .more-nav.nav-tabs{background-color:#1b2938!important;border-color:#526579!important}

/* Adjustable course index. Match Boost's desktop drawer breakpoint. */
#theme_boost-drawers-courseindex .drawercontent .courseindex-link{white-space:normal!important;overflow-wrap:anywhere;text-overflow:clip!important;min-width:0}
#study-sidebar-resize{display:none}
@media(min-width:992px){
 #theme_boost-drawers-courseindex{width:var(--study-sidebar-width,285px)!important;max-width:var(--study-sidebar-width,285px)!important;left:calc(-1 * var(--study-sidebar-width,285px) - 10px)}
 #theme_boost-drawers-courseindex.show{left:0}
 #page.drawers.show-drawer-left,#page.drawers.show-drawer-left .stickyfooter{margin-left:var(--study-sidebar-width,285px)!important}
 #study-sidebar-resize{display:block;position:absolute;right:0;top:60px;bottom:0;width:10px;cursor:col-resize;touch-action:none;z-index:2;border-right:2px solid #708296}
 #study-sidebar-resize::after{content:'';position:absolute;top:45%;right:2px;width:4px;height:44px;border-radius:4px;background:#708296}
 #study-sidebar-resize:hover,#study-sidebar-resize:focus-visible{background:#79bee766;outline:2px solid #37769b;outline-offset:-2px}
 #theme_boost-drawers-courseindex .drawercontent{padding-right:14px}
 html.study-sidebar-dragging,html.study-sidebar-dragging *{cursor:col-resize!important;user-select:none!important}
 html.study-sidebar-dragging #page.drawers{transition:none!important}
 html.study-sidebar-dragging iframe{pointer-events:none!important}
}
@media print{#study-sidebar-resize{display:none}}

@media(max-width:575px){.study-appearance-toggle{margin:0 4px;padding:6px}.study-theme-label{display:none}}

/* H5P's View attempts/Edit content actions use Bootstrap's text-primary utility. */
html[data-study-theme="dark"] .btn.text-primary{color:#96d9ff!important}
html[data-study-theme="dark"] .btn.text-primary:is(:hover,:focus-visible){color:#d2eeff!important;background-color:#35495c!important}
html[data-study-theme="dark"] .btn.text-primary:focus-visible{outline:2px solid #96d9ff;outline-offset:2px}

/* Header interaction states and Moodle's notification popover have independent surfaces. */
html[data-study-theme="dark"] .navbar :is(.nav-link,.dropdown-toggle,.popover-region-toggle,.dropdown-item):is(:hover,:focus,:focus-visible),
html[data-study-theme="dark"] .moremenu .nav-link:is(:hover,:focus,:focus-visible,.active),
html[data-study-theme="dark"] .dropdown-menu .dropdown-item:is(:hover,:focus,:focus-visible,.active){background-color:#35495c!important;color:#f2f6fa!important}
html[data-study-theme="dark"] :is(.popover-region-header-container,.popover-region-footer-container,.popover-region-content,.popover-region .empty-message,.popover-region .all-notifications,.popover-region .content-item-container,.notification-area .content-area,.notification-area .control-area,.notification-area .content-area .header,.notification-area .content-area .content,.notification-area .content-area .footer){background-color:#1b2938!important;color:#e5edf5!important;border-color:#526579!important}
html[data-study-theme="dark"] :is(.popover-region .content-item-container.unread,.notification-area .content-item-container.unread){background-color:#263e53!important;color:#e5edf5!important}
html[data-study-theme="dark"] :is(.popover-region .content-item-container,.popover-region .all-notifications,.notification-area .content-item-container):is(:hover,:focus-within,.selected){background-color:#35495c!important;color:#f2f6fa!important}
html[data-study-theme="dark"] :is(.popover-region-header-text,.popover-region .notification-message,.popover-region .notification-message a,.popover-region .timestamp,.popover-region .empty-message,.notification-area .notification-message,.notification-area .timestamp){color:#e5edf5!important}
html[data-study-theme="dark"] .popover-region-toggle::after{border-bottom-color:#1b2938!important}
html[data-study-theme="dark"] .popover-region-toggle::before{border-bottom-color:#526579!important}
