/* Shared by the portal, full source documents and all Quarto books. */
:root{--theme-page:#fff;--theme-surface:#fff;--theme-raised:#f2f6f8;--theme-text:#183247;--theme-muted:#526a7c;--theme-border:#dce5ea;--theme-link:#206186}
.nav-actions{display:flex;align-items:center;gap:24px}
.theme-toggle{font:600 12px/1.5 Tahoma,Arial,sans-serif;white-space:nowrap;cursor:pointer;padding:8px 12px;border:1px solid var(--theme-border);border-radius:4px;background:var(--theme-surface);color:var(--theme-text);min-height:38px;flex-shrink:0}
.theme-toggle:hover{background:var(--theme-raised)}
.theme-toggle:focus-visible{outline:3px solid #158099;outline-offset:3px}
/* Restore explicit pairs where the portal's global CSS collided with documents. */
#document-content th{background:#102d47;color:#fff}
#document-content .plan-head p{color:#fff;opacity:1}
#document-content .b .plan-head{background:linear-gradient(135deg,#245c4a,#2e755c)}
#document-content .credit-box span{color:#fff;opacity:1}
#document-content .hero p{color:#e8f2f8}
#document-content .hero .eyebrow{color:#b9e4ef;opacity:1}

html[data-theme="dark"]{--theme-page:#0d1823;--theme-surface:#152536;--theme-raised:#203347;--theme-text:#e4edf5;--theme-muted:#afc1d0;--theme-border:#365065;--theme-link:#99d9ef;--ink:var(--theme-text);--muted:var(--theme-muted);--line:var(--theme-border);--soft:var(--theme-surface);--soft2:var(--theme-raised);--white:var(--theme-surface);--blue:var(--theme-link)}
html[data-theme="dark"] body{color:var(--theme-text);background:var(--theme-page)}
html[data-theme="dark"] .site-header{background:#122130;border-color:var(--theme-border)}
html[data-theme="dark"] :is(.brand-symbol,.footer-brand,.track-total strong){color:var(--theme-text)}
html[data-theme="dark"] :is(.site-footer,.band){background:#101f2c}
html[data-theme="dark"] :is(.course-card,.track,.resource-panel){background:var(--theme-surface);border-color:var(--theme-border)}
html[data-theme="dark"] .pill{background:#23394b;color:#d2e1ec;border-color:#3c5569}
html[data-theme="dark"] .pill.core{background:#173d34;color:#b1edce;border-color:#366757}
html[data-theme="dark"] .button.secondary{background:#22394b;color:#e3f0f7;border-color:#547186}
html[data-theme="dark"] :is(.access-note,.note){background:#193243;color:#d4e4ef;border-color:#456879}
html[data-theme="dark"] :is(.access-note p,.note p,.english,.status,.sub-link){color:var(--theme-muted)}
html[data-theme="dark"] .cover-number{color:#ffffff8f}
html[data-theme="dark"] .book-cover{box-shadow:6px 7px 0 #243b4d}
html[data-theme="dark"] th{background:#223d52;color:#f4f8fc}
html[data-theme="dark"] .skip{background:var(--theme-surface);color:var(--theme-text)}

/* The legacy curriculum/TQF documents have their own palettes and white surfaces. */
html[data-theme="dark"] .document-toolbar{color:var(--theme-muted)}
html[data-theme="dark"] .document-toolbar a{color:var(--theme-link)}
html[data-theme="dark"] .document-toolbar button{color:var(--theme-text);background:var(--theme-surface);border-color:var(--theme-border)}
html[data-theme="dark"] #document-content{color:var(--theme-text)}
html[data-theme="dark"] #document-content :is(.page,.plan-card,.plan-body,.track,.course,.compare-card,.knowledge-node,.rule,.sem,.common-box,.meta,.phase div){background:var(--theme-surface);border-color:var(--theme-border)}
html[data-theme="dark"] #document-content :is(h1,h2,h3,h4,.section-title,.knowledge-node strong,.rule strong){color:var(--theme-text)}
html[data-theme="dark"] #document-content h3[style*="color"]{color:var(--theme-text)!important}
html[data-theme="dark"] #document-content :is(.plan-head h3,.hero h1){color:#fff}
html[data-theme="dark"] #document-content :is(p,.lead,blockquote){color:var(--theme-muted)}
html[data-theme="dark"] #document-content :is(.plan-head p,.hero p){color:#fff}
html[data-theme="dark"] #document-content .subtitle{color:var(--theme-link)}
html[data-theme="dark"] #document-content :is(th,.sem th){background:#223d52;color:#f4f8fc;border-color:var(--theme-border)}
html[data-theme="dark"] #document-content td{color:var(--theme-text);border-color:var(--theme-border);background:var(--theme-surface)}
html[data-theme="dark"] #document-content tr:nth-child(even) td{background:#1b3041}
html[data-theme="dark"] #document-content :is(td.same,td.split){background:#21394b!important}
html[data-theme="dark"] #document-content :is(.tag,.pill,.sem h4){background:#233d51;color:#d4edf8;border-color:var(--theme-border)}
html[data-theme="dark"] #document-content :is(.note,blockquote){background:#243846;color:#e6ecf3}
html[data-theme="dark"] #document-content .footer{background:#112231;color:var(--theme-muted)}
html[data-theme="dark"] #document-content .course .n{background:#275875;color:#fff}

/* Quarto keeps its own layout and navigation; override colors, not its geometry. */
.ise-book .ise-portal-nav{background:var(--theme-surface);border-color:var(--theme-border);color:var(--theme-text);flex-wrap:wrap}
.ise-book .ise-portal-nav a{color:var(--theme-link)}
.ise-book .ise-portal-nav .theme-toggle{padding:4px 8px;min-height:30px;font-size:11px}
html[data-theme="dark"] body.ise-book{--bs-body-color:#e4edf5;--bs-body-color-rgb:228,237,245;--bs-body-bg:#0d1823;--bs-body-bg-rgb:13,24,35;--bs-emphasis-color:#eef6fc;--bs-emphasis-color-rgb:238,246,252;--bs-secondary-color:#afc1d0;--bs-secondary-bg:#203347;--bs-tertiary-bg:#152536;--bs-border-color:#365065;--bs-heading-color:#e4edf5;--bs-link-color:#99d9ef;--bs-link-hover-color:#c2eaf8;color:#e4edf5;background:#0d1823}
html[data-theme="dark"] .ise-book :is(#quarto-sidebar,#quarto-margin-sidebar,#quarto-header,.quarto-secondary-nav){background:#0d1823;color:#e4edf5}
html[data-theme="dark"] .ise-book :is(h1,h2,h3,h4,h5,h6,.quarto-title-meta-heading,.quarto-title-meta-contents,.sidebar-title){color:#e4edf5}
html[data-theme="dark"] .ise-book a{color:#99d9ef}
html[data-theme="dark"] .ise-book :is(.quarto-btn-toggle,.quarto-search-button){color:#e4edf5}
html[data-theme="dark"] .ise-book :is(.sidebar-item-text,.sidebar-item-text a,.sidebar nav[role="doc-toc"] a){color:#afc1d0}
html[data-theme="dark"] .ise-book :is(.sidebar-item-text.active,.sidebar-item-text a.active,.sidebar nav[role="doc-toc"] a.active){color:#a9e4f3}
html[data-theme="dark"] .ise-book #TOC a.active{color:#a9e4f3!important;border-left-color:#a9e4f3}
html[data-theme="dark"] .ise-book :is(.chapter-number,.header-section-number,.toc-section-number){color:#afc1d0}
html[data-theme="dark"] .ise-book :is(.quarto-page-breadcrumbs,.quarto-page-breadcrumbs a,figcaption,.quarto-figure-caption,.quarto-code-filename){color:#afc1d0}
html[data-theme="dark"] .ise-book .table{--bs-table-color:#e4edf5;--bs-table-bg:transparent;--bs-table-border-color:#365065;--bs-table-striped-color:#e4edf5;--bs-table-striped-bg:#1b3041;color:#e4edf5}
html[data-theme="dark"] .ise-book :is(td,th){color:#e4edf5;border-color:#365065}
html[data-theme="dark"] .ise-book th{background:#223d52}
html[data-theme="dark"] .ise-book :is(.callout,.callout-body-container){background:#152b3d;color:#e4edf5}
html[data-theme="dark"] .ise-book .callout .callout-header{background:#233d52;color:#f4f8fc}
html[data-theme="dark"] .ise-book :is(blockquote,.quarto-code-filename-container){background:#152536;color:#c8dbe8;border-color:#547186}
html[data-theme="dark"] .ise-book :is(pre,div.sourceCode){background:#132332;color:#dceaf4;border-color:#365065}
html[data-theme="dark"] .ise-book pre code span{color:#dceaf4}
html[data-theme="dark"] .ise-book pre code :is(.kw,.cf,.fu,.bu){color:#91d8ff}
html[data-theme="dark"] .ise-book pre code :is(.st,.ch,.vs){color:#b8e5b0}
html[data-theme="dark"] .ise-book pre code :is(.dv,.fl,.bn,.dt){color:#edc19b}
html[data-theme="dark"] .ise-book pre code :is(.co,.do,.cv){color:#a8bbc9}
html[data-theme="dark"] .ise-book p code{background:#23394b;color:#f1c2e9}
html[data-theme="dark"] .ise-book :is(.aa-Input,.aa-Form,.aa-Panel,.aa-DetachedContainer){background:#152536;color:#e4edf5;border-color:#365065}
html[data-theme="dark"] .ise-book .aa-Item[aria-selected="true"]{background:#243f54}
html[data-theme="dark"] .ise-book :is(.aa-Item,.aa-ItemContent,.search-result-title,.search-result-text){color:#e4edf5}
html[data-theme="dark"] .ise-book .aa-Input::placeholder{color:#afc1d0}
/* Figures were authored on white; preserve their original colors and labels. */
html[data-theme="dark"] .ise-book :is(figure img,figure svg){background:#fff;border-radius:3px}
@media(max-width:1000px){.nav-actions{gap:15px}}
@media(max-width:700px){.site-header .nav-shell{position:relative}.site-header .brand{align-self:flex-start}.site-header .nav-actions{display:contents}.site-header .theme-toggle{position:absolute;top:13px;right:0;padding:6px 9px;font-size:11px;min-height:32px}.site-header nav{width:100%}.site-header .brand-text{font-size:7px;letter-spacing:.7px;padding-left:10px}.site-header .brand{gap:10px}}
@media print{html{color-scheme:light!important}#document-content th{background:#e8eff4!important;color:#102d47!important}#document-content .plan-head{background:#e8eff4!important}#document-content :is(.plan-head h3,.plan-head p,.credit-box,.credit-box span){color:#102d47!important}}
/* Printing always uses a light palette, regardless of the reading preference. */
@media print{.theme-toggle{display:none!important}html[data-theme="dark"] body,html[data-theme="dark"] #document-content,html[data-theme="dark"] #document-content :is(.page,.plan-card,.plan-body,.track,.course,.compare-card,.knowledge-node,.rule,.sem,.common-box,.meta,.phase div){background:#fff!important;color:#172b3a!important}html[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6,p,li,td,figcaption,blockquote),html[data-theme="dark"] #document-content :is(h1,h2,h3,h4,p,td){color:#172b3a!important}html[data-theme="dark"] :is(th),html[data-theme="dark"] #document-content th{background:#e8eff4!important;color:#102d47!important}html[data-theme="dark"] #document-content :is(td,td.same,td.split){background:#fff!important;color:#172b3a!important}html[data-theme="dark"] #document-content .plan-head{background:#e8eff4!important}html[data-theme="dark"] #document-content :is(.plan-head h3,.plan-head p,.credit-box,.hero h1,.hero p){color:#102d47!important}html[data-theme="dark"] #document-content .hero{background:#fff!important}html[data-theme="dark"] .ise-book :is(pre,div.sourceCode,.callout,.callout-body-container,.callout-header){background:#fff!important;color:#172b3a!important}html[data-theme="dark"] .ise-book pre code span{color:#172b3a!important}}
