#histograma #histV1[hidden],#histograma #histV2[hidden],#histV2 [hidden]{display:none!important}
#histograma .hist-version-selector{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 14px;background:#fff;border:1px solid #d4deed;border-radius:8px;margin-bottom:12px}
.hist-version-selector>span{font-weight:700;margin-right:8px}#histograma .hist-version-selector button{background:#fff;color:#34363a;border:1px solid #c7cdd4}#histograma .hist-version-selector button[aria-pressed=true]{background:#34363a;color:#fff;border-color:#34363a}
#histV2{--hv2-muted:#657a9a;--hv2-border:#d4deed;font:13px/1.4 Arial,sans-serif;color:#172132;min-width:0}#histV2 *{box-sizing:border-box;min-width:0}#histV2 .hv2-panel{padding:18px;background:#fff;border:1px solid var(--hv2-border);border-radius:10px}#histV2 h2{font-size:24px;margin:5px 0 9px;color:#151d2c;letter-spacing:0}#histV2 p{margin:6px 0}#histV2 small{display:block;font-size:11px;color:var(--hv2-muted);line-height:1.45}#histV2 button,#histV2 select,#histV2 input{font:inherit;color:inherit;box-shadow:none}#histV2 button{cursor:pointer;padding:7px 10px;border:1px solid #c7d5e9;border-radius:7px;background:#f7f9fc;white-space:normal}#histV2 button:hover{background:#edf2f9}#histV2 button:disabled{opacity:.55;cursor:default}#histV2 select,#histV2 input{background:#fff;border:1px solid #d8e1ef;border-radius:5px;padding:7px;width:100%;max-width:100%}#histV2 label{display:flex;align-items:center;gap:6px;color:#425470}#histV2 summary{cursor:pointer;color:#546b8c}#histV2 :focus-visible{outline:2px solid #2563eb;outline-offset:2px}#histV2 .hv2-negative{color:#c7191e!important}
#histV2 .hv2-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}#histV2 .hv2-head>button{font-weight:700;margin-top:4px}#histV2 .hv2-eyebrow{color:#a51616;font-size:12px;font-weight:700}#histV2 #hv2Calendar{color:var(--hv2-muted);font-size:14px;margin-bottom:14px}
#histV2 .hv2-summaries{display:grid;grid-template-columns:1fr 1.15fr;gap:12px;margin-bottom:12px}#histV2 .hv2-summary{border:1px solid var(--hv2-border);border-radius:10px;overflow:hidden}#histV2 .hv2-summary-head{background:#f0f4f9;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:7px 11px;font-size:11px}#histV2 .hv2-base-row{display:grid;grid-template-columns:1.05fr 1fr;align-items:center;border-bottom:1px solid #dce5f1;gap:8px;min-height:51px;padding:5px 10px}#histV2 .hv2-base-row>button{border:0;background:transparent;padding:0;display:flex;align-items:center;gap:7px;text-align:left;border-radius:2px}#histV2 .hv2-base-row>button>span{font-size:10px}#histV2 .hv2-base-row b,#histV2 .hv2-fin-row b{font-size:20px;white-space:nowrap}#histV2 .hv2-base-row>div{font-size:11px;color:var(--hv2-muted)}#histV2 .hv2-composition{padding:7px 11px;font-size:11px}#histV2 .hv2-composition p{display:flex;justify-content:space-between;gap:8px}#histV2 .hv2-fin-head,#histV2 .hv2-fin-row{display:grid;grid-template-columns:1.4fr .9fr .9fr;gap:8px;align-items:center}#histV2 .hv2-fin-row{padding:7px 11px;min-height:51px;border-bottom:1px solid #dce5f1;font-size:11px;color:var(--hv2-muted)}#histV2 .hv2-fin-row>span:first-child{color:#27364b}#histV2 .hv2-fin-row b{color:#182234;display:inline-block;margin-left:4px}#histV2 .hv2-wide{grid-column:2/-1}#histV2 .hv2-result{display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:8px 11px;font-size:11px;color:var(--hv2-muted)}#histV2 .hv2-result b{font-size:15px;color:#354760}
#histV2 .hv2-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:10px 0;font-size:11px}#histV2 .hv2-toolbar>label,#histV2 .hv2-series-menu>summary{padding:5px 8px;border:1px solid #c7d5e9;border-radius:7px;background:#f7f9fc;min-height:33px}#histV2 .hv2-toolbar select{width:auto;font-weight:700;border:0;background:transparent;padding:1px 0}#histV2 .hv2-toolbar>button{font-size:11px;min-height:33px}#histV2 .hv2-series-menu{position:relative}#histV2 .hv2-series-menu>div{position:absolute;z-index:5;top:100%;left:0;min-width:220px;padding:10px;background:#fff;box-shadow:0 8px 24px #27364b26;border:1px solid var(--hv2-border);border-radius:7px}#histV2 .hv2-series-menu label{padding:6px;white-space:nowrap}#histV2 .hv2-series-menu input{width:14px}#histV2 #hv2Labels[aria-pressed=true]{border-color:#2563eb;background:#eff6ff}#histV2 .hv2-filters{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:11px;color:var(--hv2-muted);margin-bottom:10px}#histV2 .hv2-filters input{width:175px}#histV2 .hv2-filters select{width:160px}#histV2 .hv2-filters input,#histV2 .hv2-filters select{padding:5px 7px}#histV2 #hv2Count{margin-left:auto}
#histV2 .hv2-note{background:#f6f8fb;border-left:3px solid #93a8c7;color:var(--hv2-muted);padding:8px 10px;font-size:11px;margin:8px 0}#histV2 .hv2-sim-summary{display:grid;grid-template-columns:1.2fr 1fr 1fr 1fr 1.1fr;gap:10px;padding:12px;border:1px solid var(--hv2-border);border-radius:8px;margin-bottom:10px}#histV2 .hv2-sim-summary b{display:block;font-size:12px}#histV2 .hv2-chart{position:relative;padding:8px 0 12px}#histV2 .hv2-chart svg{display:block;width:100%;height:auto;min-height:220px}#histV2 .hv2-chart text{font-family:Arial,sans-serif;font-size:11px;fill:#657a9a}#histV2 .hv2-chart .hv2-point-label{font-size:9px;fill:#263a55}#histV2 .hv2-hit:hover,#histV2 .hv2-hit:focus{fill:#335e8a09;outline:none}#histV2 .hv2-legend{display:flex;justify-content:center;gap:18px;flex-wrap:wrap;color:#546b8c;font-size:11px;margin-top:3px}#histV2 .hv2-legend span{display:flex;align-items:center;gap:6px}#histV2 .hv2-legend i,#histV2 .hv2-months i{display:inline-block;width:16px;height:3px;vertical-align:middle;margin-right:4px}#histV2 .hv2-tooltip{position:absolute;right:12px;bottom:45px;width:440px;max-width:calc(100% - 24px);z-index:3;background:#fff;border:1px solid #c8d5e7;border-radius:10px;padding:12px;box-shadow:0 8px 25px #344d7026;pointer-events:none}
#histV2 .hv2-simulation{padding:12px;border:1px solid var(--hv2-border);border-radius:10px;margin:12px 0 20px;color:#364a67}#histV2 .hv2-simulation>strong{font-size:14px}#histV2 .hv2-sim-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:6px 0}#histV2 .hv2-sim-controls select{width:120px;font-weight:700}#histV2 .hv2-simulation p{font-size:12px;color:var(--hv2-muted)}#histV2 #hv2Composition>summary{font-size:12px;margin-top:5px}#histV2 #hv2SimForm{display:grid;grid-template-columns:2fr .75fr 1fr 1fr auto;gap:8px;align-items:end;margin:14px 0}#histV2 #hv2SimForm label{display:flex;flex-direction:column;align-items:stretch;font-size:11px}#histV2 .hv2-period-control{font-size:12px;margin:10px 0}#histV2 .hv2-period-control select{width:auto}#histV2 #hv2ApplyMatrix{margin-top:10px}
#histV2 table{width:100%;min-width:0!important;table-layout:fixed;border-collapse:collapse;font-size:12px;background:#fff}#histV2 th,#histV2 td{text-align:right;padding:8px 5px;border-bottom:1px solid #dde5ef;white-space:normal;overflow-wrap:anywhere;max-width:none}#histV2 th{background:#eef2f7;color:#59687d;font-weight:700}#histV2 th:first-child,#histV2 td:first-child{width:30%;text-align:left}#histV2 .hv2-table-caption{color:var(--hv2-muted);font-size:12px;margin:14px 0 8px}#histV2 .hv2-months{font-size:10px;margin-bottom:8px}#histV2 .hv2-months th,#histV2 .hv2-months td{padding:7px 2px;text-align:center;line-height:1.25}#histV2 .hv2-months th:first-child{width:118px;text-align:left;font-size:10px;padding-left:5px;font-weight:400}#histV2 .hv2-months th:last-child,#histV2 .hv2-months td:last-child{width:72px;font-weight:700}#histV2 .hv2-months tbody th{background:#edf2f8}#histV2 .hv2-months tbody tr{background:#f7f9fc}#histV2 .hv2-months .hv2-series-realizado{background:#fff}#histV2 .hv2-months .hv2-simulator-inputs{background:#fff}#histV2 .hv2-month-edit{width:100%;padding:7px 0;background:#fff;font-size:10px}#histV2 #hv2OpenComposition{padding:0;border:0;background:transparent;text-align:left;font-weight:700;font-size:11px}#histV2 .hv2-months .hv2-series-simulado{color:#08708b}#histV2 .hv2-months i{width:9px;margin-right:3px}#histV2 .hv2-overview>small{font-size:10px}#histV2 .hv2-matrix{border:1px solid var(--hv2-border);border-radius:7px;overflow:hidden}#histV2 .hv2-qty{padding:5px 3px;text-align:right}#histV2 .hv2-equipment-details,#histV2 .hv2-source{margin-top:16px;font-size:12px;border-top:1px solid #e2e8f0;padding-top:10px}#histV2 .hv2-cost-details{margin-top:14px}#histV2 .hv2-source li{margin:4px 0}#histV2 .hv2-empty{border:1px dashed var(--hv2-border);border-radius:7px;padding:14px;margin-top:14px;color:var(--hv2-muted)}
@media(max-width:1500px){#histV2 .hv2-base-row b,#histV2 .hv2-fin-row b{font-size:17px}#histV2 .hv2-base-row>button{flex-wrap:wrap;gap:2px 6px}#histV2 .hv2-fin-row b{display:block;margin-left:0}#histV2 .hv2-summary-head{font-size:10px}#histV2 .hv2-months{font-size:9px}#histV2 .hv2-months th:first-child{width:112px}#histV2 .hv2-months th:last-child,#histV2 .hv2-months td:last-child{width:62px}}
@media(max-width:1100px){#histV2 .hv2-summaries{grid-template-columns:1fr}#histV2 .hv2-summary-head{font-size:11px}#histV2 .hv2-base-row>button{flex-wrap:nowrap}#histV2 .hv2-base-row,#histV2 .hv2-fin-row{min-height:43px}#histV2 .hv2-fin-row b{display:inline-block}#histV2 .hv2-sim-summary{grid-template-columns:repeat(3,1fr)}#histV2 #hv2SimForm{grid-template-columns:2fr 1fr 1fr}#histV2 .hv2-months{font-size:11px}#histV2 .hv2-months th:first-child{width:25%}}
@media(max-width:600px){#histV2 .hv2-panel{padding:10px}#histV2 h2{font-size:20px}#histV2 .hv2-head{flex-wrap:wrap}#histV2 .hv2-head>button{margin:0 0 8px}#histV2 #hv2Calendar{font-size:12px;margin-bottom:6px}#histV2 .hv2-summary-head{font-size:10px}#histV2 .hv2-base-row b,#histV2 .hv2-fin-row b{font-size:16px}#histV2 .hv2-fin-row{grid-template-columns:1.1fr 1fr 1fr;gap:3px}#histV2 .hv2-fin-row>span{font-size:10px}#histV2 .hv2-base-row{grid-template-columns:1.15fr 1fr;padding:6px;gap:5px}#histV2 .hv2-base-row>button{flex-wrap:wrap}#histV2 .hv2-toolbar{gap:5px}#histV2 .hv2-toolbar>label,#histV2 .hv2-toolbar>.hv2-series-menu{max-width:100%}#histV2 .hv2-filters label{width:100%}#histV2 .hv2-filters input,#histV2 .hv2-filters select{flex:1;width:auto}#histV2 #hv2Count{margin-left:0}#histV2 .hv2-chart svg{min-height:170px}#histV2 .hv2-chart text{font-size:14px}#histV2 .hv2-chart .hv2-point-label{font-size:12px}#histV2 .hv2-legend{gap:8px}#histV2 .hv2-sim-controls label{width:100%}#histV2 .hv2-sim-summary{grid-template-columns:repeat(2,1fr)}#histV2 .hv2-simulation{padding:9px}#histV2 #hv2SimForm{grid-template-columns:1fr 1fr}#histV2 #hv2SimForm>label:first-child{grid-column:1/-1}#histV2 .hv2-months{font-size:9px}#histV2 .hv2-months th:first-child{width:25%;font-size:9px}#histV2 .hv2-months th:last-child,#histV2 .hv2-months td:last-child{width:45px}#histV2 .hv2-month-edit{font-size:9px;padding:6px 0}#histV2 #hv2OpenComposition{font-size:9px}#histV2 .hv2-matrix table{font-size:10px}#histV2 .hv2-matrix small{font-size:9px}#histV2 td,#histV2 th{padding:6px 2px}#histV2 .hv2-tooltip{font-size:10px}#histV2 .hv2-tooltip table{font-size:10px}}

#histV2 .hv2-head{background:#fff;color:#172132;padding:0;position:static;border:0;min-height:0}#histV2 th{text-transform:none;letter-spacing:normal}

#histV2 label,#histV2 .hv2-toolbar>*,#histV2 .hv2-filters>*,#histV2 .hv2-sim-controls>button{margin:0}


/* Rental detail stays inside the existing V2 responsive panel. */
#histV2 .hv2-rental-details details{border:1px solid #dce5f1;border-radius:8px;margin:10px 0;padding:12px;overflow-wrap:anywhere}
#histV2 .hv2-rental-details summary{cursor:pointer;font-weight:650}
#histV2 .hv2-rental-details table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px}
#histV2 .hv2-rental-details td,#histV2 .hv2-rental-details th{padding:8px 4px;border-bottom:1px solid #e4eaf2;overflow-wrap:anywhere}
#histV2 .hv2-rental-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:12px 0}
#histV2 .hv2-rental-meta span,#histV2 .hv2-rental-meta b{display:block}
#histV2 .hv2-rental-meta span{font-size:12px}
#histV2 #hv2RentalStatus{border-left:3px solid #d97706}
@media(max-width:700px){#histV2 .hv2-rental-meta{grid-template-columns:repeat(2,minmax(0,1fr))}#histV2 .hv2-rental-details table{font-size:10px}}


/* Compact analysis, shared categories and an independently visible audit trail. */
#histV2 .hv2-panel{padding:14px}#histV2 h2{font-size:21px;margin:3px 0 6px}#histV2 #hv2Calendar{font-size:12px;margin-bottom:8px}
#histV2 .hv2-base-row,#histV2 .hv2-fin-row{min-height:36px;padding:5px 9px}#histV2 .hv2-base-row b,#histV2 .hv2-fin-row b{font-size:15px}#histV2 .hv2-summary-head{padding:5px 9px}#histV2 .hv2-summaries{gap:8px;margin-bottom:8px}#histV2 .hv2-toolbar{gap:5px;margin:7px 0}#histV2 .hv2-toolbar>label,#histV2 .hv2-toolbar>button,#histV2 .hv2-series-menu>summary{min-height:29px;padding:4px 7px}#histV2 .hv2-note{padding:5px 8px;margin:5px 0}
#histV2 .hv2-category{position:relative}#histV2 .hv2-category>summary{border:1px solid #c7d5e9;border-radius:5px;padding:5px 8px;background:#f7f9fc}#histV2 .hv2-category>div{position:absolute;top:100%;left:0;z-index:8;width:280px;max-width:calc(100vw - 62px);padding:10px;background:#fff;border:1px solid #c7d5e9;border-radius:6px;box-shadow:0 8px 24px #27364b26}#histV2 #hv2CategorySearch{width:100%;margin-bottom:5px}#histV2 #hv2CategoryOptions{max-height:260px;overflow-y:auto}#histV2 #hv2CategoryOptions label{padding:6px 0;gap:7px}#histV2 #hv2CategoryOptions input{width:15px;flex:none}
#histV2 .hv2-comparison,#histV2 .hv2-contract-section,#histV2 .hv2-inventory{border:1px solid var(--hv2-border);border-radius:8px;padding:10px;margin:12px 0}#histV2 .hv2-comparison-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:8px}#histV2 .hv2-comparison-head strong,#histV2 .hv2-comparison-head h3{margin:0 auto 0 0;font-size:13px}#histV2 .hv2-comparison-head label{font-size:11px}#histV2 .hv2-comparison-head select{padding:4px;width:auto}#histV2 .hv2-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}#histV2 .hv2-kpi{padding:7px;background:#f4f7fb;border-radius:5px}#histV2 .hv2-kpi b{font-size:13px;display:block;margin-top:3px}#histV2 .hv2-projection{display:grid;grid-template-columns:1fr repeat(3,minmax(0,1fr));gap:7px;margin:8px 0;align-items:center}#histV2 .hv2-projection>strong{font-size:12px}#histV2 .hv2-formula{margin-top:5px;font-size:11px}#histV2 .hv2-series-saldo td,#histV2 .hv2-series-folga td{font-weight:700}#histV2 .hv2-contract-section p,#histV2 .hv2-inventory p{font-size:11px;color:#566b87}#histV2 .hv2-contract-table{font-size:11px}#histV2 .hv2-contract-table>tbody>tr>td:first-child,#histV2 .hv2-contract-table>thead>tr>th:first-child{width:34%}#histV2 [data-contract]{display:block;border:0;background:transparent;padding:2px 0;font-weight:700;color:#1d4f8a}#histV2 .hv2-contract-table>tbody>tr>td>span{display:block;font-size:11px}#histV2 [data-contract-detail]>td{text-align:left;padding:10px;background:#f8fafc}#histV2 .hv2-pagination{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:8px 0;font-size:11px}#histV2 .hv2-inventory h3{font-size:13px;margin:0 0 7px}#histV2 .hv2-inventory details{margin:10px 0}#histV2 .hv2-inventory a{color:#225aa6}#histV2 .hv2-inventory table{font-size:11px}
@media(max-width:1100px){#histV2 .hv2-summaries{grid-template-columns:1fr 1fr}#histV2 .hv2-base-row{grid-template-columns:1fr}#histV2 .hv2-base-row>div small{display:none}#histV2 .hv2-base-row>div{font-size:10px}#histV2 .hv2-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){#histV2 .hv2-summaries{grid-template-columns:1fr}#histV2 .hv2-base-row{grid-template-columns:1fr 1fr}#histV2 .hv2-kpis,#histV2 .hv2-projection{grid-template-columns:repeat(2,minmax(0,1fr))}#histV2 .hv2-projection>strong{grid-column:1/-1}#histV2 .hv2-kpi b{font-size:12px}#histV2 .hv2-contract-table{font-size:9px}#histV2 .hv2-contract-table>tbody>tr>td:first-child,#histV2 .hv2-contract-table>thead>tr>th:first-child{width:30%}#histV2 .hv2-contract-table>tbody>tr>td>span{font-size:9px}#histV2 .hv2-contract-table small{font-size:9px}#histV2 .hv2-comparison-head label{max-width:100%}#histV2 .hv2-comparison-head select{max-width:180px}#histV2 .hv2-inventory table{font-size:10px}}

#histV2 .hv2-owned-section{border:1px solid #bfcbd7;border-left:3px solid #253746;border-radius:8px;padding:10px;margin:12px 0}#histV2 .hv2-owned-section p{font-size:11px;color:#566b87}#histV2 .hv2-owned-section h4{font-size:12px;margin:14px 0 7px}#histV2 .hv2-owned-table{font-size:11px}#histV2 [data-owned-group]{text-align:left;border:0;background:transparent;padding:2px 0;font-weight:700}#histV2 [data-owned-detail]>td{text-align:left;padding:10px;background:#f8fafc}#histV2 [data-owned-detail] table{font-size:11px}#histV2 .hv2-owned-section details{margin-top:8px;font-size:11px}
@media(max-width:600px){#histV2 .hv2-owned-table,#histV2 [data-owned-detail] table{font-size:9px}#histV2 [data-owned-detail]>td{padding:5px}#histV2 .hv2-owned-section small{font-size:9px}}

@media(max-width:600px){
 #histV2 .hv2-owned-section table,#histV2 .hv2-owned-section tbody{display:block}
 #histV2 .hv2-owned-section thead{display:none}
 #histV2 .hv2-owned-section tbody>tr{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid #d4deed;padding:7px 0;gap:7px}
 #histV2 .hv2-owned-section td{display:block;border:0;padding:2px;text-align:left!important;width:auto!important;font-size:11px;overflow-wrap:normal}
 #histV2 .hv2-owned-section td:first-child,#histV2 .hv2-owned-section td[colspan]{grid-column:1/-1}
 #histV2 .hv2-owned-section td[data-label]:before{content:attr(data-label);display:block;font-size:10px;font-weight:700;color:#657a9a;margin-bottom:3px}
 #histV2 .hv2-owned-section td:first-child:before{display:none}
 #histV2 [data-owned-detail]{display:block!important}
 #histV2 [data-owned-detail][hidden]{display:none!important}
 #histV2 .hv2-owned-section small{font-size:10px;overflow-wrap:anywhere}
}
/* Keep the added individual and combined comparisons in two compact desktop rows. */
@media(min-width:1200px){#histV2 .hv2-comparison>.hv2-kpis{grid-template-columns:repeat(7,minmax(0,1fr))}#histV2 .hv2-comparison>.hv2-quantity-comparison{grid-template-columns:repeat(6,minmax(0,1fr))}}
#histV2 .hv2-quantity-comparison{margin-top:7px}#histV2 .hv2-series-realizado_total{background:#fdf2f8;font-weight:700}#histV2 .hv2-series-variacao_quantidade{font-weight:700}


/* Compact cost summary and header version navigation. */
.hist-title-row{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.hist-title-row h1{margin:0}.hist-version-header{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid #c7d5e9;border-radius:8px;background:#fff}.hist-version-header[hidden]{display:none!important}.hist-version-header>span{display:none}.hist-version-header button{padding:5px 12px;border:0;border-radius:5px;background:transparent;color:#425470;font-size:12px;cursor:pointer}.hist-version-header button[aria-pressed=true]{background:#253746;color:#fff}.hist-version-header button:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
#histV2 .hv2-summaries{display:block}#histV2 .hv2-cost-summary{border:1px solid var(--hv2-border);border-radius:9px;overflow:hidden}#histV2 .hv2-cost-title{display:flex;justify-content:space-between;gap:10px;padding:9px 11px;background:#f0f4f9;font-size:12px}#histV2 .hv2-cost-summary th:first-child{width:37%}#histV2 .hv2-cost-summary tbody th{background:#fff}#histV2 .hv2-cost-summary td,#histV2 .hv2-cost-summary th{padding:8px 11px}#histV2 .hv2-cost-summary td b{font-size:13px;white-space:nowrap}#histV2 .hv2-cost-summary [data-hv2-scenario]{border:0;padding:0;background:transparent;font-weight:700}#histV2 .hv2-cost-summary [data-hv2-scenario][aria-pressed=true]{color:#1d4ed8}#histV2 .hv2-missing{font-size:12px;color:#657a9a}#histV2 .hv2-month-comparison{margin-bottom:8px}#histV2 .hv2-month-comparison th:first-child{width:34%}#histV2 .hv2-comparison>.hv2-month-balances{grid-template-columns:repeat(2,minmax(0,1fr))}#histV2 .hv2-month-breakdown,#histV2 .hv2-projection-details{padding:7px 0;font-size:11px}#histV2 .hv2-month-breakdown .hv2-kpis{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:7px}
@media(max-width:600px){.hist-title-row{gap:8px}.hist-version-header button{padding:6px 10px}#histV2 .hv2-cost-summary td,#histV2 .hv2-cost-summary th{padding:7px 4px;font-size:10px}#histV2 .hv2-cost-summary td b{font-size:10px;white-space:normal}#histV2 .hv2-cost-summary small{font-size:9px}#histV2 .hv2-cost-summary th:first-child{width:34%}#histV2 .hv2-cost-title{font-size:11px}}

@media(max-width:600px){#histV2 .hv2-cost-summary thead{display:none}#histV2 .hv2-cost-summary tbody,#histV2 .hv2-cost-summary tbody tr{display:block}#histV2 .hv2-cost-summary tbody tr{padding:8px 10px;border-bottom:1px solid var(--hv2-border)}#histV2 .hv2-cost-summary tbody th:first-child{display:block;width:auto;padding:0 0 5px;border:0;font-size:12px}#histV2 .hv2-cost-summary td{display:grid;grid-template-columns:1fr auto;gap:2px 8px;width:auto;padding:4px 0;border:0;font-size:11px}#histV2 .hv2-cost-summary td:before{content:attr(data-label);text-align:left;color:#657a9a}#histV2 .hv2-cost-summary td b{font-size:12px;white-space:nowrap}#histV2 .hv2-cost-summary td small{grid-column:2}#histV2 .hv2-cost-summary small{font-size:10px}}


.hv2-scope-menu>div{max-width:min(380px,calc(100vw - 48px));box-sizing:border-box}.hv2-scope-menu small{display:block;white-space:normal;line-height:1.4;max-width:340px}.hv2-scope-menu button{margin:0 4px 6px 0}.hv2-scope-menu summary{max-width:320px;white-space:normal}
#histV2 .hv2-scope-menu label{white-space:normal;display:flex;align-items:center;gap:6px}
@media(max-width:600px){#histV2 .hv2-scope-menu{width:100%}#histV2 .hv2-scope-menu>div{width:100%;min-width:0}#histV2 .hv2-scope-menu summary{max-width:none}}


.hv2-balance-answer{margin:12px 0;padding:14px;border:1px solid #cbd5e1;border-radius:8px;background:#f8fafc}
.hv2-balance-answer>strong{display:block;margin-bottom:10px}
.hv2-balance-answer p{font-size:12px;line-height:1.5;margin:10px 0 0}
.hv2-balance-answer .hv2-kpi{min-width:0;overflow-wrap:anywhere}
.hv2-cost-selection{display:flex;flex-wrap:wrap;gap:10px 18px;margin:12px 0;padding:10px;border:1px solid #cbd5e1;border-radius:6px}
.hv2-cost-selection legend{font-size:12px;font-weight:600;padding:0 4px}
.hv2-cost-selection label{display:flex;align-items:center;gap:5px;font-size:12px}
.hv2-budget-scope{background:#f1f5f9}
.hv2-budget-scope th{padding-left:18px!important}
.hv2-cost-explanation{font-size:12px;line-height:1.5;margin:12px 0}
.hv2-cost-summary table{table-layout:fixed}
.hv2-cost-summary th,.hv2-cost-summary td{overflow-wrap:anywhere}
@media(max-width:1200px){.hv2-cost-summary table{table-layout:auto}}
#histV2 .hv2-cost-summary th:first-child{width:22%}
#histV2 .hv2-cost-summary td b{font-size:12px;white-space:normal}
#histV2 .hv2-budget-scope th{background:#f1f5f9}
@media(max-width:1000px){#histV2 .hv2-cost-summary thead{display:none}#histV2 .hv2-cost-summary tbody,#histV2 .hv2-cost-summary tbody tr{display:block}#histV2 .hv2-cost-summary tbody tr{padding:8px 10px;border-bottom:1px solid var(--hv2-border)}#histV2 .hv2-cost-summary tbody th:first-child{display:block;width:auto;padding:0 0 5px;border:0;font-size:12px}#histV2 .hv2-cost-summary td{display:grid;grid-template-columns:1fr auto;gap:2px 8px;width:auto;padding:4px 0;border:0;font-size:11px}#histV2 .hv2-cost-summary td:before{content:attr(data-label);text-align:left;color:#657a9a}#histV2 .hv2-cost-summary td b{font-size:12px;white-space:nowrap}#histV2 .hv2-cost-summary td small{grid-column:2}}

@media(max-width:699px){
 #histV2 .hv2-fuel-table thead{display:none}
 #histV2 .hv2-fuel-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:1px solid #dce5f1}
 #histV2 .hv2-fuel-table td:first-child{grid-column:1/-1}
 #histV2 .hv2-fuel-table td:nth-child(2)::before{content:'Quantidade: ';display:block}
 #histV2 .hv2-fuel-table td:nth-child(3)::before{content:'Preço R$/L: ';display:block}
 #histV2 .hv2-fuel-table td:nth-child(4)::before{content:'Litros: ';display:block}
 #histV2 .hv2-fuel-table td:nth-child(5)::before{content:'Valor: ';display:block}
 #histV2 .hv2-fuel-table td{min-width:0;overflow-wrap:anywhere}
}

@media(max-width:699px){
 #histV2 .hv2-fuel-table td{display:block;width:auto!important;max-width:none}
 #histV2 .hv2-fuel-table td:first-child{width:auto!important}
}

/* Executive summary: five values first; detailed matrix opens on demand. */
#histV2 .hv2-compact-summary{background:#fff;border-color:#dce4ed;border-radius:8px}
#histV2 .hv2-summary-top{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;padding:8px 12px;background:#f7f9fc;flex-wrap:wrap}
#histV2 .hv2-summary-heading{display:flex;align-items:center;gap:9px;font-size:12px;min-width:0}
#histV2 .hv2-summary-heading>span{font-size:10px;color:#64748b;max-width:300px;overflow-wrap:anywhere}
#histV2 .hv2-compact-summary .hv2-cost-selection{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;border:0;padding:0;margin:0;min-width:0}
#histV2 .hv2-compact-summary .hv2-cost-selection legend{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#histV2 .hv2-compact-summary .hv2-cost-selection label{display:flex;align-items:center;gap:5px;margin:0;padding:0;font-size:11px;line-height:18px;font-weight:500;white-space:nowrap}
#histV2 .hv2-compact-summary .hv2-cost-selection input{width:13px;height:13px;min-height:0;margin:0;accent-color:#bb2026}
#histV2 .hv2-summary-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:9px 0}
#histV2 .hv2-summary-metric{padding:2px 12px;min-width:0;border-left:1px solid #e6ebf1}
#histV2 .hv2-summary-metric:first-child{border-left:0}
#histV2 .hv2-summary-label{font-size:11px;font-weight:600;line-height:18px;color:#52647b}
#histV2 .hv2-summary-label [data-hv2-scenario]{font:inherit;color:inherit;text-align:left;line-height:18px}
#histV2 .hv2-summary-label [data-hv2-scenario][aria-pressed=true]{color:#bb2026}
#histV2 .hv2-summary-value{line-height:24px;min-height:24px;white-space:normal}
#histV2 .hv2-summary-value b{white-space:nowrap;font-size:16px;font-weight:700;letter-spacing:-.3px}
#histV2 .hv2-summary-value .hv2-missing{font-size:13px;color:#7b8999}
#histV2 .hv2-summary-metric>small{display:block;font-size:10px;line-height:15px;color:#7b8999}
#histV2 .hv2-summary-details{border-top:1px solid #e6ebf1;margin:0}
#histV2 .hv2-summary-details>summary{padding:6px 12px;color:#52647b;font-size:11px;line-height:18px;cursor:pointer}
#histV2 .hv2-summary-details>summary>span{float:right;font-size:10px;color:#7b8999;margin-left:12px}
#histV2 .hv2-summary-details[open]>summary{background:#f7f9fc}
#histV2 .hv2-summary-details .hv2-cost-explanation{padding:7px 12px;margin:0;font-size:10px;line-height:1.5}
#histV2 .hv2-summary-details .hv2-composition{padding:7px 12px;margin:0}
@media(max-width:1250px){
 #histV2 .hv2-summary-value b{font-size:13px;letter-spacing:-.25px}
 #histV2 .hv2-summary-metric{padding:2px 8px}
}
@media(max-width:900px){
 #histV2 .hv2-summary-strip{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 0}
 #histV2 .hv2-summary-metric:nth-child(4){border-left:0}
}
@media(max-width:520px){
 #histV2 .hv2-summary-strip{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px 0;gap:9px 0}
 #histV2 .hv2-summary-top{padding:8px;gap:7px}
 #histV2 .hv2-summary-metric{padding:0 8px}
 #histV2 .hv2-summary-metric:nth-child(odd){border-left:0}
 #histV2 .hv2-summary-metric:nth-child(even){border-left:1px solid #e6ebf1}
 #histV2 .hv2-summary-metric>small{font-size:9px}
 #histV2 .hv2-summary-details>summary>span{float:none;display:block;margin:0 0 0 12px}
 #histV2 .hv2-summary-value b{font-size:14px}
}

@media(max-width:520px){
 #histV2 .hv2-summary-metric>small{display:none}
 #histV2 .hv2-summary-strip{gap:7px 0}
}

/* Chart-first reading: metrics and explanations open only on request. */
#histV2 .hv2-lean-details{margin:4px 0;border:0;border-bottom:1px solid #e6ebf1}
#histV2 .hv2-lean-details>summary{padding:5px 2px;font-size:11px;line-height:18px;color:#64748b;cursor:pointer}
#histV2 .hv2-lean-details[open]>summary{color:#253746}
#histV2 .hv2-lean-details .hv2-comparison{margin-top:5px}
#histV2 .hv2-chart .hv2-legend{gap:7px 15px;margin-top:3px;font-size:11px}
#histV2 .hv2-legend .hv2-unavailable{opacity:.5}
#histV2 .hv2-point-details{position:static;width:100%;max-width:none;box-shadow:none;background:transparent}
#histV2 #hv2PointValues{max-width:560px;padding:4px 0 8px}
#histV2 #hv2PointValues th,#histV2 #hv2PointValues td{padding:5px 8px;font-size:12px}
#histV2 #hv2PointValues th:first-child,#histV2 #hv2PointValues td:first-child{text-align:left;width:auto}
#histV2 #hv2PointValues small{display:block;padding:5px 8px;font-size:10px;color:#64748b}
#histV2 .hv2-series-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:7px}
@media(max-width:600px){
 #histV2 .hv2-chart .hv2-legend{gap:5px 10px;font-size:10px}
 #histV2 #hv2PointValues th,#histV2 #hv2PointValues td{padding:5px 3px;font-size:11px}
}

/* One desktop header row; stable controls survive summary updates. */
#histV2 .hv2-compact-summary{overflow:visible}
#histV2 #hv2UnifiedRow{flex-wrap:nowrap;gap:8px;padding:7px 10px;border-radius:8px 8px 0 0}
#histV2 .hv2-summary-heading{flex:none}
#histV2 .hv2-compact-summary .hv2-cost-selection{flex:none;gap:6px 9px}
#histV2 .hv2-control-dock{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-width:0;flex:1}
#histV2 .hv2-control-dock>label{display:flex;align-items:center;gap:3px;min-width:0;margin:0;font-size:11px}
#histV2 .hv2-control-dock select,#histV2 .hv2-control-dock input{font-size:11px;padding:5px 6px;min-height:27px;border:1px solid #c7d5e9;border-radius:5px;background:#fff;box-sizing:border-box}
#histV2 .hv2-control-dock #hv2Metric{width:102px;max-width:102px}
#histV2 .hv2-control-search{flex:1;max-width:150px}
#histV2 .hv2-control-dock #hv2Search{width:100%;min-width:90px}
#histV2 .hv2-control-dock #hv2ScopeLabel{font-size:11px;padding:5px 6px;white-space:nowrap;max-width:110px;overflow:hidden;text-overflow:ellipsis;line-height:16px}
#histV2 .hv2-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#histV2 .hv2-more{position:relative;flex:none}
#histV2 .hv2-more>summary{padding:5px 6px;font-size:11px;line-height:16px;border:1px solid #c7d5e9;border-radius:5px;cursor:pointer}
#histV2 .hv2-more-panel{position:absolute;right:0;top:calc(100% + 5px);z-index:30;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px;width:300px;max-width:calc(100vw - 48px);max-height:65vh;overflow-y:auto;box-sizing:border-box;background:#fff;border:1px solid #c7d5e9;border-radius:7px;box-shadow:0 6px 20px #25374622}
#histV2 .hv2-more:not([open])>.hv2-more-panel{display:none}
#histV2 .hv2-more-panel>label{display:flex;align-items:center;gap:7px;font-size:11px;width:100%;margin:0}
#histV2 .hv2-more-panel>details{width:100%}
#histV2 .hv2-more-panel>.hv2-series-menu>div,#histV2 .hv2-more-panel>.hv2-category>div{position:static;width:100%;max-width:100%;box-shadow:none;margin-top:5px}
#histV2 .hv2-more-panel>button{font-size:11px;padding:5px 7px}
#histV2 .hv2-more-panel #hv2Count{font-size:10px;color:#64748b;width:100%}
#histV2 .hv2-month-summary{display:list-item;padding:6px 2px!important;line-height:22px!important}
#histV2 .hv2-month-summary>span{display:inline-block;vertical-align:middle;margin-right:20px}
#histV2 .hv2-visible-balance,#histV2 .hv2-known-balance{font-size:11px}
#histV2 .hv2-visible-balance b,#histV2 .hv2-known-balance b{margin-left:6px;font-size:12px}
#histV2 .hv2-visible-balance b{color:#253746}
#histV2 .hv2-visible-balance .hv2-negative,#histV2 .hv2-known-balance .hv2-negative{color:#b91c1c}
@media(max-width:1250px){
 #histV2 .hv2-summary-heading strong{font-size:11px}
 #histV2 .hv2-compact-summary .hv2-cost-selection{gap:5px 7px}
 #histV2 .hv2-compact-summary .hv2-cost-selection label{font-size:10px}
 #histV2 .hv2-control-dock #hv2Search{font-size:10px}
}
@media(max-width:1100px){
 #histV2 #hv2UnifiedRow{flex-wrap:wrap}
 #histV2 .hv2-control-dock{flex:1 0 100%;justify-content:flex-start}
 #histV2 .hv2-control-search{max-width:none}
}
@media(max-width:520px){
 #histV2 .hv2-control-dock{flex-wrap:wrap}
 #histV2 .hv2-control-dock #hv2Scope{width:auto}
 #histV2 .hv2-control-search{min-width:110px;flex:1}
 #histV2 .hv2-month-summary>span{display:block;margin-right:0}
 #histV2 .hv2-month-summary>span:first-child{display:inline}
}

/* Direct scope flags; fuel has one shared control for summary and chart. */
#histV2 #hv2Scope.hv2-inline-scopes{display:flex;align-items:center;gap:6px;margin:0;padding:0 7px;border:0;border-left:1px solid #dce5f1;min-width:0;flex:none}
#histV2 .hv2-inline-scopes legend{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
#histV2 .hv2-inline-scopes label{display:flex;align-items:center;gap:3px;font-size:10px;white-space:nowrap;cursor:pointer;margin:0}
#histV2 .hv2-inline-scopes input{min-height:0!important;padding:0!important;width:12px;height:12px;accent-color:#bd2027;flex:none}
#histV2 .hv2-scope-short{display:none}
#histV2 .hv2-control-dock{gap:4px}
#histV2 .hv2-control-dock #hv2Metric{width:88px;max-width:88px;font-size:10px}
#histV2 .hv2-control-search{max-width:130px}
#histV2 #hv2UnifiedRow{gap:5px;padding-left:8px;padding-right:8px}
@media(max-width:1550px){#histV2 .hv2-scope-full{display:none}#histV2 .hv2-scope-short{display:inline}#histV2 .hv2-control-search{max-width:110px}#histV2 .hv2-compact-summary .hv2-cost-selection label{font-size:10px}}
@media(max-width:1100px){#histV2 .hv2-control-dock{flex-wrap:wrap}#histV2 .hv2-inline-scopes{border-left:0;padding-left:0}#histV2 .hv2-control-search{max-width:none}#histV2 .hv2-scope-full{display:inline}#histV2 .hv2-scope-short{display:none}}
@media(max-width:520px){#histV2 #hv2Scope.hv2-inline-scopes{flex-wrap:wrap;flex:1 0 100%;gap:7px}#histV2 .hv2-inline-scopes label{font-size:10px}#histV2 .hv2-scope-full{display:none}#histV2 .hv2-scope-short{display:inline}}

/* Budget total before its compact four-part composition. */
#histV2 .hv2-budget-card{padding:7px 11px 6px;border-bottom:1px solid #e6ebf1}
#histV2 .hv2-component-stage-total{display:flex;align-items:center;gap:8px;min-height:24px}
#histV2 .hv2-component-stage-total .hv2-summary-label{flex:none}
#histV2 .hv2-component-stage-total .hv2-summary-label button{font-size:12px;font-weight:600}
#histV2 .hv2-component-stage-total .hv2-summary-value{display:flex;align-items:center}
#histV2 .hv2-budget-parts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:3px}
#histV2 .hv2-budget-parts>div{min-width:0;border-left:1px solid #e6ebf1;padding:0 10px;font-size:11px;color:#7b8999}
#histV2 .hv2-budget-parts>div:first-child{padding-left:0;border-left:0}
#histV2 .hv2-budget-parts>div>span{display:block;font-size:10px;color:#64748b;line-height:15px}
#histV2 .hv2-budget-parts>div>span small{font-size:9px;font-weight:400}
#histV2 .hv2-budget-parts b{font-size:12px;white-space:nowrap;color:#253746;line-height:18px}
#histV2 .hv2-summary-strip{grid-template-columns:repeat(4,minmax(0,1fr));padding:5px 0;gap:0}
#histV2 .hv2-summary-strip .hv2-summary-metric{display:flex;align-items:center;gap:6px;padding:1px 10px;border-left:1px solid #e6ebf1}
#histV2 .hv2-summary-strip .hv2-summary-metric:first-child{border-left:0}
#histV2 .hv2-summary-strip .hv2-summary-label{flex:none;font-size:10px}
#histV2 .hv2-summary-strip .hv2-summary-value{line-height:22px;min-height:22px}
#histV2 .hv2-summary-strip .hv2-summary-value b{font-size:13px}
#histV2 .hv2-summary-strip .hv2-summary-metric>small{display:none}
@media(max-width:1100px){#histV2 .hv2-summary-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 0}#histV2 .hv2-summary-strip .hv2-summary-metric:nth-child(odd){border-left:0}#histV2 .hv2-budget-parts b{font-size:11px}}
@media(max-width:600px){#histV2 .hv2-budget-parts{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 0}#histV2 .hv2-budget-parts>div:nth-child(odd){padding-left:0;border-left:0}#histV2 .hv2-summary-strip .hv2-summary-metric{display:block;padding:1px 8px}#histV2 .hv2-summary-strip .hv2-summary-value b{font-size:12px}}

#histV2 .hv2-component-stage-total .hv2-summary-label [data-hv2-scenario],#histV2 .hv2-summary-strip .hv2-summary-label [data-hv2-scenario]{padding:0;margin:0;min-height:0;border:0;background:transparent;box-shadow:none;line-height:18px}
#histV2 .hv2-summary-strip .hv2-summary-metric{flex-wrap:wrap}

#histV2 .hv2-budget-parts>div>span small{display:inline}


#histV2 .hv2-budget-items{margin-top:5px;font-weight:400;font-size:11px}
#histV2 .hv2-budget-items>summary{cursor:pointer;color:#2563eb}
#histV2 .hv2-budget-items ul{padding-left:16px;margin:6px 0;line-height:1.5}
#histV2 .hv2-budget-items li{margin-bottom:4px;overflow-wrap:anywhere}

/* Components contain their own documentary group breakdowns. */
#histV2 .hv2-budget-parts>article{min-width:0;border-left:1px solid #e6ebf1;padding:3px 10px;color:#64748b}
#histV2 .hv2-budget-parts>article:first-child{padding-left:0;border-left:0}
#histV2 .hv2-component-title{display:block;font-size:11px;line-height:17px}
#histV2 .hv2-component-total{font-size:12px;line-height:22px;color:#253746}
#histV2 .hv2-component-parts{margin:6px 0 0;font-size:10px;line-height:16px}
#histV2 .hv2-component-parts>div{display:flex;justify-content:space-between;align-items:baseline;gap:5px;border-top:1px solid #eef2f6;padding:2px 0}
#histV2 .hv2-component-parts dt{min-width:0;overflow-wrap:anywhere}
#histV2 .hv2-component-parts dd{margin:0;text-align:right;flex:none}
#histV2 .hv2-component-parts dd b{font-size:10px;line-height:16px}
#histV2 [data-component-card]>small{display:block;font-size:10px;line-height:15px;color:#7b8999}
#histV2 .hv2-actual-card{padding:8px 12px;border-top:1px solid #e6ebf1}
#histV2 .hv2-component-note{display:block;margin-top:7px;font-size:10px;line-height:15px;color:#7b8999}
#histV2 .hv2-chart .hv2-legend{justify-content:flex-start;gap:5px 8px;padding:7px 0}
#histV2 .hv2-legend label{display:inline-flex;align-items:center;gap:4px;cursor:pointer;padding:4px 6px;border:1px solid #dce5ef;border-radius:4px;line-height:16px;color:#253746}
#histV2 .hv2-legend input{width:13px;height:13px;min-height:0;margin:0;accent-color:var(--series-color)}
#histV2 .hv2-legend label.hv2-series-off{background:#f8fafc;color:#7b8999}
#histV2 .hv2-legend label:focus-within{outline:2px solid #2563eb;outline-offset:2px}
#histV2 .hv2-legend .hv2-unavailable{opacity:.65}
@media(max-width:1100px){#histV2 .hv2-budget-parts{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 0}#histV2 .hv2-budget-parts>article:nth-child(odd){padding-left:0;border-left:0}}
@media(max-width:600px){#histV2 .hv2-budget-parts{grid-template-columns:1fr}#histV2 .hv2-budget-parts>article{padding:6px 0;border-left:0;border-top:1px solid #e6ebf1}#histV2 .hv2-component-parts{font-size:11px}#histV2 .hv2-component-parts dd b{font-size:11px}}

/* Totals stay compact; hover previews and native disclosure preserve the composition. */
#histV2 .hv2-cost-summary{overflow:visible}
#histV2 .hv2-budget-parts>article{position:relative;padding:3px 8px}
#histV2 .hv2-component-details>summary{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px;list-style:none;cursor:pointer;padding:3px 0;min-height:24px}
#histV2 .hv2-component-details>summary::-webkit-details-marker{display:none}
#histV2 .hv2-component-title,#histV2 .hv2-component-total{display:inline;font-size:11px;line-height:18px}
#histV2 .hv2-component-total b{font-size:12px}
#histV2 .hv2-component-arrow{margin-left:auto;color:#536f96;font-size:13px}
#histV2 .hv2-component-details[open] .hv2-component-arrow{transform:rotate(90deg)}
#histV2 .hv2-component-body{padding:7px 9px;border:1px solid #dce5ef;border-radius:5px;background:white;color:#53677d}
#histV2 .hv2-component-body>small{display:block;font-size:10px;line-height:15px;margin-top:5px}
#histV2 .hv2-component-details:not([open])>.hv2-component-body{display:none}
@media(hover:hover){#histV2 .hv2-component-details:not([open]):hover>.hv2-component-body{display:block;position:absolute;left:0;top:100%;z-index:30;width:max(100%,240px);max-width:calc(100vw - 40px);box-shadow:0 8px 22px #182c4529}#histV2 .hv2-budget-parts>article:last-child .hv2-component-details:not([open]):hover>.hv2-component-body{left:auto;right:0}}
#histV2 .hv2-accumulated-balance{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;padding:9px 12px;border-top:1px solid #dce5ef;background:#edf4fb;color:#253746;font-size:12px}
#histV2 .hv2-accumulated-balance>b{font-size:15px}
#histV2 .hv2-accumulated-balance .hv2-negative{color:#b91c1c}
#histV2 .hv2-balance-explanation{font-size:10px;position:relative}
#histV2 .hv2-balance-explanation>summary{cursor:pointer;color:#32639b}
#histV2 .hv2-balance-explanation>div{position:absolute;z-index:31;background:white;border:1px solid #dce5ef;padding:9px;max-width:calc(100vw - 40px);width:290px;box-shadow:0 8px 20px #182c4529}
#histV2 .hv2-balance-explanation p{font-size:11px;line-height:16px;margin:4px 0}
#histV2 .hv2-hover-tooltip{position:fixed;z-index:1000;pointer-events:none;background:white;border:1px solid #b8c9dc;border-radius:6px;box-shadow:0 6px 22px #142b4933;padding:9px;max-width:min(340px,calc(100vw - 24px));max-height:65vh;overflow:auto;color:#253746;font-size:11px}
#histV2 .hv2-hover-tooltip[hidden]{display:none}
#histV2 .hv2-hover-tooltip table{font-size:11px;margin:5px 0}
#histV2 .hv2-hover-tooltip td,#histV2 .hv2-hover-tooltip th{padding:3px 5px}
#histV2 .hv2-hover-tooltip p{margin:7px 0 0;font-size:11px}
#histV2 .hv2-hover-tooltip small{font-size:9px}
@media(max-width:600px){#histV2 .hv2-budget-parts{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 0}#histV2 .hv2-budget-parts>article{padding:2px 6px;border-top:0}#histV2 .hv2-budget-parts>article:has(.hv2-component-details[open]){grid-column:1/-1}#histV2 .hv2-component-title,#histV2 .hv2-component-total{font-size:10px}#histV2 .hv2-component-total b{font-size:11px}#histV2 .hv2-balance-explanation>div{position:static;width:auto}}
/* Closed details use an internal content-visibility slot in Chromium. The body
   itself stays hidden until hover or disclosure; allow the preview to paint. */
#histV2 .hv2-component-details::details-content{content-visibility:visible}
@media(max-width:1100px) and (hover:hover){#histV2 .hv2-budget-parts>article:nth-child(even) .hv2-component-details:not([open]):hover>.hv2-component-body{left:auto;right:0}}

/* Direct selectors above chart; aligned disclosures expand in a full-width row. */
#histV2 .hv2-disclosure-dock{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 12px;border-bottom:1px solid #dce5ef;margin:0 0 8px}
#histV2 .hv2-disclosure-dock>.hv2-top-disclosure{display:contents}
#histV2 .hv2-top-disclosure::details-content{display:contents;content-visibility:visible}
#histV2 .hv2-disclosure-dock>.hv2-top-disclosure>summary{grid-row:1;grid-column:var(--disclosure-column);padding:9px 4px;margin:0;cursor:pointer;font-size:11px;align-self:start;min-width:0;overflow-wrap:anywhere}
#histV2 .hv2-disclosure-dock .hv2-top-disclosure>summary>span:not(:first-child){display:none}
#histV2 .hv2-disclosure-body{grid-column:1/-1;grid-row:auto;padding:6px 4px 10px;min-width:0}
#histV2 .hv2-top-disclosure:not([open])>.hv2-disclosure-body{display:none}
#histV2 .hv2-top-disclosure[open]>summary{color:#174e88;font-weight:600}
#histV2 .hv2-balance-metric{flex:1 1 230px;display:flex;flex-wrap:wrap;gap:4px 7px;align-items:baseline}
#histV2 .hv2-balance-metric>b{font-size:15px}
#histV2 .hv2-balance-metric>small{flex-basis:100%;font-size:10px;color:#53677d}
#histV2 .hv2-balance-explanation{flex-basis:100%}
#histV2 .hv2-balance-explanation>div{position:static;width:auto;max-width:100%;overflow:auto;box-shadow:none}
#histV2 .hv2-balance-explanation table{font-size:11px}
@media(max-width:600px){#histV2 .hv2-disclosure-dock{gap:0 4px}#histV2 .hv2-disclosure-dock>.hv2-top-disclosure>summary{font-size:10px;padding:8px 1px}#histV2 .hv2-balance-metric{flex-basis:100%}}
#histV2 .hv2-disclosure-dock>.hv2-top-disclosure>summary,#histV2 .hv2-disclosure-dock>#hv2Comparison>.hv2-top-disclosure>summary{display:block;padding:9px 4px!important;line-height:18px!important;margin:0!important;align-self:start;grid-row:1;grid-column:var(--disclosure-column);font-size:11px;cursor:pointer}
#histV2 .hv2-top-disclosure>summary::before{content:'▸ ';color:#536f96}
#histV2 .hv2-top-disclosure[open]>summary::before{content:'▾ '}
@media(max-width:600px){#histV2 .hv2-disclosure-dock .hv2-top-disclosure>summary{font-size:10px!important;padding:8px 1px!important}}
#histV2 .hv2-disclosure-dock .hv2-top-disclosure{display:contents}

/* Fit the collapsed desktop overview to the viewport; details remain in normal flow. */
#histV2 .hv2-cumulative-balance{padding:7px 9px;border:1px solid #d4e2f1;border-radius:5px;background:#edf4fb;margin:6px 0}
#histV2 .hv2-cumulative-balance>b{display:block;font-size:14px;margin:2px 0}
#histV2 .hv2-hover-tooltip .hv2-cumulative-balance{padding:5px;margin:5px 0}
#histV2 .hv2-hover-tooltip .hv2-cumulative-balance small{font-size:9px}
@media(min-width:1000px) and (min-height:620px){
 #histV2 .hv2-panel{padding:8px 10px}
 #histV2 .hv2-eyebrow{font-size:10px;margin:1px 0}
 #histV2 h2{font-size:18px;margin:2px 0}
 #histV2 #hv2Calendar{font-size:10px;margin:2px 0 5px}
 #histV2 .hv2-head>button{font-size:11px;padding:5px 8px;margin-top:1px}
 #histV2 .hv2-summary-top{padding:4px 8px;gap:4px 10px}
 #histV2 .hv2-budget-card,#histV2 .hv2-actual-card{padding:3px 8px}
 #histV2 .hv2-budget-parts{margin-top:0;gap:0}
 #histV2 .hv2-budget-parts>article{padding-top:0;padding-bottom:0}
 #histV2 .hv2-component-details>summary{min-height:20px;padding:1px 0}
 #histV2 .hv2-summary-strip{padding:2px 0;grid-template-columns:repeat(3,minmax(0,1fr))}
 #histV2 .hv2-accumulated-balance{padding:5px 8px;gap:3px 10px}
 #histV2 .hv2-balance-metric{gap:1px 5px}
 #histV2 .hv2-balance-metric>b{font-size:13px}
 #histV2 .hv2-balance-metric>small{font-size:9px}
 #histV2 .hv2-summaries{margin-bottom:3px}
 #histV2 .hv2-disclosure-dock{margin-bottom:1px}
 #histV2 .hv2-disclosure-dock .hv2-top-disclosure>summary{padding:4px 2px!important;line-height:16px!important;font-size:10px}
 #histV2 .hv2-chart{padding:2px 0 4px}
 #histV2 .hv2-chart .hv2-legend{gap:3px 5px;padding:3px 0;margin:0;font-size:10px}
 #histV2 .hv2-legend label{padding:2px 4px;line-height:15px}
 #histV2 .hv2-chart svg{min-height:0;max-width:100%}
 #histV2 .hv2-point-details{margin:1px 0}
 #histV2 .hv2-point-details>summary{padding:3px 2px}
}
@media(min-width:1000px) and (min-height:620px){#histV2 .hv2-disclosure-dock>#hv2Comparison>.hv2-top-disclosure>summary{padding:4px 2px!important;line-height:16px!important;font-size:10px}}

/* Filters are directly available, without a More popover. */
#histV2 .hv2-control-dock{flex-wrap:wrap;flex:1 1 auto;justify-content:flex-end}
#histV2 #hv2More.hv2-direct-controls{display:flex;min-width:0;flex:0 1 auto}
#histV2 .hv2-direct-controls>.hv2-more-panel{position:static;display:flex;align-items:center;flex-wrap:wrap;gap:4px;min-width:0;width:auto;max-width:100%;padding:0;border:0;box-shadow:none;background:transparent}
#histV2 .hv2-direct-controls #hv2ScopeWithout,#histV2 .hv2-direct-controls #hv2ScopeAll{display:none}
#histV2 .hv2-direct-controls label{font-size:10px;gap:3px}
#histV2 .hv2-direct-controls #hv2Base{width:85px;padding:4px 3px;font-size:10px}
#histV2 .hv2-direct-controls #hv2Labels,#histV2 .hv2-direct-controls #hv2Export,#histV2 .hv2-direct-controls #hv2Refresh{font-size:10px;min-height:26px;padding:3px 5px}
#histV2 .hv2-direct-controls #hv2Category{position:relative;flex:none}
#histV2 .hv2-direct-controls #hv2Category>summary{font-size:10px;padding:5px 6px;border:1px solid #c7d5e9;border-radius:5px;min-height:26px;max-width:145px}
#histV2 .hv2-direct-controls #hv2Category>div{position:absolute;z-index:50;right:0;top:100%;width:260px;max-width:calc(100vw - 32px);padding:9px;background:#fff;border:1px solid #c7d5e9;border-radius:5px;box-shadow:0 8px 22px #182c4529}
@media(max-width:1100px){#histV2 .hv2-control-dock{justify-content:flex-start}#histV2 .hv2-direct-controls #hv2Category>div{left:0;right:auto}}

#histV2 .hv2-direct-controls #hv2ScopeWithout,#histV2 .hv2-direct-controls #hv2ScopeAll{display:inline-block;font-size:9px;padding:3px 4px;min-height:26px}
#histV2 .hv2-sim-matrix table{font-size:9px;width:100%;table-layout:fixed}
#histV2 .hv2-sim-matrix th:first-child,#histV2 .hv2-sim-matrix td:first-child{width:160px}
#histV2 .hv2-sim-matrix td,#histV2 .hv2-sim-matrix th{padding:5px 1px;text-align:center}
#histV2 .hv2-sim-matrix td:first-child,#histV2 .hv2-sim-matrix th:first-child{text-align:left;padding-left:4px}
#histV2 .hv2-sim-matrix .hv2-qty{padding:4px 1px;width:100%;font-size:10px;appearance:textfield;-moz-appearance:textfield}
#histV2 .hv2-sim-matrix .hv2-qty::-webkit-inner-spin-button,#histV2 .hv2-sim-matrix .hv2-qty::-webkit-outer-spin-button{appearance:none;margin:0}
#histV2 .hv2-sim-matrix small{font-size:9px;line-height:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#histV2 .hv2-sim-unit-key{margin:7px 0}
@media(max-width:900px){#histV2 .hv2-sim-matrix{overflow:auto}#histV2 .hv2-sim-matrix table{min-width:950px!important}}

#histV2 .hv2-direct-controls>.hv2-more-panel>label,#histV2 .hv2-direct-controls>.hv2-more-panel>details{width:auto;flex:none}
#histV2 .hv2-direct-controls>.hv2-more-panel{overflow:visible;max-height:none}

#histV2 .hv2-sim-matrix{max-height:65vh;overflow:auto}
#histV2 .hv2-sim-matrix thead th{position:sticky;top:0;z-index:2;background:#eef2f7}
#histV2 .hv2-sim-matrix td:first-child,#histV2 .hv2-sim-matrix th:first-child{position:sticky;left:0;background:#fff;z-index:1}
#histV2 .hv2-sim-matrix thead th:first-child{z-index:3;background:#eef2f7}


/* Integral TAP reference remains distinct from the filtered monthly programming. */
#histV2 .hv2-tap-reference{border:1px solid #cbd5e1;border-left:3px solid #2563eb;background:#f8fafc;padding:6px 10px;margin:4px 0;min-width:0}
#histV2 .hv2-tap-reference-heading{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;font-size:12px}
#histV2 .hv2-tap-reference-heading small{font-size:10px;color:#475569}
#histV2 .hv2-tap-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:4px}
#histV2 .hv2-tap-metrics>div{display:flex;flex-wrap:wrap;gap:3px 8px;align-items:baseline;min-width:0;font-size:11px}
#histV2 .hv2-tap-metrics b{font-size:14px;white-space:nowrap;color:#1e3a5f}
#histV2 .hv2-tap-metrics small{font-size:10px;color:#475569}
#histV2 .hv2-tap-audit>summary{cursor:pointer;font-size:10px;margin-top:4px}
#histV2 .hv2-tap-audit>div{font-size:12px;padding:8px 0}
#histV2 .hv2-tap-audit table{width:100%;table-layout:fixed;font-size:11px;border-collapse:collapse}
#histV2 .hv2-tap-audit th,#histV2 .hv2-tap-audit td{padding:5px;border-bottom:1px solid #e2e8f0;text-align:right;overflow-wrap:anywhere}
#histV2 .hv2-tap-audit th:first-child{text-align:left}
@media(max-width:699px){#histV2 .hv2-tap-metrics{grid-template-columns:1fr}#histV2 .hv2-tap-metrics>div{justify-content:space-between}#histV2 .hv2-tap-metrics small{width:100%;text-align:right}}

#histV2 .hv2-sienge-budget{border:1px solid #94a3b8;border-left:3px solid #0f766e;padding:6px 10px;margin:4px 0;background:#f0fdfa;min-width:0;font-size:11px}
#histV2 .hv2-sienge-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
#histV2 .hv2-sienge-head label{display:flex;gap:6px;align-items:center}
#histV2 .hv2-sienge-head select{max-width:330px;min-width:150px;font-size:11px}
#histV2 .hv2-sienge-budget>small{display:block;font-size:10px;color:#475569;margin-top:3px}
#histV2 .hv2-sienge-budget summary{font-size:10px;cursor:pointer}
#histV2 .hv2-sienge-budget table{width:100%;table-layout:fixed;font-size:11px}
#histV2 .hv2-sienge-budget th,#histV2 .hv2-sienge-budget td{padding:4px;overflow-wrap:anywhere}
@media(max-width:699px){#histV2 .hv2-sienge-head select{max-width:100%}}

@media(min-width:1100px){
 #histV2 .hv2-budget-reference-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px}
 #histV2 .hv2-budget-reference-grid>section{margin:2px 0;padding:4px 7px}
 #histV2 .hv2-tap-reference-heading{display:none}
 #histV2 .hv2-tap-metrics{gap:4px}
 #histV2 .hv2-tap-metrics>div{display:block;font-size:10px}
 #histV2 .hv2-tap-metrics b{display:block;font-size:12px}
 #histV2 .hv2-tap-metrics small{display:none}
 #histV2 .hv2-sienge-head{gap:3px 8px}
 #histV2 .hv2-sienge-head strong{font-size:11px}
 #histV2 .hv2-sienge-head select{max-width:170px;min-width:100px;padding:0 3px;min-height:20px;height:20px}
 #histV2 .hv2-sienge-head button{font-size:10px;padding:0 4px;min-height:20px}
 #histV2 .hv2-budget-source-brief{display:none}
 #histV2 .hv2-program-actual-grid{display:grid;grid-template-columns:1fr 1fr}
 #histV2 .hv2-program-actual-grid>div{border-bottom:1px solid #e6ebf1;border-top:0}
 #histV2 .hv2-component-stage-total .hv2-summary-label button{font-size:11px}
 #histV2 .hv2-program-actual-grid .hv2-budget-parts{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 4px}
 #histV2 .hv2-program-actual-grid .hv2-budget-parts article{padding:1px 4px}
 #histV2 .hv2-program-actual-grid .hv2-component-title,#histV2 .hv2-program-actual-grid .hv2-component-total{font-size:10px}
}

@media(min-width:1100px){
 #histV2 .hv2-sienge-budget>small.hv2-budget-source-brief{display:none}
 #histV2 .hv2-sienge-budget>.hv2-tap-metrics{grid-template-columns:1fr 1.25fr}
 #histV2 .hv2-budget-reference-grid .hv2-tap-metrics{line-height:13px}
 #histV2 .hv2-budget-reference-grid .hv2-tap-metrics b{line-height:17px}
 #histV2 .hv2-summary-top{padding-top:1px;padding-bottom:1px;min-height:27px}
 #histV2 .hv2-accumulated-balance{padding-top:2px;padding-bottom:2px;gap:1px 8px}
 #histV2 .hv2-accumulated-balance small{line-height:11px}
}
@media(min-width:1100px){
 #histV2 #hv2UnifiedRow{padding:1px 5px;min-height:0}
 #histV2 #hv2UnifiedRow select,#histV2 #hv2UnifiedRow input[type=search],#histV2 #hv2UnifiedRow button{height:22px;min-height:22px;padding:1px 4px}
 #histV2 .hv2-tap-audit>summary{margin-top:0}
 #histV2 .hv2-program-actual-grid .hv2-component-stage-total{min-height:20px}
}
@media(min-width:700px) and (max-width:1099px){
 #histV2 .hv2-budget-reference-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px}
 #histV2 .hv2-budget-reference-grid>section{padding:5px 7px}
 #histV2 .hv2-tap-reference-heading{display:none}
 #histV2 .hv2-tap-metrics{line-height:14px;gap:4px}
 #histV2 .hv2-tap-metrics>div{display:block;font-size:10px}
 #histV2 .hv2-tap-metrics b{display:block;font-size:12px;line-height:17px}
 #histV2 .hv2-tap-metrics small,#histV2 .hv2-sienge-budget>small.hv2-budget-source-brief{display:none}
 #histV2 .hv2-sienge-budget>.hv2-tap-metrics{grid-template-columns:1fr 1fr}
 #histV2 .hv2-sienge-head select{max-width:160px}
}
@media(max-width:699px){
 #histV2 .hv2-budget-reference-grid>section{padding:3px 7px;margin:2px 0}
 #histV2 .hv2-tap-reference-heading,#histV2 .hv2-sienge-budget>small.hv2-budget-source-brief{display:none}
 #histV2 .hv2-sienge-head{gap:3px 7px}
 #histV2 .hv2-sienge-head strong{width:100%;font-size:11px}
 #histV2 .hv2-sienge-head select{height:24px;min-height:24px;padding:0 4px;font-size:11px;max-width:190px}
 #histV2 .hv2-sienge-head button{height:24px;min-height:24px;padding:0 4px;font-size:10px}
 #histV2 .hv2-tap-metrics{gap:2px;line-height:16px}
 #histV2 .hv2-tap-metrics>div{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;font-size:10px;gap:5px}
 #histV2 .hv2-tap-metrics>div>span{max-width:60%}
 #histV2 .hv2-tap-metrics b{font-size:12px;line-height:18px;flex:none}
 #histV2 .hv2-tap-metrics small{display:none}
 #histV2 .hv2-tap-audit>summary{margin-top:2px}
}

/* Compact controls, hover-only flags and live simulation feedback. */
#histV2 .hv2-control-dock #hv2Metric{display:flex;width:auto;max-width:none;gap:0;padding:0;border:1px solid #b9cbd9;border-radius:5px;flex:none}
#histV2 .hv2-segments legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#histV2 .hv2-segments button{padding:3px 7px;font-size:10px;min-height:24px;border:0;border-radius:0;background:white;color:#36536d}
#histV2 .hv2-segments button[aria-pressed=true]{background:#253746;color:white}
#histV2 .hv2-control-dock{flex-wrap:wrap}
#histV2 .hv2-component-details:focus-within>.hv2-component-body{display:block;position:absolute;left:0;top:100%;z-index:30;width:240px;max-width:calc(100vw - 40px);box-shadow:0 8px 22px #182c4529}
#histV2 .hv2-component-details>summary{cursor:help}
#histV2 .hv2-component-details[open]>.hv2-component-body{position:absolute;z-index:30}
#histV2 .hv2-base-balances{padding:3px 8px;background:#f8fafc;border-top:1px solid #dce5ef;font-size:10px}
#histV2 .hv2-base-balance-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
#histV2 .hv2-base-balance-grid>div{display:flex;gap:4px;flex-wrap:wrap;align-items:baseline}
#histV2 .hv2-base-balance-grid b{font-size:11px;white-space:nowrap}
#histV2 .hv2-base-balances>small{display:block;font-size:9px;line-height:12px;color:#52677c}
#histV2 .hv2-sim-matrix .hv2-edited,#histV2 .hv2-sim-matrix .hv2-edited input{background:#dbeafe!important;color:#1748a1;box-shadow:inset 0 -2px #2563eb}
#histV2 .hv2-sim-matrix .hv2-closed-month,#histV2 .hv2-sim-matrix .hv2-closed-month input{background:#edf0f3;color:#7c8996;box-shadow:none}
#histV2 .hv2-sim-matrix tfoot{position:sticky;bottom:0;background:#eaf1f7;z-index:2;font-weight:600}
#histV2 .hv2-sim-matrix tbody td:not(:first-child){height:30px}
#histV2 #hv2EditCount{font-size:11px;color:#2563eb;margin-left:8px}
#histV2 .hv2-fuel-actual{border-top:1px solid #dce5ef;padding:10px 0}
#histV2 #hv2TapDownload{font-weight:600;color:#245994}
@media(max-width:699px){#histV2 .hv2-base-balance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#histV2 .hv2-component-details:focus-within>.hv2-component-body{left:auto;right:0}}

#histV2 .hv2-sim-search{display:flex;align-items:end;flex-wrap:wrap;gap:8px;margin:8px 0}
#histV2 .hv2-sim-search>label{flex:1;min-width:180px;max-width:440px;font-size:12px}
#histV2 #hv2SimSearch{width:100%;margin-top:3px}
#histV2 .hv2-sim-search>span,#histV2 .hv2-sim-total-note{font-size:11px;color:#53677d}
#histV2 #hv2Simulator [data-sim-row][hidden],#histV2 #hv2SimEmpty[hidden]{display:none!important}
#histV2 .hv2-sim-matrix tfoot th,#histV2 .hv2-sim-matrix tfoot td{padding:3px 1px;line-height:14px}

#histV2 #hv2InlineSimulationRow[hidden]{display:none!important}
#histV2 .hv2-inline-editor-cell{padding:0!important;text-align:left;white-space:normal}
#histV2 #hv2InlineSimulationSlot{min-width:0;max-width:100%;overflow-anchor:none}
#histV2 #hv2InlineSimulationSlot .hv2-simulation{margin:0;border:1px solid #9bbbd7;border-radius:0;background:#f8fbff;padding:10px}
#histV2 .hv2-inline-editor-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
#histV2 .hv2-simulator-open>th,#histV2 .hv2-simulator-open>td{background:#e8f2ff}
#histV2 .hv2-sim-fuel-pending{color:#9a5a0a;cursor:help}
#histV2 #hv2InlineSimulationSlot .hv2-sim-matrix{max-height:50vh}
#histV2 #hv2InlineSimulationSlot .hv2-sim-matrix td,#histV2 #hv2InlineSimulationSlot .hv2-sim-matrix th{white-space:normal}

#histV2{overflow-anchor:none}

/* Search in item header; matrix directly below simulator row. */
#histV2 #hv2InlineSimulationSlot .hv2-simulation{padding:0;border-top:0}
#histV2 #hv2InlineSimulationSlot .hv2-sim-matrix{margin:0;border:0;border-radius:0}
#histV2 #hv2Composition{text-align:left;min-width:0}
#histV2 .hv2-sim-item-search{display:block;margin:0;min-width:0}
#histV2 .hv2-sim-item-search #hv2SimSearch{display:block;box-sizing:border-box;width:100%;min-width:0;height:28px;margin:0;padding:3px 6px;font-size:11px}
#histV2 #hv2Composition>.hv2-inline-editor-head{justify-content:flex-start;flex-wrap:wrap;padding:4px 6px;gap:4px 8px}
#histV2 #hv2Composition>.hv2-inline-editor-head button{min-height:26px;padding:3px 6px;font-size:10px}
#histV2 #hv2SimMatches{font-size:10px;color:#53677d}
#histV2 #hv2SimPremises{padding:0 6px 5px;text-align:left}
#histV2 #hv2SimPremises>summary{text-align:left;font-size:11px;padding:3px 0;cursor:pointer}
#histV2 #hv2SimPremises p{font-size:11px;line-height:1.4;text-align:left}
#histV2 #hv2Composition>.hv2-sim-unit-key{display:block;padding:3px 6px;text-align:left}

#histV2 .hv2-sim-item-search{display:flex;align-items:center;gap:3px}
#histV2 .hv2-sim-item-search #hv2SimSearch{flex:1;width:0}
#histV2 .hv2-sim-item-search button{flex:none;padding:0 4px;min-height:26px;height:26px}

/* Shared month geometry and explicit review states. */
#histV2 #hv2Overview{max-width:100%;min-width:0;overflow-x:auto}
#histV2 .hv2-months>.hv2-item-col,#histV2 .hv2-item-col{width:190px}
#histV2 .hv2-total-col{width:72px}
#histV2 .hv2-months>thead th:first-child,#histV2 .hv2-months>tbody>tr>th:first-child,#histV2 .hv2-months>thead th:last-child,#histV2 .hv2-months>tbody>tr>td:last-child{width:auto}
#histV2 #hv2InlineSimulationRow>td{width:auto!important}
#histV2 #hv2InlineSimulationSlot .hv2-simulation{border:0}
#histV2 .hv2-sim-matrix th:first-child,#histV2 .hv2-sim-matrix td:first-child,#histV2 .hv2-sim-matrix th:last-child,#histV2 .hv2-sim-matrix td:last-child{width:auto}
#histV2 .hv2-sim-matrix tbody td.hv2-review-pending,#histV2 .hv2-sim-matrix tbody td.hv2-review-pending input{background:#f5f1fa;color:#625378;box-shadow:none}
#histV2 .hv2-sim-matrix tbody td.hv2-review-kept,#histV2 .hv2-sim-matrix tbody td.hv2-review-kept input{background:#eef8ef;color:#326443;box-shadow:inset 0 -2px #9ccaab}
#histV2 .hv2-sim-matrix tbody td.hv2-review-changed,#histV2 .hv2-sim-matrix tbody td.hv2-review-changed input{background:#fff0dc!important;color:#885006;box-shadow:inset 0 -2px #e39a3a}
#histV2 .hv2-sim-matrix tbody td.hv2-explicit-zero input{font-weight:800;outline:2px solid #c66a6a;outline-offset:-2px;color:#8b2525}
#histV2 .hv2-sim-matrix tbody td.hv2-closed-month,#histV2 .hv2-sim-matrix tbody td.hv2-closed-month input{background:#edf0f3!important;color:#7c8996;box-shadow:none}
#histV2 .hv2-keep-row{display:block;min-height:18px;margin:2px 0 0;padding:0 4px;font-size:9px;background:#eef8ef;color:#326443;border-color:#b9d9c1}
#histV2 #hv2Composition>.hv2-inline-editor-head label{display:flex;align-items:center;gap:4px;font-size:11px}
#histV2 #hv2SimStatus{min-height:26px;padding:2px 5px;font-size:11px}
#histV2 #hv2EditCount{color:#885006}
#histV2 .hv2-key-changed{background:#fff0dc;color:#885006}
#histV2 .hv2-key-kept{background:#eef8ef;color:#326443}
#histV2 .hv2-key-pending{background:#f5f1fa;color:#625378}
#histV2 .hv2-key-zero{outline:1px solid #c66a6a;color:#8b2525}
#histV2 .hv2-sim-unit-key span{padding:1px 4px}
#histV2 .hv2-sim-choice{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px;background:#f8fbff}
#histV2 .hv2-sim-choice small{flex-basis:100%;text-align:left}
#histV2 .hv2-sim-impact{border:1px solid #dce5ef;border-radius:6px;padding:7px;margin:5px 0}
#histV2 .hv2-sim-impact .hv2-sim-summary{grid-template-columns:1.2fr 1fr 1fr 1fr;border:0;padding:0;margin:0 0 6px}
#histV2 .hv2-sim-impact-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;border-top:1px solid #dce5ef;padding-top:5px}
#histV2 .hv2-sim-impact b{display:block;font-size:13px}
#histV2 .hv2-sim-impact small{font-size:10px;color:#52677c;line-height:1.4}
#histV2 .hv2-sim-impact-note{display:block;margin-top:6px}
@media(max-width:1199px){#histV2 .hv2-editing-all-months .hv2-months{min-width:1100px!important}#histV2 .hv2-editing-all-months .hv2-sim-matrix table{min-width:0!important}}
@media(max-width:699px){#histV2 .hv2-sim-impact .hv2-sim-summary,#histV2 .hv2-sim-impact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

#histV2 #hv2Composition>.hv2-inline-editor-head label{white-space:nowrap}

#histV2 #hv2PdfSimulation{background:#183645;color:#fff;border-color:#183645}
#histV2 #hv2PdfStatus{font-size:11px;color:#52677c}
#histV2 .hv2-report-options{display:grid;grid-template-columns:1fr 2fr;gap:7px;margin:6px 0}
#histV2 .hv2-report-options label{display:flex;flex-direction:column;gap:3px;font-size:11px}
#histV2 .hv2-report-options small{grid-column:1/-1;font-size:10px}
#histV2 .hv2-report-options textarea{font:inherit;border:1px solid #cbd5e1;border-radius:4px;padding:6px;resize:vertical;max-width:100%;box-sizing:border-box}
@media(max-width:699px){#histV2 .hv2-report-options{grid-template-columns:1fr}}

/* Three ordered charts and compact, source-consistent summaries. */
.hv2-charts{display:grid;gap:10px}.hv2-charts .hv2-chart{padding:10px 12px;border:1px solid #d7e2ed;border-radius:8px;position:relative}.hv2-charts h3{font-size:13px;margin:0 0 6px;color:#203746;letter-spacing:.04em}.hv2-charts svg{display:block;width:100%;min-height:0!important;max-height:none!important}.hv2-charts .hv2-legend{display:flex;gap:12px;align-items:flex-start;flex-wrap:wrap;margin:0 0 5px}.hv2-legend fieldset{display:flex;gap:4px 10px;flex-wrap:wrap;border:0;padding:0;margin:0;min-width:0}.hv2-legend legend{font-size:10px;color:#667b8f;padding:0;margin:0 0 3px}.hv2-legend label{font-size:11px!important;padding:3px 5px!important}.hv2-info{position:relative;display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;min-width:17px;border:1px solid #9aacc0;border-radius:50%;color:#496179;font-size:11px;cursor:help;vertical-align:middle;letter-spacing:0}.hv2-info-text{display:none;position:absolute;z-index:1000;top:100%;right:0;width:min(390px,80vw);padding:11px;border:1px solid #c9d6e5;background:#fff;color:#203746;box-shadow:0 5px 18px #152c4926;border-radius:6px;font:12px/1.5 Arial,sans-serif;text-align:left;white-space:normal;font-weight:400}.hv2-info:hover>.hv2-info-text,.hv2-info:focus>.hv2-info-text{display:block}.hv2-annotation{display:inline-block!important;padding:0!important;margin:2px 6px!important;min-height:0!important}.hv2-annotation .hv2-info-text{left:0;right:auto}.hv2-sim-impact{border:2px solid #d97706!important;background:#fff9ed!important;box-shadow:0 2px 7px #d9770614;border-radius:9px;padding:10px!important}.hv2-sim-impact .hv2-sim-summary>div:first-child>b{color:#9c4c0a}.hv2-sim-summary,.hv2-sim-impact-grid{gap:6px!important}.hv2-sim-impact b{font-size:15px!important}.hv2-sim-impact small{font-size:10px!important}.hv2-cost-summary{padding:8px!important}.hv2-sienge-budget,.hv2-tap-reference,.hv2-budget-card,.hv2-actual-card{padding:8px!important;min-height:0!important}.hv2-tap-metrics{gap:6px!important;margin:5px 0!important}.hv2-tap-metrics b,.hv2-summary-value b{font-size:17px!important;line-height:1.2!important;white-space:nowrap}.hv2-tap-metrics span,.hv2-summary-label{font-size:11px!important}.hv2-summary-strip{gap:6px!important;margin:6px 0!important}.hv2-summary-metric{padding:6px 9px!important;min-height:0!important}.hv2-budget-reference-grid,.hv2-program-actual-grid{gap:6px!important;margin-top:6px!important}.hv2-budget-parts{gap:4px!important}.hv2-component-details summary{padding:4px 6px!important;font-size:11px!important;min-height:0!important}.hv2-component-total b{font-size:12px!important;white-space:nowrap}.hv2-accumulated-balance{padding:7px!important;margin-top:6px!important;gap:8px!important}.hv2-balance-metric strong{font-size:11px!important}.hv2-balance-metric>b{font-size:16px!important}.hv2-sim-commitments{padding:7px 9px;border:1px solid #e3b268;border-radius:6px;background:#fffaf2;margin:8px 0}.hv2-sim-commitments>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.hv2-sim-commitments strong{font-size:12px}.hv2-sim-commitments summary{font-size:11px;cursor:pointer;margin-top:5px}.hv2-sim-commitments td,.hv2-sim-commitments th{font-size:10px;padding:5px}.hv2-sim-commitments .hv2-matrix{max-height:270px}.hv2-sim-commitments button{font-size:10px!important;padding:4px 7px!important}.hv2-series-simulado{background:#fff3dc!important;font-weight:bold}.hv2-charts .hv2-point-details{margin-top:0}.hv2-component-title{white-space:normal!important}
@media(max-width:700px){.hv2-charts .hv2-legend{gap:6px}.hv2-sim-summary,.hv2-sim-impact-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.hv2-sim-summary>div:first-child{grid-column:1/-1}.hv2-info-text{position:fixed;left:12px!important;right:12px!important;top:auto;bottom:15px;width:auto}.hv2-charts .hv2-chart{padding:8px 4px}.hv2-tap-metrics b,.hv2-summary-value b{font-size:15px!important}}

.hv2-sienge-head{gap:5px!important;flex-wrap:nowrap!important;font-size:10px!important;margin-bottom:3px!important}.hv2-sienge-head strong{font-size:11px!important;white-space:nowrap}.hv2-sienge-head label{font-size:10px!important}.hv2-sienge-head select{max-width:150px;font-size:10px!important;padding:3px!important}.hv2-sienge-head button{padding:3px 6px!important}.hv2-sienge-budget>details{display:inline-block!important;font-size:10px!important}.hv2-sienge-budget>.hv2-annotation{vertical-align:middle}.hv2-budget-reference-grid{align-items:start!important}.hv2-sienge-budget,.hv2-tap-reference{padding:5px!important}.hv2-balance-metric{display:flex!important;flex-wrap:wrap;align-items:center;gap:3px 5px!important}.hv2-balance-metric>.hv2-annotation{margin:0!important}.hv2-balance-metric strong{font-size:10px!important}.hv2-balance-metric>b{font-size:14px!important}.hv2-accumulated-balance{padding:5px!important}.hv2-program-actual-grid .hv2-component-stage-total{margin-bottom:4px!important;padding:2px 4px!important}.hv2-budget-parts{padding:0!important}.hv2-summary-metric{padding:3px 6px!important}.hv2-summary-strip{margin:3px 0!important}.hv2-summary-metric>small{display:none}.hv2-tap-reference-heading>small{display:none}
@media(max-width:700px){.hv2-sienge-head{flex-wrap:wrap!important}.hv2-sienge-head select{max-width:135px}.hv2-balance-metric{display:block!important}}

.hv2-program-actual-grid .hv2-budget-parts{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:3px!important}.hv2-component-title{font-size:16px!important}.hv2-program-actual-grid .hv2-component-details summary{display:flex!important;align-items:center;gap:4px;padding:4px!important}.hv2-component-arrow{font-size:10px!important;margin-left:auto!important}.hv2-component-total b{font-size:11px!important}.hv2-accumulated-balance{position:relative;padding-right:26px!important}.hv2-balance-explanation{position:absolute!important;right:5px;top:5px;margin:0!important}.hv2-balance-explanation>summary{border:1px solid #9aacc0;border-radius:50%;width:17px;height:17px;display:flex;align-items:center;justify-content:center;list-style:none;padding:0!important;font-size:11px!important}.hv2-balance-explanation>div{position:absolute;right:0;width:min(600px,90vw);z-index:300;background:white;box-shadow:0 4px 16px #20374633;padding:10px}.hv2-sienge-budget .hv2-tap-metrics{margin:3px 0!important}.hv2-summary-strip{min-height:0!important}.hv2-accumulated-balance .hv2-balance-metric{padding:3px!important}.hv2-actual-card,.hv2-budget-card{padding:4px!important}
@media(max-width:700px){.hv2-program-actual-grid .hv2-budget-parts{grid-template-columns:repeat(2,minmax(0,1fr))!important}.hv2-component-title{font-size:14px!important}}

.hv2-sim-impact-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.hv2-sim-impact-grid>div{min-width:0}.hv2-sim-impact-grid>div:nth-child(-n+3){padding-bottom:4px;border-bottom:1px solid #eddbb9}.hv2-contract-matrix table{table-layout:fixed}.hv2-contract-matrix th:first-child{overflow-wrap:anywhere}.hv2-contract-matrix td{white-space:nowrap}
@media(max-width:700px){.hv2-sim-impact-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

.hv2-summary-strip:has(>.hv2-summary-metric:only-child[data-summary-stage="comprometido"]){display:none!important}.hv2-balance-metric>small.hv2-annotation{flex:0 0 auto!important;width:auto!important}.hv2-sienge-budget .hv2-tap-metrics{margin:0!important}.hv2-cost-summary{padding:6px!important}.hv2-summary-top{padding-top:0!important;padding-bottom:0!important;margin-bottom:4px!important}.hv2-sienge-budget{position:relative;padding-bottom:5px!important}.hv2-sienge-budget>details{position:absolute;right:6px;bottom:6px;z-index:25}.hv2-sienge-budget>details>summary{font-size:0!important;list-style:none;width:17px;height:17px;border:1px solid #9aacc0;border-radius:50%;text-align:center;cursor:help}.hv2-sienge-budget>details>summary:after{content:'!';font-size:11px;line-height:15px}.hv2-sienge-budget>details[open]{width:min(650px,85vw);bottom:auto;top:100%;padding:10px;background:#fff;box-shadow:0 4px 15px #20374630;z-index:400}.hv2-sienge-budget>.hv2-budget-source-brief{position:absolute;right:27px;bottom:6px}.hv2-sienge-budget>.hv2-tap-metrics{padding-bottom:2px}.hv2-sim-commitments .hv2-info-text{z-index:1200}

.hv2-sienge-budget>details{top:6px;bottom:auto}.hv2-sienge-budget>.hv2-budget-source-brief{top:6px;bottom:auto}.hv2-sienge-head{padding-right:44px!important}
@media(max-width:700px){.hv2-balance-metric>strong{display:block!important;margin-bottom:3px}.hv2-balance-metric>b{margin-right:5px}.hv2-sienge-head{padding-right:44px!important}}

/* Selected component balances: budget ceiling stays separate from the TAP schedule. */
#histV2 .hv2-component-balances{margin:10px 0;border:1px solid #d8e2ee;border-radius:8px;padding:8px;background:#fff}
#histV2 .hv2-balance-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#histV2 .hv2-balance-tabs button{text-align:left;min-width:0;padding:8px 10px;border:1px solid #d8e2ee;border-radius:7px;background:#f8fafc;color:#253746}
#histV2 .hv2-balance-tabs button span{display:flex;justify-content:space-between;gap:6px;font-size:11px;margin-top:4px}
#histV2 .hv2-balance-tabs [aria-pressed=true]{border:2px solid #c86514;background:#fff4e8}
#histV2 .hv2-component-balance-detail{padding:10px 2px 2px}
#histV2 .hv2-component-balance-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:8px 0}
#histV2 .hv2-component-balance-metrics>div{display:flex;flex-direction:column;background:#f0f7f2;border-radius:6px;padding:10px}
#histV2 .hv2-component-balance-metrics span{font-size:11px}
#histV2 .hv2-component-balance-metrics b{font-size:20px}
#histV2 .hv2-contract-allocation ul{max-height:130px;overflow:auto;margin:4px 0;padding-left:20px}
@media(max-width:700px){#histV2 .hv2-balance-tabs,#histV2 .hv2-component-balance-metrics{grid-template-columns:1fr}#histV2 .hv2-component-balance-metrics b{font-size:18px}}

@media(max-width:700px){#histV2 .hv2-balance-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}#histV2 .hv2-balance-tabs button{padding:6px;font-size:11px}#histV2 .hv2-balance-tabs button span{display:block;font-size:10px}#histV2 .hv2-balance-tabs button b{display:block}}

#histV2 .hv2-component-balance-detail>label{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#histV2 .hv2-component-balance-detail>label strong{white-space:nowrap}
#histV2 .hv2-component-balance-detail>label select{flex:0 1 160px;min-width:90px;width:auto}

/* Approved compact financial panels: independent scopes and equal chart/card height. */
#histV2 .hv2-chart-body{display:grid;grid-template-columns:minmax(0,1fr) 172px;gap:12px;align-items:stretch}
#histV2 .hv2-quantity-body{grid-template-columns:1fr}
#histV2 .hv2-chart-plot{min-width:0}
#histV2 .hv2-side-cards{display:grid;grid-template-rows:repeat(5,minmax(0,1fr));gap:5px;min-width:0}
#histV2 .hv2-side-card{position:relative;display:flex;flex-direction:column;justify-content:center;min-width:0;padding:6px 8px;border:1px solid #dce5ef;border-radius:5px;background:#fff}
#histV2 .hv2-side-card-label{display:flex;align-items:center;justify-content:space-between;gap:3px;color:#53677c;font-size:11px}
#histV2 .hv2-side-card-meta{display:flex;align-items:center;gap:3px;font-size:10px;white-space:nowrap}
#histV2 .hv2-side-card>strong{margin-top:2px;font-size:18px;font-weight:600;line-height:1.25;color:#213547;font-variant-numeric:tabular-nums;white-space:nowrap}
#histV2 .hv2-side-simulation{border-color:#087c98;background:#eaf8fc;box-shadow:inset 3px 0 #087c98}
#histV2 .hv2-deviation-over>strong{color:#b91c1c}
#histV2 .hv2-deviation-under>strong{color:#15803d}
#histV2 .hv2-side-card .hv2-info{flex-shrink:0}
#histV2 .hv2-side-card .hv2-info-text{left:auto;right:0;transform:none;max-width:min(320px,calc(100vw - 30px));font-size:11px;z-index:20}
#histV2 .hv2-scoped-chart .hv2-legend{gap:4px 9px;padding:0 0 5px;margin:0;justify-content:flex-start}
#histV2 .hv2-scoped-chart .hv2-legend label{padding:2px 0;border:0;background:transparent;font-size:11px}
#histV2 .hv2-scoped-chart .hv2-legend input{width:12px;height:12px}
#histV2 .hv2-scoped-chart svg{min-height:0}
#histV2 .hv2-scoped-chart text{font-size:11px}
#histV2 .hv2-general-totals{margin-top:6px}
#histV2 .hv2-general-totals>summary{cursor:pointer;font-size:11px;color:#53677c}
#histV2 .hv2-summary-top{padding:4px 0}
#histV2 #hv2Scope[hidden],#histV2 #hv2ScopeWithout[hidden],#histV2 #hv2ScopeAll[hidden]{display:none!important}
@media(max-width:700px){
 #histV2 .hv2-chart-body{grid-template-columns:1fr}
 #histV2 .hv2-side-cards{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none}
 #histV2 .hv2-side-simulation{grid-column:1/-1}
 #histV2 .hv2-side-card>strong{font-size:17px}
}

/* The per-component side cards replace the previous aggregate simulation card. */
#histV2 #hv2SimulationSummary{display:none}
