/* Pecas compartilhadas pelas abas: cartao, cabecalho, fio, barra, veredito, selos, pocos, botoes,
   campo e interruptor. Os nomes de classe sao os da amostra aprovada. */

/* ---------- cartao: peca fisica iluminada ---------- */
.cartao {
  position: relative; border-radius: var(--r-cartao); padding: var(--e-8);
  background: var(--g-cartao); border: var(--borda-cartao); box-shadow: var(--s-cartao);
}
.cartao::before { /* borda de luz fina no topo */
  content: ""; position: absolute; top: 0; left: 9%; right: 9%; height: var(--v-1); pointer-events: none; z-index: 2;
  background: var(--g-fio-luz);
}
.cartao::after { /* reflexo sutil que desce do canto */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: var(--g-reflexo);
}
.cartao > * { position: relative; z-index: 1; }

/* cartao heroi: luz propria no canto e grao de ruido */
.heroi { border-radius: var(--r-heroi); padding: var(--e-heroi) var(--e-8) var(--e-8); overflow: hidden; background: var(--g-heroi); }
.heroi .grao {
  position: absolute; inset: 0; z-index: 0; opacity: .06; mix-blend-mode: overlay; pointer-events: none; border-radius: inherit;
  background-image: url("/central/estatico/img/grao.svg");
}

.cab { display: flex; align-items: baseline; justify-content: space-between; gap: var(--e-5); margin-bottom: var(--e-7); }
.cab h2 { font-size: var(--t-17); line-height: var(--a-24); font-weight: 400; letter-spacing: var(--ap-10); color: var(--texto); }
.cab .lado { font-size: var(--t-12); line-height: var(--a-16); color: var(--texto-3); font-family: var(--mono); white-space: nowrap; }
.cab.centro { align-items: center; }
.sub { font-size: var(--t-13); line-height: var(--a-18); color: var(--texto-2); margin: calc(var(--e-4) * -1) 0 var(--e-7); }
.sub.solta { margin: 0 0 var(--e-5); }
.rotulo { font-size: var(--t-13); line-height: var(--a-16); color: var(--texto-2); font-weight: 400; }
.nota { font-size: var(--t-14); line-height: var(--a-20); color: var(--texto-2); margin: calc(var(--e-2) * -1) 0 var(--e-7); text-wrap: pretty; }
.legenda { font-size: var(--t-12); line-height: var(--a-16); color: var(--texto-3); margin-top: var(--e-4); text-wrap: pretty; }
.fio { height: var(--v-1); background: var(--g-fio); margin: var(--e-fio) 0; }

/* ---------- barra: a largura vem do dado, pela variavel --f (0 a 1) ---------- */
.trilho { display: block; height: var(--trilho-alt); border-radius: var(--r-pilula); background: rgba(var(--preto), .5); overflow: hidden; box-shadow: var(--s-trilho); }
.trilho i { display: block; height: 100%; width: calc(var(--f, 0) * 100%); min-width: var(--trilho-min); border-radius: var(--r-pilula); background: var(--g-trilho); }
.trilho.alto { height: var(--trilho-alto); }
/* zero tem cara propria: trilho vazio, sem o ponto minimo */
.trilho.zero i { min-width: 0; }

/* ---------- veredito: pilula com icone e palavra ---------- */
.ver {
  position: relative; display: inline-flex; align-items: center; gap: var(--e-2); height: var(--ver-alt);
  padding: 0 var(--e-4) 0 var(--e-3); border-radius: var(--r-pilula);
  font-size: var(--t-13); line-height: var(--a-16); font-weight: 500; white-space: nowrap; flex: none;
  color: var(--texto-2); background: rgba(var(--luz), .05); box-shadow: inset 0 0 0 var(--v-1) rgba(var(--luz), .1);
}
.ver.bom { color: var(--verde); background: rgba(var(--verde-rgb), .08); box-shadow: inset 0 0 0 var(--v-1) rgba(var(--verde-rgb), .2); }
.ver.ruim { color: var(--brasa-clara); background: rgba(var(--brasa-rgb), .11); box-shadow: inset 0 0 0 var(--v-1) rgba(var(--brasa-rgb), .32); }
.ver.ambar { color: var(--ambar); background: rgba(var(--ambar-rgb), .09); box-shadow: inset 0 0 0 var(--v-1) rgba(var(--ambar-rgb), .28); }
/* pilula que abre a frase: o alvo de toque cresce para 44 px sem mudar o desenho */
button.ver::after { content: ""; position: absolute; inset: calc(var(--v-9) * -1) calc(var(--e-1) * -1); }
.ver-frase {
  padding: var(--e-5) var(--e-6); border-radius: var(--r-bloco); background: var(--poco); box-shadow: var(--s-poco);
  font-size: var(--t-14); line-height: var(--a-20); color: var(--texto); text-wrap: pretty;
}

/* ---------- selos ---------- */
.chip-ex {
  display: inline-flex; align-items: center; height: var(--chip-alt); padding: 0 var(--v-9); border-radius: var(--r-selo);
  font-size: var(--t-12); line-height: var(--a-16); font-weight: 500; letter-spacing: var(--ap-mais);
  color: var(--creme-texto); background: var(--g-creme); box-shadow: var(--s-creme);
}
.regra {
  display: inline-flex; align-items: center; gap: var(--v-5); height: var(--regra-alt); padding: 0 var(--e-3) 0 var(--e-2);
  border-radius: var(--r-pilula); font-size: var(--t-12); color: var(--texto-2);
  background: rgba(var(--luz), .055); box-shadow: var(--s-regra);
}
.regra svg { flex: none; }
.regra.so-texto { padding: 0 var(--e-3); }
.regra.avisa { color: var(--ambar); background: rgba(var(--ambar-rgb), .09); box-shadow: inset 0 0 0 var(--v-1) rgba(var(--ambar-rgb), .28); padding: 0 var(--e-3); }

/* ---------- pocos: celulas afundadas ---------- */
.poco { border-radius: var(--r-bloco); background: var(--poco); box-shadow: var(--s-poco); padding: var(--e-6); }
.trio { display: grid; grid-template-columns: 1fr 1.25fr 1fr; border-radius: var(--r-poco); background: var(--poco); box-shadow: var(--s-poco); }
.trio.dois { grid-template-columns: 1fr 1fr; }
.trio div { padding: var(--e-6) 0 var(--e-6) var(--e-7); position: relative; }
.trio div + div::before { content: ""; position: absolute; left: 0; top: var(--e-6); bottom: var(--e-6); width: var(--v-1); background: var(--divisor); }
.trio dt { font-size: var(--t-12); line-height: var(--a-16); color: var(--texto-3); }
.trio dd { font-size: var(--t-20); line-height: var(--a-26); font-weight: 400; letter-spacing: var(--ap-20); color: var(--texto); margin-top: var(--v-2); white-space: nowrap; }
.trio dd.palavra { font-size: var(--t-14); letter-spacing: 0; color: var(--texto-2); }

.dupla { display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--e-fio); border-radius: var(--r-bloco); background: var(--poco); box-shadow: var(--s-poco); }
.dupla div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--e-3); padding: var(--e-5) var(--e-6); position: relative; }
.dupla div + div::before { content: ""; position: absolute; left: 0; top: var(--e-5); bottom: var(--e-5); width: var(--v-1); background: var(--divisor); }
.dupla dt { font-size: var(--t-13); color: var(--texto-2); }
.dupla dd { font-size: var(--t-15); font-weight: 500; color: var(--texto); white-space: nowrap; }
.dupla.alta { margin-top: var(--e-6); grid-template-columns: 1fr; }
.dupla.alta div { padding: var(--v-13) var(--e-6); }
.dupla.alta div + div::before { left: var(--e-6); right: var(--e-6); top: 0; bottom: auto; width: auto; height: var(--v-1); }
.dupla.alta dt { font-size: var(--t-13); line-height: var(--a-20); color: var(--texto-2); }
.dupla.alta dd { font-size: var(--t-14); line-height: var(--a-20); font-weight: 400; color: var(--texto); }
.dupla.alta dd b { font-weight: 500; font-size: var(--t-16); }

.saida { display: grid; grid-template-columns: 1fr 1fr 1fr; border-radius: var(--r-poco); background: var(--poco-fundo); box-shadow: var(--s-poco-fundo); }
.saida div { padding: var(--e-6) 0 var(--e-6) var(--e-6); position: relative; }
.saida div + div::before { content: ""; position: absolute; left: 0; top: var(--e-6); bottom: var(--e-6); width: var(--v-1); background: var(--divisor); }
.saida dt { font-size: var(--t-12); line-height: var(--a-16); color: var(--texto-3); }
.saida dd { font-size: var(--t-26); line-height: var(--a-32); font-weight: 300; letter-spacing: var(--ap-30); color: var(--texto); margin-top: var(--v-2); white-space: nowrap; }

/* ---------- botoes ---------- */
.botao { /* principal: creme, largura total, 52 px */
  display: flex; align-items: center; justify-content: center; gap: var(--e-3); width: 100%; min-height: var(--botao-alt);
  padding: 0 var(--e-7); border-radius: var(--r-poco); font-size: var(--t-16); line-height: var(--a-20); font-weight: 500;
  color: var(--creme-texto); background: var(--g-creme); box-shadow: var(--s-creme);
}
.volta { /* secundario: relevo claro, 44 px */
  display: flex; align-items: center; justify-content: center; gap: var(--e-3); width: 100%; min-height: var(--toque);
  margin-top: var(--e-3); padding: 0 var(--e-6); border-radius: var(--r-balao); font-size: var(--t-14); color: var(--texto);
  background: var(--g-relevo); box-shadow: var(--s-botao);
}
.volta.curto { width: auto; }
.derruba { /* contorno brasa, sempre com palavra, em 2 toques */
  display: flex; align-items: center; justify-content: center; gap: var(--e-3); min-height: var(--toque); padding: 0 var(--e-6);
  border-radius: var(--r-balao); font-size: var(--t-14); font-weight: 500; color: var(--brasa-clara);
  background: rgba(var(--brasa-rgb), .11); box-shadow: inset 0 0 0 var(--v-1) rgba(var(--brasa-rgb), .32);
}
.txt { /* botao de texto: parece texto, tem 44 px de alvo */
  display: inline-flex; align-items: center; gap: var(--e-2); min-height: var(--toque); padding: 0;
  font-size: var(--t-13); line-height: var(--a-18); color: var(--texto-2); text-align: left;
  text-decoration: underline; text-decoration-color: rgba(var(--luz), .28); text-underline-offset: var(--v-3);
}
.txt .abre { flex: none; }
.txt[aria-expanded="true"] .abre { transform: rotate(180deg); }
.volta[disabled], .derruba[disabled], .txt[disabled] { opacity: .55; cursor: default; }
/* principal desligado: o relevo do botao secundario com a letra apagada (creme a 55% virava um bege-cinza fora da amostra) */
.botao[disabled] { cursor: default; color: var(--texto-3); background: var(--g-relevo); box-shadow: var(--s-botao); }

.acoes { display: flex; gap: var(--e-3); margin-top: var(--e-5); }
.acoes > * { flex: 1; margin-top: 0; }

/* ---------- campo de texto e interruptor ---------- */
.campo { display: block; }
.campo .rotulo { display: block; margin-bottom: var(--e-3); }
.campo-caixa {
  display: flex; align-items: center; gap: var(--e-3); min-height: var(--campo-alt); padding: 0 var(--e-7);
  border-radius: var(--r-poco); background: var(--poco-fundo); box-shadow: var(--s-poco-fundo);
}
.campo-caixa:focus-within { box-shadow: var(--s-poco-fundo), var(--s-foco); }
.campo-caixa .antes { font-size: var(--t-16); color: var(--texto-3); }
.campo-caixa input {
  flex: 1; min-width: 0; height: var(--campo-alt); background: none; border: 0; outline: none;
  font-size: var(--t-18); line-height: var(--a-24); color: var(--texto);
}
.campo .erro { font-size: var(--t-13); line-height: var(--a-18); color: var(--ambar); margin-top: var(--e-3); }
.interruptor {
  position: relative; flex: none; width: var(--botao-alt); height: var(--selo-alt); border-radius: var(--r-pilula);
  background: rgba(var(--preto), .5); box-shadow: var(--s-trilho);
}
.interruptor::before {
  content: ""; position: absolute; top: var(--v-2); left: var(--v-2); width: var(--ctrl-botao); height: var(--ctrl-botao);
  border-radius: 50%; background: var(--g-botao-redondo); box-shadow: var(--s-botao-redondo);
}
.interruptor[aria-checked="true"] { background: rgba(var(--verde-rgb), .32); }
.interruptor[aria-checked="true"]::before { left: calc(100% - var(--ctrl-botao) - var(--v-2)); }
.interruptor::after { content: ""; position: absolute; inset: calc(var(--e-2) * -1) 0; }

/* lista de linhas simples (detalhe do selo, cadeia da "sua parte", dia a dia) */
.linhas > * { display: flex; align-items: baseline; justify-content: space-between; gap: var(--e-5); padding: var(--e-3) 0; font-size: var(--t-13); line-height: var(--a-18); color: var(--texto-2); }
.linhas > * + * { border-top: var(--borda-linha); }
.linhas .v { color: var(--texto); white-space: nowrap; text-align: right; }
.linhas .forte, .linhas .forte .v { color: var(--texto); font-weight: 500; }
