
/* Both course themes, keyboard focus, readable controls. */
[hidden]{display:none!important}button,a,input,select,textarea{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #b65d0a;outline-offset:4px}
.material-theme{padding:10px 13px;border:1px solid var(--line,#566979);border-radius:12px;background:#173047;color:#fff;font:700 13px/1.3 system-ui,sans-serif;cursor:pointer;min-height:44px}.storage-warning{padding:14px;background:#fff0b2;color:#3f2700;font:700 15px/1.5 system-ui,sans-serif;position:relative;z-index:100}
html[data-theme="light"]{color-scheme:light}html[data-theme="neon"]{color-scheme:dark}
html[data-theme="light"]:has(body.quiz-material),html[data-theme="light"]:has(body.hw-material){--bg:#f4f6f8;--panel:#ffffff;--text:#15293b;--muted:#425b6d;--cyan:#006579;--purple:#7040a2;--green:#146b42;--gold:#7b5200;--pink:#a32651;--bad:#ad2340;--line:#b3c3cf;--shadow:0 14px 40px rgba(30,50,70,.1)}
html[data-theme="light"] body.quiz-material,html[data-theme="light"] body.hw-material{background:#f4f6f8;color:var(--text)}
html[data-theme="light"] .quiz-material :is(.topbar,.intro,.question-card,.result,.course-return,.stats,.topic-chip,.question-tag,.badge,.mini-score,.chip,.choice){background:#fff;color:#15293b;border-color:#b3c3cf}
html[data-theme="light"] .quiz-material :is(.hero,.panel,.intro-panel,.intro-visual,.question-shell){background:#fff;color:#15293b}
html[data-theme="light"] .quiz-material :is(.choice.correct,.feedback.good){background:#e7f6ec;color:#14512e;border-color:#367b4e}
html[data-theme="light"] .quiz-material :is(.choice.wrong,.feedback.bad){background:#ffeced;color:#8c2039;border-color:#b44858}
html[data-theme="light"] .quiz-material :is(.btn,.btn.secondary){color:#163447;background:#eaf1f7;border:1px solid #8fa6b6}
html[data-theme="light"] .quiz-material .btn.primary{background:#006579;color:#fff;border-color:#006579}
html[data-theme="light"] .quiz-material input{color:#15293b;background:#fff;border-color:#8da6b8}
.quiz-material .choice:disabled{opacity:1}.quiz-material #certificate :is(input,button){min-height:44px}.quiz-material .topbar{flex-wrap:wrap}.quiz-material .material-theme{margin:0 0 12px 8px}.quiz-material .choice{min-height:52px;line-height:1.5}.quiz-material .feedback{line-height:1.6}
.summary-material{font-family:"Segoe Print","Bradley Hand","Comic Sans MS",system-ui,sans-serif!important}.summary-material .book{padding:68px 18px 94px!important}.summary-material .page{height:calc(100dvh - 174px);min-height:0;max-height:none;overflow:auto;scrollbar-gutter:stable;transform:none!important;color:#243247;--ink:#243247;--blue:#1d648f;--green:#286747;--purple:#69468b;--orange:#a35b16;--red:#a62b35;--line:rgba(72,139,184,.18);--paper:#fffdf4;color-scheme:light}.summary-material .page-fit{height:auto;min-height:100%;padding-bottom:14px}.summary-material p{font-size:16px;line-height:1.55}.summary-material .card p,.summary-material .mini p{font-size:15px;line-height:1.5}.summary-material .attention{line-height:1.5;color:#392e23}.summary-material .joke{color:#553b18;background:#fff1d4;font-size:15px;line-height:1.5}.summary-material .tag{color:#275d43}.summary-material .signature{color:#4a5c69}.summary-material .kicker{color:#1d648f}.summary-material .page small{font-size:13px;color:#415c6d}.summary-material .nav{gap:8px;flex-wrap:wrap;max-width:calc(100% - 24px);width:max-content;justify-content:center}.summary-material .nav button{min-height:44px}.summary-material .dotnav{width:28px;height:34px;padding:0;display:grid;place-items:center;border:1px solid #8294a5;background:#20384e;color:#fff;font:700 12px system-ui,sans-serif;border-radius:8px}.summary-material .dotnav.active{background:#ffcf54;color:#203044}.summary-material .copyright-note{position:fixed;top:17px;right:18px;bottom:auto;font-size:12px;color:#3d5060}
html[data-theme="neon"] .summary-material .copyright-note{color:#b8cce0}.summary-material .page h1{font-size:clamp(30px,3.2vw,48px);line-height:1.15}.summary-material .page h2{font-size:clamp(26px,2.8vw,37px);line-height:1.18}.summary-material .page h3{line-height:1.3}.summary-material .calc{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:10px 0}.summary-material input[type=range]{accent-color:#226a91;max-width:100%;min-width:150px}.summary-material .calc output{font-family:system-ui,sans-serif;color:#1d5270;font-weight:700}.summary-material .summary-table{border-collapse:collapse;width:100%;font-family:system-ui,sans-serif;font-size:14px;background:#fffefa}.summary-material .summary-table :is(td,th){border:1px solid #bac9cd;padding:9px;text-align:left;overflow-wrap:anywhere}.summary-material .summary-table th{color:#1f4663;background:#e7f0f3}.summary-material .code-route{font:600 14px/1.6 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;background:#eaf4f7;color:#21435b;padding:13px;border:1px dashed #7b9bab;border-radius:12px}.summary-material .selfcheck .case p{font-size:15px}.summary-material .reveal{min-height:44px}.summary-material .answer{font-size:15px;line-height:1.5;color:#224a60}.summary-material .footer-links a{display:inline-block;margin:6px 10px 0 0;color:#1e537c;font:bold 14px/1.5 system-ui,sans-serif}.summary-material .sources-note{font:13px/1.5 system-ui,sans-serif;color:#42586a}.summary-material .sources-note a{color:#1b5377}
html[data-theme="neon"]:has(.summary-material),html[data-theme="neon"] .summary-material{background:#07101a}html[data-theme="light"]:has(.summary-material),html[data-theme="light"] .summary-material{background:#dfe7e9}
@media(max-width:1100px){.summary-material{overflow:auto!important}.summary-material .book{position:relative;display:block;padding:74px 10px 112px!important}.summary-material .page{width:min(100%,920px);height:auto;margin:0 auto;padding:22px 20px 24px 54px}.summary-material .copyright-note{display:none}.summary-material .nav{width:calc(100% - 24px);left:12px;right:12px;transform:none;bottom:8px}.summary-material .page-fit{min-height:0}}
@media(max-width:520px){.summary-material .page{padding:20px 15px 24px 30px;background-image:linear-gradient(90deg,transparent 0 19px,rgba(215,69,69,.34) 20px 21px,transparent 22px),repeating-linear-gradient(to bottom,transparent 0 31px,rgba(72,139,184,.18) 31px 32px)}.summary-material .page:before{display:none}.summary-material :is(.grid2,.grid3,.grid4,.grid5,.two-goals,.selfcheck){grid-template-columns:1fr!important}.summary-material .flow .arrow{display:none}.summary-material .flow .step{flex-basis:42%}.summary-material .nav{gap:5px;padding:7px}.summary-material .nav button{padding:8px}.summary-material .nav .dots{gap:2px}.summary-material .nav .dotnav{width:24px;padding:0;min-height:36px}.summary-material .material-theme{font-size:11px}.summary-material .bottom-line{display:block}.summary-material .summary-table{font-size:13px}.summary-material .summary-table :is(td,th){padding:6px}.quiz-material .topbar{position:static}.quiz-material .choice{font-size:16px}.quiz-material #questionText{font-size:22px;line-height:1.4}.quiz-material .material-theme{margin:0 0 12px;font-size:12px}.quiz-material :is(.hero-title,.hero h1){overflow-wrap:anywhere}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{.summary-material :is(.return,.nav,.copyright-note,.storage-warning){display:none!important}.summary-material .book{padding:0!important;position:static}.summary-material .page{display:block!important;height:auto!important;overflow:visible!important;width:100%;break-after:page;box-shadow:none;transform:none}.summary-material .page-fit{min-height:0}.material-theme{display:none!important}}

/* Contrast fixes verified in both themes, including result and hover states. */
html[data-theme="light"] .quiz-material :is(.lead,.result p,#savedStatus){color:#425b6d}
html[data-theme="light"] .quiz-material .primary{background:#006579;color:#fff;box-shadow:none}
html[data-theme="light"] .quiz-material .secondary{background:#eaf1f7;color:#18374b;border-color:#8fa6b6}
html[data-theme="light"] .quiz-material .brand-mark{background:#7040a2;color:#fff}
html[data-theme="light"] .quiz-material .choice:hover:not(:disabled){background:#eaf4f8;border-color:#527e96;color:#163447}
html[data-theme="light"] .quiz-material .score-ring{background:conic-gradient(#146b42 var(--score),#dce6ed 0)}
html[data-theme="light"] .quiz-material .score-ring::after{background:#fff}
html[data-theme="light"] .quiz-material .progress{background:#dbe5ed}
html[data-theme="light"] .quiz-material .footer{color:#496379}
.quiz-material #certPreview p{color:#344b62!important}
.quiz-material button:disabled{cursor:default;filter:none}
.summary-material .page{scrollbar-width:thin;scrollbar-color:#71899b #d9e3e7}
.summary-material .scroll-note{font:12px/1.5 system-ui,sans-serif;color:#455d6d;margin:0 0 8px}
@media(max-width:520px){.summary-material .scroll-note{display:none}.summary-material .nav .counter{display:none}.summary-material .nav .material-theme{display:none}.summary-material .mobile-theme{display:inline-flex;position:fixed;top:10px;right:10px;z-index:20;font-size:11px;max-width:190px}.summary-material .book{padding-bottom:86px!important}}
@media(min-width:521px){.summary-material .mobile-theme{display:none}}
