:root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#222923;background:#f5f7f5;font-size:16px;--surface:#fff;--bg:#f5f7f5;--ink:#222923;--muted:#5c665f;--line:#dce3dd;--green:#176247;--soft:#eaf3ed;--red:#a43e32;--orange:#925109;--shadow:0 3px 18px #20332606;color-scheme:light}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button,a{touch-action:manipulation}button{border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:.55rem .8rem;border-radius:7px;font-size:.875rem;font-weight:550;line-height:1.4}button:hover{border-color:#8b9c91;background:var(--soft)}button:disabled{opacity:.4;cursor:not-allowed}button.primary{background:var(--ink);border-color:var(--ink);color:var(--surface)}button.green{background:var(--green);border-color:var(--green);color:#fff}button.text{background:none;border-color:transparent;color:var(--green);padding:.3rem}.danger{color:var(--red)}:focus-visible{outline:3px solid #2e9070;outline-offset:3px}a{color:var(--green)}h1,h2,h3,p{margin:0}h1{font-size:1.7rem;letter-spacing:-.05rem;font-weight:650}h2{font-size:1rem;font-weight:650}h3{font-size:1rem}p{line-height:1.6}small,.small{font-size:.8125rem;color:var(--muted)}.muted{color:var(--muted)}.skip{position:fixed;left:1rem;top:-6rem;background:var(--surface);padding:1rem;z-index:100}.skip:focus{top:1rem}.loading{padding:3rem}.topbar{display:flex;align-items:center;justify-content:space-between;padding:.85rem 1.5rem;gap:1rem;border-bottom:1px solid var(--line);background:var(--surface);min-height:72px}.brand{font-size:1.25rem;font-weight:750;letter-spacing:-.04rem;display:flex;align-items:center;gap:.6rem;white-space:nowrap}.brand-mark{background:#151c17;color:#fff;width:30px;height:30px;border-radius:7px;text-align:center;line-height:30px;font-size:1.1rem}.brand-mark span{color:#d59c74}.top-left,.top-right,.toolbar,.inline{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.top-left .divider{width:1px;height:24px;background:var(--line);margin:0 .7rem}.environment{font-size:.8125rem;font-weight:650;background:var(--soft);color:var(--green);padding:.3rem .6rem;border-radius:5px}.nav{display:flex;gap:.3rem}.nav button{border:0;background:transparent;color:var(--muted)}.nav button[aria-current="page"]{color:var(--ink);background:var(--soft)}.workspace{display:grid;grid-template-columns:300px minmax(0,1fr);min-height:calc(100vh - 72px)}.workspace.hidden-chat{grid-template-columns:minmax(0,1fr)}.assistant{border-right:1px solid var(--line);background:#eef2ee;padding:1.1rem;display:flex;flex-direction:column;gap:1rem;min-width:0;max-height:calc(100vh - 72px);position:sticky;top:0}.assistant-head{display:flex;justify-content:space-between;align-items:center}.assistant h2{font-size:.9rem}.online{display:inline-block;width:7px;height:7px;background:#27805b;border-radius:50%;margin-right:.4rem}.context{padding:.7rem;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-size:.8125rem;line-height:1.6;overflow-wrap:anywhere}.chat-log{overflow-y:auto;flex:1;min-height:80px;display:flex;flex-direction:column;gap:.75rem}.message{padding:.85rem;background:var(--surface);border:1px solid var(--line);border-radius:10px;font-size:.875rem;line-height:1.65;overflow-wrap:anywhere}.message.user{background:var(--soft);margin-left:1rem}.message .refs{display:flex;gap:.35rem;flex-wrap:wrap;margin-top:.6rem}.message .refs button{font-size:.8125rem;padding:.2rem .4rem}.quick{display:grid;gap:.4rem}.quick button{text-align:left;font-weight:400;font-size:.8125rem}.chat-form{display:grid;gap:.5rem}.chat-form textarea{min-height:80px;resize:vertical}.local-caption{font-size:.75rem;line-height:1.5;color:var(--muted)}main{padding:1.7rem 2rem 2rem;min-width:0;max-width:1800px;width:100%;margin:auto}.eyebrow{text-transform:uppercase;letter-spacing:.1em;color:var(--green);font-size:.75rem;font-weight:700;margin-bottom:.5rem}.page-head{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1.3rem}.page-head p{font-size:.875rem;color:var(--muted);margin-top:.5rem}.notice{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:.7rem .9rem;line-height:1.5;font-size:.8125rem;color:var(--muted);margin-bottom:1.1rem}.notice.warn{border-color:#dec9a6;background:#fff9ef;color:#6b491f}.filters{border:1px solid var(--line);border-radius:10px;background:var(--surface);padding:1rem;margin-bottom:1.2rem}.filter-row{display:flex;gap:.75rem;align-items:end;flex-wrap:wrap}.filter-row+.filter-row{margin-top:.8rem;padding-top:.8rem;border-top:1px solid var(--line)}label.field{display:flex;flex-direction:column;gap:.35rem;font-size:.8125rem;color:var(--muted);flex:1;min-width:135px}.field.search{flex:2;min-width:200px}.field input,.field select,input,select,textarea{width:100%;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);padding:.6rem .65rem;min-width:0;font-size:.875rem}select{appearance:none;padding-right:1.8rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%2369766c' stroke-width='1.5'/%3E%3C/svg%3E");background-position:right .6rem center;background-repeat:no-repeat}.filter-footer{display:flex;justify-content:space-between;align-items:center;gap:.6rem;margin-top:.8rem;font-size:.8125rem;color:var(--muted)}.kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin-bottom:1.4rem}.kpi{text-align:left;padding:1.05rem 1.2rem;border-radius:10px;background:var(--surface);box-shadow:var(--shadow);min-width:0}.kpi-label{display:flex;justify-content:space-between;gap:.5rem;font-size:.8125rem;color:var(--muted)}.kpi-value{display:block;font-size:1.8rem;letter-spacing:-.06rem;font-weight:650;margin:.6rem 0 .35rem;overflow-wrap:anywhere}.kpi small{font-size:.75rem;font-weight:400}.risk-text{color:var(--red)}.gain-text{color:var(--green)}.section-head{display:flex;justify-content:space-between;align-items:center;gap:.75rem;margin:1rem 0}.section-head p{font-size:.8125rem;color:var(--muted);margin-top:.3rem}.card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.card{background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:1.15rem;min-width:0}.card.wide{grid-column:1/-1}.card-head{display:flex;align-items:start;justify-content:space-between;gap:.5rem;margin-bottom:1rem}.card-tools{display:flex;gap:.15rem;flex-wrap:wrap}.card-tools button{font-size:.75rem;padding:.15rem .35rem;background:transparent}.card-caption{font-size:.75rem;color:var(--muted);margin:.7rem 0}.action-row{display:flex;justify-content:space-between;align-items:center;width:100%;padding:.7rem 0;border-width:0 0 1px;border-radius:0;text-align:left;gap:.5rem;background:none}.action-row:last-child{border:0}.action-row small{display:block;font-weight:400;margin-top:.2rem}.badge{font-size:.75rem;font-weight:600;display:inline-block;border-radius:5px;padding:.25rem .45rem;border:1px solid var(--line);white-space:nowrap;background:var(--soft)}.badge.risk{background:#fbede9;color:#9c392d;border-color:#efd7d1}.badge.warn{background:#fff3df;color:#81510d;border-color:#eddbba}.badge.neutral{background:var(--bg);color:var(--muted)}.branch-row{width:100%;display:block;background:none;border:0;padding:.6rem 0;text-align:left;font-weight:400}.branch-label{display:flex;justify-content:space-between;gap:.4rem;font-size:.8125rem;margin-bottom:.4rem}.bars{display:flex;align-items:center;gap:3px;height:12px}.bar-risk{height:8px;background:#ca7767;border-radius:2px;min-width:0}.bar-gain{height:8px;background:#4c9373;border-radius:2px;min-width:0}.legend{display:flex;gap:1rem;font-size:.75rem;color:var(--muted);margin-bottom:.7rem}.legend span:before{content:"";display:inline-block;width:8px;height:8px;margin-right:.35rem;background:#ca7767;border-radius:2px}.legend span.gain:before{background:#4c9373}.bridge{display:grid;gap:.6rem}.bridge button{display:grid;grid-template-columns:1fr auto;text-align:left;border:0;border-radius:4px;background:var(--bg);padding:.8rem;font-weight:400}.bridge button:last-child{background:var(--soft);font-weight:650}.trend{display:flex;gap:.4rem;min-height:190px;align-items:stretch}.month{flex:1;display:flex;flex-direction:column;justify-content:end;gap:.5rem;border:0;padding:.2rem;background:none;border-radius:4px;min-width:0}.month small{font-size:.75rem;white-space:nowrap}.month-bars{height:150px;width:100%;display:flex;align-items:end;gap:3px;justify-content:center;border-bottom:1px solid var(--line)}.month-bars i{background:#4a7e65;border-radius:3px 3px 0 0;width:36%;display:block}.month-bars i:last-child{background:#c97d6e;width:18%}.results-head{display:flex;justify-content:space-between;align-items:center;gap:.7rem;flex-wrap:wrap;margin-bottom:.8rem}.results-head select{width:auto}.table-scroll{max-width:100%;overflow-x:auto;border:1px solid var(--line);border-radius:9px;background:var(--surface)}table{border-collapse:collapse;width:100%;font-size:.875rem;text-align:left}caption{text-align:left;padding:1rem;color:var(--muted);font-size:.8125rem}th{background:var(--bg);color:var(--muted);font-size:.75rem;font-weight:600;padding:.85rem;white-space:nowrap;border-bottom:1px solid var(--line)}td{padding:.9rem .85rem;border-bottom:1px solid var(--line);vertical-align:top;line-height:1.5}td small{display:block;font-size:.75rem;margin-top:.25rem}tr:last-child td{border-bottom:0}tbody tr:hover{background:var(--bg)}.case-id{font-weight:700;color:var(--green);border:0;background:none;padding:0;white-space:nowrap}.codes{font-size:.75rem;color:var(--muted);max-width:160px}.finding-summary{min-width:170px;max-width:260px;font-size:.8125rem}.number{font-variant-numeric:tabular-nums;white-space:nowrap}.pagination{display:flex;justify-content:space-between;align-items:center;margin-top:1rem;gap:.5rem;font-size:.8125rem}.empty{padding:3rem 1rem;text-align:center;background:var(--surface);border:1px dashed var(--line);border-radius:10px}.empty p{margin:.5rem 0 1rem;color:var(--muted)}.detail-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);gap:1rem}.stack{display:grid;gap:1rem;align-content:start}.summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem;margin:1.2rem 0}.summary-grid>div{padding:1rem;background:var(--surface);border:1px solid var(--line);border-radius:8px}.summary-grid strong{display:block;margin-top:.5rem;font-size:1.1rem}.finding{border-top:1px solid var(--line);padding:1.2rem 0}.finding:first-of-type{border-top:0}.finding p{font-size:.875rem;margin:.7rem 0}.facts{display:grid;grid-template-columns:110px 1fr;gap:.5rem;font-size:.8125rem;margin:.8rem 0}.facts dt{color:var(--muted)}.facts dd{margin:0;line-height:1.6;overflow-wrap:anywhere}.formula{font-family:ui-monospace,Consolas,monospace;font-size:.8125rem;background:var(--bg);padding:.8rem;border-radius:6px;line-height:1.7;overflow-wrap:anywhere}.check{display:flex;align-items:start;gap:.6rem;font-size:.875rem;line-height:1.5;margin:.75rem 0}.check input{width:18px;height:18px;flex-shrink:0;accent-color:var(--green);padding:0}.status-form{display:grid;gap:.6rem;margin:1rem 0}.history{list-style:none;padding:0;margin:1rem 0 0}.history li{padding:0 0 1rem 1rem;border-left:2px solid var(--line);font-size:.8125rem;line-height:1.5}.history li small{display:block;margin:.25rem 0}.note{background:var(--bg);padding:.8rem;margin-top:.8rem;border-radius:6px;overflow-wrap:anywhere;font-size:.875rem;white-space:pre-wrap}.rules-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);gap:1rem}.rule-card{padding:1.2rem;margin-top:.8rem;border:1px solid var(--line);border-radius:8px;background:var(--surface);scroll-margin-top:1rem}.rule-card p{font-size:.875rem;margin:.7rem 0}.rule-card.highlight{outline:3px solid #80b49b}.sim-result{background:var(--soft);padding:1rem;border-radius:8px;margin-top:1rem}.sim-result strong{display:block;font-size:1.7rem;margin:.5rem 0}.sim-form{display:grid;gap:.7rem}.sim-form .field{min-width:0}footer{font-size:.75rem;color:var(--muted);line-height:1.6;padding:1.5rem 0 0;margin-top:1.5rem;border-top:1px solid var(--line)}#toast{position:fixed;bottom:1.5rem;left:50%;transform:translateX(-50%);z-index:100;background:#1e3428;color:#fff;padding:.9rem 1.3rem;border-radius:8px;box-shadow:0 8px 32px #0002;max-width:90vw;font-size:.875rem;display:none}#toast.show{display:block}#toast.error{background:#862f26}dialog{border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);padding:1.5rem;max-width:480px;width:calc(100% - 2rem)}dialog::backdrop{background:#14251b66}dialog h2{font-size:1.2rem;margin-bottom:1rem}dialog p{font-size:.875rem;margin-bottom:1rem}dialog .toolbar{justify-content:end;margin-top:1rem}.card-choice{display:flex;justify-content:space-between;align-items:center;padding:.7rem 0;border-bottom:1px solid var(--line)}.error-text{color:var(--red);font-size:.875rem}body.dark{--surface:#1c2821;--bg:#142019;--ink:#edf3ef;--muted:#b2bfb6;--line:#3a4b40;--green:#96d2af;--soft:#283c2f;background:var(--bg);color:var(--ink);color-scheme:dark}body.dark .assistant{background:#17261c}body.dark .notice.warn{background:#362e20;color:#efcf9f;border-color:#645437}body.dark .badge.risk{background:#422a26;color:#ffc1b3;border-color:#71483e}body.dark .badge.warn{background:#3d3422;color:#edcc8c;border-color:#665334}body.dark .risk-text{color:#f1a192}body.dark button.green{color:#142019}body.dark .gain-text{color:#96d2af}
@media(min-width:1600px){.kpis{grid-template-columns:repeat(6,minmax(0,1fr))}.kpi-value{font-size:1.6rem}}
@media(max-width:1200px){.workspace{grid-template-columns:260px minmax(0,1fr)}main{padding:1.3rem}.topbar{padding:.8rem 1rem}.top-left .divider,.top-left>.small{display:none}.detail-grid,.rules-layout{grid-template-columns:1fr}.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.card-grid{grid-template-columns:1fr}.card.wide{grid-column:auto}}
@media(max-width:850px){.workspace{display:flex;flex-direction:column}.assistant{position:static;max-height:500px;border-right:0;border-bottom:1px solid var(--line);order:2}.chat-log{min-height:100px;max-height:220px}.topbar{flex-wrap:wrap}.top-right{gap:.3rem}.top-right button{font-size:.8125rem}.page-head{align-items:start}.kpi-value{font-size:1.5rem}.nav{order:3;width:100%;border-top:1px solid var(--line);padding-top:.4rem}.quick{grid-template-columns:repeat(3,1fr)}main{padding:1rem}.trend{gap:.1rem}.month small{font-size:.7rem}}
@media(max-width:480px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}.kpi{padding:.8rem}.kpi-value{font-size:1.3rem}.page-head{flex-direction:column}.filter-row{gap:.5rem}.field.search{min-width:100%}.field{min-width:120px!important}.summary-grid{gap:.5rem}.card{padding:.9rem}.card-head{flex-wrap:wrap}.quick{grid-template-columns:1fr}.topbar{gap:.5rem}.environment{font-size:.75rem}.brand{font-size:1.1rem}.trend{flex-wrap:wrap}.month{min-width:12%}.month-bars{height:120px}.filter-footer{align-items:start;flex-direction:column}}
@media(prefers-reduced-motion:no-preference){button{transition:background .15s,border-color .15s}}
.queue-tabs{display:flex;gap:.45rem;flex-wrap:wrap;margin:0 0 1rem}.queue-tabs button{display:flex;gap:.6rem;align-items:center}.queue-tabs button[aria-pressed="true"]{background:var(--green);border-color:var(--green);color:var(--surface)}.queue-tabs button span{font-variant-numeric:tabular-nums;opacity:.85}.queue-tabs p{flex-basis:100%;margin:.25rem 0}.next-step{min-width:190px;max-width:250px;font-size:.8125rem}.case-navigation{display:flex;gap:.8rem;flex-wrap:wrap;justify-content:space-between;align-items:center}.workflow-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none;padding:0;margin:1rem 0;gap:.5rem}.workflow-steps li{padding:.7rem;background:var(--surface);border:1px solid var(--line);border-radius:7px;color:var(--muted);font-size:.875rem;display:flex;align-items:center;gap:.5rem}.workflow-steps li span{border:1px solid var(--line);border-radius:50%;min-width:24px;height:24px;text-align:center;line-height:22px;font-size:.75rem}.workflow-steps li.active{border-color:var(--green);color:var(--green);background:var(--soft);font-weight:650}.workflow-steps li.past span{background:var(--soft)}.finding-review{padding:.9rem;background:var(--bg);border-radius:8px;margin-top:1rem}.finding-review h3{font-size:.875rem;margin-bottom:.6rem}.decision-form,.workflow-form{display:grid;gap:.7rem;margin-top:.8rem}.decision-form .field,.workflow-form .field{min-width:0}.decision-form button,.workflow-form button{justify-self:start}.decision-saved{padding:.8rem;border-left:3px solid var(--green);border-radius:4px;background:var(--soft);font-size:.875rem;margin:.7rem 0;overflow-wrap:anywhere}.decision-saved p{white-space:pre-wrap;margin:.5rem 0}.blockers{font-size:.8125rem;line-height:1.7;color:var(--orange);margin:0;padding-left:1.1rem}body.dark .blockers{color:#edcc8c}.workflow-form+details{margin-top:1rem}summary{cursor:pointer;font-size:.875rem;line-height:1.6}.finding details{margin:.7rem 0}.workflow-form+.small{margin-top:.8rem}.workflow-form .field textarea{min-height:90px}
@media(max-width:650px){.workflow-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.case-navigation{align-items:start}.queue-tabs button{flex:1;justify-content:space-between;min-width:135px}}

/* Source provenance and a shared five-state model. */
.workflow-steps{grid-template-columns:repeat(5,minmax(0,1fr))}.workflow-steps li{align-items:flex-start;overflow-wrap:anywhere}.status-summary{margin:1rem 0;padding:1rem;border:1px solid var(--line);border-radius:9px;background:var(--surface)}.status-summary h2{margin-bottom:.7rem}.status-summary p{margin-top:.7rem}.status-summary strong{margin-left:.35rem}.official-source{border-left:4px solid #6185a7}.source-excerpt{white-space:pre-wrap;overflow-wrap:anywhere;margin:.8rem 0;padding:1rem;border-left:3px solid var(--line);background:var(--bg);font-size:.875rem;line-height:1.7}.source-digest{word-break:break-all;font-family:ui-monospace,Consolas,monospace;font-size:.75rem}.source-warnings{margin:1rem 0}.source-warnings ul,.finding .notice ul{padding-left:1.1rem;margin:.5rem 0;font-size:.8125rem;line-height:1.7}.source-review{margin:1rem 0;padding:1rem;border:1px solid var(--line);border-radius:8px;background:var(--bg)}.source-review-form{display:grid;gap:.7rem;margin:1rem 0}.source-review-form .field{min-width:0}.source-review-form+details{margin-top:.8rem}.version-links{margin:.7rem 0}.version-links [aria-current="true"]{border-color:var(--green);background:var(--soft)}dialog{max-height:90vh;overflow-y:auto}.source-review h3{font-size:.875rem}.rule-card>details{margin:1rem 0}.finding .facts dd .badge{white-space:normal}
@media(max-width:1000px){.workflow-steps{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){.workflow-steps{grid-template-columns:repeat(2,minmax(0,1fr))}}

.rule-card .inline small{overflow-wrap:anywhere;min-width:0}

/* Hospital evaluation */
.evaluation-hero{padding:32px;border-radius:16px;background:var(--surface,#fff);border:1px solid var(--border,#dce5df);border-top:4px solid #25775e;margin-bottom:20px}.evaluation-hero h2{font-size:clamp(24px,3vw,36px);max-width:720px;line-height:1.2}.evaluation-hero p{max-width:780px}.evaluation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}.evaluation-grid .card{padding:22px}.evaluation-section{padding:24px;margin:20px 0}.scenario-list{list-style:none;padding:0;counter-reset:steps}.scenario-list li{counter-increment:steps;display:flex;align-items:start;gap:20px;padding:24px 0;border-top:1px solid var(--border,#dce5df)}.scenario-list li:before{content:counter(steps,decimal-leading-zero);font-size:22px;font-weight:700;color:#398167}.scenario-list li>div{flex:1;min-width:0}.scenario-list h3{margin:6px 0}.scenario-list button{flex-shrink:0}.evaluation-guide{border:1px solid #81b49e;border-left:4px solid #25775e;padding:18px;border-radius:10px;margin-bottom:24px;display:flex;gap:18px;align-items:center;background:var(--surface,#fff)}.evaluation-guide>div:first-child{flex:1}.evaluation-guide p{margin:8px 0}.evaluation-guide .toolbar{max-width:240px;flex-wrap:wrap}.feedback-item{border-top:1px solid var(--border,#dce5df);padding:18px 0}.feedback-item small{display:block;margin-top:6px}.feedback-item p{white-space:pre-wrap;overflow-wrap:anywhere}#feedback-form .field{margin-bottom:16px}.dark .evaluation-hero,.dark .evaluation-guide{background:#1b2b25}@media(max-width:700px){.evaluation-grid{grid-template-columns:1fr}.evaluation-hero,.evaluation-section{padding:18px}.scenario-list li{flex-wrap:wrap;gap:12px}.scenario-list li>div{flex-basis:75%}.scenario-list li>button{margin-left:36px}.evaluation-guide{display:block}.evaluation-guide .toolbar{margin-top:14px;max-width:none}}

.topbar{flex-wrap:wrap}.nav{flex-wrap:wrap}.top-right{margin-left:auto}.evaluation-hero h2{margin-bottom:16px}.evaluation-hero .toolbar{margin:18px 0}.evaluation-grid h2{margin-bottom:10px}.evaluation-section>p{margin:12px 0 20px}.evaluation-section form>button{margin-bottom:18px}
