/* Quiet navy, neutral surfaces, compact category disclosures. */
:root{--green:#315f8f;--green-deep:#244d76;--ink:#233448;--muted:#6a7a8b;--paper:#f4f6f8;--mint:#edf4fa;--line:#dfe6ed;--radius:12px}
body{background:var(--paper)}
.topbar{border-bottom-color:#e3e9ef}.brand{color:var(--ink)}.brand-mark{background:#244d76;border-radius:10px}.brand small{letter-spacing:1.2px}
.button.primary{background:#244d76;border-color:#244d76}.button.primary:hover{background:#1a3e63}
.panel{box-shadow:none}.step{background:#edf4fa;color:#315f8f}.summary-panel{background:#244d76}
.egfr-input{background:#edf4fa;border-color:#819db4}.egfr-input input{color:#244d76;font-weight:650}
.quick-layout .egfr-input input{flex:1 1 0;width:0;min-width:0;max-width:none;padding:0;margin:0;appearance:textfield;-webkit-appearance:none}
.egfr-input input::-webkit-inner-spin-button,.egfr-input input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.quick-layout .egfr-input input::placeholder{font-size:22px;letter-spacing:0;color:#6b8399;opacity:1}
.egfr-input>span{flex:0 0 auto;white-space:nowrap}
.egfr-input:focus-within{border-color:#426e98;box-shadow:0 0 0 2px #315f8f18}
.case-options{background:#f8fafc;border-color:#e5ebf0}.case-options>summary{color:#6a7a8b}
.renal-summary strong{color:#244d76}.renal-summary button,.next-case{background:#edf4fa;color:#315f8f}
#quick-drug-search{background:#f8fafc;border-color:#dfe6ed;border-radius:8px}
.quick-layout .quick-drug-options,.quick-layout .quick-drug-options.has-selection{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px;max-height:none;overflow:visible}
.quick-drug-group{margin:0;border:1px solid #cbdce9;border-radius:8px;background:#f1f6fb;min-width:0;scroll-margin-top:10px}
.quick-drug-group>summary{display:flex;align-items:center;gap:6px;min-height:48px;padding:8px 10px;cursor:pointer;list-style:none;font-size:12px;font-weight:600;color:#344e68;line-height:1.4}
.quick-drug-group>summary::-webkit-details-marker{display:none}
.quick-drug-group>summary>span:first-child{min-width:0;overflow-wrap:anywhere}
.quick-drug-group>summary small{margin-left:auto;font-size:10px;font-weight:400;color:#768698;white-space:nowrap}
.category-chevron{position:relative;width:18px;height:18px;flex-shrink:0;background:#dfeaf4;border:0;border-radius:4px;margin:0}
.category-chevron:before{content:'';position:absolute;width:6px;height:6px;left:6px;top:4px;border-right:1.5px solid #315f8f;border-bottom:1.5px solid #315f8f;transform:rotate(45deg)}
.quick-drug-group[open]{grid-column:1/-1;background:#fafcfe;border-color:#cedde9}
.quick-drug-group[open]>summary{color:#244d76;border-bottom:1px solid #e5edf4}
.quick-drug-group[open] .category-chevron:before{transform:rotate(225deg);top:7px}
.quick-group-drugs{padding:8px;gap:6px}
.quick-drug{border-color:#dfe7ef;color:#334b62;background:#fff;border-radius:6px}
.quick-drug>span:last-child{color:#7c94ab}.quick-drug.chosen{background:#eaf3fb;border-color:#7c9ebb;color:#244d76}
.quick-drug-group>summary:hover,.quick-drug:hover{background:#f0f6fb}
.quick-drug-group>summary:active,.quick-drug:active{background:#dcebf7}
.quick-picker-tools #close-quick-picker{background:#edf4fa;border-color:#d7e4ef;color:#315f8f}
.quick-entry-hint{color:#788798}.phone-report-link{color:#607b94}
.result-card{border-left-color:#7898b6}.status{color:#436684;background:#edf4fa}
.quick-row-result{border-left-color:#7898b6}.med-entry{background:#fff;border-color:#dfe6ed}
.med-detail-actions{border-color:#e6ecf2}.med-detail-actions>details>summary{color:#607b94}
.crcl-calculator{background:#f5f9fc;border-color:#dce7f0}.crcl-calculator>summary{color:#244d76}
.quick-supplement{background:#edf4fa;border-color:#d7e4ef}
@media(max-width:760px){
 .quick-layout .topbar{padding:0 12px;background:#fff;gap:8px}
 .quick-layout .brand{font-size:14px;letter-spacing:-.3px;gap:7px}
 .quick-layout .brand-mark{width:28px;height:28px;border-radius:8px;font-size:20px}
 .quick-layout .brand-mark span{font-size:9px;right:3px;top:1px}
 .quick-layout .topbar nav{gap:3px}
 .quick-layout .topbar nav button{color:#617b93;font-size:12px;border-radius:6px;height:34px;min-width:40px;padding:0 7px;background:#f5f8fb}
 .quick-layout main{padding-left:10px;padding-right:10px;padding-top:9px}
 .quick-layout .panel{border-radius:10px;padding:10px 12px}
 .quick-layout .panel-heading h2{font-weight:650;color:#334b62}
 .quick-layout .step{display:none}
 .quick-layout .egfr-field label{color:#344e68}
 .quick-layout .egfr-input{padding:2px 11px}
 .quick-layout .egfr-input input{height:44px;font-size:30px}
 .quick-layout .context-panel.renal-compact{padding:3px 12px;background:#edf4fa;border-color:#dce7f0}
 .renal-summary{font-size:12px;color:#496781}.renal-summary strong{font-size:23px}.renal-summary button{background:#fff;min-height:40px}
 .quick-layout .medication-panel{background:transparent;border:0;padding:1px 0 0}
 .quick-layout .medication-panel>.panel-heading{padding:0 3px;margin-bottom:7px}
 .quick-layout #quick-picker-area{margin-top:7px}
 .quick-layout .med-empty-note{display:none}
 .quick-drug-group>summary{min-height:48px;font-size:12px}
 .quick-layout .med-entry{background:#fff;border-color:#dfe6ed;border-radius:9px;padding:4px 10px 0;margin-bottom:7px}
 .quick-layout .mobile-drug-select{font-size:14px;color:#233e57;font-weight:650}
 .quick-layout .mobile-drug-select span{color:#315f8f;font-size:11px;font-weight:500;white-space:nowrap}
 .quick-layout .remove-med{width:32px;color:#8a9cac}
 .quick-row-result{padding:3px 9px;margin-bottom:5px;border-left-width:2px;color:#34465a}
 .quick-conclusion h3{font-weight:600}.quick-conclusion p{color:#43566b}
 .med-detail-actions{border-top-color:#e8eef3;gap:0 7px;padding:6px 0}
 .med-detail-actions>details>summary{font-size:12px;min-height:44px;color:#315f8f;background:#f3f7fb;border:1px solid #cfdeeb;border-radius:7px;padding:5px 8px;justify-content:space-between;gap:4px;list-style:none;font-weight:550;cursor:pointer}
 .med-detail-actions>details>summary::-webkit-details-marker{display:none}
 .med-detail-actions>details>summary:before,.med-detail-actions>details[open]>summary:before{content:none}
 .med-detail-actions>.med-dose-details>summary{background:#e8f1fa;border-color:#a8c3db;color:#244d76;font-weight:650;font-size:13px}
 .med-detail-actions>details>summary:after{content:'查看⌄';font-size:11px;font-weight:400;white-space:nowrap;flex-shrink:0}
 .med-detail-actions>.med-dose-details>summary:after{content:'展开⌄'}
 .med-detail-actions>details[open]>summary:after{content:'收起⌃'}
 .med-detail-actions>details>summary:active{background:#dcebf7}
 .case-options>summary>span:last-child{background:#e3edf7;border:1px solid #c6d9e9;border-radius:5px;padding:3px 6px;color:#315f8f}
 .renal-summary button{border:1px solid #c2d5e6;font-weight:550}
 .quick-layout .mobile-actionbar{background:#fff;border-top:1px solid #e0e7ee;box-shadow:0 -4px 18px #23344805;grid-template-columns:72px 1fr 1fr;padding-left:10px;padding-right:10px;gap:7px}
 .quick-layout .mobile-actionbar button{border-radius:8px;font-size:13px;font-weight:550}
 .quick-layout #mobile-edit-btn{background:#f5f8fb;color:#647b90;border-color:#e4ebf1}
 .quick-layout #mobile-add-btn{background:#244d76;color:#fff;border-color:#244d76}
 .quick-layout #mobile-review-btn{background:#fff;color:#315f8f;border:1px solid #cfdeeb}
 .quick-layout footer{font-size:10px;color:#8a99a8;margin-top:12px;border-top:0}
}
@media(max-width:350px){.quick-layout .brand{font-size:13px}.quick-layout .topbar nav button{min-width:36px;padding:0 5px}.quick-drug-group>summary{padding:8px;font-size:11px}}

/* Shared interaction language across the workspace and dialogs. */
.quick-layout :where(button,summary,a,input,select,textarea){-webkit-tap-highlight-color:#315f8f22}
.quick-layout :where(button,summary,a,input,select,textarea):focus-visible{outline:2px solid #315f8f;outline-offset:2px}
.quick-layout :where(input:not([type=hidden]):not(#egfr),select,textarea){border:1px solid #819db4;border-radius:7px;background-color:#fff;color:#233448}
.quick-layout .field input,.quick-layout .field select,.quick-layout .med-select,.quick-layout .catalog-tools input,.quick-layout .catalog-tools select,.quick-layout #drug-search,.quick-layout #quick-drug-search{border-color:#819db4;background-color:#fff}
.quick-layout :where(input,textarea)::placeholder{color:#5d748a;opacity:1}
.quick-layout :where(input:not(#egfr),select,textarea):focus{border-color:#315f8f;box-shadow:0 0 0 2px #315f8f18;outline:none;background-color:#f8fbfe}
.quick-layout select,.quick-layout .field select,.quick-layout .med-select{appearance:none;-webkit-appearance:none;padding-right:30px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7 5 5 5-5' fill='none' stroke='%23315f8f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;background-size:16px}
.quick-layout input[type=number]::-webkit-inner-spin-button,.quick-layout input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.quick-layout .field{color:#3e5871;font-weight:550}.quick-layout .field input,.quick-layout .field select{font-weight:400}
.quick-layout #report-text{background:#f4f8fc;border-color:#acbfd1;cursor:text}
.quick-layout :is(.button.light,.button.ghost,.catalog-add,.next-case,.quick-supplement,#date-today,#close-quick-picker,.demo-toolbar button,.dialog-top button){border:1px solid #afc6da;background:#edf4fb;color:#244d76;border-radius:7px;font-weight:550}
.quick-layout :where(.button.primary,#cg-apply){background:#244d76;color:#fff;border-color:#244d76}
.quick-layout :where(button,summary):active{filter:brightness(.95)}
.quick-layout :where(button:disabled,input:disabled,select:disabled){opacity:.48;box-shadow:none;cursor:not-allowed}
.quick-layout .quick-drug{border-color:#afc6da;background:#fff}
.quick-layout :where(.quick-drug,.drug-pick)>span:last-child{display:inline-grid;place-items:center;min-width:22px;height:22px;background:#e4eef8;border:1px solid #c4d8e9;border-radius:5px;color:#315f8f;font-size:16px;line-height:1}
.quick-layout .quick-drug.chosen>span:last-child{background:#315f8f;color:#fff;border-color:#315f8f}
.quick-layout .drug-pick{border:1px solid #bed0df;border-radius:7px;background:#f6f9fc;padding:8px 10px;margin-bottom:6px}
.quick-layout details:not(.quick-drug-group):not(.case-options):not(.med-evidence):not(.med-dose-details)>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;list-style:none;min-height:38px;padding:7px 9px;border:1px solid #b6ccdf;border-radius:7px;background:#edf4fb;color:#315f8f;font-size:12px;font-weight:550;cursor:pointer}
.quick-layout details:not(.quick-drug-group):not(.case-options):not(.med-evidence):not(.med-dose-details)>summary::-webkit-details-marker{display:none}
.quick-layout details:not(.quick-drug-group):not(.case-options)>summary:before{content:none}
.quick-layout details:not(.quick-drug-group):not(.case-options):not(.med-evidence):not(.med-dose-details)>summary:after{content:'展开⌄';font-size:11px;font-weight:400;white-space:nowrap;flex-shrink:0}
.quick-layout details[open]:not(.quick-drug-group):not(.case-options):not(.med-evidence):not(.med-dose-details)>summary:after{content:'收起⌃'}
.quick-layout .crcl-calculator>summary{font-size:13px!important;color:#244d76!important;background:#e4eff9!important;border-color:#9bb9d2!important}
.quick-layout :where(.source-details,.source-item,.cg-formula) a{display:inline-flex;align-items:center;min-height:38px;max-width:100%;padding:6px 9px;background:#edf4fb;border:1px solid #b6ccdf;border-radius:7px;color:#244d76;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere;font-size:12px}
.quick-layout .catalog-add{min-height:38px}.quick-layout .dialog-top button{font-size:12px;min-width:48px;min-height:40px;flex-shrink:0}
.quick-layout .demo-toolbar select{border:1px solid #819db4;border-radius:7px;padding:7px 30px 7px 8px;min-height:38px}
.quick-layout .phone-report-link{width:auto;min-height:44px;padding:7px 11px;margin:4px 0 0;border:1px solid #b6ccdf;border-radius:7px;background:#edf4fb;color:#315f8f;font-size:12px;font-weight:550}
.quick-layout .topbar nav button{height:40px;padding:6px 10px;border:1px solid #c1d4e5;border-radius:7px;background:#edf4fb;color:#315f8f}
.quick-layout .case-options>summary>span:last-child{padding:3px 6px;border:1px solid #afc6da;border-radius:5px;background:#e3edf7;color:#315f8f;font-weight:550}
.quick-layout .remove-med{display:inline-grid;place-items:center;width:44px;min-width:44px;min-height:36px;height:36px;padding:0;white-space:nowrap;flex-shrink:0;line-height:1;border:1px solid #e8cdc7;border-radius:6px;background:#fcf4f2;color:#a14f47;font-size:12px;font-weight:550}
.quick-layout .med-dose-details>summary{display:flex;align-items:center;justify-content:space-between;gap:5px;min-height:38px;padding:5px 8px;border:1px solid #a8c3db;border-radius:7px;background:#e8f1fa;color:#244d76;font-size:12px;font-weight:650;list-style:none;cursor:pointer}
.quick-layout .med-dose-details>summary::-webkit-details-marker{display:none}
.quick-layout .med-dose-details>summary:after{content:'展开⌄';font-size:11px;font-weight:400;white-space:nowrap}
.quick-layout .med-dose-details[open]>summary:after{content:'收起⌃'}
@media(max-width:760px){
 .quick-layout .field input,.quick-layout .field select,.quick-layout #drug-search,.quick-layout .catalog-tools input,.quick-layout .catalog-tools select{min-height:44px;height:44px;font-size:16px}
 .quick-layout #quick-drug-search{min-height:44px;height:44px;padding:0 11px;font-size:16px}
 .quick-layout :where(#quick-drug-search,#drug-search,.catalog-tools input){border-color:#819db4;background-color:#fff}
 .quick-layout .topbar nav button{border:1px solid #c1d4e5;background:#edf4fb;color:#315f8f;min-height:40px}
 .quick-layout #next-case{border-color:#afc6da;background:#edf4fb;color:#315f8f}
 .quick-layout #date-today{border:1px solid #afc6da;background:#edf4fb;color:#315f8f}
 .quick-layout .case-options{padding:3px 7px}.quick-layout .case-options>summary{min-height:40px}
 .quick-layout .case-options>summary>span:last-child{border-color:#afc6da;font-weight:550}
 .quick-layout .mobile-drug-select{gap:6px}
 .quick-layout .mobile-drug-select span{display:inline-flex;align-items:center;min-height:28px;padding:3px 6px;border:1px solid #b6ccdf;border-radius:5px;background:#edf4fb;font-size:11px}
 .quick-layout .remove-med{min-width:44px;width:44px;min-height:44px;height:44px;font-size:12px;color:#a14f47;background:#fcf4f2;border:1px solid #e8cdc7;border-radius:6px}
 .quick-layout .med-top{align-items:center;gap:6px}
 .quick-layout .med-dose-details .field{gap:5px;margin-bottom:10px}
 .quick-layout .med-dose-details>summary{min-height:44px;font-size:13px}
 .quick-layout details:not(.quick-drug-group):not(.case-options):not(.med-evidence):not(.med-dose-details)>summary{min-height:44px}
 .quick-layout :where(.source-details,.source-item,.cg-formula) a{min-height:44px;font-size:12px}
 .quick-layout .catalog-add,.quick-layout .quick-supplement,.quick-layout .dialog-top button{min-height:44px}
 .quick-layout .crcl-calculator{padding:8px;margin-bottom:10px}
 .quick-layout .extra-context{padding:7px 8px;margin-bottom:12px}
 .quick-layout .cg-weight-options,.quick-layout .cg-formula{margin:7px 0}
 .quick-layout #mobile-edit-btn{border-color:#afc6da;color:#315f8f;background:#edf4fb}
}
@media print{.quick-layout .source-details>summary{background:#fff;border:0}.quick-layout .source-details a{background:#fff;border:0;padding:0}}

/* One concise opinion per card; dose and restrictions stay readable on phones. */
.compact-advice{font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.compact-advice p{margin:0;white-space:pre-line}
.compact-lead{font-weight:600}
.compact-detail{color:#43566b}
.compact-dose{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap}
.compact-dose span{font-size:12px;color:#526477;white-space:nowrap}
.compact-dose strong{font-weight:650;color:#23496d}
.compact-issues{color:#923b35;font-weight:550;margin-top:3px!important}
@media(max-width:760px){
 .compact-advice{font-size:13px;line-height:1.45}
 .quick-row-result{padding:3px 8px;margin-bottom:4px}
 .compact-lead{display:inline}
 .compact-detail{display:inline}
 .compact-lead+.compact-detail:before{content:' '}
 .compact-dose+.compact-detail{display:block}
 .med-detail-actions{padding:4px 0}
}

/* A single shared conditions entry replaces per-drug shortcuts. */
.renal-summary button{min-height:44px;white-space:nowrap;background:#e3edf7;border-color:#afc6da}
.extra-context{margin:12px 0;padding:10px;border:1px solid #d3dfe9;border-radius:7px;background:#f5f8fc}
.extra-context h3{font-size:13px;margin:0 0 8px;color:#315f8f;font-weight:600}
@media(max-width:760px){
 .renal-summary button{font-size:12px;padding:5px 8px;min-height:44px}
 .extra-context{margin:9px 0;padding:8px}
 .extra-context h3{font-size:12px;margin-bottom:7px}
}

/* Show only non-default conditions beside the current eGFR. */
.renal-summary-main{display:flex;flex:1;min-width:0;flex-wrap:wrap;align-items:center;gap:3px 6px}
.renal-value-line{min-width:0}
.renal-condition-hints{display:flex;flex-wrap:wrap;gap:3px;max-width:100%}
.renal-condition-tag{display:inline-block;padding:1px 5px;border:1px solid #dfd0a6;border-radius:4px;background:#fff8e8;color:#775816;font-size:10px;line-height:1.4;overflow-wrap:anywhere}
.renal-condition-hints[hidden]{display:none!important}
.egfr-field>.renal-condition-hints{margin-top:3px}

/* Compact text labels share the dose line; color is supplementary. */
.compact-advice .med-alert-badge{display:inline-block;vertical-align:baseline;white-space:nowrap;font-size:11px;font-weight:750;line-height:1.4;padding:1px 5px;border-radius:4px;border:1px solid #dec086;color:#794800;background:#fff4da;margin:0 5px 0 0}
.compact-advice .med-alert-badge.danger{color:#a1272e;background:#fff0ef;border-color:#e3a4a6}
.compact-dose .med-alert-badge{margin-right:0}
@media print{.compact-advice .med-alert-badge{border-color:currentColor}}

/* Make the calculator toggle clear without keeping its four inputs on screen. */
.quick-layout #crcl-calculator>summary{gap:8px;min-height:44px;padding:6px 8px;font-weight:650}
.quick-layout #crcl-calculator>summary:after{content:'展开计算⌄';display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:3px 9px;border:1px solid #244d76;border-radius:6px;background:#244d76;color:#fff;font-size:12px;font-weight:650;line-height:1.3;white-space:nowrap;box-sizing:border-box}
.quick-layout #crcl-calculator[open]>summary:after{content:'收起输入⌃'}
.quick-layout #crcl-calculator>summary:focus-visible{outline:3px solid #4f87b7;outline-offset:3px}
@media(max-width:760px){.quick-layout #crcl-calculator:not([open]){padding:4px;margin-bottom:5px}.quick-layout #crcl-calculator>summary{font-size:12px!important}.quick-layout #crcl-calculator>summary:after{padding:3px 8px}}
