/* RankingIA — estilo único do site. Cores em tokens; tema escuro pelo sistema ou pelo botão. */
:root {
  color-scheme: light;
  --fundo: #f6f6f4;
  --superficie: #fcfcfb;
  --superficie-2: #f0efec;
  --borda: #e2e1dc;
  --texto: #0b0b0b;
  --texto-2: #52514e;
  --texto-3: #75736e;
  --destaque: #2a78d6;
  --destaque-texto: #1c5cab;
  --destaque-fundo: #e6f0fc;
  --barra: #2a78d6;
  --barra-fundo: #e2e1dc;
  --ouro: #b07d00;
  --bom: #008300;
  --aviso: #a86200;
  --serie-1: #2a78d6;
  --serie-2: #eb6834;
  --serie-3: #1baf7a;
  --serie-4: #eda100;
  --serie-5: #e87ba4;
  --serie-6: #008300;
  --serie-7: #6250d6;
  --serie-8: #e34948;
  --grade: #e2e1dc;
  --sombra: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 4%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fundo: #121211;
    --superficie: #1a1a19;
    --superficie-2: #232321;
    --borda: #33332f;
    --texto: #f0efec;
    --texto-2: #c3c2b7;
    --texto-3: #9a9890;
    --destaque: #3987e5;
    --destaque-texto: #86b6ef;
    --destaque-fundo: #16263b;
    --barra: #3987e5;
    --barra-fundo: #33332f;
    --ouro: #e0b44a;
    --bom: #4cb84c;
    --aviso: #e0a050;
    --serie-1: #3987e5;
    --serie-2: #d95926;
    --serie-3: #199e70;
    --serie-4: #c98500;
    --serie-5: #d55181;
    --serie-6: #008300;
    --serie-7: #9085e9;
    --serie-8: #e66767;
    --grade: #2c2c29;
    --sombra: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --fundo: #121211;
  --superficie: #1a1a19;
  --superficie-2: #232321;
  --borda: #33332f;
  --texto: #f0efec;
  --texto-2: #c3c2b7;
  --texto-3: #9a9890;
  --destaque: #3987e5;
  --destaque-texto: #86b6ef;
  --destaque-fundo: #16263b;
  --barra: #3987e5;
  --barra-fundo: #33332f;
  --ouro: #e0b44a;
  --bom: #4cb84c;
  --aviso: #e0a050;
  --serie-1: #3987e5;
  --serie-2: #d95926;
  --serie-3: #199e70;
  --serie-4: #c98500;
  --serie-5: #d55181;
  --serie-6: #008300;
  --serie-7: #9085e9;
  --serie-8: #e66767;
  --grade: #2c2c29;
  --sombra: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--destaque-texto); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--destaque); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; margin-top: 1.5em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small, .fraco { color: var(--texto-3); }
.oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.conteudo { max-width: 1440px; margin: 0 auto; padding: 0 16px; }

/* Cabeçalho */
.topo { background: var(--superficie); border-bottom: 1px solid var(--borda); position: sticky; top: 0; z-index: 10; }
.topo .conteudo { display: flex; align-items: center; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.marca { display: flex; align-items: center; gap: 8px; color: var(--texto); font-weight: 700; font-size: 1.1rem; }
.marca:hover { text-decoration: none; }
.marca svg { width: 26px; height: 26px; }
.versao { font-size: .72rem; font-weight: 600; color: var(--texto-3); border: 1px solid var(--borda); border-radius: 99px; padding: 1px 7px; }
.menu { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.menu a { color: var(--texto-2); padding: 6px 10px; border-radius: 8px; font-weight: 500; }
.menu a:hover { background: var(--superficie-2); text-decoration: none; }
.menu a[aria-current="page"] { color: var(--destaque-texto); background: var(--destaque-fundo); }
.tema { background: none; border: 1px solid var(--borda); color: var(--texto-2); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; display: grid; place-items: center; }
.tema svg { width: 18px; height: 18px; }
.moeda { width: 5.4em; font: inherit; font-size: .9rem; color: var(--texto-2); background: var(--superficie); border: 1px solid var(--borda); border-radius: 8px; height: 34px; padding: 0 6px; cursor: pointer; }
.moeda[hidden] { display: none; }
@media (max-width: 720px) {
  .topo { position: static; }
  .menu { margin-left: 0; order: 3; width: 100%; padding-bottom: 8px; }
  .moeda { margin-left: auto; }
}

/* Corpo */
main { padding: 24px 0 48px; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.intro p { color: var(--texto-2); max-width: 760px; margin: 0; }
.cartao { background: var(--superficie); border: 1px solid var(--borda); border-radius: 12px; box-shadow: var(--sombra); }
.cartao.pad { padding: 16px 20px; }
.aviso { border-left: 4px solid var(--aviso); padding: 10px 14px; background: var(--superficie); border-radius: 8px; margin: 0 0 16px; color: var(--texto-2); }

/* Destaques do topo */
.podio { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }
.podio .cartao { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.podio .rotulo { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-3); font-weight: 600; }
.podio .nome { font-weight: 650; font-size: 1.05rem; color: var(--texto); }
.podio .valor { color: var(--texto-2); font-size: .9rem; }

/* Filtros */
.filtros { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--borda); }
.filtros input[type="search"], .filtros select, .seletor select {
  font: inherit; color: var(--texto); background: var(--fundo); border: 1px solid var(--borda); border-radius: 8px; padding: 6px 10px; min-height: 36px;
}
.filtros input[type="search"] { flex: 1 1 200px; min-width: 0; }
.filtros label.caixa { display: flex; align-items: center; gap: 6px; color: var(--texto-2); font-size: .9rem; cursor: pointer; }
.filtros .contagem { margin-left: auto; color: var(--texto-3); font-size: .85rem; }

/* Botões de categoria */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--borda); }
.rotulo-chips { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-3); font-weight: 600; margin-right: 4px; }
.chip { font: inherit; font-size: .88rem; color: var(--texto-2); background: var(--superficie); border: 1px solid var(--borda); border-radius: 99px; padding: 4px 12px; cursor: pointer; }
.chip:hover { background: var(--superficie-2); }
.chip[aria-pressed="true"] { background: var(--destaque); border-color: var(--destaque); color: #fff; font-weight: 600; }

/* Tabela */
.rolagem { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; }
.tabela th, .tabela td { padding: 8px 5px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--borda); }
.tabela th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--texto-3); font-weight: 600; background: var(--superficie); position: sticky; top: 0; }
.tabela th.esq, .tabela td.esq { text-align: left; }
.tabela th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.tabela th button::after { content: "↕"; opacity: .35; font-size: .9em; }
.tabela th[aria-sort="ascending"] button::after { content: "↑"; opacity: 1; }
.tabela th[aria-sort="descending"] button::after { content: "↓"; opacity: 1; }
.tabela tbody tr:hover { background: var(--superficie-2); }
.tabela td.modelo { min-width: 168px; }
.tabela td.modelo a { color: var(--texto); font-weight: 600; }
.tabela td.modelo small { display: block; font-size: .8rem; }
.tabela .pos { color: var(--texto-3); font-weight: 600; width: 2.5em; }
.tabela tr.top1 .pos { color: var(--ouro); }
.tabela .vazio { color: var(--texto-3); }
.tabela td.nota { font-weight: 700; }
.selo { display: inline-block; font-size: .7rem; font-weight: 600; border-radius: 99px; padding: 0 6px; margin-left: 6px; border: 1px solid var(--borda); color: var(--texto-2); vertical-align: 1px; }
.selo.aberto { color: var(--bom); border-color: currentColor; }
tr[hidden] { display: none; }

/* Barra de nota/percentil: largura por classe (a CSP não deixa style inline). */
.barra { display: inline-block; width: 44px; height: 6px; background: var(--barra-fundo); border-radius: 3px; vertical-align: middle; margin-left: 8px; overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--barra); border-radius: 3px; }

/* Barra de comparar */
.comparar-barra { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); background: var(--texto); color: var(--fundo); border-radius: 99px; padding: 8px 8px 8px 18px; display: flex; gap: 12px; align-items: center; box-shadow: 0 8px 24px rgb(0 0 0 / 25%); z-index: 20; max-width: calc(100% - 32px); }
.comparar-barra[hidden] { display: none; }
.botao { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; border: 0; border-radius: 99px; padding: 7px 16px; background: var(--destaque); color: #fff; cursor: pointer; }
.botao:hover { text-decoration: none; filter: brightness(1.08); }
.botao.leve { background: var(--superficie-2); color: var(--texto); border: 1px solid var(--borda); }
.comparar-barra .limpar { background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; font: inherit; }

/* Página do modelo */
.cabeca-modelo { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 20px; }
.cabeca-modelo .empresa { color: var(--texto-2); margin: 0; }
.placar { text-align: right; }
.placar .grande { font-size: 2.6rem; font-weight: 750; line-height: 1; }
.placar .fraco { display: block; }
.fichas { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.fichas .cartao { padding: 12px 14px; }
.fichas dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-3); font-weight: 600; }
.fichas dd { margin: 2px 0 0; font-weight: 650; font-size: 1.05rem; }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .grade-2 { grid-template-columns: 1fr; } }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }

/* Gráficos */
.graficos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.graficos .largo { grid-column: 1 / -1; }
@media (max-width: 900px) { .graficos { grid-template-columns: 1fr; } }
.grafico { padding: 16px; }
.grafico h2 { margin: 0 0 4px; font-size: 1.05rem; }
.grafico p { color: var(--texto-2); font-size: .9rem; margin-bottom: 8px; }
.tela { position: relative; height: 360px; }
.tela.baixa { height: 300px; }
.grafico details { margin-top: 8px; font-size: .9rem; }
.grafico details .rolagem { max-height: 280px; overflow: auto; }

/* Comparar */
.seletor { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; padding: 16px; }
.seletor select { width: 100%; }
.tabela-comp th, .tabela-comp td { padding: 8px 12px; border-bottom: 1px solid var(--borda); text-align: right; }
.tabela-comp th:first-child, .tabela-comp td:first-child { text-align: left; color: var(--texto-2); }
.tabela-comp thead th { font-weight: 650; }
.tabela-comp td.melhor { color: var(--bom); font-weight: 700; }

/* Texto longo */
.texto { max-width: 820px; }
.texto li { margin-bottom: .4em; }
.texto table { margin: 8px 0 16px; }
.texto th, .texto td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--borda); }

/* Rodapé */
.rodape { border-top: 1px solid var(--borda); background: var(--superficie); color: var(--texto-2); font-size: .85rem; padding: 20px 0 28px; }
.rodape p { margin: 0 0 .5em; }
.rodape .fontes-falha { color: var(--aviso); }
.pad { padding: 16px; }
main.conteudo { padding-top: 24px; padding-bottom: 48px; }
.tabela tbody th { text-transform: none; letter-spacing: 0; font-size: inherit; font-weight: 500; color: var(--texto); background: none; position: static; }

/* Seletor de idioma (details/summary: funciona sem JavaScript) */
.idiomas { position: relative; }
.idiomas summary { list-style: none; cursor: pointer; height: 34px; min-width: 40px; padding: 0 8px; display: grid; place-items: center; border: 1px solid var(--borda); border-radius: 8px; color: var(--texto-2); font-size: .85rem; font-weight: 600; }
.idiomas summary::-webkit-details-marker { display: none; }
.idiomas ul { position: absolute; right: 0; top: 40px; margin: 0; padding: 6px; list-style: none; background: var(--superficie); border: 1px solid var(--borda); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / 15%); z-index: 30; min-width: 150px; }
.idiomas li a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--texto); }
.idiomas li a:hover { background: var(--superficie-2); text-decoration: none; }
.idiomas li a[aria-current="true"] { color: var(--destaque-texto); font-weight: 600; }
.rodape .autonomo { font-style: italic; }

/* Colunas por categoria (geradas): só aparece a coluna marcada com a categoria ativa */
#ranking [data-cats] { display: none; }
#ranking[data-cat="todas"] [data-cats~="todas"] { display: table-cell; }
#ranking[data-cat="agentico"] [data-cats~="agentico"] { display: table-cell; }
#ranking[data-cat="codigo"] [data-cats~="codigo"] { display: table-cell; }
#ranking[data-cat="raciocinio"] [data-cats~="raciocinio"] { display: table-cell; }
#ranking[data-cat="dados"] [data-cats~="dados"] { display: table-cell; }
#ranking[data-cat="pesquisa"] [data-cats~="pesquisa"] { display: table-cell; }
#ranking[data-cat="design"] [data-cats~="design"] { display: table-cell; }
#ranking[data-cat="navegador"] [data-cats~="navegador"] { display: table-cell; }
#ranking[data-cat="conversa"] [data-cats~="conversa"] { display: table-cell; }
#ranking[data-cat="visao"] [data-cats~="visao"] { display: table-cell; }

/* Larguras das barras (geradas) */
.barra i.w0{width:0%}
.barra i.w1{width:1%}
.barra i.w2{width:2%}
.barra i.w3{width:3%}
.barra i.w4{width:4%}
.barra i.w5{width:5%}
.barra i.w6{width:6%}
.barra i.w7{width:7%}
.barra i.w8{width:8%}
.barra i.w9{width:9%}
.barra i.w10{width:10%}
.barra i.w11{width:11%}
.barra i.w12{width:12%}
.barra i.w13{width:13%}
.barra i.w14{width:14%}
.barra i.w15{width:15%}
.barra i.w16{width:16%}
.barra i.w17{width:17%}
.barra i.w18{width:18%}
.barra i.w19{width:19%}
.barra i.w20{width:20%}
.barra i.w21{width:21%}
.barra i.w22{width:22%}
.barra i.w23{width:23%}
.barra i.w24{width:24%}
.barra i.w25{width:25%}
.barra i.w26{width:26%}
.barra i.w27{width:27%}
.barra i.w28{width:28%}
.barra i.w29{width:29%}
.barra i.w30{width:30%}
.barra i.w31{width:31%}
.barra i.w32{width:32%}
.barra i.w33{width:33%}
.barra i.w34{width:34%}
.barra i.w35{width:35%}
.barra i.w36{width:36%}
.barra i.w37{width:37%}
.barra i.w38{width:38%}
.barra i.w39{width:39%}
.barra i.w40{width:40%}
.barra i.w41{width:41%}
.barra i.w42{width:42%}
.barra i.w43{width:43%}
.barra i.w44{width:44%}
.barra i.w45{width:45%}
.barra i.w46{width:46%}
.barra i.w47{width:47%}
.barra i.w48{width:48%}
.barra i.w49{width:49%}
.barra i.w50{width:50%}
.barra i.w51{width:51%}
.barra i.w52{width:52%}
.barra i.w53{width:53%}
.barra i.w54{width:54%}
.barra i.w55{width:55%}
.barra i.w56{width:56%}
.barra i.w57{width:57%}
.barra i.w58{width:58%}
.barra i.w59{width:59%}
.barra i.w60{width:60%}
.barra i.w61{width:61%}
.barra i.w62{width:62%}
.barra i.w63{width:63%}
.barra i.w64{width:64%}
.barra i.w65{width:65%}
.barra i.w66{width:66%}
.barra i.w67{width:67%}
.barra i.w68{width:68%}
.barra i.w69{width:69%}
.barra i.w70{width:70%}
.barra i.w71{width:71%}
.barra i.w72{width:72%}
.barra i.w73{width:73%}
.barra i.w74{width:74%}
.barra i.w75{width:75%}
.barra i.w76{width:76%}
.barra i.w77{width:77%}
.barra i.w78{width:78%}
.barra i.w79{width:79%}
.barra i.w80{width:80%}
.barra i.w81{width:81%}
.barra i.w82{width:82%}
.barra i.w83{width:83%}
.barra i.w84{width:84%}
.barra i.w85{width:85%}
.barra i.w86{width:86%}
.barra i.w87{width:87%}
.barra i.w88{width:88%}
.barra i.w89{width:89%}
.barra i.w90{width:90%}
.barra i.w91{width:91%}
.barra i.w92{width:92%}
.barra i.w93{width:93%}
.barra i.w94{width:94%}
.barra i.w95{width:95%}
.barra i.w96{width:96%}
.barra i.w97{width:97%}
.barra i.w98{width:98%}
.barra i.w99{width:99%}
.barra i.w100{width:100%}
