/* Predict2U v184 — official visual identity + performance layer.
   Brand green sampled from the official Predict2U wordmark: #77C41C. */
:root{
  --p2u-brand-green:#77c41c;
  --p2u-brand-green-rgb:119,196,28;
  --p2u-brand-green-dark:#5d9f10;
  --p2u-brand-green-soft:#a8dd62;
  --brand:#77c41c !important;
  --brand-2:#77c41c !important;
  --em:#77c41c !important;
  --em2:#a8dd62 !important;
  --accent:#77c41c !important;
  --green:#77c41c !important;
  --success:#77c41c !important;
  --p2u-health-green:#77c41c !important;
  --p2u-push-green:#77c41c !important;
  --p2u-carousel-duration:96s;
}

/* One green across the entire product. */
.text-emerald-300,.text-emerald-400,.text-emerald-500,
[class*="text-emerald"],.footer-green a,.wl-w,.p2u-brand-text,
.p2u-community-empty a,.p2u-community-fresh-dot+strong{
  color:var(--p2u-brand-green)!important;
}
.bg-emerald-300,.bg-emerald-400,.bg-emerald-500,
[class*="bg-emerald"],button.primary,.btn-primary,.slip-add,
.p2u-push-btn:not(.secondary):not(.danger){
  background-color:var(--p2u-brand-green)!important;
}
.border-emerald-300,.border-emerald-400,.border-emerald-500,
[class*="border-emerald"]{border-color:var(--p2u-brand-green)!important}
input:checked+span,.switch input:checked+span,.p2u-push-toggle input:checked+i{
  border-color:rgba(var(--p2u-brand-green-rgb),.58)!important;
  background:rgba(var(--p2u-brand-green-rgb),.28)!important;
}
.p2u-push-toggle input:checked+i:after{background:var(--p2u-brand-green)!important}

/* Team and league identity. */
.p2u-asset-inline{display:inline-flex;align-items:center;gap:7px;min-width:0;vertical-align:middle}
.p2u-team-crest,.crest-sm{
  width:24px;height:24px;object-fit:contain;flex:0 0 24px;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.34));
}
.p2u-team-crest.p2u-team-crest-lg{width:30px;height:30px;flex-basis:30px}
.p2u-league-flag,.lflag{
  width:22px;height:15px;object-fit:cover;flex:0 0 22px;border-radius:3px;
  box-shadow:0 0 0 1px rgba(255,255,255,.12);
}
.p2u-crest-fallback{
  width:24px;height:27px;flex:0 0 24px;display:inline-grid;place-items:center;
  clip-path:polygon(50% 0,92% 14%,86% 72%,50% 100%,14% 72%,8% 14%);
  background:linear-gradient(145deg,var(--p2u-brand-green),var(--p2u-brand-green-dark));
  color:#071000;font:900 8px/1 Inter,system-ui,sans-serif;letter-spacing:-.02em;
  box-shadow:0 2px 6px rgba(0,0,0,.28);
}
.p2u-flag-fallback{font-size:19px;line-height:1;flex:0 0 auto;filter:saturate(.9)}
.p2u-identity-prefix{display:inline-flex;align-items:center;gap:5px;margin-right:7px;vertical-align:middle}
.p2u-team-pair-prefix{display:inline-flex;align-items:center;gap:4px;margin-right:7px;vertical-align:middle}
.p2u-team-pair-prefix .p2u-team-crest,.p2u-team-pair-prefix .p2u-crest-fallback{width:21px;height:23px;flex-basis:21px}

/* Slow, smooth win carousel. */
.cara{
  animation-duration:var(--p2u-carousel-duration,96s)!important;
  animation-timing-function:linear!important;
  will-change:transform;
  transform:translateZ(0);
}
.cara:hover,.cara:focus-within,.cara[data-paused="true"]{animation-play-state:paused!important}
@media(max-width:640px){:root{--p2u-carousel-duration:116s}.cara-item{gap:9px!important}}
@media(prefers-reduced-motion:reduce){.cara{animation:none!important;transform:none!important;overflow-x:auto;width:100%!important}}

/* Faster rendering below the fold without changing layout. */
@supports(content-visibility:auto){
  main section:not(:first-child),#cards>article,.slip-card,.trust-card,.marketgroup,
  .admin-card,.p2u-push-card,.community-pick-card{
    content-visibility:auto;
    contain-intrinsic-size:auto 320px;
  }
}
img.p2u-team-crest,img.p2u-league-flag,img.crest-sm,img.lflag{content-visibility:auto}

/* Prevent identity additions from causing mobile overflow. */
.p2u-identity-decorated,.p2u-identity-decorated *{min-width:0}
.p2u-identity-decorated{overflow-wrap:anywhere}
@media(max-width:360px){
  .p2u-team-crest,.crest-sm{width:21px;height:21px;flex-basis:21px}
  .p2u-league-flag,.lflag{width:20px;height:14px;flex-basis:20px}
  .p2u-identity-prefix{margin-right:5px;gap:4px}
}


/* Predict2U v188 — crest balance.
   Primary match cards keep one crest per team. Dense tables and repeated Community rows stay text-first. */
:root{--p2u-crest-size:22px;--p2u-crest-pair-size:19px}
.p2u-team-crest,.crest-sm{width:var(--p2u-crest-size)!important;height:var(--p2u-crest-size)!important;flex-basis:var(--p2u-crest-size)!important}
.p2u-team-pair-prefix .p2u-team-crest,.p2u-team-pair-prefix .p2u-crest-fallback{width:var(--p2u-crest-pair-size)!important;height:var(--p2u-crest-pair-size)!important;flex-basis:var(--p2u-crest-pair-size)!important}
.p2u-card-teams>.crest-sm{margin-right:5px}
.p2u-community-page #board .p2u-team-pair-prefix,
.p2u-community-page #board .p2u-identity-prefix:has(.p2u-team-crest),
.p2u-community-page #users-board .p2u-team-pair-prefix,
.p2u-community-page #members .p2u-team-pair-prefix,
.p2u-community-page .lb-row .p2u-team-pair-prefix,
.p2u-community-page .member .p2u-team-pair-prefix,
table .p2u-team-pair-prefix,
.engine-grid .p2u-team-pair-prefix{display:none!important}
.p2u-community-page #top-picks .p2u-team-pair-prefix,
.p2u-community-page #popular .p2u-team-pair-prefix{display:inline-flex!important}
@media(max-width:639px){:root{--p2u-crest-size:20px;--p2u-crest-pair-size:17px}.p2u-card-teams{line-height:1.35}}


/* Predict2U v189 — high-contrast slip action. */
.slip-add,[data-add-slip],#acca-add{
  background:#77C41C!important;color:#071000!important;border:2px solid #77C41C!important;
  font-weight:900!important;text-shadow:none!important;box-shadow:0 0 0 1px rgba(119,196,28,.18),0 6px 18px rgba(0,0,0,.26)!important;
  opacity:1!important;min-height:40px;line-height:1.15;
}
.slip-add:hover,[data-add-slip]:hover,#acca-add:hover{background:#8bd32e!important;border-color:#8bd32e!important;color:#071000!important;filter:none!important}
.slip-add:focus-visible,[data-add-slip]:focus-visible,#acca-add:focus-visible{outline:3px solid rgba(255,255,255,.92)!important;outline-offset:2px!important}
.slip-add[disabled],[data-add-slip][disabled],#acca-add[disabled]{opacity:.48!important;cursor:not-allowed!important}
@media(max-width:360px){.slip-add,[data-add-slip],#acca-add{font-size:12px!important;padding:8px 10px!important}}

/* Predict2U v202 — render only what is near the viewport on long feeds. */
@supports(content-visibility:auto){
  .news-card,.p2u-news-card,.p2u-news-story,.engine-card,.learning-card,
  .community-pick,.community-record,.lb-row,.member,.proof-ledger>*,
  #feed>.slip-card,#board>.slip-card,#top-picks>*{
    content-visibility:auto;
    contain-intrinsic-size:auto 280px;
  }
}
/* Avoid expensive compositing on dozens of repeated cards. */
.news-card,.p2u-news-card,.slip-card,#cards>article{transform:translateZ(0)}
@media(prefers-reduced-motion:reduce){.news-card,.p2u-news-card,.slip-card,#cards>article{transform:none}}
