@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("./assets/nunito-sans-latin.woff2") format("woff2");
}

:root {
  --blue: #00549C;
  --green: #009536;
  --yellow: #E3CD00;
  --graphite: #333333;
  --gray-dark: #4C4C4C;
  --white: #FFFFFF;
  --navy: #003665;
  --line: #C5DDEE;
  --pale-blue: #EAF4FC;
  --pale-green: #E7F6ED;
  --pale-yellow: #FFF9D8;
}

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 0.956937799vw;
  background: var(--blue);
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--graphite);
  background: var(--blue);
  font-family: "Nunito Sans", Arial, sans-serif;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, p, dl, dd, figure, ul { margin: 0; }
ul { padding: 0; }
h1, h2, h3, strong, th { font-weight: 800; }
svg, img { display: block; }

.icon-definitions, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link { position: fixed; top: -100%; left: 1rem; z-index: 10; padding: .5rem .8rem; border-radius: .25rem; background: white; color: var(--navy); }
.skip-link:focus { top: .4rem; }
a:focus-visible { outline: .12rem solid var(--yellow); outline-offset: .12rem; }

.dashboard {
  width: 104.5rem;
  min-height: 53.55rem;
  margin: 0;
  background: var(--blue);
}

/* Cabeçalho: proporções e alinhamento da referência. */
.masthead {
  display: grid;
  grid-template-columns: 22fr 42fr 29.5fr 6.5fr;
  align-items: center;
  height: 3.92rem;
  padding: .15rem .65rem .15rem .55rem;
  color: var(--white);
  background: var(--blue);
  box-shadow: inset 0 -.12rem var(--yellow);
}
.municipal-brand { display: flex; align-items: center; min-width: 0; }
.official-crest { flex: 0 0 auto; width: 4.05rem; height: 3.16rem; margin-right: .45rem; object-fit: contain; }
.brand-copy { line-height: 1.04; }
.brand-copy > p:first-child { font-size: .52rem; letter-spacing: .07em; font-weight: 800; }
.brand-name { font-size: 1.08rem; line-height: 1.02; font-weight: 900; letter-spacing: -.035em; }
.brand-location { margin-top: .12rem; font-size: .48rem; letter-spacing: .13em; font-weight: 800; }
.masthead-title { text-align: center; }
.masthead-title h1 { font-size: 1.46rem; line-height: 1.05; font-weight: 900; letter-spacing: -.035em; }
.masthead-title p { margin-top: .26rem; font-size: .6rem; line-height: 1.1; font-weight: 800; }
.authorship { min-width: 0; padding-left: .65rem; box-shadow: -.06rem 0 rgba(255,255,255,.8); }
.authors-label { margin-bottom: .1rem; font-size: .48rem; line-height: 1.05; font-weight: 800; }
.authors-list { list-style: none; font-size: .67rem; line-height: 1.12; font-weight: 900; }
.teacher { min-width: 0; padding-left: .55rem; box-shadow: -.06rem 0 rgba(255,255,255,.65); }
.teacher-label { font-size: .43rem; font-weight: 800; line-height: 1.05; }
.teacher-name { margin-top: .16rem; font-size: .68rem; font-weight: 900; line-height: 1.08; white-space: nowrap; }

.dashboard-content {
  padding: .42rem .55rem .2rem;
}
.indicator-section { height: 3.82rem; }
.indicators {
  display: grid;
  grid-template-columns: .82fr .7fr .88fr 1fr 1.1fr 1.28fr;
  gap: .37rem;
  height: 100%;
}
.indicator {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: .28rem .45rem;
  border-radius: .52rem;
  background: var(--white);
}
.indicator-icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  margin-right: .45rem;
  border-radius: 50%;
  color: var(--blue);
  background: var(--pale-blue);
}
.indicator-icon.green { color: var(--green); background: var(--pale-green); }
.indicator-icon .icon { width: 1.72rem; height: 1.72rem; }
.state-abbreviation { font-size: 1.18rem; font-weight: 900; letter-spacing: -.04em; }
.indicator > div { min-width: 0; }
.indicator h2 { color: var(--navy); font-size: .58rem; line-height: 1.03; }
.indicator-value { color: var(--navy); font-size: 1.02rem; line-height: 1.03; font-weight: 900; letter-spacing: -.035em; }
.indicator-value.compact { font-size: .84rem; }
.indicator-value.budget { font-size: .79rem; white-space: nowrap; }
.indicator-value.transfers { font-size: .77rem; line-height: 1; }
.indicator-detail { margin-top: .12rem; color: var(--gray-dark); font-size: .55rem; line-height: 1.1; font-weight: 700; }

.workspace { margin-top: .38rem; }
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1.07fr 1.07fr;
  gap: .38rem;
  height: 25.82rem;
}
.practice-section { margin-top: .38rem; }
.practice-grid {
  display: grid;
  grid-template-columns: 1.1fr .94fr 1.66fr;
  gap: .38rem;
  height: 16.12rem;
}

.panel {
  min-width: 0;
  min-height: 0;
  padding: .34rem;
  border-radius: .52rem;
  background: var(--white);
  overflow: hidden;
}
.panel-heading, .example-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 2.72rem;
  padding: .22rem .4rem;
  border-radius: .28rem;
  background: var(--pale-blue);
}
.green-heading { background: var(--pale-green); }
.heading-icon { flex: 0 0 auto; width: 2rem; height: 2rem; margin-right: .48rem; color: var(--blue); }
.heading-icon.text-green { color: var(--green); }
.panel-heading h2 { color: var(--navy); font-size: 1.2rem; line-height: 1.02; font-weight: 900; letter-spacing: -.03em; }
.panel-heading p { margin-top: .08rem; color: var(--gray-dark); font-size: .58rem; line-height: 1.08; font-weight: 700; }

/* Arrecadação */
.revenue-panel { display: grid; grid-template-rows: 2.72rem minmax(0,1fr); gap: .28rem; }
.revenue-panel .panel-heading h2 { font-size: 1.08rem; }
.revenue-body { display: grid; grid-template-rows: minmax(0,1fr) 2.45rem; gap: .3rem; min-height: 0; }
.revenue-main { display: grid; grid-template-columns: 51% 49%; align-items: center; min-height: 0; }
.revenue-numbers { min-width: 0; padding: .35rem .45rem .3rem .05rem; box-shadow: .05rem 0 var(--line); }
.legend-row { display: flex; align-items: center; justify-content: space-between; min-height: 2.05rem; box-shadow: 0 .055rem var(--line); }
.legend-row dt { display: flex; align-items: center; color: var(--navy); font-size: .72rem; }
.legend-row dd { color: var(--blue); font-size: .7rem; line-height: 1; font-weight: 900; white-space: nowrap; letter-spacing: -.035em; }
.legend-dot { width: .92rem; height: .92rem; margin-right: .38rem; border-radius: 50%; }
.legend-dot.yellow { background: var(--yellow); } .legend-dot.blue { background: var(--blue); } .legend-dot.green { background: var(--green); }
.revenue-total { margin-top: .52rem; padding: .48rem .38rem; border-radius: .2rem; color: var(--white); background: #003D70; }
.revenue-total h3 { font-size: .62rem; line-height: 1; }
.revenue-total p { margin-top: .12rem; font-size: .93rem; line-height: 1; font-weight: 900; letter-spacing: -.045em; white-space: nowrap; }
.revenue-chart { min-width: 0; }
.donut-svg { width: 100%; height: 12.8rem; }
.donut-center { fill: var(--navy); font-weight: 800; }
.donut-amount { font-size: 20px; font-weight: 900; letter-spacing: -.8px; }
.donut-year { font-size: 12px; font-weight: 700; }
.donut-label { fill: var(--navy); font-size: 12px; font-weight: 700; letter-spacing: -.6px; }
.donut-percent { font-size: 15px; font-weight: 900; }
.donut-label path { stroke: var(--navy); stroke-width: 1; fill: none; }
.revenue-note { display: flex; align-items: center; padding: .35rem .45rem; border-radius: .25rem; background: var(--pale-blue); }
.note-icon { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 1.65rem; height: 1.65rem; margin-right: .45rem; border-radius: 50%; color: var(--white); background: var(--blue); }
.note-icon svg { width: 1.05rem; height: 1.05rem; }
.revenue-note p { font-size: .63rem; line-height: 1.16; }

/* IPTU e ISS — linhas na mesma organização da referência. */
.tax-panel { display: grid; grid-template-rows: 2.72rem minmax(0,1fr); gap: .25rem; }
.tax-rows { display: flex; flex-direction: column; min-height: 0; }
.tax-row { display: grid; grid-template-columns: 31.5% 68.5%; min-height: 1.96rem; box-shadow: inset 0 -.055rem var(--line); }
.tax-label { display: flex; align-items: center; padding: .2rem .34rem; color: var(--navy); background: var(--pale-blue); font-size: .61rem; line-height: 1.08; }
.iptu-panel .tax-label { background: var(--pale-green); }
.tax-label .number, .calc-label .number { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: .82rem; height: .82rem; margin-right: .3rem; border-radius: 50%; color: var(--white); background: var(--blue); font-size: .5rem; line-height: 1; font-weight: 900; }
.iptu-panel .tax-label .number, .iss-example .calc-label .number { color: var(--green); background: var(--white); box-shadow: inset 0 0 0 .06rem var(--green); }
.tax-value { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: .18rem .34rem; color: var(--graphite); background: var(--white); font-size: .62rem; line-height: 1.13; }
.tax-value small { display: block; margin-top: .1rem; font-size: .51rem; line-height: 1.12; }
.bullet-line { display: flex; flex-wrap: wrap; gap: .2rem .5rem; color: var(--navy); }
.bullet-line b::first-letter { color: var(--green); }
.times { margin: 0 .2rem; color: var(--green); font-size: .8rem; }
.tax-rates-row { min-height: 3.35rem; }
.rate-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; width: 100%; }
.rate-pairs > div { display: flex; align-items: center; justify-content: space-between; padding: .28rem .35rem; border-radius: .16rem; background: var(--pale-blue); }
.iptu-panel .rate-pairs > div { background: var(--pale-green); }
.rate-pairs span { color: var(--navy); font-size: .54rem; font-weight: 800; }
.rate-pairs strong { color: var(--navy); font-size: 1rem; line-height: 1; font-weight: 900; }
.discount-inline { flex-direction: row; align-items: center; justify-content: flex-start; gap: .35rem; }
.discount-inline strong { color: var(--navy); font-size: 1.05rem; line-height: 1; font-weight: 900; }
.tax-exempt-row { min-height: 3.2rem; }
.tax-exempt-row ul { padding-left: .8rem; }
.tax-exempt-row li { margin: .08rem 0; }
.revenue-row { min-height: 2.45rem; }
.money { color: var(--navy); font-size: .75rem; line-height: 1; font-weight: 900; }
.growth-row { min-height: 5.05rem; border: .06rem solid var(--blue); border-radius: .25rem; box-shadow: none; overflow: hidden; margin-top: .16rem; }
.iptu-panel .growth-row { border-color: var(--green); }
.growth-content { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; padding: 1.45rem .35rem .28rem; background: var(--white); }
.growth-badge { position: absolute; top: .18rem; right: .35rem; padding: .2rem .55rem; border-radius: .28rem; color: var(--navy); background: var(--pale-green); font-size: .86rem; line-height: 1; font-weight: 900; }
.year-mini { padding: .2rem .3rem; border-radius: .18rem; background: #F2F5F7; }
.year-mini.current { background: var(--pale-green); }
.year-mini span { display: block; color: var(--gray-dark); font-size: .5rem; line-height: 1; font-weight: 800; }
.year-mini strong { display: block; margin-top: .18rem; color: var(--navy); font-size: .67rem; line-height: 1; font-weight: 900; white-space: nowrap; }
.year-mini i { display: block; height: .22rem; margin-top: .38rem; background: var(--line); }
.year-mini i b { display: block; width: 100%; height: 100%; background: var(--blue); }
.year-mini.current i b { background: var(--green); }
.activities-row { min-height: 3.45rem; }
.service-tags { display: flex; flex-wrap: wrap; gap: .15rem .2rem; }
.service-tags span { padding: .12rem .24rem; color: var(--navy); background: var(--pale-blue); font-size: .51rem; line-height: 1.05; font-weight: 900; }
.importance-row { min-height: 2.4rem; margin-top: .12rem; border: .05rem solid var(--line); border-radius: .2rem; box-shadow: none; overflow: hidden; }

/* Cards inferiores */
.example { display: grid; grid-template-rows: 2.45rem minmax(0,1fr) 2.1rem; gap: .2rem; }
.example-heading { height: 2.45rem; padding: .16rem .35rem; }
.example-heading > svg { flex: 0 0 auto; width: 1.55rem; height: 1.55rem; margin-right: .42rem; color: var(--blue); }
.iss-example, .iss-example .example-heading, .result-area { background: var(--pale-green); }
.iss-example .example-heading > svg { color: var(--green); }
.iptu-example, .iptu-example .example-heading { background: var(--pale-yellow); }
.allocation-example, .allocation-example .example-heading { background: var(--pale-blue); }
.example-heading h2 { color: var(--navy); font-size: 1rem; line-height: 1; font-weight: 900; letter-spacing: -.025em; }
.example-heading p { margin-top: .1rem; color: var(--gray-dark); font-size: .5rem; line-height: 1.06; font-weight: 700; }
.calc-table { min-height: 0; background: var(--white); }
.calc-row { display: grid; grid-template-columns: 32% 68%; min-height: 2.05rem; box-shadow: inset 0 -.055rem var(--line); }
.calc-label { display: flex; align-items: center; padding: .2rem .3rem; color: var(--navy); background: var(--pale-blue); font-size: .59rem; line-height: 1.08; }
.iss-example .calc-label { background: var(--pale-green); }
.iptu-example .calc-label { background: var(--pale-yellow); }
.calc-value { display: flex; align-items: center; min-width: 0; padding: .2rem .32rem; background: var(--white); font-size: .59rem; line-height: 1.13; }
.calc-value small { display: block; width: 100%; margin-top: .08rem; font-size: .49rem; line-height: 1.08; }
.calc-row:first-child .calc-value, .calc-row-tall .calc-value { flex-direction: column; align-items: flex-start; justify-content: center; }
.calc-money { margin-right: .3rem; color: var(--navy); font-size: .76rem; line-height: 1; font-weight: 900; white-space: nowrap; }
.formula { display: block; align-self: center; margin: .18rem .3rem; padding: .35rem .3rem; border-radius: .16rem; background: var(--pale-blue); }
.formula strong { color: var(--navy); font-size: .72rem; white-space: nowrap; }
.calc-row-tall { min-height: 4.7rem; }
.result-area { display: flex; align-items: center; justify-content: center; border-radius: .22rem; box-shadow: inset 0 0 0 .06rem var(--green); }
.iss-result { display: flex; align-items: center; font-size: .64rem; font-weight: 800; }
.iss-result svg { width: 1.05rem; height: 1.25rem; margin-right: .4rem; color: var(--green); }
.iss-result strong { margin-left: .25rem; color: var(--graphite); font-size: .98rem; font-weight: 900; }
.iptu-results { display: grid; grid-template-columns: 1fr 1fr; gap: .28rem; }
.result-card { display: flex; align-items: center; padding: .14rem .35rem; border-radius: .2rem; background: var(--pale-yellow); box-shadow: inset 0 0 0 .06rem var(--yellow); }
.result-card svg { width: 1rem; height: 1.2rem; margin-right: .35rem; color: var(--blue); }
.result-card .tag-icon { color: var(--graphite); }
.result-card span { font-size: .5rem; line-height: 1.05; font-weight: 800; }
.result-card strong { display: block; color: var(--navy); font-size: .76rem; line-height: 1; white-space: nowrap; }

.allocation-example { grid-template-rows: 2.45rem minmax(0,1fr) 1.45rem; }
.table-viewport { min-width: 0; min-height: 0; }
table { width: 100%; height: 100%; table-layout: fixed; border-collapse: collapse; }
.department-col { width: 30%; } .amount-col { width: 18%; } .percent-col { width: 7%; } .bar-col { width: 15%; } .destination-col { width: 30%; }
.allocation-table { font-size: .57rem; line-height: 1.08; }
.allocation-table th, .allocation-table td { padding: .12rem .24rem; vertical-align: middle; box-shadow: inset 0 -.055rem var(--line), inset -.055rem 0 var(--line); }
.allocation-table thead th { height: 1.15rem; color: var(--navy); background: var(--pale-blue); text-align: center; font-size: .5rem; font-weight: 900; }
.allocation-table tbody th { color: var(--navy); background: var(--pale-blue); text-align: left; }
.allocation-table tbody td { background: var(--white); }
.allocation-table td:nth-child(2), .allocation-table td:nth-child(3) { white-space: nowrap; text-align: center; font-weight: 800; }
.question { display: flex; align-items: center; }
.allocation-table .number { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: .72rem; height: .72rem; margin-right: .25rem; border-radius: 50%; color: var(--navy); background: var(--white); font-size: .44rem; line-height: 1; font-weight: 900; }
.allocation-track { width: 100%; height: .5rem; border-radius: .1rem; background: #DDE7EE; }
.allocation-fill { display: block; height: 100%; border-radius: .1rem; }
.allocation-fill.health { width:30%; background:var(--green); } .allocation-fill.education { width:30%; background:var(--blue); } .allocation-fill.infrastructure { width:20%; background:var(--yellow); } .allocation-fill.agriculture { width:10%; background:var(--green); } .allocation-fill.environment { width:10%; background:var(--blue); }
.allocation-total { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .8rem; padding: .16rem .35rem; border-radius: .18rem; color: var(--navy); background: var(--pale-blue); box-shadow: inset 0 0 0 .055rem var(--line); font-size: .58rem; line-height: 1; font-weight: 900; }

.page-footer { display: flex; align-items: center; height: 2.5rem; padding: .2rem .55rem; color: var(--white); }
.source-links { display: flex; flex: 1 1 auto; align-items: center; font-size: .55rem; line-height: 1.1; }
.source-links > * + * { margin-left: .7rem; }
.source-links a { color: var(--white); text-decoration: underline; }
.source-links a:hover { color: var(--yellow); }
.copyright { margin-left: .8rem; font-size: .52rem; white-space: nowrap; }
.footer-ribbon { flex: 0 0 auto; width: 3.2rem; height: .28rem; margin-left: .65rem; border-radius: .1rem; background: linear-gradient(110deg,var(--green) 67%,var(--yellow) 67%); }

@media (prefers-reduced-motion: no-preference) {
  .indicator, .panel { animation: panel-reveal .35s ease-out both; }
  .overview-grid > .panel:nth-child(2) { animation-delay:.03s; }
  .overview-grid > .panel:nth-child(3) { animation-delay:.06s; }
  .practice-grid > .panel { animation-delay:.08s; }
  .allocation-fill, .year-mini i b { transform-origin:left center; animation:bar-reveal .7s ease-out both; }
}
@keyframes panel-reveal { from { opacity:.75; transform:translateY(.08rem); } to { opacity:1; transform:none; } }
@keyframes bar-reveal { from { transform:scaleX(0); } to { transform:scaleX(1); } }

/* Mobile: apenas fluxo vertical e rolagem. Sem tabs, carrosséis ou conteúdo oculto. */
@media (max-width: 900px) {
  html { font-size: 16px; }
  body { min-height: 100vh; min-height: 100svh; overflow-y:auto; }
  .dashboard { width:100%; min-height:100vh; min-height:100svh; }
  .masthead { display:grid; grid-template-columns:1fr; height:auto; gap:.75rem; padding:.8rem; }
  .official-crest { width:4.5rem; height:auto; }
  .brand-copy > p:first-child { font-size:.68rem; }
  .brand-name { font-size:1.45rem; }
  .brand-location { font-size:.6rem; }
  .masthead-title { text-align:left; }
  .masthead-title h1 { font-size:1.55rem; }
  .masthead-title p { font-size:.82rem; }
  .authorship, .teacher { padding:.65rem 0 0; box-shadow:0 -.0625rem rgba(255,255,255,.55); }
  .authors-label, .teacher-label { font-size:.72rem; }
  .authors-list, .teacher-name { font-size:.9rem; }

  .dashboard-content { padding:.7rem; }
  .indicator-section, .overview-grid, .practice-grid { height:auto; }
  .indicators, .overview-grid, .practice-grid { display:grid; grid-template-columns:1fr; gap:.7rem; }
  .indicator-section { margin-bottom:.7rem; }
  .indicator { min-height:4.5rem; padding:.6rem; }
  .indicator-icon { width:3rem; height:3rem; }
  .indicator-icon .icon { width:2rem; height:2rem; }
  .indicator h2 { font-size:.75rem; }
  .indicator-value, .indicator-value.compact, .indicator-value.budget, .indicator-value.transfers { font-size:1.15rem; white-space:normal; }
  .indicator-detail { font-size:.74rem; }
  .workspace, .practice-section { margin-top:0; }
  .practice-section { margin-top:.7rem; }

  .panel, .revenue-panel, .tax-panel, .example, .allocation-example { display:grid; grid-template-rows:auto auto; height:auto; min-height:0; padding:.5rem; gap:.4rem; overflow:visible; }
  .example { grid-template-rows:auto auto auto; }
  .panel-heading, .example-heading { height:auto; min-height:3.5rem; padding:.5rem; }
  .panel-heading h2, .revenue-panel .panel-heading h2, .example-heading h2 { font-size:1.25rem; }
  .panel-heading p, .example-heading p { font-size:.75rem; }
  .heading-icon { width:2.15rem; height:2.15rem; }

  .revenue-body { grid-template-rows:auto auto; }
  .revenue-main { grid-template-columns:1fr; gap:.35rem; }
  .revenue-numbers { padding:.25rem 0; box-shadow:0 .055rem var(--line); }
  .legend-row { min-height:2.6rem; }
  .legend-row dt, .legend-row dd { font-size:.88rem; }
  .revenue-total p { font-size:1.25rem; }
  .revenue-chart { display:flex; justify-content:center; }
  .donut-svg { width:min(100%,18rem); height:auto; }
  .revenue-note { padding:.65rem; }
  .revenue-note p { font-size:.78rem; }

  .tax-row, .calc-row { grid-template-columns:1fr; min-height:0; border:.055rem solid var(--line); border-radius:.28rem; overflow:hidden; box-shadow:none; margin-bottom:.35rem; }
  .tax-label, .calc-label { min-height:2.3rem; padding:.5rem; font-size:.78rem; }
  .tax-label .number, .calc-label .number { width:1.05rem; height:1.05rem; font-size:.62rem; }
  .tax-value, .calc-value { min-height:2.6rem; padding:.55rem; font-size:.78rem; }
  .tax-value small, .calc-value small { font-size:.68rem; }
  .tax-rates-row, .tax-exempt-row, .revenue-row, .growth-row, .activities-row, .importance-row, .calc-row-tall { min-height:0; }
  .rate-pairs { grid-template-columns:1fr; }
  .rate-pairs span { font-size:.72rem; }
  .rate-pairs strong { font-size:1.15rem; }
  .discount-inline { justify-content:flex-start; }
  .growth-row { border-color:var(--line); margin-top:0; }
  .growth-content { grid-template-columns:1fr; padding:3rem .55rem .55rem; }
  .growth-badge { top:.55rem; right:.55rem; font-size:1rem; }
  .year-mini strong { font-size:.88rem; }
  .service-tags span { font-size:.68rem; }
  .calc-money { font-size:.95rem; }
  .formula { margin:.3rem 0; font-size:.78rem; }
  .formula strong { font-size:.88rem; }
  .result-area, .result-card { min-height:3.5rem; }
  .iptu-results { grid-template-columns:1fr; }

  .allocation-example { grid-template-rows:auto auto auto; }
  .allocation-table, .allocation-table tbody, .allocation-table tr, .allocation-table th, .allocation-table td { display:block; width:100%; height:auto; }
  .allocation-table colgroup { display:none; }
  .allocation-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .allocation-table tbody { display:grid; gap:.55rem; }
  .allocation-table tbody tr { padding:.6rem; border-radius:.35rem; background:var(--white); box-shadow:inset 0 0 0 .055rem var(--line); }
  .allocation-table tbody th, .allocation-table tbody td { padding:0; background:transparent; box-shadow:none; font-size:.75rem; }
  .allocation-table tbody th { padding-bottom:.4rem; }
  .allocation-table tbody td { display:grid; grid-template-columns:7.3rem 1fr; gap:.4rem; align-items:center; padding:.25rem 0; text-align:left!important; white-space:normal!important; }
  .allocation-table tbody td::before { color:var(--navy); font-size:.68rem; font-weight:900; }
  .allocation-table tbody td:nth-of-type(1)::before { content:"Valor destinado"; }
  .allocation-table tbody td:nth-of-type(2)::before { content:"Percentual"; }
  .allocation-table tbody td:nth-of-type(3)::before { content:"Participação"; }
  .allocation-table tbody td:nth-of-type(4)::before { content:"Aplicação"; }
  .allocation-total { grid-template-columns:1fr; gap:.2rem; padding:.6rem; font-size:.76rem; }

  .page-footer { display:block; height:auto; padding:.75rem; }
  .source-links { flex-wrap:wrap; gap:.45rem .7rem; font-size:.72rem; }
  .source-links > * + * { margin-left:0; }
  .copyright { margin:.65rem 0 0; font-size:.7rem; }
  .footer-ribbon { margin:.55rem 0 0; width:4rem; }
}

/* Ajuste fino do desktop pela composição de referência. */
@media (min-width: 901px) {
  .masthead-title h1 { font-size: 1.58rem; }
  .masthead-title p { font-size: .64rem; }
  .authors-label { font-size: .54rem; }
  .authors-list { font-size: .72rem; }
  .teacher-label { font-size: .49rem; }
  .teacher-name { font-size: .74rem; }

  .indicator h2 { font-size: .66rem; }
  .indicator-value { font-size: 1.12rem; }
  .indicator-value.compact { font-size: .9rem; }
  .indicator-value.budget { font-size: .86rem; }
  .indicator-value.transfers { font-size: .84rem; }
  .indicator-detail { font-size: .61rem; }

  .panel-heading h2 { font-size: 1.38rem; }
  .revenue-panel .panel-heading h2 { font-size: 1.18rem; }
  .panel-heading p { font-size: .64rem; }
  .heading-icon { width: 2.1rem; height: 2.1rem; }

  .revenue-body { grid-template-rows: minmax(0,1fr) 2.7rem; }
  .legend-row dt { font-size: .8rem; }
  .legend-row dd { font-size: .78rem; }
  .revenue-total h3 { font-size: .7rem; }
  .revenue-total p { font-size: 1.03rem; }
  .revenue-note p { font-size: .69rem; }

  .tax-rows { display: grid; }
  .iptu-panel .tax-rows {
    grid-template-rows: 1.4rem 2.25rem 1.65rem 3.05rem 1.65rem 3.15rem 2.2rem minmax(6.5rem, 1fr);
  }
  .iss-panel .tax-rows {
    grid-template-rows: 1.5rem 2.25rem 3.5rem 3.7rem 2.25rem minmax(6.3rem, 1fr) 2.55rem;
  }
  .tax-row { min-height: 0; }
  .tax-label { font-size: .7rem; line-height: 1.08; }
  .tax-label .number { width: .86rem; height: .86rem; font-size: .53rem; }
  .tax-value { font-size: .7rem; line-height: 1.12; }
  .tax-value small { font-size: .58rem; line-height: 1.1; }
  .rate-pairs span { font-size: .61rem; }
  .rate-pairs strong { font-size: 1.25rem; }
  .discount-inline strong { font-size: 1.22rem; }
  .money { font-size: .86rem; }
  .service-tags span { font-size: .57rem; }
  .growth-row { height: calc(100% - .32rem); align-self: center; margin: .16rem 0; }
  .growth-content { padding-top: 1.65rem; }
  .growth-badge { top: .2rem; font-size: 1.02rem; }
  .year-mini span { font-size: .57rem; }
  .year-mini strong { font-size: .8rem; }
  .year-mini i { height: .25rem; }

  .example-heading h2 { font-size: 1.12rem; }
  .example-heading p { font-size: .56rem; }
  .calc-label { font-size: .67rem; }
  .calc-label .number { width: .84rem; height: .84rem; font-size: .52rem; }
  .calc-value { font-size: .67rem; }
  .calc-value small { font-size: .56rem; }
  .calc-money { font-size: .88rem; }
  .formula { font-size: .67rem; }
  .formula strong { font-size: .82rem; }
  .iss-result { font-size: .7rem; }
  .iss-result strong { font-size: 1.08rem; }
  .result-card span { font-size: .56rem; }
  .result-card strong { font-size: .84rem; }

  .allocation-table { font-size: .64rem; }
  .allocation-table thead th { font-size: .56rem; }
  .allocation-table .number { font-size: .49rem; }
  .allocation-total { font-size: .64rem; }
}

@media (min-width: 901px) {
  .dashboard-content { padding-top: .47rem; padding-bottom: 0; }
  .workspace { margin-top: .5rem; }
}
@media (min-width: 901px) { .practice-section { margin-top: .435rem; } }

/* Refinamento visual pontual — somente IPTU, ISS e cards de cálculo. */
.bullet-line {
  gap: .22rem .42rem;
}
.bullet-line b {
  display: inline-flex;
  align-items: center;
  padding: .12rem .3rem;
  border-radius: 999px;
  color: var(--navy);
  background: var(--pale-blue);
  box-shadow: inset 0 0 0 .055rem rgba(0, 84, 156, .12);
  line-height: 1;
}
.iptu-panel .bullet-line b {
  background: var(--pale-green);
  box-shadow: inset 0 0 0 .055rem rgba(0, 149, 54, .16);
}

.rate-pairs {
  gap: .34rem;
}
.rate-pairs > div {
  border-radius: .22rem;
  box-shadow: inset 0 0 0 .055rem rgba(0, 84, 156, .12);
}
.iptu-panel .rate-pairs > div {
  box-shadow: inset 0 0 0 .055rem rgba(0, 149, 54, .16);
}
.rate-pairs span {
  letter-spacing: -.01em;
}

.tax-value,
.calc-value {
  color: var(--gray-dark);
}
.tax-value strong,
.calc-value strong {
  color: var(--navy);
}
.tax-exempt-row ul {
  margin: .02rem 0;
}
.tax-exempt-row li + li {
  margin-top: .12rem;
}
.revenue-row .tax-value,
.importance-row .tax-value {
  align-items: flex-start;
}

.service-tags {
  gap: .2rem .22rem;
}
.service-tags span {
  padding: .14rem .28rem;
  border-radius: 999px;
  background: #F3F8FD;
  box-shadow: inset 0 0 0 .055rem rgba(0, 84, 156, .12);
}

.growth-content {
  gap: .42rem;
  padding-left: .4rem;
  padding-right: .4rem;
}
.growth-badge {
  border-radius: .22rem;
  box-shadow: inset 0 0 0 .055rem rgba(0, 54, 101, .08);
}
.iss-panel .growth-badge {
  background: #EDF6FD;
}
.iptu-panel .growth-badge {
  background: #EDF9F1;
}
.year-mini {
  border-radius: .2rem;
  box-shadow: inset 0 0 0 .055rem rgba(0, 54, 101, .08);
}
.year-mini.current {
  box-shadow: inset 0 0 0 .055rem rgba(0, 149, 54, .14);
}

.calc-table {
  border-radius: .26rem;
  overflow: hidden;
  box-shadow: inset 0 0 0 .055rem var(--line);
}
.calc-row {
  min-height: 2rem;
}
.calc-value {
  padding: .22rem .36rem;
}
.calc-value > span {
  color: var(--graphite);
}
.formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .14rem;
  width: 100%;
  padding: .34rem .38rem;
  border-radius: .2rem;
  box-shadow: inset 0 0 0 .055rem var(--line);
}

.result-area {
  padding: 0 .42rem;
}
.iss-result {
  justify-content: center;
  letter-spacing: -.01em;
}
.iss-result span {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: .15rem;
}
.iss-result strong {
  margin-left: 0;
}
.iptu-results {
  gap: .32rem;
}
.result-card {
  min-height: 2.12rem;
  padding: .16rem .36rem;
  box-shadow: inset 0 0 0 .06rem var(--yellow), 0 .04rem 0 rgba(0, 54, 101, .04);
}
.result-card span {
  line-height: 1.02;
}
.result-card strong {
  margin-top: .08rem;
}

@media (min-width: 901px) {
  .tax-label {
    padding: .22rem .38rem;
  }
  .tax-value {
    padding: .22rem .38rem;
  }
  .bullet-line b {
    padding: .13rem .32rem;
  }
  .service-tags span {
    padding: .14rem .3rem;
  }
  .calc-label {
    padding: .22rem .32rem;
  }
  .calc-row:first-child .calc-value,
  .calc-row-tall .calc-value {
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .bullet-line b,
  .service-tags span {
    white-space: normal;
  }
  .tax-value,
  .calc-value {
    gap: .15rem;
  }
  .calc-table {
    box-shadow: inset 0 0 0 .0625rem var(--line);
  }
  .result-area,
  .result-card {
    padding: .5rem .58rem;
  }
  .result-card {
    min-height: 3.7rem;
  }
}

/* Desktop/notebook/TV: preserva a composição aprovada e reduz a escala inteira
   apenas quando a altura útil da tela não comportar o painel completo. */
@media (min-width: 901px) {
  html {
    font-size: min(0.956937799vw, 1.864976501vh);
  }

  .dashboard {
    margin-left: auto;
    margin-right: auto;
  }
}
