/* Slightly softer light surfaces, stronger text and a consistent optional dark theme. */
:root{--ink:#142b3b;--muted:#53687b;--line:#c5cfd9;--bg:#eef2f6}
body{background:#eef2f6;color:#142b3b}
.top{background:#fff;border-bottom-color:#c4ced8}
.circle{background:#edf1f5;color:#2f4357;border:1px solid #d0d8e0}
:is(.cat,.lesson,.list-card,.streak,.recent,.support-language-bar,.support-guide-content,.support-contact-card,.support-step,.site-feedback-modal,.learning-info-modal,.passage-picker,.passage-exam-option,.custom-typing-shell,.custom-intro,.dash-skill-card,.dash-tool-card,.free-test-meter,.profile-card,.profile-panel,.pricing-card,.plan-card,.excel-test-card,.word-test-card,.lesson-card,.exam-card,.settings-card,.settings-box){border-color:#c2ccd6}
:is(.support-field input,.support-field select,.support-field textarea,.support-language-bar select,.search input,.typing-language-select,.practice-filter-select,.language-select,.filter-select){border-color:#7d8b99;color:#1b3043}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #155eef;outline-offset:2px}
html[data-theme="dark"]{color-scheme:dark;--ink:#e7edf4;--muted:#b2bfcc;--line:#465463;--bg:#111820;background:#111820;color:#e7edf4}
html[data-theme="dark"] body{background:#111820;color:#e7edf4}
html[data-theme="dark"] .top,html[data-theme="dark"] .support-guide-content,html[data-theme="dark"] .support-contact-card,html[data-theme="dark"] .support-language-bar,html[data-theme="dark"] .support-step,html[data-theme="dark"] .cat,html[data-theme="dark"] .lesson,html[data-theme="dark"] .list-card,html[data-theme="dark"] .streak,html[data-theme="dark"] .recent,html[data-theme="dark"] .site-feedback-modal,html[data-theme="dark"] .learning-info-modal,html[data-theme="dark"] .passage-picker,html[data-theme="dark"] .passage-exam-option,html[data-theme="dark"] .custom-typing-shell,html[data-theme="dark"] .custom-intro,html[data-theme="dark"] .dash-skill-card,html[data-theme="dark"] .dash-tool-card,html[data-theme="dark"] .free-test-meter,html[data-theme="dark"] .profile-card,html[data-theme="dark"] .profile-panel,html[data-theme="dark"] .pricing-card,html[data-theme="dark"] .plan-card,html[data-theme="dark"] .excel-test-card,html[data-theme="dark"] .word-test-card,html[data-theme="dark"] .lesson-card,html[data-theme="dark"] .exam-card,html[data-theme="dark"] .settings-card,html[data-theme="dark"] .settings-box,html[data-theme="dark"] .dash-action,html[data-theme="dark"] .subscription-box,html[data-theme="dark"] .support-chat-window,html[data-theme="dark"] .support-notice-panel,html[data-theme="dark"] .support-chat-messages,html[data-theme="dark"] .support-chat-compose{background-color:#1b2632!important;color:#e7edf4!important;border-color:#4a5968!important}
html[data-theme="dark"] :is(.nav button,.page-head p,.greeting p,.cat small,.streak small,.recent small,.support-guide-content>p,.support-step span,.support-field label,.support-field small,.support-language-bar small,.support-chat-info,.support-notice-item small,.support-chat-bubble time,.muted,.empty-state){color:#b2bfcc}
html[data-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.support-field input,.support-field select,.support-field textarea,.support-language-bar select){background:#111a23!important;color:#edf3f8!important;border-color:#718192!important}
html[data-theme="dark"] :is(.support-notice-item,.support-chat-bubble,.support-chat-info,.support-chat-compose,.support-notice-title,.admin-support-chat){background:#202c39!important;color:#e7edf4!important;border-color:#4a5968!important}
html[data-theme="dark"] :is(.support-step,.support-tip,.word-current-task,.instruction-copy section,.instruction-card,.word-task-sidebar,.word-ribbon,.word-ribbon-tabs,.word-ribbon-tools,.word-test-topbar,.word-document-status){background-color:#202c39!important;color:#e7edf4!important;border-color:#4a5968!important}
html[data-theme="dark"] :is(.word-document,.excel-sheet,.spreadsheet-grid,.typing-passage-box,.typing-answer-box,.passage-wrap,#passageBox,.passage-box,.answer,#answer,.answer-box){background:#111a23!important;color:#edf3f8!important;border-color:#718192!important}
html[data-theme="dark"] .circle{background:#273442;color:#eff5fa;border-color:#596979}
html[data-theme="dark"] .support-notice-item:hover,html[data-theme="dark"] .support-notice-item.unread{background:#293b4e!important}
html[data-theme="dark"] :is(.dash-skill-card,.dash-tool-card,.exam-card,.learn-lesson-card,.lesson-curriculum,.learn-language-bar,.module-tabs,.callout,.passage-controls,.passage-filter-menu,.typing-passage-list,.passage-table-wrap,.passage-table,.typing-exam-run-view,.typing-session-view,.steno-session-view,.excel-test-view,.word-instruction-view,.word-test-view,.word-analysis-view,.custom-typing-run-view,.custom-typing-setup-view){background-color:#1b2632!important;color:#e7edf4!important;border-color:#4a5968!important}
html[data-theme="dark"] :is(.dash-skill-card,.dash-tool-card,.exam-card,.learn-lesson-card,.lesson-curriculum,.learn-language-bar,.module-tabs,.callout,.passage-controls,.passage-filter-menu,.typing-passage-list,.passage-table-wrap,.passage-table,.typing-exam-run-view,.typing-session-view,.steno-session-view,.excel-test-view,.word-instruction-view,.word-test-view,.word-analysis-view,.custom-typing-run-view,.custom-typing-setup-view) :is(h1,h2,h3,h4,p,span,strong,small,label,th,td,button,a){color:#e7edf4!important}
html[data-theme="dark"] :is(.typing-passage-list,.passage-table-wrap,.passage-table,.module-tabs,.passage-filter-menu,.passage-controls) :is(tr,td,th,button,select,input){background-color:#202c39!important;color:#e7edf4!important;border-color:#536374!important}
html[data-theme="dark"] .learn-lesson-number{background:#263c55;color:#b8d6ff}
/* Explicit contrast for small clickable cards whose labels are plain strong/small text. */
html[data-theme="dark"] .quick-card{background:#1b2632!important;border:1px solid #4a5968!important;border-radius:14px;padding:12px 8px}
html[data-theme="dark"] .quick-card strong,html[data-theme="dark"] .quick-card small{color:#edf3f8!important}
html[data-theme="dark"] .dash-skill-card strong,html[data-theme="dark"] .dash-skill-card small,html[data-theme="dark"] .dash-skill-card b{color:#edf3f8!important}
html[data-theme="dark"] .exam-card,html[data-theme="dark"] .learn-lesson-card,html[data-theme="dark"] .passage-controls,html[data-theme="dark"] .passage-filter-menu,html[data-theme="dark"] .typing-passage-list,html[data-theme="dark"] .passage-table-wrap{background:#1b2632!important;color:#edf3f8!important;border-color:#657586!important}
html[data-theme="dark"] .exam-card :is(h3,strong,small,p),html[data-theme="dark"] .learn-lesson-card :is(h3,strong,small,p),html[data-theme="dark"] .passage-controls :is(label,span,strong),html[data-theme="dark"] .passage-filter-menu :is(label,span,strong),html[data-theme="dark"] .typing-passage-list :is(th,td,strong,small,span){color:#edf3f8!important}
html[data-theme="dark"] .module-tabs button{color:#dce6ef!important}
html[data-theme="dark"] .module-tabs button.active{background:#263c55!important;color:#fff!important}
/* Keep high-visibility green/blue actions above the dark surface overrides. */
html[data-theme="dark"] .typing-passage-list .passage-action,html[data-theme="dark"] .passage-table .passage-action{background:#15985f!important;color:#fff!important;border:1px solid #31bd7c!important;box-shadow:0 3px 9px #087a4a45!important}
html[data-theme="dark"] .typing-passage-list .passage-action:hover,html[data-theme="dark"] .passage-table .passage-action:hover{background:#087a4a!important;color:#fff!important}
html[data-theme="dark"] .passage-controls .passage-download-control>.passage-download-button{background:#1764df!important;color:#fff!important;border:1px solid #62a0ff!important;box-shadow:0 4px 12px #0005!important}
html[data-theme="dark"] .passage-download-menu{background:#1b2632!important;color:#edf3f8!important;border-color:#718192!important}
html[data-theme="dark"] .passage-download-menu .passage-download-head,html[data-theme="dark"] .passage-download-menu .passage-download-item,html[data-theme="dark"] .passage-download-menu .passage-download-empty{background:#202c39!important;color:#edf3f8!important;border-color:#657586!important}
html[data-theme="dark"] .passage-download-menu .passage-download-copy strong,html[data-theme="dark"] .passage-download-menu .passage-download-copy small,html[data-theme="dark"] .passage-download-menu .passage-download-head strong,html[data-theme="dark"] .passage-download-menu .passage-download-head small{color:#edf3f8!important}
/* Dashboard surfaces: preserve the colorful hero and icons, darken the reading panels. */
html[data-theme="dark"] .dash-greeting h1,html[data-theme="dark"] .dash-billing-heading h2{color:#f1f5f9!important}
html[data-theme="dark"] .dash-greeting p,html[data-theme="dark"] .dash-metric-label,html[data-theme="dark"] .dash-eyebrow{color:#afc5dc!important}
html[data-theme="dark"] .dash-metric,html[data-theme="dark"] .dash-plan-panel,html[data-theme="dark"] .dash-history-panel,html[data-theme="dark"] .dash-tool-card,html[data-theme="dark"] .dash-skill-card,html[data-theme="dark"] .free-test-meter,html[data-theme="dark"] .dash-history-panel .dash-plan-record{background:#1b2632!important;border-color:#4a5968!important;color:#edf3f8!important}
html[data-theme="dark"] .dash-metric small,html[data-theme="dark"] .dash-metric>div>span,html[data-theme="dark"] .dash-plan-panel>p,html[data-theme="dark"] .dash-panel-top small,html[data-theme="dark"] .dash-plan-record small,html[data-theme="dark"] .dash-tool-copy small,html[data-theme="dark"] .free-test-meter span{color:#b8c5d2!important}
html[data-theme="dark"] .dash-metric strong,html[data-theme="dark"] .dash-panel-top h3,html[data-theme="dark"] .dash-plan-record strong,html[data-theme="dark"] .dash-tool-copy strong,html[data-theme="dark"] .dash-skill-card strong,html[data-theme="dark"] .dash-skill-card small,html[data-theme="dark"] .dash-skill-card>b{color:#edf3f8!important}
html[data-theme="dark"] .dash-status-pill{background:#143b31!important;color:#72e0b2!important}
html[data-theme="dark"] .dash-record-count{background:#27384a!important;color:#c3d8ee!important}
html[data-theme="dark"] .dash-expired{background:#493321!important;color:#ffd09b!important}
html[data-theme="dark"] .dash-plan-record{border-color:#3d4c5b!important}
html[data-theme="dark"] .free-meter-track{background:#394858!important}
html[data-theme="dark"] .dash-weekly-card{border:1px solid #ffffff35;background:#152d4e99}
html[data-theme="dark"] .dash-tool-arrow{color:#a9baff!important}
html[data-theme="dark"] .passage-picker,html[data-theme="dark"] .passage-exam-option,html[data-theme="dark"] .passage-picker-note,html[data-theme="dark"] .custom-typing-shell,html[data-theme="dark"] .custom-typing-shell textarea{background:#1b2632!important;color:#edf3f8!important;border-color:#536374!important}
html[data-theme="dark"] .passage-picker h2,html[data-theme="dark"] .custom-intro h1,html[data-theme="dark"] .custom-passage-label,html[data-theme="dark"] .passage-exam-option strong{color:#edf3f8!important}
html[data-theme="dark"] .passage-picker>p,html[data-theme="dark"] .passage-exam-option small,html[data-theme="dark"] .custom-intro p,html[data-theme="dark"] .custom-form-footer>span{color:#b8c5d2!important}
html[data-theme="dark"] .passage-exam-mark{background:#2b3b50!important;color:#c5d8ff!important}
html[data-theme="dark"] .passage-picker-close{background:#2b3948!important;color:#f1f5f9!important;border:1px solid #657586!important}
html[data-theme="dark"] .dash-skill-card.skill-typing,html[data-theme="dark"] .dash-skill-card.skill-steno,html[data-theme="dark"] .dash-skill-card.skill-excel,html[data-theme="dark"] .dash-skill-card.skill-word{background:#1b2632!important;border-color:#536374!important}
html[data-theme="dark"] .dash-skills-overview .dash-billing-heading h2,html[data-theme="dark"] .dashboard-extra-actions .dash-billing-heading h2{color:#f1f5f9!important}
.theme-switch{position:relative;flex:none}
.theme-switch svg{width:19px;height:19px;display:block}
@media(max-width:720px){.theme-switch{display:grid}}
