/* Integration only: original v13 rules live in v13.css. */
:host{display:block;min-height:100vh;text-align:left;letter-spacing:normal}
/* Separate white surfaces from the consultation background. */
:host{--bg:#d9e1ed;--line:#b9c7da;--shadow:0 4px 14px rgba(30,46,91,.12)}
.patienthero{border-color:var(--line)}
.overview{grid-template-columns:minmax(0,2fr) minmax(260px,1fr)}
.study-upload-icon svg{width:31px;height:31px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.study-upload[aria-busy=true]{border-style:solid}.study-upload button:disabled{opacity:.65;cursor:wait}.study-upload-queue{list-style:none;padding:0;margin:14px 0;display:grid;gap:8px}.study-upload-queue:empty{display:none}.study-upload-queue li{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;background:#fff;border:1px solid #bdcce1;border-radius:12px;overflow-wrap:anywhere}.study-upload-queue li>div{min-width:0}.study-upload-queue strong{display:block;font-size:13px}.study-upload-queue small{color:#63718a;font-size:11px}.study-upload-state{color:#63718a;font-size:12px;max-width:50%}.study-upload-queue [data-state=reading]{border-color:#7885df;background:#f6f7ff}.study-upload-queue [data-state=reading] .study-upload-state{color:#414bb9}.study-upload-queue [data-state=error]{border-color:#d8a18d;background:#fff9f6}.study-upload-queue [data-state=error] .study-upload-state{color:#a34124}
.consultation-metadata{display:grid;gap:9px;padding:12px 0 18px;margin-bottom:14px;border-bottom:1px solid var(--line)}
.problem-name{margin:0;font-size:15px;font-weight:800}
.problem-status{font-size:11px;color:#526582;margin:5px 0 14px}
.problem-characterization{margin-top:12px}.problem-characterization h4{font-size:11px;color:#526582;margin:0 0 6px}
.problem-characterization .rowline{margin-top:5px}
.clinical-group+.clinical-group{border-top:1px solid var(--line);padding-top:15px;margin-top:16px}
.clinical-group h3{font-size:12px;color:#526582;margin:10px 0}
.clinical-item{border:1px solid #d8e0ec;border-radius:10px;padding:12px;margin-top:9px;background:#fafbfd;overflow-wrap:anywhere}
.clinical-item h4{font-size:13px;margin:0 0 9px}.clinical-item .rowline{margin-top:8px}
.clinical-help,.clinical-certainty{font-size:11px;color:#67748b;line-height:1.5}
.clinical-item>.v13-evidence,.problem>.v13-evidence{display:block}
@media(max-width:980px){.overview{grid-template-columns:1fr}}
[hidden]{display:none!important}
.dock textarea{flex:1;min-width:0;border:0;outline:none;color:#28334d;background:transparent;font:inherit;font-size:13px;height:39px;line-height:21px;padding:9px 0;resize:none;max-height:120px;white-space:pre;overflow-wrap:normal}
.dock textarea::placeholder{color:#8a94a7}
.dock{bottom:calc(18px + var(--keyboard-offset,0px));border:2px solid #8798b5}
.dock:focus-within{border-color:#4b55c8}
.bottomnav{bottom:var(--keyboard-offset,0px)}
.navbtn[data-target=resumen]{--accent:#4b55c8}.navbtn[data-target=historia]{--accent:#426cd8}.navbtn[data-target=plan]{--accent:#138f83}.navbtn[data-target=copiloto]{--accent:#8a5dd3}
#demoStudies{--accent:#d85278}
.rowline .val,.ask-answer{overflow-wrap:anywhere;white-space:pre-wrap}
.problem{white-space:pre-wrap}.problem small{overflow-wrap:anywhere}
.fact-value{overflow-wrap:break-word}
.rowline .key{flex-shrink:0;max-width:45%;overflow-wrap:anywhere}
.person>div:last-child{min-width:0}.patientname,.patientmeta{overflow-wrap:anywhere}
.v13-evidence{font-size:10px;color:#78849a;margin-top:4px}.v13-evidence summary{cursor:pointer}.v13-evidence button{display:block;border:0;background:transparent;color:#6750c2;text-align:left;padding:5px 0;font-size:11px}
.problem:not(.primary){border-left:1px solid #cbd5e8;background:#f1f4fa;border-color:#cbd5e8;padding-left:15px}.problem.primary{background:#e9efff;border-color:#7c9df1;border-left:4px solid #426cd8;padding-left:12px}
.problem-details{margin-top:10px}.problem-details summary{font-size:11px;color:#4164ad;cursor:pointer}
.v13-error{margin-top:10px;color:#9d3246;font-size:12px}
.rowline[tabindex],.problem-name[tabindex]{cursor:pointer}
.rowline[tabindex]:focus-visible,.problem-name[tabindex]:focus-visible{outline:3px solid #8797f5;outline-offset:2px}
.problem>.v13-evidence,.rows>div>.v13-evidence{display:none}
.rowline>.v13-evidence{display:none}
.entry-mode svg{width:19px;height:19px}
.mic-notification-icon svg{width:23px;height:23px;stroke-width:2.2}
@media(min-width:751px) and (max-width:980px){.hero-right{flex-direction:column;align-items:flex-end}.utility-btn{font-size:0}.person>div:last-child{min-width:0}.patientname{overflow-wrap:anywhere}}
.v13-status{font-size:11px;color:#78849a;margin-top:8px}
.study-upload{border:2px dashed #9baed1;border-radius:20px;background:linear-gradient(140deg,#fff,#eef2ff);padding:36px 22px;text-align:center;transition:background .15s,border-color .15s}.study-upload.dragging{background:#dfe7ff;border-color:#4b55c8}.study-upload-icon{display:inline-grid;place-items:center;width:56px;height:56px;border-radius:16px;background:#e1e6ff;color:#4b55c8;font-size:32px}.study-upload h2{margin:14px 0 8px;font-size:21px}.study-upload p{color:#63718a;margin:0 0 20px}.study-status{font-size:13px;line-height:1.6;overflow-wrap:anywhere;color:#435574}.study-files{display:grid;gap:8px;margin:14px 0}.study-file{padding:12px 16px;border:1px solid #bdcce1;border-radius:12px;background:white;overflow-wrap:anywhere}.study-file a{color:#414bb9;font-weight:700}.study-file span{display:block;color:#63718a;font-size:12px;margin-top:4px}.study-file p{font-size:12px;margin:6px 0 0}.study-tabs{display:flex;gap:8px;overflow-x:auto;padding:8px 0 12px}.study-tabs button{flex-shrink:0;padding:10px 16px;border:1px solid #b9c9df;background:#fff;border-radius:10px;color:#435574;cursor:pointer}.study-tabs [aria-selected=true]{background:#4b55c8;color:white;border-color:#4b55c8}.study-content{margin:10px 0 20px;background:white;border:1px solid #b9c9df;border-radius:18px;padding:22px;min-width:0}.study-empty{text-align:center;color:#63718a;padding:35px 12px}.study-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.study-toolbar h2{font-size:20px;margin:0}.study-toolbar label{font-size:13px;color:#63718a}.study-toolbar select{padding:9px;border:1px solid #b9c9df;border-radius:8px;max-width:100%;background:white;color:#23314c}.study-chart{margin:20px 0;background:#f7f9fd;border:1px solid #d8e1ee;border-radius:12px;padding:12px}.study-chart svg{width:100%;max-height:290px;display:block;overflow:visible}.study-chart text{font-size:12px;fill:#63718a}.study-gridline{stroke:#d8e1ee}.study-trend{stroke:#4b55c8;stroke-width:2.5;fill:none}.study-dot{fill:#4b55c8;stroke:white;stroke-width:2}.study-dot.abnormal{fill:#ba4c2b}.study-caption{font-size:12px;color:#63718a;line-height:1.5}.study-table-scroll{overflow-x:auto}.study-content table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}.study-content th{background:#eef2f9;font-size:11px;color:#435574}.study-content td,.study-content th{padding:13px 12px;border-bottom:1px solid #d8e1ee;vertical-align:top}.study-content td{min-width:105px;overflow-wrap:anywhere;max-width:280px}.study-content details{font-size:12px;min-width:140px}.study-content details summary{cursor:pointer;color:#414bb9}.study-abnormal td:nth-child(3){color:#a34124;font-weight:700}.study-upload button:focus-visible,.study-tabs button:focus-visible,.study-toolbar select:focus-visible{outline:3px solid #899bff;outline-offset:3px}
@media(max-width:750px){.study-upload{padding:24px 14px}.study-content{padding:14px}.study-toolbar label{display:grid;gap:6px;width:100%}.study-chart{padding:5px}.study-upload h2{font-size:19px}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.person{flex:1;min-width:0}.person>div:last-child{min-width:0;position:relative;padding-right:40px}
.patientname,.patientmeta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.patient-bell{position:absolute;right:0;top:0;display:flex;align-items:center;gap:2px;padding:5px;border:0;border-radius:9px;background:transparent;color:#414bb9;cursor:pointer}
.patient-bell svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.patient-update-count{font-size:10px;font-weight:800}
.patient-bell:not(.has-updates){color:#667088}
.patient-dialog{position:fixed;inset:20px 0 auto;z-index:40;margin:0 auto;width:min(760px,calc(100vw - 28px));max-height:calc(100dvh - 200px - var(--keyboard-offset,0px));padding:0;border:1px solid #cbd5e4;border-radius:20px;background:#f5f7fb;color:var(--ink);box-shadow:0 24px 70px #17234340;overflow:auto}
.patient-dialog-head{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 22px;background:white;border-bottom:1px solid #d6deeb}
.patient-dialog-head h2{margin:0;font-size:20px}
.patient-dialog-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:20px}
.patient-profile-group{min-width:0;background:white;border:1px solid #d6deeb;border-radius:13px;padding:16px}
.patient-profile-group h3{margin:0 0 14px;font-size:14px;color:#414bb9}
.study-sort{border:0;background:transparent;padding:4px 0;color:inherit;font:inherit;font-weight:700;text-align:left;cursor:pointer}.study-sort:focus-visible{outline:3px solid #899bff;outline-offset:4px;border-radius:3px}
.study-section-heading th{background:#e2e9f5;border-top:2px solid #b9c9df}.study-section-heading h3{display:inline;margin:0;font-size:15px;color:#23314c}.study-section-heading span{margin-left:12px;font-size:11px;font-weight:400;color:#63718a}
.patient-profile-group .rowline{align-items:flex-start}.patient-profile-group .val{white-space:pre-wrap;overflow-wrap:anywhere}
.patient-profile-group .empty{margin:0;color:#737f94}
@media(max-width:750px){.person>div:last-child{padding-right:33px}.patient-bell{padding:3px}.patient-bell svg{width:15px;height:15px}.patient-dialog-body{grid-template-columns:1fr;padding:12px;gap:10px}.patient-dialog-head{padding:14px}.patient-dialog-head h2{font-size:18px}}
@media(max-width:750px){.patient-dialog{max-height:calc(100dvh - 280px - var(--keyboard-offset,0px))}.dock{bottom:calc(73px + var(--keyboard-offset,0px));}.dock textarea{font-size:12px}}

/* Consultation header: prototype styling, existing controls retained. */
.patienthero{gap:14px;padding:17px 22px;border-radius:18px;border:0;box-shadow:none;background:#fff}
.patienthero .avatar{width:50px;height:50px;border-radius:14px;background:#eee8fc;color:#6352a4;font-size:16px;font-weight:800}
.patienthero .patientname{font-size:21px;line-height:1.35;letter-spacing:0;font-weight:700}
.patienthero .patientmeta{font-size:12px;color:#637088;line-height:1.6;margin-top:0}
.hero-right{gap:18px}.consult-metrics{gap:16px;flex-wrap:wrap;justify-content:flex-end}
.consult-start{font-size:12px;font-weight:400;color:#637088;white-space:nowrap}
.patienthero .metric{font-size:12px;color:#637088;font-weight:500}
.patienthero .btn.primary{background:#6052c7;border-color:#6052c7;border-radius:9px;padding:8px 12px;font-size:12px;font-weight:700}
.patienthero .utility-btn{border-radius:9px}
@media(min-width:751px) and (max-width:1150px){.hero-right{flex-direction:column;align-items:flex-end;gap:9px}.consult-metrics{gap:10px}}
@media(max-width:750px){.patienthero{padding:13px;flex-wrap:wrap;gap:12px}.patienthero .person{flex-basis:100%}.patienthero .avatar{width:43px;height:43px;font-size:15px}.patienthero .patientname{font-size:17px}.patienthero .patientmeta{font-size:12px;max-width:none}.hero-right{width:100%;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}.consult-metrics{justify-content:flex-start;gap:10px;flex:1}.consult-start{flex-basis:100%}.patienthero .metric{font-size:12px}.heroactions .btn.primary{font-size:12px;padding:8px 12px}.patienthero .utility-btn{display:inline-flex}}
/* Prototype canvas and left navigation, preserving production panels and actions. */
:host{--bg:#edf1f7;--ink:#24324c;background:#edf1f7;color:#24324c}
.shell{max-width:1600px;grid-template-columns:210px minmax(0,1fr);background:#edf1f7}
.sidebar{width:auto;padding:28px 20px;background:#fff;border-right:0;display:flex;flex-direction:column}
.sidebar .brand{padding:0;gap:6px;font-size:23px;letter-spacing:0;color:#5146a6;align-items:flex-start;font-weight:700}
.sidebar .brandmark{background:none;color:#5146a6;width:auto;height:auto;border-radius:0;font-size:23px;line-height:1.6;font-weight:700}
.sidebar .brand small{font-size:12px;letter-spacing:0;font-weight:400;color:#637088;line-height:1.6}
.consult-navigation{display:grid;gap:8px;margin-top:40px}
.sidebar .navbtn{margin:0;border:0;background:transparent;text-align:left;padding:12px;border-radius:10px;color:#566079;font-size:15px;font-weight:700;line-height:1.6;gap:0}
.sidebar .navbtn .dot{display:none}
.sidebar .navbtn.active{background:#eeebff;color:#5746b4}
.sidebar .sidefoot{position:static;margin-top:auto;padding-top:24px;color:#68748a;font-size:12px;line-height:1.6}
.main{padding:24px 30px 130px}
@media(min-width:1001px){.dock{left:calc(50% + 105px)}}
@media(min-width:751px) and (max-width:1000px){.shell{grid-template-columns:170px minmax(0,1fr)}.sidebar{padding:25px 12px}.main{padding:20px 20px 140px}.dock{left:calc(50% + 85px)}}
@media(max-width:750px){.shell{display:block}.sidebar{display:none}.main{padding:16px 13px 168px}}
/* Larger reading sizes for consultation content and navigation. */
:host{font-size:16px;line-height:1.6}
.sidebar .navbtn{font-size:16px}.sidebar .brand small,.sidebar .sidefoot{font-size:13px}
.patienthero .patientname{font-size:23px}.patienthero .patientmeta,.patienthero .metric,.consult-start{font-size:14px}.patienthero .btn.primary{font-size:14px}
.section-intro h1{font-size:25px}.section-intro p{font-size:14px}.categorytitle{font-size:20px}
.cardhead h2{font-size:16px}.problem-name{font-size:18px}.problem-status{font-size:13px}
.rowline .key{font-size:13px}.rowline .val{font-size:14px;line-height:1.6}
.problem-characterization h4,.clinical-group h3{font-size:14px}.clinical-item h4{font-size:15px}
.empty,.clinical-help,.clinical-certainty,.v13-status{font-size:13px}
.notice strong{font-size:14px}.notice p{font-size:14px}.expand{font-size:13px}
.mini,.flag{font-size:12px}.v13-evidence,.v13-evidence button,.problem-details summary{font-size:12px}
.patient-profile-group h3{font-size:16px}.patient-dialog-body .rowline .key{font-size:13px}.patient-dialog-body .rowline .val{font-size:14px}
.study-content table{font-size:15px}.study-content th{font-size:13px}.study-content details,.study-caption,.study-file span,.study-file p{font-size:14px}
.transcript-line{font-size:14px}.transcript-line small{font-size:12px}.transcript-help{font-size:13px}.ask-answer{font-size:15px}.ask-query,.ask-source p{font-size:14px}
@media(max-width:750px){.patienthero .patientname{font-size:19px}.patienthero .patientmeta,.patienthero .metric,.consult-start,.patienthero .btn.primary{font-size:13px}.section-intro h1{font-size:23px}}
