/* Existing CAMADA-MED colors and type; contained reader and review access. */
.cm-demo,.cm-demo *{box-sizing:border-box;min-width:0}
.cm-demo{width:100%;max-width:100%;padding-top:8px;color:var(--petro);font-family:var(--sans);overflow-wrap:anywhere}
.cm-demo h2{font-size:clamp(21px,5.8vw,29px);line-height:1.25;margin:14px 0 10px;padding-right:22px}
.cm-demo h3{font-size:18px;line-height:1.35;margin:22px 0 10px}
.cm-demo h4{font-size:16px;line-height:1.4;margin:18px 0 8px}
.cm-demo p,.cm-demo li{font-size:15px;line-height:1.65}
.cm-demo p{margin:9px 0 14px}
.cm-demo ul,.cm-demo ol{padding-left:22px}
.cm-demo-badge{display:inline-block;border:1px solid var(--line);border-radius:999px;padding:6px 10px;font-size:12px;line-height:1.4;color:var(--ink-mute);white-space:normal}
.cm-demo-options{display:grid;gap:12px;margin:18px 0}
.cm-demo-choice{width:100%;text-align:left;display:grid;gap:7px;padding:16px;border:1px solid var(--line);border-radius:16px;background:transparent;color:var(--petro);cursor:pointer;font:inherit;white-space:normal}
.cm-demo-choice b{font-size:17px;line-height:1.35}
.cm-demo-choice small{font-size:14px;line-height:1.5;color:var(--ink-mute)}
.cm-demo-choice span{font-size:13px;font-weight:700;color:var(--gold-1)}
.cm-demo button,.cm-demo select{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:44px}
.cm-demo select{display:block;width:100%;padding:11px;border:1px solid var(--line);border-radius:12px;color:var(--petro);background:transparent;font:inherit}
.cm-demo-stage-label{display:block;font-size:13px;font-weight:700;margin:16px 0 6px}
.cm-demo-step,.cm-demo-identity{font-size:13px!important;color:var(--ink-mute)}
.cm-demo-vitals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}
.cm-demo-vitals>div{display:grid;gap:5px;padding:12px;border:1px solid var(--line);border-radius:14px}
.cm-demo-vitals span{font-size:12px;line-height:1.4;color:var(--ink-mute)}
.cm-demo-vitals b{font-size:22px;color:var(--petro)}
.cm-demo-vitals small{font-size:12px;color:var(--ink-mute)}
.cm-demo-navigation{display:flex;flex-wrap:wrap;gap:10px;align-items:stretch;margin:24px 0 12px}
.cm-demo-navigation>button{flex:1 1 130px}
.cm-demo-live{margin:22px 0;padding-top:16px;border-top:1px solid var(--line)}
.cm-demo-live button{margin:10px 0}
.cm-demo-details{margin:12px 0;border:1px solid var(--line);border-radius:14px;padding:12px}
.cm-demo-details summary{cursor:pointer;font-size:15px;font-weight:700;line-height:1.5;min-height:32px}
.cm-demo-details a{color:var(--gold-1);text-decoration:underline;overflow-wrap:anywhere}
.cm-demo-document{margin:14px 0;font-size:15px;line-height:1.65;user-select:text;-webkit-user-select:text}
.cm-demo-exams article,.cm-demo-pubmed-result{border-bottom:1px solid var(--line);padding:12px 0}
.cm-demo-exams small{display:block;font-size:12px;line-height:1.5;color:var(--ink-mute)}
.cm-demo-urgent{border-left:3px solid var(--gold-1);padding-left:12px;font-weight:700}
.cm-demo-reading :first-child{margin-top:10px}
.cm-demo-reading pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}
.cm-demo-reading table{max-width:100%;display:block;overflow-x:auto}
.cmw-demo-entry{margin-bottom:18px}
.cmw-review-required ul{padding-left:20px;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.cmw-pending-panel{scroll-margin-top:18px}
.cmw-pending-panel:focus{outline:2px solid var(--gold-1);outline-offset:3px}
@media(min-width:650px){.cm-demo-vitals{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* R6.18: the shared sheet is cream, while global heading rules are ivory.
   Scope an opaque petroleum surface and its entire reading palette to demos.
   Two-ID descendant selectors also outrank legacy !important sheet overrides.
   Other sheets retain their existing theme. No :has() dependency. */
html body #sheet .sheet-card.cm-demo-sheet{
  background:#0b1828!important;background-image:none!important;color:#f5f7fb!important;
  --petro:#f5f7fb;--ink:#f5f7fb;--ink-soft:#c5d3e0;--ink-mute:#c5d3e0;
  --line:#6f879e;--gold-1:#f0d38a;color-scheme:dark;border-color:#6f879e!important;
  -webkit-text-fill-color:currentColor!important;
}
html body #sheet .sheet-card.cm-demo-sheet::before,html body #sheet .sheet-card.cm-demo-sheet::after{background:none!important;opacity:0!important;pointer-events:none}
html body #sheet #cmDemoRoot{color:#f5f7fb!important;-webkit-text-fill-color:currentColor!important}
html body #sheet #cmDemoRoot .cm-demo{color:#f5f7fb!important;background:transparent!important}
html body #sheet #cmDemoRoot :is(h1,h2,h3,h4,h5,h6,p,li,label,summary,strong,b,span,small,td,th,.cm-prose){color:#f5f7fb!important;-webkit-text-fill-color:currentColor!important}
html body #sheet #cmDemoRoot :is(.cm-demo-badge,.cm-demo-step,.cm-demo-identity,.cmw-field-hint,.cm-demo-choice small,.cm-demo-vitals span,.cm-demo-vitals small,.cm-demo-exams small){color:#c5d3e0!important;-webkit-text-fill-color:currentColor!important}
html body #sheet #cmDemoRoot .cm-demo>.cm-demo-badge{max-width:calc(100% - 50px)}
html body #sheet #cmDemoRoot :is(.cm-demo-details,.cm-demo-vitals>div,.cm-demo-choice){background:#112337!important;border-color:#6f879e!important}
html body #sheet #cmDemoRoot .cm-demo :is(button,select){background:#162b41!important;color:#f5f7fb!important;-webkit-text-fill-color:currentColor!important;border-color:#6f879e!important;opacity:1!important;color-scheme:dark}
html body #sheet #cmDemoRoot .cm-demo :is(select,option){color:#f5f7fb!important;-webkit-text-fill-color:currentColor!important}
html body #sheet #cmDemoRoot .cm-demo option{background:#162b41!important}
html body #sheet #cmDemoRoot .cm-demo .cmw-primary{background:#e7c676!important;color:#0b1828!important;-webkit-text-fill-color:currentColor!important;border-color:#e7c676!important}
html body #sheet #cmDemoRoot .cm-demo .cmw-text-action{background:transparent!important;color:#f0d38a!important;-webkit-text-fill-color:currentColor!important}
html body #sheet #cmDemoRoot .cm-demo button:disabled{opacity:1!important;cursor:wait}
html body #sheet #cmDemoRoot :is(a,.cm-demo-choice span){color:#f0d38a!important;-webkit-text-fill-color:currentColor!important;text-decoration-color:currentColor}
html body #sheet #cmDemoRoot .cm-demo-reading .cm-prose{background:transparent!important;color:#f5f7fb!important}
html body #sheet #cmDemoRoot .cm-demo-reading :is(table,tbody,tr,td){background:transparent!important;color:#f5f7fb!important}
html body #sheet #cmDemoRoot .cm-demo-reading :is(th,pre,code){background:#1b324a!important;color:#f5f7fb!important;border-color:#6f879e!important;-webkit-text-fill-color:currentColor!important}
html body #sheet #cmDemoRoot .cm-demo-reading pre code{background:transparent!important}
html body #sheet #cmDemoRoot .cm-demo-document{color:#f5f7fb!important;-webkit-text-fill-color:currentColor!important}
html body #sheet #cmDemoRoot :is(button,a,select,summary):focus-visible{outline:3px solid #f0d38a!important;outline-offset:3px!important}
html body #sheet .sheet-card.cm-demo-sheet .sheet-x{color:#f5f7fb!important;-webkit-text-fill-color:currentColor!important;opacity:1!important;min-width:44px;min-height:44px}
html body #sheet .sheet-card.cm-demo-sheet .sheet-x:focus-visible{outline:3px solid #f0d38a!important;outline-offset:3px!important}
