/* Portal Vocações SESI: diretório editorial (revisão de 11/10/2026, ver DESIGN.md).
   Fontes servidas pelo próprio portal (@fontsource, subconjunto latino, licença OFL). */
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/fira-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/fira-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/fira-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/fira-sans-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 900; font-display: swap; src: url("/assets/fonts/fira-sans-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/fira-sans-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/fira-sans-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --fonte-texto: "Fira Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  --fonte-rotulo: "Fira Sans Condensed", "Fira Sans", "Trebuchet MS", sans-serif;
  --canvas: #eef3f9;
  --panel: #fbfdff;
  --inset: #e2ebf5;
  --hover: #e4ecf6;
  --text: #111315;
  --muted: #3e454b;
  --line: #a8b9ce;
  --control-line: #657d9b;
  --link: #2d5689;
  --link-hover: #143969;
  --pending: #73510a;
  --pending-bg: #fcf4df;
  --pending-line: #9e7c33;
  --focus: #2159a5;
  --hero: #173e72;
  --hero-text: #ffffff;
  --hero-muted: #e0eefc;
  --hero-destaque: #aecbff;
  --on-tom: #ffffff;
  --futuro-1: #285b9c;
  --futuro-2: #a86400;
  --futuro-3: #9b3c9a;
  --futuro-4: #2a8a4a;
  --tom-metropolitana: #285b9c;
  --tom-serra: #7040a0;
  --tom-vale-do-rio-pardo: #006b62;
  --tom-vale-do-sinos: #4b50a5;
  --tom-encosta-da-serra: #b5284b;
  --tom-central: #975500;
  --tom-noroeste: #177044;
  --tom-norte: #a74710;
  --tom-sul: #006979;
  --tom-vale-do-taquari: #953d91;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0d172b;
  --panel: #15243e;
  --inset: #1b2b46;
  --hover: #1a2a45;
  --text: #ffffff;
  --muted: #e2e6e8;
  --line: #415674;
  --control-line: #8ea5c2;
  --link: #aecbff;
  --link-hover: #d7e6ff;
  --pending: #f0cd72;
  --pending-bg: #343124;
  --pending-line: #b39749;
  --focus: #aecbff;
  --hero: #1b2b46;
  --hero-text: #ffffff;
  --hero-muted: #e0eefc;
  --hero-destaque: #aecbff;
  --on-tom: #101d33;
  --futuro-1: #5590e0;
  --futuro-2: #c2862a;
  --futuro-3: #c46fc0;
  --futuro-4: #3fa565;
  --tom-metropolitana: #7db5ff;
  --tom-serra: #bea2fa;
  --tom-vale-do-rio-pardo: #60dbc9;
  --tom-vale-do-sinos: #adb8ff;
  --tom-encosta-da-serra: #ff8ea6;
  --tom-central: #f5bf54;
  --tom-noroeste: #5dd8a1;
  --tom-norte: #ffa86c;
  --tom-sul: #4ad9ed;
  --tom-vale-do-taquari: #e7a0ec;
}
/* Cor de identidade de cada região: fixa pelo identificador, nunca pela posição. */
.regiao, .achado, .ficha, .m-rotulo, .m-regiao { --tom: var(--link); }
.r-metropolitana { --tom: var(--tom-metropolitana); }
.r-serra { --tom: var(--tom-serra); }
.r-vale-do-rio-pardo { --tom: var(--tom-vale-do-rio-pardo); }
.r-vale-do-sinos { --tom: var(--tom-vale-do-sinos); }
.r-encosta-da-serra { --tom: var(--tom-encosta-da-serra); }
.r-central { --tom: var(--tom-central); }
.r-noroeste { --tom: var(--tom-noroeste); }
.r-norte { --tom: var(--tom-norte); }
.r-sul { --tom: var(--tom-sul); }
.r-vale-do-taquari { --tom: var(--tom-vale-do-taquari); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--canvas); color: var(--text); font-family: var(--fonte-texto); font-size: 16px; line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-underline-offset: 5px; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: var(--link); color: var(--canvas); }
.container { width: calc(100% - 64px); max-width: 1280px; margin-inline: auto; }
.icon { width: 24px; height: 24px; display: inline-block; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 10; top: 12px; left: 16px; padding: 12px 20px; background: var(--panel); color: var(--text); border: 2px solid var(--focus); border-radius: 8px; }

/* Cabeçalho */
.site-header { border-bottom: 1px solid var(--line); background: var(--panel); }
.header-inner { min-height: 56px; display: flex; gap: 24px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--fonte-rotulo); font-size: 18px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; text-decoration: none; white-space: nowrap; }
.brand strong { font-weight: 700; }
.brand-symbol { width: 28px; height: 28px; stroke-width: 2.6; color: var(--link); }
.brand-logos { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 7px 16px; border-radius: 999px; background: #ffffff; }
.brand-logos img { width: 56px; height: auto; display: block; }
.brand-logos img:last-child { width: 66px; }
.logo-divider { width: 1px; height: 22px; background: #a8b9ce; }
nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
nav a { display: inline-flex; min-height: 44px; align-items: center; color: var(--text); text-decoration: none; white-space: nowrap; }
nav a:hover { text-decoration: underline; }
.theme-toggle { min-height: 44px; display: inline-flex; gap: 9px; align-items: center; padding: 7px 14px; color: var(--text); background: transparent; border: 1px solid var(--control-line); border-radius: 999px; font-size: 15px; }
.theme-toggle:hover { background: var(--hover); }
.theme-toggle .icon { width: 20px; height: 20px; stroke-width: 1.8; }
.theme-label { min-width: 47px; text-align: left; }
.theme-dark-icon { display: none; }
[data-theme="dark"] .theme-light-icon { display: none; }
[data-theme="dark"] .theme-dark-icon { display: block; }
.toggle-track { display: inline-flex; align-items: center; width: 28px; height: 16px; padding: 2px; border: 1px solid var(--muted); border-radius: 12px; }
.toggle-track span { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
[data-theme="dark"] .toggle-track span { transform: translateX(12px); background: var(--link); }

/* Régua dos quatro futuros: marca do projeto, no rodapé. */
.regua { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: 8px; }
.regua span:nth-child(1) { background: var(--futuro-1); }
.regua span:nth-child(2) { background: var(--futuro-2); }
.regua span:nth-child(3) { background: var(--futuro-3); }
.regua span:nth-child(4) { background: var(--futuro-4); }

/* Escolha: o mapa é o índice; título, busca, ficha e lista no painel ao lado. */
.escolha { --divisa: color-mix(in srgb, var(--line) 55%, var(--panel)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 400px); grid-template-rows: auto 1fr; grid-template-areas: "mapa intro" "mapa lista"; column-gap: 48px; padding-block: 16px 8px; }
.escolha::before { content: ""; grid-column: 2; grid-row: 1 / 3; margin-inline: -24px; background: var(--panel); border: 1px solid var(--divisa); border-radius: 20px; box-shadow: 0 22px 44px -34px rgb(23 62 114 / 55%); }
.intro, .lista { position: relative; min-width: 0; }
.intro { grid-area: intro; display: flex; flex-direction: column; gap: 12px; padding-top: 22px; }
h1 { margin: 0; color: var(--link-hover); font-size: clamp(28px, 2.4vw, 34px); line-height: 1.08; font-weight: 900; letter-spacing: -.02em; text-wrap: balance; }
.lead { margin: -4px 0 0; max-width: 46ch; font-size: 15px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }

/* Busca */
.search { display: flex; flex-direction: column; gap: 10px; }
.search-field { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 6px 0 16px; border: 2px solid var(--control-line); border-radius: 12px; background: var(--panel); color: var(--text); transition: border-color .15s; }
.search-field:focus-within { border-color: var(--link); outline: 3px solid var(--focus); outline-offset: 2px; }
.search-field > .icon { width: 21px; height: 21px; color: var(--link); }
.search input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; color: var(--text); caret-color: var(--link); font-size: 17px; font-weight: 600; appearance: none; }
.search input:focus { outline: none; }
.search input::placeholder { color: var(--muted); font-weight: 400; opacity: 1; }
.search input::-webkit-search-cancel-button { appearance: none; }
#clear-search { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: var(--inset); color: var(--text); }
#clear-search:hover { background: var(--hover); }
#clear-search .icon { width: 20px; height: 20px; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.examples span { font-size: 13px; color: var(--muted); margin-right: 2px; }
.examples button { min-height: 32px; padding: 0 10px; border: 1px solid var(--control-line); border-radius: 999px; background: transparent; color: var(--text); font-size: 13px; font-weight: 600; }
.examples button:hover { background: var(--hover); border-color: var(--link); }
.search-feedback { margin: 0; font-size: 14px; color: var(--muted); }
.search-feedback:empty { display: none; }

/* Municípios encontrados */
.achados { list-style: none; margin: -4px 0 0; padding: 0; border-top: 1px solid var(--divisa); }
.achados li { border-bottom: 1px solid var(--divisa); }
.achado { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-inline: -6px; padding: 7px 6px; border-radius: 8px; color: var(--text); text-decoration: none; line-height: 1.3; }
a.achado:hover { background: color-mix(in srgb, var(--tom) 10%, var(--panel)); }
.achado strong { display: block; font-size: 16px; font-weight: 800; }
.selo-regiao { display: inline-flex; margin-top: 3px; padding: 0 9px; border-radius: 999px; background: var(--tom); color: var(--on-tom); font-size: 13px; font-weight: 600; }
.circulo { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 999px; background: var(--tom); color: var(--on-tom); }
.circulo .icon { width: 18px; height: 18px; }

/* Ficha da região sob o cursor (ou o resumo do projeto, em repouso) */
.fichas { min-height: 188px; display: grid; align-content: start; }
.achados:not([hidden]) ~ .fichas { display: none; }
.ficha { --tinta: color-mix(in srgb, var(--tom) 78%, var(--text)); display: flex; flex-direction: column; gap: 5px; padding: 12px 0 0; border-top: 3px solid var(--tom); }
.ficha--estado { gap: 8px; border-top: 1px solid var(--divisa); }
.ficha-dica { margin: 0; font-size: 14px; color: var(--muted); }
.ficha-lugar { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.ficha-lugar .icon { width: 16px; height: 16px; color: var(--tinta); }
.ficha-nome { margin: 0; color: var(--tinta); font-size: 24px; line-height: 1.1; font-weight: 900; letter-spacing: -.015em; }
.ficha-traco { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.ficha-num { display: grid; grid-template-columns: auto auto 1fr; gap: 8px 28px; margin: 6px 0 0; }
.ficha-num div { min-width: 0; }
.ficha-cidades { grid-column: 1 / -1; }
.ficha-num dt { font-family: var(--fonte-rotulo); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ficha-num dd { margin: 0; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.totals { margin: 0; font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.totals strong { font-weight: 800; font-variant-numeric: tabular-nums; }

/* Mapa */
.mapa { grid-area: mapa; position: sticky; top: 12px; align-self: start; margin: 0; }
.mapa-svg { display: block; width: 100%; height: auto; max-height: calc(100vh - 92px); }
.m-regiao { cursor: pointer; }
.m-regiao:focus { outline: none; }
.m-fundo { fill: color-mix(in srgb, var(--tom) 30%, var(--panel)); transition: fill .18s cubic-bezier(.16, 1, .3, 1); }
.m-muns path { fill: transparent; stroke: color-mix(in srgb, var(--tom) 42%, var(--panel)); stroke-width: .7; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill .12s; }
[data-theme="dark"] .m-fundo { fill: color-mix(in srgb, var(--tom) 40%, var(--panel)); }
.m-regiao:hover .m-fundo, .m-regiao.ativa .m-fundo { fill: color-mix(in srgb, var(--tom) 60%, var(--panel)); }
.m-muns path.sob, .m-muns path.m-achado { fill: var(--tom); }
.m-regiao--pendente { cursor: default; }
.m-regiao--pendente .m-fundo { fill: var(--inset); }
.m-contornos path { fill: none; stroke: var(--canvas); stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.m-rotulos, .m-pino { pointer-events: none; }
.m-rotulo text, text.m-rotulo { fill: color-mix(in srgb, var(--tom) 72%, var(--text)); font-family: var(--fonte-rotulo); font-size: 25px; font-weight: 700; paint-order: stroke; stroke: var(--canvas); stroke-width: 5px; stroke-linejoin: round; transition: opacity .18s; }
.m-rotulo--fora path { fill: none; stroke: var(--control-line); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.m-rotulo--fora circle { fill: var(--tom); stroke: var(--canvas); stroke-width: 2; }
.mapa.buscando .m-regiao.apagada .m-fundo { fill: color-mix(in srgb, var(--inset) 60%, var(--canvas)); }
.mapa.buscando .m-regiao.apagada .m-muns path { stroke: var(--divisa); }
.mapa.buscando .m-rotulo.apagada { opacity: .35; }
/* Com o município marcado, o nome dele toma o lugar do rótulo interno da região. */
text.m-rotulo.sob-pino { opacity: 0; }
.m-pino path { fill: none; stroke: var(--text); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.m-pino circle { fill: var(--text); stroke: var(--canvas); stroke-width: 3; }
.m-pino text { fill: var(--text); font-family: var(--fonte-texto); font-size: 27px; font-weight: 800; paint-order: stroke; stroke: var(--canvas); stroke-width: 7px; stroke-linejoin: round; }
.mapa figcaption { margin-top: 4px; font-size: 13px; color: var(--muted); }

/* Lista das dez regiões */
.lista { grid-area: lista; margin-top: 16px; padding-bottom: 20px; }
.lista:focus { outline: none; }
.lista-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 6px; border-bottom: 2px solid var(--text); }
h2 { margin: 0; font-size: 18px; line-height: 1.15; font-weight: 900; letter-spacing: -.01em; }
.lista-head p { margin: 0; font-family: var(--fonte-rotulo); font-size: 13px; font-weight: 600; color: var(--muted); }
.regioes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.regiao { border-bottom: 1px solid var(--divisa); }
.linha { display: flex; align-items: center; gap: 10px; min-height: 42px; margin-inline: -6px; padding: 4px 6px; border-radius: 8px; color: var(--text); text-decoration: none; transition: background .15s; }
.amostra { width: 14px; height: 14px; flex: none; border-radius: 4px; background: var(--tom); }
.nome-regiao { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.2; }
.num-mun { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.num-mun strong { font-weight: 600; }
a.linha:hover, .regiao.ativa a.linha { background: color-mix(in srgb, var(--tom) 12%, var(--panel)); }
.regiao.ativa .nome-regiao { color: color-mix(in srgb, var(--tom) 78%, var(--text)); font-weight: 800; }
a.linha:focus-visible { outline-offset: -1px; }
.inclui { display: block; margin: -6px 0 6px 24px; font-size: 13px; font-weight: 600; line-height: 1.3; color: color-mix(in srgb, var(--tom) 78%, var(--text)); }
.linha--pendente { flex-wrap: wrap; row-gap: 2px; }
.linha--pendente .amostra { background: var(--inset); }
.linha--pendente .nome-regiao { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 7px; font-size: 13px; font-weight: 700; line-height: 1.4; white-space: nowrap; border: 1px solid; border-radius: 999px; }
.status .icon { width: 16px; height: 16px; stroke-width: 1.8; }
.construction, .ready { color: var(--pending); background: var(--pending-bg); border-color: var(--pending-line); }
.lista-resumo { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.empty-state { text-align: center; padding: 24px 12px 8px; }
.empty-state > .icon { width: 28px; height: 28px; color: var(--muted); }
.empty-state h3 { margin: 10px 0 6px; font-size: 19px; }
.empty-state p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.empty-state button { min-height: 44px; border: 0; border-radius: 999px; padding: 9px 22px; background: var(--link); color: var(--canvas); font-weight: 700; }

/* Rodapé */
.site-footer { margin-top: 32px; background: var(--hero); color: var(--hero-muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 40px; padding-block: 18px; font-size: 13px; }
.project-owner p { margin: 0; }
.project-owner strong { color: #ffffff; }
.project-owner .footer-territory { margin-top: 6px; font-size: 14px; }
.footer-territory span { margin-inline: 4px; }

@media (max-width: 1100px) {
  .escolha { grid-template-columns: minmax(0, 1fr) 360px; column-gap: 48px; }
  .escolha::before { margin-inline: -22px; }
  .regioes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .header-inner { display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; padding-block: 14px; }
  .brand { grid-area: 1 / 1; width: fit-content; }
  .theme-toggle { grid-area: 1 / 2; }
  .brand-logos { grid-area: 2 / 1; justify-self: start; }
  nav { grid-area: 2 / 2; margin-left: 0; justify-content: flex-end; font-size: 16px; }
}
@media (max-width: 899px) {
  .escolha { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "intro" "mapa" "lista"; padding-top: 4px; }
  .escolha::before { display: none; }
  .intro { padding-top: 16px; }
  .mapa { position: static; margin-top: 16px; }
  .mapa-svg { max-height: none; }
  .m-rotulo text, text.m-rotulo { font-size: 32px; }
  .fichas { min-height: 0; }
  .ficha:not(.ficha--estado) { display: none; }
  .ficha--estado { display: flex !important; }
  .ficha-dica { display: none; }
  .regioes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }
  h1 { font-size: clamp(24px, 7.2vw, 30px); }
  .lead { font-size: 14px; }
  .search input { font-size: 16px; }
  .examples span { width: 100%; }
  .totals { gap: 10px 22px; }
  .totals strong { font-size: 19px; }
  .m-rotulo text, text.m-rotulo { font-size: 40px; stroke-width: 7px; }
  .mapa { overflow: hidden; }
  .mapa-svg { width: 118%; }
  .m-rotulo--fora { display: none; }
  .regioes { grid-template-columns: minmax(0, 1fr); }
  .header-inner { gap: 12px 10px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-logos { gap: 11px; padding: 6px 12px; }
  nav { gap: 18px; font-size: 15px; }
  .theme-toggle { justify-self: end; padding-inline: 10px; gap: 7px; font-size: 14px; }
  .theme-label { min-width: 0; }
  .toggle-track { display: none; }
  .achado strong { font-size: 15px; }
}
@media (max-width: 360px) {
  .brand { font-size: 15px; }
  .brand-logos img { width: 48px; }
  .brand-logos img:last-child { width: 58px; }
  nav { font-size: 14px; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .linha, .m-fundo, .m-muns path, .m-rotulo text, text.m-rotulo, .search-field { transition: none; }
}
