/* ==========================================================================
   Quem Faz o Quê? — identidade + homepage
   Layout: editorial assimétrico. Título enorme à esquerda, cena urbana à
   direita, busca como objeto principal com sombra sólida. Cor codifica os
   três níveis de governo: lima = Prefeitura, azul = Estado, coral = União.
   ========================================================================== */

:root {
  /* Paleta da marca */
  --blue: #2855D9;
  --lime: #B9E65C;
  --coral: #FF795D;
  --cream: #FFF8EB;
  --graphite: #202D3D;

  /* Tokens semânticos (tema claro) */
  --bg: var(--cream);
  --surface: #FFFFFF;
  --surface-2: #F7EEDC;
  --ink: var(--graphite);
  --ink-soft: #4A5668;          /* 7.2:1 sobre creme */
  --line: #E4D8C0;
  --line-strong: var(--graphite);
  --accent: var(--blue);        /* 5.9:1 sobre creme */
  --on-accent: #FFFFFF;         /* 6.2:1 sobre azul */
  --hl: var(--lime);
  --error: #B3381F;             /* 5.2:1 sobre branco */
  --error-bg: #FFE9E3;
  --focus: var(--blue);
  --shadow-solid: var(--graphite);

  /* Esferas de governo */
  --mun: var(--lime);
  --mun-ink: var(--graphite);
  --est: var(--blue);
  --est-ink: #FFFFFF;
  --uni: var(--coral);
  --uni-ink: var(--graphite);
  --chip-icon-on: var(--lime);

  /* Faixa Cobre Certo */
  --band: var(--graphite);
  --band-ink: var(--cream);
  --band-soft: #C9D1DD;
  --band-line: #3A4859;

  /* Ilustração */
  --art-sun: var(--lime);
  --art-quarter: var(--coral);
  --art-bld1: #3D6AF0;
  --art-bld2: #A9BCF5;
  --art-win: var(--cream);
  --art-civic: #FFFFFF;
  --art-col: #F1E6CF;
  --art-street: var(--graphite);
  --art-walk: #E4D8C0;
  --art-lane: var(--cream);
  --art-leaf: #8FC23A;

  /* Tipografia */
  --f-display: "Bricolage Grotesque", "Arial Rounded MT Bold", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Escala tipográfica (mobile → desktop) */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: clamp(1.15rem, 1rem + 0.6vw, 1.375rem);
  --t-xl: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  --t-2xl: clamp(2rem, 1.4rem + 3vw, 3.5rem);
  --t-hero: clamp(2.4rem, 1.2rem + 4.4vw, 4.25rem);

  /* Forma e espaço */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 28px;
  --r-pill: 999px;
  --gutter: 16px;
  --section: clamp(4rem, 3rem + 5vw, 7.5rem);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121922; --surface: #1A2330; --surface-2: #222D3C;
    --ink: #FFF8EB; --ink-soft: #B7C0CE; --line: #2F3C4E; --line-strong: #FFF8EB;
    --accent: #87A3FF; --on-accent: #0E1733; --hl: var(--lime);
    --error: #FF9F88; --error-bg: #3A211C; --focus: #B9E65C; --shadow-solid: #87A3FF;
    --est: #87A3FF; --est-ink: #0E1733; --chip-icon-on: var(--blue);
    --band: #0B1118; --band-ink: #FFF8EB; --band-soft: #B7C0CE; --band-line: #263243;
    --art-bld1: #3456C4; --art-bld2: #2A3B5E; --art-win: #FFE7A8; --art-civic: #E9E1D0;
    --art-col: #C9BFA9; --art-street: #0B1118; --art-walk: #2F3C4E; --art-lane: #6D7A8C; --art-leaf: #7DAE2E;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121922; --surface: #1A2330; --surface-2: #222D3C;
  --ink: #FFF8EB; --ink-soft: #B7C0CE; --line: #2F3C4E; --line-strong: #FFF8EB;
  --accent: #87A3FF; --on-accent: #0E1733; --hl: var(--lime);
  --error: #FF9F88; --error-bg: #3A211C; --focus: #B9E65C; --shadow-solid: #87A3FF;
  --est: #87A3FF; --est-ink: #0E1733; --chip-icon-on: var(--blue);
  --band: #0B1118; --band-ink: #FFF8EB; --band-soft: #B7C0CE; --band-line: #263243;
  --art-bld1: #3456C4; --art-bld2: #2A3B5E; --art-win: #FFE7A8; --art-civic: #E9E1D0;
  --art-col: #C9BFA9; --art-street: #0B1118; --art-walk: #2F3C4E; --art-lane: #6D7A8C; --art-leaf: #7DAE2E;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-md);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-tap-highlight-color: color-mix(in srgb, var(--accent) 22%, transparent);
}
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 88px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: var(--t-xs);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.eyebrow__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mun); box-shadow: 14px 0 0 var(--est), 28px 0 0 var(--uni); margin-right: 28px; }

/* ---------- Header ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 30; background: var(--bg);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }

.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); }
.logo__mark { width: 40px; height: 40px; flex: none; transition: transform .35s var(--ease); }
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.05); }
.logo__bubble { fill: var(--blue); }
.logo__q { fill: none; stroke: var(--cream); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.logo__dot { fill: var(--lime); }
.logo__word { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.logo__o { color: var(--accent); }
.logo--sm .logo__mark { width: 32px; height: 32px; }
.logo--sm .logo__word { font-size: 1.05rem; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 var(--t-sm) var(--f-body); color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
  padding: 8px 14px; min-height: 44px; cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

.nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) 20px max(var(--gutter), env(safe-area-inset-left, 0px));
  display: none; flex-direction: column; gap: 12px;
}
.nav.is-open { display: flex; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.nav__link {
  display: block; padding: 12px 4px; text-decoration: none; font-weight: 700;
  font-size: var(--t-lg); border-bottom: 1px solid var(--line);
}
.nav__link:hover { color: var(--accent); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav { position: static; display: flex; flex-direction: row; align-items: center; gap: 24px; padding: 0; background: none; border: 0; }
  .nav__list { flex-direction: row; gap: 4px; }
  .nav__link { font-size: var(--t-sm); border: 0; padding: 8px 12px; border-radius: var(--r-pill); transition: background .2s; }
  .nav__link:hover { background: var(--surface-2); color: var(--ink); }
}

/* ---------- Botões (componente) ---------- */
.btn {
  --btn-bg: var(--surface); --btn-ink: var(--ink); --btn-border: var(--line-strong);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 12px 22px;
  font: 700 var(--t-md)/1.1 var(--f-body);
  color: var(--btn-ink); background: var(--btn-bg);
  border: 2px solid var(--btn-border); border-radius: var(--r-pill);
  text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--shadow-solid); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn--primary { --btn-bg: var(--accent); --btn-ink: var(--on-accent); --btn-border: var(--accent); }
.btn--ink { --btn-bg: var(--ink); --btn-ink: var(--bg); --btn-border: var(--ink); }
.btn--lime { --btn-bg: var(--lime); --btn-ink: var(--graphite); --btn-border: var(--lime); }
.btn--lime:hover { box-shadow: 0 4px 0 var(--band-ink); }
.btn--ghost { --btn-bg: transparent; --btn-border: var(--ink-soft); }
.btn--sm { min-height: 44px; padding: 8px 16px; font-size: var(--t-sm); }
.btn--lg { min-height: 60px; font-size: var(--t-lg); padding-inline: 28px; }
.btn--block { width: 100%; }

.btn__icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--lime); flex: none;
}
.btn__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--graphite); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.btn:hover .btn__icon svg { transform: translateX(3px); }

/* Estado de carregamento */
.spinner {
  display: none; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--on-accent) 35%, transparent);
  border-top-color: var(--on-accent);
  animation: spin .8s linear infinite;
}
.btn.is-loading { cursor: progress; transform: none; box-shadow: none; }
.btn.is-loading .btn__icon { display: none; }
.btn.is-loading .spinner { display: inline-block; }
.btn[disabled] { opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) var(--section); position: relative; }
.hero__grid {
  display: grid; gap: 32px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "copy" "finder" "scene";
}
.hero__copy { grid-area: copy; display: grid; gap: 20px; }
.hero__title {
  font-size: var(--t-hero); font-weight: 800; line-height: .98; letter-spacing: -0.045em;
  font-variation-settings: "opsz" 96;
}
.hero__title-b { display: block; color: var(--accent); margin-top: .12em; }
.hl {
  color: var(--graphite); background: none; position: relative; z-index: 0; padding-inline: .08em;
  white-space: nowrap;
}
.hl::before {
  content: ""; position: absolute; z-index: -1; left: -.04em; right: -.04em; top: .14em; bottom: .02em;
  background: var(--hl); border-radius: .22em .5em .28em .6em;
  transform: rotate(-2deg);
  animation: swipe .7s .3s var(--ease) both;
  transform-origin: left center;
}
@keyframes swipe { from { transform: rotate(-2deg) scaleX(.15); } to { transform: rotate(-2deg) scaleX(1); } }
.hero__lead { font-size: var(--t-lg); max-width: 34ch; color: var(--ink-soft); }

/* Cena ilustrada */
.scene { grid-area: scene; margin: 0; position: relative; }
.scene__art { display: block; width: 100%; height: auto; }
.s-sun { fill: var(--art-sun); }
.s-quarter { fill: var(--art-quarter); }
.s-bld1 { fill: var(--art-bld1); }
.s-bld2 { fill: var(--art-bld2); }
.s-win rect { fill: var(--art-win); }
.s-civic { fill: var(--art-civic); }
.s-col rect { fill: var(--art-col); }
.s-trunk { fill: var(--graphite); }
.s-leaf { fill: var(--art-leaf); }
.s-leaf2 { fill: var(--lime); }
.s-walk { fill: var(--art-walk); }
.s-street { fill: var(--art-street); }
.s-lane rect { fill: var(--art-lane); }
.s-hole { fill: #000; opacity: .55; }
.s-pole { fill: var(--graphite); }
.s-lamp { fill: #8A94A3; } /* lâmpada apagada */
.s-pole-arm { fill: none; stroke: var(--graphite); stroke-width: 6; stroke-linecap: round; }
.s-bus-body { fill: var(--blue); }
.s-bus-win { fill: var(--cream); }
.s-bus-stripe { fill: var(--lime); }
.s-wheel { fill: var(--graphite); stroke: var(--cream); stroke-width: 3; }
.s-bus { animation: idle 3.2s ease-in-out infinite; }
@keyframes blink { 0%, 70% { opacity: 1; } 71%, 85% { opacity: .2; } }
@keyframes idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }

.scene__tags { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
  padding: 6px 14px 6px 8px; font-size: var(--t-sm); line-height: 1.2; white-space: nowrap;
  box-shadow: 0 3px 0 var(--line-strong);
}
@media (max-width: 400px) { .tag { white-space: normal; } }
.tag__dot { width: 14px; height: 14px; border-radius: 50%; flex: none; border: 1.5px solid var(--graphite); }
.tag--mun .tag__dot { background: var(--mun); }
.tag--est .tag__dot { background: var(--est); }
.tag--uni .tag__dot { background: var(--uni); }
.tag__arrow { color: var(--ink-soft); }
.scene__cap { margin-top: 12px; font-size: var(--t-xs); color: var(--ink-soft); font-family: var(--f-mono); }

@media (min-width: 600px) {
  .scene__tags { margin: 0; position: absolute; inset: 0 0 auto; height: calc(100% - 2.5em); pointer-events: none; }
  .tag { position: absolute; left: var(--x); top: var(--y); animation: pop .5s var(--ease) both; }
  .tag:nth-child(2) { animation-delay: .15s; }
  .tag:nth-child(3) { animation-delay: .3s; }
}
@keyframes pop { from { transform: translateY(8px) scale(.94); } to { transform: none; } }

/* Busca */
.finder { grid-area: finder; display: grid; gap: 20px; min-width: 0; }
.finder__form {
  background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--r-lg);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 8px 8px 0 var(--accent);
  display: grid; gap: 22px;
}
.finder__set { border: 0; margin: 0; padding: 0; min-width: 0; }
.finder__legend {
  display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 12px;
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-lg); letter-spacing: -0.01em;
}
.step-pill {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: var(--bg); font: 700 .875rem var(--f-mono);
}

/* Chips de categoria (componente) */
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 520px) { .chips { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.chip { position: relative; }
.chips__more {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; min-height: 44px; padding: 8px 16px;
  font: 700 var(--t-sm) var(--f-body); color: var(--ink); background: transparent;
  border: 1.5px solid var(--ink-soft); border-radius: var(--r-pill); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.chips__more::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s var(--ease); }
.chips__more[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.chips__more:hover { border-color: var(--ink); background: var(--surface-2); }
.chip__btn {
  display: flex; flex-direction: row; align-items: center; gap: 10px; width: 100%; height: 100%;
  padding: 10px 12px; min-height: 56px; text-align: left; font: 700 var(--t-sm)/1.2 var(--f-body); color: var(--ink);
  background: var(--surface-2); border: 1.5px solid transparent; border-radius: var(--r-md); cursor: pointer;
  transition: background .2s, border-color .2s, transform .18s var(--ease);
}
.chip__btn svg { flex: none; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.chip__btn:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.chip__btn:active { transform: none; }
.chip__btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip__btn[aria-pressed="true"] svg { stroke: var(--chip-icon-on); }
@media (min-width: 520px) {
  .chip__btn { flex-direction: column; align-items: flex-start; min-height: 84px; padding: 12px; overflow-wrap: anywhere; }
}

/* Campos (componente) */
.field { display: grid; gap: 8px; min-width: 0; }
.field__label { font-weight: 700; font-size: var(--t-sm); padding: 0; }
.field__input {
  width: 100%; font: inherit; font-size: var(--t-md); color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--ink-soft); border-radius: var(--r-md);
  padding: 14px 16px; min-height: 48px; resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.field__input::placeholder { color: var(--ink-soft); opacity: .85; }
.field__input:hover { border-color: var(--ink); }
.field__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.field__input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 4px color-mix(in srgb, var(--error) 18%, transparent); }
.field__meta { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-xs); color: var(--ink-soft); }
.field__count { font-family: var(--f-mono); font-variant-numeric: tabular-nums; flex: none; }
.field__error {
  display: flex; gap: 8px; align-items: flex-start;
  color: var(--error); background: var(--error-bg); border-radius: var(--r-sm);
  padding: 10px 12px; font-size: var(--t-sm); font-weight: 700;
}
.field__error::before { content: "!"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--error); color: var(--surface); font-size: .8rem; }
.select { position: relative; }
.select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; pointer-events: none;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg);
}
.select select { appearance: none; padding-right: 40px; }

/* ---------- Resultado (componente) ---------- */
.result:empty { display: none; }
.result:focus { outline: none; }
.result__card {
  background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--r-lg);
  overflow: hidden; animation: rise .45s var(--ease) both;
}
@keyframes rise { from { transform: translateY(12px); } to { transform: none; } }
.result__top { padding: 20px clamp(18px, 3vw, 28px); display: grid; gap: 12px; border-bottom: 1.5px dashed var(--line); }
.result__label { font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.result__who { font-size: var(--t-xl); font-weight: 800; line-height: 1.05; }
.result__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.result__body { padding: 20px clamp(18px, 3vw, 28px); display: grid; gap: 18px; }
.result__body h4 { margin: 0 0 4px; font: 700 var(--t-sm) var(--f-body); }
.result__body p, .result__body li { color: var(--ink-soft); font-size: var(--t-sm); }
.result__body ul { margin: 0; padding-left: 1.1em; }
.result__split { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.result__split li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: baseline; color: var(--ink); }
.result__split .badge { justify-self: start; }
.result__source {
  font-size: var(--t-xs); color: var(--ink-soft); background: var(--surface-2);
  border-radius: var(--r-sm); padding: 10px 12px;
}
.result__source strong { color: var(--ink); }
.result__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.result__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }

/* Papel de cada cargo no resultado */
.trio { list-style: none; margin: 0; padding: 16px clamp(18px, 3vw, 28px) 0; display: grid; gap: 8px; }
@media (min-width: 600px) { .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trio__item {
  --lvl: var(--mun);
  display: grid; gap: 6px; align-content: start;
  padding: 14px; border-radius: var(--r-md); border: 1.5px solid var(--line);
  transition: transform .2s var(--ease);
}
.trio__item[data-level="est"] { --lvl: var(--est); }
.trio__item[data-level="uni"] { --lvl: var(--uni); }
.trio__role { display: flex; align-items: center; gap: 8px; font: 700 var(--t-md)/1.2 var(--f-display); letter-spacing: -0.01em; }
.trio__dot { width: 14px; height: 14px; border-radius: 50%; flex: none; border: 2px solid var(--lvl); }
.trio__status { font: 500 var(--t-xs) var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.trio__text { font-size: var(--t-sm); color: var(--ink-soft); }
.trio__item--main { border: 2px solid var(--line-strong); background: var(--surface-2); }
.trio__item--main .trio__dot { background: var(--lvl); border-color: var(--graphite); }
.trio__item--main .trio__status { color: var(--ink); font-weight: 700; }
.trio__item--main .trio__text { color: var(--ink); }
.trio__item--part { border-style: dashed; }
.trio__item--none { opacity: .62; }
.trio__item--none .trio__dot { border-color: var(--ink-soft); }

/* Passo a passo */
.wizard__progress { font: 500 var(--t-xs) var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.finder__form > .wizard__progress { margin-bottom: -10px; }
.linkback {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin-left: -4px;
  font: 700 var(--t-sm) var(--f-body); color: var(--accent); background: none; border: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.linkback:hover { text-decoration-thickness: 2px; }
.pick { list-style: none; margin: 0; padding: 16px clamp(18px, 3vw, 28px) 0; display: grid; gap: 8px; }
.pick__btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px;
  padding: 12px 16px; text-align: left; font: 700 var(--t-md)/1.3 var(--f-body); color: var(--ink);
  background: var(--surface-2); border: 2px solid transparent; border-radius: var(--r-md); cursor: pointer;
  transition: border-color .2s, transform .18s var(--ease), background .2s;
}
.pick__btn:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.pick__btn:active { transform: none; }
.pick__btn--alt { background: transparent; border: 1.5px dashed var(--ink-soft); font-weight: 400; }
.pick__go { flex: none; font-size: 1.25rem; color: var(--accent); }
.pick__tag { display: block; margin-top: 4px; font: 500 var(--t-xs) var(--f-mono); font-style: normal; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.answer { padding: 4px clamp(18px, 3vw, 28px) 0; display: grid; gap: 18px; }
.answer section { display: grid; gap: 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.answer p { color: var(--ink-soft); font-size: var(--t-md); max-width: 62ch; }
.answer .result__h { margin: 0; font-size: var(--t-md); }
.answer__q { font: 700 var(--t-lg)/1.25 var(--f-display); letter-spacing: -0.01em; }
.also { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.also li { line-height: 1.45; }
.holder { font-size: var(--t-sm); color: var(--ink); margin: 10px 0 0; }
.holder__tag { display: inline-block; font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft, var(--ink)); margin-right: 4px; }
.holder a { color: var(--accent); text-decoration: underline; }
.trio__item .holder { margin-top: 8px; }
.answer__note { font-size: var(--t-sm); color: var(--ink); background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; }
.escalate__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.escalate__list li { font-size: var(--t-sm); color: var(--ink-soft); }
.escalate__list strong { display: block; color: var(--ink); }
.result__meta .wizard__progress { margin-left: auto; }
.noscript { margin: 0; padding: 12px var(--gutter); background: var(--coral); color: var(--graphite); font-weight: 700; }

/* Localidade opcional */
.where { border-top: 1px dashed var(--line); padding-top: 4px; }
.where summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; cursor: pointer; list-style: none;
  font: 700 var(--t-sm) var(--f-body); color: var(--ink);
}
.where summary::-webkit-details-marker { display: none; }
.where summary::after { content: ""; width: 8px; height: 8px; flex: none; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s var(--ease); }
.where[open] summary::after { transform: rotate(-135deg); }
.where__grid { display: grid; gap: 12px; padding: 4px 0 8px; }
@media (min-width: 480px) { .where__grid { grid-template-columns: 1fr 1.3fr; } }
.where__note { font-size: var(--t-xs); color: var(--ink-soft); }

.result__lead { font-size: var(--t-sm); color: var(--ink-soft); max-width: 60ch; }
.guide { list-style: none; margin: 0; padding: 16px clamp(18px, 3vw, 28px) 0; display: grid; gap: 8px; }
@media (min-width: 600px) { .guide { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guide__item { display: grid; gap: 6px; align-content: start; justify-items: start; padding: 14px; border-radius: var(--r-md); border: 1.5px solid var(--line); }
.guide__q { font: 700 var(--t-md)/1.25 var(--f-display); letter-spacing: -0.01em; }
.guide__hint { font-size: var(--t-sm); color: var(--ink-soft); }

.result__err {
  margin: 16px clamp(18px, 3vw, 28px) 0; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--error-bg); display: grid; gap: 6px;
}
.result__err-tag {
  justify-self: start; font: 700 var(--t-xs)/1 var(--f-body); text-transform: uppercase; letter-spacing: .06em;
  background: var(--coral); color: var(--graphite); padding: 5px 10px; border-radius: var(--r-pill);
}
.result__err p { font-size: var(--t-sm); color: var(--ink); }

/* Situações comuns e regras */
.result__h { margin: 0 0 12px; font: 700 var(--t-lg)/1.2 var(--f-display); letter-spacing: -0.01em; }
.cases, .rules { padding: 22px clamp(18px, 3vw, 28px) 0; }
.cases__list { list-style: none; margin: 0; padding: 0; display: grid; }
.case { display: grid; gap: 6px; justify-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.case:first-child { border-top: 0; padding-top: 0; }
.case__q { font-weight: 700; font-size: var(--t-md); color: var(--ink); }
.case__a { font-size: var(--t-sm); color: var(--ink-soft); }
.case .badge { white-space: normal; }
.rules__list { margin: 0; display: grid; gap: 0; border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.rules__row { display: grid; gap: 4px; padding: 12px 14px; }
.rules__row + .rules__row { border-top: 1px solid var(--line); }
.rules__row dt { font: 500 var(--t-xs) var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.rules__row dd { margin: 0; font-size: var(--t-sm); color: var(--ink); }
@media (min-width: 600px) { .rules__row { grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: baseline; } }
.howto { border: 1.5px solid var(--line); border-radius: var(--r-md); }
.howto summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; min-height: 48px; cursor: pointer; list-style: none;
  font: 700 var(--t-md) var(--f-body);
}
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s var(--ease); }
.howto[open] summary::after { transform: rotate(-135deg); }
.howto summary:hover { background: var(--surface-2); }
.howto__body { display: grid; gap: 16px; padding: 4px 16px 16px; }

/* Badges (componente) */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font: 700 var(--t-xs)/1 var(--f-body); padding: 7px 12px; border-radius: var(--r-pill);
  border: 1.5px solid transparent; white-space: nowrap;
}
.badge--mun { background: var(--mun); color: var(--mun-ink); }
.badge--est { background: var(--est); color: var(--est-ink); }
.badge--uni { background: var(--uni); color: var(--uni-ink); }
.badge--var { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.badge--demo { background: transparent; color: var(--ink-soft); border-color: currentColor; font-family: var(--f-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }

/* Carregamento: esqueleto */
.skeleton { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 14px; }
.skeleton__line { height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--line) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
.skeleton__line--lg { height: 30px; width: 55%; }
.skeleton__line--md { width: 85%; }
.skeleton__line--sm { width: 40%; }
.skeleton__text { font-size: var(--t-sm); color: var(--ink-soft); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Erro geral */
.alert {
  display: grid; gap: 12px; padding: 20px; border-radius: var(--r-lg);
  background: var(--error-bg); color: var(--ink); border: 2px solid var(--error);
}
.alert strong { color: var(--error); }

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    grid-template-areas: "copy scene" "finder scene";
    column-gap: 56px; row-gap: 36px;
  }
  .scene { align-self: start; margin-top: 24px; position: sticky; top: 100px; }
  .finder { max-width: 680px; }
}

/* ---------- Seções ---------- */
.section { padding-block: var(--section); }
.section__head { display: grid; gap: 14px; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section__title { font-size: var(--t-2xl); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; max-width: 18ch; }
.section__lead { color: var(--ink-soft); font-size: var(--t-lg); max-width: 44ch; }
@media (min-width: 860px) {
  .section__head--split { grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; }
}

/* Como funciona */
.how { border-top: 2px solid var(--line-strong); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.step {
  position: relative; display: grid; gap: 10px; align-content: start;
  padding: 24px; border-radius: var(--r-lg); background: var(--surface);
  border: 1.5px solid var(--line);
}
.step p { color: var(--ink-soft); max-width: 36ch; }
.step__num {
  font-family: var(--f-display); font-weight: 800; font-size: 4.5rem; line-height: .8; letter-spacing: -0.06em;
  color: var(--accent);
}
.step:nth-child(2) .step__num { color: var(--ink); }
.step:nth-child(3) { background: var(--lime); border-color: var(--lime); color: var(--graphite); }
.step:nth-child(3) p { color: var(--graphite); }
.step:nth-child(3) .step__num { color: var(--graphite); }
.step__title { font-size: var(--t-xl); font-weight: 700; line-height: 1.1; }
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .step:nth-child(2) { margin-top: 56px; }
  .step:nth-child(3) { margin-top: 112px; }
}

/* Quem é quem */
.levels { background: var(--surface-2); }
.levels__grid { display: grid; gap: 16px; }
@media (min-width: 860px) { .levels__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.level {
  display: grid; gap: 10px; align-content: start;
  background: var(--surface); border-radius: var(--r-lg); padding: 24px;
  border: 1.5px solid var(--line); position: relative; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.level:hover { transform: translateY(-4px); box-shadow: 0 10px 0 -2px var(--level-c); }
.level::after {
  content: ""; position: absolute; right: -36px; top: -36px; width: 110px; height: 110px; border-radius: 50%;
  background: var(--level-c);
}
.level--mun { --level-c: var(--mun); }
.level--est { --level-c: var(--est); }
.level--uni { --level-c: var(--uni); }
.level--est::after { border-radius: 24px; transform: rotate(18deg); }
.level--uni::after { border-radius: 0 0 0 110px; right: 0; top: 0; width: 84px; height: 84px; }
.level__floor { padding-right: 72px; font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.level__name { font-size: var(--t-xl); font-weight: 800; max-width: 12ch; }
.level__group { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.level__role-label { font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.person { display: grid; gap: 2px; }
.person__name { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-weight: 700; font-size: var(--t-md); }
.person__term {
  flex: none; font: 500 var(--t-xs) var(--f-mono); font-variant-numeric: tabular-nums;
  padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--ink);
}
.person__desc { color: var(--ink-soft); font-size: var(--t-sm); }
.level__cares { margin-top: 4px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--t-sm); color: var(--ink-soft); }
.level__cares strong { color: var(--ink); }
.levels__note { margin-top: 28px; max-width: 70ch; color: var(--ink-soft); }
.levels__note strong { color: var(--ink); }

/* ---------- Cobre Certo ---------- */
.cobre { background: var(--band); color: var(--band-ink); padding-block: var(--section); position: relative; overflow: hidden; }
.cobre::before {
  content: "?"; position: absolute; right: -0.08em; bottom: -0.28em;
  font: 800 clamp(16rem, 40vw, 38rem)/1 var(--f-display); color: var(--band-line);
  pointer-events: none;
}
.cobre__grid { position: relative; display: grid; gap: 48px; }
@media (min-width: 960px) { .cobre__grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 64px; align-items: start; } }
.cobre__intro { display: grid; gap: 20px; align-content: start; }
.cobre__brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.25rem var(--f-display); letter-spacing: -0.02em; }
.cobre__mark { width: 32px; height: 32px; }
.cobre__mark rect { fill: var(--lime); }
.cobre__mark path { fill: none; stroke: var(--graphite); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.cobre__title { font-size: var(--t-2xl); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; max-width: 14ch; }
.cobre__title-hl { color: var(--lime); }
.cobre__lead { color: var(--band-soft); font-size: var(--t-lg); max-width: 40ch; }

.ladder { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 0; }
.ladder__step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--band-line); }
.ladder__step strong { display: block; font-size: var(--t-md); margin-bottom: 2px; }
.ladder__step p { color: var(--band-soft); font-size: var(--t-sm); }
.ladder__n {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  font: 800 1.25rem var(--f-display); background: var(--band-line); color: var(--band-ink);
}
.ladder__step:nth-child(2) .ladder__n { transform: translateY(4px); }
.ladder__step:nth-child(3) .ladder__n { background: var(--coral); color: var(--graphite); transform: translateY(8px); }

.composer {
  background: var(--surface); color: var(--ink); border-radius: var(--r-lg);
  padding: clamp(18px, 3vw, 28px); display: grid; gap: 20px; min-width: 0;
  box-shadow: 10px 10px 0 var(--lime);
}
.composer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.composer__title { font-size: var(--t-xl); font-weight: 800; }
.composer__form { display: grid; gap: 16px; }
.composer__row { display: grid; gap: 16px; }
@media (min-width: 560px) { .composer__row { grid-template-columns: 1.4fr 1fr; } }

.segmented { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.segmented__track { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: var(--r-pill); padding: 4px; position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  text-align: center; padding: 10px 12px; border-radius: var(--r-pill); font-weight: 700; font-size: var(--t-sm);
  cursor: pointer; transition: background .2s, color .2s; min-height: 44px; display: grid; place-items: center;
}
.segmented label:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.segmented input:checked + label { background: var(--ink); color: var(--bg); }
.segmented input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

.letter {
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 18px; display: grid; gap: 14px; min-width: 0;
}
.letter__meta { margin: 0; display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1.5px dashed var(--line); }
.letter__meta div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.letter__meta dt { font: 500 var(--t-xs) var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.letter__meta dd { margin: 0; font-weight: 700; font-size: var(--t-sm); overflow-wrap: anywhere; }
.letter__body { white-space: pre-line; font-size: var(--t-sm); overflow-wrap: anywhere; }
.letter__body mark { background: var(--lime); color: var(--graphite); border-radius: 4px; padding: 0 2px; }
.letter.is-updated { animation: flash .5s var(--ease); }
@keyframes flash { 0% { border-color: var(--accent); } 100% { border-color: var(--line); } }

.composer__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.composer__status { font-weight: 700; font-size: var(--t-sm); color: var(--ink); }
.composer__status.is-ok::before { content: "✓ "; color: var(--accent); }
.composer__context { background: var(--surface-2); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 8px; }
.composer__context-title { font: 700 var(--t-sm) var(--f-body); }
.composer__context dl { margin: 0; display: grid; gap: 6px; }
.composer__context dl div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.composer__context dt { font: 500 var(--t-xs) var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.composer__context dd { margin: 0; font-size: var(--t-sm); font-weight: 700; overflow-wrap: anywhere; }
.escalate { display: grid; gap: 10px; padding-top: 16px; border-top: 1px dashed var(--line); }
.escalate__title { font: 700 var(--t-md) var(--f-display); }
.composer__note { font-size: var(--t-xs); color: var(--ink-soft); }

/* ---------- Rodapé ---------- */
.footer { padding-block: var(--section) 40px; border-top: 2px solid var(--line-strong); }
.footer__pillars { display: grid; gap: 32px; }
@media (min-width: 860px) {
  .pillar { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 40px; }
  .sources { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
}
.pillar { display: grid; gap: 10px; align-content: start; }
.pillar__title { font-size: var(--t-xl); font-weight: 800; }
.pillar p { color: var(--ink-soft); max-width: 38ch; }
.pillar em { font-style: normal; color: var(--ink); font-weight: 700; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; }
.sources a {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; font-weight: 700; font-size: var(--t-sm);
}
.sources a::after { content: "↗"; color: var(--accent); transition: transform .2s var(--ease); }
.sources a:hover { color: var(--accent); }
.sources a:hover::after { transform: translate(2px, -2px); }
.footer__base {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
  display: grid; gap: 10px; color: var(--ink-soft); font-size: var(--t-sm);
}
@media (min-width: 860px) { .footer__base { grid-template-columns: auto 1fr; align-items: center; column-gap: 32px; } .footer__small { grid-column: 1 / -1; } }
.footer__small { font-size: var(--t-xs); }

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hl::before { animation: none; }
}

/* ---------- Avisar erro ---------- */
.report__wrap { max-width: 720px; }
.report__form { display: grid; gap: 16px; }
.report__ctx { font-size: var(--t-sm); background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; }
.report__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.report__status { margin: 0; font-size: var(--t-sm); color: var(--ink); }
.report__trap { display: none; }
.field__opt { color: var(--ink-soft); font-weight: 400; }
.footer__who { font-size: var(--t-sm); max-width: 60ch; }
.footer__who a { color: inherit; text-decoration: underline; }
.sources__note { display: block; padding: 14px 0; font-size: var(--t-sm); color: var(--ink-soft); border-bottom: 1px solid var(--line); }
