/* ============================================================
   Análise da rodada (/analise). Usa os tokens e o nav/rodapé de
   styles.css; aqui só o que é da página, escopado em .anl.
   Cores de favoritismo = lib/core/utils/favoritismo.dart (cortes
   55/45/35), com o equilibrado em marrom, como no mockup aprovado.
   ============================================================ */
:root {
  --a-line: rgba(255, 255, 255, .07);
  --a-line-2: rgba(255, 255, 255, .13);
  --a-faint: #8A8FA0;
  --a-up-text: #6FD27A;
  --a-fav-forte: #2E7D32;
  --a-fav-mod: #558B2F;
  --a-fav-eq: #8A6A2E;
  --a-fav-und: #C62828;
  --a-empate: #4A5066;
  --a-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

.anl { font-size: 15px; }
.anl :focus-visible { outline: 2px solid var(--orange-soft); outline-offset: 2px; border-radius: 6px; }
.anl .num { font-family: var(--a-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.anl h1, .anl h3 { margin: 0; text-wrap: balance; }
.anl p { margin: 0; }

.a-page {
  max-width: var(--maxw); margin: 0 auto;
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) 72px max(16px, env(safe-area-inset-left, 0px));
}
/* âncoras do menu do topo; o header é fixo */
#favoritos, #jogos, #rodadas { scroll-margin-top: 90px; }
.a-crumbs { font-size: 12.5px; color: var(--a-faint); margin-bottom: 6px; }
.a-crumbs a { color: inherit; }
.a-crumbs a:hover { color: var(--text); }

.a-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.a-head h1 { font-size: 34px; letter-spacing: -.035em; line-height: 1.08; }
.a-head p { color: var(--text-dim); max-width: 58ch; margin-top: 6px; }
.a-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--a-line); white-space: nowrap; }
.a-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--a-faint); }
.a-status.aberto i { background: var(--a-up-text); }
.a-status.andamento i { background: var(--live); }

/* seletor de rodada: links, para o robô achar todas */
.a-rodadas { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; min-width: 0; }
.a-rlbl { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--a-faint); flex: none; }
.a-rlist { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 2px; mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.a-rlist::-webkit-scrollbar { display: none; }
.a-rlist a { flex: none; min-width: 38px; text-align: center; font-family: var(--a-mono); font-size: 12.5px; padding: 6px 8px; border-radius: 9px; background: var(--surface); border: 1px solid var(--a-line); color: var(--text-dim); transition: background .2s var(--ease), color .2s var(--ease); }
.a-rlist a:hover { color: var(--text); background: var(--surface-2); }
.a-rlist a[aria-current] { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600; }

/* destaques */
.a-dest { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.a-dcard { background: var(--surface); border: 1px solid var(--a-line); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.a-dcard small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--a-faint); }
.a-dm { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 700; font-size: 16px; min-width: 0; }
.a-dm img { width: 24px; height: 24px; object-fit: contain; flex: none; }
.a-dnome { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-dm .num { margin-left: auto; font-size: 18px; flex: none; }
.a-dcard p { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }

.a-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-dim); margin-bottom: 12px; }
.a-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.anl .fav-forte { background: var(--a-fav-forte); }
.anl .fav-mod { background: var(--a-fav-mod); }
.anl .fav-eq { background: var(--a-fav-eq); }
.anl .fav-und { background: var(--a-fav-und); }
.anl .emp { background: var(--a-empate); }

/* jogos */
.a-jogos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.a-jogo { background: var(--surface); border: 1px solid var(--a-line); border-radius: 18px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.a-when { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--a-faint); }
.a-tag { font-weight: 700; padding: 1px 8px; border-radius: 6px; font-size: 11px; color: #fff; white-space: nowrap; }
.a-tag.fora { background: var(--surface-2); color: var(--text-dim); }
.a-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.a-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.a-team > div { min-width: 0; }
.a-team.vis { flex-direction: row-reverse; text-align: right; }
.a-team img { width: 36px; height: 36px; object-fit: contain; flex: none; }
.a-team b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-forma { display: flex; gap: 3px; margin-top: 3px; }
.a-team.vis .a-forma { justify-content: flex-end; }
.a-forma i { width: 15px; height: 15px; border-radius: 4px; font-style: normal; font-size: 9px; font-weight: 800; display: grid; place-items: center; color: #fff; }
.a-forma .V { background: #2E7D32; } .a-forma .E { background: #5A6075; } .a-forma .D { background: #B3261E; }
.a-x { font-size: 12px; color: var(--a-faint); font-weight: 700; }

.a-bar { display: flex; height: 30px; border-radius: 9px; overflow: hidden; gap: 2px; }
.a-bar span { display: grid; place-items: center; font-family: var(--a-mono); font-size: 12px; font-weight: 600; color: #fff; min-width: 34px; }
.a-bar .emp { color: var(--text-dim); }
.a-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--a-faint); margin-top: -4px; }
.a-labels b { color: var(--text); font-weight: 700; }
.a-txt { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }

.a-jogo details summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--orange-soft); list-style: none; width: fit-content; }
.a-jogo details summary::-webkit-details-marker { display: none; }
.a-jogo details summary::after { content: " +"; }
.a-jogo details[open] summary::after { content: " −"; }
.a-jogo details[open] summary { margin-bottom: 8px; }
.a-bloco + .a-bloco { margin-top: 10px; }
.a-bloco h3 { margin: 0 0 5px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--a-faint); }
.a-fatores { display: flex; flex-wrap: wrap; gap: 5px; }
.a-fatores span { font-size: 11.5px; padding: 3px 8px; border-radius: 7px; background: var(--surface-2); color: var(--text); }
.a-not { font-size: 12.5px; color: var(--text-dim); display: flex; gap: 6px; }
.a-not + .a-not { margin-top: 4px; }

.a-sem { font-size: 13px; color: var(--text-dim); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.anl .a-sem-rodada { background: var(--surface); border: 1px solid var(--a-line); border-radius: 16px; padding: 14px 16px; font-size: 14px; margin-bottom: 22px; }
.a-sem a { color: var(--orange-soft); font-weight: 700; }

.a-cta { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-radius: 18px; background: linear-gradient(120deg, rgba(234, 92, 31, .18), rgba(138, 52, 19, .12)); border: 1px solid rgba(234, 92, 31, .3); }
.a-cta b { font-size: 16px; }
.a-cta p { font-size: 13px; color: var(--text-dim); }
.a-cta a { font-weight: 800; padding: 11px 18px; border-radius: 999px; background: var(--orange); color: #fff; white-space: nowrap; }

@media (max-width: 760px) {
  .a-page { padding-top: 18px; padding-bottom: 40px; }
  .a-head h1 { font-size: 27px; }
  .a-dest { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .a-jogos { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .a-rlist a { transition: none; } }
