:root{--mo-ink:#253a3d;--mo-muted:#6e807e;--mo-line:#e6ebea;--mo-orange:#e58b0b;--mo-orange-soft:#fff6e8;--mo-focus:#e6a33e}
html{scrollbar-color:#cbd6d2 transparent}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
:where(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--mo-focus)!important;outline-offset:3px}
:where(button,a){-webkit-tap-highlight-color:transparent}
:where(button,input,select,textarea){font-family:inherit}
::selection{background:#ffe2ac;color:#273a3b}

/* Home: complete rows and more deliberate interaction states. */
.home-main{max-width:1370px;padding-top:40px}
.home-header{min-height:76px;height:auto}
.section-title{align-items:center;margin-bottom:20px}
.section-title h2{margin-bottom:8px;font-weight:690}
.module-grid,.module-grid[hidden]{max-width:1170px;margin-inline:auto}
.module-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px 15px}
.module-card{min-height:145px;padding:12px 8px 10px;border:1px solid transparent;border-radius:19px;transition:background .18s,border-color .18s,box-shadow .18s,transform .18s}
.module-card:hover,.module-card:focus-visible{background:#fff;border-color:#e8eeeb;box-shadow:0 12px 30px #24413910;transform:translateY(-2px)}
.module-card strong{font-size:13px;font-weight:610;line-height:1.35}
.module-card .module-icon{transition:transform .18s,box-shadow .18s}
.module-card:hover .module-icon{transform:scale(1.045);box-shadow:0 8px 18px #273a3415}
.home-library{margin-top:40px;gap:17px}
.home-library-card{min-height:265px;border-radius:18px;box-shadow:0 8px 28px #263b3610}
.home-library-card h2{font-size:19px;padding:21px 24px 14px}
.home-library-empty{min-height:185px}
.home-library-entry{transition:background .15s}
.home-search{border:1px solid #ecf0ee}
.home-search:focus-within{border-color:#e5b76d;box-shadow:0 0 0 4px #fff2dd}
.medicine-header{display:flex;justify-content:space-between}
.medicine-header #atlas-portal-nav{margin-left:auto}

/* Shared reading and navigation surfaces. */
.calc-header,.dose-header,.score-header,.site-header{min-height:76px;height:auto}
.calc-layout{min-height:calc(100svh - 148px);max-width:1260px}
.score-layout{max-width:1210px;margin-inline:auto}
.explorer .column:has(.empty-column){width:clamp(330px,34vw,500px);background:linear-gradient(145deg,#fff,#fff8ed)}
.explorer .empty-column{gap:10px;color:#697d79}
.explorer .empty-column img{display:block;border-radius:23px;margin-bottom:9px;box-shadow:0 12px 25px #213d3215}
.explorer .empty-column strong{color:#2b4243;font-size:22px;letter-spacing:-.04em}
.explorer .empty-column span{max-width:280px;line-height:1.55}
.calc-sidebar-box,.dose-list-box,.score-sidebar,.score-detail,.column,.clinical-results,.clinical-detail{border-color:var(--mo-line);box-shadow:0 7px 25px #2441390b}
.calc-item,.dose-item,.score-item,.entry{transition:background .15s,color .15s,border-color .15s}
.calc-item:hover,.dose-item:hover,.score-item:hover{background:var(--mo-orange-soft)}
.calc-result,.score-result{box-shadow:0 6px 20px #2740380b}
.calc-copy,.dose-panel,.score-panel,.clinical-markdown,.medicine-section>div{overflow-wrap:anywhere}
.medicine-search-wrap,.score-search,.calc-search,.dose-search{transition:border-color .15s,box-shadow .15s}
.medicine-item,.medicine-subgroup,.medicine-section,.clinical-section{transition:border-color .15s,box-shadow .15s,background .15s}
.medicine-item:hover,.medicine-subgroup:hover,.clinical-section:hover{box-shadow:0 9px 25px #273c3410}
.clinical-reading,.clinical-article-head{min-width:0}
.clinical-tabs button,.calc-tab,.score-tab,.dose-tab{white-space:nowrap}
.clinical-app #atlas-portal-nav{min-height:76px;padding:12px clamp(18px,4vw,64px)}
.clinical-app #atlas-portal-nav .medorbit-legacy-brand{display:inline-flex;align-items:center;gap:4px;font-size:21px;font-weight:720;letter-spacing:-.045em;color:#263a3c}
.clinical-app #atlas-portal-nav .medorbit-legacy-brand img{width:38px;height:38px}

/* Older study tools keep dark image viewers, while their surrounding controls match the home. */
html[data-medorbit-module] #atlas-portal-nav{min-height:76px}
html[data-medorbit-module] #atlas-portal-nav a:focus-visible{border-radius:8px}
html[data-medorbit-module="atlas"] body,html[data-medorbit-module="simulador"] body,html[data-medorbit-module="vm"] body{padding-top:0!important}
/* Preserve readable labels inside the dark simulation workspaces. */
html[data-medorbit-module="simulador"] .rail-title{color:#eef5f5!important}
html[data-medorbit-module="simulador"] :is(#simulation-controls,#simulation-graphs,#simulation-readouts){--text:#eef5f5;--muted:#b7c7d1;color:#eef5f5}
html[data-medorbit-module="simulador"] :is(#simulation-controls,#simulation-graphs,#simulation-readouts) :is(h2,label){color:#eef5f5}
html[data-medorbit-module="vm"] .patient-strip,html[data-medorbit-module="vm"] .anatomy,html[data-medorbit-module="vm"] .station-shell{color:#eef5f5}
html[data-medorbit-module="vm"] .patient-heading strong,html[data-medorbit-module="vm"] .anatomy .panel-top h2,html[data-medorbit-module="vm"] .station-heading strong{color:#eef5f5!important}
/* Legacy tools mix light controls with dark workspaces. Keep each surface's own palette. */
html[data-medorbit-module="vm"] :is(#app-navigation,.patient-strip,#station-shell){--text:#eef5f5;--muted:#b7c7d1;--panel:#151922;--raised:#1c212c;color:#eef5f5}
html[data-medorbit-module="vm"] #app-navigation button{color:#e4eff3!important}
html[data-medorbit-module="vm"] .patient-strip :is(input,select){color:#eef5f5!important;color-scheme:dark}
html[data-medorbit-module="vm"] .patient-strip input::placeholder{color:#b7c7d1!important;opacity:1}
html[data-medorbit-module="vm"] #simulator-station > .controls{--text:#263a3c;--muted:#60746f;--panel:#fff;--raised:#f5f8f7;background:#fff!important;color:#263a3c}
html[data-medorbit-module="vm"] #simulator-station > .controls :is(.number-wrap,select){background:#f6faf8!important;border-color:#c9d8d4!important;color:#263a3c!important;color-scheme:light}
html[data-medorbit-module="vm"] #simulator-station > .controls .number-wrap input{color:#263a3c!important}
html[data-medorbit-module="vm"] #simulator-station > .controls input::placeholder{color:#5d716d!important;opacity:1}
html[data-medorbit-module="atlas"] .exam-download,html[data-medorbit-module="atlas"] .exam-download :is(strong,small){color:#eef5f5!important}
html[data-medorbit-module="ECG"] .cor-mode button[aria-pressed="true"]{color:#eef5f5!important}
html[data-medorbit-module="ECG"] #heart-zoom-reset{color:#263a3c!important}
html[data-medorbit-module="ECG"] .sobre button.ativo{color:#172e32!important}
html[data-medorbit-module="taxonomia"] .card,html[data-medorbit-module="banco-de-questoes"] .card,html[data-medorbit-module="desempenho"] .card,html[data-medorbit-module="desempenho"] .panel{border-radius:17px;box-shadow:0 8px 25px #2441390c}
.module-preview{position:relative;isolation:isolate;width:min(100% - 36px,1050px);max-width:none!important;min-height:390px;margin:clamp(28px,7vh,80px) auto!important;padding:clamp(32px,5vw,66px)!important;border:1px solid #e5ebe8;border-radius:25px;background:radial-gradient(circle at 85% 15%,#fff1d9,transparent 35%),#fff;box-shadow:0 18px 55px #24413914;overflow:hidden}
.module-preview::before{content:"";position:absolute;right:7%;top:50%;width:190px;height:190px;transform:translateY(-50%);border-radius:35px;background-image:url('/medorbit-home-icons.png');background-size:400% 300%;box-shadow:0 18px 40px #2441391c;z-index:0}
html[data-medorbit-module="ECG"] .module-preview::before{background-position:66.667% 50%}
html[data-medorbit-module="vm"] .module-preview::before{background-position:100% 50%}
html[data-medorbit-module="simulador"] .module-preview::before{background-position:33.333% 50%}
.module-preview > *{position:relative;z-index:1}
.module-preview h1{max-width:620px;font-size:clamp(38px,5vw,60px)!important;color:#263a3c}
.module-preview p{max-width:560px;line-height:1.6}
.module-preview .button,.module-preview button{box-shadow:0 8px 20px #d8871640;transition:transform .15s,background .15s}
.module-preview .button:hover,.module-preview button:hover{background:#d97f0b;transform:translateY(-2px)}

@media(max-width:1180px){.module-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:780px){.home-header{min-height:0}.module-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.module-card{min-height:126px}.home-library{grid-template-columns:1fr}.calc-layout{min-height:0}.calc-header,.dose-header,.score-header,.site-header,.clinical-app #atlas-portal-nav{min-height:64px}.explorer .column:has(.empty-column){display:none}}
@media(max-width:550px){.home-main{padding-top:25px}.home-library{margin-top:29px}.home-library-card{min-height:225px}.home-library-card h2{padding:17px 18px 12px}.module-card{padding:8px 3px;min-height:110px;border-radius:13px}.module-card strong{font-size:11px}.module-card .module-icon{width:68px;height:68px}.medicine-header .medicine-home-link{display:none}.calc-tabs,.dose-tabs,.score-tabs,.clinical-tabs{overflow-x:auto;scrollbar-width:thin}.clinical-article-head,.clinical-reading{padding-left:18px;padding-right:18px}}
@media(max-width:760px){.module-preview{min-height:0;margin:25px auto!important;padding:29px 25px!important}.module-preview::before{position:static;display:block;transform:none;width:92px;height:92px;border-radius:20px;margin:0 0 18px}.module-preview .eyebrow{display:block}.module-preview > *{position:relative;z-index:1}
.module-preview h1{margin:10px 0}.module-preview p{font-size:15px}}
@media(max-width:355px){.module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
