/* Identidade BNTHR: ver marca/guia/index.html */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/Archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --tinta: #111111;
  --papel: #FFFFFF;
  --marca-texto: #FFDD00;

  --fundo: var(--papel);
  --texto: var(--tinta);
  --nevoa: #EEF0F2;
  --grafite: #5F6368;
  --linha: #D9DCE0;

  --margem: clamp(16px, 4vw, 56px);
  --raio: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fundo: #111111;
    --texto: #F4F4F4;
    --nevoa: #1D1D1F;
    --grafite: #A6ABB2;
    --linha: #333336;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fundo: #111111;
  --texto: #F4F4F4;
  --nevoa: #1D1D1F;
  --grafite: #A6ABB2;
  --linha: #333336;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--texto) var(--fundo); }

body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  caret-color: var(--texto);
  accent-color: var(--tinta);
}

::selection { background: var(--marca-texto); color: var(--tinta); }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--marca-texto); }
:focus-visible { outline: 3px solid var(--texto); outline-offset: 3px; }

h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.titulo { font-weight: 800; font-stretch: 75%; letter-spacing: -0.01em; line-height: 0.95; }

/* o marca-texto: sempre fundo amarelo com tinta por cima */
.destaque {
  background: var(--marca-texto);
  color: var(--tinta);
  text-decoration: none;
  font-weight: 700;
  padding: 0.1em 0.35em;
}
.destaque:hover { background: var(--texto); color: var(--fundo); }

.pular {
  position: absolute; left: var(--margem); top: -4rem; z-index: 10;
  background: var(--marca-texto); color: var(--tinta); padding: 0.5rem 0.75rem; font-weight: 700;
}
.pular:focus { top: 0.75rem; }

/* ---------- topo ---------- */

.topo { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem var(--margem); }
.logo { display: block; line-height: 0; }
.logo svg { height: 26px; width: auto; display: block; }
.topo nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.25rem 1.5rem; font-weight: 500; margin-left: auto; }

/* seletor de idioma: texto pequeno e cinza, ao lado do botão de tema */
.idioma { font-size: 0.875rem; font-weight: 600; color: var(--grafite); text-decoration: none; }
.idioma:hover { color: var(--texto); }

/* botão de tema: só um ícone discreto, sem fundo nem borda */
.tema {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-right: -9px; padding: 0;
  border: 0; border-radius: 50%; background: none;
  color: var(--grafite); cursor: pointer;
}
.tema[hidden] { display: none; }
.tema:hover { color: var(--texto); }
.tema svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.tema .sol { display: none; }
.tema[aria-pressed="true"] .sol { display: block; }
.tema[aria-pressed="true"] .lua { display: none; }
.topo nav a { text-decoration: none; }
.topo nav a:hover { text-decoration: underline; text-decoration-color: var(--marca-texto); }

/* ---------- abertura: o B como gráfico ---------- */

.abre {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(2rem, 6vw, 5rem) var(--margem) clamp(2.5rem, 6vw, 5rem);
}

.b {
  --alt: clamp(260px, 38vw, 520px);
  --u: calc(var(--alt) / 200);
  display: grid;
  grid-template-columns: calc(40 * var(--u)) calc(108 * var(--u));
  grid-template-rows: calc(91 * var(--u)) calc(18 * var(--u)) calc(91 * var(--u));
  height: var(--alt);
}
.b .eixo { grid-row: 1 / -1; grid-column: 1; background: var(--texto); }
.b .barra {
  grid-column: 2;
  margin-left: -1px;
  display: flex;
  align-items: center;
  padding-left: calc(12 * var(--u));
  border-radius: 0 calc(46 * var(--u)) calc(46 * var(--u)) 0;
  background: var(--texto);
  color: var(--fundo);
  text-decoration: none;
  font-weight: 800;
  font-stretch: 75%;
  font-size: calc(21 * var(--u));
  line-height: 1;
}
.b .de-cima { grid-row: 1; width: calc(90 * var(--u) + 1px); }
.b .de-baixo { grid-row: 3; width: calc(108 * var(--u) + 1px); }
.b .barra:hover, .b .barra:focus-visible { background: var(--marca-texto); color: var(--tinta); }

/* o único movimento da página: as barras crescem a partir do eixo (ligado pelo app.js) */
@media (prefers-reduced-motion: no-preference) {
  .anima .b .barra { animation: crescer 0.7s var(--ease) both; }
  .anima .b .de-baixo { animation-delay: 0.12s; }
  @keyframes crescer {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
}

.fala h1 { font-size: clamp(3.25rem, 9vw, 8.5rem); margin-bottom: 0.25em; }
.fala .frase { font-size: clamp(1.35rem, 2.6vw, 2.25rem); font-weight: 700; line-height: 1.15; margin-bottom: 0.6rem; }
.fala p { max-width: 34em; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.45; }
.atalhos { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; font-weight: 600; margin-top: 1.25rem; font-size: 1.0625rem !important; }

/* ---------- números com contexto ---------- */

main { padding: 0 var(--margem); }

.numeros { margin-bottom: clamp(3.5rem, 8vw, 6rem); }
.numeros dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 3px solid var(--texto); }
.numeros dl > div { padding: 1.25rem 1.5rem 1.4rem 0; border-bottom: 1px solid var(--linha); }
.numeros dl > div + div { padding-left: 1.5rem; border-left: 1px solid var(--linha); }
.numeros dt { font-size: clamp(1.9rem, 3.4vw, 3rem); white-space: nowrap; margin-bottom: 0.5rem; font-variant-numeric: tabular-nums; }
.numeros dd { color: var(--grafite); font-size: 0.9375rem; max-width: 28ch; }

/* ---------- seções ---------- */

.grupo { margin-bottom: clamp(3.5rem, 8vw, 6rem); scroll-margin-top: 1.5rem; }

.grupo-topo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.75rem 2rem;
  align-items: end;
  margin-bottom: 1.5rem;
}
.grupo-topo h2 { font-size: clamp(2.25rem, 5vw, 4rem); }
.grupo-topo p { color: var(--grafite); max-width: 56ch; }
/* logo do empregador: usada como veio, sem recolorir */
.empresa { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1.25rem; }
.empresa img { display: block; height: 36px; width: auto; }

/* ---------- experiência ---------- */

.cargo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.75rem 2rem;
  padding: 1.5rem 0 2.25rem;
  border-top: 3px solid var(--texto);
}
.quando { color: var(--grafite); font-size: 0.9375rem; }
.quando .periodo { color: var(--texto); font-weight: 700; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.oque h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 800; line-height: 1.1; }
.oque h3 span { display: block; font-size: 1rem; font-weight: 500; color: var(--grafite); margin-top: 0.3rem; }
.resumo { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.4; max-width: 60ch; margin: 0.9rem 0 1.25rem; }
.oque h4 { font-size: 0.9375rem; font-weight: 700; margin: 1.1rem 0 0.4rem; }
.feitos { display: grid; gap: 0.35rem; max-width: 68ch; }
.feitos li { padding-left: 1.1rem; position: relative; }
.feitos li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.55rem; height: 3px; background: var(--texto); }
.dito { margin-top: 1.25rem; font-weight: 700; font-size: 1.0625rem; }
.dito::before { content: ""; display: inline-block; width: 1.4rem; height: 0.7rem; margin-right: 0.5rem; background: var(--marca-texto); border-radius: 0 var(--raio) var(--raio) 0; }
.formacao { border-top: 3px solid var(--texto); padding-top: 1rem; color: var(--grafite); }
.formacao b { color: var(--texto); }

/* ---------- projetos ---------- */

.trilha { font-size: 1rem; font-weight: 700; margin: 2rem 0 0.5rem; scroll-margin-top: 1.5rem; }
.grupo-topo + .trilha { margin-top: 0; }
.projetos { border-top: 3px solid var(--texto); }
.projetos > li {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr);
  gap: 0.25rem 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--linha);
}
.projetos h4 { font-size: 1.0625rem; font-weight: 700; overflow-wrap: anywhere; }
.projetos > li > p { max-width: 62ch; }
.ferramentas { color: var(--grafite); font-size: 0.9375rem; }
.projetos details { grid-column: 2 / -1; margin-top: 0.4rem; }
.projetos > li > .ver { grid-column: 2 / -1; width: fit-content; margin-top: 0.4rem; font-weight: 600; text-decoration-color: var(--marca-texto); }
.projetos summary { cursor: pointer; font-weight: 600; width: fit-content; text-decoration: underline; text-decoration-color: var(--marca-texto); text-decoration-thickness: 2px; text-underline-offset: 0.2em; list-style: none; }
.projetos summary::-webkit-details-marker { display: none; }
.projetos summary::after { content: " +"; }
.projetos details[open] summary::after { content: " −"; }
.projetos details[open] summary { margin-bottom: 0.9rem; }

.palco { background: var(--nevoa); padding: clamp(1rem, 2.4vw, 1.75rem); min-width: 0; max-width: 680px; }
.aviso { margin-top: 0.9rem; font-size: 0.8125rem; color: var(--grafite); }

.botao {
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--texto); color: var(--fundo);
  border: 0; border-radius: 0 var(--raio) var(--raio) 0;
  padding: 0.7rem 1.6rem 0.7rem 1rem;
}
.botao:hover { background: var(--marca-texto); color: var(--tinta); }

/* demo: raio-x */
.mapa { min-height: 12rem; }
.mapa svg { display: block; width: 100%; height: auto; overflow: visible; }
.mapa path {
  fill: color-mix(in srgb, var(--texto) var(--f), var(--nevoa));
  stroke: var(--nevoa); stroke-width: 1.5; stroke-linejoin: round;
  cursor: pointer; outline: none;
}
.mapa path:hover, .mapa path:focus-visible { stroke: var(--texto); stroke-width: 2.5; paint-order: stroke; }
.mapa path[aria-pressed="true"] { fill: var(--marca-texto); stroke: var(--tinta); stroke-width: 2.5; }
.rank-lista { display: grid; gap: 0.55rem; }
.rank-lista li { display: grid; gap: 2px; font-size: 0.875rem; }
.rank-lista .b {
  display: block; height: 18px; width: var(--v);
  background: var(--texto); border-radius: 0 var(--raio) var(--raio) 0;
  transition: width 0.5s var(--ease);
}
.rank-lista li:first-child .b { background: var(--marca-texto); }
.rank-lista span { display: flex; justify-content: space-between; gap: 0.5rem; font-variant-numeric: tabular-nums; }

/* demo: report */
.report { display: grid; gap: 1rem; justify-items: start; }
.bruto {
  margin: 0; width: 100%; overflow-x: auto;
  font: 0.8125rem/1.6 ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--fundo); padding: 1rem; color: var(--grafite);
}
.pronto { width: 100%; border-collapse: collapse; background: var(--fundo); font-variant-numeric: tabular-nums; }
.pronto th, .pronto td { padding: 0.6rem 0.8rem; text-align: right; border-bottom: 1px solid var(--linha); white-space: nowrap; }
.pronto th:first-child { text-align: left; }
.pronto thead th { font-size: 0.8125rem; font-weight: 500; color: var(--grafite); border-bottom: 3px solid var(--texto); }
.pronto tfoot th, .pronto tfoot td { font-weight: 800; border-bottom: 0; border-top: 3px solid var(--texto); }
.giro {
  display: inline-block; vertical-align: middle; margin-right: 0.5rem;
  --v: 78%;
  height: 12px; width: calc(var(--v) * 0.5); max-width: 3.5rem; min-width: 1rem;
  background: var(--texto); border-radius: 0 var(--raio) var(--raio) 0;
}
.giro.alto { --v: 100%; background: var(--marca-texto); }
@media (prefers-reduced-motion: no-preference) {
  .anima .pronto:not([hidden]) tbody tr, .anima .pronto:not([hidden]) tfoot tr { animation: entra 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
  @keyframes entra { from { opacity: 0; transform: translateY(8px); } }
}

/* demo: preço na mão */
.celular {
  width: min(100%, 320px); margin: 0 auto;
  border: 10px solid var(--texto); border-radius: 36px;
  background: var(--fundo); overflow: hidden;
}
.tela { display: grid; gap: 0.8rem; padding: 1.1rem 1rem 1.25rem; }
.status { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.8125rem; }
.sinal { font-weight: 700; }
.sinal::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--texto); margin-right: 0.4rem; }
.semsinal .sinal::before { background: transparent; outline: 2px solid var(--texto); outline-offset: -2px; }
.chave { font: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; color: inherit; }
.tela label { display: grid; gap: 0.25rem; font-size: 0.8125rem; font-weight: 600; }
.tela select, .tela input {
  font: inherit; font-size: 1rem; font-weight: 400; width: 100%;
  padding: 0.55rem 0.6rem; border: 2px solid var(--texto); border-radius: 0;
  background: var(--fundo); color: var(--texto);
}
.tela .botao { justify-self: start; }
.fila { display: grid; gap: 0.4rem; font-size: 0.8125rem; border-top: 1px solid var(--linha); padding-top: 0.75rem; min-height: 5.5rem; align-content: start; }
.fila li { display: flex; justify-content: space-between; gap: 0.5rem; font-variant-numeric: tabular-nums; }
.fila .vazio { color: var(--grafite); }
.fila .estado { font-weight: 700; white-space: nowrap; }
.fila .nafila .estado { background: var(--marca-texto); color: var(--tinta); padding: 0 0.35em; }

/* demo: jarvis */
.chat { display: grid; gap: 1rem; }
.conversa { display: grid; gap: 0.6rem; min-height: 15rem; align-content: end; }
.conversa li { max-width: 86%; padding: 0.6rem 0.85rem; font-size: 0.9375rem; line-height: 1.4; }
.conversa .eu { justify-self: end; background: var(--marca-texto); color: var(--tinta); border-radius: 18px 18px 0 18px; }
.conversa .ele { justify-self: start; background: var(--fundo); border-radius: 0 18px 18px 18px; }
.conversa .rota { display: block; margin-top: 0.4rem; font-size: 0.75rem; color: var(--grafite); }
.respostas { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.respostas button {
  font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
  background: none; color: inherit; border: 2px solid var(--texto); border-radius: var(--raio); padding: 0.4rem 0.9rem;
}
.respostas button:hover { background: var(--texto); color: var(--fundo); }
@media (prefers-reduced-motion: no-preference) {
  .anima .conversa li { animation: entra 0.4s var(--ease) both; }
}

/* demo: verificador de enrolação */
.linter { display: grid; gap: 0.75rem; }
.linter label { font-size: 0.8125rem; font-weight: 600; }
.linter textarea {
  font: inherit; width: 100%; resize: vertical; min-height: 8rem;
  padding: 0.75rem; border: 2px solid var(--texto); border-radius: 0;
  background: var(--fundo); color: var(--texto);
}
.saida { background: var(--fundo); padding: 0.9rem; line-height: 1.7; min-height: 4rem; overflow-wrap: anywhere; }
.saida mark { background: var(--marca-texto); color: var(--tinta); padding: 0.05em 0.2em; }
.contagem { font-weight: 700; }


/* ---------- ferramentas ---------- */

.indice { border-top: 3px solid var(--texto); }
.indice > div {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0.25rem 2rem;
  padding: 0.9rem 0; border-bottom: 1px solid var(--linha);
}
.indice dt { font-weight: 700; }
.indice dd { color: var(--grafite); max-width: 68ch; }

/* ---------- contato ---------- */

footer {
  background: var(--nevoa);
  padding: clamp(3rem, 7vw, 5rem) var(--margem) var(--margem);
}
footer h2 { font-size: clamp(2.25rem, 5.5vw, 4.5rem); max-width: 16em; margin-bottom: 1rem; text-wrap: balance; }
footer p { color: var(--grafite); max-width: 56ch; margin-bottom: 1.5rem; }
.contatos { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 2rem; font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 600; margin-bottom: 3rem; }
.fim { font-size: 0.875rem; margin: 0; }

/* ---------- página de caso (Raio-X) ---------- */

.caso-topo { padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(2rem, 5vw, 3.5rem); }
.caso-topo h1 { font-size: clamp(3.5rem, 12vw, 9rem); margin-bottom: 0.2em; }
.caso-topo .promessa { font-size: clamp(1.35rem, 2.6vw, 2.25rem); line-height: 1.15; max-width: 22em; margin-bottom: 1rem; }
.caso-topo p:not(.promessa) { max-width: 44em; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--grafite); }

/* o painel inverte a página: tinta no tema claro, papel no escuro */
.painel-raiox {
  background: var(--texto); color: var(--fundo);
  padding: clamp(1.25rem, 3.5vw, 3rem) var(--margem) clamp(1rem, 2vw, 1.5rem);
  margin-bottom: clamp(3.5rem, 8vw, 6rem);
}
.painel-raiox :focus-visible { outline-color: var(--marca-texto); }

/* pílulas de escolha (distribuidor, comparação, métrica) */
.pr-pilulas, .pr-alvo { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pr-pilulas button, .pr-alvo button {
  font: inherit; font-size: 0.9375rem; font-weight: 700; cursor: pointer;
  background: none; color: inherit; border: 2px solid currentColor; border-radius: var(--raio);
  padding: 0.3rem 1rem;
}
.pr-pilulas button:hover, .pr-alvo button:hover { background: var(--fundo); border-color: var(--fundo); color: var(--texto); }
.pr-pilulas button[aria-pressed="true"], .pr-alvo button[aria-pressed="true"] { background: var(--marca-texto); border-color: var(--marca-texto); color: var(--tinta); }
.pr-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.pr-rotulo { font-size: 0.875rem; font-weight: 600; opacity: 0.8; }

/* abas: texto simples, com a ativa grifada */
.pr-abas { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: clamp(1.25rem, 3vw, 2rem) 0 0; padding-bottom: 0.9rem; border-bottom: 2px solid currentColor; }
.pr-abas button { font: inherit; font-weight: 700; font-size: 1.0625rem; cursor: pointer; background: none; border: 0; color: inherit; padding: 0.1em 0.35em; margin-left: -0.35em; }
.pr-abas button:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.pr-abas button[aria-selected="true"] { background: var(--marca-texto); color: var(--tinta); }
.pr-tela { padding-top: clamp(1.5rem, 3.5vw, 2.5rem); }
.pr-tela:focus-visible { outline-offset: 6px; }
.pr-pergunta { font-size: clamp(1.75rem, 4.4vw, 3.5rem); max-width: 18em; margin-bottom: clamp(1.25rem, 3vw, 2rem); text-wrap: balance; }
.pr-h3 { font-size: 1.1875rem; font-weight: 800; font-stretch: 75%; line-height: 1.1; margin: clamp(1.75rem, 4vw, 2.5rem) 0 0.5rem; }
.pr-sub { opacity: 0.8; font-size: 0.875rem; margin-bottom: 0.8rem; }
.pr-frase { max-width: 34ch; margin-bottom: 1.5rem; }
.pr-frase.larga { max-width: 60ch; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); margin: 1.25rem 0 0; }

/* gráficos em SVG */
.pr-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.pr-chart text { fill: currentColor; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ev-grade { stroke: currentColor; stroke-width: 1; opacity: 0.22; }
.ev-med { fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 5 5; opacity: 0.7; }
.ev-sel { fill: none; stroke: var(--fundo); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.ev-dot { fill: var(--marca-texto); stroke: var(--fundo); stroke-width: 2; }
.pr-legenda { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; margin-top: 0.7rem; font-size: 0.875rem; font-weight: 600; }
.pr-legenda span { display: inline-flex; align-items: center; gap: 0.5rem; }
.pr-legenda .sw { display: inline-block; width: 1.5rem; }
.sw-sel { border-top: 3px solid var(--fundo); }
.sw-med { border-top: 2px dashed currentColor; opacity: 0.7; }
.sw-bar { height: 0.75rem; background: var(--fundo); }
.sw-oco, .sw-cheio { width: 0.75rem !important; height: 0.75rem; border-radius: 50%; border: 2px solid var(--fundo); }
.sw-cheio { background: var(--fundo); }
.sw-abaixo { height: 0.75rem; background: var(--marca-texto); }
.sw-ok { height: 0.75rem; background: color-mix(in srgb, var(--fundo) 22%, var(--texto)); }

/* tela 1: uma página */
.op-grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid currentColor; }
.op-item { padding: 1.25rem 1.5rem 1.5rem 0; border-bottom: 1px solid color-mix(in srgb, var(--fundo) 30%, var(--texto)); }
.op-item dt { font-size: 0.9375rem; font-weight: 700; margin-bottom: 0.4rem; }
.op-item dd { display: grid; gap: 0.3rem; }
.op-valor { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; font-stretch: 75%; line-height: 0.95; font-variant-numeric: tabular-nums; white-space: nowrap; }
.op-sub { font-size: 0.875rem; opacity: 0.8; max-width: 26ch; }
.op-delta { font-size: 0.875rem; margin-top: 0.2rem; }
.op-delta b { font-weight: 800; padding: 0.05em 0.35em; margin-right: 0.15em; border: 1.5px solid currentColor; font-variant-numeric: tabular-nums; }
.op-delta.sobe b { background: var(--marca-texto); border-color: var(--marca-texto); color: var(--tinta); }

/* tela 2: pulso */
.pu-bar { fill: var(--fundo); }
.pu-bar.pu-ult { fill: var(--marca-texto); }
.pu-ant { fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 5 5; opacity: 0.75; }
.pu-ponto { fill: var(--texto); stroke: currentColor; stroke-width: 2; }
.pu-zero { stroke: currentColor; stroke-width: 1.5; }
.pu-mais { fill: var(--marca-texto); }
.pu-menos { fill: none; stroke: currentColor; stroke-width: 1.5; }

/* tela 3: momentum */
.mo-nome, .mo-val { font-size: 13px !important; }
.mo-alvo { font-weight: 800 !important; }
.mo-seg { stroke: var(--fundo); stroke-width: 4; stroke-linecap: round; }
.mo-seg-alvo { stroke: var(--marca-texto); }
.mo-antes { fill: var(--texto); stroke: var(--fundo); stroke-width: 2.5; }
.mo-agora { fill: var(--fundo); }
.mo-agora-alvo { fill: var(--marca-texto); }
.dv-lista { display: grid; gap: 0.35rem; max-width: 46rem; }
.dv {
  display: grid; grid-template-columns: minmax(6.5rem, 11rem) minmax(0, 1fr) 5.5rem; align-items: center; gap: 0.75rem;
  width: 100%; padding: 0.15rem 0; border: 0; background: none; color: inherit; font: inherit; font-size: 0.9375rem; text-align: left; cursor: pointer;
}
.dv:hover .dv-nome { text-decoration: underline; text-underline-offset: 0.2em; }
.dv-trilho { position: relative; height: 18px; background: linear-gradient(currentColor, currentColor) 50% 0 / 1.5px 100% no-repeat; }
.dv-trilho i { position: absolute; top: 2px; bottom: 2px; left: var(--x); width: var(--w); min-width: 2px; }
.dv-mais { background: var(--marca-texto); border-radius: 0 var(--raio) var(--raio) 0; }
.dv-menos { border: 1.5px solid currentColor; border-radius: var(--raio) 0 0 var(--raio); }
.dv-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* tela 4: regional */
.pr-grade { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.painel-raiox .mapa path {
  fill: color-mix(in srgb, var(--fundo) calc(var(--f) * 0.8 + 12%), var(--texto));
  stroke: var(--texto);
}
.painel-raiox .mapa path:hover, .painel-raiox .mapa path:focus-visible { stroke: var(--fundo); stroke-width: 2.5; }
.painel-raiox .mapa path[aria-pressed="true"] { fill: var(--marca-texto); stroke: var(--fundo); stroke-width: 2.5; }
.pr-estado { font-size: clamp(2.25rem, 5.5vw, 4.5rem); font-weight: 800; font-stretch: 75%; letter-spacing: -0.01em; line-height: 0.95; }
.pr-valor { margin: 0.7rem 0 0.5rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; }
.pr-valor b {
  background: var(--marca-texto); color: var(--tinta);
  font-size: clamp(2.5rem, 7vw, 5.5rem); font-weight: 800; font-stretch: 75%; line-height: 1;
  padding: 0.05em 0.2em; font-variant-numeric: tabular-nums;
}
.pr-valor .un { font-size: 1.125rem; font-weight: 600; }
.painel-raiox .rank-lista .b { background: var(--fundo); }
.painel-raiox .rank-lista li:first-child .b { background: var(--fundo); }
.painel-raiox .rank-lista li.alvo .b { background: var(--marca-texto); }
.painel-raiox .rank-lista li.alvo { font-weight: 800; }

/* tela 5: matriz */
.mz-grade { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.mz-rolo { overflow-x: auto; }
.mz { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 26rem; font-variant-numeric: tabular-nums; }
.mz th { font-size: 0.8125rem; font-weight: 700; text-align: center; padding: 0 0.25rem 0.35rem; }
.mz tbody th { text-align: left; padding: 0 0.5rem 0 0; }
.mz td { padding: 0; }
.mz button {
  display: block; width: 100%; padding: 0.55rem 0.2rem; border: 2px solid transparent; cursor: pointer;
  font: inherit; font-size: 0.875rem; font-weight: 700; text-align: center; color: var(--fundo);
  background: color-mix(in srgb, var(--fundo) 16%, var(--texto));
}
.mz button.abaixo { color: var(--tinta); background: color-mix(in srgb, var(--marca-texto) calc(var(--g) * 0.7 + 30%), var(--texto)); }
.mz button:hover { border-color: var(--fundo); }
.mz button[aria-pressed="true"] { border-color: var(--fundo); outline: 2px solid var(--fundo); outline-offset: 1px; }
.mz-lado .pr-frase.larga { margin-top: 0; }
.mz-folgas { display: grid; gap: 0.55rem; }
.mz-folgas button { display: grid; gap: 2px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 0.875rem; text-align: left; cursor: pointer; }
.mz-folgas button > span { display: flex; justify-content: space-between; gap: 0.5rem; font-variant-numeric: tabular-nums; }
.mz-folgas button:hover > span { text-decoration: underline; text-underline-offset: 0.2em; }
.mz-folgas .b { display: block; height: 18px; width: var(--v); background: var(--fundo); border-radius: 0 var(--raio) var(--raio) 0; }
.mz-folgas .ativo .b { background: var(--marca-texto); }

/* caso Preço na Mão: um celular funcional e, ao lado, o que chega na análise */
.pp-grade { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; }
.painel-preco .celular {
  width: 100%; margin: 0; overflow: hidden;
  border: 10px solid color-mix(in srgb, var(--fundo) 45%, var(--texto)); border-radius: 36px;
  background: var(--fundo); color: var(--texto);
}
.painel-preco .celular :focus-visible { outline-color: var(--texto); }
.app-tela { display: flex; flex-direction: column; gap: 0.7rem; padding: 1rem 0.9rem 0; min-height: 31rem; font-size: 0.9375rem; }
.app-tela > :last-child:not(.app-rodape) { margin-bottom: 1rem; }
.app-tela .status { margin: 0; }
.app-topo { display: grid; gap: 0.2rem; }
.app-topo h3 { font-size: 1.5rem; font-weight: 800; font-stretch: 75%; line-height: 1.05; outline: none; }
.app-voltar, .app-link { font: inherit; font-size: 0.8125rem; font-weight: 600; background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; width: fit-content; }
.app-sub { font-size: 0.8125rem; color: var(--grafite); }
.app-lista { display: grid; }
.app-item {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; width: 100%;
  padding: 0.7rem 0; border: 0; border-bottom: 1px solid var(--linha); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.app-item:hover .app-nome { text-decoration: underline; text-underline-offset: 0.2em; }
.app-item:disabled { cursor: default; }
.app-item:disabled:hover .app-nome { text-decoration: none; }
.app-nome { font-weight: 700; }
.app-estado { font-size: 0.8125rem; color: var(--grafite); white-space: nowrap; }
.app-estado.ok, .app-ok { background: var(--marca-texto); color: var(--tinta); font-weight: 700; padding: 0 0.4em; }
.app-ok { width: fit-content; }
.app-form { display: grid; gap: 0.8rem; }
.app-form label { display: grid; gap: 0.25rem; font-size: 0.8125rem; font-weight: 600; }
.app-form input[type="number"] { font: inherit; font-size: 1rem; font-weight: 400; width: 100%; padding: 0.55rem 0.6rem; border: 2px solid var(--texto); border-radius: 0; background: var(--fundo); color: var(--texto); }
.app-form input:disabled { opacity: 0.4; }
.app-form small { font-weight: 400; color: var(--grafite); }
.app-form .app-check { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; font-size: 0.875rem; }
.app-form .app-check input { width: 1.1rem; height: 1.1rem; }
.app-form .botao, .app-acoes .botao { justify-self: start; }
.app-resumo { display: grid; }
.app-resumo > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--linha); }
.app-resumo dt { color: var(--grafite); }
.app-resumo dd { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.app-acoes { display: flex; align-items: center; gap: 1.25rem; }
.app-hist { display: grid; }
.app-hist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--linha); font-size: 0.8125rem; }
.app-hist .app-valor { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.app-hist .estado { color: var(--grafite); }
.app-hist .estado.fila { background: var(--marca-texto); color: var(--tinta); font-weight: 700; padding: 0 0.35em; width: fit-content; }
.app-hist .app-link { justify-self: end; }
.app-hist .estornado .app-nome, .app-hist .estornado .app-valor { text-decoration: line-through; color: var(--grafite); font-weight: 400; }
.app-rodape { display: grid; grid-template-columns: 1fr 1fr; margin: auto -0.9rem 0; border-top: 2px solid var(--texto); }
.app-rodape button { font: inherit; font-weight: 700; padding: 0.8rem 0.5rem; border: 0; background: none; color: inherit; cursor: pointer; }
.app-rodape button[aria-current="page"] { background: var(--texto); color: var(--fundo); }

.pp-lado { display: grid; gap: clamp(1.75rem, 4vw, 2.75rem); align-content: start; }
.pp-bloco h3 { font-size: 1.1875rem; font-weight: 800; font-stretch: 75%; line-height: 1.1; margin-bottom: 0.6rem; }
.pp-num { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; font-stretch: 75%; line-height: 1; margin-bottom: 0.7rem; font-variant-numeric: tabular-nums; }
.pp-trilho { height: 22px; max-width: 34rem; border: 2px solid currentColor; border-radius: 0 var(--raio) var(--raio) 0; overflow: hidden; }
.pp-trilho i { display: block; height: 100%; width: var(--v); background: var(--marca-texto); transition: width 0.5s var(--ease); }
.pp-lado .rank-lista { max-width: 34rem; }
.pp-cont { display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; margin-bottom: 0.8rem; }
.pp-cont dd { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; font-stretch: 75%; line-height: 1; font-variant-numeric: tabular-nums; }
.pp-cont dt { font-size: 0.875rem; opacity: 0.8; }

.painel-raiox .aviso { color: inherit; opacity: 0.75; margin-top: 2rem; }

.caso-texto { margin-bottom: clamp(3.5rem, 8vw, 6rem); }
.caso-texto h2 { font-size: clamp(2.25rem, 5vw, 4rem); margin-bottom: 1.25rem; }
.caso-texto .indice dd { max-width: 60ch; }
.voltar { margin-top: 2rem; font-weight: 600; }

/* mini esquema de tabelas (caso Preço na Mão) */
.esq-sub { color: var(--grafite); max-width: 62ch; margin: -0.5rem 0 1.75rem; }
.esq { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem clamp(3rem, 7vw, 6rem); align-items: start; }
.esq-grupo { display: grid; gap: 1rem; }
.esq-grupo h3 { font-size: 1rem; font-weight: 700; padding-bottom: 0.5rem; border-bottom: 3px solid var(--texto); }
.esq-tabela { width: 100%; border-collapse: collapse; border: 2px solid var(--texto); font: 0.8125rem/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
.esq-tabela caption { text-align: left; font-weight: 700; padding: 0.4rem 0.6rem; background: var(--texto); color: var(--fundo); }
.esq-tabela th, .esq-tabela td { padding: 0.3rem 0.6rem; border-top: 1px solid var(--linha); text-align: left; font-weight: 400; }
.esq-tabela td { text-align: right; white-space: nowrap; }
.esq-pk { background: var(--marca-texto); color: var(--tinta); font-weight: 700; padding: 0 0.4em; }
.esq-fk { color: var(--grafite); }
.esq-nota { margin-top: 1.25rem; max-width: 62ch; }
/* setas entre as tabelas, desenhadas por esquema.js */
.esq-linhas { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.esq-linhas.oculto { display: none; }
.esq-linha { fill: none; stroke: var(--texto); stroke-width: 1.5; stroke-linejoin: round; opacity: 0.45; }
.esq-linha.on { stroke-width: 3; opacity: 1; }
.esq-ponta { fill: var(--texto); }
.esq-tabela tr:hover th, .esq-tabela tr:hover td { background: var(--nevoa); }


/* relógio de animação parado (ver app.js): nada depende de animar para aparecer */
.parado *, .parado *::before, .parado *::after { animation: none !important; transition: none !important; }

/* ---------- telas pequenas ---------- */

@media (max-width: 900px) {
  .numeros dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numeros dl > div:nth-child(3) { padding-left: 0; border-left: 0; }
}

@media (max-width: 760px) {
  .pr-grade, .mz-grade, .pp-grade { grid-template-columns: 1fr; }
  .esq { grid-template-columns: 1fr; }
  .painel-preco .celular { max-width: 340px; margin: 0 auto; }
  .op-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topo nav a:not(:last-child) { display: none; }
  .abre { grid-template-columns: 1fr; }
  .b { --alt: clamp(200px, 56vw, 300px); }
  .grupo-topo, .cargo, .indice > div { grid-template-columns: 1fr; }
  .projetos > li { grid-template-columns: 1fr; }
  .projetos details, .projetos > li > .ver { grid-column: 1; }
}

@media (max-width: 520px) {
  .op-grade { grid-template-columns: 1fr; }
  .dv { grid-template-columns: minmax(5rem, 7rem) minmax(0, 1fr) 4.75rem; gap: 0.5rem; }
  .numeros dl { grid-template-columns: 1fr; }
  .numeros dl > div + div { padding-left: 0; border-left: 0; }
  }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
