/* TodoPorras — dark palette contract, loaded AFTER every legacy stylesheet.
   Text contrasts meet WCAG AA against the opaque surfaces below.
   Keep result status colors, team shirts, photos and intentional gradients intact. */
html[data-tp-theme="dark"]{
  color-scheme:dark;
  --tp-access-ink:#f5f8f6;
  --tp-access-muted:#b1c5b9;
  --tp-access-bg:#101d17;
  --tp-access-soft:#17271e;
  --tp-access-line:#40574a;
  --tp-card:#101d17;
  --tp-input:#101d17;
  --tp-border:#40574a;
  --tp-ink:#f5f8f6;
  --tp-muted:#b1c5b9;
  --muted:#b1c5b9;
  --tp-line:#40574a;
  --tp-panel:#101d17;
  --tp-panel-2:#17271e;
  --tp-panel-3:#1b3427;
  --panel:#101d17;
  --panel2:#17271e;
  --line:#40574a;
  --tp-dark-action:#62e8a8;
  --tp-dark-action-ink:#05271a;
}
/* Common product surfaces: do not blanket-paint photographic heroes or team jerseys. */
html[data-tp-theme="dark"] :is(
 .tp-metric,.tp-panel,.tp-profile-card,.tp-pool-card,.tp-admin-pool-row,
 .tp-admin-v3-metric,.tp-admin-tab-panel,.tp-admin-rule,
 .tp-contact-row,.tp-organizer-modal,.tp-organizer-promo,
 .tp-action-row,.tp-economic>div,.tp-profile-stats>div,.tp-soft-note,
 .tp-results-view-header,.tp-results-metrics>div,.tp-results-matches,
 .tp-results-rankings,.tp-result-fixture,.tp-results-ranking-row,
 .tp-question-row,.tp-question-card,.tp-season-card,.tp-progress-card,
 .tp-round-state,.tp-fixture-group,.tp-stadium-fixture,
 .tp-gameplay-stat,.tp-save-dock,.tp-ledger-metrics>div,
 .tp-ledger-table-wrap,.tp-ledger-loading,.tp-ledger-empty,
 .tp-discovery-choice,.tp-discovery-admin-card
){
  background:var(--tp-panel)!important;
  border-color:var(--tp-line)!important;
  color:var(--tp-access-ink)!important;
}
/* Nested/subdued rows have their own contrast-preserving second level. */
html[data-tp-theme="dark"] :is(
 .tp-action-row,.tp-economic>div,.tp-profile-stats>div,.tp-soft-note,
 .tp-question-row,.tp-result-fixture,.tp-results-ranking-row,
 .tp-stadium-fixture .tp-fixture-head,.tp-fixture-head,
 .tp-ledger-table thead th,.tp-ledger-table tbody tr,.tp-ledger-table tbody td,
 .tp-board-row,.tp-locked-value,.locked-answer,.tp-filter-pills button,
 .tp-round-history-row
){
  background:var(--tp-panel-2)!important;
  color:var(--tp-access-ink)!important;
  border-color:var(--tp-line)!important;
}
html[data-tp-theme="dark"] :is(
 .tp-page-head,.tp-section-head,.tp-profile-card,.tp-panel,.tp-pool-card,
 .tp-admin-pool-row,.tp-pool-admin-v3,.tp-gameplay-shell,.tp-gameplay-aside,
 .tp-results-view,.tp-ledger-table-wrap,.tp-contact-row,
 .tp-organizer-modal,.tp-organizer-promo,#builderBody,.participant-layout,.survivor-layout
) :is(h1,h2,h3,h4,h5,strong){
  color:var(--tp-access-ink)!important;
  -webkit-text-fill-color:var(--tp-access-ink)!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] :is(
 .tp-page-head,.tp-section-head,.tp-profile-card,.tp-panel,.tp-pool-card,
 .tp-admin-pool-row,.tp-pool-admin-v3,.tp-gameplay-shell,.tp-gameplay-aside,
 .tp-results-view,.tp-ledger-table-wrap,.tp-contact-row,
 .tp-organizer-modal,.tp-organizer-promo,#builderBody,.participant-layout,.survivor-layout
) :is(p,small,.muted,.tp-muted,.tp-description,.tp-help-text){
  color:var(--tp-access-muted)!important;
  -webkit-text-fill-color:var(--tp-access-muted)!important;
  opacity:1!important;
}
/* Preserve specially coloured positive, negative, warning and active-state text. */
html[data-tp-theme="dark"] :is(.tp-gameplay-shell,.tp-pool-admin-v3,.tp-results-view,.tp-panel,.tp-ledger-table-wrap)
 :is(.good,.is-correct,.tp-correct,.tp-correct-pick){color:#74efb5!important;-webkit-text-fill-color:#74efb5!important}
html[data-tp-theme="dark"] :is(.tp-gameplay-shell,.tp-pool-admin-v3,.tp-results-view,.tp-panel,.tp-ledger-table-wrap)
 :is(.bad,.is-incorrect,.tp-incorrect,.tp-incorrect-pick){color:#ffb3b3!important;-webkit-text-fill-color:#ffb3b3!important}

/* Controls: explicit foregrounds even when the UA renders native dark inputs. */
html[data-tp-theme="dark"] :is(
 .tp-shell-v2,.tp-public-landing,.tp-pool-admin-v3,.tp-gameplay-shell,
 .tp-results-view,.tp-organizer-modal,.tp-modal,#builderBody,.wrap,
 .tp-contact-form-card,.tp-profile-card,.tp-auth-panel
) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea){
  background:var(--tp-access-bg)!important;
  color:var(--tp-access-ink)!important;
  -webkit-text-fill-color:var(--tp-access-ink)!important;
  border:1px solid var(--tp-access-line)!important;
  opacity:1;
}
html[data-tp-theme="dark"] :is(input,textarea)::placeholder{
  color:#b3c5bb!important;
  -webkit-text-fill-color:#b3c5bb!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] :is(select,option,textarea,input:not([type="checkbox"])){
  accent-color:var(--tp-dark-action);
}
html[data-tp-theme="dark"] :is(.tp-shell-v2,.tp-public-landing,.wrap,.tp-modal)
 :is(label,legend,.tp-filter-label,.tp-results-filter-label){
  color:var(--tp-access-ink);
  opacity:1;
}
html[data-tp-theme="dark"] :is(
 .tp-btn:not(.primary):not(.danger),.btn:not(.primary):not(.danger),
 .tp-link-btn:not(.danger),.tp-results-refresh,.tp-results-tabs button,
 .tp-filter-pills button,.tp-theme-picker button,
 .tp-discovery-options button,.tp-mode-switch button,
 .tp-auth-tabs button,.tp-public-secondary,.tp-public-login
){
  background:var(--tp-access-soft);
  color:var(--tp-access-ink)!important;
  border-color:var(--tp-access-line);
  -webkit-text-fill-color:var(--tp-access-ink)!important;
}
html[data-tp-theme="dark"] :is(
 .tp-btn.primary,.btn.primary,.tp-public-cta,.tp-public-signup,
 .tp-public-bottom-cta button,.tp-save-dock .tp-btn.primary,
 .tp-focus-card .tp-btn.primary
){
  background:var(--tp-dark-action)!important;
  color:var(--tp-dark-action-ink)!important;
  border-color:#62e8a8!important;
  -webkit-text-fill-color:var(--tp-dark-action-ink)!important;
}
html[data-tp-theme="dark"] :is(
 .tp-btn.primary,.btn.primary,.tp-public-cta,.tp-public-signup,
 .tp-public-bottom-cta button,.tp-save-dock .tp-btn.primary
) :is(span,strong,b,i,svg){color:inherit!important;-webkit-text-fill-color:inherit!important}
html[data-tp-theme="dark"] :is(.tp-btn,.btn,button):disabled:not(.tp-theme-picker button){
  background:#25372d!important;
  color:#b3c5bb!important;
  border-color:#415a4b!important;
  -webkit-text-fill-color:#b3c5bb!important;
  opacity:1!important;
  box-shadow:none!important;
  cursor:not-allowed;
}
html[data-tp-theme="dark"] :is(.tp-btn,.btn,button,a,input,select,textarea,summary):focus-visible{
  outline:3px solid #93d6ff!important;
  outline-offset:3px;
}
html[data-tp-theme="dark"] :is(.tp-results-tabs button.is-active,.tp-filter-pills button.active,.tp-theme-picker button.active,.tp-mode-switch button.active){
  background:#264634!important;
  color:#f5f8f6!important;
  border-color:#6fe9aa!important;
  -webkit-text-fill-color:#f5f8f6!important;
}
html[data-tp-theme="dark"] :is(.tp-pick-three input:checked+span,.tp-team-pick input:checked+span,.tp-shirt-picks input:checked+span,.pick input:checked+span){
  background:#214c35!important;
  color:#ebfff4!important;
  border-color:#6ee9ac!important;
}
html[data-tp-theme="dark"] :is(.tp-pick-three input:checked+span,.tp-team-pick input:checked+span,.tp-shirt-picks input:checked+span,.pick input:checked+span) b{color:#ebfff4!important}

/* Visible active navigation and a player's own position in the leaderboard. */
html[data-tp-theme="dark"] .tp-nav-item.active{
  background:#204c36!important;
  color:#a5f4c9!important;
  border-color:#5ac591!important;
}
html[data-tp-theme="dark"] .tp-results-ranking-row.is-mine{
  background:#203d2e!important;
  border-color:#5ccf96!important;
}
html[data-tp-theme="dark"] :is(.tp-results-ranking-row.is-mine strong,.tp-results-ranking-row.is-mine .tp-results-rank-value){
  color:#f5f8f6!important;
}
/* Navigation and public marketing text unaffected by fixed light-only text colors. */
html[data-tp-theme="dark"] :is(.tp-page-head h1,.tp-section-head h2,.tp3-section-head h2,.tp-public-section-head h2,.tp-public-hero h1,.tp-public-bottom-cta h2){
  color:var(--tp-access-ink)!important;
}
html[data-tp-theme="dark"] :is(.tp-page-head p,.tp-section-head p,.tp3-section-head p,.tp-public-section-head p,.tp-public-hero-copy>p,.tp-public-trust){
  color:var(--tp-access-muted)!important;
}
html[data-tp-theme="dark"] :is(.tp-public-nav a,.tp-nav-item,.tp-global-help-link,.tp-mobile-brand-name){
  color:#c7d9cf!important;
}
html[data-tp-theme="dark"] .tp-public-eyebrow{color:#9ff0bf!important}
html[data-tp-theme="dark"] .tp-public-brand>span b,
html[data-tp-theme="dark"] .tp-mobile-brand-name b{color:#62e8a8!important}
html[data-tp-theme="dark"] :is(.tp-public-hero h1 em,.tp-public-cta span){color:#62e8a8}
html[data-tp-theme="dark"] .tp-public-cta span{color:var(--tp-dark-action-ink)!important}
html[data-tp-theme="dark"] :is(.tp-public-pool-main p,.tp-public-pool-meta,.tp-public-pools-empty p){color:var(--tp-access-muted)!important}

/* Video tutorials: their fixed white cards and navy titles caused white-on-white/black-on-dark islands. */
html[data-tp-theme="dark"] .tp-video-card{
  background:var(--tp-panel)!important;
  border-color:var(--tp-line)!important;
  color:var(--tp-access-ink)!important;
}
html[data-tp-theme="dark"] .tp-video-content h3{color:var(--tp-access-ink)!important}
html[data-tp-theme="dark"] :is(.tp-video-content p,.tp-video-actions a){color:var(--tp-access-muted)!important}
html[data-tp-theme="dark"] .tp-video-audience{color:#91eab5!important}
html[data-tp-theme="dark"] .tp-video-dialog{background:var(--tp-panel);border-color:var(--tp-line);color:var(--tp-access-ink)}
html[data-tp-theme="dark"] .tp-video-dialog-head button{background:var(--tp-panel-2);border-color:var(--tp-line);color:var(--tp-access-ink)}
html[data-tp-theme="dark"] .tp-video-play:not(:disabled){background:#16744e;color:#fff;border-color:#39966b}
html[data-tp-theme="dark"] .tp-video-play:disabled{background:#25372d;color:#b3c5bb;border-color:#415a4b}
html[data-tp-theme="dark"] :is(.tp-video-help-link,.tp-mobile-help-link){
  background:#1b3c2b!important;
  color:#baf4d0!important;
  border-color:#477b5a!important;
  -webkit-text-fill-color:#baf4d0!important;
}
/* OTP and account dialogs use the same dark surfaces: never a glaring white modal. */
html[data-tp-theme="dark"] #tpEmailUnverified{
  background:#29311c;
  border-color:#807641;
  color:#fff1bf;
}
html[data-tp-theme="dark"] #tpEmailUnverified button{
  background:#62e8a8;
  color:#05271a;
}
html[data-tp-theme="dark"] .tp-email-proof-inner{
  background:var(--tp-panel);
  color:var(--tp-access-ink);
  border:1px solid var(--tp-line);
}
html[data-tp-theme="dark"] .tp-email-proof-inner :is(h2,label,p){color:var(--tp-access-ink)}
html[data-tp-theme="dark"] .tp-email-proof-address{color:var(--tp-access-muted)!important}
html[data-tp-theme="dark"] #tpEmailProofCode{
  background:var(--tp-access-bg);
  border-color:var(--tp-access-line);
  color:var(--tp-access-ink);
  -webkit-text-fill-color:var(--tp-access-ink);
}
html[data-tp-theme="dark"] .tp-email-proof-close{background:#24372c;color:#f5f8f6}
html[data-tp-theme="dark"] #tpEmailProofConfirm{background:#62e8a8;color:#05271a}
html[data-tp-theme="dark"] #tpEmailProofResend{color:#92e7ba}
html[data-tp-theme="dark"] #tpEmailProofStatus{color:#f5d38d}
/* Recovery form is embedded in the authentication modal. Preserve accessible contrast. */
html[data-tp-theme="dark"] .tp-recover-form :is(label,.tp-recover-status){color:var(--tp-access-ink)}
html[data-tp-theme="dark"] .tp-recover-form .tp-recover-back,
html[data-tp-theme="dark"] .tp-recover-trigger,
html[data-tp-theme="dark"] #tpAlreadyHaveCode,
html[data-tp-theme="dark"] .tp-signup-verify-actions button{color:#8cf0bd!important}
html[data-tp-theme="dark"] .tp-recover-form .tp-recover-input{background:var(--tp-access-bg);border-color:var(--tp-line);color:var(--tp-access-ink)}
/* Status and ledger tables are truly legible, not flattened into ordinary ink. */
html[data-tp-theme="dark"] :is(.notice:not(.err),.tp-soft-note,.tp-lock-note){
  background:#182e25;
  color:#c2e8d4;
  border-color:#3c6751;
}
html[data-tp-theme="dark"] :is(.notice.err,.tp-results-error){
  background:#351d20;
  color:#ffb7b7;
  border-color:#92565d;
}
html[data-tp-theme="dark"] :is(.tp-ledger-table th,.tp-ledger-table td,.tp-results-rank-value,.tp-admin-stat strong){
  color:var(--tp-access-ink);
  border-color:var(--tp-access-line);
}
html[data-tp-theme="dark"] :is(.tp-ledger-table td small,.tp-ledger-table th,.tp-ledger-metrics span,.tp-contact-main small,.tp-contact-help){
  color:var(--tp-access-muted)!important;
}
@media(max-width:640px){
  html[data-tp-theme="dark"] :is(.tp-btn,.btn,.tp-results-tabs button,.tp-theme-picker button){
    min-height:42px;
  }
  html[data-tp-theme="dark"] :is(.tp-pool-admin-v3,.tp-gameplay-shell,#builderBody,.tp-results-view){
    overflow-wrap:break-word;
  }
}


/* 2026-10-18 — second dark-mode pass.
   Regression: the login submit inherited --navy:#f5f8f6 from the dark
   authentication panel, while its text was white. Disabling the button
   reduced opacity and made white-on-white even harder to read.
   Apply explicit, state-aware colors to the actual auth controls. */
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-auth-panel{
  --navy:#b7dfff;
  --muted:#b1c5b9;
  --line:#40574a;
  color:#f5f8f6!important;
  background:#0d1813!important;
  border:1px solid #40574a;
}
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-auth-sub,
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-auth-legal,
html[data-tp-theme="dark"] #tpAuthBackdrop #tpSignupVerification>p{
  color:#b1c5b9!important;
  -webkit-text-fill-color:#b1c5b9!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-auth-panel label,
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-recover-form label{
  color:#e6f3eb!important;
  -webkit-text-fill-color:#e6f3eb!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-auth-panel :is(.tp-auth-input,.tp-recover-input,select,textarea){
  background:#101d17!important;
  color:#f5f8f6!important;
  -webkit-text-fill-color:#f5f8f6!important;
  border:1px solid #456051!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-auth-panel :is(.tp-auth-input,.tp-recover-input,textarea)::placeholder{
  color:#b1c5b9!important;
  -webkit-text-fill-color:#b1c5b9!important;
  opacity:1!important;
}
/* The active button is green with dark ink; never inherit the light brand/white ink pair. */
html[data-tp-theme="dark"] #tpAuthBackdrop :is(#tpAuthSubmit,#tpVerifySubmit):not(:disabled),
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-recover-submit:not(:disabled){
  background:#62e8a8!important;
  color:#05271a!important;
  -webkit-text-fill-color:#05271a!important;
  border:1px solid #62e8a8!important;
  opacity:1!important;
  box-shadow:0 6px 20px rgba(20,195,116,.13);
}
/* Disabled is a distinct, accessible DARK state; no overall opacity. */
html[data-tp-theme="dark"] #tpAuthBackdrop :is(#tpAuthSubmit,#tpVerifySubmit,.tp-recover-submit):disabled,
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-auth-panel button.tp-auth-submit:disabled,
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-recover-form button:disabled{
  background:#25372d!important;
  color:#d2e4d9!important;
  -webkit-text-fill-color:#d2e4d9!important;
  border:1px solid #4a6755!important;
  opacity:1!important;
  box-shadow:none!important;
  cursor:not-allowed;
}
html[data-tp-theme="dark"] #tpAuthBackdrop :is(#tpAuthSubmit,#tpVerifySubmit,.tp-recover-submit):disabled :is(span,strong,b){
  color:#d2e4d9!important;
  -webkit-text-fill-color:#d2e4d9!important;
}
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-auth-tabs{
  background:#101d17!important;
  border:1px solid #40574a!important;
}
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-auth-tabs button:not(.active){
  background:transparent!important;
  color:#bed2c6!important;
  -webkit-text-fill-color:#bed2c6!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-auth-tabs button.active{
  background:#244d37!important;
  color:#f5f8f6!important;
  -webkit-text-fill-color:#f5f8f6!important;
  border:1px solid #65ce9b!important;
  opacity:1!important;
  box-shadow:0 2px 8px #0003;
}
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-auth-close{
  background:#23372d!important;
  color:#f5f8f6!important;
  -webkit-text-fill-color:#f5f8f6!important;
}
html[data-tp-theme="dark"] #tpAuthBackdrop :is(
  #tpAlreadyHaveCode,#tpResendSignupCode,.tp-recover-trigger,.tp-recover-back,
  .tp-signup-verify-actions button,.tp-auth-code-link
){
  background:transparent!important;
  color:#9df0c3!important;
  -webkit-text-fill-color:#9df0c3!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] #tpAuthBackdrop :is(
  #tpAlreadyHaveCode,#tpResendSignupCode,.tp-recover-trigger,.tp-recover-back
):hover{text-decoration:underline}
/* Auth feedback + password-recovery confirmations. */
html[data-tp-theme="dark"] #tpAuthBackdrop :is(.tp-auth-notice,#authMessage .notice,.tp-recover-success){
  background:#18382a!important;
  border:1px solid #457958!important;
  color:#c8f2db!important;
  -webkit-text-fill-color:#c8f2db!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] #tpAuthBackdrop :is(.tp-auth-notice.error,#authMessage .notice.err,.tp-recover-status.is-error){
  background:#391e22!important;
  border:1px solid #9c5a63!important;
  color:#ffc4c4!important;
  -webkit-text-fill-color:#ffc4c4!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-recover-success :is(h3,p,small,strong){
  color:#d2f8e2!important;
  -webkit-text-fill-color:#d2f8e2!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-recover-success .tp-recover-success-icon{
  background:#62e8a8!important;
  color:#05271a!important;
}
html[data-tp-theme="dark"] #tpAuthBackdrop .tp-recover-status:not(.is-error){
  color:#bdf0d3!important;
  -webkit-text-fill-color:#bdf0d3!important;
}

/* Consistent disabled state for non-auth controls. Note: not the icons/shirts,
   which may intentionally use opaque brand colors. */
html[data-tp-theme="dark"] :is(
  .tp-shell-v2,.tp-pool-admin-v3,.tp-gameplay-shell,#builderBody,
  .tp-organizer-modal,.tpc-modal,.tp-results-view
) :is(button,.btn,.tp-btn,[role="button"]):disabled{
  background:#25372d!important;
  color:#d2e4d9!important;
  -webkit-text-fill-color:#d2e4d9!important;
  border-color:#4a6755!important;
  opacity:1!important;
  box-shadow:none!important;
}
html[data-tp-theme="dark"] :is(.tp-organizer-modal,.tpc-modal,.tp-profile-card,.tp-gameplay-shell)
  :is(.tp-organizer-intro,.tp-organizer-confirm,.tp-organizer-grid label small,.tpc-modal>p,.tpc-modal-loading){
  color:#b1c5b9!important;
  -webkit-text-fill-color:#b1c5b9!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] .tp-organizer-modal :is(.tp-organizer-message.error,.error){
  color:#ffbdbd!important;
  -webkit-text-fill-color:#ffbdbd!important;
}
html[data-tp-theme="dark"] .tp-organizer-modal .tp-organizer-message:not(.error){
  color:#9df0c3!important;
}
html[data-tp-theme="dark"] .tp-organizer-modal :is(input,textarea,select){
  background:#101d17!important;
  color:#f5f8f6!important;
  -webkit-text-fill-color:#f5f8f6!important;
  border-color:#456051!important;
}
html[data-tp-theme="dark"] .tpc-modal :is(.tpc-modal-close,.tpc-secondary-btn){
  background:#17271e!important;
  color:#f5f8f6!important;
  border-color:#40574a!important;
}
html[data-tp-theme="dark"] .tpc-modal--success .tpc-modal-primary:not(:disabled){
  background:#62e8a8!important;
  color:#05271a!important;
  -webkit-text-fill-color:#05271a!important;
  border-color:#62e8a8!important;
}
/* Help actions and text links: green accent on a dark matte background. */
html[data-tp-theme="dark"] :is(
  .tp-video-actions a,.tp-profile-help-card .tp-help-secondary,
  .tp-public-footer a,.tp-link-btn:not(.danger)
){
  color:#9df0c3!important;
  -webkit-text-fill-color:#9df0c3!important;
}
html[data-tp-theme="dark"] :is(
  #tpAuthBackdrop,.tp-organizer-modal,.tpc-modal,.tp-profile-card,
  .tp-pool-admin-v3,.tp-gameplay-shell
) :is(button,a,input,select,textarea,[role="tab"]):focus-visible{
  outline:3px solid #93d6ff!important;
  outline-offset:3px!important;
}
/* Email proof can also disable verification while waiting for the server. */
html[data-tp-theme="dark"] #tpEmailProofConfirm:disabled,
html[data-tp-theme="dark"] #tpEmailUnverified button:disabled{
  background:#25372d!important;
  color:#d2e4d9!important;
  -webkit-text-fill-color:#d2e4d9!important;
  border:1px solid #4a6755!important;
  opacity:1!important;
  box-shadow:none!important;
}
html[data-tp-theme="dark"] #tpEmailProofResend:disabled,
html[data-tp-theme="dark"] #tpResendSignupCode:disabled{
  color:#b1c5b9!important;
  -webkit-text-fill-color:#b1c5b9!important;
  opacity:1!important;
}
/* Do not modify light-mode surfaces or the green/yellow/red semantic chips. */


/* 2026-10-19 | Global UX audit: semantic disabled states.
 * Legacy widgets (competition, survivor, profile, action reviews) previously
 * faded whole cards via opacity, including their texts, after the auth fix.
 * Consistent high contrast MUST win over all earlier component declarations. */
html[data-tp-theme="dark"] :is(.tp-btn,.btn,button):disabled:not(.tp-theme-picker button),
html[data-tp-theme="dark"] :is(.tp-competition-card,.tp-action-review button,.tp-avatar-controls button,.tp-avatar-controls .tp-link-btn):disabled{
  background:#25372d!important;
  color:#d2e4d9!important;
  -webkit-text-fill-color:#d2e4d9!important;
  border:1px solid #4a6755!important;
  opacity:1!important;
  box-shadow:none!important;
  filter:none!important;
  text-shadow:none!important;
  cursor:not-allowed;
}
html[data-tp-theme="dark"] :is(.tp-btn,.btn,button):disabled:not(.tp-theme-picker button)
  :is(span,small,strong,b){
  color:#d2e4d9!important;
  -webkit-text-fill-color:#d2e4d9!important;
  opacity:1!important;
}
/* Native disabled form controls remain readable and clearly unavailable. */
html[data-tp-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select):disabled{
  background:#25372d!important;
  color:#d2e4d9!important;
  -webkit-text-fill-color:#d2e4d9!important;
  border-color:#4a6755!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] :is(input,textarea):disabled::placeholder{
  color:#b6c9be!important;
  -webkit-text-fill-color:#b6c9be!important;
  opacity:1!important;
}
/* Buttons which express unavailability with a class or aria-disabled. */
html[data-tp-theme="dark"] :is(.tp-btn,.btn,.tp-link-btn,.tpc-card-btn)[aria-disabled="true"],
html[data-tp-theme="dark"] :is(.tp-btn,.btn,.tp-link-btn,.tpc-card-btn).is-pending{
  background:#25372d!important;
  color:#d2e4d9!important;
  -webkit-text-fill-color:#d2e4d9!important;
  border-color:#4a6755!important;
  opacity:1!important;
  box-shadow:none!important;
}
/* Survivor/competition may have the selection locked after the deadline:
 * keep the selected team visible instead of painting it like a disabled option. */
html[data-tp-theme="dark"] button.survivor-team-choice:disabled.selected-primary{
  background:#1b4530!important;
  border:2px solid #6decaa!important;
  color:#f5f8f6!important;
  -webkit-text-fill-color:#f5f8f6!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] button.survivor-team-choice:disabled.selected-reserve{
  background:#1d3545!important;
  border:2px solid #91d6ff!important;
  color:#f5f8f6!important;
  -webkit-text-fill-color:#f5f8f6!important;
  opacity:1!important;
}
html[data-tp-theme="dark"] button.survivor-team-choice:disabled:is(.selected-primary,.selected-reserve) small{
  color:#e1f2e8!important;
  -webkit-text-fill-color:#e1f2e8!important;
}
html[data-tp-theme="dark"] button.tp-competition-card.selected:disabled{
  background:#204431!important;
  border-color:#68e4a4!important;
  color:#f5f8f6!important;
  -webkit-text-fill-color:#f5f8f6!important;
}
/* Preserve actual enabled and actionable status: do not neutralize
 * success/error ribbons, checkmarks or valid team-choice outlines. */
html[data-tp-theme="dark"] :is(
  .tp-action-review button,.tp-avatar-controls .tp-link-btn,
  .tp-competition-card,.survivor-team-choice
):disabled:not(.selected-primary):not(.selected-reserve):not(.selected){
  opacity:1!important;
}


/* No animated background/color crossfade when an action becomes available.
 * A fading background combined with immediate -webkit-text-fill-color changes
 * produced a transient dark-on-dark login button, observed in Chromium CI.
 * Keep transform/box-shadow animations only. */
html[data-tp-theme="dark"] :is(button,.btn,.tp-btn,.tp-link-btn,[role="button"]){
  transition-property:transform,box-shadow!important;
}
html[data-tp-theme="dark"] :is(button,.btn,.tp-btn,.tp-link-btn,[role="button"]):disabled{
  transition-duration:0s!important;
}
