:root{--hardware:#ffb347;--communication:#22d3c5;--software:#9d9aff}
*{box-sizing:border-box}.dashboard{max-width:2100px;margin:auto;padding:24px 32px}button,input{font:inherit}button,a,input{outline-offset:4px}button{cursor:pointer;border:1px solid var(--line);border-radius:6px;padding:8px 14px;background:#17263a;color:var(--text)}button:hover{background:#23374f}button:disabled{cursor:default;opacity:.4}a{color:inherit;text-decoration:none}.header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:24px}.identity{display:flex;align-items:center;gap:24px}.identity>a{font:800 24px "Segoe UI",sans-serif;letter-spacing:2px;color:#78e2d6}.identity>a>span{display:block;font-size:11px;letter-spacing:4px;color:var(--muted);margin-top:4px}.separator{width:1px;height:40px;background:var(--line)}h1{font-size:27px;letter-spacing:2px;margin:3px 0 0}h2{font-size:16px;margin:5px 0 0;font-weight:600}.eyebrow{font:600 10px "Segoe UI",sans-serif;letter-spacing:2px;color:var(--muted);margin:0}.live{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}.live>i{width:6px;height:6px;background:#66dac7;border-radius:50%;box-shadow:0 0 8px #66dac755}.toolbar{display:flex;align-items:center;gap:18px;border:1px solid var(--line);background:#111d2fcc;border-radius:8px;padding:12px 16px;margin-bottom:20px}.periods{display:flex;background:#0a1422;border-radius:6px;padding:3px;gap:2px}.periods button{padding:7px 20px;border:0;background:none;color:var(--muted)}.periods button.active{color:#071b22;background:#71dbcf;font-weight:700}.toolbar label{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:12px}input[type=date]{color-scheme:dark;border:1px solid var(--line);border-radius:5px;background:#142338;color:var(--text);padding:6px 9px}input[type=checkbox]{accent-color:#71dbcf}#range{font-size:12px;color:var(--muted)}.toolbar .voice{margin-left:auto;white-space:nowrap}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.metrics article{background:linear-gradient(115deg,#1c2d44,#111d2f);border:1px solid var(--line);border-radius:9px;padding:20px 24px;position:relative;overflow:hidden}.metrics article:after{content:"";position:absolute;right:-20px;top:10px;width:110px;height:110px;border:1px solid currentColor;border-radius:50%;opacity:.07}.metrics article>span{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:13px}.metrics article i{display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor}.metrics strong{display:block;font:600 42px "Segoe UI",sans-serif;letter-spacing:1px;margin:10px 0 4px}.metrics small{font-size:11px;color:var(--muted)}.hardware{color:var(--hardware)}.communication{color:var(--communication)}.software{color:var(--software)}.metrics .hardware i{color:var(--hardware)}.metrics .communication i{color:var(--communication)}.metrics .software i{color:var(--software)}.panel{background:var(--panel);border:1px solid var(--line);border-radius:9px;padding:20px;min-width:0}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.overview{display:grid;grid-template-columns:1.8fr 1fr;gap:16px;margin-bottom:20px}.legend{display:flex;gap:16px;font-size:11px}.legend span:before{content:"";display:inline-block;width:7px;height:7px;background:currentColor;border-radius:2px;margin-right:6px}.trend{height:215px}.trend svg{width:100%;height:100%}.trend text{font:10px "Segoe UI",sans-serif;fill:var(--muted)}.hint,.unit{font-size:11px;color:var(--muted)}.hint{margin:6px 0 0}.type-row{display:grid;grid-template-columns:100px 1fr 60px;gap:12px;align-items:center;padding:10px 0}.type-name{font-size:12px}.type-count{text-align:right;font-size:13px}.type-count small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.bar{height:7px;background:#243449;border-radius:4px;overflow:hidden;display:flex}.bar>span{height:100%}.rankings{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:20px}.rank-symbol{font:300 30px "Segoe UI",sans-serif;opacity:.65}.rank-list{max-height:325px;overflow:auto;scrollbar-width:thin}.rank-row{display:grid;grid-template-columns:24px 1fr 58px;gap:9px;width:100%;text-align:left;background:transparent;border:0;border-radius:0;border-bottom:1px solid var(--line);padding:14px 0;align-items:center}.rank-row:last-child{border-bottom:0}.rank-row:hover,.rank-row.selected{background:#1b2c43}.rank-index{color:var(--muted);font:15px "Segoe UI",sans-serif}.rank-info{min-width:0}.rank-info b{font-size:12px;font-weight:500;display:block;overflow-wrap:anywhere}.rank-info small{display:block;font-size:11px;color:var(--muted);margin:6px 0 8px;line-height:1.4}.rank-value{text-align:right;font:600 20px "Segoe UI",sans-serif}.rank-value small{display:block;font:10px "Microsoft YaHei",sans-serif;color:var(--muted);margin-top:4px}.rank-info .bar{height:3px}.rank-info .bar>span{background:currentColor}.empty{display:grid;place-items:center;color:var(--muted);font-size:12px;min-height:120px}.event-actions{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px}.event-actions button{font-size:11px;padding:6px 10px}.table-wrap{overflow:auto;max-height:460px}table{width:100%;border-collapse:collapse;font-size:12px;table-layout:fixed}th{background:#15253b;color:var(--muted);text-align:left;font-size:11px;font-weight:500;padding:11px 12px;position:sticky;top:0}td{padding:12px;vertical-align:top;border-bottom:1px solid var(--line);line-height:1.7;overflow-wrap:anywhere}th:first-child{width:135px}th:nth-child(2){width:130px}th:nth-child(3){width:21%}th:nth-child(4){width:20%}td small{display:block;color:var(--muted);font-size:11px}.badge{display:inline-block;border-radius:4px;padding:0 7px;background:#ffffff09;font-size:11px}.evidence{margin-top:6px}summary{cursor:pointer;color:#88b7db;font-size:11px}.evidence pre{white-space:pre-wrap;font:11px/1.7 "Microsoft YaHei",sans-serif;color:var(--muted);margin:6px 0}.notice{background:#493523;border:1px solid #735435;border-radius:6px;padding:12px 16px;color:#ffce97;margin-bottom:16px;font-size:12px}footer{display:flex;justify-content:space-between;gap:24px;font-size:10px;line-height:1.8;color:var(--muted);margin-top:14px}#quality{white-space:nowrap}.events-panel{margin-bottom:8px}
@media(min-width:1700px){.dashboard{padding:30px 42px}.trend{height:255px}.metrics strong{font-size:48px}.rank-row{padding:18px 0}.rank-list{max-height:390px}}
@media(max-width:1100px){.dashboard{padding:18px}.toolbar{flex-wrap:wrap}.toolbar .voice{margin-left:0}.rankings{grid-template-columns:1fr}.rank-list{max-height:240px}.overview{grid-template-columns:1fr 1fr}.identity{gap:14px}.legend{gap:8px}.metrics article{padding:16px}.metrics strong{font-size:34px}table{min-width:950px}}
@media(max-width:700px){.header{align-items:flex-start}.identity>a,.separator{display:none}h1{font-size:23px}.live{flex-wrap:wrap;justify-content:flex-end}.metrics{grid-template-columns:1fr 1fr;gap:10px}.overview{grid-template-columns:1fr}.toolbar{gap:12px}#range{width:100%;order:5}.event-actions{flex-wrap:wrap;justify-content:flex-end}.panel-heading{align-items:flex-start}footer{display:block}#quality{white-space:normal}.eyebrow{font-size:9px}}

/* Third screen shares the shell, brand and palette with documents/execution. */
body[data-screen="exceptions"] .dashboard { max-width: none; margin: 0; padding: 0; }
html:has(body[data-screen="exceptions"]),
body[data-screen="exceptions"] { height: auto; min-height: 100%; overflow-y: auto; }
body[data-screen="exceptions"] .app { height: auto; min-height: 100vh; }
body[data-screen="exceptions"] .sidebar { position: sticky; top: 0; height: 100vh; }
body[data-screen="exceptions"] .metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
body[data-screen="exceptions"] .metrics .review { color: #90a4ae; }
body[data-screen="exceptions"] .exception-welcome { grid-template-columns: minmax(0, 1fr) auto; }
body[data-screen="exceptions"] .panel { border-radius: 7px; padding: 16px; }
body[data-screen="exceptions"] .metrics article { background: var(--panel); border-radius: 7px; }
body[data-screen="exceptions"] .toolbar { background: var(--panel); border-radius: 7px; }
body[data-screen="exceptions"] .rank-row:hover,
body[data-screen="exceptions"] .rank-row.selected { background: var(--panel-2); }
body[data-screen="exceptions"] .periods,
body[data-screen="exceptions"] input[type="date"] { background: #061a26; }
body[data-screen="exceptions"] button:not(.rank-row):not([data-period]) { background: var(--panel-2); }
body[data-screen="exceptions"] th { background: var(--panel-2); }
@media(max-width:800px) {
  body[data-screen="exceptions"] .exception-welcome { grid-template-columns: 1fr; }
  body[data-screen="exceptions"] .live { justify-content: flex-start; }
  body[data-screen="exceptions"] .overview { grid-template-columns: 1fr; }
  body[data-screen="exceptions"] .toolbar { flex-wrap: wrap; }
}
.attribution-scope { display:flex; align-items:center; flex-wrap:wrap; gap:16px; margin:0 0 14px; color:var(--muted); font-size:12px; }
.attribution-scope label { display:flex; align-items:center; gap:8px; }
.attribution-scope select { background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:5px; padding:8px; }
.subject-panel { margin-bottom:18px; }
.subject-counts { display:grid; grid-template-columns:repeat(auto-fit,minmax(115px,1fr)); gap:10px; }
.subject-count { display:flex; justify-content:space-between; align-items:center; text-align:left; gap:10px; color:var(--muted); }
.subject-count strong { color:var(--text); font-size:20px; }
.subject-count.selected { border-color:var(--cyan); color:var(--cyan); }
.review { color:#90a4ae; }
@media(max-width:1100px) { body[data-screen="exceptions"] .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media(max-width:700px) { body[data-screen="exceptions"] .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Readable exception evidence and state comparison. */
body[data-screen="exceptions"] table { font-size:16px; min-width:1500px; }
body[data-screen="exceptions"] th { font-size:15px; padding:15px 12px; }
body[data-screen="exceptions"] td { padding:18px 12px; line-height:1.65; }
body[data-screen="exceptions"] th:first-child { width:140px; }
body[data-screen="exceptions"] th:nth-child(2) { width:145px; }
body[data-screen="exceptions"] th:nth-child(3) { width:140px; }
body[data-screen="exceptions"] th:nth-child(4) { width:23%; }
body[data-screen="exceptions"] th:nth-child(5) { width:22%; }
body[data-screen="exceptions"] td small, body[data-screen="exceptions"] .badge,
body[data-screen="exceptions"] summary { font-size:14px; }
body[data-screen="exceptions"] .event-node { display:block; font-size:19px; margin-top:10px; line-height:1.55; color:var(--text); }
body[data-screen="exceptions"] .state-value { color:var(--text); font-size:16px; margin-top:6px; }
body[data-screen="exceptions"] .reason-analysis { font-weight:500; }
body[data-screen="exceptions"] .evidence pre { font-size:14px; }

body[data-screen="exceptions"] .dashboard { font-size:15px; }
body[data-screen="exceptions"] .panel h2 { font-size:18px; }
body[data-screen="exceptions"] .toolbar, body[data-screen="exceptions"] .attribution-scope,
body[data-screen="exceptions"] .rank-info small, body[data-screen="exceptions"] .metrics small { font-size:14px; }

body[data-screen="exceptions"] .metrics { grid-template-columns:repeat(6,minmax(0,1fr)); }
body[data-screen="exceptions"] .rankings { grid-template-columns:repeat(2,minmax(0,1fr)); }
body[data-screen="exceptions"] .mes { color:#69aaff; }
body[data-screen="exceptions"] .mes .bar span { background:#69aaff; }
@media(max-width:1100px) { body[data-screen="exceptions"] .metrics { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:700px) { body[data-screen="exceptions"] .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } body[data-screen="exceptions"] .rankings { grid-template-columns:1fr; } }

.dispatch-summary { display:flex; align-items:center; flex-wrap:wrap; gap:16px 36px; margin-bottom:16px; font-size:17px; }
.dispatch-summary strong { color:var(--text); font-size:19px; }
.dispatch-summary b { color:var(--cyan); font-size:25px; margin-left:6px; }

.event-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.event-actions label { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:14px; }
.event-actions select { background:var(--panel-2); color:var(--text); border:1px solid var(--line); border-radius:5px; padding:7px 10px; font:inherit; }
.review-controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 16px;color:#b9d7e3;font-size:14px}
.review-controls select,.review-controls input:not([type=checkbox]){background:#082538;color:#e8f9ff;border:1px solid #275164;border-radius:5px;padding:8px 10px;font:inherit}
.review-controls #reviewNote{flex:1 1 260px}.review-controls #reviewOperator{width:130px}
.review-controls button{background:#137f8d;color:white;border:0;border-radius:5px;padding:9px 14px;cursor:pointer}
.review-controls button:disabled{opacity:.5;cursor:wait}.event-select{width:17px;height:17px}
.metrics .other{color:#e5c178}.legend .other{color:#e5c178}
body[data-screen="exceptions"] .rank-row.other,body[data-screen="exceptions"] .rank-symbol.other,body[data-screen="exceptions"] .eyebrow.other{color:#e5c178}
body[data-screen="exceptions"] .rank-row.pending,body[data-screen="exceptions"] .rank-symbol.review,body[data-screen="exceptions"] .eyebrow.review{color:#90a4ae}

body[data-screen="exceptions"] .review-controls{display:grid;grid-template-columns:minmax(360px,2.3fr) minmax(145px,.8fr) minmax(210px,1.3fr) minmax(210px,1.3fr) auto;align-items:end;gap:12px;padding:18px 0}
body[data-screen="exceptions"] .review-field{display:flex;flex-direction:column;gap:8px;min-width:0;color:var(--muted);font-size:14px}
body[data-screen="exceptions"] .review-field select,body[data-screen="exceptions"] .review-field input{width:100%;min-width:0;min-height:42px;box-sizing:border-box}
body[data-screen="exceptions"] .review-controls #reviewNote{flex:auto}
body[data-screen="exceptions"] .review-controls button{min-height:42px;white-space:nowrap}
body[data-screen="exceptions"] .review-detail{border:1px solid var(--line);background:var(--panel-2);border-radius:6px;padding:18px;min-height:70px;color:var(--muted);font-size:15px;line-height:1.6}
body[data-screen="exceptions"] .review-detail-heading{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px 18px;margin-bottom:14px}
body[data-screen="exceptions"] .review-detail-heading strong{color:var(--text);font-size:19px}
body[data-screen="exceptions"] .review-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
body[data-screen="exceptions"] .review-detail-grid>div{border-left:3px solid var(--cyan);padding-left:12px}
body[data-screen="exceptions"] .review-detail-grid b{color:var(--cyan)}
body[data-screen="exceptions"] .review-detail-grid p{margin:6px 0;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}
body[data-screen="exceptions"] .review-detail .evidence{margin-top:14px}
body[data-screen="exceptions"] .review-detail .evidence pre{white-space:pre-wrap;overflow-wrap:anywhere}
body[data-screen="exceptions"] .review-undo{display:flex;align-items:end;flex-wrap:wrap;gap:12px 16px;border-top:1px solid var(--line);margin-top:18px;padding-top:16px;color:var(--muted);font-size:14px}
body[data-screen="exceptions"] .review-undo label{display:flex;flex-direction:column;gap:8px;min-width:min(540px,100%);max-width:100%}
body[data-screen="exceptions"] .review-undo select{background:#082538;color:#e8f9ff;border:1px solid #275164;border-radius:5px;padding:9px 10px;min-height:42px;font:inherit;max-width:100%}
body[data-screen="exceptions"] .review-undo button{border:1px solid #8f7180;border-radius:5px;background:transparent;color:#ffc8d1;padding:9px 14px;min-height:42px;cursor:pointer}
body[data-screen="exceptions"] .review-undo button:disabled{opacity:.45;cursor:default}
body[data-screen="exceptions"] .review-undo span{flex:1 1 260px;overflow-wrap:anywhere}
body[data-screen="exceptions"] .rank-detail-panel{margin-top:18px}
body[data-screen="exceptions"] .rank-detail-events{display:grid;gap:14px;margin-top:16px}
body[data-screen="exceptions"] .rank-evidence-card{border:1px solid var(--line);border-radius:6px;background:var(--panel-2);padding:16px;color:var(--text);font-size:15px;line-height:1.6}
body[data-screen="exceptions"] .rank-evidence-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 18px;margin-bottom:12px}
body[data-screen="exceptions"] .rank-evidence-head strong{font-size:18px}
body[data-screen="exceptions"] .rank-evidence-head span{color:var(--muted)}
body[data-screen="exceptions"] .rank-evidence-card p{margin:7px 0;overflow-wrap:anywhere}
body[data-screen="exceptions"] .rank-evidence-card b{color:var(--cyan)}
body[data-screen="exceptions"] .rank-occurrences{margin:14px 0 0;padding-left:26px}
body[data-screen="exceptions"] .rank-occurrences li{border-top:1px solid var(--line);padding:10px 0}
body[data-screen="exceptions"] .rank-occurrences time{color:var(--cyan);font-weight:600}
body[data-screen="exceptions"] .rank-occurrences pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
body[data-screen="exceptions"] #rankDetailMore{margin-top:14px}
@media(max-width:1400px){body[data-screen="exceptions"] .review-controls{grid-template-columns:minmax(300px,2fr) minmax(150px,1fr) minmax(230px,1.5fr)}body[data-screen="exceptions"] .review-reason{grid-column:1 / 3}}
@media(max-width:800px){body[data-screen="exceptions"] .review-controls{grid-template-columns:1fr}body[data-screen="exceptions"] .review-reason{grid-column:auto}body[data-screen="exceptions"] .review-detail-grid{grid-template-columns:1fr}}

body[data-screen="exceptions"] .dispatch-log-panel,body[data-screen="exceptions"] .decision-panel{margin-bottom:16px}
body[data-screen="exceptions"] .dispatch-log-list{max-height:270px;overflow:auto}
body[data-screen="exceptions"] .dispatch-log-row{display:grid;grid-template-columns:185px 70px minmax(170px,1fr) minmax(170px,1fr);gap:16px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--line);font-size:14px}
body[data-screen="exceptions"] .dispatch-log-row time{color:var(--muted)}
body[data-screen="exceptions"] .dispatch-flow{color:var(--cyan);font-weight:600}
body[data-screen="exceptions"] #dispatchMore{margin-top:12px}
body[data-screen="exceptions"] .decision-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
body[data-screen="exceptions"] .decision-grid>div{display:flex;flex-direction:column;gap:7px;border:1px solid var(--line);border-radius:6px;padding:13px;background:var(--panel-2)}
body[data-screen="exceptions"] .decision-grid b{font-size:15px}
body[data-screen="exceptions"] .decision-grid strong{color:var(--cyan);font-size:25px}
body[data-screen="exceptions"] .decision-grid small{color:var(--muted);font-size:13px;line-height:1.5}
body[data-screen="exceptions"] .decision-panel .hint{font-size:13px;margin-top:12px}
@media(max-width:1100px){body[data-screen="exceptions"] .decision-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){body[data-screen="exceptions"] .decision-grid{grid-template-columns:1fr}body[data-screen="exceptions"] .dispatch-log-row{grid-template-columns:1fr 1fr;gap:5px}}

/* Summary shares one row with dispatch counts. */
.toolbar #refresh{margin-left:auto}.metrics{grid-template-columns:repeat(6,minmax(0,1fr))}.dispatch-summary{flex-wrap:wrap}#average{color:var(--muted);font-size:13px}
@media(max-width:1200px){.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

.summary-link{border:0;background:transparent;padding:2px 0;color:var(--text);font-size:17px}.summary-link:hover{background:transparent;color:var(--cyan);text-decoration:underline;text-underline-offset:5px}.summary-link:focus-visible{outline:2px solid var(--cyan)}
.dispatch-dialog{width:min(960px,94vw);max-height:85vh;border:1px solid var(--line);border-radius:10px;background:var(--panel,#0b2836);color:var(--text);padding:24px;overflow:auto}.dispatch-dialog::backdrop{background:#001018bb}.dispatch-order-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.dispatch-order-card{padding:18px;border:1px solid var(--line);border-radius:8px;background:var(--panel-2)}.dispatch-order-card>div{display:flex;justify-content:space-between;gap:12px}.dispatch-order-card strong{overflow-wrap:anywhere}.dispatch-order-card dl{display:grid;grid-template-columns:95px 1fr;gap:10px;margin-bottom:0;font-size:14px}.dispatch-order-card dt{color:var(--muted)}.dispatch-order-card dd{margin:0;overflow-wrap:anywhere}.metrics{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1100px){.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:700px){.dispatch-order-list{grid-template-columns:1fr}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.dispatch-dialog{padding:16px}}

.review-history{margin-top:24px;padding-top:18px;border-top:1px solid var(--line)}.review-history h3{margin:0;font-size:17px}.undo-cards{display:grid;gap:12px}.undo-card{border:1px solid var(--line);border-radius:8px;padding:16px;background:var(--panel-2)}.undo-card-heading,.undo-card-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.undo-card p{color:var(--muted);font-size:14px}.undo-card dl{display:grid;grid-template-columns:80px 1fr;gap:8px;font-size:14px}.undo-card dt,.undo-card small{color:var(--muted)}.undo-card dd{margin:0;overflow-wrap:anywhere}.undo-card-footer{margin-top:14px}.undo-pagination{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-top:16px;font-size:13px;color:var(--muted)}@media(max-width:700px){.undo-card-footer,.undo-card-heading{align-items:flex-start;flex-wrap:wrap}}

.pending-link{cursor:pointer}.pending-link:hover{border-color:var(--cyan)}.pending-link:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}#pendingEventsPanel{scroll-margin-top:24px}body[data-screen="exceptions"] .decision-grid{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:1100px){body[data-screen="exceptions"] .decision-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){body[data-screen="exceptions"] .decision-grid{grid-template-columns:1fr}}

.review-history-actions{display:flex;align-items:center;gap:14px}#undoHistoryContent[hidden]{display:none!important}@media(max-width:700px){.review-history-actions{flex-wrap:wrap;justify-content:flex-end}}

/* Compact count lists keep frequent issues visible without chart space. */
body[data-screen="exceptions"] .rankings{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
body[data-screen="exceptions"] .rankings .panel-heading{margin-bottom:8px}
body[data-screen="exceptions"] .rankings .panel h2{font-size:16px}
body[data-screen="exceptions"] .rank-symbol{display:none}
body[data-screen="exceptions"] .rank-row{grid-template-columns:20px minmax(0,1fr) 42px;padding:10px 0;gap:7px}
body[data-screen="exceptions"] .rank-info small{font-size:12px;margin:4px 0 0}
body[data-screen="exceptions"] .rank-value small{display:inline;margin-left:4px}
body[data-screen="exceptions"] .rank-list{max-height:240px}
body[data-screen="exceptions"] .rank-list .empty{min-height:48px;justify-content:start}
body[data-screen="exceptions"] .decision-secondary{font-size:13px;color:var(--text)}
@media(max-width:1400px){body[data-screen="exceptions"] .rankings{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){body[data-screen="exceptions"] .rankings{grid-template-columns:1fr}}

/* One summary presents counts, rates and investigation advice together. */
body[data-screen="exceptions"] .decision-panel .dispatch-summary{border-bottom:1px solid var(--line);padding:0 0 14px;margin-bottom:14px;gap:12px 28px}
body[data-screen="exceptions"] #decisionGrid.analysis-metrics{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:0}
body[data-screen="exceptions"] .analysis-metrics article{padding:16px;display:flex;flex-direction:column;gap:7px}
body[data-screen="exceptions"] .analysis-metrics strong{font-size:34px;margin:0;color:inherit}
body[data-screen="exceptions"] .analysis-metrics small{font-size:13px;line-height:1.5}
body[data-screen="exceptions"] .analysis-metrics small:first-of-type{color:var(--text)}
body[data-screen="exceptions"] .analysis-advice{font-size:12px;line-height:1.5;color:var(--muted);margin:3px 0 0}
body[data-screen="exceptions"] .overview{grid-template-columns:minmax(0,1fr)}
@media(max-width:1100px){body[data-screen="exceptions"] #decisionGrid.analysis-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){body[data-screen="exceptions"] #decisionGrid.analysis-metrics{grid-template-columns:1fr}}

.arm-execution{margin-top:14px;padding:12px;border:1px solid var(--line);border-radius:6px;color:var(--muted)}.arm-execution b{color:var(--cyan)}.arm-execution pre{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.6 Consolas,monospace;color:var(--text)}

.review-buttons{display:flex;gap:8px}body[data-screen="exceptions"] .review-controls #closeException{background:transparent;border:1px solid #97746b;color:#ffd0ae;white-space:nowrap}


.evidence-story{font-size:15px;line-height:1.8;color:var(--text)}.evidence-story h3{font-size:16px;color:var(--cyan);margin:0 0 10px}.evidence-story p{margin:10px 0}.story-conclusion{font-size:17px}.story-timeline{padding-left:22px;margin:14px 0}.story-timeline li{padding:5px 0}.story-timeline time{display:inline-block;color:var(--cyan);margin-right:12px;font-size:13px}.story-facts{padding-left:22px}.story-uncertain{color:var(--muted)}.story-advice{border-left:3px solid var(--cyan);padding:8px 12px;background:#ffffff04}.evidence-story .evidence{margin-top:16px}

body[data-screen="exceptions"] .exception-charts{grid-template-columns:minmax(0,1.8fr) minmax(300px,1fr)}.exception-charts .panel-heading{flex-wrap:wrap;gap:10px}.exception-charts .legend{flex-wrap:wrap}.chart-loading{display:grid;place-items:center;min-height:210px;color:var(--muted);font-size:13px}.monthly-summary{height:215px;display:grid;grid-auto-rows:minmax(0,1fr);gap:8px;padding:8px 0}.month-row{display:grid;grid-template-columns:90px minmax(0,1fr) 48px;align-items:center;gap:12px;font-size:12px}.month-label{color:var(--muted)}.month-track{height:13px;border-radius:3px;background:#ffffff07;overflow:hidden}.month-track>span{display:block;height:100%;background:#438eaa;border-radius:3px;min-width:0}.current-month .month-track>span{background:var(--cyan)}.current-month .month-label{color:var(--text)}.month-row strong{text-align:right;color:var(--text);font-size:17px}.month-row small{font-size:10px;font-weight:400;color:var(--muted);margin-left:4px}@media(min-width:1700px){.monthly-summary{height:255px}}@media(max-width:1100px){body[data-screen="exceptions"] .exception-charts{grid-template-columns:minmax(0,1fr)}}

body[data-screen="exceptions"] .log-item{padding:0}.log-list-head,.log-summary{display:grid;grid-template-columns:165px minmax(160px,.9fr) minmax(0,1.5fr);gap:18px;align-items:start}.log-list-head{padding:0 18px;color:var(--muted);font-size:12px}.log-summary{padding:16px 18px;cursor:pointer;color:var(--text);font-size:14px;list-style:none}.log-summary::-webkit-details-marker{display:none}.log-summary time{color:var(--muted);font-size:13px}.log-summary strong{font-size:15px}.log-summary>span{padding-right:18px;position:relative}.log-summary>span:after{content:"▸";position:absolute;right:0;color:var(--muted)}.log-item[open]>.log-summary>span:after{content:"▾"}.log-item[open]{border-color:#35788b}.log-summary:hover{background:var(--panel-2)}.log-detail{padding:0 18px 18px;border-top:1px solid var(--line)}.log-meta{font-size:12px;color:var(--muted);margin:12px 0}.occurrence-list{display:grid;gap:8px;margin-top:10px}.occurrence-item{border:1px solid var(--line);border-radius:5px}.occurrence-item>summary{display:grid;grid-template-columns:24px 170px minmax(0,1fr);gap:12px;padding:10px 12px;list-style:none;color:var(--text)}.occurrence-item>summary::-webkit-details-marker{display:none}.record-index{color:var(--cyan)}.occurrence-item time{color:var(--muted)}.occurrence-detail{padding:12px 16px;border-top:1px solid var(--line)}@media(max-width:800px){.log-list-head{display:none}.log-summary{grid-template-columns:1fr;gap:6px}.occurrence-item>summary{grid-template-columns:20px minmax(0,1fr)}.occurrence-item>summary>span:last-child{grid-column:2}}

body[data-screen="exceptions"] .log-item[open]{border-color:#35788b}.occurrence-item>summary>span:last-child:after{content:"▸";float:right;color:var(--muted);margin-left:8px}.occurrence-item[open]>summary>span:last-child:after{content:"▾"}

.exception-charts .trend text{font-size:12px}

.chart-scope-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 12px;color:var(--text);font-size:15px}.chart-scope-heading span{font-size:12px;color:var(--muted)}.toolbar-title{font-size:13px;white-space:nowrap;color:var(--text)}@media(max-width:700px){.chart-scope-heading{flex-direction:column;gap:4px}}

.manual-review{margin:14px 0;padding:12px 16px;border:1px solid #487b89;border-left:3px solid var(--cyan);border-radius:5px;background:#13c9c509;color:var(--text);font-size:14px}.manual-review>b{color:var(--cyan)}.manual-review p{margin:8px 0;overflow-wrap:anywhere}.manual-review small{color:var(--muted)}.manual-review-badge{display:inline-block;padding:1px 6px;margin-right:5px;border:1px solid #397883;border-radius:4px;color:var(--cyan);font-size:12px;white-space:nowrap}

.undo-summary-text>span{display:block;overflow-wrap:anywhere}.undo-summary-text>span+span{margin-top:4px}.undo-card .undo-card-heading{margin-top:14px}

.undo-list-head,.undo-log-summary{grid-template-columns:165px minmax(200px,1.2fr) minmax(160px,.8fr) minmax(200px,1.2fr)}.undo-log-summary>span{overflow-wrap:anywhere}.undo-log-summary>.undo-note:after{content:none}@media(max-width:900px){.undo-list-head{display:none}.undo-log-summary{grid-template-columns:1fr;gap:8px}.undo-log-summary>.undo-note:before{content:"分类依据：";color:var(--muted)}.undo-log-summary>.undo-reason:before{content:"原因分析：";color:var(--muted)}}

body[data-screen="exceptions"] .exception-count{align-self:flex-start;border:0;padding:0;background:transparent!important;color:inherit;text-align:left;position:relative;z-index:1}.exception-count:hover strong{text-decoration:underline;text-underline-offset:5px}.metric-ranks{margin-top:8px;padding-top:12px;border-top:1px solid var(--line);position:relative;z-index:1}.metric-ranks h3{font-size:12px;color:var(--muted);margin:0 0 4px}.metric-ranks .rank-list{max-height:none;overflow:visible}.metric-ranks .empty{min-height:56px}.metric-ranks .rank-value small{font-size:10px}.metric-ranks .rank-info small{font-size:11px}

.metric-ranks .rank-list{display:flex;flex-wrap:wrap;gap:8px}.topic-tag{display:flex;align-items:center;gap:12px;max-width:100%;padding:7px 10px;border-radius:5px;text-align:left}.topic-tag .rank-info b{font-size:13px}.topic-tag>span:last-child{font-size:12px;white-space:nowrap}.topic-tag.selected{outline:1px solid currentColor}.topic-tag.communication{color:#4ccece}.topic-tag.hardware{color:#ffae76}.topic-tag.software{color:#9d9aff}.topic-tag.mes{color:#69aaff}

.log-topic-badge{display:inline-block;padding:1px 6px;margin-right:5px;border:1px solid #526c8d;border-radius:4px;color:#b4c9e6;font-size:12px;font-weight:500;vertical-align:baseline}

.frequent-exceptions{margin-top:4px;font-size:12px;color:var(--muted);line-height:1.6}.frequent-exceptions p{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin:5px 0}.frequent-exceptions span{overflow-wrap:anywhere}.frequent-exceptions b{font-weight:500;color:var(--text);white-space:nowrap}

body[data-screen="exceptions"] .manual-review-badge{color:#ffd18a;border-color:#a77b3e;background:#b67b1c18}body[data-screen="exceptions"] .log-topic-badge{color:#9bc4ff;border-color:#426993;background:#427bb418}.log-filters{margin:0 0 14px;color:var(--muted);font-size:13px}.log-filters label{display:flex;gap:10px;align-items:center}.log-filters select{font:inherit;color:var(--text);background:var(--panel-2);border:1px solid var(--line);border-radius:5px;padding:6px 10px}

body[data-screen="exceptions"] .topbar .clock{display:flex;align-items:baseline;gap:12px;white-space:nowrap}

body[data-screen="exceptions"] .topbar{height:52px;padding:0 16px}body[data-screen="exceptions"] .top-actions{align-items:center}
