/* Common product hierarchy, applied after historical page and mobile rules. */
/* Drawer review: centered finance cards/table and readable cost history. */
html:root body.msp-product.msp-publications #drawerBody .cost-editor>details>summary{font-size:16px!important;font-weight:600!important;line-height:1.5!important;padding:10px 0!important;min-height:44px;cursor:pointer}
html:root body.msp-product.msp-publications #drawerBody .cost-editor #costHistoryList{font-size:14px!important;line-height:1.55!important}
html:root body.msp-product.msp-publications #drawerBody .cost-history-footer>details summary{font-size:14px!important;line-height:1.5!important;min-height:36px;padding:8px 0}
html:root body.msp-product.msp-publications #drawerBody .finance-summary .detail{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center!important;padding:14px!important;min-width:0}
html:root body.msp-product.msp-publications #drawerBody .finance-summary .detail label{display:block;width:100%;margin:0!important;font-size:14px!important;line-height:1.5!important;text-align:center!important}
html:root body.msp-product.msp-publications #drawerBody .finance-summary .detail strong{display:block;width:100%;font-size:20px!important;line-height:1.35!important;text-align:center!important;font-variant-numeric:tabular-nums}
html:root body.msp-product.msp-publications #drawerBody .finance-table-wrap{width:100%;max-width:100%;margin-inline:auto;overflow-x:auto;overscroll-behavior-x:contain}
html:root body.msp-product.msp-publications #drawerBody .finance-table{width:100%;min-width:600px;table-layout:fixed;margin-inline:auto}
html:root body.msp-product.msp-publications #drawerBody .finance-table :is(th,td){text-align:center!important;vertical-align:middle!important;padding:12px 8px!important;line-height:1.45!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;font-size:14px!important}
html:root body.msp-product.msp-publications #drawerBody .finance-table th{font-size:13px!important;font-weight:600!important;text-transform:none!important;letter-spacing:0!important;width:auto!important}
html:root body.msp-product.msp-publications #drawerBody .finance-table col:nth-child(1){width:6%!important}
html:root body.msp-product.msp-publications #drawerBody .finance-table col:nth-child(2){width:27%!important}
html:root body.msp-product.msp-publications #drawerBody .finance-table col:nth-child(3){width:15%!important}
html:root body.msp-product.msp-publications #drawerBody .finance-table col:nth-child(4){width:18%!important}
html:root body.msp-product.msp-publications #drawerBody .finance-table col:nth-child(5){width:21%!important}
html:root body.msp-product.msp-publications #drawerBody .finance-table col:nth-child(6){width:13%!important}
html:root body.msp-product.msp-publications #drawerBody .finance-plan{justify-content:center!important;text-align:center;min-width:0}
html:root body.msp-product.msp-publications #drawerBody .finance-plan-name{font-size:14px!important;line-height:1.45!important;white-space:normal!important;overflow:visible;text-overflow:clip;text-align:center}
/* Publications: wrappers must not add button padding around native selects. */
html:root body.msp-product.msp-publications .toolbar{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;align-items:start!important;gap:12px!important;padding:14px!important}
html:root body.msp-product.msp-publications .toolbar .filter-control{display:block!important;position:relative;min-width:0!important;min-height:44px!important;width:100%!important;height:auto!important;padding:0!important;flex:none!important;border:0!important;background:transparent!important}
html:root body.msp-product.msp-publications .toolbar .filter-control>svg{left:12px!important;top:14px!important;width:16px!important;height:16px!important}
html:root body.msp-product.msp-publications .toolbar .filter-control select{display:block;box-sizing:border-box;width:100%!important;min-width:0!important;max-width:100%;height:44px!important;min-height:44px!important;padding:0 30px 0 38px!important;font-size:14px!important;line-height:normal!important;margin:0;border:1px solid var(--msp-line)!important;border-radius:8px!important}
html:root body.msp-product.msp-publications .toolbar .category-picker{width:100%!important;min-width:0!important;max-width:100%;margin:0;align-self:start}
html:root body.msp-product.msp-publications .toolbar .category-picker>summary{box-sizing:border-box;min-height:44px!important;height:auto!important;margin:0;padding:11px 12px!important;font-size:14px!important;line-height:20px!important}
html:root body.msp-product.msp-publications .toolbar .excel{grid-column:1/-1!important;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin:0!important}
html:root body.msp-product.msp-publications .toolbar .excel button{min-height:44px!important;height:auto!important;padding:10px 14px!important;font-size:14px!important;line-height:1.4!important}
html:root body.msp-product.msp-publications .first-steps-module{padding:18px!important;margin-bottom:18px}
html:root body.msp-product.msp-publications .first-steps-head{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(240px,320px);gap:24px!important;align-items:start!important;padding-bottom:18px!important;border-bottom:1px solid var(--msp-line)}
html:root body.msp-product.msp-publications .first-steps-heading{gap:12px;align-items:flex-start;min-width:0}
html:root body.msp-product.msp-publications .first-steps-title{font-size:20px!important;line-height:1.4!important;margin:0!important}
html:root body.msp-product.msp-publications .first-steps-subtitle{margin:8px 0 0!important;font-size:14px!important;line-height:1.55!important;max-width:620px}
html:root body.msp-product.msp-publications .first-steps-head-actions{display:flex;gap:12px;align-items:flex-start;min-width:0}
html:root body.msp-product.msp-publications .first-steps-progress{width:auto!important;flex:1;min-width:0!important;padding-top:2px}
html:root body.msp-product.msp-publications .first-steps-progress-label{font-size:13px!important;line-height:1.5!important}
html:root body.msp-product.msp-publications .first-steps-toggle{min-height:36px;padding:6px!important;line-height:1.5!important;font-size:13px!important}
html:root body.msp-product.msp-publications .first-steps-body{margin-top:18px!important}
html:root body.msp-product.msp-publications .first-steps-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px!important;align-items:start!important}
html:root body.msp-product.msp-publications .first-step-card{display:grid!important;grid-template-columns:30px minmax(0,1fr);gap:10px 12px!important;align-content:start;padding:14px!important}
html:root body.msp-product.msp-publications .first-step-number{grid-column:1;grid-row:1/3;margin:0!important}
html:root body.msp-product.msp-publications .first-step-card>:not(.first-step-number){grid-column:2;min-width:0;margin-top:0!important}
html:root body.msp-product.msp-publications .first-step-title{font-size:15px!important;line-height:1.45!important}
html:root body.msp-product.msp-publications .first-step-status{width:fit-content;max-width:100%;white-space:normal;line-height:1.4!important}
html:root body.msp-product.msp-publications .first-step-detail:empty{display:none}
html:root body.msp-product.msp-publications .first-step-actions{padding-top:4px!important;margin-top:0!important}
html:root body.msp-product.msp-publications .first-steps-info{margin-top:16px!important;padding:12px!important;gap:10px;line-height:1.55!important}
html:root body.msp-product.msp-publications .data-table{width:100%!important;min-width:1180px!important;table-layout:fixed}
html:root body.msp-product.msp-publications .data-table :is(th,td){height:auto!important;padding:10px!important;vertical-align:middle;line-height:1.45!important}
html:root body.msp-product.msp-publications .data-table th{font-size:13px!important}
html:root body.msp-product.msp-publications .data-table td{font-size:14px!important}
html:root body.msp-product.msp-publications .data-table td:nth-child(n+2):nth-child(-n+8){text-align:right!important;font-variant-numeric:tabular-nums}
html:root body.msp-product.msp-publications .data-table :is(th,td):first-child{text-align:left!important}
html:root body.msp-product.msp-publications .data-table td:last-child{text-align:center!important}
@media(max-width:1300px){html:root body.msp-product.msp-publications .first-steps-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1000px){html:root body.msp-product.msp-publications .toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:820px){
 html:root body.msp-product.msp-publications .first-steps-head{grid-template-columns:minmax(0,1fr);gap:16px!important}
 html:root body.msp-product.msp-publications .first-steps-head-actions{width:100%;justify-content:space-between}
 html:root body.msp-product.msp-publications .first-steps-module{padding:14px!important}
}
@media(max-width:580px){
 html:root body.msp-product.msp-publications .toolbar{grid-template-columns:minmax(0,1fr)!important;padding:12px!important;gap:10px!important}
 html:root body.msp-product.msp-publications .toolbar .excel{justify-content:stretch}
 html:root body.msp-product.msp-publications .toolbar .excel button{flex:1 1 150px}
 html:root body.msp-product.msp-publications .first-steps-grid{grid-template-columns:minmax(0,1fr)}
 html:root body.msp-product.msp-publications .first-steps-title{font-size:19px!important}
 html:root body.msp-product.msp-publications .toolbar .filter-control select{font-size:16px!important}
}
html:root body.msp-product .main :is(.page-head,.head){padding-bottom:12px!important;margin-bottom:18px!important;gap:16px}
html:root body.msp-product .main :is(.page-head h1,.head h1){font-size:28px!important;line-height:1.25!important;margin:4px 0 8px!important}
html:root body.msp-product .main :is(.page-head p,.head p){font-size:15px!important;line-height:1.5!important}
html:root body.msp-product .main :is(.section-head h2,.panel-head h2){font-size:20px!important;line-height:1.35!important}
html:root body.msp-product .main :is(.section-head,.panel-head){padding-bottom:12px!important;margin-bottom:12px;gap:12px}
html:root body.msp-product .main .first-step-card{min-height:0!important;height:auto!important;padding:14px!important}
html:root body.msp-product .main :is(.first-steps-grid,.first-step-grid){align-items:start!important}
html:root body.msp-product .main .first-step-title{font-size:15px!important;line-height:1.4!important}
html:root body.msp-product .main :is(.first-step-helper,.first-step-detail){font-size:14px!important;line-height:1.5!important}
html:root body.msp-product .main .kpis{align-items:start;gap:12px}
html:root body.msp-product .main .kpis .kpi{min-height:0!important;height:auto!important;padding:14px!important}
html:root body.msp-product .main .kpis .kpi-label{font-size:14px!important;line-height:1.4!important}
html:root body.msp-product .main .kpis .kpi-note{font-size:13px!important;line-height:1.45!important}
html:root body.msp-product .main .kpis .kpi-value{font-size:26px!important;line-height:1.15!important}
html:root body.msp-product .main .kpis .kpi-footer{min-height:0!important;margin-top:8px!important}
html:root body.msp-product .main .kpis .kpi-action{font-size:13px!important;line-height:1.4!important;min-height:32px!important}
html:root body.msp-product .main :is(.workspace-grid,.compare-grid){align-items:start}
html:root body.msp-product .main .compare-card{min-height:0;height:auto;padding:14px}
html:root body.msp-product .main .compare-value{font-size:24px;line-height:1.25;font-variant-numeric:tabular-nums}
html:root body.msp-product .main :is(.compare-title,.compare-profit){font-size:14px;line-height:1.45}
html:root body.msp-product.msp-financial #pnlReport .dashboard-grid .pnl-row{font-size:14px!important;line-height:1.45!important;padding:10px 12px!important}
html:root body.msp-product.msp-financial #pnlReport .dashboard-grid .pnl-row strong{font-size:14px!important;line-height:1.45!important;font-weight:600!important}
html:root body.msp-product.msp-financial #pnlReport .dashboard-grid .pnl-row :is(.share,.action-link){font-size:12px!important;line-height:1.4!important}
html:root body.msp-product.msp-financial #pnlReport .dashboard-grid .pnl-row:is(.result,.grand-result) strong{font-size:17px!important}
html:root body.msp-product.msp-financial .summary .kpi{min-height:0!important;height:auto!important;padding:12px!important}
html:root body.msp-product.msp-financial #pnlReport .summary :is(.kpi-label,.kpi-label-text){font-size:13px!important;line-height:1.4!important;min-height:0!important}
html:root body.msp-product.msp-financial .summary .kpi-value{font-size:clamp(21px,1.8vw,27px)!important;line-height:1.2!important;margin-top:8px!important}
html:root body.msp-product.msp-financial .summary .kpi-change{font-size:12px!important;line-height:1.4!important}
@media(max-width:820px){
 html:root body.msp-product .main :is(.page-head h1,.head h1){font-size:26px!important}
 html:root body.msp-product .main .first-step-card{padding:12px!important}
}
@media(max-width:580px){
 html:root body.msp-product .main .compare-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 html:root body.msp-product .main .compare-card.variation{grid-column:1/-1}
 html:root body.msp-product.msp-financial .summary .kpi-value{font-size:20px!important;white-space:normal!important;overflow-wrap:normal}
 html:root body.msp-product.msp-financial #pnlReport .dashboard-grid .pnl-row{padding:9px 8px!important;font-size:13px!important}
 html:root body.msp-product.msp-financial #pnlReport .dashboard-grid .pnl-row strong{font-size:13px!important}
}

/* Compact filter widths on desktop; fill the grid on smaller screens. */
html:root body.msp-product.msp-publications .toolbar{display:flex!important;flex-wrap:wrap;align-items:center!important;gap:10px!important}
html:root body.msp-product.msp-publications .toolbar .filter-control{width:var(--filter-width,180px)!important;flex:0 0 var(--filter-width,180px)!important}
html:root body.msp-product.msp-publications .toolbar .filter-control:has(#statusFilter){--filter-width:160px}
html:root body.msp-product.msp-publications .toolbar .filter-control:has(#sortFilter){--filter-width:180px}
html:root body.msp-product.msp-publications .toolbar .category-picker{width:205px!important;flex:0 0 205px}
html:root body.msp-product.msp-publications .toolbar .excel{grid-column:auto!important;flex:0 1 auto;margin-left:auto!important}
@media(max-width:1000px){
 html:root body.msp-product.msp-publications .toolbar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
 html:root body.msp-product.msp-publications .toolbar .filter-control{width:100%!important;flex:none!important}
 html:root body.msp-product.msp-publications .toolbar .category-picker{width:100%!important;flex:none}
 html:root body.msp-product.msp-publications .toolbar .excel{grid-column:1/-1!important;margin-left:0!important}
}
@media(max-width:580px){html:root body.msp-product.msp-publications .toolbar{grid-template-columns:minmax(0,1fr)!important}}
html:root body.msp-product .sim-start-guide{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:14px 0;padding:14px;border:1px solid var(--msp-line);border-radius:8px;background:var(--msp-soft);font-size:14px;line-height:1.5}
html:root body.msp-product .sim-start-guide button{min-height:44px;padding:10px 14px;font-size:14px}
html:root body.msp-product .main:has(#selectedProduct.open) .sim-start-guide{display:none}

/* One border around the currency prefix and price input. */
html:root body.msp-product.msp-simulator .main .price-input{display:flex;align-items:center;gap:8px;width:100%;min-width:0;height:48px!important;min-height:48px!important;padding:0 12px!important;border:1px solid var(--msp-line)!important;border-radius:8px!important;background:var(--msp-card)!important;box-sizing:border-box;overflow:hidden}
html:root body.msp-product.msp-simulator .main .price-input>span{flex:0 0 auto;font-size:16px!important;line-height:1.5}
html:root body.msp-product.msp-simulator .main .price-input input#newPrice{display:block;flex:1 1 0;width:0!important;min-width:0!important;max-width:100%;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;font-size:16px!important;line-height:1.5!important;box-sizing:border-box}
html:root body.msp-product.msp-simulator .main .price-input:focus-within{border-color:var(--msp-ink)!important;outline:2px solid var(--msp-link);outline-offset:2px}
html:root body.msp-product.msp-publications .main .data-table :is(th,td):nth-child(n+2){text-align:center!important}
html:root body.msp-product.msp-publications .main .data-table .column-heading{justify-content:center!important;text-align:center!important;gap:6px}
html:root body.msp-product.msp-publications .main .data-table .column-heading-text{text-align:center!important}
html:root body.msp-product.msp-publications .toolbar .filter-control:has(#statusFilter){--filter-width:180px}
html:root body.msp-product.msp-publications .toolbar .cost-filter-control{--filter-width:205px}
html:root body.msp-product.msp-publications .toolbar .filter-control:has(#sortFilter){--filter-width:190px}

/* Native select arrows also reserve space: remove redundant decorative icons. */
html:root body.msp-product.msp-publications .toolbar .filter-control>svg{display:none!important}
html:root body.msp-product.msp-publications .toolbar :is(#statusFilter,#costFilter,#sortFilter){padding:0 28px 0 12px!important;font:500 14px/normal var(--msp-font)!important;text-indent:0!important;letter-spacing:normal!important}
@media(max-width:580px){html:root body.msp-product.msp-publications .toolbar :is(#statusFilter,#costFilter,#sortFilter){font-size:16px!important}}

/* Decorative radio indicators inside selectable scenario buttons do not intercept clicks. */
html:root body.msp-product.msp-simulator .scenario-choice input[aria-hidden=true]{pointer-events:none}

/* Date icons use SVG; comparison context participates in normal grid flow. */
html:root body.msp-product.msp-financial #filters #periodPicker>summary{display:grid!important;grid-template-columns:18px minmax(0,1fr) 18px;align-items:center!important;gap:10px!important;min-height:44px!important;height:auto!important;padding:10px 12px!important;font-size:14px!important;line-height:1.4!important}
html:root body.msp-product.msp-financial #filters #periodLabel{min-width:0;width:auto!important;height:auto!important;white-space:normal!important;font-size:14px!important;line-height:1.4!important;letter-spacing:normal;background:none!important}
html:root body.msp-product.msp-financial #periodPicker>summary>svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
html:root body.msp-product.msp-financial #periodPicker>summary .period-chevron{transition:transform .15s ease}
html:root body.msp-product.msp-financial #periodPicker[open]>summary .period-chevron{transform:rotate(180deg)}
html:root body.msp-product.msp-financial #pnlReport .summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;padding:16px!important;align-items:start;min-width:0}
html:root body.msp-product.msp-financial #pnlReport .summary::before{position:static!important;grid-column:1/-1;grid-row:1;display:block;content:'Resultados del período';padding-right:52px;color:var(--msp-ink)!important;font:600 15px/1.4 var(--msp-font)!important;letter-spacing:0!important}
html:root body.msp-product.msp-financial #pnlReport .summary::after{top:16px!important;right:16px!important;color:var(--msp-muted)!important;font:500 13px/1.5 var(--msp-font)!important;letter-spacing:0!important}
html:root body.msp-product.msp-financial #pnlReport .summary .comparison-caption{position:static!important;grid-column:1/-1;grid-row:2;margin:0!important;padding:0!important;color:var(--msp-muted)!important;font-size:13px!important;line-height:1.5!important;letter-spacing:0!important;white-space:normal!important;min-width:0}
html:root body.msp-product.msp-financial #pnlReport .summary .kpi{display:flex;flex-direction:column;gap:8px;min-width:0;min-height:0!important;padding:12px!important;margin:0!important}
html:root body.msp-product.msp-financial #pnlReport .summary .kpi-label{width:100%;min-height:0!important;line-height:1.45!important}
html:root body.msp-product.msp-financial #pnlReport .summary .kpi-value{margin:0!important;font-size:24px!important;line-height:1.3!important;white-space:normal!important}
html:root body.msp-product.msp-financial #pnlReport .summary .kpi-change{margin:0!important;font-size:13px!important;line-height:1.5!important;white-space:normal!important}
@media(max-width:1000px){html:root body.msp-product.msp-financial #pnlReport .summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:580px){html:root body.msp-product.msp-financial #pnlReport .summary{grid-template-columns:minmax(0,1fr)!important;padding:14px!important}html:root body.msp-product.msp-financial #pnlReport .summary .kpi{padding:10px!important}}


html:root body.msp-product.msp-publications .main .first-step-title{min-height:0!important}

/* Complete native drawer parity with the approved review layout. */
html:root body.msp-product.msp-publications #drawerBody :is(#costCurrentNote,#costActionNotice):empty{display:none}
html:root body.msp-product.msp-publications #drawerBody .finance-margin{justify-content:center!important;text-align:center}
html:root body.msp-product.msp-publications #drawerBody .finance-plan{flex-wrap:wrap;row-gap:6px}
html:root body.msp-product.msp-publications #drawerBody .finance-plan-name{flex:1 0 100%}
html:root body.msp-product.msp-publications #drawerBody .finance-choice{justify-content:center;margin-inline:auto}
@media(min-width:821px){html:root body.msp-product.msp-publications .drawer.finance-drawer{width:min(760px,94vw)!important;max-width:94vw}}

/* Readable financing choices and confirmation, following production review. */
html:root body.msp-product.msp-publications #drawerBody .finance-plan-name{font-weight:400!important}
html:root body.msp-product.msp-publications #drawerBody .finance-note{font-size:14px!important;line-height:1.55!important;padding:12px!important}
html:root body.msp-product.msp-publications #drawerBody .confirm-card{padding:18px!important;border-color:var(--msp-line)!important;color:var(--msp-ink)!important}
html:root body.msp-product.msp-publications #drawerBody .confirm-title{font-size:20px!important;line-height:1.4!important;font-weight:600!important;color:var(--msp-ink)!important}
html:root body.msp-product.msp-publications #drawerBody .confirm-copy{font-size:15px!important;line-height:1.55!important;color:var(--msp-muted)!important;margin:10px 0 16px!important}
html:root body.msp-product.msp-publications #drawerBody .confirm-side{min-width:0;padding:14px!important;display:flex;flex-direction:column;gap:10px}
html:root body.msp-product.msp-publications #drawerBody .confirm-side label{font-size:13px!important;line-height:1.5!important;font-weight:500!important;text-transform:none!important;letter-spacing:0!important;color:var(--msp-muted)!important}
html:root body.msp-product.msp-publications #drawerBody .confirm-side strong{font-size:16px!important;line-height:1.5!important;font-weight:400!important;color:var(--msp-ink)!important;white-space:normal;overflow-wrap:anywhere}
html:root body.msp-product.msp-publications #drawerBody .confirm-side span{font-size:15px!important;line-height:1.5!important;color:var(--msp-ink)!important}
html:root body.msp-product.msp-publications .copy-mla{display:flex;align-items:center;gap:6px;max-width:100%;min-height:30px;margin-top:3px;padding:2px 0;border:0;background:transparent;color:var(--msp-muted);font:400 12px/1.5 var(--msp-font);cursor:copy;text-align:left;user-select:text}
html:root body.msp-product.msp-publications .copy-mla span{user-select:all;overflow-wrap:anywhere}
html:root body.msp-product.msp-publications .copy-mla svg{width:14px;height:14px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6}
html:root body.msp-product.msp-publications .copy-mla:focus-visible{outline:2px solid var(--msp-link);outline-offset:3px}
html:root body.msp-product.msp-simulator .result-row{grid-template-columns:42px minmax(0,1fr) auto auto!important}
html:root body.msp-product.msp-simulator .selected-product .metric{min-width:0}
html:root body.msp-product.msp-simulator .selected-product .metric>span{white-space:normal;line-height:1.45!important}
@media(max-width:580px){
 html:root body.msp-product.msp-publications #drawerBody .confirm-grid{grid-template-columns:minmax(0,1fr)!important}
 html:root body.msp-product.msp-publications .copy-mla{min-height:44px}
 html:root body.msp-product.msp-simulator .result-row{grid-template-columns:38px minmax(0,1fr) auto!important}
 html:root body.msp-product.msp-simulator .result-margin{grid-column:2/-1;justify-self:start}
}
