/* Makindo unified interface — 2026-11-09. Visual-only layer; content stores and auth remain separate. */
:root{color-scheme:light;--mk-bg:#f4f7f8;--mk-panel:#fff;--mk-text:#183444;--mk-sub:#506977;--mk-border:#d8e3e7;--mk-accent:#086e75;--mk-tint:#e8f4f3;--mk-radius:14px;--mk-elevation:0 9px 28px rgba(23,48,63,.055)}
html{scroll-padding-top:90px}
body:not(.night){--paper:#f4f7f8;--page:#fff;--card:#fff;--ui:#fff;--ink:#193644;--muted:#536e7b;--line:#d8e3e7;--box:#e8f4f3;--soft:#e8f4f3;--navy:#14394c;--navy2:#17636c;--sea:#117981;--sea2:#086e75;--ml-bg:#f4f7f8;--ml-ink:#193644;--ml-muted:#536e7b;--ml-edge:#d8e3e7;--ml-paper:#fff;--ml-primary:#086e75;--ml-soft:#e8f4f3;--ml-soft-ink:#0c5f61}
body.night{color-scheme:dark;--mk-bg:#111c27;--mk-panel:#1b2a38;--mk-text:#e5f0f4;--mk-sub:#b3c5cf;--mk-border:#385366;--mk-accent:#72dcd6;--mk-tint:#23424a;--mk-elevation:0 9px 30px rgba(0,0,0,.22);--ml-bg:#111c27;--ml-ink:#e5f0f4;--ml-muted:#b3c5cf;--ml-edge:#385366;--ml-paper:#1b2a38;--ml-primary:#72dcd6;--ml-soft:#23424a;--ml-soft-ink:#a5f1e0}
body{margin:0!important;background:var(--mk-bg);color:var(--mk-text);-webkit-font-smoothing:antialiased;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
a{transition:color .15s ease,background .15s ease,border-color .15s ease}
:where(a,button,input,select,textarea,summary):focus-visible{outline:3px solid #27a2b3!important;outline-offset:3px}
:where(input,select,textarea){max-width:100%}
/* One site-wide primary navigation. Scrolling on small screens rather than shrinking text to illegibility. */
.mk-section-switcher{top:0!important;z-index:85!important;background:#102f41!important;border:0!important;border-bottom:1px solid #355467!important;box-shadow:0 3px 15px rgba(6,25,37,.18)!important;font-family:system-ui,-apple-system,'Segoe UI',sans-serif!important}
.mk-section-switcher .mk-switch-inner{max-width:1500px;min-height:58px;padding:5px clamp(14px,2.5vw,32px);gap:21px}
.mk-section-switcher .mk-switch-brand{font-size:16px;letter-spacing:.07em;font-weight:850;color:#fff!important;padding-right:15px;border-right:1px solid #61859455}
.mk-section-switcher .mk-switch-items{gap:5px;align-items:center;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#698f99 transparent}
.mk-section-switcher a.mk-switch-link{padding:10px 13px;border-radius:9px;font-size:13px;font-weight:650;color:#cce4ea!important}
.mk-section-switcher a.mk-switch-link:hover,.mk-section-switcher a.mk-switch-link:focus-visible{background:#274e5d!important;color:#fff!important}
.mk-section-switcher a.mk-switch-link[aria-current=page]{background:#ddf3ef!important;color:#134a50!important;box-shadow:none!important}
.mk-theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #62808b;border-radius:9px;background:#183f51;color:#f4ffff;padding:8px 11px;white-space:nowrap;font:650 12px/1.25 system-ui;cursor:pointer;min-width:75px;min-height:37px}
.mk-theme-toggle:hover{background:#2a5667}
.mk-theme-toggle .mk-theme-icon{font-size:15px}
/* Secondary headers are section identity and tools only, not another copy of the primary links. */
.bd-head{background:var(--mk-bg)!important;color:var(--mk-text)!important;border-bottom:1px solid var(--mk-border)!important}
.bd-head .bd-wrap{max-width:1400px!important;padding:12px clamp(16px,3.4vw,42px)!important;gap:18px}
.bd-head .bd-brand{color:var(--mk-text)!important;font-size:20px;font-weight:780;letter-spacing:-.025em}
.bd-head .bd-brand b{color:var(--mk-accent)}
.bd-head .bd-brand span{opacity:.82}
.bd-head nav[aria-label='Site']{gap:10px}
.bd-head nav[aria-label='Site']>a{display:none!important}
.bd-head .bd-linkbtn{color:var(--mk-text)!important;text-decoration:none!important;border:1px solid var(--mk-border)!important;border-radius:8px;padding:7px 11px;background:var(--mk-panel);font-weight:650;font-size:13px}
.bd-head .bd-linkbtn:hover{background:var(--mk-tint)}
.bd-head #rf-night,.bd-head #bd-night{display:none!important}
.bd-head #rf-owner,.bd-head #bd-user{color:var(--mk-sub);font-size:12px}
.sitehead{top:58px!important;box-shadow:0 2px 10px rgba(0,0,0,.07)!important}
.sitehead .head-inner{padding:8px 24px!important;max-width:1460px!important;min-height:56px}
.sitehead .brand{font:750 15px/1.25 system-ui,-apple-system,'Segoe UI',sans-serif!important;letter-spacing:0!important}
.sitehead .brand small{display:none!important}
.sitehead .headlinks{gap:14px}
.sitehead .headlinks a{font-weight:650;white-space:nowrap}
.sitehead .mk-safety-strip{padding:7px 14px!important;font-size:12px!important;line-height:1.45!important;max-height:none}
.mk-safety-strip{font-size:12px!important}
/* Pages and readers */
.read-layout,.home-shell{gap:20px!important}
.bookpage,.images-panel,.ml-panel,.ml-stat,.ml-module,.ml-modules,.mkq-card,.rf-content{border-radius:var(--mk-radius)!important;border:1px solid var(--mk-border)!important;box-shadow:var(--mk-elevation)!important}
.bookpage{max-width:930px!important;line-height:1.73}
.bookpage h1,.rf-head h1{letter-spacing:-.035em}
.bookpage .bookbody p,.rf-content p{margin-block:.7em 1em}
.chapternav,.book-index-sidebar,.mk-exam-rail{border-radius:13px!important;border-color:var(--mk-border)!important;box-shadow:var(--mk-elevation)!important}
.chapternav a{font-size:13px!important;line-height:1.42!important;border-radius:7px!important}
.chapternav a.active{background:var(--mk-tint)!important;color:var(--mk-accent)!important}
.cover{max-width:1070px!important;margin:20px auto 24px!important;border-radius:20px!important;padding:clamp(32px,5vw,70px)!important;box-shadow:none!important}
.cover h1{letter-spacing:-.045em!important;margin:16px 0!important;font-size:clamp(34px,5vw,58px)!important}
.cover .subtitle{font-size:clamp(18px,2vw,22px)!important}
.btn,.bd-btn,.qe-btn,.ml-button{border-radius:9px!important;min-height:39px}
.mainindex{max-width:1140px}
.toc-specialty,.mk-home-questions,.mk-exam-shortcuts{border-radius:12px!important}
.searchbar input,.searchbar select,.rf-search,.rf-side input,.rf-filters select{min-height:44px;border:1px solid #96afb9!important;border-radius:9px!important}
body.night .searchbar input,body.night .searchbar select,body.night .rf-search,body.night .rf-side input,body.night .rf-filters select{border-color:#527382!important}
/* Topics: genuine two-panel reference reader, legible search, no giant empty gutter. */
.rf-layout{max-width:1480px!important;grid-template-columns:minmax(245px,295px) minmax(0,1fr)!important;gap:24px!important;padding:16px clamp(14px,2.5vw,30px) 42px!important}
.rf-layout>main.bd-wrap{max-width:1050px!important;margin:0 auto!important;width:100%;padding:16px 0 40px!important}
.rf-side{top:76px!important;height:calc(100dvh - 86px)!important;border:1px solid var(--mk-border);border-radius:13px;background:var(--mk-panel);padding:14px!important;box-shadow:var(--mk-elevation);overflow:hidden}
.rf-topics{overflow:auto;min-height:0}
.rf-topics a{border-radius:7px;padding:8px 10px!important}
.rf-list{gap:10px}.rf-item a{padding:16px 18px!important;border-radius:12px!important;box-shadow:0 1px 8px #1233440b}
.rf-item .t{font-size:16px}.rf-item .s{line-height:1.5}
.rf-head h1{font-size:clamp(29px,3.4vw,40px)!important}
.rf-content{padding:clamp(18px,3.5vw,38px)!important;line-height:1.72!important}
.rf-content :is(table,pre){max-width:100%;overflow-x:auto}
.rf-content :is(.notebox,aside,.fy-amber){border-radius:9px!important;padding:15px 18px!important}
.rf-content :is(p,div,span,section,td,th,li)[style*='color: white'],.rf-content :is(p,div,span,section,td,th,li)[style*='color:#fff']{text-shadow:none}
.rf-content :is(blockquote,aside,section,div)[style*='background']{border-radius:8px}
.rf-draft,.ml-safety{border-radius:10px!important}
/* Visible, non-technical service messaging. */
.mk-service-alert{background:#fff5df!important;color:#5c3a0a!important;border:1px solid #dbb46f!important;border-left:4px solid #a66e12!important;border-radius:11px;padding:17px 20px;margin:16px 0;font:500 14px/1.55 system-ui}
.mk-service-alert a{color:#765008!important;text-decoration:underline}
body.night .mk-service-alert{background:#392a16!important;color:#ffe0a2!important;border-color:#916e37!important}
/* Exam question editor and question-bank list: reduce button clutter, keep focus on content. */
.qa-owner-links{background:var(--mk-bg)!important;color:var(--mk-sub);padding:9px 20px!important;border-bottom:1px solid var(--mk-border)!important;font-size:13px}
.qa-owner-links a[href='../reference/index.html']{display:none!important}
.qe-topbar,.qe-queue,.qe-detail,.qe-footerbar{border-color:var(--mk-border)!important}
.qe-topbar{padding:22px clamp(18px,3vw,36px)!important}
.qe-topbar h1{letter-spacing:-.035em}
.qe-queue,.qe-detail{background:var(--mk-panel)!important}
.qe-workspace{gap:16px!important}
.qe-results :is(button,a):hover{background:var(--mk-tint)!important}
/* Community and personal learning. */
main.bd-wrap{max-width:1060px}
.bd-card,.bd-panel,.ml-panel{border-radius:14px!important}
.ml-shell{max-width:1260px!important}
.ml-hero{border-radius:19px!important;box-shadow:none!important}
.ml-pathway{min-height:0!important;border-radius:14px!important}
.ml-stat{border-color:var(--mk-border)!important}
.ml-catalog-row{padding:13px 3px!important}
/* Universal content contrast. Treat legacy hand-authored boxes as foreground+background pairs in both modes. */
body.night .rf-content [style*='background-color: white'],body.night .rf-content [style*='background:#fff'],body.night .bookbody [style*='background-color: white']{color:#233644!important}
body:not(.night) .rf-content [style*='background-color: black'],body:not(.night) .rf-content [style*='background:#000']{color:#f8fafc!important}
body.night :is(.toc-specialty,.search-hit,.images-panel,.ml-panel,.rf-content,.rf-item a,.mkq-card){background:var(--mk-panel)!important;color:var(--mk-text)!important}
body.night :is(.toc-specialty summary,.toc-list a,.bookpage h1,.bookpage h2,.bookpage h3,.bookbody h2,.bookbody h3){color:var(--mk-text)!important}
body.night .cover{color:#fff}
/* Responsive and accessible */
@media(max-width:1100px){.rf-layout{grid-template-columns:260px minmax(0,1fr)!important;gap:15px!important}.mk-section-switcher .mk-switch-inner{gap:8px}.sitehead .headlinks{gap:8px}}
@media(max-width:900px){.rf-layout{display:block!important;padding:10px 16px 30px!important}.rf-layout .rf-side{display:none;position:fixed!important;inset:65px 0 0 0!important;height:calc(100dvh - 65px)!important;border-radius:0!important;z-index:96!important}.rf-layout .rf-side.open{display:flex}.rf-sidebtn{display:inline-block!important}.rf-layout>main.bd-wrap{max-width:100%!important}.ml-hero-mark{display:none}}
@media(max-width:760px){.mk-section-switcher .mk-switch-inner{min-height:56px;padding:5px 10px!important;gap:8px}.mk-section-switcher .mk-switch-brand{display:inline-block!important;font-size:12px;padding-right:9px}.mk-section-switcher .mk-switch-items{justify-content:flex-start!important;min-width:0;gap:2px}.mk-section-switcher a.mk-switch-link{flex:0 0 auto!important;font-size:12px!important;padding:9px 10px!important}.mk-theme-toggle{padding:8px;min-width:39px;min-height:37px}.mk-theme-toggle .mk-theme-label{display:none}.sitehead{top:56px!important}.headlinks{overflow:auto;max-width:58vw}.bookpage{padding:22px 17px!important}.ml-shell{padding:16px 14px 60px!important}.ml-hero{padding:25px!important}.rf-layout{padding-inline:12px!important}.rf-content{padding:17px!important}}
@media(max-width:480px){.bd-head .bd-wrap{padding:9px 12px!important}.bd-head .bd-brand{font-size:17px}.rf-head h1{font-size:28px!important}.sitehead .brand{font-size:13px!important}.sitehead .head-inner{padding:8px 12px!important}.cover{margin:14px 12px!important}.cover h1{font-size:35px!important}.ml-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media print{.mk-section-switcher,.mk-theme-toggle{display:none!important}.sitehead{top:0!important}.rf-layout{display:block!important}.rf-layout .rf-side{display:none!important}.mk-service-alert{display:none!important}.bookpage,.rf-content{border:0!important;box-shadow:none!important}}
/* Consolidated superuser quick launches: keep the actual editors independently secured. */
.mk-admin-launch{border:1px solid var(--mk-border);background:var(--mk-tint);border-radius:15px;padding:22px;margin:8px 0 24px}
.mk-admin-launch-head{display:flex;align-items:baseline;flex-wrap:wrap;justify-content:space-between;gap:10px;margin-bottom:15px}
.mk-admin-launch-head h2{font:780 21px system-ui!important;margin:0!important;color:var(--mk-text)!important;letter-spacing:-.035em}
.mk-admin-launch-head p{margin:0;color:var(--mk-sub);font-size:13px}
.mk-admin-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.mk-admin-tile{background:var(--mk-panel);border:1px solid var(--mk-border);border-radius:11px;padding:15px;text-decoration:none!important;display:flex;flex-direction:column;gap:5px}
.mk-admin-tile:hover{border-color:var(--mk-accent);box-shadow:0 2px 12px #17354316}
.mk-admin-tile b{font:740 14px system-ui;color:var(--mk-text)}
.mk-admin-tile span{font:13px/1.45 system-ui;color:var(--mk-sub)}
body.night .mk-admin-launch{background:var(--mk-panel)}
@media(max-width:950px){.mk-admin-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.mk-admin-launch{padding:13px}.mk-admin-tiles{grid-template-columns:1fr}.mk-admin-tile{padding:13px}}
.mk-service-alert{max-width:1380px;margin:16px auto}
.rf-skip{position:absolute;left:-10000px;top:0;z-index:999;background:#fff;color:#122b39;padding:12px 16px}
.rf-skip:focus{left:8px;top:8px}
/* On narrow screens put the brand and theme above the scrollable section tabs. */
@media(max-width:760px){
 .mk-section-switcher .mk-switch-inner{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:38px 40px;gap:0!important;min-height:86px!important;padding:4px 10px 2px!important}
 .mk-section-switcher .mk-switch-brand{display:inline-flex!important;grid-row:1;grid-column:1;align-items:center;border:0;font-size:14px!important;padding:0!important}
 .mk-section-switcher .mk-switch-items{grid-row:2;grid-column:1/-1;width:100%;height:40px;align-self:center;gap:3px;padding-bottom:1px}
 .mk-section-switcher a.mk-switch-link{padding:9px 12px!important;min-height:35px}
 .mk-theme-toggle{grid-row:1;grid-column:2;justify-self:end;min-height:31px;padding:4px 10px}
 .sitehead,.mkq-head{top:86px!important}
 .rf-layout .rf-side{top:86px!important;height:calc(100dvh - 86px)!important}
}
