:root{--navy:#07334b;--blue:#074782;--green:#397643;--ink:#20303b;--muted:#7d8790;--line:#d3dfe6;--display:'Barlow Condensed','Arial Narrow',Arial,sans-serif;--body:'Inter',Arial,sans-serif;--radius:8px}
*{box-sizing:border-box}body{margin:0;background:var(--navy);font-family:var(--body);color:var(--ink);font-size:12px;-webkit-font-smoothing:antialiased}button,select{font:inherit}button,a,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}button:focus-visible,select:focus-visible,a:focus-visible,.municipality:focus-visible{outline:3px solid #e6ae3f;outline-offset:3px}h1,h2,h3,p{margin:0}h2,h3{font-family:var(--display);font-weight:600}h2{font-size:20px;line-height:1.1}h3{font-size:14px;line-height:1.2}button{border:0;background:none;color:inherit}.icon{width:22px;height:22px;flex:none}.dashboard{max-width:1920px;min-height:100vh;margin:0 auto;padding:8px 15px 0;background:#fff;border:5px solid var(--navy);border-bottom:6px solid #438460;border-radius:14px;overflow:hidden}.skip-link{position:fixed;top:-80px;left:12px;z-index:10;background:#fff;padding:12px}.skip-link:focus{top:8px}.empty{color:#929ca3;font-weight:500}.value{font-size:19px;line-height:1}.blue{--accent:#074782;--border:#a8c6dd;--tint:#f8fbff;color:var(--accent)}.green{--accent:#326e35;--border:#b5cda6;--tint:#fcfdf8;color:var(--accent)}.amber{--accent:#926006;--border:#e8cc8e;--tint:#fffcf1;color:var(--accent)}.purple{--accent:#64358a;--border:#d2bade;--tint:#fcf9fd;color:var(--accent)}.orange{--accent:#b74721;--border:#ebc0a3;--tint:#fffaf6;color:var(--accent)}.neutral{--accent:#263d46;--border:#c1c9c0;--tint:#fff;color:var(--accent)}.red{color:#d33430}.cyan{color:#48b4d6}
.masthead{display:grid;grid-template-columns:27% 1fr 18%;gap:16px;align-items:center;margin:-8px -15px 12px}.brand{height:146px;background:linear-gradient(115deg,#063752,#082e40);color:white;position:relative;overflow:hidden;padding:13px 20px}.brand-copy{position:relative;z-index:1}.brand h1{font:700 clamp(32px,3.15vw,53px)/1 var(--display);letter-spacing:-.8px;white-space:nowrap}.brand-subtitle{font:600 clamp(17px,1.7vw,26px)/1.25 var(--display);color:#f4cf61;margin-top:4px}.brand-description{font:500 16px/1.25 var(--display);margin-top:8px}.dna{position:absolute;height:175px;width:80px;right:0;top:-10px;opacity:.58}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 0 10px}.section-heading h2{font-size:19px;color:#225b2d}.period{white-space:nowrap;color:#7d8790;font-size:10px}.period b{margin-left:6px;font-weight:400}.kpi-strip{border:1px solid #b4c4c3;border-radius:9px;padding:14px 0;display:grid;grid-template-columns:1fr 1.2fr 1fr .95fr}.kpi{display:flex;gap:12px;padding:0 16px;min-width:0;color:var(--blue);border-right:1px solid #d3dcdf}.kpi:last-child{border:0}.kpi>.icon{width:32px;height:32px;margin-top:5px}.kpi h3{font-size:13px;text-transform:uppercase;color:#27343b;min-height:32px}.kpi strong{display:block;font-family:var(--body);font-size:27px;line-height:1;margin-top:9px;color:#89949a;font-weight:500}.kpi.green>.icon{color:#397643}.institution{text-align:center;display:flex;align-items:center;flex-direction:column;gap:9px;padding-right:12px;color:#527084;font-size:10px}.institution-label{font:500 11px var(--display);letter-spacing:1.9px}.sebrae{color:#00569c;font:bold italic 36px/1 Arial,sans-serif;letter-spacing:-1.8px;position:relative;padding:10px 0}.sebrae:before,.sebrae:after{content:'';position:absolute;width:40px;height:5px;background:currentColor;transform:skew(-17deg);left:50%;margin-left:-18px}.sebrae:before{top:0;box-shadow:0 -7px 0 -1px currentColor}.sebrae:after{bottom:0;box-shadow:0 7px 0 -1px currentColor}
.main-grid{display:grid;grid-template-columns:26% minmax(0,1fr) 18%;gap:14px;align-items:stretch}.left-rail,.right-rail{display:flex;flex-direction:column;gap:12px;min-width:0}.panel{border:1px solid var(--border);border-radius:var(--radius);padding:12px;background:linear-gradient(130deg,#fff,var(--tint));min-width:0}.panel h2{display:flex;align-items:center;gap:9px;margin-bottom:12px;color:var(--accent)}.panel h2 .icon{width:23px;height:23px}.panel h2 span{min-width:0}.profile-panel{flex:1}.profile-panel h2{margin-bottom:3px}.scope-caption{font-size:10px;color:#7c8b97;margin:0 0 10px 32px}.indicator-row{display:flex;align-items:center;gap:10px;min-width:0}.profile-indicators .indicator-row{border-bottom:1px solid #d9e5ee;padding:10px 0}.profile-indicators .indicator-row:last-child{border-bottom:1px solid #b8d0e2}.profile-indicators .indicator-row>span{font:600 14px var(--display);text-transform:uppercase;color:#184d77}.indicator-row strong{margin-left:auto;min-width:30px;text-align:right;font-size:18px;font-weight:500}.profile-indicators .icon{width:21px;height:21px}.activities{padding-top:12px}.activities h3{font-size:15px;margin-bottom:6px}.empty-rows{display:flex;flex-direction:column;gap:8px}.empty-row{display:flex;gap:10px;align-items:center;height:17px;color:var(--accent)}.row-dot{width:4px;height:4px;background:var(--accent);border-radius:50%;opacity:.6}.empty-row .value{font-size:15px;color:#9aa3a6}.empty-rule{display:block;max-width:70%;width:100%;height:1px;background:var(--border);opacity:.32}.empty-note{font-size:10px;color:#90989b;font-weight:400;margin-top:12px}.resource-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.resource-grid .panel{padding:11px 10px;min-height:238px}.resource-grid h2{font-size:17px;gap:6px;white-space:nowrap}.resource-grid h2 .icon{width:22px;height:24px}.resource-grid h3{font-size:13px}.stacked-indicator{margin-bottom:13px}.stacked-indicator strong{display:block;margin-top:5px;font-size:21px;font-weight:500}.spaced-title{margin-top:15px}.resource-grid h3+.empty-rows{margin-top:6px}.resource-grid .empty-rows{gap:7px}.resource-grid .empty-rule{max-width:60%}
.map-section{min-width:0;display:flex;flex-direction:column;position:relative}.map-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:6px 3px 0}.map-heading h2{font-weight:700;font-size:27px;color:var(--navy)}.map-heading p{font-size:10px;color:#7a898b;margin-top:4px}.select-wrap{position:relative;flex-shrink:0;max-width:48%}.select-wrap select{appearance:none;border:1px solid #c2d0d9;border-radius:6px;background:white;color:#31546d;font-size:11px;padding:10px 30px 10px 11px;width:190px;max-width:100%;cursor:pointer}.select-wrap>.icon{position:absolute;right:10px;top:11px;width:13px;height:13px;pointer-events:none;color:#31546d}.map-stage{position:relative;flex:1;min-height:557px;overflow:hidden;margin-top:6px;background:radial-gradient(ellipse at center,#f6f8ef 0%,white 72%)}.map-canvas{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.map-canvas>svg{width:100%;height:100%;overflow:hidden}.map-loading,.map-error{color:#52686f;font-size:12px;text-align:center}.map-error p{margin-top:8px}.map-error button{margin-top:12px;background:#07334b;color:white;padding:10px 16px;border-radius:6px}.map-context path{fill:#fafbf7;stroke:#e5e9df;stroke-width:.75;vector-effect:non-scaling-stroke}.municipality{fill:url(#land-fill);stroke:#96aa7c;stroke-width:.9;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill .15s}.municipality:hover,.municipality:focus-visible{fill:#c2d69c;outline:none;stroke:#255c3d;stroke-width:2}.municipality.selected{fill:#e9c77a;stroke:#927037;stroke-width:1.8}.region-outline{fill:none;stroke:#4c7337;stroke-width:1.8;vector-effect:non-scaling-stroke;pointer-events:none;stroke-linecap:round}.map-labels{pointer-events:none}.municipality-name{font:500 16px var(--display);fill:#253c2b;paint-order:stroke;stroke:#f3f6e6;stroke-width:3;stroke-linejoin:round}.municipality-name.selected{font-weight:700;fill:#6d461a;stroke:#f7e4b8}.no-boundaries .municipality{stroke-width:0}.no-boundaries .municipality:hover,.no-boundaries .municipality.selected{stroke-width:2}.is-hidden{display:none}.salary{position:absolute;top:13px;left:4px;z-index:1;display:flex;gap:10px;align-items:center;padding:9px 13px;border:1px solid #c8d3c5;border-radius:7px;background:rgba(255,255,255,.93);min-width:147px}.salary-icon{color:#408146}.salary-icon .icon{width:29px;height:29px}.salary h3{font-size:12px;color:#405044}.salary strong{font-size:20px;font-weight:500;margin-top:2px;display:block}.compass{position:absolute;right:13px;top:21px;width:48px;z-index:1;text-align:center;font:500 11px var(--display);color:#355054}.compass>svg{display:block;width:44px;height:44px;margin:auto}.compass-west{position:absolute;left:-7px;top:30px}.compass-east{position:absolute;right:-5px;top:30px}.map-tools{position:absolute;right:8px;bottom:85px;display:flex;flex-direction:column;background:white;border:1px solid #cbd7d8;border-radius:7px;box-shadow:0 2px 8px #173c4410;overflow:hidden}.map-tools button{height:34px;width:34px;display:grid;place-items:center;border-bottom:1px solid #e2e8e8;color:#31564e}.map-tools button:last-child{border:0}.map-tools button:hover{background:#eff4e9}.map-tools button:disabled{opacity:.35;cursor:default}.map-tools .icon{width:18px;height:18px}.map-inset{position:absolute;bottom:18px;left:8px;width:108px;display:flex;flex-direction:column;align-items:center;gap:2px;pointer-events:none}.map-inset>span{font:500 10px var(--display);letter-spacing:1px;color:#778880}.map-inset svg{width:85px;height:94px}.map-inset .inset-label{font-size:9px;color:#5e8051;letter-spacing:1.4px}.inset-state{fill:#edf1e9;stroke:#d3dccd;stroke-width:.3}.inset-region{fill:#76985a;stroke:#63834c;stroke-width:.3}.map-scale{position:absolute;bottom:29px;right:25px;max-width:42%;font-size:9px;color:#4b5b53}.map-scale>div:first-child{display:flex;justify-content:space-between;gap:8px;margin-bottom:5px}.scale-bar{height:5px;border:1px solid #667258;background:linear-gradient(to right,#667258 0 25%,white 25% 50%,#667258 50% 75%,white 75%)}.map-tooltip{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);padding:9px 12px;background:#07334b;color:white;font-size:11px;border-radius:5px;box-shadow:0 2px 8px #173c4415;white-space:nowrap;pointer-events:none;z-index:3}.map-caption{display:flex;justify-content:space-between;gap:10px;padding:8px 4px 2px;color:#7d8b88;font-size:9px}.map-caption>span:first-child{display:flex;align-items:center;gap:7px}.map-caption .icon{width:14px;height:14px}.map-caption>span:last-child{white-space:nowrap}
.right-rail .panel{padding:12px}.right-rail h2{font-size:18px;gap:7px}.right-rail h2 .icon{width:20px;height:20px}.legend-list{display:flex;flex-direction:column;gap:10px}.legend-toggle,.legend-item{display:flex;align-items:center;gap:9px;font-size:10px;color:#34474a;text-align:left;min-height:20px}.legend-toggle{padding:0;width:100%}.legend-toggle:hover{color:#2c6d41}.legend-item>.icon{width:19px;height:19px}.legend-region{height:11px;width:18px;border:1.5px solid #739253;background:#e8efd8;border-radius:2px;flex:none}.legend-municipality{border:1.5px solid #456546;width:11px;height:11px;border-radius:50%;margin:0 4px;flex:none}.legend-selected{height:11px;width:18px;border:1.5px solid #b89345;background:#ead09c;border-radius:2px;flex:none}.legend-check{margin-left:auto;color:#567e4b}.legend-check .icon{width:13px;height:13px}.legend-toggle[aria-pressed=false] .legend-check{opacity:.15}.legend-toggle[aria-pressed=false]>span:first-child{opacity:.35}.legend-separator{height:1px;background:#e4e9e1;margin:0}.layer-empty{margin-left:auto;color:#a3aca5;font-size:12px}.legend-note{font-size:9px;color:#89928a;padding-top:12px;margin-top:11px;border-top:1px solid #e4e9e1;line-height:1.5}.tourism-panel{flex:1}.tourism-panel h2{font-size:16px}.tourism-panel h2 .icon{width:18px;height:18px}.tourism-list{display:flex;flex-direction:column;gap:8px}.tourism-row{display:flex;align-items:center;gap:11px}.tourism-placeholder{width:52px;height:38px;border-radius:4px;background:#f0f3ec;color:#a2b19c;display:grid;place-items:center;flex:none;border:1px solid #e7ece2}.tourism-placeholder .icon{width:21px;height:21px;stroke-width:1.2}.tourism-row>div:last-child{flex:1}.tourism-row .value{font-size:16px}.tourism-rule{display:block;background:#e7ece3;width:68%;height:1px;margin-top:8px}
.bottom-grid{display:grid;grid-template-columns:1fr 1.08fr .97fr 1.3fr 1.1fr 1.18fr;gap:12px;margin-top:14px}.bottom-grid .panel{padding:11px 12px 13px}.bottom-grid h2{font-size:17px;white-space:nowrap;gap:7px;margin-bottom:12px}.bottom-grid h2 .icon{width:23px;height:23px}.bottom-grid .empty-rows{gap:6px}.bottom-grid .empty-row{height:17px}.row-number{font-size:9px;display:grid;place-items:center;width:16px;height:16px;border-radius:4px;background:#ede4f1;color:#67477b}.services .row-dot{border:1px solid #3b719e;background:transparent;border-radius:2px;width:12px;height:12px}.banks .row-dot{width:10px;height:10px;border-radius:1px;background:transparent;border:1px solid #638a58;transform:rotate(45deg);margin:0 2px}.routes .row-dot{width:12px;height:3px;border-radius:1px}.bottom-grid .indicator-row{gap:7px;min-height:23px;font-size:10px;color:#384346}.bottom-grid .indicator-row .icon{width:15px;height:15px;color:var(--accent)}.bottom-grid .indicator-row strong{font-size:16px}.bottom-grid .indicator-row>span{white-space:nowrap}.bottom-grid .panel:last-child .indicator-row{min-height:28px}
footer{display:grid;grid-template-columns:1.1fr 1fr 1.1fr;gap:20px;align-items:center;border-top:1px solid #adc6d8;margin-top:13px;min-height:65px}.sources{padding:9px 4px;color:#285477;min-width:0}.sources strong{display:block;font:600 13px var(--display);margin-bottom:6px}.sources>span{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:9px;color:#627380}.sources i{height:9px;width:1px;background:#b4c3c7}.footer-motto{display:flex;align-items:center;justify-content:center;gap:14px;color:#134a7a}.footer-motto>.icon{width:25px;height:25px}.footer-motto>.icon:nth-child(3){color:#49873a}.footer-motto strong{font:600 13px/1.2 var(--display)}.footer-banner{height:65px;align-self:stretch;display:flex;align-items:center;justify-content:center;gap:14px;margin-right:-15px;padding:10px 16px 10px 29px;background:linear-gradient(112deg,#548e40 0 5%,#07334b 5%);border-radius:25px 8px 0 0;color:#fff}.footer-banner .icon{width:30px;height:35px;color:#75a552}.footer-banner strong{font:600 14px/1.3 var(--display)}
/* Responsive layout: sized from available space, not a fixed poster canvas. */
:root {
  --space: clamp(10px, 1vw, 20px);
  --panel-space: clamp(10px, .85vw, 16px);
}
.dashboard {
  width: 100%; max-width: none; min-height: 100svh;
  padding: var(--space); border-width: 4px;
  display: grid; gap: var(--space); align-content: start;
  overflow: visible;
}
.masthead { margin: 0; gap: var(--space); grid-template-columns: minmax(260px, 23fr) minmax(460px, 51fr) minmax(230px, 26fr); }
.brand { height: auto; min-height: 116px; padding: 12px 16px; border-radius: 6px; }
.brand h1 { font-size: clamp(33px, 2.7vw, 57px); letter-spacing: -.6px; }
.brand-subtitle { font-size: clamp(19px, 1.55vw, 29px); line-height: 1.1; }
.brand-description { font-size: clamp(13px, .94vw, 17px); line-height: 1.2; margin-top: 7px; }
.dna { right: -4px; height: 100%; width: 65px; top: 0; opacity: .4; }
.entrepreneurship, .institution { min-width: 0; }
.section-heading h2 { font-size: clamp(17px, 1.2vw, 24px); }
.kpi-strip { padding: 11px 0; grid-template-columns: 1fr 1.2fr 1fr .9fr; }
.kpi { padding: 0 clamp(8px, .8vw, 17px); gap: clamp(7px, .6vw, 12px); }
.kpi h3 { font-size: clamp(12px, .8vw, 16px); min-height: 30px; }
.kpi > .icon { width: clamp(23px, 1.8vw, 34px); height: clamp(23px, 1.8vw, 34px); }
.kpi strong { font-size: clamp(24px, 1.8vw, 34px); margin-top: 5px; }
.institution { padding: 0 6px; font-size: clamp(10px, .7vw, 13px); }
.institution-brands { display: grid; grid-template-columns: 1.7fr 1fr; align-items: center; gap: clamp(12px, 1.2vw, 28px); width: 100%; }
.institution-brands a { display: flex; align-items: center; justify-content: center; min-width: 0; }
.institution-brands img { display: block; width: 100%; height: auto; object-fit: contain; }
.cidade-brand img { max-width: 240px; }
.sebrae-brand img { max-width: 140px; }
.main-grid { grid-template-columns: minmax(260px, 23fr) minmax(360px, 57fr) minmax(220px, 20fr); gap: var(--space); min-width: 0; min-height: 0; }
.left-rail, .right-rail { gap: var(--space); min-height: 0; }
.left-rail:focus-visible, .right-rail:focus-visible { outline: 2px solid #7ca3b9; outline-offset: 2px; border-radius: 8px; }
.panel, .right-rail .panel, .bottom-grid .panel { padding: var(--panel-space); }
.panel h2, .resource-grid h2, .bottom-grid h2, .right-rail h2 { font-size: clamp(17px, 1.1vw, 22px); gap: 7px; white-space: normal; margin-bottom: 10px; }
.panel h2 .icon { width: 21px; height: 21px; }
.profile-panel { flex: 1 0 auto; }
.scope-caption { margin-bottom: 6px; }
.profile-indicators .indicator-row { padding: clamp(5px, .55vh, 9px) 0; gap: 8px; }
.profile-indicators .indicator-row > span { font-size: clamp(13px, .85vw, 17px); }
.activities { padding-top: 10px; }
.activities h3 { font-size: clamp(13px, .95vw, 17px); }
.empty-note { margin-top: 8px; line-height: 1.4; }
.empty-rows, .resource-grid .empty-rows { gap: 4px; }
.empty-row, .resource-grid .empty-row { height: 15px; }
.resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.resource-grid .panel { min-height: 0; padding: 10px; }
.resource-grid h2 { font-size: clamp(15px, 1vw, 20px); align-items: flex-start; min-height: 34px; }
.resource-grid h2 .icon { width: 19px; height: 21px; }
.resource-grid h3 { font-size: clamp(12px, .75vw, 15px); }
.stacked-indicator { margin-bottom: 9px; }
.stacked-indicator strong { font-size: 20px; line-height: 1; margin-top: 4px; }
.spaced-title { margin-top: 10px; }
.map-section { min-width: 0; min-height: 0; margin: 0; }
.map-heading { padding: 3px 3px 8px; flex-wrap: wrap; flex-direction: row; align-items: center; gap: 10px; }
.map-heading h2 { font-size: clamp(24px, 1.7vw, 36px); white-space: normal; }
.map-heading p { font-size: clamp(10px, .72vw, 14px); max-width: none; line-height: 1.4; }
.select-wrap { flex: 0 1 215px; max-width: 100%; min-width: 175px; }
.select-wrap select { width: 100%; min-height: 40px; font-size: 12px; padding: 10px 30px 10px 11px; }
.select-wrap > .icon { top: 13px; }
.map-stage { flex: 1; min-height: 340px; height: auto; margin: 0; border-radius: 8px; }
.map-canvas > svg { max-width: none; }
.map-caption { flex-wrap: wrap; font-size: clamp(9px, .65vw, 12px); padding: 7px 3px 0; margin: 0; }
.map-caption > span:last-child { display: inline; }
.map-tools button { width: 38px; height: 38px; }
.salary { padding: 7px 10px; min-width: 132px; }
.salary strong { font-size: 20px; }
.map-inset { width: 90px; bottom: 12px; }
.map-inset svg { width: 65px; height: 73px; }
.map-inset > span { font-size: 8px; }
.map-scale { bottom: 22px; right: 20px; }
.legend-list { gap: 5px; }
.legend-toggle, .legend-item { min-height: 20px; gap: 8px; font-size: clamp(10px, .73vw, 14px); }
.legend-note { margin-top: 7px; padding-top: 7px; line-height: 1.4; }
.legend-panel { flex: 0 0 auto; }
.tourism-panel { flex: 1 0 auto; }
.tourism-panel h2 { font-size: clamp(16px, 1vw, 20px); }
.tourism-list { gap: 6px; }
.tourism-placeholder { width: clamp(45px, 3.5vw, 65px); height: clamp(30px, 3vh, 42px); }
.bottom-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space); margin: 0; }
.bottom-grid h2 { font-size: clamp(16px, 1vw, 21px); min-height: 36px; margin-bottom: 6px; align-items: flex-start; }
.bottom-grid .empty-rows { gap: 3px; }
.bottom-grid .empty-row { height: 14px; }
.bottom-grid .indicator-row { font-size: clamp(10px, .7vw, 14px); min-height: 21px; gap: 6px; }
.bottom-grid .indicator-row > span { white-space: normal; }
.bottom-grid .indicator-row strong { min-width: 17px; }
.bottom-grid .panel:last-child .indicator-row { min-height: 25px; }
footer { margin: 0; min-height: 50px; gap: var(--space); grid-template-columns: 1.1fr 1fr 1.1fr; }
.footer-banner { margin: 0; height: auto; min-height: 50px; border-radius: 16px 5px 5px 5px; padding: 10px 12px 10px 24px; }
.footer-banner strong { font-size: clamp(12px, .85vw, 17px); }
.footer-motto { gap: 10px; }
.footer-motto strong { font-size: clamp(12px, .8vw, 16px); }
.sources > span { line-height: 1.5; font-size: clamp(9px, .63vw, 12px); }
/* A desktop workspace fills the viewport; only the side information scrolls. */
@media (min-width: 1180px) {
  .dashboard { height: 100svh; min-height: 700px; grid-template-rows: auto minmax(340px, 1fr) auto auto; }
  .left-rail, .right-rail { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c8d5d5 transparent; padding-right: 4px; overscroll-behavior-y: contain; }
  .left-rail > *, .right-rail > * { flex-shrink: 0; }
  .map-stage { min-height: 0; }
}
@media (min-width: 1180px) and (max-height: 820px) {
  :root { --space: 8px; --panel-space: 9px; }
  .brand { min-height: 104px; padding: 9px 14px; }
  .brand h1 { font-size: clamp(31px, 2.5vw, 47px); }
  .brand-subtitle { font-size: 21px; }
  .brand-description { font-size: 13px; margin-top: 5px; }
  .kpi-strip { padding: 8px 0; }
  .section-heading { margin-bottom: 6px; }
  .bottom-grid h2 { font-size: 16px; min-height: 32px; }
  .bottom-grid .empty-row { height: 13px; }
  .bottom-grid .indicator-row { min-height: 19px; }
  .bottom-grid .panel:last-child .indicator-row { min-height: 23px; }
  footer, .footer-banner { min-height: 45px; }
}
/* Intermediate screens put the map above a balanced pair of information columns. */
@media (max-width: 1179px) {
  .masthead { grid-template-columns: minmax(0, 1fr) minmax(240px, .8fr); }
  .brand { grid-column: 1; grid-row: 1; }
  .brand h1 { font-size: clamp(36px, 4.2vw, 52px); }
  .institution { grid-column: 2; grid-row: 1; padding: 12px; }
  .entrepreneurship { grid-column: 1 / -1; padding: 0; }
  .kpi { justify-content: center; padding: 10px; }
  .kpi h3 { font-size: 14px; }
  .main-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .map-section { grid-column: 1 / -1; grid-row: 1; }
  .map-stage { flex: none; height: clamp(400px, 58svh, 680px); min-height: 0; }
  .left-rail { grid-column: 1; grid-row: 2; }
  .right-rail { grid-column: 2; grid-row: 2; }
  .profile-indicators .indicator-row { padding: 9px 0; }
  .profile-indicators .indicator-row > span { font-size: 15px; }
  .legend-list { gap: 8px; }
  .legend-item, .legend-toggle { font-size: 12px; }
  .tourism-placeholder { width: 60px; height: 42px; }
  .bottom-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bottom-grid .indicator-row { font-size: 12px; min-height: 26px; }
  .footer-motto { display: none; }
  footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px) {
  .dashboard { border-width: 2px; border-radius: 0; padding: 10px; gap: 14px; }
  .masthead { grid-template-columns: minmax(0, 1fr) 110px; gap: 12px 8px; }
  .brand { min-height: 125px; padding: 13px 10px; }
  .brand h1 { font-size: clamp(27px, 6.9vw, 43px); }
  .brand-subtitle { font-size: clamp(17px, 4.2vw, 24px); }
  .brand-description { font-size: 13px; }
  .dna { right: -20px; opacity: .25; }
  .institution { padding: 0 3px; gap: 8px; }
  .institution-brands { grid-template-columns: 1fr; gap: 12px; }
  .cidade-brand img { max-width: 105px; }
  .sebrae-brand img { max-width: 70px; }
  .institution > span { font-size: 9px; line-height: 1.4; }
  .section-heading h2 { font-size: 18px; }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
  .kpi { justify-content: flex-start; padding: 12px; gap: 10px; min-height: 89px; }
  .kpi h3 { font-size: 13px; }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid #d3dcdf; }
  .main-grid { display: flex; flex-direction: column; gap: 14px; }
  .map-section { order: -1; }
  .map-heading { gap: 10px; padding-bottom: 10px; }
  .map-heading h2 { font-size: clamp(23px, 5.5vw, 29px); }
  .select-wrap { flex: 1 1 100%; min-width: 0; }
  .select-wrap select { font-size: 13px; min-height: 44px; }
  .select-wrap > .icon { top: 15px; }
  .map-stage { height: clamp(330px, 95vw, 470px); }
  .map-caption { font-size: 10px; line-height: 1.5; }
  .map-caption > span:last-child { display: none; }
  .salary { min-width: 121px; top: 8px; left: 5px; }
  .salary h3 { font-size: 11px; }
  .salary .icon { width: 23px; height: 23px; }
  .compass { right: 13px; top: 12px; transform: scale(.8); transform-origin: top right; }
  .map-tools { right: 3px; bottom: 65px; }
  .map-tools button { width: 44px; height: 44px; }
  .map-inset { width: 74px; bottom: 9px; left: 3px; }
  .map-inset svg { width: 50px; height: 57px; }
  .map-inset > span { font-size: 7px; letter-spacing: .5px; }
  .map-scale { bottom: 20px; right: 7px; font-size: 8px; }
  .map-tooltip { font-size: 10px; max-width: 72%; white-space: normal; text-align: center; }
  .municipality-name { font-size: 23px; stroke-width: 4px; }
  .municipality-name.multiline { font-size: 18px; stroke-width: 3px; }
  .left-rail, .right-rail { gap: 14px; }
  .panel, .right-rail .panel { padding: 13px; }
  .panel h2, .right-rail h2 { font-size: 20px; }
  .resource-grid h2 { font-size: 17px; min-height: 36px; }
  .resource-grid .panel { padding: 11px; }
  .legend-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .legend-separator { grid-column: 1 / -1; }
  .legend-toggle { min-height: 44px; }
  .legend-item, .legend-toggle { font-size: 11px; }
  .legend-item { min-height: 30px; }
  .tourism-list { gap: 9px; }
  .tourism-placeholder { width: 64px; height: 42px; }
  .bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bottom-grid h2 { font-size: 18px; min-height: 40px; }
  .bottom-grid .panel { padding: 12px; }
  .bottom-grid .indicator-row { font-size: 12px; min-height: 30px; }
  .bottom-grid .panel:nth-last-child(-n+2) { grid-column: 1 / -1; }
  .bottom-grid .panel:last-child .indicator-row { min-height: 30px; }
  footer { grid-template-columns: 1fr; gap: 8px; }
  .sources > span { font-size: 10px; }
  .footer-banner { min-height: 65px; }
  .footer-banner strong { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Live IBGE data states. */
.municipality,
.municipality:focus,
.municipality:active { outline: none !important; -webkit-tap-highlight-color: transparent; }
.municipality:focus-visible { outline: none !important; stroke: #255c3d; stroke-width: 2; }
.map-tooltip { background: rgba(255,255,255,.96); color: #244b45; border: 1px solid #9eb792; border-radius: 999px; box-shadow: 0 4px 14px rgba(25,55,48,.14); }
.period.is-ready { color: #2c6c38; }
.period.is-loading { color: #607a85; }
.period.is-error { color: #9b342c; }
.period button { padding: 0; color: inherit; font-size: inherit; font-weight: 700; text-decoration: underline; }
.kpi strong.is-loading { animation: data-pulse 1s ease-in-out infinite alternate; letter-spacing: 1px; }
.scope-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 7px 32px; min-height: 18px; }
.scope-meta .scope-caption { margin: 0; }
.data-status { padding: 3px 7px; border-radius: 999px; font-size: 9px; line-height: 1.2; white-space: nowrap; background: #eef4f6; color: #55707d; }
.data-status.is-ready { background: #e9f5e9; color: #2c6c38; }
.data-status.is-partial { background: #fff4d8; color: #8a6208; cursor: help; }
.data-status.is-error { background: #fbe7e4; color: #9b342c; }
.data-status button { padding: 0; color: inherit; font-weight: 700; text-decoration: underline; }
.indicator-label { min-width: 0; }
.indicator-label small { display: inline; font: 500 9px var(--body); color: #7d8c96; text-transform: none; white-space: nowrap; }
.profile-indicators .indicator-label { flex: 1 1 auto; }
.profile-indicators .indicator-row strong { flex: 0 0 auto; font-size: clamp(14px, 1.05vw, 18px); font-variant-numeric: tabular-nums; letter-spacing: -.2px; white-space: nowrap; }
.profile-indicators .indicator-row strong.is-loading { animation: data-pulse 1s ease-in-out infinite alternate; letter-spacing: 1px; }
@keyframes data-pulse { to { opacity: .38; } }

/* Ranking of primary CNAEs among active establishments. */
.economic-activities { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.economic-activity { display: grid; grid-template-columns: 17px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-height: 28px; padding: 2px 0; border-bottom: 1px solid #e0e8ed; }
.activity-rank { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; background: #e9f0f5; color: #315e7d; font-size: 9px; font-weight: 800; }
.activity-description { display: block; min-width: 0; color: #344b59; line-height: 1.15; }
.activity-name { display: block; overflow: hidden; color: #294858; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.activity-description small { display: block; margin-top: 2px; color: #7b8b93; font-size: 8px; font-weight: 500; letter-spacing: .02em; }
.economic-activity strong { min-width: 22px; color: #174d75; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.economic-activities .empty-row { height: 18px; }

/* Detailed cartographic mode, opened when an environmental layer is active. */
.technical-map { position: absolute; inset: 0; z-index: 2; background: #e8ece8; opacity: 0; visibility: hidden; transition: opacity .2s ease; font-family: var(--body); }
.technical-map.is-visible { opacity: 1; visibility: visible; }
.technical-mode .map-canvas > svg { opacity: 0; visibility: hidden; }
.technical-mode .salary, .technical-mode .compass, .technical-mode .map-tools, .technical-mode .map-inset, .technical-mode .map-scale { display: none; }
.technical-mode-badge { padding: 7px 10px; border: 1px solid rgba(50,83,65,.22); border-radius: 999px; background: rgba(255,255,255,.94); box-shadow: 0 2px 9px rgba(26,55,43,.16); color: #285a3c; font: 700 11px var(--body); }
.technical-map .leaflet-control-zoom { border: 1px solid #b9c9c1; box-shadow: 0 2px 9px rgba(26,55,43,.14); }
.technical-map .leaflet-control-zoom a { color: #285a3c; }
.technical-map .leaflet-control-attribution { padding: 2px 5px; background: rgba(255,255,255,.88); font-size: 9px; }
.leaflet-tooltip.leaflet-municipality-label { border: 0; background: rgba(255,255,255,.78); box-shadow: none; color: #214a33; font: 700 10px var(--display); padding: 1px 4px; text-align: center; }
.leaflet-tooltip.leaflet-municipality-label:before { display: none; }
.technical-map.labels-hidden .leaflet-municipality-label { display: none; }
.technical-popup { min-width: 190px; color: #344a40; font: 12px/1.4 var(--body); }
.technical-popup p { margin: 0; padding: 4px 0; border-bottom: 1px solid #e4ebe6; }
.technical-popup p:last-child { border-bottom: 0; }
.technical-popup strong { color: #1e5133; }
.map-tooltip { z-index: 1100; }

/* Optional environmental layers. They stay outside pointer handling so the institutional map remains clickable. */
.map-thematic, .environment-layer { pointer-events: none; }
.environment-layer { transition: opacity .2s ease; }
.relief-layer image { opacity: .5; mix-blend-mode: multiply; }
.soil-unit { opacity: .58; stroke: rgba(255,255,255,.9); stroke-width: .6; vector-effect: non-scaling-stroke; }
.water-body { fill: #58b5da; opacity: .78; stroke: #2085b7; stroke-width: .65; vector-effect: non-scaling-stroke; }
.water-course { fill: none; stroke: #36a7d2; stroke-width: .78; opacity: .76; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.water-course.major { stroke: #087fb7; stroke-width: 1.4; opacity: .92; }
.fire-hotspot { fill: #f04d26; stroke: #fff; stroke-width: 1.35; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 2px rgba(80,22,8,.45)); }
.environmental-toggle { min-height: 27px; border-radius: 6px; padding: 3px 5px; transition: background .15s ease, color .15s ease; }
.environmental-toggle:hover { background: #eef5ef; }
.environmental-toggle[aria-pressed="true"] { background: #e5f1e8; color: #23643b; font-weight: 700; }
.environmental-toggle[aria-pressed="true"] > .icon { opacity: 1; }
.environmental-toggle.is-loading { opacity: .66; cursor: wait; }
.layer-state { display: grid; place-items: center; margin-left: auto; width: 20px; height: 20px; border: 1px solid #c6d4cc; border-radius: 50%; color: #3d7751; font-size: 13px; font-weight: 800; line-height: 1; flex: none; }
.environmental-toggle[aria-pressed="true"] .layer-state { color: white; border-color: #3f7d54; background: #3f7d54; }
.layer-meta { display: flex; flex-direction: column; gap: 4px; margin-top: 9px; padding: 8px 9px; border: 1px solid #dde7e0; border-radius: 7px; background: #f7faf7; color: #687870; font-size: 9px; line-height: 1.42; }
.layer-meta strong { color: #315b43; }

@media (max-width: 650px) {
  .scope-meta { margin-left: 0; align-items: flex-start; }
  .data-status { white-space: normal; text-align: right; }
  .profile-indicators .indicator-row { align-items: flex-start; }
  .profile-indicators .indicator-row strong { font-size: 16px; }
  .environmental-toggle { min-height: 44px; padding: 7px 8px; }
  .layer-meta { grid-column: 1 / -1; font-size: 10px; }
  .economic-activity { min-height: 42px; gap: 9px; }
  .activity-name { font-size: 12px; }
  .activity-description small { font-size: 9px; }
  .economic-activity strong { font-size: 14px; }
}
@media print {
  body { background: white; }
  .dashboard { height: auto; min-height: 0; display: block; border: 0; }
  .main-grid { display: grid; grid-template-columns: 26% 1fr 20%; margin: 12px 0; }
  .left-rail, .right-rail { overflow: visible; }
  .map-section, .left-rail, .right-rail { grid-column: auto; grid-row: auto; }
  .map-stage { min-height: 500px; }
  .map-tools, .select-wrap, .skip-link { display: none; }
  .panel, footer { break-inside: avoid; }
  .bottom-grid { grid-template-columns: repeat(3, 1fr); }
}
