.scope-trial{--st-border:#dce4ed;--st-muted:#64748b;max-width:100%;min-width:0}.scope-trial *{box-sizing:border-box}.scope-trial h1{margin-bottom:8px}.st-lead{color:var(--st-muted);margin-top:0}.st-actions,.st-pager,.st-bridge{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.st-tabs{margin:0 0 20px}.st-subtabs>button{appearance:none;border:0;background:transparent;cursor:pointer}.st-subtabs>button:hover{background:#eaf3f8}.st-subtabs>button.active{background:#e6f2fa}.st-panel{margin:14px 0}.st-panel h2{margin-top:0}.st-scope{position:relative;z-index:4;background:#f8fafc}.st-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.st-grid>label,.st-grid>.st-field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:11px;font-weight:700;color:#62758b}.st-grid input:not([type=checkbox]),.st-grid select,.st-grid textarea{width:100%;min-width:0;border:1px solid #cbd7e3;border-radius:7px;padding:9px 10px;background:#fff;color:#142438;font-family:inherit;font-size:12px}.st-grid .intake-multi{width:100%}.st-grid .intake-multi>summary{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.st-grid .bill-select-panel{z-index:12}.st-number{grid-column:span 2}.st-actions{margin-top:12px}.st-actions .button{white-space:normal}.st-note{color:var(--st-muted);font-size:13px;line-height:1.65}.st-note strong{color:#334155}.st-scope-summary{border-top:1px solid var(--st-border);padding-top:10px;margin-bottom:0;font-size:13px;overflow-wrap:anywhere}.st-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:14px 0}.st-card{background:#f8fafc;border:1px solid var(--st-border);padding:13px;border-radius:9px;min-width:0}.st-card span{display:block;color:#74869a;font-size:11px;font-weight:600}.st-card strong{display:block;margin-top:6px;font-size:clamp(21px,2.1vw,27px);overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.st-card.emphasis{background:#eff6ff;border-color:#bfdbfe}.st-table-shell{min-width:0;margin:12px 0}.st-scroll-top{height:18px;overflow-x:auto;overflow-y:hidden;background:#f1f5f9;border:1px solid var(--st-border);border-bottom:0;border-radius:6px 6px 0 0}.st-scroll-top>div{height:1px}.st-table{overflow:auto;max-height:60vh;border:1px solid var(--st-border);border-radius:0 0 6px 6px;overscroll-behavior:contain}.st-table table{border-collapse:separate;border-spacing:0;min-width:100%;font-size:12px}.st-table th{position:sticky;top:0;background:#eef3f9;z-index:2;text-align:left;white-space:nowrap;padding:10px;border-bottom:1px solid var(--st-border)}.st-table td{padding:9px 10px;border-bottom:1px solid #e8edf3;vertical-align:top;max-width:380px;min-width:100px;overflow-wrap:anywhere}.st-table td:first-child,.st-table th:first-child{min-width:45px}.st-table tbody tr:hover{background:#f8fbff}.st-table .st-actions{margin:0;min-width:150px}.st-table .button{padding:5px 8px;font-size:12px}.st-empty{padding:16px;color:var(--st-muted);background:#f8fafc;border-radius:8px}.st-pager{justify-content:flex-end;margin:10px 0;font-size:13px}.st-badge{display:inline-block;padding:3px 7px;border-radius:5px;background:#e8f1fb;color:#1d4e84;font-size:12px;white-space:nowrap}.st-badge.warn{background:#fff4da;color:#92400e}.st-badge.ok{background:#e5f7ed;color:#166534}.st-badge.muted{background:#eef2f6;color:#526074}.st-warning{border-left:4px solid #e9ac3c;background:#fffbeb;padding:11px 14px;border-radius:6px;line-height:1.65;overflow-wrap:anywhere}.st-success{border-left:4px solid #34a76f;background:#f0fdf4;padding:11px 14px;border-radius:6px;line-height:1.65}.st-error{border-left:4px solid #dc5252;background:#fff1f2;padding:11px 14px;border-radius:6px;line-height:1.65}.st-checkbox{display:flex;gap:8px;align-items:center;font-size:12px}.st-checkbox input{width:17px;height:17px;flex:none}.st-options{display:flex;gap:10px;flex-wrap:wrap}.st-option{display:flex;align-items:flex-start;gap:9px;padding:12px;border:1px solid var(--st-border);border-radius:8px;flex:1;min-width:220px;cursor:pointer}.st-option:has(input:checked){background:#eff6ff;border-color:#60a5fa}.st-option input{margin-top:3px}.st-option small{display:block;color:var(--st-muted);margin-top:5px;line-height:1.5}.st-progress{width:100%;height:12px;accent-color:#3b82f6}.st-bridge{align-items:stretch;margin:16px 0}.st-bridge>.st-card{flex:1;min-width:150px}.st-bridge>span{align-self:center;font-size:24px;color:var(--st-muted)}.st-formula{font-family:ui-monospace,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;background:#f1f5f9;padding:12px;border-radius:7px;line-height:1.7}.st-help{margin-top:24px}.st-help>summary{cursor:pointer;font-weight:700;padding:7px}.st-help li{line-height:1.8;margin:5px 0}.st-dialog{position:fixed;inset:20px 20px 20px auto;margin:0;width:min(900px,calc(100vw - 40px));max-width:none;max-height:calc(100vh - 40px);height:calc(100vh - 40px);padding:0;border:1px solid var(--st-border);border-radius:13px;box-shadow:0 18px 80px #0f172a55;color:#0f172a;background:#fff}.st-dialog::backdrop{background:#0f172a66}.st-dialog-head{position:sticky;top:0;background:#fff;border-bottom:1px solid var(--st-border);padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:10px;z-index:15}.st-dialog-head h2{margin:0;font-size:16px}.st-dialog-body{padding:18px;overflow-x:hidden}.st-dialog .st-table{max-height:45vh}.st-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--st-border);border:1px solid var(--st-border);border-radius:7px;overflow:hidden;margin:10px 0}.st-detail-grid>div{background:white;padding:10px;min-width:0}.st-detail-grid dt{font-size:12px;color:var(--st-muted);margin-bottom:5px}.st-detail-grid dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}.st-detail-grid code{font-size:11px;color:#94a3b8}.st-mini{font-size:12px;color:var(--st-muted)}.st-fee-editor{border:1px solid var(--st-border);border-radius:9px;padding:14px;margin:12px 0}.st-fee-editor>summary{cursor:pointer;font-weight:600}.st-field textarea{min-height:70px}.st-inline-status{min-height:1.5em;color:#b45309;font-size:13px}.st-history-params{font-size:12px;color:var(--st-muted);line-height:1.7}.st-current{outline:2px solid #93c5fd}.st-rule-meta{color:var(--st-muted);font-size:12px;line-height:1.5}.scope-trial :focus-visible,.st-dialog :focus-visible{outline:2px solid #3b82f6;outline-offset:2px}@media(min-width:1100px){.scope-trial .st-scope .st-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.scope-trial .st-number{grid-column:span 2}}@media(max-width:700px){.st-panel{padding:12px}.st-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.st-number{grid-column:1/-1}.st-tabs{gap:6px}.st-dialog{inset:8px;width:calc(100vw - 16px);height:calc(100vh - 16px);max-height:calc(100vh - 16px)}.st-dialog-head{padding:12px}.st-dialog-body{padding:12px}.st-detail-grid{grid-template-columns:1fr}.st-bridge>span{display:none}.st-bridge>.st-card{min-width:45%}.st-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.st-card strong{font-size:21px}.st-table td{max-width:260px}.st-table{max-height:55vh}.st-actions{gap:7px}.st-option{min-width:100%}.st-grid>.st-field .bill-select-panel{width:min(340px,calc(100vw - 48px))}.st-scope .bill-select-panel{max-width:calc(100vw - 48px)}}
.scope-trial .st-option{font-size:12px;font-weight:700;color:#62758b}.scope-trial .st-option>input{width:17px;height:17px;min-width:17px;flex:0 0 17px;padding:0;margin:3px 0 0}.scope-trial .st-option>span{flex:1;min-width:0}.scope-trial .st-option small{font-size:12px;font-weight:400}.st-contextbar{position:sticky;top:0;z-index:8;border:1px solid #cfdeed;border-radius:8px;background:#f0f7fff5;backdrop-filter:blur(5px);padding:8px 12px;display:flex;align-items:center;gap:12px;box-shadow:0 3px 8px #0f172a08}.st-contextbar>span{flex:1;font-size:12px;line-height:1.5;max-height:38px;overflow:hidden;color:#3b5e7a;overflow-wrap:anywhere}.st-contextbar .button{flex:none;padding:6px 9px;font-size:12px}.scope-trial .st-table input[type=checkbox]{width:17px;height:17px;min-width:17px;padding:0;margin:0}.st-rule-meta button{font-size:12px}@media(max-width:700px){.st-contextbar{padding:7px 9px;gap:8px}.st-contextbar>span{max-height:54px}.scope-trial .st-option small{font-size:12px}}

.scope-trial .button-secondary:disabled{opacity:.55;cursor:default}.st-table .button-secondary{padding:5px 8px;font-size:12px}.st-contextbar .button-secondary{flex:none;padding:6px 9px;font-size:12px}.st-actions .button-secondary{white-space:normal}
.scope-trial [hidden]{display:none!important}.st-source-table .st-table{max-height:360px}.st-source-table th code{font-size:10px;color:#74869a;font-weight:400}.st-source-table th{max-width:280px;white-space:normal;min-width:130px}.st-source-table td{min-width:130px}.scope-trial .st-actions>.st-field{min-width:140px;display:flex;gap:5px;flex-direction:column;font-size:11px;color:#62758b}.scope-trial .st-actions>.st-field input,.scope-trial .st-actions>.st-field select{font:inherit;padding:8px;border:1px solid #cbd7e3;border-radius:6px;max-width:100%}.scope-trial .workspace-tab{font-family:inherit}.scope-trial h3{font-size:14px;margin-top:18px}.scope-trial .st-panel>ol{line-height:1.8;overflow-wrap:anywhere}@media(max-width:700px){.scope-trial .st-actions>.st-field{min-width:120px;flex:1}.st-source-table .st-table{max-height:320px}.scope-trial .workspace-tabs{overflow-wrap:anywhere}.scope-trial .workspace-tab{white-space:normal}}

/* Trial tables own their column widths; long values never paint over a neighbour. */
.scope-trial .st-scope:has(.bill-select[open]){z-index:10}
.scope-trial .bill-select[open]{z-index:12}
body:has(.scope-trial .bill-select[open]) #bill-action-help{pointer-events:none}
.scope-trial .sb-read-connection{border-left:4px solid #e9ac3c;background:#fffbeb;padding:10px 14px;border-radius:6px;margin:10px 0;color:#78521e}
.scope-trial .sb-read-connection>p{margin:0;line-height:1.7}
.scope-trial{overflow-wrap:anywhere}
.scope-trial .st-grid-table{table-layout:fixed;min-width:100%;border-collapse:separate;border-spacing:0;white-space:normal}
.scope-trial .st-grid-table th,.scope-trial .st-grid-table td{box-sizing:border-box;min-width:0;max-width:none;overflow:hidden;white-space:normal;overflow-wrap:anywhere;vertical-align:top}
.scope-trial .st-grid-table th{position:sticky;top:0;z-index:2;background:#eef3f9;padding:10px 16px 10px 10px}
.scope-trial .st-cell-content{min-width:0;max-width:100%;width:100%;overflow:hidden;white-space:normal;overflow-wrap:anywhere;line-height:1.6}
.scope-trial .st-cell-text,.scope-trial .st-col-label{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;white-space:normal;overflow-wrap:anywhere;max-width:100%;min-width:0}
.scope-trial .st-sync-plans td:first-child .st-cell-text{display:block;-webkit-line-clamp:unset;line-clamp:unset}
.scope-trial .st-sync-plans td:first-child p{font-size:12px;font-weight:400;color:#62758b;margin:6px 0 0}
.scope-trial .st-col-label{line-height:1.55;font-weight:inherit}
.scope-trial .st-cell-text[tabindex="0"],.scope-trial .st-col-label[tabindex="0"]{cursor:help}
.scope-trial .st-cell-content .st-badge{white-space:normal;max-width:100%;overflow-wrap:anywhere}
.scope-trial .st-cell-controls,.scope-trial .st-cell-controls .st-actions{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.scope-trial .st-cell-controls .st-actions{display:flex;flex-wrap:wrap;gap:6px;margin:0}
.scope-trial .st-cell-controls button,.scope-trial .st-cell-controls a{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere}
.scope-trial .st-cell-controls>div:not(.st-actions)>button{margin:0 5px 5px 0}
.scope-trial .st-cell-controls select,.scope-trial .st-cell-controls textarea,.scope-trial .st-cell-controls input:not([type=checkbox]):not([type=radio]){width:100%;min-width:0;max-width:100%;box-sizing:border-box}
.scope-trial .st-col-resizer{position:absolute;right:0;top:0;bottom:0;width:8px;min-width:8px;cursor:col-resize;touch-action:none;user-select:none;border-right:2px solid transparent;z-index:3}
.scope-trial .st-col-resizer:hover,.scope-trial .st-col-resizer:focus-visible{border-color:#3b82f6;background:#3b82f61a;outline-offset:-2px}
.st-resizing-column,.st-resizing-column *{cursor:col-resize!important;user-select:none!important}
.scope-trial .intake-detail-scroll:has(>.st-grid-table){max-height:55vh;overflow:auto;border:1px solid var(--st-border);border-radius:0 0 6px 6px}
.scope-trial .intake-detail-scroll .st-grid-table th:first-child{z-index:4}
.st-cell-tooltip{position:fixed;inset:auto;margin:0;width:max-content;max-width:min(580px,calc(100vw - 24px));max-height:min(380px,60vh);overflow:auto;white-space:normal;overflow-wrap:anywhere;user-select:text}
.st-cell-tooltip p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
.scope-trial .st-dialog-head h2{min-width:0;overflow-wrap:anywhere;-webkit-line-clamp:3;line-clamp:3;line-height:1.5}
.scope-trial .st-dialog-body details>summary{white-space:normal;overflow-wrap:anywhere}

/* Bill identity and business fields stay readable independently of global typography. */
.st-bill-detail{font-family:inherit;font-size:13px;line-height:1.65}.st-bill-detail .st-detail-grid dd{font-size:13px;font-weight:400;line-height:1.65}.st-bill-detail .st-dialog-body details>summary{font-size:13px;font-weight:600;line-height:1.65;cursor:pointer;overflow-wrap:anywhere}.st-detail-identity{border:1px solid #cfe0ef;border-radius:8px;padding:12px;background:#f1f7fc;margin-bottom:14px;overflow-wrap:anywhere}.st-detail-identity>strong{font-size:14px;color:#175f89}.st-detail-identity p{margin:4px 0;font-size:13px;line-height:1.65}.st-bill-detail .st-extra-fields,.st-bill-detail .st-all-fields{margin:12px 0;padding:10px;border:1px solid var(--st-border);border-radius:7px}.st-bill-detail .st-detail-grid dt{font-size:12px}.st-bill-detail .st-detail-grid code{font-size:11px}

/* Compact, persistent source names; credentials and endpoints are never shown. */
.st-source-provenance{margin:8px 0 12px;padding:9px 12px;background:#f1f6fb;border:1px solid #dbe6f0;border-radius:7px;font-size:12px;line-height:1.65;overflow-wrap:anywhere;min-width:0;max-width:100%;box-sizing:border-box}.st-source-provenance>strong{display:block;font-size:12px;color:#526d87;margin-bottom:2px}.st-source-provenance code{font-size:12px;color:#26597f;white-space:normal;overflow-wrap:anywhere;user-select:text;cursor:help}.st-source-provenance span{color:#62758b;font-size:12px}.st-detail-grid dt[data-source-field]{cursor:help}

.st-fee-view .st-table{max-height:min(520px,60vh)}.scope-trial .st-field:has(select[aria-label="计算内容"]){margin:14px 0;max-width:430px}.scope-trial details>summary{font-size:13px;line-height:1.8;cursor:pointer}.scope-trial .st-checkbox{line-height:1.8}

.st-fee-view td small,.st-fee-view td strong{display:block;margin-top:5px}.st-fee-view td strong{font-variant-numeric:tabular-nums}
.scope-trial .st-chain-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}.scope-trial .st-chain{min-width:0;border:1px solid #ccdeeb;border-radius:9px;background:#f6faff;padding:13px}.scope-trial .st-chain h3{margin:0 0 7px;color:#285f80}.scope-trial .st-chain p{font-size:13px;line-height:1.8;color:#53697f;margin:0}.scope-trial .st-basis-policy{border:1px solid var(--st-border);border-radius:8px;padding:12px;margin:12px 0;min-width:0}.scope-trial .st-basis-policy>summary{font-weight:600;color:#285f80}.scope-trial .st-basis-policy .st-grid{margin-top:12px}.scope-trial .st-comparison-fields{display:flex;gap:12px 20px;flex-wrap:wrap}.st-comparison-view .st-table{max-height:min(520px,60vh)}.scope-trial .st-basis-settings input{max-width:100%}@media(max-width:700px){.scope-trial .st-chain-grid{grid-template-columns:1fr}.scope-trial .st-basis-policy .st-grid{grid-template-columns:1fr}.scope-trial .st-chain{padding:11px}}

/* Provenance-aware financial values: source and calculation status are separate. */
.scope-trial .st-metric,.scope-trial .st-detail-grid dd.st-metric{font-weight:var(--metric-weight,500);color:var(--metric-color,#334155);font-variant-numeric:tabular-nums}
.scope-trial .st-metric-order{--metric-color:#334155;--metric-weight:500}
.scope-trial .st-metric-bill{--metric-color:#1d4ed8;--metric-weight:600}
.scope-trial .st-metric-downstream{--metric-color:#6d28d9;--metric-weight:700}
.scope-trial .st-metric-theory,.scope-trial .st-metric-internal,.scope-trial .st-metric-difference{--metric-color:#64748b;--metric-weight:500}
.scope-trial .st-metric-missing{--metric-color:#78889b;--metric-weight:400;background:transparent!important}
.scope-trial .st-metric-partial{background:transparent!important}
.scope-trial .st-metric-total.st-metric-bill{background:#eff6ff;border-radius:4px;padding:2px 5px}
.scope-trial .st-metric-total.st-metric-downstream{background:#f3edff;border-radius:4px;padding:2px 5px}
.scope-trial .st-metric-label{font-weight:600;color:#334155}
.scope-trial .st-metric-cell{text-align:right}
.scope-trial th[data-metric-role=bill]{color:#1d4ed8}
.scope-trial th[data-metric-role=order]{color:#334155}
.scope-trial th[data-metric-role=downstream]{color:#6d28d9}
.scope-trial .st-metric-legend{display:flex;flex-wrap:wrap;gap:8px 18px;margin:10px 0;font-size:12px}
.scope-trial .st-metric-legend>span{border-bottom:2px solid currentColor;padding-bottom:2px}
.scope-trial .st-overview-selectors{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}
.scope-trial .st-overview-selectors>.st-field{flex:1;min-width:180px}
.scope-trial .st-overview .st-table{max-height:min(520px,53vh)}
.scope-trial .st-overview table{min-width:850px}
.scope-trial .st-overview-table th:first-child{left:0;z-index:5}
.scope-trial .st-overview-table td:first-child{position:sticky;left:0;z-index:1;background:#f8fafc}
.scope-trial .st-overview-table th:nth-child(2),.scope-trial .st-overview-table th:nth-child(3){color:#1d4ed8}
.scope-trial .st-overview-table td:nth-child(3){background:#f5f9ff}
.scope-trial .st-overview-value{font-size:13px;line-height:1.7;min-width:0}
.scope-trial .st-overview-value>small{display:block;color:#78889b;font-size:11px;font-weight:400;overflow-wrap:anywhere}
.scope-trial .st-overview-value>span.st-metric{display:inline-block;text-align:right;max-width:100%}
@media(max-width:700px){.scope-trial .st-overview .st-table{max-height:50vh}.scope-trial .st-overview-selectors>.st-field{min-width:150px}}

.scope-trial .st-metric-exceeds{--metric-color:#9a5800;--metric-weight:600}

.scope-trial .st-bridge>.st-card.emphasis{background:#f6f2ff;border-color:#d8c9f4}

/* Comparison metric names remain visible while compact numeric columns scroll. */
.scope-trial .st-comparison-metrics th:first-child{position:sticky;left:0;z-index:5;background:#eef3f9}
.scope-trial .st-comparison-metrics td:first-child{position:sticky;left:0;z-index:1;background:#f8fafc;box-shadow:1px 0 #dce4ed}
.scope-trial .st-comparison-metrics .st-table{max-height:min(520px,52vh)}
.scope-trial .st-comparison-metrics td:nth-child(n+2):nth-child(-n+5) .st-cell-content{white-space:nowrap}

.scope-trial .st-coverage-view td small{display:block;color:#64748b;font-size:11px;margin-top:5px}.scope-trial .st-coverage-view .st-table{max-height:min(520px,60vh)}
.scope-trial .st-report-form .st-field > input[type="checkbox"]{width:18px;height:18px;align-self:flex-start;margin:5px 0}.scope-trial .st-report-form fieldset{border:1px solid #d6e2ef;border-radius:8px;padding:12px;margin:10px 0}.scope-trial .st-report-form textarea{width:100%;min-height:72px}
.scope-trial .st-verification-summary,.scope-trial .st-operator-company{border:1px solid #d7e2ef;border-radius:8px;padding:12px;margin:12px 0;background:#fbfdff}
.scope-trial .st-verification-summary>summary,.scope-trial .st-operator-company>summary{font-weight:600;cursor:pointer;line-height:1.6;overflow-wrap:anywhere}
.scope-trial .st-operator-company[open]>summary{margin-bottom:12px}
.scope-trial .st-verification-summary .st-actions{flex-wrap:wrap}

.scope-trial table[data-column-profile="operator-phases"] td small{display:block;color:#64748b;font-size:11px;margin-top:4px}
.st-detail-filters{padding:14px;margin:0 0 16px;border:1px solid #dce4ed;border-radius:9px;background:#f8fafc}
.st-detail-filters .st-note{margin-bottom:0;font-weight:400}.st-detail-filters .st-grid>.st-field{font-size:12px}
.st-detail-filters .bill-select-panel{max-width:calc(100vw - 70px)}
.st-run-times{font-variant-numeric:tabular-nums;font-size:12px;line-height:1.8}
.st-run-times>div{display:flex;align-items:baseline;gap:3px;flex-wrap:wrap}
.st-run-times span,.st-run-times small{color:#64748b;font-size:11px}
.st-run-times time{white-space:nowrap}
@media(max-width:500px){.st-detail-filters .st-grid{grid-template-columns:1fr}.st-detail-filters{padding:10px}.st-detail-filters .bill-select-panel{width:min(320px,calc(100vw - 70px))}}
/* Daily/monthly settlement reports. */
.spc-plan{padding:18px;margin:16px 0;border:1px solid #cbdcf0;border-radius:10px;background:#f8fbff}
.spc-evidence{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;max-height:440px;overflow:auto;background:#f4f7fb;padding:12px}
.bm-workspace{min-width:0;--bm-border:#d5e3ef}
.bm-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
.bm-heading h2{margin:0}
.bm-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));align-items:end;gap:12px;margin:18px 0}
.bm-filters .st-actions{grid-column:1/-1}
.bm-filters input,.bm-filters select{min-width:0;max-width:100%;font:inherit}
.bm-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;margin:18px 0}
.bm-summary .bm-metric{min-height:64px;text-align:left;font-weight:700;border:1px solid var(--bm-border);background:#f6faff;color:#1b4f75;white-space:normal}
.bm-summary .bm-missing{border-left:4px solid #cf442e}
.bm-summary .bm-partial,.bm-summary .bm-stale{border-left:4px solid #ca8a04}
.bm-summary .bm-ready{border-left:4px solid #168064}
.bm-status{display:inline-flex;padding:4px 7px;border-radius:5px;font-size:12px;line-height:1.5;white-space:normal;background:#edf3f8;color:#3b536b;margin:2px 5px 2px 0}
.bm-status.bm-ready,.bm-status.bm-complete,.bm-status.bm-settled{background:#e5f5ee;color:#08694f}
.bm-status.bm-missing,.bm-status.bm-failed{background:#fff0ed;color:#a62a18}
.bm-status.bm-partial,.bm-status.bm-stale,.bm-status.bm-waiting_dependency{background:#fff4db;color:#885900}
.bm-calendar{display:grid;grid-template-columns:repeat(auto-fill,minmax(172px,1fr));gap:9px;margin:14px 0 22px}
.bm-calendar .bm-day{display:flex;flex-direction:column;align-items:flex-start;gap:7px;text-align:left;white-space:normal;min-height:95px;border:1px solid var(--bm-border);background:#f6faff;color:#284b68}
.bm-calendar .bm-day span{font-size:13px}
.bm-calendar .bm-day small{font-size:11px;line-height:1.6}
.bm-calendar .bm-has-gaps{background:#fff9ed;border-left:4px solid #d99b31}
.bm-calendar .bm-ready{background:#effaf6;border-left:4px solid #2c9277}
.bm-toolbar{margin:14px 0;padding:12px;background:#f5f9fd;border:1px solid var(--bm-border);border-radius:8px}
.bm-toolbar details{margin-top:10px}
.bm-toolbar summary{color:#41617d;cursor:pointer}
.bm-workspace td{overflow:hidden;overflow-wrap:anywhere;white-space:normal;vertical-align:top}
.bm-workspace td small{display:block;line-height:1.6;margin-top:5px}
.bm-row-actions{display:flex;flex-wrap:wrap;gap:7px}
@media(max-width:600px){.bm-filters{grid-template-columns:1fr}.bm-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.bm-calendar{grid-template-columns:repeat(2,minmax(0,1fr))}.bm-calendar .bm-day{padding:9px}.bm-heading{align-items:flex-start}.bm-workspace .st-actions{gap:7px}}
.bq-workspace{min-width:0;--bq-border:#d4e3f0}
.bq-section{margin:0 0 24px;padding:14px;border:1px solid var(--bq-border);border-radius:9px;min-width:0;background:#fff}
.bq-section h2{font-size:18px;margin:0 0 12px}
.bq-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:9px;margin:12px 0}
.bq-summary-card{min-width:0;min-height:64px;padding:13px;border:1px solid var(--bq-border);border-radius:8px;background:#f4f9fe;color:#28516e;font-weight:650;text-align:left;white-space:normal;overflow-wrap:anywhere}
.bq-summary-card.bq-warning{background:#fff7e8;border-left:4px solid #c88515;color:#80530c}
.bq-summary-amount{display:flex;align-items:baseline;flex-wrap:wrap;gap:9px;margin:10px 0}
.bq-amount{color:#8b4c08;font-weight:650;font-variant-numeric:tabular-nums;white-space:normal;overflow-wrap:anywhere}
.bq-amount small{display:block;color:#9a680d;font-weight:400;font-size:11px;line-height:1.5;margin-top:3px}
.bq-incomplete{color:#946711}
.bq-job-status{padding:0 9px;background:#f3f8fd;border-radius:6px}
.bq-job-line{padding-top:10px;line-height:1.7}.bq-cache-status p,.bq-notes p{margin:8px 0}
.bq-explanation,.bq-column-options{border:1px solid var(--bq-border);border-radius:6px;padding:10px;margin:12px 0;background:#f8fbfe}
.bq-explanation summary,.bq-column-options summary{cursor:pointer;color:#315c80;font-weight:550}
.bq-scroll{max-width:100%;overflow:auto;margin:10px 0;border:1px solid var(--bq-border);border-radius:6px}
.bq-matrix-scroll{max-height:620px}
.bq-matrix{width:max-content;min-width:100%;border-collapse:collapse;font-size:13px}
.bq-matrix th,.bq-matrix td{padding:5px;border:1px solid #e1eaf3;vertical-align:middle}
.bq-matrix th{background:#f0f6fc;color:#345c7c;text-align:left;min-width:115px}
.bq-matrix thead th{position:sticky;top:0;z-index:1}.bq-matrix tr>th:first-child{position:sticky;left:0;z-index:1}
.bq-matrix-cell{display:block;width:100%;min-width:145px;padding:10px;border:1px solid transparent;border-radius:5px;font-size:12px;line-height:1.55;text-align:left;white-space:normal;cursor:pointer}
.bq-matrix-cell:hover{border-color:#4a8fc0}.bq-matrix-cell:focus-visible{outline:2px solid #1879b5;outline-offset:1px}
.bq-ready{background:#eaf7f1;color:#146851}.bq-warning{background:#fff4df;color:#855407}.bq-empty{background:#edf1f5;color:#647789}.bq-unchecked{color:#8794a3}
.bq-field{display:flex;flex-direction:column;gap:6px;min-width:170px;color:#506984;font-size:13px}.bq-field input,.bq-field select{min-height:40px;font:inherit;color:#203e58;max-width:100%}
.bq-count-actions{display:flex;flex-wrap:wrap;gap:5px;min-width:130px}.bq-count-actions button{padding:5px 7px;font-size:12px;line-height:1.55;white-space:normal;text-align:left;overflow-wrap:anywhere}
.bq-detail-table th{min-width:100px}.bq-detail-table td{white-space:normal;overflow-wrap:anywhere;vertical-align:top;max-width:350px;overflow:hidden}.bq-detail-table td p{margin:0}.bq-detail-table td small{display:block;line-height:1.6}
.bq-pager{margin-top:12px}
.bq-fields{margin:7px 0;padding:7px;border:1px solid var(--bq-border,#d4e3f0);border-radius:5px;background:#f8fbfe}.bq-fields summary{cursor:pointer;color:#41617d;font-size:12px}.bq-field-evidence{margin:4px 0;line-height:1.6;overflow-wrap:anywhere}.bq-field-evidence .bq-field-evidence{padding-left:12px}.bq-field-evidence strong{font-size:12px}
@media(max-width:600px){.bq-section{padding:10px}.bq-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.bq-summary-card{font-size:12px;padding:10px}.bq-field{min-width:0;width:100%}.bq-workspace .st-actions{gap:7px}.bq-section .button,.bq-section .button-secondary{white-space:normal}.bq-matrix-cell{min-width:125px}}

/* Rule directories fit their container by default; manual resizing remains available. */
.scope-trial .st-rule-directory .st-grid-table th,.scope-trial .st-rule-directory .st-grid-table td{padding:8px}
.scope-trial .st-rule-directory .st-grid-table th{padding-right:14px}
.scope-trial .st-rule-directory .st-cell-text{display:block;-webkit-line-clamp:unset;line-clamp:unset}
.scope-trial .st-rule-directory small{display:block;color:#64748b;font-size:11px;font-weight:400;margin-top:4px}
.scope-trial .st-rule-directory .st-actions{gap:4px}
.scope-trial .st-rule-directory .st-cell-controls button{padding:5px 6px;line-height:1.5}
.scope-trial .st-rule-period{font-variant-numeric:tabular-nums;line-height:1.65}
.scope-trial .st-rule-terms{display:grid;gap:4px}
.scope-trial .st-rule-term{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:flex-start;gap:2px 6px}
.scope-trial .st-rule-term-label{color:#64748b;font-size:11px}
.scope-trial .st-rule-param-nonzero{background:#e8f2ff;color:#1555a2;border-radius:4px;padding:0 5px;font-weight:750;font-variant-numeric:tabular-nums}
.scope-trial .st-rule-param-zero,.scope-trial .st-rule-param-empty{color:#718096;font-variant-numeric:tabular-nums}

.scope-trial .st-rule-param-warning{background:#fff1f2;color:#b42318;border:1px solid #f3b4b8;border-radius:4px;padding:0 5px;font-weight:750;font-variant-numeric:tabular-nums}
.scope-trial .st-rule-param-warning-note{color:#b42318;font-size:11px}

/* Smaller fractional digits retain the metric’s semantic colour and exact text. */
.st-decimal-value.st-decimal-value{display:inline;font-size:inherit;font-weight:inherit;color:inherit;line-height:inherit;white-space:nowrap;font-variant-numeric:tabular-nums}
.st-number-fraction.st-number-fraction{display:inline;font-size:.82em;opacity:.82;font-weight:inherit;color:inherit;line-height:inherit}
@media print{.st-number-fraction{opacity:1}}

/* Membership rule values use full-size digits in tables and detached dialogs. */
.st-member-rule-number{font-size:inherit;font-variant-numeric:tabular-nums}
.st-member-rule-number.is-nonzero{color:#1555a2;background:#e8f2ff;border-radius:4px;padding:0 4px;font-weight:750}
.st-member-rule-fees,.st-member-rule-trials{display:grid;gap:5px;overflow-wrap:anywhere}
.st-member-rule-counts{line-height:1.7}

.bm-summary .bm-checking{border-left:4px solid #4287af}.bm-status.bm-checking{background:#eaf4fc;color:#235a80}

.bm-diagnostic{border:1px solid #d6e3f0;border-left:4px solid #c98a18;border-radius:8px;padding:12px 14px;margin:12px 0;background:#fff;overflow-wrap:anywhere}.bm-diagnostic-heading{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.bm-diagnostic p{margin:8px 0;line-height:1.6}.bm-diagnostic-context{color:#637c9b;font-size:13px}.bm-diagnostic-reason{color:#874d00;font-weight:600}.bm-diagnostic details{margin-top:10px}.bm-day.bm-checking{background:#f0f7ff;border-left:4px solid #488ec1}
.st-timing-fixed{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:12px;margin:0 0 18px;}
.st-timing-fixed>div{padding:12px 16px;border-left:3px solid #2d8a71;border-radius:6px;background:#f0f8f5;color:#244e45;}
.st-timing-fixed p{margin:6px 0 0;line-height:1.65;}
.st-dialog.st-timing-confirm{height:auto;max-height:90vh;width:min(960px,96vw);}
