:root {
 --background: oklch(1 0 0); --foreground: oklch(0.337 0.035 231.5);
 --primary: oklch(0.435 0.089 241.1); --primary-foreground: oklch(1 0 0);
 --accent: oklch(0.743 0.073 190.5); --accent-foreground: oklch(0.297 0.058 239.6);
 --border: oklch(0.875 0.047 192.7); --input: oklch(0.735 0.024 204);
 --muted-foreground: oklch(0.503 0.035 226.8); --surface: oklch(0.982 0.006 72);
 --wash: oklch(0.977 0.014 190.5); --warning: oklch(0.952 0.028 33.5);
 --danger: oklch(0.52 0.18 27); --success: oklch(0.46 0.09 165);
 --focus-shadow: 0 0 0 3px oklch(0.743 0.073 190.5 / 30%);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: auto; background: var(--background); }
body { font-family: 'Open Sans', sans-serif; background: var(--background); color: var(--foreground); padding: 32px 20px; line-height: 1.6; letter-spacing: 0; }
.card, .wrap { width: 100%; max-width: 720px; margin: auto; border-radius: 0; box-shadow: none; overflow: visible; }
.header, .hdr { padding: 0 0 28px; border-bottom: 1px solid var(--border); background: transparent; }
.header h1, .hdr h1 { color: var(--primary); font-size: 32px; font-weight: 400; line-height: 1.2; }
.header p, .hdr p { color: var(--muted-foreground); font-size: 15px; margin-top: 12px; }
.input-section, .inputs, .isec { display: flex; flex-direction: column; gap: 24px; padding: 28px 0 32px; background: transparent; }
.input-label, .ilbl, .field label, .stitle { display: block; color: var(--foreground); font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.hint, .btn-sub, .s { color: var(--muted-foreground); font-size: 12px; font-weight: 400; }
.input-row, .irow { min-width: 0; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--input); border-radius: 8px; padding: 0 16px; min-height: 48px; transition: border-color .2s, box-shadow .2s; }
.input-row:focus-within, .irow:focus-within { border-color: var(--accent); box-shadow: var(--focus-shadow); background: var(--background); }
.prefix, .px { flex-shrink: 0; color: var(--muted-foreground); font-size: 15px; font-weight: 600; }
input, select, button { font-family: inherit; font-size: 15px; color: var(--foreground); }
.input-row input, .irow input, .irow select { min-width: 0; width: 100%; background: transparent; border: 0; outline: 0; padding: 12px 0; font-size: 16px; font-weight: 500; }
input::placeholder { color: var(--muted-foreground); opacity: .8; }
.irow.readonly { background: var(--wash); }
.mun-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; }
.mun-row label { grid-column: 1 / -1; font-size: 14px; font-weight: 700; }
.mun-row select { min-width: 0; width: 100%; min-height: 48px; border: 1px solid var(--input); background: var(--surface); border-radius: 8px; padding: 10px 12px; }
.aliq-pill { color: var(--primary); font-weight: 700; padding: 8px; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.toggle-grid, .toggle-wrap, .t2, .t3, .t4, .tf, .abas { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; border: 0; background: transparent; height: auto; overflow: visible; }
.tf { grid-template-columns: 1fr; }
.toggle-grid button, .toggle-wrap button, .t2 button, .t3 button, .t4 button, .tf button, .aba-btn, .cpt button { min-width: 0; min-height: 48px; border: 1px solid var(--input); border-radius: 8px; background: var(--surface); color: var(--foreground); font-size: 13px; font-weight: 600; padding: 12px; line-height: 1.5; white-space: normal; transition: border-color .2s, background .2s; }
button:hover { border-color: var(--accent); }
button.active, button.on, .cpt button.ac, .cpt button.ap { background: var(--wash); border-color: var(--accent); color: var(--primary); box-shadow: inset 0 0 0 1px var(--accent); }
button .btn-sub, button .s, .t3 button span + span, .t2 button span + span { display: block; font-size: 12px !important; font-weight: 400; margin-top: 4px; opacity: 1 !important; color: var(--muted-foreground); }
.abas { margin-top: 28px; }
.aba-panel { display: none; } .aba-panel.on { display: block; }
.row2 { display: grid; grid-template-columns: 1fr; gap: 24px; }
.field { min-width: 0; }
.date-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.section-sep { font-size: 14px; font-weight: 700; color: var(--primary); padding: 16px 0 0; border-top: 1px solid var(--border); }
.qrow { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; }
.qrow .stitle { margin: 0; }
.qctrl { display: flex; align-items: center; gap: 12px; }
.qctrl button, .benf-item button { width: 44px; height: 44px; flex-shrink: 0; border: 1px solid var(--input); border-radius: 8px; background: var(--surface); color: var(--primary); font-size: 22px; }
.qctrl span { min-width: 24px; text-align: center; font-weight: 700; }
.bgrid, .benf-list { display: grid; gap: 16px; margin-top: 14px; }
.brow { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: start; }
.blbl { grid-column: 1 / -1; font-size: 14px; font-weight: 600; }
.cpt { display: flex; gap: 6px; }
.cpt button { padding: 10px 8px; font-size: 12px; }
.benf-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; }
.checks { display: grid; gap: 18px; }
.chk-row { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; align-items: start; font-size: 14px; cursor: pointer; }
.chk-row input { width: 20px; height: 20px; accent-color: var(--primary); margin-top: 3px; }
.nbox, .wbox, .field-note, .isen, .errb, .isencao-banner, .aviso-isencao, .alerta, .ren-alert { border-left: 3px solid var(--accent); padding: 14px 16px; background: var(--wash); color: var(--foreground); font-size: 13px !important; line-height: 1.65; margin-top: 10px; border-radius: 4px; }
.alerta, .ren-alert.warn { background: var(--warning); }
.errb, .ren-alert.erro { border-color: var(--danger); }
.isen, .errb, .isencao-banner, .aviso-isencao, .fr-block { display: none; }
.isen.vis, .errb.vis, .isencao-banner.visible { display: block; }
.it, .ib-t, .at, .ct { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.ix, .ib-x, .ax { font-size: 13px; }
.dn { display: none !important; }
/* Results share the same framed surface, line items and emphasized total. */
.body, .res-body, .results { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.results { display: none; margin-top: 24px; } .results.vis { display: block; }
.res-body:empty { display: none; }
.result-block, .res-simples, .comp-block, .ren-block, .cen-block, .hero, .hero-block, .itbi-row, .fr-block { padding: 24px; background: transparent; }
.block-header, .reg-label, .res-lbl, .comp-title, .ren-title, .cen-title, .col-title { font-size: 15px !important; font-weight: 700; color: var(--primary) !important; background: transparent; padding: 0 0 16px; margin: 0 0 18px; border-bottom: 1px solid var(--border); }
.reg-label { padding: 20px 24px; margin: 0; }
.bh-sub { display: block; color: var(--muted-foreground); font-size: 13px; font-weight: 400; margin-top: 6px; }
.info-box, .res-ib { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 16px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.il, .res-il, .fl { font-size: 12px; color: var(--muted-foreground); }
.iv, .res-iv, .fv { font-size: 15px; font-weight: 600; color: var(--foreground); }
.result-row, .itcmd-row, .col-rrow, .res-rrow, .cen-rrow, .ren-rrow, .cen-row, .comp-row, .itbi-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.result-label, .tl, .col-rl, .res-rl, .cen-rl, .ren-rl, .cen-lbl, .comp-row .cl, .itbi-row .il { min-width: 0; font-size: 13px; color: var(--muted-foreground) !important; line-height: 1.5; }
.sub, .col-nota, .total-note, .cd, .ren-ato-d { display: block; font-size: 12px; color: var(--muted-foreground); line-height: 1.6; }
.result-value, .tv, .col-rv, .res-rv, .cen-rv, .ren-rv, .cen-val, .comp-row .cv { font-size: 15px !important; color: var(--primary) !important; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: right; max-width: 230px; }
.total-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; border: 0; margin-top: 20px; padding-top: 10px; }
.total-row .result-label { color: var(--primary) !important; font-weight: 700; }
.total-row .result-value, .col-rv.big, .cen-rv.big, .res-rrow:last-child .res-rv { font-size: 26px !important; max-width: 100%; }
.section-divider, .col-divider, .res-hr, .cen-hr, .comp-divider { border: 0; margin: 10px 0; }
.two-col, .cen-cols, .cens, .ren-cols { display: grid; grid-template-columns: 1fr; }
.col-igual, .col-usu, .col-jud, .col-ext, .cen, .cen-col, .ren-col { min-width: 0; padding: 24px; background: transparent; border: 0; border-radius: 0; }
.col-usu, .col-ext, .cen + .cen, .cen-col + .cen-col, .ren-col + .ren-col { background: var(--wash); border-top: 1px solid var(--border); }
.cen:first-child, .cen:last-child, .ren-col:first-child, .ren-col:last-child { background: transparent; }
.cen-block .cen-col, .ren-block .ren-col { padding: 16px 0; }
.hero-inner, .comp-hero { background: var(--wash); border: 0; border-left: 3px solid var(--accent); border-radius: 4px; padding: 20px; text-align: left; display: block; }
.hero-inner.prej, .hero-inner.luc { background: var(--wash); }
.hero-lbl, .hl { font-size: 13px; color: var(--primary); font-weight: 700; }
.hero-val, .hv { font-size: 32px; color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.3; margin: 8px 0; }
.hero-val.prej, .hero-val.neg, .hv.neg { color: var(--danger); }
.hero-val.luc, .hero-val.eco, .hv.eco { color: var(--success); }
.hero-desc, .hero-ratio { font-size: 13px; line-height: 1.6; color: var(--muted-foreground); }
.fr-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.fr-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.badge { font-size: 11px; color: var(--muted-foreground); }
.tip-wrap { position: relative; display: inline-flex; align-items: center; }
.tip-ico { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--accent); border-radius: 50%; color: var(--primary); font-size: 12px; font-style: normal; cursor: help; }
.tip-box { display: none; position: absolute; top: 26px; left: 0; width: 220px; max-width: 75vw; background: var(--primary); color: var(--primary-foreground); padding: 12px; border-radius: 4px; font-size: 12px; white-space: pre-line; z-index: 10; }
.tip-wrap:hover .tip-box, .tip-wrap:focus-within .tip-box { display: block; }
.footer, .foot { background: transparent; padding: 24px; color: var(--muted-foreground); font-size: 13px; border-radius: 0; }
.footer { display: grid; gap: 18px; }
.footer-block, .fb { display: flex; align-items: flex-start; gap: 10px; }
.footer-icon, .fi { flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; }
.footer-text, .ft { font-size: 13px; line-height: 1.65; color: var(--muted-foreground); }
.footer-text strong, .ft strong { display: block; font-size: 13px; color: var(--primary); margin-bottom: 6px; }
.footer-divider, .fd { border: 0; border-top: 1px solid var(--border); }
.calc-btn, .add-benf, .calculator-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; width: 100%; border: 1px solid var(--primary); border-radius: 8px; padding: 12px 20px; background: var(--primary); color: var(--primary-foreground); font-size: 14px; font-weight: 700; text-decoration: none; }
.add-benf { background: var(--surface); color: var(--primary); border-color: var(--input); }
.calc-btn:hover, .calculator-cta:hover { background: var(--accent); color: var(--accent-foreground); }
.calculator-final { border-top: 1px solid var(--border); padding-top: 24px; margin-top: 12px; }
.calculator-final p { color: var(--muted-foreground); font-size: 13px; line-height: 1.7; margin-bottom: 18px; }
@media(min-width:640px) {
 body { padding: 40px 32px; }
 .row2, .two-col, .cen-cols, .cens, .ren-cols { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .col-usu, .col-ext, .cen + .cen, .cen-col + .cen-col, .ren-col + .ren-col { border-top: 0; border-left: 1px solid var(--border); }
 .toggle-wrap, .t3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
 .calculator-cta { width: auto; min-width: 180px; }
}
@media(max-width:639px) {
 .result-value, .tv, .col-rv, .res-rv, .cen-rv, .ren-rv, .comp-row .cv { max-width: 140px; }
 .result-block, .res-simples, .col-igual, .col-usu, .col-jud, .col-ext, .comp-block, .ren-block, .cen-block, .hero, .hero-block, .cen { padding: 20px 16px; }
 .brow .irow { grid-column: 1 / -1; } .brow .cpt { grid-column: 1 / -1; } .cpt button { flex: 1; }
 .result-value#itbi { font-size: 13px !important; }
 .result-row:has(#itbi) { grid-template-columns: 1fr; }
 .result-value#itbi { max-width: 100%; text-align: left; }
 .comp-row { padding: 12px 0 !important; background: transparent !important; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Linha "Economia hoje" alinhada às colunas de baixo */
.itbi-row { margin: 0 24px; padding: 12px 0 !important; }
