/* Comunidade Brasa (community.brasainteractive.com). Mesmas fontes e laranja do site, fundo escuro. */
@font-face { font-family: 'Big Shoulders'; src: url('/estatico/fontes/big-shoulders-700.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Big Shoulders'; src: url('/estatico/fontes/big-shoulders-400.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/estatico/fontes/instrument-sans-400.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/estatico/fontes/instrument-sans-700.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/estatico/fontes/instrument-sans-400-italic.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --fundo: #121016;
  --fundo-2: #1b1820;
  --fundo-3: #25212b;
  --linha: #34303b;
  --texto-cor: #eeede8;
  --mudo: #a39e98;
  --brasa: #ff4f12;
  --brasa-escura: #c93a06;
  --brasa-clara: #ffb08f;
  --ok: #3fbf6a;
  --erro: #ff6b4f;
  --forte: #fff;
  --topo-fundo: #0c0a0f;
  --texto-2: #d4d1cb;
  --codigo: #0b0a0d;
  --titulo: 'Big Shoulders', 'Arial Narrow', 'Roboto Condensed', Impact, sans-serif;
  --texto: 'Instrument Sans', ui-sans-serif, system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, 'SFMono-Regular', Menlo, monospace;
  --raio: 10px;
  color-scheme: dark;
}

/* Tema: cookie brasa_tema (escuro | claro | sistema; sem cookie = escuro), o mesmo do site.
   O servidor lê o cookie e escreve data-tema no <html> (views.mjs); o botão do topo é um form POST /tema. */
:root[data-tema='claro'] {
  --fundo: #eeede8;
  --fundo-2: #faf9f6;
  --fundo-3: #e3e1d9;
  --linha: #cfccc4;
  --texto-cor: #18161f;
  --mudo: #625e5a;
  --brasa-clara: #b53404;
  --ok: #1f7a3f;
  --erro: #c4250b;
  --forte: #18161f;
  --topo-fundo: #faf9f6;
  --texto-2: #3a3740;
  --codigo: #e9e7e1;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-tema='sistema'] {
    --fundo: #eeede8;
    --fundo-2: #faf9f6;
    --fundo-3: #e3e1d9;
    --linha: #cfccc4;
    --texto-cor: #18161f;
    --mudo: #625e5a;
    --brasa-clara: #b53404;
    --ok: #1f7a3f;
    --erro: #c4250b;
    --forte: #18161f;
    --topo-fundo: #faf9f6;
    --texto-2: #3a3740;
    --codigo: #e9e7e1;
    color-scheme: light;
  }
}
.tema-form { margin: 0; display: flex; }
.tema-botao { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--texto-cor); cursor: pointer; }
.tema-botao:hover { background: var(--fundo-3); color: var(--forte); }
.tema-botao svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tema-botao .tema__escuro { fill: currentColor; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto-cor);
  font-family: var(--texto);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
a { color: var(--brasa-clara); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--forte); }
h1, h2 { font-family: var(--titulo); font-weight: 700; line-height: 1; letter-spacing: 0.01em; margin: 0 0 0.4em; }
h1 { font-size: clamp(2rem, 4vw + 0.6rem, 3rem); text-transform: uppercase; }
h2 { font-size: 1.6rem; text-transform: uppercase; }
p { margin: 0 0 0.8em; }
:focus-visible { outline: 2px solid var(--brasa); outline-offset: 2px; }
.invisivel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mudo { color: var(--mudo); }
.erro { color: var(--erro); font-weight: 700; }

/* topo */
.topo { background: var(--topo-fundo); border-bottom: 3px solid var(--brasa); position: sticky; top: 0; z-index: 5; }
.topo__dentro { max-width: 1100px; margin: 0 auto; padding: 0.6rem 1rem; display: flex; gap: 1rem; align-items: center; }
.marca { display: flex; align-items: center; gap: 0.5rem; color: var(--forte); text-decoration: none; font-family: var(--titulo); font-size: 1.5rem; text-transform: uppercase; white-space: nowrap; }
.marca b { color: var(--brasa); }
.busca { flex: 1; min-width: 0; }
.busca input { width: 100%; max-width: 420px; }
.topo__conta { display: flex; align-items: center; gap: 0.75rem; }
.topo__eu { display: flex; align-items: center; gap: 0.45rem; color: var(--texto-cor); text-decoration: none; font-weight: 700; max-width: 180px; }
.topo__eu span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topo__link { color: var(--texto-cor); font-weight: 700; }
.topo__sair { margin: 0; }
.topo__sino { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; color: var(--texto-cor); border-radius: 8px; flex: none; }
.topo__sino:hover { background: var(--fundo-3); color: var(--forte); }
.sino__num { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--brasa); color: #120a06; font-size: 0.7rem; font-weight: 700; line-height: 18px; text-align: center; }

/* formulário */
input, textarea, select {
  font: inherit;
  font-weight: 400;
  color: var(--texto-cor);
  background: var(--fundo-2);
  border: 1px solid var(--linha);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  max-width: 100%;
}
textarea { width: 100%; resize: vertical; font-family: var(--texto); }
input:focus, textarea:focus, select:focus { border-color: var(--brasa); outline: none; }
label { display: grid; gap: 0.3rem; font-weight: 700; }
label input { width: 100%; }
.pilha { display: grid; gap: 0.9rem; }
.pilha > .botao { justify-self: start; }
.pilha > .botao--opcao { justify-self: stretch; }
.linha { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.dica { color: var(--mudo); font-size: 0.88rem; margin: 0; }
.dica, .post__texto code { overflow-wrap: anywhere; }

.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--brasa); color: #120a06; border: 0; border-radius: 8px;
  padding: 0.6rem 1.05rem; text-decoration: none; white-space: nowrap;
}
.botao:hover { background: #ff6a36; color: #120a06; }
.botao--leve { background: transparent; color: var(--texto-cor); border: 1px solid var(--linha); }
.botao--leve:hover { background: var(--fundo-3); color: var(--forte); }
.botao--perigo { background: #b3260b; color: #fff; }
.botao--perigo:hover { background: #d4300f; color: #fff; }
.botao--steam { background: #1b2838; color: #fff; border: 1px solid #66c0f4; }
.botao--steam:hover { background: #2a475e; color: #fff; }
.botao--opcao { display: grid; justify-items: start; text-align: left; white-space: normal; width: 100%; }
.botao--opcao small { font-weight: 400; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brasa-clara); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* página */
.pagina { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.capa { padding: 1.2rem 0 0.6rem; }
.capa h1 { font-size: clamp(2.6rem, 6vw + 0.5rem, 4.4rem); }
.capa h1 span { color: var(--brasa); }
.capa p { max-width: 60ch; color: var(--texto-2); font-size: 1.08rem; }
.trilha { color: var(--mudo); font-size: 0.92rem; margin-bottom: 0.6rem; }
.trilha a { color: var(--mudo); }
.cabeca { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.cabeca p { color: var(--mudo); margin: 0; }
.cabeca--topico h1 { text-transform: none; font-size: clamp(1.8rem, 3vw + 0.6rem, 2.6rem); line-height: 1.05; }
.grupo { margin-top: 2rem; }
.grupo__desc { color: var(--mudo); margin-top: -0.2rem; }
.vazio { padding: 2rem 0; }

.caixa { background: var(--fundo-2); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1.2rem; margin: 1rem 0; }
.caixa--fina { padding: 0.8rem 1rem; }
.caixa--estreita { max-width: 520px; margin: 2rem auto; }
.caixa h2 { font-size: 1.4rem; margin: 0; }

/* listas (categorias, tópicos, resultados) */
.lista { list-style: none; margin: 0; padding: 0; border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; background: var(--fundo-2); }
.lista > li { padding: 0.85rem 1rem; border-top: 1px solid var(--linha); }
.lista > li:first-child { border-top: 0; }
.categoria, .topico { display: grid; grid-template-columns: minmax(0, 1fr) 6rem 12rem; gap: 1rem; align-items: center; }
.categoria__nome, .topico__titulo { font-weight: 700; color: var(--forte); text-decoration: none; font-size: 1.08rem; }
.categoria__nome:hover, .topico__titulo:hover { color: var(--brasa-clara); text-decoration: underline; }
.categoria p { margin: 0.15rem 0 0; color: var(--mudo); font-size: 0.93rem; }
.categoria__num, .topico__num { text-align: center; line-height: 1.1; }
.categoria__num b, .topico__num b { display: block; font-family: var(--titulo); font-size: 1.6rem; }
.categoria__num span, .topico__num span { color: var(--mudo); font-size: 0.8rem; }
.categoria__ultimo, .topico__ultimo { font-size: 0.88rem; color: var(--mudo); overflow: hidden; }
.topico__meta { color: var(--mudo); font-size: 0.88rem; margin-top: 0.15rem; }
.topico__meta .nome { color: var(--mudo); }
.cat-tag { color: var(--brasa-clara); text-decoration: none; font-weight: 700; }
.resultado__trecho, .denuncia__motivo { margin: 0.35rem 0 0; color: var(--texto-2); font-size: 0.93rem; }
.denuncia { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.denuncia__motivo { color: var(--brasa-clara); }

.selo { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.1rem 0.45rem; border-radius: 99px; border: 1px solid var(--linha); color: var(--mudo); vertical-align: middle; white-space: nowrap; }
.selo--fixo { border-color: var(--brasa); color: var(--brasa); }
.selo--ok { border-color: var(--ok); color: var(--ok); }
.selo--erro { border-color: var(--erro); color: var(--erro); }
.selo--equipe { background: var(--brasa); border-color: var(--brasa); color: #120a06; }
.selo--leve { font-size: 0.66rem; }

/* tópico e posts */
.posts { display: grid; gap: 0.9rem; }
.post { background: var(--fundo-2); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1rem 1.1rem; }
.post--solucao { border-color: var(--ok); box-shadow: inset 4px 0 0 var(--ok); }
.post--apagado .post__autor, .post--apagado .post__texto { opacity: 0.6; }
.post__autor { display: flex; gap: 0.7rem; align-items: center; margin-bottom: 0.7rem; font-size: 0.92rem; }
.post__autor .nome { font-weight: 700; color: var(--forte); }
.post__sol { margin-left: auto; }
.post__texto { max-width: 75ch; }
.post__texto p:last-child { margin-bottom: 0; }
.post__texto code { font-family: var(--mono); font-size: 0.9em; background: var(--fundo-3); padding: 0.1em 0.35em; border-radius: 4px; }
.post__texto pre { background: var(--codigo); border: 1px solid var(--linha); border-radius: 8px; padding: 0.8rem 1rem; overflow-x: auto; margin: 0 0 0.8em; }
.post__texto pre code { background: none; padding: 0; font-size: 0.88rem; overflow-wrap: normal; white-space: pre; }
.post__acoes { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-items: flex-start; margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px solid var(--linha); font-size: 0.9rem; }
.post__acoes form { margin: 0; }
.menu summary, .moderar summary { cursor: pointer; color: var(--brasa-clara); text-decoration: underline; text-underline-offset: 2px; }
.menu[open] { flex-basis: 100%; }
.menu form { margin-top: 0.6rem; max-width: 420px; }
.moderar { background: var(--fundo-2); border: 1px dashed var(--brasa); border-radius: var(--raio); padding: 0.7rem 1rem; margin: 0 0 1rem; }
.moderar summary { font-weight: 700; color: var(--brasa); text-decoration: none; }
.moderar form { margin: 0; }
.moderar__linha { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.7rem; align-items: center; }
.moderar__mover { display: flex; gap: 0.5rem; flex-wrap: wrap; min-width: 0; }
.moderar__mover select { max-width: 100%; min-width: 0; }
.moderar .pilha { margin-top: 0.7rem; max-width: 420px; }
.solucao-aviso { border-color: var(--ok); }
.post__texto .citacao { margin: 0 0 0.8em; padding: 0.55rem 0.9rem; border-left: 3px solid var(--brasa); background: var(--fundo-3); border-radius: 0 8px 8px 0; color: var(--texto-2); }
.citacao cite { display: block; font-style: normal; font-weight: 700; font-size: 0.86rem; margin-bottom: 0.25rem; }
.citacao cite a { color: var(--brasa-clara); }
.citacao p:last-child { margin-bottom: 0; }
.apagado-aviso { color: var(--erro); font-size: 0.88rem; font-weight: 700; }
.selo--equipe-leve { border-color: var(--brasa); color: var(--brasa-clara); }
.historico ol { margin: 0.6rem 0 0; padding-left: 1.2rem; max-width: 100%; }
.historico li { margin-bottom: 0.6rem; }
.historico pre { margin: 0.2rem 0 0; padding: 0.5rem 0.7rem; background: var(--codigo); border: 1px solid var(--linha); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.84rem; max-height: 16rem; overflow: auto; }
.notif a { color: var(--texto-cor); text-decoration: none; }
.notif a:hover { text-decoration: underline; }
.notif--nova { box-shadow: inset 4px 0 0 var(--brasa); background: var(--fundo-3); }
.notif--nova a { color: var(--forte); }

.av { width: 40px; height: 40px; border-radius: 6px; flex: none; object-fit: cover; }
.topo .av { width: 28px; height: 28px; }
.post .av { width: 44px; height: 44px; }
.av--letra { display: inline-grid; place-items: center; background: var(--brasa-escura); color: #fff; font-family: var(--titulo); font-weight: 700; font-size: 1.3rem; }
.perfil { display: flex; gap: 1.2rem; align-items: center; }
.perfil .av { width: 96px; height: 96px; font-size: 3rem; }
.perfil h1 { text-transform: none; }
.perfil p { margin: 0.3rem 0 0; color: var(--mudo); }

.paginas { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1rem 0; color: var(--mudo); }
.aviso { text-align: center; padding: 3rem 0; max-width: 560px; margin: 0 auto; }
.aviso .busca input { max-width: 100%; }
.busca--grande { margin: 1.2rem 0 1.6rem; }
.busca--grande input { max-width: 560px; width: 100%; font-size: 1.1rem; }

.rodape { border-top: 1px solid var(--linha); color: var(--mudo); font-size: 0.88rem; text-align: center; padding: 1.5rem 1rem 2rem; }
.rodape p { margin: 0.2rem 0; }

/* celular */
@media (max-width: 760px) {
  .topo__dentro { flex-wrap: wrap; gap: 0.5rem 0.8rem; }
  .marca { font-size: 1.05rem; gap: 0.35rem; }
  .marca img { width: 26px; height: auto; }
  .topo__link { font-size: 0.88rem; }
  .busca { order: 3; flex-basis: 100%; }
  .busca input { max-width: none; }
  .topo__conta { margin-left: auto; gap: 0.5rem; }
  .topo__eu span:not(.av) { display: none; }
  .topo .botao { padding: 0.45rem 0.7rem; font-size: 0.9rem; }
  .categoria, .topico { grid-template-columns: minmax(0, 1fr) auto; gap: 0.3rem 0.8rem; }
  .categoria__ultimo, .topico__ultimo { grid-column: 1 / -1; }
  .topico__ultimo { display: none; }
  .categoria__num b, .topico__num b { font-size: 1.3rem; }
  .cabeca__acao { width: 100%; }
  .post { padding: 0.85rem; }
  .perfil { flex-direction: column; text-align: center; }
  .denuncia { flex-direction: column; }
}
