/* 30 dni dla Siebie - global text contrast R2
   Cel: zwykłe teksty bez szarej hierarchii kolorystycznej.
   Light -> prawie czarny. Dark -> biały.
   Kolory semantyczne (pomarańczowy, zielony, czerwony itd.) pozostają bez zmian. */

:root{
  --text:#111827!important;
  --muted:#111827!important;
  --site-contrast-text:#111827!important;
  --site-contrast-soft:#111827!important;
}

html[data-theme="dark"]{
  --text:#ffffff!important;
  --muted:#ffffff!important;
  --site-contrast-text:#ffffff!important;
  --site-contrast-soft:#ffffff!important;
}

/* Typowe klasy pomocnicze używane w całym serwisie. */
.muted,
[class*="__muted"],
[class$="-muted"],
[class*=" muted"],
[class*="__caption"],
[class*="__desc"],
[class*="__description"],
[class*="__meta"],
[class*="__summary"],
[class*="__helper"],
[class*="__excerpt"],
[class*="__goal"]{
  color:var(--text)!important;
}

/* Placeholders też mają być czytelne, a nie szare. */
input::placeholder,
textarea::placeholder{
  color:var(--text)!important;
  opacity:1!important;
}

/* Challenge info pages - stare wpisane na sztywno szarości. */
.challenge-story-side__caption,
.challenge-story-step p,
.challenge-story-card p,
.challenge-story-duration span,
.challenge-story-muted,
.challenge-story-details__body,
.challenge-story-faq-list p,
.challenge-story-benefits p,
.challenge-story-related span,
.challenge-story-related__desc{
  color:var(--text)!important;
}

/* Ciemne panele w jasnym motywie nadal potrzebują białego tekstu. */
.challenge-story-inline-cta span,
.challenge-story-mini div small,
.challenge-story-mini__foot,
.challenge-story-final p,
.home-message-card--dark p,
.home-final-cta p,
.home-final-cta__actions>span{
  color:#ffffff!important;
}

/* Home / profile / checkout / support / admin - pozostałe literalne szarości. */
.home-journey-card__text span,
.support-user-row small,
.profile-withdrawal-note,
.profile-withdrawal-tax,
.profile-withdrawal-ack,
.invoice-field>span,
.profile-refund-state,
.admin-accounting__pager,
.admin-accounting__table .is-muted,
.admin-accounting__detail span,
.admin-accounting__tab,
.admin-accounting__task span,
.admin-accounting__table th,
.admin-accounting__table .is-strong,
.admin-accounting__pill,
.r6400-checkout__top p,
.r6400-checkout__section-head p,
.r6400-checkout__facts span,
.r6400-choice label small,
.r6400-invoice-choice small,
.r6400-business-invoice-note small,
.r6400-data-note,
.r6400-order-summary__main small,
.r6400-consent--service small,
.r6400-consent--service b,
.r6400-tpay-note small,
.r6400-fields label,
.r6400-data-note b,
.flashcard-avatar b{
  color:var(--text)!important;
}

/* Puzzle info pages. */
html:not([data-theme="dark"]) .pz-info-final p{
  color:#111827!important;
}
html[data-theme="dark"] .pz-info-final p{
  color:#ffffff!important;
}

/* Ticker i footer - maksymalny kontrast. */
html:not([data-theme="dark"]) .site-info-ticker__brand span,
html:not([data-theme="dark"]) .site-info-ticker__top,
.admin-ticker-preview-wrap.is-preview-light .site-info-ticker__brand span,
.admin-ticker-preview-wrap.is-preview-light .site-info-ticker__top{
  color:#111827!important;
}

html[data-theme="dark"] .site-info-ticker__track,
html[data-theme="dark"] .site-mountain-origin-control,
html[data-theme="dark"] .site-ai-details,
.admin-ticker-preview-wrap.is-preview-dark .site-info-ticker__track{
  color:#ffffff!important;
}

/* FUN FAKT nie może już zmieniać globalnej zmiennej --muted. */
.fun-facts-module,
.fun-facts-card,
.fun-facts-copy{
  --muted:var(--text)!important;
}

/* Drobne metadane, które w części modułów odziedziczały lokalny szary. */
.fun-facts-count,
.fun-facts-footnote,
.home-demo-day__weekday,
.home-gallery-browser__foot,
.home-gallery-modal__foot,
.catalogue-meta,
.catalogue-page-status{
  color:var(--text)!important;
}
