.jg-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.jg-grp { margin: 10px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.jg-grp > summary { cursor: pointer; padding: 9px 12px; font-weight: 700; color: var(--tx); display: flex; gap: 10px; align-items: baseline; }
.jg-grp > summary small { color: var(--mute); font-weight: 500; }
.jg-ev { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); }
.jg-ev .t { color: var(--mute); font-variant-numeric: tabular-nums; font-size: 12px; }
.jg-ev .n { color: var(--tx); text-decoration: none; } .jg-ev .n:hover { color: var(--info); }
.jg-flags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.fl { font-size: 11px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line2); color: var(--dim); }
.fl.on { color: var(--up); border-color: rgba(31, 201, 127, .5); background: var(--up-bg); }
.fl.q { color: var(--up); border-color: var(--up); background: var(--up-bg); font-weight: 700; }
@media (max-width: 640px) { .jg-ev { grid-template-columns: 1fr; } .jg-flags { justify-content: flex-start; } }
.lv { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.lv-strong { background: rgba(31, 201, 127, .28); color: #3be39a; border-color: #1fc97f; }
.lv-good { background: rgba(140, 220, 160, .16); color: #a6e6b4; border-color: rgba(140, 220, 160, .6); }
.lv-watch { background: var(--warn-bg); color: var(--warn); border-color: rgba(243, 185, 77, .6); }
.lv-none { background: var(--down-bg); color: var(--down); border-color: rgba(240, 80, 106, .5); }
.legend { color: var(--mute); font-size: 12px; margin: 4px 0; } .legend .lv { margin-right: 4px; }
/* ---- shared table system (Top Opportunities, game analysis, Data Centre, Analyser): readable widths, numbers aligned right, scroll INSIDE the table box, never the page ---- */
body[data-page="jogo"] .wrap.an, body[data-page="jogos"] .wrap.an, body[data-page="oportunidades"] .wrap.an, body[data-page="centro"] .wrap.an { max-width: 1480px; }                                            /* the wide tables need the room the home already uses; reading text keeps its own narrow width below */
.an .muted, .an .foot, .an .legend, .an .note { max-width: 980px; }
.tabwrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; border-radius: 8px; }
.tabwrap > table { min-width: 0; }
.an table.hist, .an table.tbl { width: 100%; min-width: 0; border-collapse: collapse; margin-top: 0; font-size: 13px; }
.an table.hist th, .an table.tbl th { padding: 9px 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); background: rgba(20, 33, 58, .55); white-space: nowrap; text-align: left; border-bottom: 1px solid var(--line2); }
.an table.hist td, .an table.tbl td { padding: 10px 12px; vertical-align: middle; border-bottom: 1px solid var(--line); line-height: 1.35; }
.an table.hist tbody tr:hover, .an table.tbl tbody tr:hover { background: rgba(79, 140, 255, .06); }
.an table .num, .an table th.num, .an table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.an table .nw { white-space: nowrap; }
.an table.stats th:not(:first-child) { text-align: right; }                  /* headers follow their numbers (the old stats tables right-align every column after the first) */
.an table.stats.tbl-edge th, .an table.stats.tbl-edge td, .an table.tbl-edge th, .an table.tbl-edge td { text-align: left; font-family: inherit; overflow-wrap: anywhere; }
.an table.stats.tbl-edge th.num, .an table.stats.tbl-edge td.num, .an table.tbl-edge th.num, .an table.tbl-edge td.num { text-align: right; font-family: "JetBrains Mono", "SF Mono", Consolas, monospace; font-size: 12.5px; }
.an table.stats.tbl-edge td.ctr, .an table.stats.tbl-edge th.ctr, .an table.tbl-edge td.ctr, .an table.tbl-edge th.ctr { text-align: center; }
.an table.stats.tbl-edge th.num { font-family: inherit; }
/* long names (events, bets) wrap inside their cell instead of running over the next column; numbers and short labels stay on one line */
.an table.stats.tbl-edge td, .an table.tbl-edge td, .an table.tbl-wide td { white-space: normal; }
.an table.stats.tbl-edge td.num, .an table.stats.tbl-edge td.nw, .an table.tbl-edge td.num, .an table.tbl-edge td.nw, .an table.tbl-wide td.num, .an table.tbl-wide td.nw { white-space: nowrap; }
.an table td small, .an table td .mut { white-space: normal; }
/* tables with many columns keep a readable width and scroll sideways inside their box; the first column stays in view */
.tabwrap table.tbl-wide, .tabwrap table.tbl-edge { table-layout: fixed; }                  /* the column widths come from <colgroup> (jogos_lib.js colunas): same in every table of the page; the min-width is their sum */
.tabwrap table.tbl-wide th:first-child, .tabwrap table.tbl-wide td:first-child, .tabwrap table.tbl-edge th:first-child, .tabwrap table.tbl-edge td:first-child { position: sticky; left: 0; z-index: 1; background: #101a2e; }
.tabwrap table.tbl-wide th:first-child, .tabwrap table.tbl-edge th:first-child { background: #14213a; }
.an table.tbl-wide td:first-child, .an table.tbl-edge td:first-child { box-shadow: 1px 0 0 var(--line2); }
.mut { color: var(--mute); display: block; font-size: 11.5px; } td .mut { margin-top: 1px; }
/* the recommended stake: the first thing to read in a row */
td.stk { text-align: center; white-space: nowrap; background: rgba(20, 33, 58, .35); border-left: 1px solid var(--line2); border-right: 1px solid var(--line2); }
td.stk .u { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--mute); }
td.stk .e { font-size: 12px; color: var(--tx); font-variant-numeric: tabular-nums; }
td.stk .why { font-size: 11px; color: var(--mute); white-space: normal; max-width: 150px; margin: 1px auto 0; line-height: 1.25; }
td.stk-on { background: var(--up-bg); } td.stk-on .u { color: #3be39a; }
.stk-box { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
.stk-chip { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; align-items: center; min-width: 260px; padding: 9px 14px; border: 1px solid #1fc97f; border-radius: 10px; background: var(--up-bg); }
.stk-chip .u { grid-row: span 2; font-size: 22px; font-weight: 800; color: #3be39a; font-variant-numeric: tabular-nums; } .stk-chip .e { color: var(--tx); font-weight: 600; } .stk-chip small { color: var(--mute); }
.stk-none { margin: 0; padding: 12px 14px; color: var(--mute); }
.regbox { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; } .regbox .btn2 { min-width: 84px; }
.regform { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .regform input { width: 84px; }
.inrow { display: flex; gap: 8px; } .inrow label { display: block; } .inrow input { width: 68px; }
.tbl-opp .inrow, .pk-esp .inrow { flex-direction: column; gap: 4px; }
.pk-esp th.ordc { cursor: pointer; user-select: none; }
.pk-esp th.ordc:hover, .pk-esp th.ordc-on { color: var(--text, #e8edf5); }
.pk-titulo { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 8px; }
.seta { background: none; border: 1px solid var(--line2, #2a3342); border-radius: 6px; color: inherit; width: 26px; height: 26px; line-height: 1; font-size: 15px; cursor: pointer; padding: 0; }
.seta:hover, .seta:focus-visible { border-color: var(--info, #5b9bd5); outline: none; }
.pk-fechado { opacity: .85; }              /* Top Opportunities has many columns: the two boxes (Captain’s Bet, Betclic) sit one above the other so the table still fits without scrolling */
tr.r-strong > td:first-child { box-shadow: inset 3px 0 0 #1fc97f, 1px 0 0 var(--line2); } tr.r-good > td:first-child { box-shadow: inset 3px 0 0 rgba(140, 220, 160, .7), 1px 0 0 var(--line2); }
tr.r-watch > td:first-child { box-shadow: inset 3px 0 0 rgba(243, 185, 77, .7), 1px 0 0 var(--line2); } tr.r-none > td:first-child { box-shadow: inset 3px 0 0 transparent, 1px 0 0 var(--line2); }
.sel { font-weight: 600; color: var(--tx); }
.modo-reduzido { color: var(--warn) !important; font-weight: 600; } .modo-completo { color: var(--mute); }
.jg-stakes { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stk-mini { display: inline-flex; gap: 4px; align-items: center; padding: 3px 10px; border: 1px solid #1fc97f; border-radius: 999px; background: var(--up-bg); font-size: 12px; } .stk-mini b { color: #3be39a; font-size: 13.5px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .jg-stakes { grid-column: 1; } }
.lvbox { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; } .lvbox small { color: var(--mute); white-space: normal; }
@media (max-width: 720px) {
  .wrap.an { padding-left: 10px; padding-right: 10px; } .stk-chip { min-width: 0; width: 100%; }
}
@media (max-width: 1180px) {
  /* narrow screens: every row of the wide tables becomes a card, name first, the stake right under it, then the other values with their labels */
  .tabwrap:has(.tbl-cards) { overflow-x: visible; }
  .tbl-cards, .tbl-cards tbody, .tbl-cards tr, .tbl-cards td { display: block; width: auto; }
  .tbl-cards { min-width: 0 !important; table-layout: auto; } .tbl-cards colgroup, .tbl-cards thead { display: none; }
  .tbl-cards tr { display: flex; flex-direction: column; margin: 10px 0; padding: 8px 12px; border: 1px solid var(--line2); border-radius: 10px; background: #101a2e; }
  .tbl-cards td, .an table.tbl.tbl-cards td { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 5px 0; border: 0; text-align: right; position: static; box-shadow: none; background: transparent; order: 5; }
  .tbl-cards td::before { content: attr(data-l); flex: 0 0 34%; text-align: left; color: var(--mute); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
  .an table.tbl.tbl-cards td:first-child { order: 1; display: block; text-align: left; font-weight: 700; padding-bottom: 6px; border-bottom: 1px solid var(--line); } .an table.tbl.tbl-cards td:first-child::before { content: none; }
  .an table.tbl.tbl-cards td.stk { order: 2; flex-direction: column; align-items: center; margin: 6px 0; padding: 8px; border-radius: 8px; border: 1px solid var(--line2); text-align: center; } .an table.tbl.tbl-cards td.stk::before { content: "Stake"; flex: none; }
  .an table.tbl.tbl-cards td.stk-on { border-color: #1fc97f; } .an table.tbl.tbl-cards td.stk .u { font-size: 22px; }
  .tbl-cards td[data-l=""]::before, .tbl-cards td:not([data-l])::before { content: none; }
  .an table.tbl.tbl-cards td > div, .an table.tbl.tbl-cards td > small { text-align: right; } .an table.tbl.tbl-cards td:first-child > div, .an table.tbl.tbl-cards td:first-child > small { text-align: left; }
  .tbl-cards .lvbox, .tbl-cards .regbox { align-items: flex-end; } .tbl-cards .inrow { justify-content: flex-end; }
  tr.r-strong > td:first-child, tr.r-good > td:first-child, tr.r-watch > td:first-child, tr.r-none > td:first-child { box-shadow: none; }
  tr.r-strong { border-left: 3px solid #1fc97f; } tr.r-good { border-left: 3px solid rgba(140, 220, 160, .7); } tr.r-watch { border-left: 3px solid rgba(243, 185, 77, .7); }
}
.nolonger { margin-top: 3px; color: var(--down); font-weight: 700; font-size: 11.5px; }
.pos { color: var(--up); } .neg { color: var(--down); }
.jg-head { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; margin: 2px 4px 8px; } .jg-head h1 { margin: 0; font-size: 20px; } .jg-head span { color: var(--mute); }
.jg-mk input { width: 74px; background: var(--bg2); color: var(--tx); border: 1px solid var(--line2); border-radius: 7px; padding: 5px 7px; font: inherit; }
.jg-mk .hb { display: block; font-size: 11px; color: var(--mute); margin-bottom: 3px; }
.jg-fat { margin: 6px 0 0; padding-left: 18px; } .jg-fat li { margin: 3px 0; }

/* AI Home */
.ai-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.ai-tile { border: 1px solid var(--line, #2a3347); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.ai-tile b { font-size: 1.5rem; }
.ai-best { border: 1px solid var(--line, #2a3347); border-left: 3px solid #c79bff; border-radius: 10px; padding: 14px; }
.ai-best-top { font-size: 1.05rem; margin-bottom: 4px; }
.ai-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.ai-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.ai-link { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line, #2a3347); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: inherit; }
.ai-link:hover { border-color: #5a3d86; }

/* Record */
.rc-curvabox { margin: 10px 0; }
.rc-curva { width: 100%; max-width: 680px; height: auto; display: block; }
.rc-zero { stroke: var(--line, #2a3347); stroke-dasharray: 4 4; }
.rc-linha { stroke: #7fb0ff; stroke-width: 2; }
.rc-ponto { fill: #7fb0ff; } .rc-ponto.pos { fill: #4cc38a; } .rc-ponto.neg { fill: #ff7a7a; }
.rc-eixo { fill: var(--muted, #8a94a8); font-size: 10px; }
.rc-grupos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 8px 0; }
.rc-grupo h4 { margin: 4px 0; }

.jo-voltar { margin: 0 0 10px; }
.jo-voltar a { display: inline-block; text-decoration: none; }

.tbl tr.gnovo td { border-top: 2px solid var(--line, #2a3a5a); }
a.ai-tile { text-decoration: none; color: inherit; display: block; }
a.ai-tile:hover { border-color: var(--accent, #4aa3ff); }
/* «Why this bet?» (Lock / Good only): the model's numbers and its factors for and against */
.lvbox details.why { margin-top: 4px; font-size: 12px; }
.lvbox details.why summary { cursor: pointer; color: var(--accent, #3fb950); }
.lvbox details.why p { margin: 4px 0; line-height: 1.35; }
.onzes { margin-top: 8px; font-size: 12px; white-space: normal; overflow-wrap: anywhere; } .onzes p { margin: 4px 0; line-height: 1.35; }

/* sport pages: the search box (team or competition) */
.pk-busca { width: 100%; max-width: 420px; min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line, #2a3140); background: var(--bg, #0d1015); color: var(--tx); font: inherit; font-size: 13px; }
