/* Bundle for top-pronostics-ia page: global + layout + components + ui_common + noads + top_pronostics_ia */

/* Source: /css/global.css */

/* === Base === */

:root {
  --primary-color: #1e40af;
  --primary-dark: #172554;
  --light-bg: #f9fafb;
  --light-text: #111827;
  --muted: #6b7280;
  --accent-green: #4CAF50;
  --accent-orange: #FFA500;
  --accent-red: #E11D48;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--light-bg);
  color: var(--light-text);
  line-height: 1.6;
}

/* === Typographie par défaut === */
body {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--background-dark);
  color: var(--text-color-light);
}

/* Titres */
h2, h3 {
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
  font-size: 2.25rem;
}
h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.25rem;
}

/* Paragraphes */
p {
  margin-bottom: 1em;
  color: var(--text-color-light);
}

/* Liens */
a {
  color: var(--highlight-color);
  text-decoration: underline;
}
a:hover {
  text-decoration: none;
}

/* Listes */
ul {
  padding-left: 1.5em;
}
li {
  margin-bottom: 0.5em;
}


/* === Thème sombre (Dark Mode) === */

[data-theme="dark"] {
  --light-bg: #111827;
  --light-text: #f9fafb;
  --muted: #9ca3af;
  --primary-color: #274784;
  --primary-dark: #18325f;
  --accent-green: #34d399;
  --accent-orange: #fbbf24;
  --accent-red: #f87171;
  background-color: var(--light-bg);
  color: var(--light-text);
}

/* Cartes en thème sombre */
[data-theme="dark"] .prediction-card,
[data-theme="dark"] .process-steps .step,
[data-theme="dark"] .highlight-league,
[data-theme="dark"] .testimonial-list blockquote {
  background-color: #1f2937;
  color: var(--light-text);
  box-shadow: 0 1px 4px rgba(255, 255, 255, 0.05);
  border-color: #374151;
}

/* Sections avec fond clair à adapter */
[data-theme="dark"] .section.light {
  background-color: #1a202c;
}

/* Boutons ligue */
[data-theme="dark"] .league-buttons a {
  background: var(--primary-color);
  color: white;
}
[data-theme="dark"] .league-buttons a:hover {
  background: var(--primary-dark);
}

/* Texte du footer ou contenu secondaire */
[data-theme="dark"] .stats-description,
[data-theme="dark"] .prediction-header span,
[data-theme="dark"] .match-time {
  color: var(--muted);
}

/* Bouton X Twitter */
[data-theme="dark"] .prediction-footer .link.share-button {
  background-color: #1da1f2;
  color: white;
}
[data-theme="dark"] .prediction-footer .link.share-button:hover {
  background-color: #0d8ddc;
}

/* Process steps dans dark */
[data-theme="dark"] .process-steps .step {
  border: 1px solid #374151;
}

.link-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.link-button:hover {
  background-color: var(--primary-color);
  color: white;
}
[data-theme="dark"] .link-button {
  color: white;
  border-color: white;
}

[data-theme="dark"] .link-button:hover {
  background-color: white;
  color: var(--primary-color);
}

/* =========================
   ADSENSE - FIX MOBILE
   Empêche les pubs de sortir du layout et d'aller à droite
   ========================= */

html, body {
  overflow-x: hidden;
}

/* bloc adsense standard */
ins.adsbygoogle {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin: 16px auto !important;
}

/* iframe injectée par adsense */
ins.adsbygoogle > iframe {
  display: block !important;
  margin: 0 auto !important;
  max-width: 100% !important;
}

/* si un wrapper ad-hoc existe */
.ads, .ads-container, .ad-container, .ad-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* mobile : réduit le risque de "colonne à droite" */
@media (max-width: 768px) {
  ins.adsbygoogle {
    margin: 12px auto !important;
  }
}

/* =========================================================
   Anti-CLS : TermsFeed cookie banner (cc-nb-main-container)
   ========================================================= */
.cc-nb-main-container {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;

  width: 100% !important;
  max-width: none !important;

  z-index: 999999 !important;

  min-height: 72px !important;

  background: #fff !important;
  color: #111 !important;
  box-shadow: 0 -8px 24px rgba(0,0,0,.15) !important;
  border-top: 1px solid rgba(0,0,0,.08) !important;
}

/* Évite les webfonts externes => moins de micro-shifts */
.cc-nb-main-container,
.cc-nb-main-container * {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
}


/* Source: /css/layout.css */

/* === Sections === */

.section {
  padding: 10px 20px;
  text-align: center;
}

.section.light,
.section.highlight-league {
  background-color: #eef2f7;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Ombre douce */
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 30px;
}

/* === Stats section === */

[data-theme="dark"] .section.stats {
  background-color: #1f2937;
}

[data-theme="dark"] .stats-description {
  color: #d1d5db;
}

[data-theme="dark"] .stats-number .total {
  color: #9ca3af;
}

.stats-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.stats-number {
  font-size: 48px;
  font-weight: 700;
}

.stats-number .correct {
  color: var(--accent-green);
}

.stats-number .total {
  color: #999;
}

.stats-description {
  font-size: 18px;
  color: var(--muted);
}

.stats a.link {
  margin-top: 10px;
  display: inline-block;
  font-weight: 500;
  text-decoration: underline;
}

/* === Témoignages === */

.testimonials {
  background-color: #f9fafb;
  padding: 40px 20px;
}

.testimonial-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-style: italic;
}

.testimonial-list blockquote {
  background-color: #ffffff;
  padding: 20px;
  border-left: 5px solid var(--primary-color);
  border-radius: 10px;
  color: var(--light-text);
}

/* === Header & Footer === */

.main-header,
.main-footer {
  background: #1e40af;
  color: white;
  width: 100%;
}


.header-container,
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* Logo */

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  flex-shrink: 0;
  white-space: nowrap;
}

.logo-img { width: 40px; height: 40px; display:block; }

.logo-title {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
}

/* Lien Direct (CTA) */

.header-direct-link {
  margin-left: auto; /* pousse "Direct" vers la droite */
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 9999px;
  box-sizing: border-box;
  border: 2px solid #facc15;
  color: #facc15;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.header-direct-link:hover {
  background: #facc15;
  color: #1e40af;
  transform: translateY(-1px);
}

/* Burger */

#burger-toggle {
  display: flex; /* visible aussi sur desktop */
  font-size: 26px;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  font-family: inherit;
  margin-left: 10px;
}

.burger-icon {
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.burger-label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transform: translateY(1px);
}

/* Au cas où d'autres pages utilisent .main-links */

.main-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.main-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  padding: 6px 0;
}

/* Icônes réseaux */

.social-icon {
  font-size: 20px;
  margin-left: 4px;
}

.nav-actions .social-icon i {
  font-size: 20px;
  color: white;
  transition: color 0.3s ease;
  vertical-align: middle;
  display: inline-block;
}

.nav-actions .social-icon:hover i {
  color: #cbd5e1;
}

/* Bouton thème */

#toggle-theme,
#language-switch,
.nav-actions #toggle-theme,
.nav-actions #language-switch {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: white;
  font-size: 20px;
  cursor: pointer;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

#toggle-theme:hover,
#language-switch:hover,
.nav-actions #toggle-theme:hover,
.nav-actions #language-switch:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
}

#toggle-theme:focus-visible,
#language-switch:focus-visible,
.nav-actions #toggle-theme:focus-visible,
.nav-actions #language-switch:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

#toggle-theme[aria-busy="true"],
#language-switch[aria-busy="true"],
.nav-actions #toggle-theme[aria-busy="true"],
.nav-actions #language-switch[aria-busy="true"] {
  opacity: 0.72;
  cursor: wait;
}

.nav-locale-flag {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
}

/* Footer */

/* Footer */

.main-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 24px;
  background: #1e40af;
  color: #e5e7eb;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

/* Colonne gauche : logo + texte */

.footer-left {
  flex: 1;
  min-width: 240px;
}

.footer-description {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #e5e7eb;
  line-height: 1.5;
}

.footer-responsible {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
}

/* Colonnes de droite */

.footer-right {
  flex: 2;
  display: flex;
  justify-content: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-column {
  min-width: 180px;
}

.footer-column-title {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  color: #bfdbfe;
}

/* Liens du footer */

.footer-right a {
  display: block;
  margin: 4px 0;
  text-decoration: none;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.footer-right a:hover {
  text-decoration: underline;
  color: #ffffff;
}

/* Bas du footer */

.footer-bottom {
  text-align: center;
  padding: 10px 20px 16px;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: #e0e7ff;
}


/* === Responsive === */

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
  }

  .logo-title {
    font-size: 1.25rem;
  }

  .logo-img {
    height: 36px;
  }

  /* On compacte un peu le CTA sur mobile */
  .header-direct-link {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .main-nav {
    align-items: flex-start;
    margin-top: 10px;
  }

  .nav-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }

  .nav-actions a,
  .nav-actions button {
    width: auto !important;
    text-align: right;
    padding: 0;
    border-top: none;
  }
  .footer-content {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .footer-right {
    width: 100%;
    justify-content: flex-start;
  }

  .footer-column {
    min-width: 50%;
  }

  .footer-right a {
    margin: 3px 0;
  }
  
}

/* Les actions (icônes + thème) restent à droite */
.main-header .nav-actions {
  justify-content: flex-end !important;
}

html, body {
  min-height: 100%;
}

/* Icône X spécifique (si tu l'utilises ailleurs) */

.social-icon i.fa-x-twitter {
  font-size: 20px;
  color: white;
  transition: color 0.3s ease;
  vertical-align: middle;
  display: inline-block;
}

.social-icon:hover i.fa-x-twitter {
  color: #cbd5e1;
}

/* Divers */

.prediction-header span:last-child {
  font-weight: 600;
  color: var(--highlight-color);
}

/* === MENU BURGER EN OVERLAY === */
/* === MENU BURGER EN OVERLAY === */
/* Le header reste au-dessus du contenu */
.main-header {
  position: relative;
  z-index: 10;
}

/* Drawer auto-size sur la droite */
.main-nav {
  position: fixed;
  top: 72px;      /* sous le header */
  right: 0;
  bottom: 20px;   /* petite marge en bas */
  left: auto;

  display: none;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 16px;

  background: #1e40af;
  padding: 16px 20px 20px;
  box-sizing: border-box;
  overflow-y: auto;

  /* largeurs dynamiques */
  width: auto;              /* largeur naturelle selon le contenu */
  max-width: 90vw;          /* ne dépasse jamais l'écran */
  min-width: max-content;   /* au moins la taille du plus long texte */

  border-radius: 16px 0 0 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);

  z-index: 40;
}

.main-nav.open {
  display: flex;
}


/* Sections dans le menu */
.nav-section {
  width: 100%;
  margin-top: 4px;
  text-align: right;
}

.nav-section-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #bfdbfe;
  margin-bottom: 4px;
  text-align: right;
}

/* Liens de navigation */
.main-nav a {
  display: block;
  text-decoration: none;
  color: white;
  font-weight: 500;
  padding: 4px 0;
  font-size: 0.95rem;
  text-align: right;
  width: 100%;
}

.main-nav a:hover {
  color: #cbd5e1;
}

/* Zone actions (réseaux + thème) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  justify-content: flex-end;
}

/* Overlay sombre derrière le menu (plein écran, sous le header) */
#overlay {
  position: fixed;
  top: 72px;
  left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 110;
}

.main-header.nav-open #overlay {
  opacity: 1;
  pointer-events: auto;
}

.main-header { position: sticky; top: 0; z-index: 120; }
.main-nav { position: fixed; z-index: 130; } /* exemple */
#burger-toggle { position: relative; z-index: 140; }



/* Responsive : légèrement plus compact mais même logique */
@media (max-width: 768px) {
  .main-nav {
    max-width: 85vw;     /* un peu plus petit sur mobile */
    padding: 12px 16px;
  }

  .nav-actions {
    flex-wrap: wrap;
  }
}

/* Header sticky uniquement quand le menu est ouvert ET que le user scroll */
body.header-sticky .main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100; /* au-dessus du drawer */
}

/* Pour éviter que le contenu saute quand le header passe en fixed */
body.header-sticky {
  padding-top: 72px; /* même hauteur que ton header */
}

/* Reserve space before header injection, then release it once injected */
#header { min-height: 72px; }     /* placeholder before async injection */
#header[data-ready="1"] {
  min-height: 0;
  height: auto !important; /* override legacy inline "height:64px" placeholders */
}

/* Compte (Sans pub / login) */
.account-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 6px;
  border-radius: 10px;
}

.account-dot {
  font-size: 18px;   /* cohérent avec tes icônes 20px */
  line-height: 1;
  display: inline-flex;
}

.account-icon:hover {
  background: rgba(255, 255, 255, 0.10);
}

.account-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 10px;
  text-decoration: none;

  /* colle au burger */
  margin-right: 6px;
}

/* Indication pub ultra discrète au-dessus de Compte */
.nav-noads-hint {
  font-size: 11px;
  opacity: 0.6;
  margin-bottom: 4px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.nav-noads-hint:hover {
  opacity: 0.9;
}

/* Quand sans pub activé */
.nav-noads-hint[data-noads="1"] {
  cursor: default;
  opacity: 0.45;
}

/* Corrige l'espace entre le hint "passer sans pub" et le titre de section */
.nav-noads-hint {
  margin-bottom: -18px;   /* au lieu de 4-8px implicites */
}

.nav-section-title {
  margin-top: 0;        /* supprime l'espace vertical superflu */
}
/* Cas où la section Compte suit directement le hint */
.nav-noads-hint + .nav-section-title {
  margin-top: 0;
}
.nav-noads-hint {
  text-align: left;
  width: 100%;
}

.social-icon svg { display:block; fill: currentColor; }

#header { pointer-events: none; }
#header .main-header { pointer-events: auto; }
.main-header { position: sticky; top: 0; z-index: 1000; }
#overlay { z-index: 900; }
.main-nav { z-index: 1100; }

/* SEO faq blocks */
.seo-faq-block,
.seo-content-block {
  max-width: 1200px;
  margin: 22px auto;
  padding: 0 20px;
}

.seo-faq-block details {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.seo-faq-block summary {
  cursor: pointer;
  font-weight: 600;
}

.seo-faq-block details > :last-child {
  margin-bottom: 0;
}

.seo-faq-block details p,
.seo-faq-block details li,
.seo-faq-block details strong {
  color: inherit;
}

[data-theme="dark"] .seo-faq-block details {
  border-color: #374151;
  background: #1f2937;
  color: #e5e7eb;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.24);
}

[data-theme="dark"] .seo-faq-block summary {
  color: #f8fafc;
}

[data-theme="dark"] .seo-faq-block details p,
[data-theme="dark"] .seo-faq-block details li,
[data-theme="dark"] .seo-faq-block details strong {
  color: #cbd5e1;
}

[data-theme="dark"] .seo-faq-block details a {
  color: #93c5fd;
}

/* Source: /css/components.css */

/* === Hero === */

.hero {
  background: linear-gradient(to right, #2563eb, var(--primary-color));
  color: white;
  padding: 80px 20px;
  text-align: center;
}

[data-theme="dark"] .hero {
  background:
    radial-gradient(1100px 320px at 50% -10%, rgba(147, 197, 253, 0.1), transparent 56%),
    linear-gradient(135deg, #18345f 0%, #12284c 58%, #0d1d38 100%);
}

.hero.hero--compact {
  padding: 40px 20px; /* moitié moins haut en mode app */
}


.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-inline: auto;
}
.cta-button {
  padding: 12px 28px;
  background: white;
  color: var(--primary-color);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease;
  min-width: 250px;
  text-align: center;
}
.cta-button:hover {
  background: #e0e7ff;
}


/* === Prediction Cards === */

.predictions-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.prediction-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  padding: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.prediction-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}
.teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.teams-row strong {
  font-size: 1.05rem;
  color: var(--light-text);
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.teams-row img {
  width: 42px;
  height: 42px;
  background: #f3f4f6;
  border-radius: 6px;
  object-fit: contain;
}
.teams-row span.vs {
  font-weight: 600;
  font-size: 1rem;
  color: var(--muted);
}
.prediction-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
  font-size: 0.9rem;
}
.prediction-footer .winner {
  font-weight: 600;
  font-size: 1rem;
  color: var(--light-text);
  margin-bottom: 4px;
}
.prediction-footer .confidence {
  font-weight: 500;
  margin-bottom: 6px;
}
.prediction-footer .link {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: underline;
}
.match-time {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-top: 6px;
}



/* === Ligue buttons === */

.league-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.league-buttons a {
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease;
}
.league-buttons a:hover {
  background: var(--primary-dark);
}



/* === Process steps === */

.process-steps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.process-steps .step {
  background-color: white;
  padding: 20px;
  border-radius: 15px;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  flex: 1 1 200px;
  max-width: 300px;
  text-align: center;
}



/* === Animation fade-in === */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}



/* === Responsive === */

@media (min-width: 768px) {
  .predictions-grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .prediction-card {
    width: 45%;
  }
}

@media (max-width: 480px) {
  .teams-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .teams-row span.vs {
    display: none;
  }
  .prediction-header {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .prediction-footer {
    text-align: center;
  }
}

.prediction-footer .share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: #1da1f2;
  color: white;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 9999px;
  font-size: 0.95rem;
  min-width: 220px; /* <- Ajoute une largeur minimale cohérente */
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
}

.prediction-footer .share-button:hover {
  background-color: #0d8ddc;
  transform: scale(1.04);
}

.prediction-footer .share-button img.icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}


.prediction-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  padding-top: 10px;
}

.cta-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* optionnel, centre les boutons */
  gap: 15px; /* espace entre les boutons */
}

/* .cta-button {
  display: inline-block;
  padding: 12px 24px;
  font-size: 18px;
  text-align: center;
} */

/* === Top Pronostics Cards === */

.top-pronos-cards {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.top-pronos-card {
    background-color: var(--background-dark);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    width: 300px;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.top-pronos-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
}

.top-pronos-card .emoji {
    font-size: 40px;
    margin-bottom: 15px;
}

.top-pronos-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.top-pronos-card p {
    font-size: 18px;
    color: var(--text-color-dark);
    margin-bottom: 20px;
}

.btn-primary {
    padding: 15px 40px;
    background-color: var(--btn-bg-color);
    color: var(--text-color-light);
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
}

.btn-primary:hover {
    background-color: var(--btn-hover-color);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.6);
}

.emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
    margin-top: 0px;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
}

@media screen and (max-width: 768px) {
    .top-pronos-cards {
        flex-direction: column;
        gap: 20px;
        margin: 0 auto;
    }

    .top-pronos-card {
        width: calc(100% - 40px);
        max-width: 400px;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .btn-primary {
        padding: 10px 30px;
        font-size: 16px;
    }
}

/* === Composant Switch / Toggle === */

.switch-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background-color: rgba(240, 240, 240, 0.1);
  border-radius: 10px;
  border: 1px solid var(--btn-bg-color);
  justify-content: center;
  flex-wrap: wrap;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: #4A90E2;
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.filter-label {
  font-size: 1rem;
  color: var(--text-color-light);
}

/* =========================
   AUTH / COMPTE (Sans pub)
   ========================= */

/* Formulaires auth */
form input[type="email"],
form input[type="text"],
form input[type="password"],
form input[inputmode="numeric"] {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: rgb(0, 0, 0);
  font-size: 0.95rem;
}

form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

form input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.8); /* bleu Foresportia */
  background: rgba(255, 255, 255, 0.08);
}

/* Messages feedback (OTP / profil) */
#otp-message,
#profile-msg {
  font-size: 0.9rem;
}

/* Bloc code OTP */
#code-block {
  padding-top: 6px;
}

/* Alignement boutons multiples */
.proof-actions {
  gap: 10px;
}

/* État compte (petite emphase) */
#acc-status,
#acc-noads {
  font-weight: 600;
}

/* Mobile : éviter que ça fasse trop tassé */
@media (max-width: 768px) {
  .proof-grid {
    grid-template-columns: 1fr;
  }
}

/* Icône compte (login / sans pub) */
.account-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 10px;
  text-decoration: none;
}

.account-dot {
  font-size: 18px;
  line-height: 1;
}

.account-icon:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* =========================
   BUTTONS - System
   ========================= */

.btn {
  --btn-bg: transparent;
  --btn-border: transparent;
  --btn-text: inherit;
  --btn-hover-bg: transparent;
  --btn-hover-border: transparent;
  --btn-hover-text: inherit;

  appearance: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.1;
  cursor: pointer;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-text);
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease,
    transform .05s ease;
}

.btn:hover {
  background: var(--btn-hover-bg);
  border-color: var(--btn-hover-border);
  color: var(--btn-hover-text);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[data-busy="1"] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* =========================
   PRIMARY
   ========================= */

.btn-primary {
  --btn-bg: #2563eb;
  --btn-border: #2563eb;
  --btn-text: #ffffff;

  --btn-hover-bg: #1e40af;
  --btn-hover-border: #1e40af;
  --btn-hover-text: #ffffff;

  box-shadow: 0 6px 16px rgba(37,99,235,0.25);
}

/* =========================
   SECONDARY
   ========================= */

.btn-secondary {
  --btn-bg: rgba(37,99,235,0.08);
  --btn-border: rgba(37,99,235,0.25);
  --btn-text: #1e40af;

  --btn-hover-bg: rgba(37,99,235,0.16);
  --btn-hover-border: rgba(37,99,235,0.45);
  --btn-hover-text: #1e40af;
}

/* =========================
   TERTIARY (low emphasis / logout)
   ========================= */

.btn-tertiary {
  --btn-bg: transparent;
  --btn-border: rgba(15,23,42,0.20);
  --btn-text: #334155;

  --btn-hover-bg: rgba(15,23,42,0.06);
  --btn-hover-border: rgba(15,23,42,0.35);
  --btn-hover-text: #0f172a;
}

/* =========================
   DANGER (si un jour tu veux)
   ========================= */

.btn-danger {
  --btn-bg: rgba(185,28,28,0.08);
  --btn-border: rgba(185,28,28,0.35);
  --btn-text: #b91c1c;

  --btn-hover-bg: rgba(185,28,28,0.16);
  --btn-hover-border: rgba(185,28,28,0.55);
  --btn-hover-text: #7f1d1d;
}

/* =========================
   DARK MODE
   ========================= */

[data-theme="dark"] .btn-secondary {
  --btn-bg: #0f172a;
  --btn-border: rgba(96,165,250,0.24);
  --btn-text: #c7dcff;

  --btn-hover-bg: rgba(96,165,250,0.08);
  --btn-hover-border: rgba(96,165,250,0.34);
  --btn-hover-text: #eff6ff;
}

[data-theme="dark"] .btn-tertiary {
  --btn-bg: transparent;
  --btn-border: rgba(96,165,250,0.2);
  --btn-text: #b8d4ff;

  --btn-hover-bg: rgba(96,165,250,0.08);
  --btn-hover-border: rgba(96,165,250,0.3);
  --btn-hover-text: #eff6ff;
}

[data-theme="dark"] .btn-primary {
  --btn-bg: #315796;
  --btn-border: #315796;
  --btn-text: #ffffff;

  --btn-hover-bg: #24447f;
  --btn-hover-border: #24447f;
  --btn-hover-text: #ffffff;

  box-shadow: 0 14px 28px rgba(2,6,23,0.34);
}

a, button {
  touch-action: manipulation;
}

/* Source: /css/pages/ui_common.css */

/* ui_common.css
   Lot 1: shared visual foundation for pages that expose cards, pills and meta blocks.
   Keeps the current brand identity while reducing visual drift. */

:root {
  --ui-surface-card: #ffffff;
  --ui-surface-soft: #f8fafc;

  --ui-text-main: #0f172a;
  --ui-text-muted: #64748b;

  --ui-accent: #1e40af;
  --ui-accent-soft: rgba(30, 64, 175, 0.10);

  --ui-border-soft: rgba(15, 23, 42, 0.10);
  --ui-border-strong: rgba(30, 64, 175, 0.22);

  --ui-radius-card: 14px;
  --ui-radius-soft: 12px;
  --ui-radius-pill: 999px;

  --ui-shadow-card: 0 8px 20px rgba(15, 23, 42, 0.06);
  --ui-shadow-card-hover: 0 14px 30px rgba(15, 23, 42, 0.12);

  --ui-card-topbar: linear-gradient(90deg, #2563eb 0%, #60a5fa 45%, #93c5fd 100%);
  --ui-card-tint: linear-gradient(180deg, rgba(37, 99, 235, 0.06) 0%, rgba(37, 99, 235, 0.00) 86px);

  --ui-chip-bg: rgba(148, 163, 184, 0.12);
  --ui-chip-border: rgba(100, 116, 139, 0.28);
  --ui-chip-text: #334155;

  --ui-chip-accent-bg: rgba(37, 99, 235, 0.12);
  --ui-chip-accent-border: rgba(37, 99, 235, 0.24);
  --ui-chip-accent-text: #1e3a8a;
}

[data-theme="dark"] {
  --ui-surface-card: #1f2937;
  --ui-surface-soft: #111827;

  --ui-text-main: #e5e7eb;
  --ui-text-muted: #cbd5e1;

  --ui-accent: #60a5fa;
  --ui-accent-soft: rgba(96, 165, 250, 0.18);

  --ui-border-soft: rgba(148, 163, 184, 0.35);
  --ui-border-strong: rgba(147, 197, 253, 0.40);

  --ui-shadow-card: 0 10px 22px rgba(0, 0, 0, 0.30);
  --ui-shadow-card-hover: 0 16px 30px rgba(0, 0, 0, 0.38);

  --ui-card-topbar: linear-gradient(90deg, #60a5fa 0%, #93c5fd 55%, #bfdbfe 100%);
  --ui-card-tint: linear-gradient(180deg, rgba(96, 165, 250, 0.14) 0%, rgba(96, 165, 250, 0.00) 96px);

  --ui-chip-bg: rgba(148, 163, 184, 0.16);
  --ui-chip-border: rgba(148, 163, 184, 0.45);
  --ui-chip-text: #cbd5e1;

  --ui-chip-accent-bg: rgba(96, 165, 250, 0.18);
  --ui-chip-accent-border: rgba(147, 197, 253, 0.40);
  --ui-chip-accent-text: #dbeafe;
}

/* Optional utility classes for progressive migration */
.ui-card {
  background: var(--ui-surface-card);
  border: 1px solid var(--ui-border-soft);
  border-radius: var(--ui-radius-card);
  box-shadow: var(--ui-shadow-card);
}

.ui-pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--ui-radius-pill);
  border: 1px solid var(--ui-border-soft);
  background: var(--ui-surface-soft);
  color: var(--ui-text-muted);
  font-weight: 800;
}

.ui-muted {
  color: var(--ui-text-muted);
}

/* Source: /css/noads.css */

.user-no-ads ins.adsbygoogle,
.user-no-ads .adsbygoogle,
.user-no-ads [data-ad-client],
.user-no-ads [data-ad-slot],
.user-no-ads iframe[src*="doubleclick.net"],
.user-no-ads iframe[src*="googlesyndication.com"],
.user-no-ads iframe[id^="aswift_"],
.user-no-ads iframe[id^="google_ads_iframe"],
.user-no-ads div[id^="google_ads_iframe"],
.user-no-ads .ad,
.user-no-ads .ads,
.user-no-ads .ad-container,
.user-no-ads .ads-container,
.user-no-ads .ad-wrapper,
.user-no-ads .ads-wrapper,
.user-no-ads .pub,
.user-no-ads .publicite,
.user-no-ads .banner-ad {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* évite les trous si certains wrappers ont une hauteur fixée */
.user-no-ads .ad,
.user-no-ads .ads,
.user-no-ads .ad-container,
.user-no-ads .ads-container,
.user-no-ads .ad-wrapper,
.user-no-ads .ads-wrapper,
.user-no-ads .banner-ad {
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Source: /css/pages/top_pronostics_ia.css */

/* =========================================================
   Top Pronostics IA % CLEAN (single source of truth)
   - supprime les doublons
   - date pills stables (pas écrasées)
   - pas d'overflow horizontal
   ========================================================= */
/* -------------------------
   Tokens
------------------------- */
:root{
  --tp-max: 1120px;

  --brand: var(--ui-accent, #1e40af);
  --brand-2: #2a4ba7;
  --brand-soft: var(--ui-accent-soft, rgba(37,99,235,0.10));

  --text: var(--ui-text-main, #0f172a);
  --muted: var(--ui-text-muted, #475569);

  --bg: var(--ui-surface-card, #ffffff);
  --bg-soft: #f6f8fc;

  --card: var(--ui-surface-card, #ffffff);
  --border: var(--ui-border-soft, rgba(15,23,42,0.10));

  --shadow: 0 12px 28px rgba(2,6,23,0.08);
  --shadow-soft: var(--ui-shadow-card, 0 10px 22px rgba(2,6,23,0.06));

  --radius: var(--ui-radius-card, 18px);
  --radius-sm: var(--ui-radius-soft, 12px);

  --success: #16a34a;
  --danger: #ef4444;
  --warning: #f59e0b;

  --success-soft: rgba(22,163,74,0.10);
  --danger-soft: rgba(239,68,68,0.10);
  --warning-soft: rgba(245,158,11,0.12);

  --fs-12: clamp(0.72rem, 0.69rem + 0.15vw, 0.75rem);
  --fs-13: clamp(0.76rem, 0.73rem + 0.2vw, 0.8125rem);
  --fs-14: clamp(0.82rem, 0.78rem + 0.24vw, 0.875rem);
  --fs-15: clamp(0.88rem, 0.84rem + 0.22vw, 0.9375rem);
  --fs-16: clamp(0.94rem, 0.91rem + 0.24vw, 1rem);
  --fs-18: clamp(1rem, 0.95rem + 0.4vw, 1.125rem);
  --fs-22: clamp(1.2rem, 1.12rem + 0.7vw, 1.375rem);

  --lh-tight: 1.15;
  --lh: 1.45;
  --lh-loose: 1.6;
  --highlight-color: #2a4ba7; /* fond sélectionné en mode clair */
}

/* -------------------------
   Base guards (anti overflow)
------------------------- */
*,
*::before,
*::after{ box-sizing: border-box; }

html, body{
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

img, svg{
  max-width: 100%;
  height: auto;
}

/* -------------------------
   Page base
------------------------- */
.tp-main{
  color: var(--text);
  font-size: var(--fs-16);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.tp-container{
  max-width: var(--tp-max);
  margin: 0 auto;
  padding: 0 20px;
  min-width: 0;
}

/* -------------------------
   HERO
------------------------- */
.tp-hero{
  background:
    radial-gradient(1200px 360px at 50% -10%, rgba(255,255,255,0.35), transparent 60%),
    linear-gradient(to right, var(--brand), var(--brand-2));
  color: #fff;
  padding: 56px 0 34px;
  overflow: hidden;
}

.tp-hero-card{
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(8px);
  min-width: 0;
  text-align: center;
}

.tp-badge{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  font-weight: 750;
  max-width: 100%;
}

.tp-hero h1{
  margin: 12px 0 10px;
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  line-height: 1.12;
}

.tp-subtitle{
  margin: 0;
  max-width: 860px;
  color: rgba(255,255,255,0.92);
  line-height: 1.55;
  margin-inline: auto;
}

.tp-hero-actions{
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 14px;
}

@media (max-width: 640px){
  .tp-hero-actions{
    flex-direction: column;
    align-items: stretch;
  }
  .tp-hero-actions .cta-button{
    width: 100%;
    text-align: center;
  }
}

/* -------------------------
   Sections / panels
------------------------- */
.tp-section{ padding: 42px 0; background: var(--bg); }
.tp-section--filters{ background: var(--bg-soft); }

.tp-panel{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  min-width: 0;
}

.tp-panel-top{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.tp-perf,
.tp-type-stats{
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  min-width: 0;
}

#bb-perf{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  text-align: center;
}

#bb-type-stats{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.tp-h2{
  margin: 0;
  color: var(--text);
  font-size: var(--fs-18);
  font-weight: 900;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}

.tp-muted{ color: var(--muted); font-size: var(--fs-15); line-height: var(--lh-loose); }

/* -------------------------
   Leagues
------------------------- */
.league-buttons{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 10px 6px 0;
  min-width: 0;
}

.league-button{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 8px 16px rgba(2,6,23,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  flex: 0 0 auto;
}
.league-button img{ width: 32px; height: 32px; object-fit: contain; }
.league-button.selected{ outline: 2px solid rgba(37,99,235,0.35); }

/* -------------------------
   Results (legacy cards)
------------------------- */
.tp-grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  min-width: 0;
}

.bestbet-card{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  min-width: 0;
  max-width: 100%;
}

/* -------------------------
   Match-card mode (ton rendu resultats.css)
------------------------- */
#bb-grid.tp-grid{
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 8px 0 18px;
}

.tp-match-card{
  background: #fff;
  border-radius: var(--ui-radius-card, 12px);
  padding: 16px;
  box-shadow: var(--ui-shadow-card, 0 4px 12px rgba(0,0,0,0.05));
  border: 1px solid var(--ui-border-soft, rgba(0,0,0,0.08));
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.tp-match-summary{
  display: none;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tp-match-card__body{
  min-width: 0;
}

#bb-grid.tp-grid.tp-grid--compact{
  gap: 12px;
}

.tp-grid--compact .tp-match-card{
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(15,23,42,0.05);
}

.tp-grid--compact .tp-match-card::before{
  height: 4px;
}

.tp-grid--compact .tp-match-summary{
  display: grid;
  grid-template-columns: auto minmax(0, 1.3fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.tp-grid--compact .tp-match-summary:focus-visible{
  outline: 2px solid rgba(37,99,235,0.45);
  outline-offset: 4px;
  border-radius: 10px;
}

.tp-match-summary__time{
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--brand);
  white-space: nowrap;
}

.tp-match-summary__teams{
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  color: #0f172a;
}

.tp-match-summary__team{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-match-summary__sep{
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.tp-match-summary__picks{
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tp-match-summary__caret{
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--muted);
  transition: transform .18s ease;
}

.tp-grid--compact .tp-match-card.is-compact-open .tp-match-summary__caret{
  transform: rotate(180deg);
}

.tp-compact-pick{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.08);
  background: #f8fafc;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  color: #0f172a;
}

.tp-compact-pick__label{
  color: var(--muted);
}

.tp-compact-pick__prob{
  color: var(--brand);
}

.tp-compact-pick__result{
  white-space: nowrap;
}

.tp-compact-pick--win{
  background: rgba(22,163,74,0.10);
  border-color: rgba(22,163,74,0.24);
}

.tp-compact-pick--lose{
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.24);
}

.tp-compact-pick--void{
  background: rgba(59,130,246,0.10);
  border-color: rgba(59,130,246,0.24);
}

.tp-compact-pick--pending,
.tp-compact-pick--more{
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.08);
}

.tp-grid--compact .tp-match-card__body[hidden]{
  display: none !important;
}

.tp-grid--compact .tp-match-card.is-compact-open .tp-match-card__body{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,0.08);
}

[data-theme="dark"] .tp-match-summary__time{
  color: #93c5fd;
}

[data-theme="dark"] .tp-match-summary__teams{
  color: #f8fbff;
}

[data-theme="dark"] .tp-match-summary__sep,
[data-theme="dark"] .tp-match-summary__caret{
  color: #94a3b8;
}

[data-theme="dark"] .tp-compact-pick{
  background: rgba(15,23,42,0.82);
  border-color: rgba(148,163,184,0.18);
  color: #f8fbff;
}

[data-theme="dark"] .tp-compact-pick__label{
  color: #cbd5e1;
}

[data-theme="dark"] .tp-compact-pick__prob{
  color: #bfdbfe;
}

[data-theme="dark"] .tp-compact-pick__result{
  color: #f8fbff;
}

[data-theme="dark"] .tp-compact-pick--win{
  background: rgba(22,163,74,0.20);
  border-color: rgba(74,222,128,0.30);
}

[data-theme="dark"] .tp-compact-pick--lose{
  background: rgba(220,38,38,0.18);
  border-color: rgba(248,113,113,0.28);
}

[data-theme="dark"] .tp-compact-pick--void{
  background: rgba(37,99,235,0.22);
  border-color: rgba(96,165,250,0.30);
}

[data-theme="dark"] .tp-compact-pick--pending,
[data-theme="dark"] .tp-compact-pick--more{
  background: rgba(51,65,85,0.78);
  border-color: rgba(148,163,184,0.24);
}

.tp-match-card::before{
  content:"";
  position:absolute;
  left:0; top:0; right:0;
  height:6px;
  border-top-left-radius: var(--ui-radius-card, 12px);
  border-top-right-radius: var(--ui-radius-card, 12px);
  background: rgba(30, 64, 175, 0.85);
}

.tp-match-card--ad{
  padding: 12px 12px 10px;
  overflow: hidden;
}

.tp-match-card--ad::before{
  display: none;
}

.tp-match-card--ad:hover{
  transform: none;
}

.tp-inline-ad-label{
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.tp-match-card--ad .adsbygoogle{
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  min-height: clamp(250px, 33vw, 310px);
  margin: 0 auto !important;
  overflow: hidden !important;
}

.tp-match-card--ad .adsbygoogle > iframe{
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 auto !important;
}

[data-theme="dark"] .tp-inline-ad-label{
  color: #94a3b8;
}

.tp-match-meta{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-top: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.tp-league-badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-weight: 900;
  color: var(--brand);
}
.tp-league-badge img{ width: 20px; height: 20px; object-fit: contain; }

.tp-kickoff{
  font-weight: 800;
  color: #1e40af;
  font-size: 0.95rem;
}

.tp-team-confrontation{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tp-team{
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 8px;
  text-align:center;
}

.tp-team-logo{
  width: 48px;
  height: 48px;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  background: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing: border-box;
}
.tp-team-logo .tp-team-logo-img{
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border-radius: 0;
}

.tp-team-name{
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--brand);
  max-width: 320px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-vs{ font-weight: 900; color: var(--muted); }

.tp-elo-row{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 10px;
  justify-content: center;
  align-items: center;
}

.tp-elo-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 850;
  font-size: 0.86rem;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(15,23,42,0.03);
  color: var(--muted);
  min-width: 130px;
  text-align: center;
}

.tp-elo-pill--home{
  border-color: rgba(37,99,235,0.26);
  background: rgba(37,99,235,0.09);
  color: #1e3a8a;
}

.tp-elo-pill--away{
  border-color: rgba(2,132,199,0.24);
  background: rgba(2,132,199,0.09);
  color: #0c4a6e;
}

.tp-picks{
  display:flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

/* =========================================================
   Pick layout FIX % metrics sous le contenu
   ========================================================= */

.tp-pick-row{
  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.02);

  position: relative;
  overflow: hidden;
}

/* zone texte principale */
.tp-pick-left{
  min-width: 0;
}

/* metrics alignées sous le texte */
.tp-pick-metrics{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;

  justify-content: flex-start; /* IMPORTANT */
}


.tp-pick-row::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:6px;
  background: rgba(0,0,0,0.10);
}

.tp-pick-label{
  font-weight: 950;
  color: var(--text);
  line-height: 1.1;
}
.tp-pick-sub{
  margin-top: 4px;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.tp-chip{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  font-weight: 900;
  font-size: 0.9rem;
}

.tp-chip--prob{
  border-color: rgba(30,64,175,0.22);
  background: rgba(30,64,175,0.06);
}

.tp-chip--conf{
  border-color: rgba(16,185,129,0.22);
  background: rgba(16,185,129,0.06);
}

/* Outcome coloring */
.tp-pick-row--win{
  background: rgba(16,185,129,0.10);
  border-color: rgba(16,185,129,0.28);
}
.tp-pick-row--win::before{ background: rgba(16,185,129,0.95); }

.tp-pick-row--lose{
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.28);
}
.tp-pick-row--lose::before{ background: rgba(239,68,68,0.95); }

.tp-pick-row--void{
  background: rgba(59,130,246,0.10);
  border-color: rgba(59,130,246,0.28);
}
.tp-pick-row--void::before{ background: rgba(59,130,246,0.95); }

/* responsive match cards */
@media (max-width: 768px){
  .tp-team-confrontation{ grid-template-columns: 1fr; }
  .tp-vs{ display:none; }
  .tp-pick-row{ grid-template-columns: 1fr; gap: 8px; }
  .tp-pick-metrics{ justify-content:flex-start; }
  .tp-match-card--ad .adsbygoogle{ min-height: 348px; }
  .tp-grid--compact .tp-match-summary{
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "time teams caret"
      "picks picks picks";
    align-items: start;
  }
  .tp-match-summary__time{ grid-area: time; }
  .tp-match-summary__teams{ grid-area: teams; }
  .tp-match-summary__picks{ grid-area: picks; }
  .tp-match-summary__caret{
    grid-area: caret;
    justify-self: end;
  }
}

@media (max-width: 360px){
  .tp-match-card--ad{
    padding: 6px 0 4px;
  }

  .tp-match-card--ad .adsbygoogle{
    min-height: 348px;
  }
}


/* -------------------------
   DATE PICKER (FINAL OVERRIDE % single block)
   Objectif :
   - boutons plus "hauts"
   - date autorisee sur 2 lignes (clamp 2)
   - pas de contenu coupe
------------------------- */
.tp-date-row{
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* scroller horizontal */
.tp-date-row .date-selector{
  display:flex;
  justify-content:flex-start;
  gap: 10px;

  padding: 8px 6px 14px; /* bottom = place pour scrollbar */
  overflow-x:auto;
  overflow-y:hidden;

  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling: touch;

  scrollbar-gutter: stable;
  touch-action: pan-x;
}

.tp-date-row .date-selector::-webkit-scrollbar{ height: 8px; }
.tp-date-row .date-selector::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
}

/* pill (plus haut, height auto) */
.tp-date-row .date-button{
    background: var(--background-light);
    border: 1px solid var(--primary-color);
    border-radius: .75rem;
    padding: .8rem;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, .1);
    scroll-snap-align: center;
    cursor: pointer;
    color: var(--text-color-light);
    margin-top: .25rem;
}

.date-button:hover{ transform: translateY(-1px); }

.date-button.selected{
    background-color: var(--highlight-color) !important;
    border-color: var(--highlight-color) !important;
    color: #fff !important;
    box-shadow: 0 6px 10px rgba(0, 0, 0, .25);
}

/* badge */
.match-count{
  display:inline-block;
  padding: .25rem .55rem;
  font-size: .68rem;
  font-weight: 700;
  border-radius: .5rem;
  background: var(--brand-2);
  border: 1px solid rgba(0,0,0,0.10);
  color: #fff;
  line-height: 1.1;
  margin-top: .25rem;
}

.date-button .match-count{
  display: block;
  box-sizing: border-box;
  width: 100%;
}

.date-button.selected .match-count{
  background: rgba(0,0,0,0.25);
  border-color: transparent;
}

/* Dark mode */
[data-theme="dark"] .tp-date-row .filter-container{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
}
[data-theme="dark"] .tp-date-row .date-button{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.16);
  color: #fff;
}
/* =========================================================
   MISSING BLOCKS % Filters / Day summary / Type chart / Pending
   À coller EN FIN DE FICHIER (override final)
   ========================================================= */

/* ---------------------------
   Filters head + toggle
--------------------------- */
.tp-filters-head{
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.tp-filters-toggle{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(30,64,175,0.22);
  background: #fff;
  color: var(--brand);
  font-weight: 900;
  cursor: pointer;
  user-select: none;
  max-width: 100%;
}

.tp-filters-toggle:hover{
  transform: translateY(-1px);
}

.tp-filters-caret{ opacity: 0.85; }

/* panel container */
#filters-panel,
.tp-filters-panel{
  margin-top: 12px;
  min-width: 0;
}

/* collapsed state (JS toggle) */
#filters-panel.collapsed,
.tp-filters-panel.collapsed{
  display: none !important;
}

/* inner card */
.tp-filters-card{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 0;
}

/* grid (desktop 2 colonnes) */
.tp-filters-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.tp-field{ min-width: 0; }
.tp-field--full{ grid-column: 1 / -1; }

.tp-label{
  display: block;
  margin-bottom: 6px;
  font-weight: 850;
  font-size: var(--fs-14);
  color: var(--text);
}

.tp-select{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.14);
  background: #fff;
  color: var(--text);
  font-size: var(--fs-15);
  font-weight: 650;
}

/* actions (boutons) */
.tp-actions{
  margin-left: auto;
  display: flex;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.tp-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 9999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 900;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.tp-btn--primary{
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 26px rgba(30,64,175,0.22);
}

.tp-btn--ghost{
  background: #fff;
  color: var(--brand);
  border-color: rgba(30,64,175,0.22);
}

/* checks (si utilisés dans tes filtres) */
.tp-checks{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  min-width: 0;
}

.tp-check{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 700;
  max-width: 100%;
}

.tp-check input{ flex: 0 0 auto; }
.tp-check--strong{ border-color: rgba(30,64,175,0.22); }

/* Responsive filters */
@media (max-width: 640px){
  .tp-filters-grid{ grid-template-columns: 1fr; }

  .tp-actions{
    width: 100%;
    margin-left: 0;
  }

  .tp-actions .tp-btn{
    width: 100%;
  }

  .tp-filters-toggle{
    width: 100%;
    justify-content: center;
  }
}

/* Dark mode filters */
[data-theme="dark"] .tp-filters-card{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}

[data-theme="dark"] .tp-select{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
}

[data-theme="dark"] .tp-check{
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
}

[data-theme="dark"] .tp-filters-toggle{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.92);
}

/* ---------------------------
   Day summary (tp-day-summary / #tp-day-summary)
--------------------------- */
#tp-day-summary,
.tp-day-summary{
  margin: 14px auto 6px;
  max-width: 980px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  min-width: 0;
}

.tp-day-summary__title{
  font-weight: 950;
  color: var(--text);
  margin-bottom: 10px;
  text-align: center;
}

.tp-day-summary__grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.tp-day-metric{
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: 12px;
  min-width: 0;
  text-align: center;
}

.tp-day-metric--soft{
  background: #fff;
}

.tp-day-metric__label{
  font-weight: 850;
  color: var(--muted);
  font-size: var(--fs-14);
}

.tp-day-metric__value{
  margin-top: 6px;
  font-weight: 950;
  line-height: var(--lh-tight);
}

.tp-day-metric__value .ok{ color: var(--success); }
.tp-day-metric__value .ko{ color: var(--danger); }

.tp-day-metric__hint{
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--fs-14);
  line-height: 1.25;
}

@media (max-width: 820px){
  .tp-day-summary__grid{ grid-template-columns: 1fr; }
}

[data-theme="dark"] #tp-day-summary,
[data-theme="dark"] .tp-day-summary{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}

[data-theme="dark"] .tp-day-metric{
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.10);
}

[data-theme="dark"] .tp-day-metric--soft{
  background: rgba(255,255,255,0.03);
}

/* ---------------------------
   Pick row states (pending)
--------------------------- */
.tp-pick-row--pending{
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}

.tp-pick-row--pending::before{
  background: rgba(0,0,0,0.12);
}

[data-theme="dark"] .tp-pick-row--pending{
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
}

[data-theme="dark"] .tp-pick-row--pending::before{
  background: rgba(255,255,255,0.18);
}

/* ---------------------------
   Type chart (bb-type-chart / tp-type-chart)
--------------------------- */
/* container */
#bb-type-chart,
.tp-type-chart{
  margin-top: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

/* row layout */
.bb-type-row{
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.bb-type-label{
  font-weight: 900;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* bar */
.bb-type-bar-wrap{
  width: 100%;
  max-width: 100%;
  height: 10px;
  border-radius: 9999px;
  background: rgba(15,23,42,0.08);
  overflow: hidden;
}

.bb-type-bar{
  height: 100%;
  border-radius: 9999px;
  background: hsl(var(--h, 210) 55% 38%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

/* value */
.bb-type-value{
  font-weight: 950;
  color: var(--text);
  white-space: nowrap;
}

.bb-type-volume{
  display: inline-block;
  margin-left: 8px;
  color: var(--muted);
  font-weight: 750;
}

/* responsive chart */
@media (max-width: 980px){
  .bb-type-row{
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto;
  }
}

@media (max-width: 640px){
  .bb-type-row{
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .bb-type-label{
    white-space: normal;
  }
  .bb-type-value{
    white-space: normal;
  }
}

/* dark mode chart */
[data-theme="dark"] .bb-type-bar-wrap{
  background: rgba(255,255,255,0.10);
}

[data-theme="dark"] .bb-type-value,
[data-theme="dark"] .bb-type-label{
  color: rgba(255,255,255,0.92);
}

[data-theme="dark"] .bb-type-volume{
  color: rgba(255,255,255,0.70);
}

/* =========================================================
   Inline toggle % Foresportia clean UI
   ========================================================= */

.tp-inline-toggle{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.96) 100%);
  border: 1px solid rgba(15,23,42,0.10);
  box-shadow: 0 8px 18px rgba(15,23,42,0.04);
  font-weight: 800;
  font-size: var(--fs-14);
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition:
    background .18s ease,
    border-color .18s ease,
    transform .12s ease,
    box-shadow .18s ease,
    opacity .18s ease;
}

.tp-inline-toggle:hover{
  background: linear-gradient(180deg, rgba(239,246,255,0.98) 0%, rgba(255,255,255,0.98) 100%);
  border-color: rgba(37,99,235,0.25);
  box-shadow: 0 12px 24px rgba(37,99,235,0.10);
  transform: translateY(-1px);
}

.tp-inline-toggle:active{
  transform: translateY(0);
}

.tp-inline-toggle input{
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
  border-radius: 8px;
  border: 1.5px solid rgba(148,163,184,0.9);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15,23,42,0.08);
  position: relative;
  flex-shrink: 0;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .12s ease;
}

.tp-inline-toggle input::after{
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 11px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-50%, -58%) rotate(45deg) scale(0.75);
  opacity: 0;
  transition: opacity .16s ease, transform .16s ease;
}

.tp-inline-toggle input:checked{
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-color: rgba(29,78,216,0.95);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 0 4px rgba(37,99,235,0.10);
}

.tp-inline-toggle input:checked::after{
  opacity: 1;
  transform: translate(-50%, -58%) rotate(45deg) scale(1);
}

.tp-inline-toggle input:disabled{
  cursor: not-allowed;
  opacity: 0.75;
  background: #e5e7eb;
  border-color: #cbd5e1;
  box-shadow: none;
}

.tp-inline-toggle__text{
  line-height: 1.2;
  white-space: normal;
  color: #334155;
}

.tp-h2-row{
  display: grid;
  gap: 12px;
  align-items: center;
}

.tp-h2-row .tp-h2.tp-h2--spaced{
  width: 100%;
  text-align: center;
}

.tp-h2-controls{
  display: grid;
  gap: 12px;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}

.tp-inline-modes-wrap{
  display: grid;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.95) 100%);
  box-shadow: 0 10px 24px rgba(15,23,42,0.04);
}

.tp-inline-modes{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tp-inline-toggles{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tp-inline-modes-label{
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.tp-mode-chip{
  border: 1px solid rgba(30,64,175,0.22);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: var(--brand);
  border-radius: 9999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 850;
  cursor: pointer;
  line-height: 1.1;
  box-shadow: 0 6px 14px rgba(15,23,42,0.04);
}

.tp-mode-chip.is-active{
  background: linear-gradient(180deg, rgba(219,234,254,0.88) 0%, rgba(191,219,254,0.72) 100%);
  border-color: rgba(30,64,175,0.36);
  color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37,99,235,0.12);
}

.tp-inline-toggle:has(input:checked){
  border-color: rgba(37,99,235,0.26);
  background: linear-gradient(180deg, rgba(239,246,255,0.98) 0%, rgba(255,255,255,0.98) 100%);
  box-shadow: 0 12px 24px rgba(37,99,235,0.08);
}

.tp-inline-toggle input:checked + .tp-inline-toggle__text{
  color: var(--brand);
  font-weight: 900;
}

.tp-inline-toggle input:focus-visible{
  outline: 2px solid rgba(37,99,235,0.5);
  outline-offset: 2px;
}

.tp-inline-toggle:has(input:disabled){
  opacity: 0.58;
  cursor: not-allowed;
  background: linear-gradient(180deg, rgba(248,250,252,0.88) 0%, rgba(241,245,249,0.94) 100%);
  box-shadow: none;
}

/* =========================
   Mobile
   ========================= */
@media (max-width: 980px){

  .tp-inline-toggles{
    grid-template-columns: 1fr;
  }

  .tp-inline-toggle{
    width: 100%;
    padding: 10px 12px;
  }
}

@media (min-width: 981px){
  .tp-h2-controls{
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
  }

  .tp-inline-modes-wrap{
    align-content: start;
    justify-content: start;
  }

  .tp-inline-modes{
    justify-content: flex-start;
  }

  .tp-inline-modes-label{
    text-align: left;
  }

  .tp-inline-toggles{
    align-content: start;
  }
}

/* =========================
   Dark mode
   ========================= */
[data-theme="dark"] .tp-inline-toggle{
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.04) 100%);
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  box-shadow: none;
}

[data-theme="dark"] .tp-mode-chip{
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.05) 100%);
  border-color: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.92);
}

[data-theme="dark"] .tp-mode-chip.is-active{
  background: rgba(37,99,235,0.24);
  border-color: rgba(96,165,250,0.45);
  color: #dbeafe;
}

[data-theme="dark"] .tp-inline-toggle:hover{
  background: linear-gradient(180deg, rgba(37,99,235,0.22) 0%, rgba(255,255,255,0.05) 100%);
  border-color: rgba(37,99,235,0.35);
}

[data-theme="dark"] .tp-inline-toggle input{
  background: rgba(15,23,42,0.55);
  border-color: rgba(148,163,184,0.55);
}

[data-theme="dark"] .tp-inline-toggle__text{
  color: rgba(255,255,255,0.88);
}

[data-theme="dark"] .tp-inline-toggle:has(input:checked){
  border-color: rgba(96,165,250,0.4);
  background: linear-gradient(180deg, rgba(37,99,235,0.24) 0%, rgba(255,255,255,0.05) 100%);
}

[data-theme="dark"] .tp-inline-toggle:has(input:disabled){
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.03) 100%);
}

[data-theme="dark"] .tp-inline-modes-label{
  color: rgba(255,255,255,0.78);
}

[data-theme="dark"] .tp-inline-toggle:hover{
  background: rgba(37,99,235,0.18);
  border-color: rgba(37,99,235,0.35);
}

/* =========================================================
   BB PERF % KPI performance bloc
   ========================================================= */

#bb-perf{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;

  gap: 10px 14px;

  padding: 12px 14px;
  border-radius: var(--radius-sm);

  background: var(--bg-soft);
  border: 1px solid var(--border);

  text-align: center;
}

/* Label */
.bb-perf-label{
  font-weight: 800;
  color: var(--muted);
  font-size: var(--fs-14);
}

/* Résultat principal */
.bb-perf-main{
  font-weight: 950;
  font-size: var(--fs-18);
  color: var(--brand);

  padding: 6px 12px;
  border-radius: 9999px;

  background: var(--brand-soft);
  border: 1px solid rgba(37,99,235,0.22);
}

/* Voids / DNB */
.bb-perf-voids{
  font-weight: 750;
  font-size: var(--fs-14);
  color: var(--muted);

  padding: 4px 10px;
  border-radius: 9999px;

  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.08);
}
/* =========================================================
   Advanced panel
   ========================================================= */

.tp-advanced{
  margin-top: 10px;

  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);

  padding: 14px;

  transition:
    max-height .35s ease,
    opacity .25s ease,
    padding .25s ease;

  overflow: hidden;
  opacity: 1;
}

/* Etat fermé */
.tp-advanced.collapsed{
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;

  opacity: 0;
  pointer-events: none;
}

/* =========================================================
   Advanced rows % label | slider (full) | value pill
   ========================================================= */

.tp-adv-row{
  display: grid;
  grid-template-columns: minmax(0, 170px) minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

/* Label */
.tp-adv-label{
  font-weight: 900;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Slider = colonne centrale, full width */
.tp-adv-row input[type="range"]{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
}

/* Pill valeur */
.tp-adv-row .tp-pill{
  justify-self: end;
  min-width: 68px;
  text-align: center;
}

.tp-threshold-rate{
  justify-self: end;
  min-width: 92px;
  text-align: right;
  font-size: 0.86rem;
}

.tp-threshold-rate .bb-type-volume{
  margin-left: 6px;
  font-size: 0.76rem;
}


/* -------------------------
   Mobile: empilement propre
   label au-dessus, slider full width, pill à droite dessous
------------------------- */
@media (max-width: 980px){
  .tp-adv-row{
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "label label"
      "slider slider"
      "pill rate";
    align-items: center;
    gap: 10px;
  }

  .tp-adv-label{
    grid-area: label;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .tp-adv-row input[type="range"]{
    grid-area: slider;
  }

  .tp-adv-row .tp-pill{
    grid-area: pill;
    justify-self: end;
  }
  .tp-threshold-rate{
    grid-area: rate;
    justify-self: end;
  }
  .tp-h2.tp-h2--spaced{
    width: 100%;
    text-align: center;
  }
}

@media (min-width: 981px){
  .tp-adv-row{
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "label label"
      "slider slider"
      "pill rate";
    align-items: center;
    gap: 10px;
  }

  .tp-adv-label{
    grid-area: label;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .tp-adv-row input[type="range"]{
    grid-area: slider;
  }

  .tp-adv-row .tp-pill{
    grid-area: pill;
    justify-self: end;
  }

  .tp-threshold-rate{
    grid-area: rate;
    justify-self: end;
  }

  .tp-h2.tp-h2--spaced{
    width: 100%;
    text-align: center;
  }
}

/* =========================================================
   Confidence chips
   ========================================================= */

/* LOW -> Rouge */
.tp-chip--conf.conf-low{
  color: #dc2626;
  background: rgba(220,38,38,0.14);
  border-color: rgba(220,38,38,0.30);
}

/* MID -> Jaune */
.tp-chip--conf.conf-mid{
  color: #eab308;
  background: rgba(234,179,8,0.16);
  border-color: rgba(234,179,8,0.34);
}

/* HIGH -> Vert */
.tp-chip--conf.conf-high{
  color: #16a34a;
  background: rgba(22,163,74,0.14);
  border-color: rgba(22,163,74,0.30);
}
[data-theme="dark"] .tp-chip--conf.conf-low{
  background: rgba(220,38,38,0.22);
}

[data-theme="dark"] .tp-chip--conf.conf-mid{
  background: rgba(234,179,8,0.22);
}

[data-theme="dark"] .tp-chip--conf.conf-high{
  background: rgba(22,163,74,0.22);
}

[data-theme="dark"] .tp-elo-pill{
  border-color: rgba(148,163,184,0.35);
  background: rgba(255,255,255,0.06);
  color: #cbd5e1;
}

[data-theme="dark"] .tp-elo-pill--home{
  border-color: rgba(96,165,250,0.45);
  background: rgba(96,165,250,0.18);
  color: #dbeafe;
}

[data-theme="dark"] .tp-elo-pill--away{
  border-color: rgba(56,189,248,0.45);
  background: rgba(56,189,248,0.17);
  color: #d6f6ff;
}

.tp-note{
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(37,99,235,.07);
  border-left: 4px solid var(--primary-color);
  font-size: .95rem;
}

/* Reserve space to prevent CLS when chart is injected */
#bb-type-stats { 
  min-height: 260px; /* ajuste selon la hauteur réelle du module */
}

#bb-type-chart {
  min-height: 180px; /* idem */
}

/* =========================================================
   Lot 3 - Component harmonization (Top Pronostics IA)
   ========================================================= */

.tp-match-card{
  border: 1px solid var(--ui-border-soft, rgba(15,23,42,0.10));
  border-radius: var(--ui-radius-card, 14px);
  box-shadow: var(--ui-shadow-card, 0 8px 20px rgba(15,23,42,0.06));
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.tp-match-card::before{
  background: var(--ui-card-topbar, linear-gradient(90deg, #2563eb 0%, #60a5fa 45%, #93c5fd 100%));
  border-top-left-radius: var(--ui-radius-card, 14px);
  border-top-right-radius: var(--ui-radius-card, 14px);
}

.tp-match-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--ui-shadow-card-hover, 0 14px 30px rgba(15,23,42,0.12));
  border-color: var(--ui-border-strong, rgba(30,64,175,0.22));
}

.tp-match-meta{
  border: 1px solid var(--ui-border-soft, rgba(15,23,42,0.10));
  border-radius: var(--ui-radius-soft, 12px);
  background: #d4e5fa;
  padding: 8px 10px;
}

.tp-team-logo{
  border-radius: var(--ui-radius-soft, 12px);
  border-color: var(--ui-chip-accent-border, rgba(30,64,175,0.16));
}

.tp-elo-pill{
  border-radius: var(--ui-radius-pill, 999px);
}

.tp-chip{
  border-radius: var(--ui-radius-pill, 999px);
  border-color: var(--ui-chip-border, rgba(0,0,0,0.08));
  background: var(--ui-chip-bg, #fff);
  color: var(--ui-chip-text, #334155);
  font-size: 0.86rem;
  padding: 6px 10px;
}

.tp-chip--prob{
  border-color: var(--ui-chip-accent-border, rgba(30,64,175,0.22));
  background: var(--ui-chip-accent-bg, rgba(30,64,175,0.06));
  color: var(--ui-chip-accent-text, #1e3a8a);
}

[data-theme="dark"] .tp-match-meta{
  background: rgba(15,23,42,0.45);
}

/* =========================================================
   Foresportia clean pass (UX density + visual hierarchy)
   ========================================================= */

#tp-results{
  scroll-margin-top: 88px;
}

.tp-hero{
  padding: 34px 0 20px;
  background:
    radial-gradient(950px 300px at 50% -12%, rgba(255,255,255,0.28), transparent 62%),
    linear-gradient(to right, var(--brand), var(--brand-2));
}

.tp-hero-card{
  padding: 18px;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
}

.tp-badge{
  font-size: 0.8rem;
  padding: 6px 10px;
}

.tp-subtitle{
  max-width: 74ch;
  font-size: 0.98rem;
}

.tp-hero-actions{
  margin-top: 12px;
  gap: 10px;
}

.tp-hero-actions .cta-button{
  padding: 9px 14px;
  border-radius: 999px;
  box-shadow: none;
}

.tp-section{
  padding: 26px 0;
}

.tp-section--filters{
  padding-top: 18px;
}

.tp-section--results{
  padding-top: 14px;
}

.tp-panel{
  padding: 14px;
  box-shadow: 0 8px 18px rgba(2,6,23,0.06);
}

.tp-panel-top{
  gap: 10px;
}

.tp-collapsible{
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.tp-collapsible summary{
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: clamp(0.82rem, 0.78rem + 0.28vw, 0.92rem);
  line-height: 1.25;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tp-collapsible summary::-webkit-details-marker{
  display: none;
}

.tp-collapsible summary::after{
  content: "\25BE";
  opacity: 0.8;
}

.tp-collapsible[open] summary::after{
  content: "\25B4";
}

.tp-collapsible .tp-note{
  margin: 0;
  border-left: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 12px;
  font-size: clamp(0.82rem, 0.79rem + 0.25vw, 0.9rem);
  background: rgba(37,99,235,0.05);
}

.tp-collapsible .tp-type-stats{
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: #f8fafc;
  min-height: 0;
}

#bb-type-chart{
  min-height: 0;
}

.tp-filters-head{
  margin-top: 10px;
}

.tp-filters-head .tp-h2{
  font-size: clamp(0.9rem, 0.86rem + 0.32vw, 1rem);
  font-weight: 850;
}

.tp-panel-top .tp-h2{
  font-size: clamp(0.9rem, 0.86rem + 0.25vw, 0.98rem);
  font-weight: 850;
}

.tp-filters-toggle{
  padding: 8px 12px;
  background: rgba(30,64,175,0.08);
  border-color: rgba(30,64,175,0.18);
}

.tp-filters-card{
  border-radius: 14px;
  box-shadow: none;
}

.tp-check{
  padding: 7px 10px;
  background: #f8fafc;
}

.tp-date-row .date-selector{
  padding: 4px 4px 10px;
  gap: 8px;
}

.tp-date-row .date-button{
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border-color: rgba(30,64,175,0.22);
}

#tp-day-summary,
.tp-day-summary{
  margin-top: 10px;
  padding: 12px;
  box-shadow: 0 6px 14px rgba(2,6,23,0.06);
}

.tp-day-metric{
  background: #f8fafc;
}

#bb-grid.tp-grid{
  gap: 14px;
  padding-top: 4px;
}

.tp-match-card{
  box-shadow: 0 6px 14px rgba(2,6,23,0.06);
  border-color: rgba(15,23,42,0.08);
}

.tp-match-card::before{
  height: 4px;
  background: rgba(30,64,175,0.9);
}

.tp-match-card:hover{
  transform: none;
  box-shadow: 0 8px 18px rgba(2,6,23,0.08);
}

.tp-pick-row{
  background: #f8fafc;
  border-color: rgba(15,23,42,0.08);
}

.tp-pick-row--win{
  background: rgba(16,185,129,0.07);
  border-color: rgba(16,185,129,0.2);
}

.tp-pick-row--lose{
  background: rgba(239,68,68,0.07);
  border-color: rgba(239,68,68,0.2);
}

.tp-pick-row--void{
  background: rgba(59,130,246,0.07);
  border-color: rgba(59,130,246,0.2);
}

.tp-chip{
  font-size: 0.82rem;
  padding: 5px 9px;
}

[data-theme="dark"] .tp-collapsible{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}

[data-theme="dark"] .tp-collapsible summary{
  color: rgba(255,255,255,0.92);
}

[data-theme="dark"] .tp-collapsible .tp-note{
  background: rgba(37,99,235,0.14);
  border-top-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .tp-collapsible .tp-type-stats{
  background: rgba(255,255,255,0.04);
  border-top-color: rgba(255,255,255,0.1);
}

@media (max-width: 700px){
  .tp-hero{
    padding: 44px 0 24px;
  }

  .tp-section{
    padding: 18px 0;
  }

  .tp-panel{
    padding: 12px;
  }
}

/* =========================
   Manual ad slot (static reserve)
   Prevent CLS when AdSense injects ad near the fold.
   ========================= */

.fs-manual-ad-section {
  padding: 12px 0 22px;
  background: transparent;
  max-width: 100%;
  overflow-x: clip;
}

.fs-manual-ad-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.fs-manual-ad,
.js-manual-ad {
  width: min(100%, 980px);
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
  padding: 12px 12px 10px;
  min-height: clamp(250px, 33vw, 310px);
}

.fs-manual-ad .adsbygoogle,
.js-manual-ad .adsbygoogle,
.js-manual-ad .adsbygoogle {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  min-height: clamp(220px, 29vw, 280px);
  margin: 0 auto !important;
  overflow: hidden !important;
}

.fs-manual-ad .adsbygoogle > iframe,
.js-manual-ad .adsbygoogle > iframe {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 auto !important;
}

.fs-manual-ad-label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.user-no-ads .fs-manual-ad-section {
  display: none !important;
}

.js-manual-ad[data-ad-state="pending"],
.js-manual-ad[data-ad-state="empty"] {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.82));
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: none;
}

.js-manual-ad[data-ad-state="empty"][data-ad-behavior="reserve"] {
  border-style: dashed;
}

.js-manual-ad[data-ad-state="pending"] [data-fs-ad-label="1"],
.js-manual-ad[data-ad-state="empty"] [data-fs-ad-label="1"] {
  opacity: 0;
  margin: 0;
  height: 0;
  overflow: hidden;
}

[data-theme="dark"] .fs-manual-ad,
[data-theme="dark"] .js-manual-ad {
  background: #1f2937;
  border-color: #374151;
  box-shadow: none;
}

[data-theme="dark"] .js-manual-ad[data-ad-state="pending"],
[data-theme="dark"] .js-manual-ad[data-ad-state="empty"] {
  background: rgba(15, 23, 42, 0.62);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: none;
}

[data-theme="dark"] .fs-manual-ad-label {
  color: #94a3b8;
}

@media (max-width: 560px) {
  .fs-manual-ad-shell {
    padding: 0 14px;
  }
}

@media (max-width: 768px) {
  .fs-manual-ad .adsbygoogle,
  .js-manual-ad .adsbygoogle {
    min-height: 348px;
  }
}

@media (max-width: 360px) {
  .fs-manual-ad-shell {
    padding: 0 8px;
  }

  .fs-manual-ad,
  .js-manual-ad {
    padding: 6px 0 4px;
    min-height: 348px;
  }

  .fs-manual-ad .adsbygoogle,
  .js-manual-ad .adsbygoogle {
    min-height: 348px;
  }

  .fs-manual-ad-label {
    padding: 0 2px;
  }
}

/* Display mode selector */
.tp-mode-field{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(30,64,175,0.16);
  background: rgba(30,64,175,0.05);
}

.tp-mode-hint{
  margin: 8px 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.4;
}

[data-theme="dark"] .tp-mode-field{
  background: rgba(37,99,235,0.18);
  border-color: rgba(96,165,250,0.35);
}

[data-theme="dark"] .tp-mode-hint{
  color: rgba(255,255,255,0.82);
}

/* =========================================================
   Filters clarity pass
   ========================================================= */
.tp-filters-grid{
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}

.tp-filters-grid > .tp-field{
  grid-column: span 4;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: #f8fafc;
}

.tp-field--full{
  grid-column: 1 / -1;
}

.tp-field--caption{
  padding: 0;
  border: 0;
  background: transparent;
}

.tp-filters-caption{
  margin: 0;
  font-weight: 900;
  font-size: 0.84rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--brand);
}

.tp-filters-caption--small{
  margin-bottom: 8px;
}

.tp-field--advanced .tp-btn{
  width: 100%;
  justify-content: space-between;
}

.tp-field--display-controls{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tp-inline-control{
  min-width: 0;
}

.tp-field--markets .tp-checks{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.tp-field--markets .tp-check{
  width: 100%;
  height: 100%;
  align-items: flex-start;
}

.tp-field--markets .tp-check--strong{
  grid-column: 1 / -1;
}

.tp-field--markets .tp-actions{
  grid-column: 1 / -1;
  margin: 4px 0 0;
  justify-content: flex-end;
}

.tp-field--markets .tp-actions .tp-btn{
  min-width: 190px;
}

@media (max-width: 980px){
  .tp-filters-grid{
    grid-template-columns: 1fr;
  }

  .tp-filters-grid > .tp-field{
    grid-column: 1 / -1;
    padding: 10px;
  }

  .tp-field--display-controls{
    grid-template-columns: 1fr;
  }

  .tp-filters-caption{
    font-size: 0.8rem;
  }

  .tp-field--markets .tp-checks{
    grid-template-columns: 1fr;
  }

  .tp-field--markets .tp-actions .tp-btn{
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 820px){
  .tp-field--markets .tp-checks{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px){
  .tp-filters-grid{
    grid-template-columns: 1fr;
  }

  .tp-filters-grid > .tp-field{
    grid-column: 1 / -1;
    padding: 10px;
  }

  .tp-field--display-controls{
    grid-template-columns: 1fr;
  }

  .tp-filters-caption{
    font-size: 0.8rem;
  }

  .tp-field--markets .tp-actions .tp-btn{
    min-width: 0;
    width: 100%;
  }
}

[data-theme="dark"] .tp-filters-grid > .tp-field{
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.10);
}

[data-theme="dark"] .tp-field--caption{
  background: transparent;
  border: 0;
}

[data-theme="dark"] .tp-filters-caption{
  color: #93c5fd;
}

/* Desktop fix: stable heading/toggle layout in filters header */
@media (min-width: 981px){
  .tp-filters-grid{
    grid-template-columns: 1fr;
  }

  .tp-filters-grid > .tp-field{
    grid-column: 1 / -1;
    padding: 10px;
  }

  .tp-field--display-controls{
    grid-template-columns: 1fr;
  }

  .tp-field--markets .tp-actions .tp-btn{
    min-width: 0;
    width: 100%;
  }

  .tp-filters-head{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
    row-gap: 8px;
  }

  .tp-filters-head .tp-h2{
    margin: 0;
    min-width: 0;
    line-height: 1.25;
  }

  .tp-filters-toggle{
    justify-self: end;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* === Mobile-first fluid typography + compact header (360px safe) === */
:root {
  --fs-base: clamp(0.9375rem, 0.915rem + 0.1vw, 1rem);
  --fs-h1: clamp(1.75rem, 1.45rem + 1.25vw, 2.25rem);
  --fs-h2: clamp(1.35rem, 1.2rem + 0.8vw, 1.5rem);
  --fs-h3: clamp(1.125rem, 1.03rem + 0.55vw, 1.25rem);
  --fs-p: clamp(0.9375rem, 0.91rem + 0.22vw, 1rem);
  --fs-meta: clamp(0.78rem, 0.75rem + 0.18vw, 0.9rem);
  --fs-nav: clamp(0.86rem, 0.82rem + 0.2vw, 0.95rem);
  --fs-footer-title: clamp(0.82rem, 0.78rem + 0.2vw, 0.95rem);
  --fs-footer-link: clamp(0.82rem, 0.78rem + 0.2vw, 0.9rem);
  --fs-hero-lead: clamp(1rem, 0.96rem + 0.4vw, 1.2rem);
  --fs-hero-cta: clamp(0.92rem, 0.88rem + 0.26vw, 1rem);

  --pad-x: clamp(12px, 2.2vw, 20px);
  --pad-y: clamp(8px, 1.1vw, 15px);

  --header-h: clamp(56px, 8vw, 72px);
  --header-gap: clamp(6px, 1.6vw, 12px);
  --header-logo-size: clamp(32px, 7.2vw, 40px);
  --header-logo-fs: clamp(1rem, 0.9rem + 0.65vw, 1.5rem);
  --header-cta-fs: clamp(0.8rem, 0.76rem + 0.28vw, 0.95rem);
  --header-cta-py: clamp(4px, 0.8vw, 8px);
  --header-cta-px: clamp(10px, 2.3vw, 18px);
  --header-burger-icon: clamp(20px, 4.5vw, 24px);
  --header-burger-label: clamp(0.75rem, 0.72rem + 0.16vw, 0.875rem);
}

body {
  font-size: var(--fs-base);
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

p {
  font-size: var(--fs-p);
}

li {
  font-size: var(--fs-p);
}

.section-title {
  font-size: clamp(1.5rem, 1.25rem + 1.15vw, 2rem);
}

.hero h1 {
  font-size: clamp(1.85rem, 1.4rem + 2vw, 2.5rem);
}

.hero p {
  font-size: var(--fs-hero-lead);
}

.cta-button,
.link-button {
  font-size: var(--fs-hero-cta);
}

.stats-number {
  font-size: clamp(2rem, 1.55rem + 2.1vw, 3rem);
}

.stats-description {
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.125rem);
}

.nav-section-title {
  font-size: var(--fs-footer-title);
}

.main-nav a {
  font-size: var(--fs-nav);
}

.footer-description {
  font-size: clamp(0.88rem, 0.84rem + 0.22vw, 0.95rem);
}

.footer-responsible {
  font-size: var(--fs-meta);
}

.footer-column-title {
  font-size: var(--fs-footer-title);
}

.footer-right a {
  font-size: var(--fs-footer-link);
}

.footer-bottom {
  font-size: clamp(0.78rem, 0.74rem + 0.2vw, 0.85rem);
}

.main-header,
.header-container,
.main-nav {
  max-width: 100%;
}

.header-container {
  padding: var(--pad-y) var(--pad-x);
  min-height: var(--header-h);
  flex-wrap: nowrap;
  gap: var(--header-gap);
}

.header-container > * {
  min-width: 0;
}

.logo-link {
  flex: 1 1 auto;
  min-width: 0;
  gap: clamp(6px, 1.4vw, 10px);
}

.logo-img {
  width: var(--header-logo-size);
  height: var(--header-logo-size);
  flex: 0 0 auto;
}

.logo-title {
  font-size: var(--header-logo-fs);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-direct-link {
  margin-left: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: var(--header-cta-py) var(--header-cta-px);
  font-size: var(--header-cta-fs);
}

#burger-toggle {
  margin-left: 0;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  gap: 4px;
  justify-content: center;
  font-size: var(--header-burger-icon);
}

.burger-icon {
  font-size: var(--header-burger-icon);
}

.burger-label {
  font-size: var(--header-burger-label);
  line-height: 1;
  transform: none;
}

.main-nav {
  top: var(--header-h);
  max-width: min(90vw, 360px);
  min-width: min(300px, 90vw);
}

.main-nav,
.nav-section,
.main-nav a {
  min-width: 0;
}

.main-nav a {
  overflow-wrap: anywhere;
}

#overlay {
  top: var(--header-h);
}

body.header-sticky {
  padding-top: var(--header-h);
}

#header {
  min-height: var(--header-h);
}

@media (max-width: 360px) {
  .header-container {
    gap: 6px;
  }

  .header-direct-link {
    min-height: 36px;
    padding-block: 4px;
    padding-inline: 14px;
    border-radius: 12px;
    line-height: 1;
  }

  .burger-label {
    display: none;
  }

  #burger-toggle {
    width: 44px;
  }
}

@media (max-width: 360px) {
  .header-container {
    padding-inline: 10px;
  }

  .header-direct-link {
    min-height: 34px;
    padding-inline: 12px;
    border-radius: 10px;
  }

  .logo-link {
    gap: 6px;
  }

  .logo-title {
    font-size: 1rem;
  }
}

/* =========================================================
   Match context: home/away + team form
   ========================================================= */
.tp-team-side{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.12);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.tp-team-side--home{
  color: #1d4ed8;
  border-color: rgba(37,99,235,0.28);
  background: rgba(37,99,235,0.10);
}

.tp-team-side--away{
  color: #0f766e;
  border-color: rgba(15,118,110,0.28);
  background: rgba(45,212,191,0.14);
}

.tp-team-rank{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.74rem;
  font-weight: 820;
  line-height: 1.2;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(15,23,42,0.05);
  color: #475569;
}

.tp-team-form{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1.2;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(15,23,42,0.05);
  color: #475569;
}

.tp-team-form.team-form--veryGood{
  color: #166534;
  border-color: rgba(22,101,52,0.25);
  background: rgba(22,163,74,0.11);
}

.tp-team-form.team-form--good{
  color: #15803d;
  border-color: rgba(21,128,61,0.22);
  background: rgba(34,197,94,0.10);
}

.tp-team-form.team-form--neutral{
  color: #a16207;
  border-color: rgba(161,98,7,0.22);
  background: rgba(250,204,21,0.13);
}

.tp-team-form.team-form--poor{
  color: #b45309;
  border-color: rgba(180,83,9,0.22);
  background: rgba(251,146,60,0.12);
}

.tp-team-form.team-form--veryPoor{
  color: #b91c1c;
  border-color: rgba(185,28,28,0.20);
  background: rgba(239,68,68,0.12);
}

.tp-team-form--na{
  color: #64748b;
}

.tp-team .tp-elo-row{
  margin: 0;
}

.tp-team .tp-elo-pill{
  min-width: 0;
  width: auto;
}

@media (min-width: 380px) and (max-width: 768px){
  .tp-team-confrontation{
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
  }

  .tp-vs{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid rgba(30,64,175,0.22);
    background: rgba(30,64,175,0.08);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
  }

  .tp-team{
    align-items: center;
    text-align: center;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .tp-team-logo{
    width: 44px;
    height: 44px;
  }

  .tp-team-name{
    max-width: 100%;
    white-space: normal;
  }

  .tp-team .tp-elo-row{
    justify-content: center;
  }
}

@media (max-width: 379px){
  .tp-team-confrontation{
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tp-vs{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid rgba(30,64,175,0.22);
    background: rgba(30,64,175,0.08);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
  }

  .tp-team{
    align-items: center;
    text-align: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15,23,42,0.10);
  }

  .tp-team-logo{
    width: 44px;
    height: 44px;
  }

  .tp-team-name{
    max-width: 100%;
    white-space: normal;
  }

  .tp-team .tp-elo-row{
    justify-content: center;
  }
}

[data-theme="dark"] .tp-team-side--home{
  color: #bfdbfe;
  border-color: rgba(96,165,250,0.42);
  background: rgba(59,130,246,0.24);
}

[data-theme="dark"] .tp-team-side--away{
  color: #99f6e4;
  border-color: rgba(45,212,191,0.42);
  background: rgba(20,184,166,0.22);
}

[data-theme="dark"] .tp-team-rank{
  color: #cbd5e1;
  border-color: rgba(148,163,184,0.34);
  background: rgba(255,255,255,0.06);
}

[data-theme="dark"] .tp-team-form{
  border-color: rgba(148,163,184,0.34);
  background: rgba(255,255,255,0.06);
  color: #cbd5e1;
}

[data-theme="dark"] .tp-team-form--na{
  color: #94a3b8;
}

@media (max-width: 768px){
  [data-theme="dark"] .tp-team{
    border-color: rgba(148,163,184,0.26);
    background: rgba(15,23,42,0.48);
  }

  [data-theme="dark"] .tp-vs{
    border-color: rgba(96,165,250,0.42);
    background: rgba(59,130,246,0.18);
    color: #cbd5e1;
  }
}

/* =========================================================
   Fluid typography hardening (top-pronostics-ia)
   ========================================================= */
.tp-main{
  --tp-fluid-body: clamp(0.86rem, 0.82rem + 0.28vw, 1rem);
  --tp-fluid-small: clamp(0.72rem, 0.69rem + 0.20vw, 0.84rem);
  --tp-fluid-meta: clamp(0.8rem, 0.76rem + 0.25vw, 0.94rem);
  --tp-fluid-chip: clamp(0.76rem, 0.72rem + 0.24vw, 0.9rem);
  --tp-fluid-pick: clamp(0.92rem, 0.88rem + 0.35vw, 1.06rem);
  --tp-fluid-h2: clamp(0.94rem, 0.88rem + 0.45vw, 1.2rem);
  --tp-fluid-h1: clamp(1.45rem, 1.08rem + 1.1vw, 2.2rem);
}

.tp-main,
.tp-main p,
.tp-main li,
.tp-main label,
.tp-main input,
.tp-main select,
.tp-main button,
.tp-main textarea,
.tp-main .tp-muted,
.tp-main .tp-note{
  font-size: var(--tp-fluid-body);
}

.tp-main .tp-hero h1{
  font-size: var(--tp-fluid-h1);
}

.tp-main .tp-h2,
.tp-main .tp-filters-head .tp-h2,
.tp-main .tp-panel-top .tp-h2{
  font-size: var(--tp-fluid-h2);
}

.tp-main .tp-kickoff,
.tp-main .tp-team-name,
.tp-main .tp-pill,
.tp-main .tp-perf-label,
.tp-main .tp-perf-main{
  font-size: var(--tp-fluid-meta);
}

.tp-main .tp-pick-label{
  font-size: var(--tp-fluid-pick);
}

.tp-main .tp-chip,
.tp-main .tp-elo-pill,
.tp-main .tp-team-form,
.tp-main .tp-team-rank{
  font-size: var(--tp-fluid-chip);
}

.tp-main .tp-badge,
.tp-main .tp-team-side,
.tp-main .tp-pick-sub,
.tp-main .tp-inline-ad-label{
  font-size: var(--tp-fluid-small);
}

/* Team context micro text (requested smaller sizing) */
.tp-main .tp-team .tp-elo-pill,
.tp-main .tp-team .tp-team-form,
.tp-main .tp-team .tp-team-rank{
  font-size: clamp(0.5rem, 0.48rem + 0.14vw, 0.55rem);
  line-height: 1.15;
}

/* Hero links overflow guard */
.tp-hero-links{
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.tp-hero-actions{
  flex-wrap: wrap;
}

.tp-hero-actions .cta-button{
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Pending picks: no tinted background */
.tp-pick-row.tp-pick-row--pending{
  background: transparent;
}

/* =========================================================
   Match reading compact + details drawer (Top Pronostics IA)
   ========================================================= */
.tp-expert-wrap{
  display:flex;
  align-items:center;
  justify-content: center
}

.tp-expert-toggle{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding:.35rem .65rem;
  border:1px solid rgba(30,64,175,.24);
  border-radius:999px;
  background:rgba(30,64,175,.06);
  color:var(--text, #0f172a);
  font-weight:700;
  white-space:nowrap;
}

.tp-expert-toggle input{
  inline-size:1rem;
  block-size:1rem;
  margin:0;
}

.tp-reading-compact{
  margin-top:.55rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.55rem;
  flex-wrap:wrap;
}

.tp-reading-compact__badges{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.45rem;
  min-width:0;
}

.tp-reading-mini-badge{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.2rem .5rem;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.14);
  background:rgba(15,23,42,.04);
}

.tp-reading-mini-badge__k{
  font-size:.72rem;
  font-weight:700;
  color:var(--muted, #475569);
}

.tp-reading-mini-badge__v{
  font-size:.74rem;
  line-height:1;
}

.tp-reading-mini-badge--positive{
  border-color:rgba(22,163,74,.35);
  background:rgba(34,197,94,.14);
  color:#166534;
}

.tp-reading-mini-badge--warn{
  border-color:rgba(217,119,6,.35);
  background:rgba(245,158,11,.15);
  color:#92400e;
}

.tp-reading-mini-badge--risk{
  border-color:rgba(220,38,38,.32);
  background:rgba(239,68,68,.14);
  color:#b91c1c;
}

.tp-reading-mini-badge--neutral{
  border-color:rgba(37,99,235,.32);
  background:rgba(59,130,246,.12);
  color:#1e3a8a;
}

.tp-reading-toggle{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  border:1px solid rgba(30,64,175,.3);
  border-radius:999px;
  padding:.2rem .55rem;
  background:rgba(255,255,255,.85);
  color:#1e40af;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}

.tp-reading-toggle__caret{
  transition:transform .2s ease;
  display:inline-block;
}

.tp-reading-toggle[aria-expanded="true"] .tp-reading-toggle__caret{
  transform:rotate(180deg);
}

.tp-reading-details{
  margin-top:.5rem;
  border:1px solid rgba(15,23,42,.1);
  border-radius:10px;
  background:rgba(248,250,252,.8);
  padding:.5rem .6rem;
}

.tp-reading-details__section + .tp-reading-details__section{
  margin-top:.45rem;
  padding-top:.45rem;
  border-top:1px dashed rgba(15,23,42,.14);
}

.tp-reading-details__title{
  margin:0 0 .25rem;
  font-size:.78rem;
  font-weight:800;
  color:#0f172a;
}

.tp-reading-details__line{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem .75rem;
  font-size:.76rem;
  color:#1f2937;
}

.tp-reading-details__hint{
  margin:.32rem 0 0;
  font-size:.72rem;
  color:#475569;
}

@media (max-width:768px){
  .tp-expert-wrap{
    width:100%;
    justify-content: center
  }

  .tp-reading-compact{
    align-items:flex-start;
  }

  .tp-reading-toggle{
    margin-left:auto;
  }
}

[data-theme="dark"] .tp-expert-toggle{
  border-color:rgba(96,165,250,.4);
  background:rgba(59,130,246,.15);
  color:#dbeafe;
}

[data-theme="dark"] .tp-reading-mini-badge{
  border-color:rgba(148,163,184,.35);
  background:rgba(30,41,59,.55);
}

[data-theme="dark"] .tp-reading-mini-badge__k{
  color:#cbd5e1;
}

[data-theme="dark"] .tp-reading-mini-badge--positive{
  border-color:rgba(74,222,128,.35);
  background:rgba(22,163,74,.2);
  color:#bbf7d0;
}

[data-theme="dark"] .tp-reading-mini-badge--warn{
  border-color:rgba(251,191,36,.35);
  background:rgba(217,119,6,.25);
  color:#fde68a;
}

[data-theme="dark"] .tp-reading-mini-badge--risk{
  border-color:rgba(248,113,113,.35);
  background:rgba(185,28,28,.26);
  color:#fecaca;
}

[data-theme="dark"] .tp-reading-mini-badge--neutral{
  border-color:rgba(96,165,250,.35);
  background:rgba(30,64,175,.28);
  color:#bfdbfe;
}

[data-theme="dark"] .tp-reading-toggle{
  border-color:rgba(96,165,250,.45);
  background:rgba(30,41,59,.85);
  color:#bfdbfe;
}

[data-theme="dark"] .tp-reading-details{
  border-color:rgba(148,163,184,.26);
  background:rgba(15,23,42,.7);
}

[data-theme="dark"] .tp-reading-details__section + .tp-reading-details__section{
  border-top-color:rgba(148,163,184,.26);
}

[data-theme="dark"] .tp-reading-details__title{
  color:#e2e8f0;
}

[data-theme="dark"] .tp-reading-details__line{
  color:#cbd5e1;
}

[data-theme="dark"] .tp-reading-details__hint{
  color:#94a3b8;
}

/* =========================================================
   TP reading details readability upgrade (desktop + mobile)
   ========================================================= */
.tp-reading-details{
  font-size:clamp(.74rem, .70rem + .22vw, .84rem);
  line-height:1.35;
}

.tp-reading-details__title{
  font-size:clamp(.77rem, .72rem + .22vw, .9rem);
  letter-spacing:.01em;
  text-transform:uppercase;
}

.tp-reading-details__line{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
  gap:.38rem .5rem;
}

.tp-reading-stat{
  display:inline-flex;
  align-items:center;
  min-height:1.85rem;
  padding:.26rem .52rem;
  border-radius:8px;
  border:1px solid rgba(15,23,42,.12);
  background:rgba(255,255,255,.72);
  color:#0f172a;
  font-size:clamp(.7rem, .67rem + .2vw, .8rem);
  font-weight:600;
}

.tp-reading-stat--outcome{
  font-weight:700;
}

.tp-reading-stat--emphasis{
  border-color:rgba(30,64,175,.32);
  background:rgba(59,130,246,.14);
  color:#1e3a8a;
  font-weight:800;
}

.tp-reading-stat--home.is-top,
.tp-reading-stat--outcome.tp-reading-stat--home.is-top{
  border-color:rgba(22,163,74,.45);
  background:rgba(34,197,94,.15);
  color:#166534;
}

.tp-reading-stat--away.is-top,
.tp-reading-stat--outcome.tp-reading-stat--away.is-top{
  border-color:rgba(14,116,144,.42);
  background:rgba(14,165,233,.14);
  color:#075985;
}

.tp-reading-stat--outcome.tp-reading-stat--draw.is-top{
  border-color:rgba(217,119,6,.42);
  background:rgba(245,158,11,.16);
  color:#92400e;
}

.tp-reading-details__duel{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.5rem;
}

.tp-reading-team-row{
  display:flex;
  flex-direction:column;
  gap:.2rem;
  border:1px solid rgba(15,23,42,.12);
  border-radius:8px;
  background:rgba(255,255,255,.7);
  padding:.4rem .48rem;
  min-width:0;
}

.tp-reading-team-row__side{
  font-size:clamp(.69rem, .66rem + .16vw, .76rem);
  font-weight:800;
  letter-spacing:.01em;
}

.tp-reading-team-row__text{
  font-size:clamp(.66rem, .64rem + .15vw, .74rem);
  color:#334155;
  overflow-wrap:anywhere;
}

.tp-reading-team-row--home .tp-reading-team-row__side{
  color:#166534;
}

.tp-reading-team-row--away .tp-reading-team-row__side{
  color:#075985;
}

.tp-reading-team-row.is-top{
  border-color:rgba(30,64,175,.42);
  background:rgba(59,130,246,.1);
  box-shadow:inset 0 0 0 1px rgba(59,130,246,.16);
}

@media (max-width:768px){
  .tp-reading-details{
    padding:.44rem .46rem;
  }

  .tp-reading-details__line{
    grid-template-columns:1fr 1fr;
  }

  .tp-reading-details__duel{
    grid-template-columns:1fr;
    gap:.38rem;
  }

  .tp-reading-team-row__text{
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
  }
}

@media (max-width:480px){
  .tp-reading-details__line{
    grid-template-columns:1fr;
  }

  .tp-reading-stat{
    min-height:1.7rem;
    padding:.24rem .44rem;
  }
}

[data-theme="dark"] .tp-reading-stat{
  border-color:rgba(148,163,184,.28);
  background:rgba(15,23,42,.62);
  color:#dbeafe;
}

[data-theme="dark"] .tp-reading-stat--emphasis{
  border-color:rgba(96,165,250,.48);
  background:rgba(30,64,175,.34);
  color:#bfdbfe;
}

[data-theme="dark"] .tp-reading-stat--home.is-top,
[data-theme="dark"] .tp-reading-stat--outcome.tp-reading-stat--home.is-top{
  border-color:rgba(74,222,128,.45);
  background:rgba(22,163,74,.24);
  color:#bbf7d0;
}

[data-theme="dark"] .tp-reading-stat--away.is-top,
[data-theme="dark"] .tp-reading-stat--outcome.tp-reading-stat--away.is-top{
  border-color:rgba(56,189,248,.45);
  background:rgba(14,116,144,.26);
  color:#bae6fd;
}

[data-theme="dark"] .tp-reading-stat--outcome.tp-reading-stat--draw.is-top{
  border-color:rgba(251,191,36,.42);
  background:rgba(180,83,9,.3);
  color:#fde68a;
}

[data-theme="dark"] .tp-reading-team-row{
  border-color:rgba(148,163,184,.28);
  background:rgba(15,23,42,.58);
}

[data-theme="dark"] .tp-reading-team-row__text{
  color:#cbd5e1;
}

[data-theme="dark"] .tp-reading-team-row--home .tp-reading-team-row__side{
  color:#86efac;
}

[data-theme="dark"] .tp-reading-team-row--away .tp-reading-team-row__side{
  color:#7dd3fc;
}

[data-theme="dark"] .tp-reading-team-row.is-top{
  border-color:rgba(96,165,250,.46);
  background:rgba(30,64,175,.3);
  box-shadow:inset 0 0 0 1px rgba(96,165,250,.22);
}

/* =========================================================
   TP reading details visual refresh (clarity + mobile)
   ========================================================= */
.tp-reading-details{
  --tp-reading-bg: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(248,250,252,.92) 100%);
  --tp-reading-card: rgba(255,255,255,.8);
  --tp-reading-border: rgba(30,64,175,.18);
  --tp-reading-shadow: 0 10px 24px rgba(15,23,42,.08);
  margin-top: .62rem;
  padding: .72rem;
  border: 1px solid var(--tp-reading-border);
  border-radius: 14px;
  background: var(--tp-reading-bg);
  box-shadow: var(--tp-reading-shadow);
  display: grid;
  gap: .52rem;
  font-size: clamp(.74rem, .70rem + .22vw, .84rem);
  line-height: 1.35;
}

.tp-reading-details[hidden]{
  display: none !important;
}

.tp-reading-details__section{
  position: relative;
  padding: .54rem .58rem .58rem;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 12px;
  background: var(--tp-reading-card);
  overflow: hidden;
}

.tp-reading-details__section::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.tp-reading-details__section:nth-child(2)::before{
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
}

.tp-reading-details__section:nth-child(3)::before{
  background: linear-gradient(180deg, #22d3ee 0%, #0e7490 100%);
}

.tp-reading-details__section:nth-child(4)::before{
  background: linear-gradient(180deg, #4ade80 0%, #15803d 100%);
}

.tp-reading-details__section:nth-child(5)::before{
  background: linear-gradient(180deg, #38bdf8 0%, #0369a1 100%);
}

.tp-reading-details__section + .tp-reading-details__section{
  margin-top: 0;
  padding-top: .54rem;
  border-top: 1px solid rgba(148,163,184,.24);
}

.tp-reading-details__title{
  margin: 0 0 .36rem;
  padding-left: .5rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: clamp(.77rem, .72rem + .22vw, .9rem);
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: #0f172a;
}

.tp-reading-details__title::before{
  content: "";
  width: .46rem;
  height: .46rem;
  border-radius: 999px;
  background: currentColor;
  opacity: .34;
  flex: 0 0 auto;
}

.tp-reading-details__line{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: .42rem .5rem;
}

.tp-reading-stat{
  display: flex;
  align-items: center;
  min-height: 2rem;
  padding: .34rem .56rem;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.26);
  background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(241,245,249,.84) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86);
  color: #0f172a;
  font-size: clamp(.7rem, .67rem + .2vw, .8rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.tp-reading-stat--outcome{
  justify-content: center;
  font-size: clamp(.72rem, .68rem + .2vw, .84rem);
  font-weight: 800;
}

.tp-reading-stat--emphasis{
  border-color: rgba(30,64,175,.34);
  background: linear-gradient(180deg, rgba(59,130,246,.2) 0%, rgba(37,99,235,.12) 100%);
  color: #1e3a8a;
  font-weight: 900;
}

.tp-reading-stat--home.is-top,
.tp-reading-stat--outcome.tp-reading-stat--home.is-top{
  border-color: rgba(22,163,74,.42);
  background: linear-gradient(180deg, rgba(34,197,94,.2) 0%, rgba(22,163,74,.12) 100%);
  color: #166534;
}

.tp-reading-stat--away.is-top,
.tp-reading-stat--outcome.tp-reading-stat--away.is-top{
  border-color: rgba(14,116,144,.42);
  background: linear-gradient(180deg, rgba(14,165,233,.2) 0%, rgba(14,116,144,.12) 100%);
  color: #075985;
}

.tp-reading-stat--outcome.tp-reading-stat--draw.is-top{
  border-color: rgba(217,119,6,.42);
  background: linear-gradient(180deg, rgba(245,158,11,.24) 0%, rgba(217,119,6,.13) 100%);
  color: #92400e;
}

.tp-reading-details__duel{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}

.tp-reading-team-row{
  display: flex;
  flex-direction: column;
  gap: .26rem;
  min-width: 0;
  padding: .5rem .56rem;
  border-radius: 11px;
  border: 1px solid rgba(148,163,184,.28);
  background: linear-gradient(180deg, rgba(255,255,255,.88) 0%, rgba(241,245,249,.78) 100%);
}

.tp-reading-team-row__side{
  font-size: clamp(.69rem, .66rem + .16vw, .76rem);
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tp-reading-team-row__text{
  font-size: clamp(.67rem, .64rem + .15vw, .75rem);
  color: #334155;
  line-height: 1.36;
  overflow-wrap: anywhere;
}

.tp-reading-team-row--home .tp-reading-team-row__side{
  color: #166534;
}

.tp-reading-team-row--away .tp-reading-team-row__side{
  color: #075985;
}

.tp-reading-team-row.is-top{
  border-color: rgba(37,99,235,.42);
  background: linear-gradient(180deg, rgba(59,130,246,.18) 0%, rgba(37,99,235,.08) 100%);
  box-shadow: inset 0 0 0 1px rgba(59,130,246,.2);
}

@media (max-width: 768px){
  .tp-reading-details{
    padding: .56rem;
    border-radius: 12px;
  }

  .tp-reading-details__section{
    padding: .48rem .5rem .5rem;
    border-radius: 10px;
  }

  .tp-reading-details__line{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .36rem .42rem;
  }

  .tp-reading-stat{
    min-height: 1.86rem;
    padding: .3rem .48rem;
  }

  .tp-reading-details__duel{
    grid-template-columns: 1fr;
    gap: .4rem;
  }

  .tp-reading-team-row__text{
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
    overflow: visible;
  }
}

@media (max-width: 520px){
  .tp-reading-details__line{
    grid-template-columns: 1fr;
  }

  .tp-reading-stat{
    min-height: 1.82rem;
    padding: .3rem .46rem;
  }
}

[data-theme="dark"] .tp-reading-details{
  --tp-reading-bg: linear-gradient(180deg, rgba(15,23,42,.82) 0%, rgba(2,6,23,.78) 100%);
  --tp-reading-card: rgba(15,23,42,.66);
  --tp-reading-border: rgba(96,165,250,.34);
  --tp-reading-shadow: 0 12px 26px rgba(2,6,23,.42);
}

[data-theme="dark"] .tp-reading-details__section{
  border-color: rgba(148,163,184,.28);
}

[data-theme="dark"] .tp-reading-details__section + .tp-reading-details__section{
  border-top-color: rgba(148,163,184,.28);
}

[data-theme="dark"] .tp-reading-details__title{
  color: #e2e8f0;
}

[data-theme="dark"] .tp-reading-stat{
  border-color: rgba(148,163,184,.28);
  background: linear-gradient(180deg, rgba(15,23,42,.72) 0%, rgba(2,6,23,.62) 100%);
  box-shadow: inset 0 1px 0 rgba(148,163,184,.14);
  color: #dbeafe;
}

[data-theme="dark"] .tp-reading-stat--emphasis{
  border-color: rgba(96,165,250,.5);
  background: linear-gradient(180deg, rgba(30,64,175,.44) 0%, rgba(30,64,175,.28) 100%);
  color: #bfdbfe;
}

[data-theme="dark"] .tp-reading-stat--home.is-top,
[data-theme="dark"] .tp-reading-stat--outcome.tp-reading-stat--home.is-top{
  border-color: rgba(74,222,128,.46);
  background: linear-gradient(180deg, rgba(22,163,74,.35) 0%, rgba(22,101,52,.28) 100%);
  color: #bbf7d0;
}

[data-theme="dark"] .tp-reading-stat--away.is-top,
[data-theme="dark"] .tp-reading-stat--outcome.tp-reading-stat--away.is-top{
  border-color: rgba(56,189,248,.46);
  background: linear-gradient(180deg, rgba(14,116,144,.38) 0%, rgba(12,74,110,.28) 100%);
  color: #bae6fd;
}

[data-theme="dark"] .tp-reading-stat--outcome.tp-reading-stat--draw.is-top{
  border-color: rgba(251,191,36,.44);
  background: linear-gradient(180deg, rgba(180,83,9,.4) 0%, rgba(146,64,14,.3) 100%);
  color: #fde68a;
}

[data-theme="dark"] .tp-reading-team-row{
  border-color: rgba(148,163,184,.28);
  background: linear-gradient(180deg, rgba(15,23,42,.68) 0%, rgba(2,6,23,.58) 100%);
}

[data-theme="dark"] .tp-reading-team-row__text{
  color: #cbd5e1;
}

[data-theme="dark"] .tp-reading-team-row--home .tp-reading-team-row__side{
  color: #86efac;
}

[data-theme="dark"] .tp-reading-team-row--away .tp-reading-team-row__side{
  color: #7dd3fc;
}

[data-theme="dark"] .tp-reading-team-row.is-top{
  border-color: rgba(96,165,250,.48);
  background: linear-gradient(180deg, rgba(30,64,175,.38) 0%, rgba(30,58,138,.28) 100%);
  box-shadow: inset 0 0 0 1px rgba(96,165,250,.22);
}

/* =========================================================
   TP reading details data-viz layer
   ========================================================= */
.tp-reading-details__line--volumes{
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.tp-reading-stat{
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "meta num"
    "meter meter";
  gap: .24rem .45rem;
  align-items: center;
  min-width: 0;
  min-height: 2.2rem;
  padding: .4rem .56rem .42rem;
}

.tp-reading-stat::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 95% at 0% 0%, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 65%);
  pointer-events: none;
}

.tp-reading-stat__meta{
  grid-area: meta;
  min-width: 0;
  font-size: .62rem;
  line-height: 1.2;
  letter-spacing: .045em;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted, #475569);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-reading-stat__num{
  grid-area: num;
  justify-self: end;
  min-width: 0;
  font-size: .88rem;
  font-weight: 900;
  line-height: 1;
}

.tp-reading-stat__meter{
  grid-area: meter;
  height: 6px;
  border-radius: 999px;
  background: rgba(148,163,184,.32);
  overflow: hidden;
}

.tp-reading-stat__fill{
  display: block;
  height: 100%;
  width: var(--tp-stat-pct, 0%);
  border-radius: inherit;
  background: currentColor;
  opacity: .34;
}

.tp-reading-stat.no-meter .tp-reading-stat__meter{
  display: none;
}

.tp-reading-stat--outcome{
  min-height: 2.45rem;
}

.tp-reading-stat--outcome .tp-reading-stat__meta{
  font-size: .68rem;
  text-align: left;
}

.tp-reading-stat--outcome .tp-reading-stat__num{
  font-size: 1.04rem;
}

.tp-reading-stat--emphasis{
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,.18),
    0 8px 18px rgba(37,99,235,.1);
}

.tp-reading-stat--meta{
  grid-template-columns: 1fr;
  grid-template-areas:
    "meta"
    "num";
  gap: .2rem;
}

.tp-reading-stat--meta .tp-reading-stat__meta{
  white-space: normal;
}

.tp-reading-stat--meta .tp-reading-stat__num{
  justify-self: start;
  font-size: .8rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tp-reading-stat--volume .tp-reading-stat__num{
  font-size: .95rem;
}

.tp-reading-proba-ribbon{
  margin: .22rem 0 .14rem;
  display: flex;
  align-items: stretch;
  height: 1.42rem;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(30,64,175,.2);
  background: rgba(30,41,59,.06);
}

.tp-reading-toggle:disabled,
.tp-reading-toggle.is-disabled{
  opacity: .5;
  cursor: not-allowed;
  filter: grayscale(.18);
}

.tp-reading-proba-ribbon__seg{
  position: relative;
  flex: 0 0 var(--tp-seg);
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 .35rem;
}

.tp-reading-proba-ribbon__seg + .tp-reading-proba-ribbon__seg::before{
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: rgba(255,255,255,.45);
}

.tp-reading-proba-ribbon__seg--home{
  background: linear-gradient(90deg, rgba(34,197,94,.26) 0%, rgba(22,163,74,.22) 100%);
}

.tp-reading-proba-ribbon__seg--draw{
  background: linear-gradient(90deg, rgba(245,158,11,.28) 0%, rgba(217,119,6,.22) 100%);
}

.tp-reading-proba-ribbon__seg--away{
  background: linear-gradient(90deg, rgba(14,165,233,.24) 0%, rgba(14,116,144,.2) 100%);
}

.tp-reading-proba-ribbon__txt{
  font-size: .62rem;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}

.tp-reading-team-row__text--tokens{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: .34rem;
}

.tp-reading-token{
  display: inline-flex;
  align-items: center;
  padding: .18rem .45rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.32);
  background: rgba(241,245,249,.82);
  color: #334155;
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.22;
}

.tp-reading-token--metric{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "k v"
    "meter meter";
  gap: .24rem .36rem;
  align-items: center;
  min-width: 0;
  border-radius: 11px;
  padding: .34rem .42rem .38rem;
  border: 1px solid rgba(148,163,184,.34);
  background: linear-gradient(180deg, rgba(255,255,255,.94) 0%, rgba(241,245,249,.88) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

.tp-reading-token__k{
  grid-area: k;
  min-width: 0;
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 800;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-reading-token__v{
  grid-area: v;
  justify-self: end;
  min-width: 0;
  font-size: .74rem;
  font-weight: 900;
  color: #0f172a;
}

.tp-reading-token__meter{
  grid-area: meter;
  height: 5px;
  border-radius: 999px;
  background: rgba(148,163,184,.34);
  overflow: hidden;
}

.tp-reading-token__fill{
  display: block;
  width: var(--tp-token-pct, 0%);
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  opacity: .42;
}

.tp-reading-token.no-meter .tp-reading-token__meter{
  display: none;
}

.tp-reading-token--positive{
  color: #166534;
  border-color: rgba(22,163,74,.36);
  background: linear-gradient(180deg, rgba(34,197,94,.2) 0%, rgba(22,163,74,.11) 100%);
}

.tp-reading-token--calm{
  color: #075985;
  border-color: rgba(14,116,144,.34);
  background: linear-gradient(180deg, rgba(14,165,233,.2) 0%, rgba(14,116,144,.1) 100%);
}

.tp-reading-token--focus{
  color: #1e40af;
  border-color: rgba(37,99,235,.34);
  background: linear-gradient(180deg, rgba(59,130,246,.2) 0%, rgba(37,99,235,.1) 100%);
}

.tp-reading-token--risk{
  color: #b91c1c;
  border-color: rgba(220,38,38,.34);
  background: linear-gradient(180deg, rgba(239,68,68,.2) 0%, rgba(220,38,38,.1) 100%);
}

.tp-reading-token--neutral{
  color: #475569;
}

.tp-reading-team-row--goals .tp-reading-token--metric{
  border-radius: 9px;
}

.tp-reading-team-row--form{
  background: linear-gradient(180deg, rgba(236,253,245,.72) 0%, rgba(239,246,255,.62) 100%);
}

.tp-reading-team-row--goals{
  background: linear-gradient(180deg, rgba(239,246,255,.72) 0%, rgba(248,250,252,.66) 100%);
}

.tp-reading-token--na{
  opacity: .85;
}

@media (max-width: 768px){
  .tp-reading-stat{
    min-height: 2.06rem;
    padding: .34rem .46rem .36rem;
  }

  .tp-reading-stat__meta{
    font-size: .58rem;
    letter-spacing: .035em;
  }

  .tp-reading-stat__num{
    font-size: .82rem;
  }

  .tp-reading-stat--outcome .tp-reading-stat__num{
    font-size: .95rem;
  }

  .tp-reading-proba-ribbon{
    height: 1.34rem;
  }

  .tp-reading-proba-ribbon__txt{
    font-size: .58rem;
  }

  .tp-reading-team-row__text--tokens{
    grid-template-columns: 1fr;
  }

  .tp-reading-token--metric{
    padding: .3rem .38rem .34rem;
  }

  .tp-reading-token__k{
    font-size: .54rem;
  }

  .tp-reading-token__v{
    font-size: .7rem;
  }
}

@media (max-width: 520px){
  .tp-reading-proba-ribbon{
    height: 1.28rem;
  }
}

[data-theme="dark"] .tp-reading-stat__meta{
  color: #94a3b8;
}

[data-theme="dark"] .tp-reading-stat__meter{
  background: rgba(71,85,105,.58);
}

[data-theme="dark"] .tp-reading-stat__fill{
  opacity: .45;
}

[data-theme="dark"] .tp-reading-proba-ribbon{
  border-color: rgba(96,165,250,.34);
  background: rgba(2,6,23,.46);
}

[data-theme="dark"] .tp-reading-proba-ribbon__txt{
  color: #e2e8f0;
  text-shadow: none;
}

[data-theme="dark"] .tp-reading-proba-ribbon__seg + .tp-reading-proba-ribbon__seg::before{
  background: rgba(15,23,42,.56);
}

[data-theme="dark"] .tp-reading-proba-ribbon__seg--home{
  background: linear-gradient(90deg, rgba(22,163,74,.42) 0%, rgba(21,128,61,.35) 100%);
}

[data-theme="dark"] .tp-reading-proba-ribbon__seg--draw{
  background: linear-gradient(90deg, rgba(180,83,9,.46) 0%, rgba(146,64,14,.36) 100%);
}

[data-theme="dark"] .tp-reading-proba-ribbon__seg--away{
  background: linear-gradient(90deg, rgba(14,116,144,.44) 0%, rgba(12,74,110,.35) 100%);
}

[data-theme="dark"] .tp-reading-token{
  border-color: rgba(100,116,139,.38);
  background: rgba(15,23,42,.8);
  color: #cbd5e1;
}

[data-theme="dark"] .tp-reading-token__k{
  color: #94a3b8;
}

[data-theme="dark"] .tp-reading-token__v{
  color: #e2e8f0;
}

[data-theme="dark"] .tp-reading-token__meter{
  background: rgba(51,65,85,.72);
}

[data-theme="dark"] .tp-reading-token--positive{
  color: #86efac;
  border-color: rgba(74,222,128,.34);
  background: linear-gradient(180deg, rgba(22,163,74,.34) 0%, rgba(22,101,52,.2) 100%);
}

[data-theme="dark"] .tp-reading-token--calm{
  color: #7dd3fc;
  border-color: rgba(56,189,248,.34);
  background: linear-gradient(180deg, rgba(14,116,144,.34) 0%, rgba(12,74,110,.2) 100%);
}

[data-theme="dark"] .tp-reading-token--focus{
  color: #93c5fd;
  border-color: rgba(96,165,250,.36);
  background: linear-gradient(180deg, rgba(30,64,175,.34) 0%, rgba(30,58,138,.2) 100%);
}

[data-theme="dark"] .tp-reading-token--risk{
  color: #fca5a5;
  border-color: rgba(248,113,113,.34);
  background: linear-gradient(180deg, rgba(185,28,28,.36) 0%, rgba(153,27,27,.2) 100%);
}

[data-theme="dark"] .tp-reading-team-row--form{
  background: linear-gradient(180deg, rgba(6,78,59,.28) 0%, rgba(30,64,175,.16) 100%);
}

[data-theme="dark"] .tp-reading-team-row--goals{
  background: linear-gradient(180deg, rgba(30,64,175,.24) 0%, rgba(15,23,42,.42) 100%);
}

/* =========================================================
   TP pick metrics visual refresh (desktop + mobile)
   ========================================================= */
.tp-pick-metrics{
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(180px, 1.2fr);
  gap: .48rem;
  align-items: stretch;
}

.tp-pick-metrics .tp-chip{
  position: relative;
  margin: 0;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.3);
  background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(248,250,252,.9) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86);
  padding: .38rem .48rem .42rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "k v"
    "meter meter";
  gap: .22rem .36rem;
  align-content: center;
  line-height: 1.15;
}

.tp-pick-metrics .tp-chip::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 95% at 0% 0%, rgba(255,255,255,.2) 0%, rgba(255,255,255,0) 62%);
  pointer-events: none;
}

.tp-pick-metrics .tp-chip__k{
  grid-area: k;
  min-width: 0;
  font-size: .6rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-pick-metrics .tp-chip__v{
  grid-area: v;
  justify-self: end;
  min-width: 0;
  font-size: .88rem;
  font-weight: 930;
  color: #0f172a;
  white-space: nowrap;
}

.tp-pick-metrics .tp-chip__meter{
  grid-area: meter;
  height: 6px;
  border-radius: 999px;
  background: rgba(148,163,184,.34);
  overflow: hidden;
}

.tp-pick-metrics .tp-chip__fill{
  display: block;
  width: var(--tp-chip-pct, 0%);
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  opacity: .4;
  position: relative;
}

.tp-pick-metrics .tp-chip--outcome{
  grid-template-columns: 1fr;
  grid-template-areas:
    "k"
    "v";
  gap: .18rem;
}

.tp-pick-metrics .tp-chip--outcome .tp-chip__k{
  white-space: normal;
}

.tp-pick-metrics .tp-chip--outcome .tp-chip__v{
  justify-self: start;
  font-size: .76rem;
  line-height: 1.2;
  white-space: normal;
}

.tp-pick-metrics .tp-chip--outcome small{
  font-weight: 750;
  opacity: .88;
  font-size: .82em;
}

.tp-pick-metrics .tp-chip--prob{
  color: #1d4ed8;
  border-color: rgba(37,99,235,.34);
  background: linear-gradient(180deg, rgba(59,130,246,.2) 0%, rgba(37,99,235,.08) 100%);
}

.tp-pick-metrics .tp-chip--conf{
  color: #0f766e;
}

.tp-pick-metrics .tp-chip--prob .tp-chip__meter,
.tp-pick-metrics .tp-chip--conf .tp-chip__meter{
  height: 8px;
  background: rgba(148,163,184,.3);
}

.tp-pick-metrics .tp-chip--prob .tp-chip__fill{
  opacity: .95;
  background: linear-gradient(90deg, #93c5fd 0%, #2563eb 100%);
}

.tp-pick-metrics .tp-chip--conf .tp-chip__fill{
  opacity: .95;
  background: linear-gradient(90deg, #6ee7b7 0%, #059669 100%);
}

.tp-pick-metrics .tp-chip--prob .tp-chip__fill::after,
.tp-pick-metrics .tp-chip--conf .tp-chip__fill::after{
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(15,23,42,.12), 0 2px 5px rgba(15,23,42,.2);
}

.tp-pick-metrics .tp-chip--conf.conf-low{
  color: #b91c1c;
  border-color: rgba(220,38,38,.36);
  background: linear-gradient(180deg, rgba(239,68,68,.22) 0%, rgba(220,38,38,.09) 100%);
}

.tp-pick-metrics .tp-chip--conf.conf-mid{
  color: #a16207;
  border-color: rgba(217,119,6,.36);
  background: linear-gradient(180deg, rgba(245,158,11,.24) 0%, rgba(217,119,6,.1) 100%);
}

.tp-pick-metrics .tp-chip--conf.conf-high{
  color: #166534;
  border-color: rgba(22,163,74,.36);
  background: linear-gradient(180deg, rgba(34,197,94,.22) 0%, rgba(22,163,74,.09) 100%);
}

.tp-pick-metrics .tp-chip--outcome{
  border-color: rgba(100,116,139,.34);
  background: linear-gradient(180deg, rgba(241,245,249,.94) 0%, rgba(226,232,240,.74) 100%);
}

.tp-pick-row--win .tp-pick-metrics .tp-chip--outcome{
  color: #166534;
  border-color: rgba(22,163,74,.4);
  background: linear-gradient(180deg, rgba(34,197,94,.22) 0%, rgba(22,163,74,.1) 100%);
}

.tp-pick-row--lose .tp-pick-metrics .tp-chip--outcome{
  color: #b91c1c;
  border-color: rgba(220,38,38,.4);
  background: linear-gradient(180deg, rgba(239,68,68,.22) 0%, rgba(220,38,38,.1) 100%);
}

.tp-pick-row--void .tp-pick-metrics .tp-chip--outcome{
  color: #1e40af;
  border-color: rgba(37,99,235,.4);
  background: linear-gradient(180deg, rgba(59,130,246,.22) 0%, rgba(37,99,235,.1) 100%);
}

.tp-pick-row--pending .tp-pick-metrics .tp-chip--outcome{
  color: #334155;
}

.tp-reading-details__line--goalscores{
  margin-top: .48rem;
  grid-template-columns: 1fr;
}

.tp-reading-stat--goalscore{
  border-style: dashed;
}

.tp-reading-stat--goalscore .tp-reading-stat__meta{
  font-size: .56rem;
}

.tp-reading-stat--goalscore .tp-reading-stat__num{
  font-size: .72rem;
  line-height: 1.25;
  white-space: normal;
}

.tp-topgoals{
  border: 1px dashed rgba(148,163,184,.46);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.88) 0%, rgba(241,245,249,.82) 100%);
  padding: .44rem .5rem;
  display: grid;
  gap: .3rem;
}

.tp-topgoals__title{
  font-size: .58rem;
  font-weight: 860;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #64748b;
}

.tp-topgoals__list{
  display: grid;
  gap: .26rem;
}

.tp-topgoals__row{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .34rem;
}

.tp-topgoals__score{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: .08rem .38rem;
  border-radius: 999px;
  border: 1px solid rgba(37,99,235,.26);
  background: rgba(59,130,246,.12);
  color: #1e40af;
  font-size: .62rem;
  font-weight: 880;
  line-height: 1.1;
}

.tp-topgoals__bar{
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148,163,184,.34);
}

.tp-topgoals__fill{
  display: block;
  width: var(--tp-goals-w, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
}

.tp-topgoals__pct{
  font-size: .64rem;
  font-weight: 820;
  color: #334155;
  white-space: nowrap;
}

.tp-topgoals__row.is-best .tp-topgoals__score{
  border-color: rgba(22,163,74,.35);
  background: rgba(34,197,94,.14);
  color: #166534;
}

.tp-topgoals__row.is-best .tp-topgoals__fill{
  background: linear-gradient(90deg, #86efac 0%, #16a34a 100%);
}

.tp-reading-team-row__side{
  text-transform: none;
  letter-spacing: .01em;
  font-size: clamp(.67rem, .64rem + .18vw, .8rem);
  overflow-wrap: anywhere;
}

@media (max-width: 980px){
  .tp-pick-metrics{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tp-pick-metrics .tp-chip--outcome{
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px){
  .tp-pick-metrics{
    grid-template-columns: 1fr;
    gap: .42rem;
  }

  .tp-pick-metrics .tp-chip{
    padding: .34rem .42rem .38rem;
  }

  .tp-pick-metrics .tp-chip__k{
    font-size: .56rem;
  }

  .tp-pick-metrics .tp-chip__v{
    font-size: .82rem;
  }

  .tp-pick-metrics .tp-chip--outcome .tp-chip__v{
    font-size: .74rem;
  }
}

[data-theme="dark"] .tp-pick-metrics .tp-chip{
  border-color: rgba(100,116,139,.38);
  background: linear-gradient(180deg, rgba(15,23,42,.78) 0%, rgba(2,6,23,.72) 100%);
  box-shadow: inset 0 1px 0 rgba(148,163,184,.14);
}

[data-theme="dark"] .tp-pick-metrics .tp-chip__k{
  color: #94a3b8;
}

[data-theme="dark"] .tp-pick-metrics .tp-chip__v{
  color: #e2e8f0;
}

[data-theme="dark"] .tp-pick-metrics .tp-chip__meter{
  background: rgba(71,85,105,.68);
}

[data-theme="dark"] .tp-pick-metrics .tp-chip--prob{
  color: #93c5fd;
  border-color: rgba(96,165,250,.42);
  background: linear-gradient(180deg, rgba(30,64,175,.36) 0%, rgba(30,58,138,.22) 100%);
}

[data-theme="dark"] .tp-pick-metrics .tp-chip--prob .tp-chip__fill{
  background: linear-gradient(90deg, #7dd3fc 0%, #2563eb 100%);
}

[data-theme="dark"] .tp-pick-metrics .tp-chip--conf .tp-chip__fill{
  background: linear-gradient(90deg, #86efac 0%, #16a34a 100%);
}

[data-theme="dark"] .tp-pick-metrics .tp-chip--prob .tp-chip__fill::after,
[data-theme="dark"] .tp-pick-metrics .tp-chip--conf .tp-chip__fill::after{
  background: #e2e8f0;
  box-shadow: 0 0 0 1px rgba(2,6,23,.35), 0 2px 5px rgba(2,6,23,.45);
}

[data-theme="dark"] .tp-pick-metrics .tp-chip--conf.conf-low{
  color: #fca5a5;
  border-color: rgba(248,113,113,.42);
  background: linear-gradient(180deg, rgba(185,28,28,.38) 0%, rgba(127,29,29,.22) 100%);
}

[data-theme="dark"] .tp-pick-metrics .tp-chip--conf.conf-mid{
  color: #fde68a;
  border-color: rgba(251,191,36,.42);
  background: linear-gradient(180deg, rgba(180,83,9,.4) 0%, rgba(146,64,14,.24) 100%);
}

[data-theme="dark"] .tp-pick-metrics .tp-chip--conf.conf-high{
  color: #86efac;
  border-color: rgba(74,222,128,.42);
  background: linear-gradient(180deg, rgba(22,163,74,.38) 0%, rgba(22,101,52,.22) 100%);
}

[data-theme="dark"] .tp-pick-metrics .tp-chip--outcome{
  border-color: rgba(100,116,139,.42);
  background: linear-gradient(180deg, rgba(30,41,59,.82) 0%, rgba(15,23,42,.72) 100%);
}

[data-theme="dark"] .tp-reading-stat--goalscore{
  border-color: rgba(100,116,139,.46);
}

[data-theme="dark"] .tp-topgoals{
  border-color: rgba(100,116,139,.5);
  background: linear-gradient(180deg, rgba(15,23,42,.82) 0%, rgba(2,6,23,.72) 100%);
}

[data-theme="dark"] .tp-topgoals__title{
  color: #94a3b8;
}

[data-theme="dark"] .tp-topgoals__score{
  border-color: rgba(96,165,250,.35);
  background: rgba(30,64,175,.26);
  color: #bfdbfe;
}

[data-theme="dark"] .tp-topgoals__bar{
  background: rgba(51,65,85,.76);
}

[data-theme="dark"] .tp-topgoals__fill{
  background: linear-gradient(90deg, #7dd3fc 0%, #2563eb 100%);
}

[data-theme="dark"] .tp-topgoals__pct{
  color: #cbd5e1;
}

[data-theme="dark"] .tp-topgoals__row.is-best .tp-topgoals__score{
  border-color: rgba(74,222,128,.42);
  background: rgba(22,163,74,.3);
  color: #86efac;
}

[data-theme="dark"] .tp-topgoals__row.is-best .tp-topgoals__fill{
  background: linear-gradient(90deg, #86efac 0%, #16a34a 100%);
}

/* =========================================================
   Dark mode readability polish
   ========================================================= */
[data-theme="dark"] .tp-main{
  color: #e5edf8;
}

[data-theme="dark"] .tp-section{
  background: #111827;
}

[data-theme="dark"] .tp-section--filters{
  background: linear-gradient(180deg, #0f172a, #111827);
}

[data-theme="dark"] .tp-panel,
[data-theme="dark"] .tp-perf,
[data-theme="dark"] .tp-type-stats,
[data-theme="dark"] .bestbet-card,
[data-theme="dark"] .tp-match-card,
[data-theme="dark"] .tp-filters-card,
[data-theme="dark"] #tp-day-summary,
[data-theme="dark"] .tp-day-summary,
[data-theme="dark"] .tp-advanced,
[data-theme="dark"] #bb-perf{
  background: #1f2937;
  border-color: #374151;
  box-shadow: 0 12px 28px rgba(2,6,23,.3);
}

[data-theme="dark"] .tp-h2,
[data-theme="dark"] .tp-label,
[data-theme="dark"] .tp-day-summary__title,
[data-theme="dark"] .tp-day-metric__value,
[data-theme="dark"] .bb-type-value,
[data-theme="dark"] .bb-type-label,
[data-theme="dark"] .tp-adv-label,
[data-theme="dark"] .tp-pick-label{
  color: #f8fbff;
}

[data-theme="dark"] .tp-muted,
[data-theme="dark"] .tp-kickoff,
[data-theme="dark"] .tp-vs,
[data-theme="dark"] .tp-mode-hint,
[data-theme="dark"] .tp-day-metric__label,
[data-theme="dark"] .tp-day-metric__hint,
[data-theme="dark"] .bb-type-volume,
[data-theme="dark"] .bb-perf-label,
[data-theme="dark"] .bb-perf-voids,
[data-theme="dark"] .tp-filters-caption--small,
[data-theme="dark"] .tp-pick-sub,
[data-theme="dark"] .tp-threshold-rate{
  color: #aebfd5;
}

[data-theme="dark"] .tp-date-row .date-selector::-webkit-scrollbar-thumb{
  background: rgba(148,163,184,.34);
}

[data-theme="dark"] .tp-date-row .date-button{
  background: #172131;
  border-color: rgba(148,163,184,.24);
  color: #e5edf8;
  box-shadow: 0 8px 18px rgba(2,6,23,.24);
}

[data-theme="dark"] .tp-date-row .date-button:hover{
  background: #1e293b;
  border-color: rgba(96,165,250,.36);
}

[data-theme="dark"] .tp-date-row .date-button.selected{
  background: #274784 !important;
  border-color: #3b82f6 !important;
  color: #f8fbff !important;
}

[data-theme="dark"] .match-count{
  background: rgba(59,130,246,.26);
  border-color: rgba(147,197,253,.24);
  color: #f8fbff;
}

[data-theme="dark"] .date-button.selected .match-count{
  background: rgba(255,255,255,.18);
}

[data-theme="dark"] .league-button{
  background: #0f172a;
  border-color: rgba(148,163,184,.2);
  box-shadow: 0 8px 16px rgba(2,6,23,.2);
}

[data-theme="dark"] .league-button.selected{
  outline-color: rgba(96,165,250,.55);
}

[data-theme="dark"] .tp-match-card{
  background: #172131;
  border-color: rgba(148,163,184,.16);
  box-shadow: 0 12px 24px rgba(2,6,23,.28);
}

[data-theme="dark"] .tp-match-card::before{
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

[data-theme="dark"] .tp-match-meta{
  border-bottom-color: rgba(148,163,184,.14);
}

[data-theme="dark"] .tp-league-badge,
[data-theme="dark"] .tp-team-name{
  color: #dbeafe;
}

[data-theme="dark"] .tp-team-logo{
  background: #0f172a;
  border-color: rgba(148,163,184,.18);
  box-shadow: 0 4px 10px rgba(2,6,23,.22);
}

[data-theme="dark"] .tp-pick-row{
  background: rgba(15,23,42,.76);
  border-color: rgba(148,163,184,.14);
}

[data-theme="dark"] .tp-pick-row::before{
  background: rgba(148,163,184,.32);
}

[data-theme="dark"] .tp-pick-row--win{
  background: rgba(22,163,74,.16);
  border-color: rgba(74,222,128,.24);
}

[data-theme="dark"] .tp-pick-row--lose{
  background: rgba(220,38,38,.15);
  border-color: rgba(248,113,113,.24);
}

[data-theme="dark"] .tp-pick-row--void{
  background: rgba(37,99,235,.16);
  border-color: rgba(96,165,250,.24);
}

[data-theme="dark"] .tp-chip{
  background: #0f172a;
  border-color: rgba(148,163,184,.2);
  color: #e5edf8;
}

[data-theme="dark"] .tp-chip--prob{
  background: rgba(37,99,235,.2);
  border-color: rgba(96,165,250,.28);
  color: #dbeafe;
}

[data-theme="dark"] .tp-chip--conf{
  background: rgba(15,23,42,.88);
}

[data-theme="dark"] .tp-filters-grid > .tp-field{
  background: #172131;
  border-color: rgba(148,163,184,.18);
}

[data-theme="dark"] .tp-select,
[data-theme="dark"] .tp-btn--ghost{
  background: #0f172a;
  border-color: rgba(148,163,184,.22);
  color: #e5edf8;
}

[data-theme="dark"] .tp-btn--ghost:hover,
[data-theme="dark"] .tp-select:hover{
  border-color: rgba(96,165,250,.36);
}

[data-theme="dark"] .tp-btn--primary{
  background: #274784;
  box-shadow: 0 12px 24px rgba(2,6,23,.3);
}

[data-theme="dark"] .tp-check{
  background: #0f172a;
  border-color: rgba(148,163,184,.18);
  color: #e5edf8;
}

[data-theme="dark"] .tp-check--strong{
  border-color: rgba(96,165,250,.34);
}

[data-theme="dark"] .tp-inline-toggle{
  background: #172131;
  border-color: rgba(148,163,184,.2);
}

[data-theme="dark"] .tp-mode-chip{
  background: #0f172a;
  border-color: rgba(148,163,184,.2);
}

[data-theme="dark"] .tp-day-metric{
  background: #172131;
  border-color: rgba(148,163,184,.18);
}

[data-theme="dark"] .tp-day-metric--soft{
  background: #0f172a;
}

[data-theme="dark"] .bb-type-bar-wrap{
  background: rgba(148,163,184,.14);
}

[data-theme="dark"] .bb-perf-main{
  color: #f8fbff;
  background: rgba(37,99,235,.22);
  border-color: rgba(96,165,250,.34);
}

[data-theme="dark"] .bb-perf-voids{
  background: #0f172a;
  border-color: rgba(148,163,184,.16);
}

[data-theme="dark"] .tp-note{
  background: rgba(37,99,235,.14);
  border-left-color: #60a5fa;
  color: #dbeafe;
}

@media (max-width: 768px){
  [data-theme="dark"] .tp-match-card{
    padding: 14px;
  }

  [data-theme="dark"] .tp-team-name{
    font-size: .9rem;
  }

  [data-theme="dark"] .tp-pick-label{
    font-size: .96rem;
  }

  [data-theme="dark"] .tp-pick-sub{
    font-size: .84rem;
  }

  [data-theme="dark"] .tp-chip{
    font-size: .84rem;
  }

[data-theme="dark"] .tp-filters-toggle,
[data-theme="dark"] .tp-btn{
  box-shadow: 0 8px 16px rgba(2,6,23,.22);
  }
}

/* =========================================================
   UX refresh - filters / performance / advanced
   ========================================================= */

#bb-perf{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(37,99,235,.14);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.16), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.98) 100%);
  box-shadow: 0 18px 44px rgba(15,23,42,.08);
  text-align: left;
}

.bb-perf-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.bb-perf-head__eyebrow{
  display: block;
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #2563eb;
}

.bb-perf-head__sub{
  display: block;
  font-size: .92rem;
  font-weight: 700;
  color: var(--muted);
}

.bb-perf-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, .9fr);
  gap: 12px;
}

.bb-perf-card{
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.86);
  overflow: hidden;
  text-align: center;
}

.bb-perf-card::before{
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 18px 0 0 18px;
  background: rgba(37,99,235,.22);
}

.bb-perf-card--hero{
  background: linear-gradient(135deg, rgba(30,64,175,.08) 0%, rgba(255,255,255,.96) 100%);
}

.bb-perf-card--hot::before{ background: linear-gradient(180deg, #16a34a 0%, #4ade80 100%); }
.bb-perf-card--warm::before{ background: linear-gradient(180deg, #2563eb 0%, #60a5fa 100%); }
.bb-perf-card--cool::before{ background: linear-gradient(180deg, #f59e0b 0%, #fcd34d 100%); }
.bb-perf-card--pending::before{ background: linear-gradient(180deg, #64748b 0%, #cbd5e1 100%); }

.bb-perf-card__label{
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.bb-perf-main{
  display: inline-flex;
  align-items: flex-start;
  gap: 2px;
  width: fit-content;
  margin-inline: auto;
  padding: 4px 0 0;
  border: 0;
  background: transparent;
  line-height: .9;
  font-weight: 950;
  color: #0f172a;
  font-variant-numeric: tabular-nums lining-nums;
}

.bb-perf-main__value{
  font-size: clamp(2.45rem, 2rem + 1.1vw, 3.45rem);
  letter-spacing: -.05em;
}

.bb-perf-main__decimal{
  font-size: clamp(1.1rem, 1rem + .35vw, 1.45rem);
  font-weight: 900;
  opacity: .9;
  transform: translateY(.28em);
}

.bb-perf-main__suffix{
  font-size: clamp(1rem, .95rem + .26vw, 1.2rem);
  font-weight: 900;
  opacity: .7;
  transform: translateY(.22em);
}

.bb-perf-main--pending{
  display: block;
  padding: 0;
  font-size: clamp(1.5rem, 1.25rem + .5vw, 1.9rem);
  line-height: 1.05;
}

.bb-perf-meter{
  position: relative;
  width: min(100%, 240px);
  height: 12px;
  margin-top: 2px;
  margin-inline: auto;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(239,68,68,.14) 0%, rgba(245,158,11,.16) 45%, rgba(34,197,94,.16) 100%);
  overflow: hidden;
}

.bb-perf-meter::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(255,255,255,.7) 25%, transparent calc(25% + 1px), transparent calc(50% - 1px), rgba(255,255,255,.7) 50%, transparent calc(50% + 1px), transparent calc(75% - 1px), rgba(255,255,255,.7) 75%, transparent calc(75% + 1px));
  pointer-events: none;
  opacity: .7;
}

.bb-perf-meter__fill{
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d4ed8 0%, #38bdf8 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24), 0 4px 10px rgba(37,99,235,.22);
}

.bb-perf-card__value{
  font-size: clamp(1.2rem, 1.05rem + .55vw, 1.55rem);
  line-height: 1;
  font-weight: 900;
  color: #0f172a;
}

.bb-perf-card__meta,
.bb-perf-foot{
  font-size: .95rem;
  line-height: 1.35;
  color: var(--muted);
}

.bb-perf-foot{
  padding-top: 2px;
}

.tp-type-stats__intro{
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.tp-type-stats__eyebrow{
  margin: 0;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #2563eb;
}

.tp-type-stats__lead{
  margin: 0;
  font-size: .95rem;
  line-height: 1.45;
  color: var(--muted);
}

#bb-type-chart,
.tp-type-chart{
  gap: 12px;
}

.bb-type-row{
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.bb-type-rank{
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.08);
  background: linear-gradient(180deg, rgba(248,250,252,1) 0%, rgba(226,232,240,.75) 100%);
  font-size: 1.05rem;
  font-weight: 950;
  color: #334155;
}

.bb-type-card{
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.95) 100%);
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
}

.bb-type-row--best .bb-type-card{
  border-color: rgba(22,163,74,.22);
  box-shadow: 0 16px 34px rgba(22,163,74,.10);
}

.bb-type-head{
  display: grid;
  gap: 10px;
}

.bb-type-head__main{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bb-type-label-wrap{
  display: grid;
  gap: 8px;
  min-width: 0;
}

.bb-type-label{
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: normal;
}

.bb-type-badge{
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(22,163,74,.12);
  border: 1px solid rgba(22,163,74,.22);
  color: #15803d;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.bb-type-value{
  flex-shrink: 0;
  font-size: clamp(1.35rem, 1.2rem + .5vw, 1.7rem);
  line-height: 1;
  font-weight: 950;
}

.bb-type-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bb-type-stat{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(248,250,252,.95);
  color: #475569;
  font-size: .82rem;
  font-weight: 800;
}

.bb-type-stat strong{
  color: #0f172a;
}

.bb-type-stat--accent{
  border-color: rgba(37,99,235,.18);
  background: rgba(37,99,235,.08);
  color: #1d4ed8;
}

.bb-type-bar-wrap{
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(239,68,68,.12) 0%, rgba(245,158,11,.12) 48%, rgba(22,163,74,.14) 100%);
  overflow: hidden;
}

.bb-type-bar{
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d4ed8 0%, #38bdf8 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}

.bb-type-row--hot .bb-type-bar{
  background: linear-gradient(90deg, #16a34a 0%, #4ade80 100%);
}

.bb-type-row--warm .bb-type-bar{
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.bb-type-row--cool .bb-type-bar{
  background: linear-gradient(90deg, #f59e0b 0%, #fcd34d 100%);
}

.bb-type-foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bb-type-foot__text{
  font-size: .9rem;
  line-height: 1.4;
  color: var(--muted);
}

.bb-type-empty-card{
  display: grid;
  gap: 6px;
  padding: 20px;
  border-radius: 18px;
  border: 1px dashed rgba(148,163,184,.55);
  background: rgba(248,250,252,.9);
  color: #475569;
}

.tp-type-suggestions{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,.08);
}

.tp-type-suggestions__lead{
  margin: 0 0 10px;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #2563eb;
}

.tp-type-suggestions__empty{
  margin: 0;
  font-size: .92rem;
  color: var(--muted);
}

.tp-type-suggestion-list{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tp-type-suggestion{
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(37,99,235,.14);
  background: rgba(219,234,254,.42);
  min-width: min(100%, 220px);
}

.tp-type-suggestion__label{
  font-size: .88rem;
  font-weight: 900;
  color: #0f172a;
}

.tp-type-suggestion__meta{
  font-size: .82rem;
  line-height: 1.35;
  color: #1d4ed8;
}

.tp-filters-head{
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  justify-items: center;
  padding: 22px clamp(16px, 2.4vw, 28px);
  border-radius: 20px;
  border: 1px solid rgba(37,99,235,.10);
  background:
    linear-gradient(180deg, rgba(219,234,254,.38) 0%, rgba(255,255,255,.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 12px 28px rgba(15,23,42,.04);
  text-align: center;
}

.tp-filters-head__copy{
  display: grid;
  gap: 6px;
  justify-items: center;
  max-width: 760px;
}

.tp-filters-head__eyebrow{
  margin: 0;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #2563eb;
}

.tp-filters-head__text{
  margin: 0;
  max-width: 70ch;
  font-size: .96rem;
  line-height: 1.5;
  color: var(--muted);
}

.tp-filters-head .tp-h2{
  margin: 0;
  max-width: 24ch;
}

#filters-panel,
.tp-filters-panel{
  display: grid;
  gap: 16px;
}

.tp-filter-block{
  display: grid;
  gap: 10px;
}

.tp-filter-block__head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.tp-filter-block__step{
  margin: 0 0 4px;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #2563eb;
}

.tp-filter-block__title{
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 900;
  color: #0f172a;
}

.tp-filter-block__hint{
  margin: 0;
  max-width: 34rem;
  font-size: .92rem;
  line-height: 1.45;
  color: var(--muted);
}

.tp-league-shell,
.tp-filters-card{
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.95) 100%);
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
}

.tp-league-shell .league-buttons{
  justify-content: flex-start;
}

.tp-filters-grid{
  gap: 12px;
}

.tp-filters-grid > .tp-field{
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.07);
  background: #f8fafc;
}

.tp-mode-field{
  background:
    linear-gradient(135deg, rgba(37,99,235,.10) 0%, rgba(255,255,255,.96) 100%);
  border-color: rgba(37,99,235,.14);
}

.tp-field--markets,
.tp-field--advanced{
  display: grid;
  gap: 12px;
}

.tp-field--display-controls{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tp-inline-control{
  display: grid;
  gap: 6px;
}

.tp-filters-toggle{
  width: 100%;
  max-width: 460px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(37,99,235,.16);
  background:
    linear-gradient(135deg, rgba(219,234,254,.86) 0%, rgba(255,255,255,.98) 100%);
  box-shadow: 0 10px 24px rgba(37,99,235,.08);
  justify-self: center;
}

.tp-filters-toggle__copy,
.tp-advanced-toggle__copy{
  display: grid;
  gap: 4px;
  text-align: left;
}

.tp-advanced-toggle__kicker{
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.14);
  color: #1d4ed8;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tp-filters-toggle__title,
.tp-advanced-toggle__title{
  font-size: .98rem;
  font-weight: 900;
  line-height: 1.15;
  color: #0f172a;
}

.tp-filters-toggle__meta,
.tp-advanced-toggle__meta{
  font-size: .86rem;
  line-height: 1.35;
  color: var(--muted);
}

.tp-filters-caret{
  transition: transform .2s ease;
}

.tp-filters-toggle.is-open .tp-filters-caret,
.tp-advanced-toggle.is-open .tp-filters-caret{
  transform: rotate(180deg);
}

.tp-advanced-toggle{
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.96) 100%);
  color: #0f172a;
  box-shadow: none;
}

.tp-advanced-toggle:hover{
  border-color: rgba(37,99,235,.24);
  background: linear-gradient(180deg, rgba(239,246,255,.98) 0%, rgba(248,250,252,.98) 100%);
  transform: translateY(-1px);
}

.tp-advanced-toggle.is-open{
  border-color: rgba(37,99,235,.26);
  background: linear-gradient(180deg, rgba(219,234,254,.52) 0%, rgba(255,255,255,.98) 100%);
}

.tp-advanced-toggle .tp-filters-caret{
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.82);
  color: #1d4ed8;
  font-size: 1rem;
  box-shadow: 0 6px 14px rgba(15,23,42,.08);
}

.tp-advanced{
  margin-top: 0;
  padding: 16px;
  border-radius: 18px;
}

.tp-advanced-intro{
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.tp-advanced-intro__title{
  margin: 0;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #2563eb;
}

.tp-advanced-intro .tp-help{
  margin: 0;
}

.tp-advanced-grid{
  display: grid;
  gap: 10px;
}

.tp-adv-row{
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto auto;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.9);
}

.tp-threshold-rate{
  font-size: .95rem;
  text-align: right;
}

.tp-threshold-rate .bb-type-volume{
  display: block;
  margin-left: 0;
  margin-top: 2px;
  font-size: .78rem;
}

@media (max-width: 980px){
  .bb-perf-grid,
  .tp-filters-head,
  .tp-field--display-controls{
    grid-template-columns: 1fr;
  }

  .tp-filter-block__head{
    align-items: flex-start;
  }
}

@media (max-width: 720px){
  #bb-perf,
  .tp-league-shell,
  .tp-filters-card{
    padding: 14px;
  }

  .bb-type-row{
    grid-template-columns: 1fr;
  }

  .bb-type-rank{
    min-height: 44px;
  }

  .bb-type-head__main{
    flex-direction: column;
    align-items: flex-start;
  }

  .tp-adv-row{
    grid-template-columns: 1fr;
  }

  .tp-threshold-rate{
    text-align: left;
  }
}

@media (max-width: 640px){
  .tp-collapsible .tp-type-stats{
    padding: 12px 10px;
  }

  .tp-type-stats__intro{
    gap: 3px;
    margin-bottom: 8px;
  }

  .tp-type-stats__eyebrow{
    font-size: .68rem;
  }

  .tp-type-stats__lead{
    font-size: .84rem;
    line-height: 1.35;
  }

  .tp-type-stats .tp-h2{
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 8px;
  }

  #bb-type-chart,
  .tp-type-chart{
    gap: 10px;
  }

  .bb-type-row{
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  .bb-type-rank{
    min-height: 36px;
    width: 36px;
    border-radius: 12px;
    font-size: .82rem;
  }

  .bb-type-card{
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
  }

  .bb-type-row--best .bb-type-card{
    box-shadow: 0 10px 22px rgba(22,163,74,.08);
  }

  .bb-type-head{
    gap: 8px;
  }

  .bb-type-head__main{
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .bb-type-label-wrap{
    gap: 6px;
  }

  .bb-type-label{
    font-size: .92rem;
    line-height: 1.25;
  }

  .bb-type-badge{
    padding: 5px 8px;
    font-size: .66rem;
  }

  .bb-type-value{
    font-size: 1.25rem;
  }

  .bb-type-meta{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .bb-type-stat{
    min-width: 0;
    padding: 6px 8px;
    border-radius: 12px;
    font-size: .74rem;
    line-height: 1.2;
  }

  .bb-type-stat--accent{
    grid-column: 1 / -1;
  }

  .bb-type-bar-wrap{
    height: 10px;
  }

  .bb-type-foot__text{
    font-size: .82rem;
    line-height: 1.32;
  }

  .tp-type-suggestions{
    margin-top: 10px;
    padding-top: 10px;
  }

  .tp-type-suggestions__lead{
    margin-bottom: 8px;
    font-size: .74rem;
  }

  .tp-type-suggestion-list{
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tp-type-suggestion{
    min-width: 0;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .tp-type-suggestion__label{
    font-size: .8rem;
  }

  .tp-type-suggestion__meta{
    font-size: .75rem;
    line-height: 1.3;
  }
}

[data-theme="dark"] #bb-perf{
  border-color: rgba(96,165,250,.18);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.22), transparent 42%),
    linear-gradient(135deg, rgba(15,23,42,.94) 0%, rgba(15,23,42,.98) 100%);
  box-shadow: 0 18px 44px rgba(2,6,23,.34);
}

[data-theme="dark"] .bb-perf-head__eyebrow,
[data-theme="dark"] .tp-type-stats__eyebrow,
[data-theme="dark"] .tp-type-suggestions__lead,
[data-theme="dark"] .tp-filters-head__eyebrow,
[data-theme="dark"] .tp-filter-block__step,
[data-theme="dark"] .tp-advanced-intro__title{
  color: #93c5fd;
}

[data-theme="dark"] .bb-perf-head__sub,
[data-theme="dark"] .bb-perf-card__meta,
[data-theme="dark"] .bb-perf-foot,
[data-theme="dark"] .tp-type-stats__lead,
[data-theme="dark"] .bb-type-foot__text,
[data-theme="dark"] .tp-filters-head__text,
[data-theme="dark"] .tp-filter-block__hint,
[data-theme="dark"] .tp-filters-toggle__meta,
[data-theme="dark"] .tp-advanced-toggle__meta{
  color: #aebfd5;
}

[data-theme="dark"] .tp-filters-head{
  border-color: rgba(148,163,184,.18);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.18), transparent 42%),
    linear-gradient(180deg, rgba(15,23,42,.92) 0%, rgba(15,23,42,.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 16px 36px rgba(2,6,23,.28);
}

[data-theme="dark"] .bb-perf-card,
[data-theme="dark"] .bb-type-card,
[data-theme="dark"] .tp-league-shell,
[data-theme="dark"] .tp-filters-card,
[data-theme="dark"] .tp-adv-row{
  border-color: rgba(148,163,184,.16);
  background: rgba(15,23,42,.8);
  box-shadow: 0 12px 28px rgba(2,6,23,.22);
}

[data-theme="dark"] .bb-perf-card--hero{
  background: linear-gradient(135deg, rgba(37,99,235,.20) 0%, rgba(15,23,42,.92) 100%);
}

[data-theme="dark"] .bb-perf-main,
[data-theme="dark"] .bb-perf-card__value,
[data-theme="dark"] .bb-type-value,
[data-theme="dark"] .tp-filter-block__title,
[data-theme="dark"] .tp-type-suggestion__label{
  color: #f8fafc;
}

[data-theme="dark"] .bb-perf-main__suffix,
[data-theme="dark"] .bb-perf-main__decimal{
  color: rgba(248,250,252,.88);
}

[data-theme="dark"] .bb-perf-meter{
  background:
    linear-gradient(90deg, rgba(239,68,68,.18) 0%, rgba(245,158,11,.18) 45%, rgba(34,197,94,.18) 100%);
}

[data-theme="dark"] .bb-perf-meter::after{
  background:
    linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(255,255,255,.22) 25%, transparent calc(25% + 1px), transparent calc(50% - 1px), rgba(255,255,255,.22) 50%, transparent calc(50% + 1px), transparent calc(75% - 1px), rgba(255,255,255,.22) 75%, transparent calc(75% + 1px));
}

[data-theme="dark"] .bb-perf-meter__fill{
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 6px 14px rgba(37,99,235,.24);
}

[data-theme="dark"] .bb-type-rank,
[data-theme="dark"] .bb-type-stat{
  border-color: rgba(148,163,184,.16);
  background: rgba(30,41,59,.78);
  color: #cbd5e1;
}

[data-theme="dark"] .bb-type-stat strong{
  color: #f8fafc;
}

[data-theme="dark"] .bb-type-stat--accent,
[data-theme="dark"] .tp-type-suggestion{
  border-color: rgba(96,165,250,.24);
  background: rgba(37,99,235,.18);
  color: #bfdbfe;
}

[data-theme="dark"] .tp-type-suggestion__meta{
  color: #bfdbfe;
}

[data-theme="dark"] .bb-type-empty-card{
  border-color: rgba(148,163,184,.28);
  background: rgba(15,23,42,.78);
  color: #cbd5e1;
}

[data-theme="dark"] .tp-filters-toggle{
  border-color: rgba(96,165,250,.22);
  background: linear-gradient(135deg, rgba(37,99,235,.18) 0%, rgba(15,23,42,.92) 100%);
  box-shadow: 0 12px 30px rgba(2,6,23,.26);
}

[data-theme="dark"] .tp-filters-toggle__title,
[data-theme="dark"] .tp-advanced-toggle__title{
  color: #f8fafc;
}

[data-theme="dark"] .tp-advanced-toggle__kicker{
  background: rgba(37,99,235,.18);
  border-color: rgba(96,165,250,.28);
  color: #bfdbfe;
}

[data-theme="dark"] .tp-advanced-toggle{
  border-color: rgba(148,163,184,.18);
  background: linear-gradient(180deg, rgba(15,23,42,.84) 0%, rgba(15,23,42,.94) 100%);
  color: #f8fafc;
  box-shadow: none;
}

[data-theme="dark"] .tp-advanced-toggle:hover{
  border-color: rgba(96,165,250,.30);
  background: linear-gradient(180deg, rgba(30,41,59,.96) 0%, rgba(15,23,42,.96) 100%);
}

[data-theme="dark"] .tp-advanced-toggle.is-open{
  border-color: rgba(96,165,250,.34);
  background: linear-gradient(180deg, rgba(30,64,175,.22) 0%, rgba(15,23,42,.96) 100%);
}

[data-theme="dark"] .tp-advanced-toggle .tp-filters-caret{
  border-color: rgba(148,163,184,.18);
  background: rgba(15,23,42,.82);
  color: #bfdbfe;
  box-shadow: 0 8px 18px rgba(2,6,23,.22);
}

[data-theme="dark"] .tp-filters-grid > .tp-field,
[data-theme="dark"] .tp-mode-field{
  border-color: rgba(148,163,184,.16);
  background: rgba(23,33,49,.92);
}

.tp-filters-engine[hidden]{
  display:none !important;
}

.tp-profile-bridge{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  margin-top:18px;
  padding:20px clamp(16px,2.6vw,26px);
  border-radius:20px;
  border:1px solid rgba(15,23,42,.08);
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.14), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,.98) 0%, rgba(239,246,255,.94) 100%);
  box-shadow:0 14px 32px rgba(15,23,42,.06);
}

.tp-profile-bridge__copy{
  display:grid;
  gap:8px;
}

.tp-profile-bridge__eyebrow{
  margin:0;
  font-size:.75rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#2563eb;
}

.tp-profile-bridge .tp-h2{
  margin:0;
  max-width:18ch;
}

.tp-profile-bridge__text{
  margin:0;
  max-width:64ch;
  font-size:.96rem;
  line-height:1.55;
  color:var(--muted);
}

.tp-profile-bridge__link{
  justify-self:end;
}

.tp-mode-shell{
  display:flex;
  align-items:stretch;
  gap:12px;
  flex-wrap:wrap;
}

.tp-mode-shell__link{
  align-self:stretch;
}

.tp-mode-menu{
  position:relative;
  min-width:min(100%, 360px);
  flex:1 1 360px;
}

.tp-mode-menu__button{
  width:100%;
  display:grid;
  gap:4px;
  padding:16px 18px;
  border-radius:20px;
  border:1px solid rgba(37,99,235,.16);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.14), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.98) 0%, rgba(239,246,255,.96) 100%);
  box-shadow:0 14px 28px rgba(37,99,235,.10);
  text-align:left;
  cursor:pointer;
}

.tp-mode-menu__button:hover{
  border-color:rgba(37,99,235,.28);
}

.tp-mode-menu__eyebrow{
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#2563eb;
}

.tp-mode-menu__current{
  font-size:1.08rem;
  font-weight:950;
  color:#0f172a;
}

.tp-mode-menu__meta{
  font-size:.86rem;
  line-height:1.4;
  color:var(--muted);
}

.tp-mode-menu__panel{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 10px);
  z-index:30;
  display:grid;
  gap:14px;
  padding:16px;
  border-radius:22px;
  border:1px solid rgba(15,23,42,.08);
  background:rgba(255,255,255,.98);
  backdrop-filter:blur(16px);
  box-shadow:0 24px 48px rgba(15,23,42,.14);
}

.tp-mode-menu__panel[hidden]{
  display:none !important;
}

.tp-mode-menu__group{
  display:grid;
  gap:10px;
}

.tp-mode-menu__group-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.tp-mode-menu__group-title{
  margin:0;
  font-size:.8rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#475569;
}

.tp-mode-menu__manage{
  font-size:.85rem;
  font-weight:800;
  color:#1d4ed8;
  text-decoration:none;
}

.tp-mode-menu__list{
  display:grid;
  gap:8px;
}

.tp-mode-option{
  width:100%;
  display:grid;
  gap:3px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.08);
  background:#f8fafc;
  text-align:left;
  cursor:pointer;
  transition:border-color .18s ease,background .18s ease,transform .12s ease,box-shadow .18s ease;
}

.tp-mode-option:hover{
  border-color:rgba(37,99,235,.26);
  background:rgba(239,246,255,.96);
  transform:translateY(-1px);
}

.tp-mode-option.is-active{
  border-color:rgba(37,99,235,.34);
  background:linear-gradient(135deg, rgba(219,234,254,.82) 0%, rgba(255,255,255,.98) 100%);
  box-shadow:0 10px 22px rgba(37,99,235,.10);
}

.tp-mode-option__title{
  font-size:.95rem;
  font-weight:900;
  color:#0f172a;
}

.tp-mode-option__rate{
  display:inline-block;
  margin-left:8px;
  padding:1px 7px;
  border-radius:20px;
  background:rgba(16,185,129,.12);
  color:#059669;
  font-size:.76rem;
  font-weight:700;
  vertical-align:middle;
}

.tp-mode-option__desc,
.tp-mode-menu__empty{
  font-size:.83rem;
  line-height:1.35;
  color:var(--muted);
}

.tp-mode-menu__empty{
  margin:0;
  padding:4px 2px 0;
}

@media (max-width:820px){
  .tp-profile-bridge{
    grid-template-columns:1fr;
  }

  .tp-profile-bridge__link,
  .tp-mode-shell__link{
    width:100%;
    justify-self:stretch;
  }
}

@media (max-width:640px){
  .tp-mode-menu{
    min-width:100%;
    flex-basis:100%;
  }

  .tp-mode-menu__panel{
    position:static;
    margin-top:10px;
    box-shadow:0 16px 30px rgba(15,23,42,.10);
  }
}

[data-theme="dark"] .tp-profile-bridge{
  border-color:rgba(255,255,255,.10);
  background:
    radial-gradient(circle at top left, rgba(96,165,250,.18), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.03) 100%);
}

[data-theme="dark"] .tp-profile-bridge__text,
[data-theme="dark"] .tp-mode-menu__meta,
[data-theme="dark"] .tp-mode-option__desc,
[data-theme="dark"] .tp-mode-menu__empty{
  color:rgba(255,255,255,.72);
}

[data-theme="dark"] .tp-mode-option__rate{
  background:rgba(16,185,129,.20);
  color:#34d399;
}

[data-theme="dark"] .tp-profile-bridge .tp-h2,
[data-theme="dark"] .tp-mode-menu__current,
[data-theme="dark"] .tp-mode-option__title{
  color:rgba(255,255,255,.94);
}

[data-theme="dark"] .tp-mode-menu__button,
[data-theme="dark"] .tp-mode-menu__panel,
[data-theme="dark"] .tp-mode-option{
  border-color:rgba(255,255,255,.10);
  background:rgba(15,23,42,.82);
}

[data-theme="dark"] .tp-mode-option.is-active{
  border-color:rgba(96,165,250,.34);
  background:linear-gradient(135deg, rgba(37,99,235,.28) 0%, rgba(15,23,42,.92) 100%);
}

[data-theme="dark"] .tp-mode-menu__group-title{
  color:rgba(191,219,254,.82);
}

/* =====================================================
   PREPROD — UX REDESIGN COMPONENTS
   ===================================================== */

/* --- Bilan du jour : inline compact --- */
.tp-day-summary--inline {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 14px;
  margin-bottom: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.8rem;
}
.tp-day-inline-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tp-day-inline-label {
  color: #94a3b8;
  font-weight: 600;
}
.tp-day-summary--inline .tp-day-metric__value {
  font-weight: 800;
  color: #1e293b;
  font-size: 0.85rem;
}
.tp-day-summary--inline .tp-day-metric__hint {
  color: #94a3b8;
  font-size: 0.74rem;
}
.tp-day-inline-sep {
  color: #cbd5e1;
}

/* --- Perf inline (sous les mode chips) --- */
.tp-perf--inline {
  margin-bottom: 16px;
}
.tp-perf--inline:empty {
  display: none;
}

/* --- Suggestions de types performants --- */
.tp-type-suggestions--inline {
  margin-bottom: 16px;
}
.tp-type-suggestions--inline:empty {
  display: none;
}

/* --- Mode chips row --- */
.tp-mode-chips-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tp-mode-chips-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}
.tp-mode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* --- Toolbar unique --- */
.tp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
}
.tp-toolbar__filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tp-toolbar__toggles {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Boutons Ligues / Marchés — état neutre gris */
.tp-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #fff;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1.2;
}
.tp-toolbar-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}
.tp-toolbar-btn.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.tp-toolbar-btn__caret {
  font-size: 0.6rem;
  opacity: 0.5;
  transition: transform 0.2s;
}
.tp-toolbar-btn.is-active .tp-toolbar-btn__caret {
  transform: rotate(180deg);
}

/* Badge nombre de ligues */
.tp-toolbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  border-radius: 9999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0 3px;
  line-height: 1;
}

/* Selects toolbar — état neutre gris */
.tp-toolbar-select {
  padding: 6px 28px 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #fff;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  transition: border-color 0.15s;
}
.tp-toolbar-select:focus {
  border-color: #93c5fd;
  outline: none;
}

/* Toggles toolbar — état neutre gris */
.tp-toolbar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tp-toolbar-toggle input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #1d4ed8;
  cursor: pointer;
}
.tp-toolbar-toggle:has(input:checked) {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* --- Panneaux inline expandables --- */
.tp-inline-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  animation: tp-panel-fadein 0.18s ease;
}
@keyframes tp-panel-fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tp-inline-panel__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}
.tp-inline-panel__footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

/* --- Grille marchés (chips avec checkbox) --- */
.tp-markets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.tp-market-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tp-market-chip input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #1d4ed8;
  cursor: pointer;
}
.tp-market-chip:has(input:checked) {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* --- Section réglage fin (à l'intérieur du panneau marchés) --- */
.tp-adv-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
  margin-top: 8px;
}
.tp-adv-section__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  padding: 4px 0;
  text-align: left;
}
.tp-adv-section__toggle-label {
  white-space: nowrap;
}
.tp-adv-section__meta {
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
  flex: 1;
}

/* --- Rate badge dans les mode chips --- */
.tp-chip-rate {
  display: inline-block;
  margin-left: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 9999px;
  padding: 1px 6px;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s;
}
.tp-chip-rate--pending {
  color: #cbd5e1;
  background: transparent;
  padding: 0;
  font-size: 0.68rem;
}
.tp-mode-chips .tp-mode-chip.is-active .tp-chip-rate {
  background: rgba(255,255,255,0.6);
  color: #1d4ed8;
}
[data-theme="dark"] .tp-chip-rate {
  background: #1e293b;
  color: #475569;
}
[data-theme="dark"] .tp-mode-chips .tp-mode-chip.is-active .tp-chip-rate {
  background: rgba(255,255,255,0.08);
  color: #93c5fd;
}

/* Override mode chips — état neutre cohérent avec le reste */
.tp-mode-chips .tp-mode-chip {
  border-color: #e2e8f0;
  background: #fff;
  color: #475569;
  box-shadow: none;
}
.tp-mode-chips .tp-mode-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}
.tp-mode-chips .tp-mode-chip.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}

/* --- Bouton sm --- */
.tp-btn--sm {
  font-size: 0.75rem;
  padding: 5px 12px;
}

/* --- Dark mode --- */
[data-theme="dark"] .tp-day-summary--inline {
  background: rgba(15,23,42,0.7);
  border-color: #1e293b;
}
[data-theme="dark"] .tp-day-inline-label {
  color: #475569;
}
[data-theme="dark"] .tp-day-summary--inline .tp-day-metric__value {
  color: #e2e8f0;
}
[data-theme="dark"] .tp-toolbar {
  border-top-color: #1e293b;
  border-bottom-color: #1e293b;
}
[data-theme="dark"] .tp-toolbar-btn,
[data-theme="dark"] .tp-toolbar-select,
[data-theme="dark"] .tp-toolbar-toggle {
  background: #0f172a;
  border-color: #1e293b;
  color: #64748b;
}
[data-theme="dark"] .tp-toolbar-btn:hover {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
[data-theme="dark"] .tp-toolbar-btn.is-active,
[data-theme="dark"] .tp-toolbar-toggle:has(input:checked) {
  background: rgba(30,58,138,0.3);
  border-color: rgba(96,165,250,0.3);
  color: #93c5fd;
}
[data-theme="dark"] .tp-inline-panel {
  background: #0f172a;
  border-color: #1e293b;
}
[data-theme="dark"] .tp-inline-panel__title,
[data-theme="dark"] .tp-adv-section__toggle {
  color: #475569;
}
[data-theme="dark"] .tp-inline-panel__footer,
[data-theme="dark"] .tp-adv-section {
  border-color: #1e293b;
}
[data-theme="dark"] .tp-market-chip {
  background: #0f172a;
  border-color: #1e293b;
  color: #475569;
}
[data-theme="dark"] .tp-market-chip:has(input:checked) {
  background: rgba(30,58,138,0.3);
  border-color: rgba(96,165,250,0.3);
  color: #93c5fd;
}
[data-theme="dark"] .tp-toolbar-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23475569' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-theme="dark"] .tp-mode-chips .tp-mode-chip {
  background: #0f172a;
  border-color: #1e293b;
  color: #475569;
}
[data-theme="dark"] .tp-mode-chips .tp-mode-chip:hover {
  background: #1e293b;
  border-color: #334155;
  color: #64748b;
}
[data-theme="dark"] .tp-mode-chips .tp-mode-chip.is-active {
  background: rgba(30,58,138,0.3);
  border-color: rgba(96,165,250,0.3);
  color: #93c5fd;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .tp-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .tp-toolbar__filters,
  .tp-toolbar__toggles {
    gap: 6px;
  }
  .tp-mode-chips-row {
    gap: 8px;
  }
}
