:root{
  --bg: #0b0f18;
  --panel: #121a2a;
  --panel2: #0f1626;
  --text: #e9eefc;
  --muted: #aab4d6;
  --line: rgba(255,255,255,.12);
  --accent: #4dd2ff;
  --accent2: #7c5cff;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --max: 1100px;

  --rank-head-font: 10px;  /* <-- AJUSTE AQUI (rótulos das colunas / TH) */
  --rank-data-font: 12px;  /* <-- AJUSTE AQUI (dados a partir da 3ª coluna) */
}


*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; }
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 500px at 15% 10%, rgba(77,210,255,.18), transparent 55%),
              radial-gradient(900px 600px at 85% 20%, rgba(124,92,255,.18), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.45;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{
  width: min(100% - 28px, var(--max));
  margin-inline: auto;
}

.header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11,15,24,.72);
  border-bottom: 1px solid var(--line);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
}

.brand img{
  height: 36px;
  width: auto;
  max-width: 220px;
  border-radius: 10px;
  object-fit: contain;
}


.brand .title{
  display:flex;
  flex-direction: column;
  min-width: 0;
}

.brand .title strong{
  font-size: 14px;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand .title span{
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Botão hambúrguer */
.nav-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle:active{ transform: translateY(1px); }

/* NAV (mobile default: fechado) */
.nav{
  position: fixed;
  inset: 64px 0 auto 0; /* abaixo do header */
  background: rgba(11,15,24,.96);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateY(-140%);
  transition: transform .25s ease;
}

.nav.open{
  transform: translateY(0);
}

.nav ul{
  list-style:none;
  padding: 10px 0 16px 0;
  margin: 0;
}

.nav a, .nav button{
  display:flex;
  align-items:center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  text-align: left;
}

.nav a:hover, .nav button:hover{
  background: rgba(255,255,255,.06);
  text-decoration: none;
}

.nav .muted{
  color: var(--muted);
  font-size: 13px;
}

/* >>> FIX MOBILE: dropdown fechado por padrão <<< */
.dropdown-panel{
  display: none;
}

.dropdown.open .dropdown-panel{
  display: block;
}

/* Dropdown */
.dropdown{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dropdown-panel a{
  padding-left: 26px;
  font-size: 14px;
}

/* Ranking dropdown: títulos e separadores (mobile + desktop) */
.dropdown-heading{
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.dropdown-sep{
  border-top: 1px solid var(--line);
  margin: 6px 0;
}


.dropdown.open .dropdown-panel{
  display: block;
}

.dropdown-panel a{
  padding-left: 26px;
  font-size: 14px;
}

/* Conteúdo */
.hero{
  padding: 28px 0 8px;
}

.hero-card{
  background: linear-gradient(135deg, rgba(77,210,255,.12), rgba(124,92,255,.10));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero h1{
  margin: 0 0 8px;
  font-size: 22px;
}

.hero p{
  margin: 0 0 12px;
  color: var(--muted);
}

.cta-row{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  font-weight: 600;
  text-decoration: none;
}
.btn.primary{
  background: linear-gradient(135deg, rgba(77,210,255,.25), rgba(124,92,255,.22));
  border-color: rgba(255,255,255,.18);
}

.section{
  padding: 18px 0;
  scroll-margin-top: 90px; /* evita âncora ficar escondida atrás do header sticky */
}


.grid{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.card{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.card h2{
  margin: 0 0 8px;
  font-size: 16px;
}

.card p{
  margin: 0;
  color: var(--muted);
}

/* Tabela responsiva: scroll horizontal + primeira coluna sticky */
.table-wrap{
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
}

table{
  border-collapse: collapse;
  width: 100%;
  min-width: 760px; /* mantém a rolagem quando tiver muitas colunas */
}

/* ===== Ranking: regras únicas (sem duplicação) ===== */
.table-wrap{
  overflow-x: auto;                         /* rolagem horizontal (desktop + mobile) */
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
}

.table-wrap th,
.table-wrap td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  text-align: center;                       /* padrão: central */
  vertical-align: middle;
}

/* headers */
.table-wrap th{
  font-size: var(--rank-head-font, 10px);   /* <-- fallback */
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  background: rgba(0,0,0,.18);
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: pre-line;                    /* permite "\n" quebrar linha */
  line-height: 1.15;
}

/* dados: não quebram por padrão */
.table-wrap td{
  white-space: nowrap;
}

/* 1ª coluna sticky */
.table-wrap td:first-child,
.table-wrap th:first-child{
  position: sticky;
  left: 0;
  z-index: 3;
  background: rgba(11,15,24,.96);
  border-right: 1px solid rgba(255,255,255,.10);
  text-align: left;                         /* 1ª coluna alinhada à esquerda */
  white-space: nowrap;                      /* não quebra nomes */
}

/* 1ª coluna: pill + (nome/cidades) lado a lado, com as cidades alinhadas sob o nome */
.pos-name-row{
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.name-block{
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

/* Linha 1 da 1ª coluna: mantém "POS + nomes" na mesma linha */
.table-wrap td:first-child .rank-name{
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}


/* fonte menor a partir da 3ª coluna (ex.: MQ, etapas, e eventos) */
.table-wrap td:nth-child(n+3){
  font-size: var(--rank-data-font, 12px);   /* <-- fallback */
}

.footer-social{
  display: flex;
  gap: 32px;      /* <-- espaçamento horizontal */
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  margin: 0 0 10px; /* 0 acima dos ícones | 10px abaixo (separa do texto) */
}


.social-btn{
  display: inline-flex;
  width: 44px;               /* melhor “tap target” mobile */
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);

  text-decoration: none;
  transition: transform .12s ease, background .12s ease, opacity .12s ease;
}

.social-btn img{
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;       /* não distorce o PNG */
  opacity: 0.9;
  /* filter: brightness(0) invert(1);  <-- só use se seus ícones forem pretos */
}

.social-btn:hover{
  background: rgba(255,255,255,0.10);
  transform: translateY(-1px);
}

.social-btn:hover img{
  opacity: 1;
}

.social-btn:focus-visible{
  outline: 2px solid rgba(255,255,255,0.35);
  outline-offset: 2px;
}



.social-btn:hover img{
  opacity: 1;
}


.footer{
  padding: 12px 0 28px;   /* diminui o espaço interno antes dos ícones */
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 10px;       /* diminui o espaço entre conteúdo e a linha do footer */
}


.footer small{ display:block; line-height: 1.6; }

/* Desktop: nav vira horizontal */
@media (min-width: 920px){
  .nav-toggle{ display:none; }

  .nav{
    position: static;
    inset: auto;
    transform: none;
    box-shadow: none;
    border-bottom: 0;
    background: transparent;
  }

  .nav ul{
    display:flex;
    align-items:center;
    gap: 6px;
    padding: 0;
  }

  .nav a, .nav button{
    width: auto;
    padding: 10px 10px;
    border-radius: 12px;
  }

  .dropdown{
    position: relative;
    border: 0;
  }

  .dropdown-panel{
    position: absolute;
    top: 44px;
    left: 0;
    min-width: 260px;
    display: none;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    background: rgba(11,15,24,.98);
    padding: 8px 0;
  }

  .dropdown.open .dropdown-panel{
    display:block;
  }

  .dropdown-panel a{
    padding: 10px 12px;
  }

  .grid{
    grid-template-columns: 1.2fr .8fr;
  }

  .hero h1{ font-size: 28px; }
  
  /* === OVERRIDE DEFINITIVO: logo horizontal no header === */
  .brand img.brand-logo{
  height: 48px;
  width: auto !important;
  max-width: 420px;
  object-fit: contain;
  border-radius: 10px;
  }

  /* === Ranking dropdown: títulos e separadores === */
  .dropdown-heading{
    padding: 8px 12px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
  }

  .dropdown-sep{
    border-top: 1px solid var(--line);
    margin: 6px 0;
  }

  /* === Submenu dentro do dropdown (Ranking -> Duplas/Trincas) === */
  .submenu-toggle{
    display:flex;
    align-items:center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    cursor: pointer;
    text-align: left;
  }
  .submenu-toggle:hover{
    background: rgba(255,255,255,.06);
  }
  
  .submenu-panel{
    display: none;
    padding: 6px 0 10px;
    background: rgba(255,255,255,.03);
  }
  .submenu.open .submenu-panel{
    display:block;
  }
  .submenu-panel a{
    padding-left: 26px;
    font-size: 14px;
  }

  /* === Submenu (details/summary) dentro do dropdown === */
  .submenu{
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin: 6px 0;
  }
  
  .submenu-summary{
    list-style: none;
    display:flex;
    align-items:center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
  }
  
  /* remove o marcador padrão do summary (Chrome/Safari) */
  .submenu-summary::-webkit-details-marker{ display:none; }
  
  .submenu-summary:hover{
    background: rgba(255,255,255,.06);
  }
  
  .submenu-panel{
    padding: 6px 0 10px;
    background: rgba(255,255,255,.03);
  }
  
  .submenu-panel a{
    padding-left: 26px;
    font-size: 14px;
  }

}


/* === Submenu (Ranking -> Duplas/Trincas) funcionando em qualquer tamanho === */
.submenu{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 6px 0;
}

.submenu-toggle{
  display:flex;
  align-items:center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  text-align: left;
}
.submenu-toggle:hover{
  background: rgba(255,255,255,.06);
}

.submenu-panel{
  display: none;
  padding: 6px 0 10px;
  background: rgba(255,255,255,.03);
}

.submenu.open .submenu-panel{
  display:block;
}

.submenu-panel a{
  padding-left: 26px;
  font-size: 14px;
}

/* ===== Ranking (tabelas + UI) ===== */
.rank-toolbar{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.rank-search{
  flex: 1;
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline: none;
}

.rank-search::placeholder{ color: rgba(170,180,214,.75); }

.rank-status{
  color: var(--muted);
  font-size: 12px;
}

/* ===== Líderes (HUB /index): scroll lateral de verdade + fonte 14 ===== */
.leaders-wrap{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

/* Força a tabela a ficar mais larga que o celular (ativa scroll) */
.leaders-wrap table{
  width: max-content;
  min-width: 640px; /* ajuste fino: 600~760 conforme ficar melhor */
}

/* NO HUB: desliga sticky da 1ª coluna (pra enxergar as outras colunas rolando) */
.leaders-wrap th:first-child,
.leaders-wrap td:first-child{
  position: static !important;
  left: auto !important;
  z-index: auto !important;
}

/* Fonte 14 só nessa tabela */
.leaders-wrap th,
.leaders-wrap td{
  font-size: 14px;
}

/* No HUB: deixa a 1ª coluna quebrar linha e não dominar a tabela inteira */
.leaders-wrap td:first-child{
  white-space: normal;
  max-width: 340px;   /* ajuste fino */
}

.leaders-wrap td:nth-child(2),
.leaders-wrap th:nth-child(2){
  white-space: nowrap;
}

.leaders-wrap td:nth-child(3),
.leaders-wrap td:nth-child(4){
  white-space: nowrap;
}


.rank-head{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.rank-title strong{
  display:block;
  font-size: 16px;
}

.rank-meta{
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.rank-hint{
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 10px;
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
}

.rank-name{
  font-weight: 700;
}

.rank-small{
  color: var(--muted);
  font-size: 12px;
}

/* ===== HUB de categorias (ranking/duplas) ===== */
.hub-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* ===== HUB de categorias (ranking/duplas) ===== */
.hub-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.card-link{
  display: block;
  text-decoration: none;
}

.card-link:hover{
  text-decoration: none;
  border-color: rgba(255,255,255,.22);
  transform: translateY(-1px);
}

@media (min-width: 920px){
  .hub-grid{
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Nomes com cidade por atleta (mobile-friendly) ===== */
.rank-names{
  display: inline;
}

.member-wrap{
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.member-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.member-chip:hover{
  text-decoration: underline;
}

.member-city{
  display: block; /* SEMPRE visível (mobile + desktop) */
  font-size: 12px;
  color: var(--muted);
  white-space: normal; /* permite quebrar a linha da cidade */
}


.member-sep{
  color: var(--muted);
  margin: 0 6px;
}

/* ===== Ranking UI (tabela) ===== */
.rank-head{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.rank-meta{
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.rank-hint{
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0;
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  font-size: 12px;
  font-weight: 700;
  margin-right: 10px;
}

.rank-name{
  font-weight: 700;
}

.rank-search{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline: none;
}

.rank-search:focus{
  border-color: rgba(77,210,255,.45);
}

.rank-status{
  color: var(--muted);
  font-size: 12px;
}

/* ===== FIX MOBILE VERTICAL: tabela de líderes não pode virar um "paredão" na 1ª coluna ===== */
.leaders-wrap{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

/* deixa as colunas se ajustarem ao conteúdo, mas sem estourar */
.leaders-wrap table{
  table-layout: auto;
  width: 100%;
  min-width: 520px; /* suficiente pra gerar scroll no celular em pé, sem exagerar */
}

/* a 1ª coluna precisa poder quebrar linha e ter limite de largura */
.leaders-wrap th:first-child,
.leaders-wrap td:first-child{
  max-width: 240px;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* fonte 14 só na tabela de líderes */
.leaders-wrap th,
.leaders-wrap td{
  font-size: 14px;
}

/* Reduz o "vão" entre a seção de líderes e o footer */
.leaders-section{
  margin-bottom: 20px; /* ajuste: 0, 4, 8, 12... */
}

/* ===== Documentos do Circuito (páginas institucionais) ===== */
.doc .toc{
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
}

.doc .toc a{
  color: var(--text);
  text-decoration: none;
}
.doc .toc a:hover{ text-decoration: underline; }

.doc h2{
  margin: 0 0 8px;
  font-size: 16px;
}

.doc h3{
  margin: 14px 0 6px;
  font-size: 14px;
}

.doc p{
  margin: 0 0 10px;
  color: var(--muted);
}

.doc ul{
  margin: 8px 0 10px 18px;
  padding: 0;
}
.doc li{
  margin: 6px 0;
  color: var(--text);
}

.doc .note{
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

.doc-table{
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
}

.doc-table th,
.doc-table td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  text-align: left;
  vertical-align: top;
}

.doc-table th{
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  background: rgba(0,0,0,.18);
  font-size: 12px;
}

