/**
 * Estatísticas (/estatisticas/) — design "É Golo Classificação" (handoff 17).
 *
 * Hero preto (H1 + selector de prova + âncoras + estado do sync), faixa de
 * factos, classificação + corrida ao título, heatmap "quando se marca",
 * marcadores/assistentes + casa vs fora, disciplina, defesas + plantéis,
 * comparador (bloco preto), sequências e "o teu clube" (bloco verde).
 * Mobile derivado do desktop: tudo empilhado, heatmap com scroll próprio,
 * tabela com colunas reduzidas.
 *
 * @package SuperPortistas
 */

.sp-est-page {
    --eg-display: 'Archivo Black', 'Archivo', ui-sans-serif, system-ui, sans-serif;
    background: var(--sp-surface-muted, #f4f3ef);
    color: var(--sp-ink, #0d0d0c);
}

.sp-est-page [x-cloak] {
    display: none !important;
}

.sp-est-dot {
    color: var(--sp-porto, #00a24a);
}

@keyframes sp-est-egpulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

/* Scroll-x sem barra visível (padrão eg-scrollx do handoff). */
.sp-est-page .eg-scrollx {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sp-est-page .eg-scrollx::-webkit-scrollbar {
    display: none;
}

/* ---------------------------------------------------------------------
 * Hero preto
 * ------------------------------------------------------------------- */

.sp-est-hero {
    background: var(--sp-ink, #0d0d0c);
    color: #fff;
    padding: 30px 32px 0;
}

.sp-est-hero__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.sp-est-hero__head {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.sp-est-hero__title {
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 52px;
    line-height: 0.95;
    letter-spacing: -2.4px;
    margin: 0;
    color: #fff;
    text-transform: uppercase;
}

.sp-est-hero__selector {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 6px;
    position: relative;
    min-width: 0;
}

.sp-est-hero__selector-label {
    font-size: 12px;
    font-weight: 700;
    color: #8a887f;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.sp-est-hero__selector-static {
    border: 1.5px solid #3c3a35;
    padding: 10px 18px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

/* Selector partilhado adaptado ao hero: trigger compacto e painel escuro
   280px (o design pede dropdown escuro; a folha base do componente é clara). */
.sp-est-hero__selector .sp-escalao {
    width: auto;
    min-width: 280px;
    max-width: 360px;
}

.sp-est-hero__selector .sp-escalao__toggle {
    padding: 10px 18px;
}

.sp-est-hero__selector .sp-escalao__panel {
    background: var(--sp-card-dark, #1b1b19);
    border: 1.5px solid #3c3a35;
    border-top: 0;
    min-width: 280px;
    max-height: 320px;
}

.sp-est-hero__selector .sp-escalao__all,
.sp-est-hero__selector .sp-escalao__item {
    color: #b5b3ac;
    border-bottom: 1px solid #2a2a27;
    background: transparent;
}

.sp-est-hero__selector .sp-escalao__all:hover,
.sp-est-hero__selector .sp-escalao__item:hover,
.sp-est-hero__selector .sp-escalao__all:focus-visible,
.sp-est-hero__selector .sp-escalao__item:focus-visible {
    background: #262624;
    color: #fff;
}

.sp-est-hero__selector .sp-escalao__all.is-active,
.sp-est-hero__selector .sp-escalao__item.is-active {
    color: var(--sp-live, #00e06b);
    font-weight: 800;
}

.sp-est-hero__selector .sp-escalao__group {
    color: #6b6963;
    border-color: #2a2a27;
}

.sp-est-hero__selector .sp-escalao__tick {
    color: var(--sp-live, #00e06b);
}

/* Barra de âncoras + estado do sync */
.sp-est-hero__bar {
    display: flex;
    align-items: center;
    margin-top: 22px;
    border-top: 1px solid var(--sp-card-dark, #1b1b19);
    overflow-x: auto;
}

.sp-est-hero__anchors {
    display: flex;
    flex: none;
}

.sp-est-anchor {
    flex: none;
    padding: 14px 18px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #8a887f;
    white-space: nowrap;
    text-decoration: none;
}

.sp-est-anchor:hover,
.sp-est-anchor:focus-visible {
    color: #fff;
}

.sp-est-anchor:focus-visible {
    outline: 2px solid var(--sp-live, #00e06b);
    outline-offset: -2px;
}

.sp-est-hero__meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    padding-left: 16px;
    font-size: 11px;
    font-weight: 700;
    color: #8a887f;
}

.sp-est-hero__jornada {
    color: #fff;
    white-space: nowrap;
}

.sp-est-hero__meta-sep {
    color: #3c3a35;
}

.sp-est-hero__pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sp-live, #00e06b);
    animation: sp-est-egpulse 1.6s infinite;
    flex: none;
}

/* ---------------------------------------------------------------------
 * Faixa amarela de atraso
 * ------------------------------------------------------------------- */

.sp-est-aviso {
    background: var(--sp-accent, #ffd400);
    color: var(--sp-ink, #0d0d0c);
    padding: 12px 32px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sp-est-aviso__titulo {
    font-weight: 800;
    white-space: nowrap;
}

.sp-est-aviso__texto {
    font-weight: 600;
}

/* ---------------------------------------------------------------------
 * Corpo
 * ------------------------------------------------------------------- */

.sp-est-body {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 26px 32px 56px;
    display: flex;
    flex-direction: column;
    gap: 34px;
}

/* Âncoras livres do header sticky. */
#tabela,
#golos,
#marcadores,
#disciplina,
#plantel,
#comparador,
#sequencias,
#clube {
    scroll-margin-top: 90px;
}

.sp-est-duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.sp-est-duo--tabela {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.sp-est-duo--single {
    grid-template-columns: minmax(0, 1fr);
}

/* ---------------------------------------------------------------------
 * Faixa de factos
 * ------------------------------------------------------------------- */

.sp-est-factos {
    display: grid;
    grid-template-columns: repeat(var(--sp-est-factos-n, 3), minmax(0, 1fr));
    gap: 14px;
}

.sp-est-facto {
    background: var(--sp-ink, #0d0d0c);
    color: #fff;
    border-left: 6px solid var(--sp-porto, #00a24a);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sp-est-facto__etiqueta {
    font-size: 10px;
    font-weight: 800;
    color: #8a887f;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sp-est-facto__numero {
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 34px;
    line-height: 0.95;
    color: var(--sp-live, #00e06b);
}

.sp-est-facto__texto {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.sp-est-facto__fonte {
    font-size: 10.5px;
    font-weight: 700;
    color: #5b5952;
    border-top: 1px solid #262624;
    padding-top: 8px;
}

/* ---------------------------------------------------------------------
 * Cartão base
 * ------------------------------------------------------------------- */

.sp-est-card {
    background: var(--sp-surface, #fff);
    border: 1px solid var(--sp-border, #dbd9d2);
    border-radius: 0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.sp-est-card__head {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.sp-est-card__head--wrap {
    flex-wrap: wrap;
}

.sp-est-card__title {
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 18px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.sp-est-card__hint {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #6b6963;
    text-align: right;
}

.sp-est-card__head--wrap .sp-est-card__hint {
    margin-left: 0;
    text-align: left;
}

.sp-est-card__more {
    margin-left: auto;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--sp-porto, #00a24a);
    text-decoration: none;
    white-space: nowrap;
}

.sp-est-card__more:hover,
.sp-est-card__more:focus-visible {
    color: var(--sp-ink, #0d0d0c);
}

.sp-est-card__foot {
    font-size: 10.5px;
    font-weight: 700;
    color: #8a887f;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.sp-est-card__foot-sep {
    color: var(--sp-border, #dbd9d2);
}

.sp-est-card__foot--legenda {
    font-size: 11px;
    color: #6b6963;
    gap: 14px;
}

.sp-est-card__foot-right {
    margin-left: auto;
}

.sp-est-legenda__item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sp-est-legenda__swatch {
    width: 12px;
    height: 12px;
    flex: none;
}

.sp-est-legenda__swatch--win,
.sp-est-legenda__swatch--fora {
    background: var(--sp-porto, #00a24a);
}

.sp-est-legenda__swatch--draw {
    background: var(--sp-border, #dbd9d2);
}

.sp-est-legenda__swatch--loss {
    background: var(--sp-danger, #c0362c);
}

.sp-est-legenda__swatch--casa {
    background: var(--sp-ink, #0d0d0c);
}

/* Toggles (Marcados/Sofridos, Golos/Assistências) */
.sp-est-toggle-group {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

.sp-est-toggle {
    font-size: 11px;
    font-weight: 800;
    font-family: inherit;
    padding: 6px 12px;
    cursor: pointer;
    border: 1.5px solid var(--sp-border, #dbd9d2);
    color: #6b6963;
    background: transparent;
    border-radius: 0;
}

.sp-est-toggle:hover {
    border-color: var(--sp-ink, #0d0d0c);
    color: var(--sp-ink, #0d0d0c);
}

.sp-est-toggle:focus-visible {
    outline: 2px solid var(--sp-porto, #00a24a);
    outline-offset: 2px;
}

.sp-est-toggle.is-active {
    background: var(--sp-ink, #0d0d0c);
    color: #fff;
    border-color: var(--sp-ink, #0d0d0c);
}

/* Pastilhas de forma (V/E/D) e células da corrida */
.sp-est-pastilha {
    width: 16px;
    height: 16px;
    display: inline-grid;
    place-items: center;
    font-size: 9.5px;
    font-weight: 800;
    color: #fff;
    flex: none;
}

.sp-est-pastilha--win {
    background: var(--sp-porto, #00a24a);
}

.sp-est-pastilha--draw {
    background: var(--sp-border, #dbd9d2);
    color: #43413b;
}

.sp-est-pastilha--loss {
    background: var(--sp-danger, #c0362c);
}

/* ---------------------------------------------------------------------
 * Classificação
 * ------------------------------------------------------------------- */

.sp-est-clf {
    padding: 0;
    gap: 0;
}

.sp-est-clf .sp-est-card__head {
    padding: 16px 18px 12px;
}

.sp-est-clf__serie {
    margin: 0;
    padding: 10px 18px 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #6b6963;
    text-transform: uppercase;
}

.sp-est-clf__header,
.sp-est-clf__row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 34px 34px 44px 96px;
    gap: 6px;
    padding: 9px 18px;
    align-items: center;
}

.sp-est-clf__header {
    background: var(--sp-ink, #0d0d0c);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
}

.sp-est-clf__row {
    border-bottom: 1px solid var(--sp-surface-subtle, #efeee8);
    border-left: 4px solid transparent;
    padding-left: 14px;
    font-size: 13.5px;
    font-weight: 600;
}

.sp-est-clf__row--champions,
.sp-est-clf__row--subida {
    border-left-color: var(--sp-porto, #00a24a);
}

.sp-est-clf__row--europa {
    border-left-color: var(--sp-accent, #ffd400);
}

.sp-est-clf__row--conference {
    border-left-color: var(--sp-ink, #0d0d0c);
}

.sp-est-clf__row--descida {
    border-left-color: var(--sp-danger, #c0362c);
}

.sp-est-clf__row--lider {
    background: #f2fbf5;
}

.sp-est-clf__pos {
    font-family: var(--eg-display);
    font-style: italic;
}

.sp-est-clf__clube {
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-est-clf__clube a {
    color: inherit;
    text-decoration: none;
}

.sp-est-clf__clube a:hover,
.sp-est-clf__clube a:focus-visible {
    color: var(--sp-porto, #00a24a);
}

.sp-est-clf__num {
    text-align: center;
    color: #6b6963;
}

.sp-est-clf__header .sp-est-clf__num {
    color: #fff;
}

.sp-est-clf__pts {
    font-family: var(--eg-display);
    font-style: italic;
    color: var(--sp-ink, #0d0d0c);
}

.sp-est-clf__forma-col {
    text-align: right;
}

.sp-est-clf__forma {
    display: flex;
    gap: 3px;
    justify-content: flex-end;
}

.sp-est-clf .sp-est-card__foot {
    padding: 10px 18px;
}

/* ---------------------------------------------------------------------
 * Corrida ao título
 * ------------------------------------------------------------------- */

.sp-est-corrida {
    padding: 16px 18px 14px;
}

.sp-est-corrida__rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sp-est-corrida__row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
}

.sp-est-corrida__clube {
    font-weight: 800;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-est-corrida__celulas {
    display: grid;
    grid-template-columns: repeat(var(--sp-est-corrida-n, 10), 1fr);
    gap: 3px;
}

.sp-est-celula {
    height: 22px;
    display: grid;
    place-items: center;
    font-size: 9.5px;
    font-weight: 800;
    color: #fff;
}

.sp-est-celula--win {
    background: var(--sp-porto, #00a24a);
}

.sp-est-celula--draw {
    background: var(--sp-border, #dbd9d2);
    color: #43413b;
}

.sp-est-celula--loss {
    background: var(--sp-danger, #c0362c);
}

.sp-est-celula--none {
    background: var(--sp-surface-subtle, #efeee8);
    color: #b5b3ac;
}

.sp-est-corrida__pts {
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 16px;
    text-align: right;
    color: var(--sp-ink, #0d0d0c);
}

.sp-est-corrida__pts--lider {
    color: var(--sp-porto, #00a24a);
}

.sp-est-corrida__pts--cauda {
    color: #6b6963;
}

/* ---------------------------------------------------------------------
 * Quando se marca (heatmap)
 * ------------------------------------------------------------------- */

/* O design dá a este cartão um respiro maior que o base (16px vs 14px). */
.sp-est-heat {
    gap: 16px;
}

.sp-est-heat__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sp-est-heat__grid {
    display: grid;
    grid-template-columns: 120px repeat(6, minmax(56px, 1fr));
    gap: 4px;
    align-items: center;
    min-width: 560px;
}

.sp-est-heat__faixa {
    font-size: 10.5px;
    font-weight: 800;
    color: #6b6963;
    text-align: center;
    white-space: nowrap;
}

.sp-est-heat__clube {
    font-weight: 800;
    font-size: 12.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-est-heat__celula {
    height: 30px;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--sp-ink, #0d0d0c);
}

.sp-est-heat__celula--clara {
    color: #fff;
}

.sp-est-heat__escala {
    display: flex;
    gap: 3px;
}

.sp-est-heat__escala span {
    width: 22px;
    height: 12px;
    background: var(--sp-porto, #00a24a);
    flex: none;
}

/* Estado vazio dentro do cartão: sem moldura dupla. */
.sp-est-heat > .sp-state,
.sp-est-heat > .sp-est-state {
    border: 0;
}

/* ---------------------------------------------------------------------
 * Marcadores / assistentes
 * ------------------------------------------------------------------- */

.sp-est-rank__lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sp-est-rank__row {
    display: grid;
    grid-template-columns: 22px 34px minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: center;
}

.sp-est-rank__pos {
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 14px;
    color: #b5b3ac;
}

.sp-est-rank__foto {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    background: var(--sp-surface-subtle, #efeee8);
}

.sp-est-rank__foto--inicial {
    display: grid;
    place-items: center;
    background: var(--sp-card-dark, #1b1b19);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
}

.sp-est-rank__quem {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.sp-est-rank__linha1 {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.sp-est-rank__nome {
    font-weight: 800;
    font-size: 13.5px;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.sp-est-rank__nome:hover,
a.sp-est-rank__nome:focus-visible {
    color: var(--sp-porto, #00a24a);
}

.sp-est-rank__clube {
    font-size: 11px;
    font-weight: 600;
    color: #6b6963;
    white-space: nowrap;
}

.sp-est-rank__barra {
    height: 8px;
    background: var(--sp-surface-subtle, #efeee8);
    display: block;
}

.sp-est-rank__barra span {
    display: block;
    height: 8px;
    background: var(--sp-porto, #00a24a);
}

.sp-est-rank__valor {
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 18px;
    text-align: right;
}

/* ---------------------------------------------------------------------
 * Casa vs fora
 * ------------------------------------------------------------------- */

.sp-est-cf__rows {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.sp-est-cf__row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.sp-est-cf__clube {
    font-weight: 800;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-est-cf__casa {
    display: flex;
    justify-content: flex-end;
}

.sp-est-cf__barra {
    height: 20px;
    min-width: 20px;
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    box-sizing: border-box;
}

.sp-est-cf__barra--casa {
    background: var(--sp-ink, #0d0d0c);
    justify-content: flex-end;
    padding-right: 6px;
}

.sp-est-cf__barra--fora {
    background: var(--sp-porto, #00a24a);
    padding-left: 6px;
}

/* ---------------------------------------------------------------------
 * Disciplina
 * ------------------------------------------------------------------- */

.sp-est-disc__header,
.sp-est-disc__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 8px;
    align-items: center;
}

.sp-est-disc__header {
    padding-bottom: 8px;
    border-bottom: 2px solid var(--sp-ink, #0d0d0c);
    font-size: 10.5px;
    font-weight: 800;
    color: #6b6963;
    text-transform: uppercase;
}

.sp-est-disc__row {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sp-surface-subtle, #efeee8);
    font-size: 13px;
    font-weight: 700;
}

.sp-est-disc__num {
    text-align: center;
}

.sp-est-disc__valor {
    font-weight: 800;
    padding: 3px 0;
    background: var(--sp-surface-subtle, #efeee8);
}

.sp-est-disc__valor--claro {
    color: #fff;
}

/* ---------------------------------------------------------------------
 * Defesas da época
 * ------------------------------------------------------------------- */

.sp-est-def__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px 72px;
    gap: 10px;
    align-items: center;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--sp-surface-subtle, #efeee8);
}

.sp-est-def__quem {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sp-est-def__clube {
    font-weight: 800;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-est-def__jogos {
    font-size: 11px;
    font-weight: 600;
    color: #6b6963;
}

.sp-est-def__stat {
    text-align: center;
}

.sp-est-def__valor {
    display: block;
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 17px;
}

.sp-est-def__valor--verde {
    color: var(--sp-porto, #00a24a);
}

.sp-est-def__label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #8a887f;
}

/* ---------------------------------------------------------------------
 * Plantéis
 * ------------------------------------------------------------------- */

.sp-est-planteis__row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 52px 52px;
    gap: 10px;
    align-items: center;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--sp-surface-subtle, #efeee8);
}

.sp-est-planteis__clube {
    font-weight: 800;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-est-planteis__barra {
    height: 10px;
    background: var(--sp-surface-subtle, #efeee8);
    display: block;
}

.sp-est-planteis__barra span {
    display: block;
    height: 10px;
    background: var(--sp-ink, #0d0d0c);
}

.sp-est-planteis__idade {
    text-align: center;
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 15px;
}

.sp-est-planteis__sub23 {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #6b6963;
}

/* ---------------------------------------------------------------------
 * Comparador (bloco preto)
 * ------------------------------------------------------------------- */

.sp-est-comparador {
    background: var(--sp-ink, #0d0d0c);
    color: #fff;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sp-est-comparador__head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.sp-est-comparador__title {
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 20px;
    margin: 0;
    text-transform: uppercase;
}

.sp-est-comparador__pickers {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sp-est-comparador__pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    max-width: 320px;
}

.sp-est-comparador__vs {
    font-weight: 800;
    font-size: 12px;
    color: #5b5952;
    flex: none;
}

.sp-est-pill-dark {
    flex: none;
    font-size: 11px;
    font-weight: 800;
    font-family: inherit;
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid #3a3a36;
    color: #b5b3ac;
    background: transparent;
    border-radius: 0;
}

.sp-est-pill-dark:hover {
    border-color: #b5b3ac;
    color: #fff;
}

.sp-est-pill-dark:focus-visible {
    outline: 2px solid var(--sp-live, #00e06b);
    outline-offset: 2px;
}

.sp-est-pill-dark.is-active {
    background: var(--sp-porto, #00a24a);
    color: #fff;
    border-color: var(--sp-porto, #00a24a);
}

.sp-est-comparador__nomes {
    display: flex;
    justify-content: space-between;
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 20px;
    gap: 12px;
}

.sp-est-comparador__nome-a {
    color: var(--sp-live, #00e06b);
}

.sp-est-comparador__nome-b {
    color: #b5b3ac;
    text-align: right;
}

.sp-est-comparador__metricas {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sp-est-comparador__metrica {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sp-est-comparador__valores {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 800;
    font-size: 14px;
    gap: 10px;
}

.sp-est-comparador__label {
    color: #8a887f;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    text-align: center;
}

.sp-est-comparador__barras {
    display: flex;
    gap: 3px;
    height: 8px;
}

.sp-est-comparador__barra {
    display: block;
    height: 8px;
    flex: none;
    max-width: 100%;
}

.sp-est-comparador__barra--a {
    background: var(--sp-porto, #00a24a);
}

.sp-est-comparador__barra--b {
    background: #5b5952;
}

.sp-est-comparador__gap {
    flex: 1;
    min-width: 0;
}

.sp-est-comparador__fonte {
    font-size: 10.5px;
    font-weight: 700;
    color: #5b5952;
}

/* ---------------------------------------------------------------------
 * Sequências
 * ------------------------------------------------------------------- */

.sp-est-seq__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.sp-est-seq__cartao {
    border: 1px solid var(--sp-border, #dbd9d2);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.sp-est-seq__numero {
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 28px;
    min-width: 44px;
    flex: none;
}

.sp-est-seq__numero--positivo {
    color: var(--sp-porto, #00a24a);
}

.sp-est-seq__numero--negativo {
    color: var(--sp-danger, #c0362c);
}

.sp-est-seq__numero--neutro {
    color: var(--sp-ink, #0d0d0c);
}

.sp-est-seq__corpo {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sp-est-seq__clube {
    font-weight: 800;
    font-size: 13.5px;
}

.sp-est-seq__texto {
    font-size: 12px;
    font-weight: 600;
    color: #43413b;
    line-height: 1.35;
}

/* ---------------------------------------------------------------------
 * O teu clube (bloco verde)
 * ------------------------------------------------------------------- */

.sp-est-clube {
    background: var(--sp-porto, #00a24a);
    color: #fff;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sp-est-clube__head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.sp-est-clube__title {
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 20px;
    margin: 0;
    text-transform: uppercase;
}

.sp-est-clube__dot {
    color: var(--sp-ink, #0d0d0c);
}

.sp-est-clube__cta {
    margin-left: auto;
    background: var(--sp-ink, #0d0d0c);
    color: #fff;
    font-weight: 800;
    font-size: 12.5px;
    padding: 10px 18px;
    text-decoration: none;
    white-space: nowrap;
}

.sp-est-clube__cta:hover,
.sp-est-clube__cta:focus-visible {
    background: var(--sp-card-dark, #1b1b19);
    color: #fff;
}

.sp-est-clube__cta:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.sp-est-clube__tiles {
    display: grid;
    grid-template-columns: repeat(var(--sp-est-clube-n, 4), minmax(0, 1fr));
    gap: 14px;
}

.sp-est-clube__tile {
    background: var(--sp-ink, #0d0d0c);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sp-est-clube__valor {
    font-family: var(--eg-display);
    font-style: italic;
    font-size: 30px;
    color: var(--sp-live, #00e06b);
    line-height: 1;
}

.sp-est-clube__label {
    font-size: 12.5px;
    font-weight: 700;
}

.sp-est-clube__nota {
    font-size: 11px;
    font-weight: 600;
    color: #8a887f;
    line-height: 1.35;
}

/* Variante sem clube escolhido — preset "escolhe um lado" adaptado ao bloco. */
.sp-est-clube__vazio {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 18px 16px;
}

.sp-est-clube__figura {
    font-size: 34px;
    line-height: 1;
}

.sp-est-clube__copy {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    max-width: 420px;
    line-height: 1.5;
}

.sp-est-clube__vazio .sp-est-clube__cta {
    margin-left: 0;
    margin-top: 4px;
}

/* ---------------------------------------------------------------------
 * Responsivo
 * ------------------------------------------------------------------- */

@media (max-width: 1100px) and (min-width: 768px) {
    .sp-est-hero {
        padding: 28px 24px 0;
    }

    .sp-est-aviso {
        padding-left: 24px;
        padding-right: 24px;
    }

    .sp-est-body {
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (max-width: 959.98px) {
    .sp-est-duo,
    .sp-est-duo--tabela {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767.98px) {
    .sp-est-hero {
        padding: 14px 16px 0;
    }

    .sp-est-hero__head {
        gap: 12px;
    }

    .sp-est-hero__title {
        font-size: 30px;
        letter-spacing: -1.5px;
    }

    .sp-est-hero__selector {
        margin-left: 0;
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }

    .sp-est-hero__selector .sp-escalao {
        min-width: 0;
        max-width: none;
        flex: 1;
    }

    .sp-est-hero__bar {
        margin-top: 14px;
        flex-wrap: wrap;
    }

    .sp-est-anchor {
        padding: 13px 12px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        box-sizing: border-box;
    }

    .sp-est-hero__meta {
        margin-left: 0;
        padding: 10px 0 12px;
        width: 100%;
    }

    .sp-est-aviso {
        padding: 12px 16px;
    }

    .sp-est-body {
        padding: 16px 16px 40px;
        gap: 16px;
    }

    #tabela,
    #golos,
    #marcadores,
    #disciplina,
    #plantel,
    #comparador,
    #sequencias,
    #clube {
        scroll-margin-top: 70px;
    }

    .sp-est-factos {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Tabela com colunas reduzidas (padrão mobile das outras páginas):
       # / Clube / J / DG / Pts — a forma sai. */
    .sp-est-clf__header,
    .sp-est-clf__row {
        grid-template-columns: 30px minmax(0, 1fr) 30px 34px 44px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .sp-est-clf__row {
        padding-left: 8px;
    }

    .sp-est-clf__forma-col,
    .sp-est-clf__forma {
        display: none;
    }

    .sp-est-clf .sp-est-card__head {
        padding: 14px 12px 10px;
    }

    .sp-est-clf .sp-est-card__foot {
        padding: 10px 12px;
    }

    .sp-est-corrida__row {
        grid-template-columns: 72px minmax(0, 1fr) 36px;
        gap: 8px;
    }

    .sp-est-heat__grid {
        grid-template-columns: 104px repeat(6, minmax(48px, 1fr));
        min-width: 520px;
    }

    /* Hit targets ≥44px nos controlos tocáveis. */
    .sp-est-toggle,
    .sp-est-pill-dark {
        min-height: 44px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .sp-est-comparador__head {
        flex-direction: column;
        align-items: stretch;
    }

    .sp-est-comparador__pickers {
        margin-left: 0;
        width: 100%;
    }

    .sp-est-comparador__pills {
        max-width: none;
        flex: 1;
        min-width: 0;
    }

    .sp-est-comparador__nomes {
        font-size: 17px;
    }

    .sp-est-clube__tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sp-est-clube__cta {
        margin-left: 0;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .sp-est-seq__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
