/* Ficha, parte 3. Complementos locais; cor e tipografia vêm dos tokens do DS. */
.fx-cost-stack{display:flex;flex-direction:column;gap:var(--space-6);min-width:0}
.fx-history{min-width:0;scroll-margin-top:190px;color:var(--ink);background:var(--paper)}
.fx-history>.ry-acc__body{gap:var(--space-3)}
.fx-history__controls{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin-top:var(--space-2)}
.fx-history__controls>span,.fx-history__basis,.fx-history__note{font:400 13px/1.5 var(--font-sans);color:var(--muted)}
.fx-history__controls .ry-seg{background:var(--surface)}
.fx-history__controls button{min-height:var(--control-md)}
.fx-history__read{display:flex;flex-direction:column;gap:2px;min-height:68px;padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);background:var(--surface);font-size:13px;line-height:1.4;color:var(--muted)}
.fx-history__read b{font:600 18px/1.3 var(--font-sans);color:var(--ink)}
.fx-chart{display:block;width:100%;height:auto;overflow:visible;font:400 12px var(--font-sans);font-variant-numeric:tabular-nums}
.fx-chart [data-histpoint]{cursor:crosshair;outline:none}
.fx-chart [data-histpoint]:focus-visible .fx-chart__dot,.fx-chart [data-histpoint].is-active .fx-chart__dot{r:6px}
.fx-chart [data-histpoint]:focus-visible .fx-chart__dot{outline:2px solid var(--focus);outline-offset:3px;border-radius:50%}
.fx-history__facts{display:flex;flex-direction:column;gap:var(--space-1);font-size:14px;line-height:1.5}
.fx-history__facts>p:first-child{font-weight:600}
.fx-history__comparison{font-weight:500}
.fx-history__table{font-size:14px}
.fx-history__table>summary{display:flex;align-items:center;min-height:var(--control-md);cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.fx-history__table caption{text-align:left;font-size:13px;color:var(--muted);padding-bottom:var(--space-3)}
.fx-history__table table{margin:var(--space-2) 0}
.fx-history__table th small{max-width:26ch}
.fx-history__table td{font-family:var(--font-sans)}
.fx-historyline{padding-bottom:var(--space-1)}
.fx-benefit{max-width:100%;height:auto;min-height:24px;white-space:normal;line-height:1.45;padding:6px 10px;letter-spacing:.02em}
.fx-benefitnote{color:var(--muted)}
.fx-benefits{display:flex;flex-direction:column;gap:var(--space-2);margin-top:var(--space-8);padding-top:var(--space-5);border-top:1px solid var(--line);font-size:15px;line-height:1.5}
.fx-benefits h3{font:500 20px/1.3 var(--font-sans);margin-bottom:var(--space-1)}
.fx-benefits>p>b{font-weight:500}
.fx-benefits .ry-tag{white-space:normal;height:auto;min-height:24px;padding-top:6px;padding-bottom:6px;line-height:1.4}
.fx-assist__scope{font-weight:500}
.fx-assist__uf{display:flex;align-items:center;gap:var(--space-3);font-size:14px}
.fx-assist__uf select{min-width:100px}
.fx-assist__city{margin-top:var(--space-5)}
.fx-assist__city:first-child{margin-top:0}
.fx-assist__city h4{font:500 18px/1.3 var(--font-sans);margin-bottom:var(--space-3)}
.fx-assist__city .ry-doclist{margin:0;padding:0}
.fx-assist__city .ry-doclist__row{align-items:flex-start}
.fx-assist__city .ry-link{margin-top:var(--space-1)}
.fx-assist__near{margin-bottom:var(--space-4)}
@media(min-width:768px){.ry-sheet--modal.fx-sheet{width:min(720px,calc(100% - 64px))}}
@media(max-width:767px){
  /* Os impostos continuam na folha existente; só o histórico novo tem sanfona também na página. */
  #custo.pdsec:has([data-hist]){display:block}
  #custo:has([data-hist])>h2,#custo:has([data-hist]) [data-costs],#custo:has([data-hist]) [data-conds]{display:none}
  #custo:has([data-hist]) .pdsec__two{gap:0}
  .fx-cost-stack{gap:0}
  .fx-history{scroll-margin-top:var(--nav-mobile)}
  .fx-history__controls{gap:var(--space-2)}
  .fx-history__controls>span{flex-basis:100%}
  .fx-history__table .ry-costs__table th{padding-right:var(--space-2)}
}
@media(forced-colors:active){.fx-chart .fx-chart__dot{fill:CanvasText;stroke:Canvas}.fx-chart polyline{stroke:CanvasText}}
