/* Portal publico — Portal Ao Vivo
   CSS estatico em arquivo proprio: uma requisicao, cacheavel, e mantem o HTML
   pequeno (meta de 100 KB por pagina no plano, secao 9.1). Sem framework. */

:root {
  --ink: #0a0a0d;
  --ink-soft: #131317;
  --panel: #18181d;
  --panel-2: #1f1f26;
  --line: #2c2c34;
  --gold: #e8a838;
  --gold-deep: #b9781a;
  --gold-pale: #f4cf85;
  --white: #f5f3ee;
  --muted: #9a9aa4;
  --win: #4caf6d;
  --loss: #c0392b;
  --radius: 10px;
  --font-display: "Anton", "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-data: "Oswald", "Barlow Semi Condensed", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--white);
  background: var(--ink);
  line-height: 1.5;
}
a { color: var(--gold-pale); }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: #000; padding: .6rem 1rem; z-index: 99;
}
.skip:focus { left: 0; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--ink-soft);
  position: sticky; top: 0; z-index: 10;
}
header.site .bar {
  display: flex; align-items: center; gap: 1rem;
  min-height: 60px; flex-wrap: wrap;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.25rem; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none;
  color: var(--white); white-space: nowrap;
}
.brand b { color: var(--gold); font-weight: 400; }
nav.main { display: flex; gap: 1rem; flex-wrap: wrap; margin-left: auto; }
nav.main a {
  text-decoration: none; color: var(--muted);
  font-size: .9rem; padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--white); border-bottom-color: var(--gold); }

main { padding: 1.5rem 0 3rem; }

h1, h2, h3 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; font-weight: 400; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 .75rem; color: var(--gold); }
h3 { font-size: .95rem; margin: 0 0 .5rem; }

.lead { color: var(--muted); margin: 0 0 1.5rem; font-size: .95rem; }

.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold); text-decoration: underline; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.card + .card { margin-top: 1rem; }
.card > h3, .card-head {
  padding: .6rem .9rem; border-bottom: 1px solid var(--line);
  background: var(--panel-2); font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; color: var(--gold);
}
.pad { padding: .9rem; }

.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: 1fr; }
@media (min-width: 780px) { .grid.two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }

/* --- tabela de classificacao --- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .45rem .5rem; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
td.num, th.num { font-family: var(--font-data); }
tbody tr:hover { background: var(--panel-2); }
.pos { color: var(--gold); font-family: var(--font-data); width: 2rem; }
tr.zona td { border-top: 2px solid var(--gold-deep); }

.tcell { display: flex; align-items: center; gap: .5rem; }
.escudo { width: 26px; height: 26px; object-fit: contain; flex: 0 0 auto; }
.escudo.ph {
  border-radius: 4px; background: var(--panel-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .6rem; color: var(--muted);
}
.nome { text-decoration: none; color: var(--white); }
.nome:hover { color: var(--gold); }

/* --- lista de jogos --- */
.jogo {
  display: grid; grid-template-columns: 2.6rem 1fr auto;
  gap: .6rem; align-items: center;
  padding: .55rem .9rem; border-bottom: 1px solid var(--line);
  color: inherit;
}
.jogo:last-child { border-bottom: 0; }
.jogo:hover { background: var(--panel-2); }
.jogo .placar {
  font-family: var(--font-data); font-size: 1.05rem; letter-spacing: .04em;
  white-space: nowrap; text-decoration: none; color: var(--white);
  padding: .2rem .45rem; border-radius: 6px;
}
.jogo .placar:hover { color: var(--gold); background: var(--panel-2); }
.jogo .placar span { display: inline-block; min-width: 1.4rem; text-align: center; }
.jogo .quando { font-size: .74rem; color: var(--muted); }
.jogo .times { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.jogo .linha { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.jogo .linha b { font-family: var(--font-data); font-weight: 500; font-size: .92rem; }
.jogo .linha span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.jogo .a { flex-direction: row-reverse; }

.tag {
  display: inline-block; font-size: .68rem; letter-spacing: .06em;
  text-transform: uppercase; padding: .1rem .4rem; border-radius: 3px;
  background: var(--gold); color: #000; font-weight: 700;
}
.tag.live { background: var(--loss); color: #fff; }

.meta { color: var(--muted); font-size: .82rem; }
.vazio { padding: 1.2rem .9rem; color: var(--muted); font-size: .88rem; text-align: center; }

/* --- destaque do jogo ao vivo --- */
.ao-vivo {
  border: 1px solid var(--gold-deep); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  padding: 1.1rem; text-align: center;
}
.ao-vivo .placar {
  font-family: var(--font-data); font-size: 2.6rem; letter-spacing: .04em;
  display: flex; justify-content: center; align-items: center; gap: .8rem; flex-wrap: wrap;
}
.ao-vivo .placar .x { color: var(--muted); font-size: 1.2rem; }

.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.chip {
  font-size: .78rem; padding: .18rem .55rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.chip.on { border-color: var(--gold); color: var(--gold-pale); }

/* --- formulario de busca --- */
form.busca { display: flex; gap: .5rem; }
form.busca input {
  flex: 1; padding: .6rem .8rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); color: var(--white);
  font-size: .95rem;
}
form.busca input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.btn {
  padding: .6rem 1rem; border-radius: var(--radius); border: 0;
  background: var(--gold); color: #000; font-weight: 700; cursor: pointer;
  font-size: .9rem;
}
.btn:hover { background: var(--gold-pale); }

.lista-links { list-style: none; padding: 0; margin: 0; }
.lista-links li { border-bottom: 1px solid var(--line); }
.lista-links li:last-child { border-bottom: 0; }
.lista-links a {
  display: block; padding: .55rem .9rem; text-decoration: none; color: inherit;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.lista-links a:hover { background: var(--panel-2); }
.lista-links small { color: var(--muted); }

footer.site {
  border-top: 1px solid var(--line); background: var(--ink-soft);
  padding: 1.5rem 0; margin-top: 2rem; font-size: .85rem; color: var(--muted);
}
footer.site nav { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}