/* Histórico — complemento da identidade original, independente do explorador. */
.history-bg{background:#eff4f2;border-top:1px solid #e2ebe6;border-bottom:1px solid #e2ebe6}
.history-heading .section-kicker{color:#a96c4d}.history-heading p{max-width:770px}
.history-intro{display:grid;grid-template-columns:1fr 1fr 1fr 2.3fr;gap:0;align-items:center;background:#17363d;border-radius:17px;padding:22px 26px;margin-bottom:22px;color:#edf5f1}
.history-intro>div{display:flex;gap:11px;align-items:center;border-right:1px solid #3b5a5e;padding:0 18px}.history-intro>div:first-child{padding-left:0}
.history-intro strong{font-family:Manrope,sans-serif;font-size:36px;letter-spacing:-.07em;color:#bde1cc}.history-intro span{font-size:10px;line-height:1.5;color:#c2d4d2;font-weight:700}
.history-intro p{font-size:11px;line-height:1.7;color:#b4c9c8;margin:0;padding-left:24px}
.history-mode-panel{display:flex;align-items:end;flex-wrap:wrap;gap:16px;padding:19px 20px;margin-bottom:12px}
.history-mode-head{display:flex;flex-direction:column;gap:5px;min-width:165px}.history-mode-head strong{color:#203d43;font-size:13px}
.history-mode-options{display:flex;gap:4px;flex:1;min-width:340px;border-radius:10px;background:#ecf2ef;padding:4px}
.history-mode-btn{flex:1;background:transparent;color:#648187;border:0;border-radius:8px;padding:11px 10px;white-space:nowrap;font-size:11px;font-weight:800;cursor:pointer}
.history-mode-btn.active{background:#fff;box-shadow:0 3px 9px rgba(20,61,64,.09);color:#17646a}
.history-cutoff-field{width:165px}.history-cutoff-field select{height:39px}.history-cutoff-field select:disabled{opacity:.65;cursor:not-allowed}
.history-mode-note{padding:0 2px;margin:0 0 14px;color:#627e81;font-size:11px;line-height:1.65}
.history-mode-note strong{color:#266d72}.history-mode-note.warning{background:#faf1e8;border:1px solid #e8cfb8;border-radius:10px;padding:12px 15px;color:#875e45}
.history-partial{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:20px;border-radius:13px;background:#fff5ea;border:1px solid #edcfb3;padding:19px 23px;margin-bottom:19px}
.history-partial[hidden]{display:none}.history-partial-main{flex:1;min-width:210px}.history-partial-main .panel-eyebrow{color:#ab754e}
.history-partial-main h3{font-size:20px;line-height:1.3;letter-spacing:-.035em;margin:8px 0}.history-partial-main p{font-size:11px;line-height:1.6;color:#956e51;margin:0;max-width:570px}
.history-partial-values{display:flex;gap:20px;align-items:center;flex-wrap:wrap}.history-partial-values>div{display:flex;flex-direction:column;gap:4px}.history-partial-values small{font-size:9px;font-weight:800;color:#a68565;text-transform:uppercase;letter-spacing:.04em}.history-partial-values strong{font-size:20px;font-weight:800;color:#744d32;font-family:Manrope,sans-serif}
.history-partial button{border:1px solid #c69c7e;color:#8d5d3c;background:white;padding:10px 13px;border-radius:8px;font-size:11px;font-weight:800;cursor:pointer}
.history-partial-unavailable{background:#eff3f2;border-color:#d7e3df}.history-partial-unavailable .history-partial-main p{color:#678384}.history-partial-unavailable .history-partial-main h3{color:#2b5559}
.history-controls{display:grid;grid-template-columns:minmax(250px,2fr) minmax(130px,.7fr) minmax(170px,1fr) 145px;gap:14px;padding:20px;margin-bottom:12px;align-items:end}
.history-controls select:disabled{opacity:.7;cursor:not-allowed;background:#f6f8f7}
.history-toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:14px 20px;flex-wrap:wrap}
.history-pills{display:inline-flex;gap:4px;padding:4px;border-radius:9px;background:#edf2f1}
.history-pill{border:0;border-radius:7px;background:none;padding:10px 15px;font-size:11px;font-weight:800;color:#688087}.history-pill.active{background:#fff;color:#176067;box-shadow:0 2px 7px rgba(20,62,66,.09)}
.history-compare-field{min-width:240px;flex:1;max-width:335px}.history-compare-field select{height:37px}.history-toolbar .btn{white-space:nowrap}
.history-title-band{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:31px 0 16px}
.history-title-band h3{font-size:clamp(21px,2.4vw,27px);letter-spacing:-.04em;margin:5px 0}.history-title-band p{font-size:12px;color:#7b9194;margin:0}
.history-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.history-kpi{border:1px solid #dfe8e4;border-radius:13px;padding:20px;background:#fff;display:flex;flex-direction:column;min-height:149px;box-shadow:var(--shadow)}
.history-kpi:before{content:"";display:block;width:24px;height:3px;background:#91bcb5;border-radius:4px;margin-bottom:14px}
.history-kpi.tone-warn:before,.history-kpi.tone-up:before{background:#d38d6c}.history-kpi.tone-good:before,.history-kpi.tone-down:before{background:#55a28b}
.history-kpi>span{color:#748991;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.history-kpi>strong{font-family:Manrope;font-size:clamp(19px,2vw,29px);font-weight:800;letter-spacing:-.045em;margin:11px 0 7px;line-height:1.25;font-variant-numeric:tabular-nums}
.history-kpi small{font-size:10px;color:#94a5a6;line-height:1.5;margin-top:auto}
.history-chart-panel,.history-table-panel,.history-matrix-panel{padding:25px;min-width:0}.history-chart-panel .panel-top{align-items:center;margin-bottom:16px}
.history-chart-legend{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.history-chart-legend>span{font-size:10px;color:#5e7b7c;display:flex;gap:6px;align-items:center;font-weight:700}
.history-legend-dot{display:inline-block;width:20px;height:4px;border-radius:4px}.history-legend-dot.primary{background:#226b72}.history-legend-dot.secondary{background:#c99572}
.history-chart-scroll{overflow-x:auto}.history-chart-scroll svg{display:block;width:100%;min-width:650px;height:auto;max-height:400px}
.history-chart-foot{margin:5px 0 0;padding:12px 0 0;border-top:1px solid #edf2ef;color:#96a6aa;font-size:10px;line-height:1.6}
.history-below-grid{display:grid;grid-template-columns:minmax(260px,.84fr) minmax(0,1.16fr);gap:18px;margin-top:18px}
.history-reading-panel{padding:27px;background:#1b3e45;color:#e5f1ec;border-color:#1b3e45}.history-reading-panel .panel-eyebrow{color:#a7d4c4}
.history-reading-panel h3{font-size:23px;letter-spacing:-.04em;margin:17px 0 12px;line-height:1.35}
.history-reading-panel h3.history-status-up{color:#ffc19a}.history-reading-panel h3.history-status-down{color:#b5ead3}
.history-reading-panel>p{font-size:12px;color:#c0d4d2;line-height:1.8}.history-reading-panel>p:last-child{font-size:11px;color:#9cbab9;margin-bottom:0}.history-reading-panel>p strong{color:#eff7f4}
.history-rule{height:1px;background:#426168;margin:22px 0}
.history-table-panel .history-data-table{min-width:480px}.history-source-year{display:block;color:#a1b1b4;font-size:9px;margin-top:3px}.history-table-panel .coverage-warning{color:#b57550;font-weight:700}
.history-matrix-panel{margin-top:19px}.history-matrix-panel .panel-top{align-items:end}.history-matrix-panel .panel-top h3{font-size:20px;margin:8px 0 4px}.history-matrix-panel .panel-top p{max-width:660px}
.history-theme-field{width:200px;flex-shrink:0}.history-matrix-table{min-width:800px}.history-matrix-table tr{cursor:pointer}.history-matrix-table tr.is-current{background:#eff7f3}
.history-matrix-table td:first-child strong{font-size:11px;display:block}.history-matrix-table td:first-child small{display:block;font-size:10px;color:#96a8aa;margin-top:3px}.history-matrix-table .history-coverage{font-size:10px;color:#83989c}
.history-trend-pill{display:inline-block;font-size:10px;font-weight:800;padding:7px 10px;border-radius:30px;white-space:nowrap;background:#eef3f2;color:#71848a}
.history-trend-pill.up{background:#fae8e0;color:#b56345}.history-trend-pill.down{background:#e1f1e9;color:#246f5e}.history-trend-pill.flat{background:#e7eeed;color:#466f70}
.history-trend-pill.mixed,.history-trend-pill.small{background:#f3eedf;color:#947949}.history-trend-pill.partial,.history-trend-pill.short{background:#edf0f1;color:#778b91}
.history-source-note{margin-top:19px;font-size:11px;line-height:1.8;color:#6f8589;background:#e4edeb;padding:19px 22px;border-radius:12px}.history-source-note a{font-weight:800;color:#2b7771;text-decoration:underline;text-underline-offset:2px}
@media(max-width:1100px){
  .history-controls{grid-template-columns:minmax(180px,1.3fr) 1fr 1fr}.history-controls .wide{grid-column:span 3}
  .history-intro{grid-template-columns:1fr 1fr 1fr}.history-intro p{grid-column:span 3;border-top:1px solid #3b5a5e;margin-top:17px;padding:15px 0 0}.history-intro>div:nth-child(3){border-right:0}
}
@media(max-width:760px){
  .history-mode-panel{align-items:stretch;gap:12px}.history-mode-head{width:100%}.history-mode-options{min-width:0;width:100%;flex-basis:100%}.history-cutoff-field{width:100%}
  .history-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.history-controls .wide{grid-column:span 2}
  .history-compare-field{max-width:unset;flex:1}.history-toolbar .btn{width:100%}
  .history-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.history-below-grid{grid-template-columns:1fr}
  .history-chart-panel{padding:17px}.history-chart-legend{gap:7px}.history-matrix-panel .panel-top{display:block}.history-theme-field{margin-top:16px;width:100%}
}
@media(max-width:490px){
  .history-mode-panel{padding:14px}.history-mode-btn{font-size:10px;padding:11px 6px;white-space:normal;line-height:1.3}
  .history-partial{padding:16px}.history-partial-values{width:100%;justify-content:space-between}
  .history-intro{padding:17px 14px}.history-intro>div{padding:0 7px;display:block}.history-intro strong{font-size:30px;display:block}.history-intro span{font-size:9px}
  .history-controls,.history-toolbar{padding:14px;gap:10px}.history-pills{width:100%}.history-pill{flex:1;padding:9px 7px}
  .history-compare-field{min-width:0;width:100%}.history-title-band{align-items:start}.history-title-band .muted-tag{flex-shrink:0}
  .history-kpi{padding:16px 13px;min-height:145px}.history-kpi>strong{font-size:20px}.history-matrix-panel,.history-table-panel{padding:17px}
  .history-reading-panel{padding:22px}.history-chart-scroll svg{min-width:600px}
}
/* Correção estimada (tag de ativação) */
.history-corr-toggle{display:inline-flex;align-items:center;gap:8px;border:1px dashed #e0a36c;background:#fffaf5;color:#9a5a2c;border-radius:10px;padding:10px 14px;font-size:11.5px;font-weight:800;cursor:pointer}
.history-corr-toggle i{width:30px;height:16px;border-radius:999px;background:#e7ddd3;position:relative;flex:none;transition:background .15s}
.history-corr-toggle i::after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;transition:left .15s}
.history-corr-toggle.active{border-style:solid;border-color:#e07a1f;background:#fff1e3}
.history-corr-toggle.active i{background:#e07a1f}
.history-corr-toggle.active i::after{left:16px}
.history-corr-toggle[hidden]{display:none!important}
.history-legend-dot.corrected{background:repeating-linear-gradient(90deg,#e07a1f 0 3px,transparent 3px 7px)}
.history-corr-note{margin:17px 0 0;padding:20px 22px}
.history-corr-note[hidden]{display:none!important}
.history-corr-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.history-corr-head h3{font-size:16px;font-weight:800;margin:0}
.history-corr-params{margin:2px 0 10px}
.history-corr-action{border:1px solid #e07a1f;background:#e07a1f;color:#fff;border-radius:9px;padding:9px 14px;font-size:12px;font-weight:800;cursor:pointer;margin:2px 0 10px}
.history-corr-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px;padding-top:12px;border-top:1px solid #f0e6dc}
.history-corr-summary div{background:#fff;border:1px solid #e8eeee;border-radius:10px;padding:10px 12px}
.history-corr-summary div.is-est{border-color:#f1cfb4;background:#fff7ef}
.history-corr-summary small{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:#7a8b91}
.history-corr-summary strong{font-size:18px;color:#1d3a43}
.history-corr-summary div.is-est strong{color:#9a5a2c}
.history-corr-summary p{grid-column:1/-1;margin:0;font-size:10.5px;color:#8a9aa1}
.history-corr-tag{display:inline-block;margin-left:6px;font-size:9px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;padding:2px 6px;border-radius:999px;background:#fde7d6;color:#9a5a2c;vertical-align:middle}
@media (max-width:700px){.history-corr-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
