/* SimplyIrfan Magazine v2.10.68 — WCAG AA contrast corrections.
   Loaded after all component styles so the audited components receive stable
   foreground colors in both color schemes. Keep image-overlay metadata separate. */

/* Light mode: dark neutral text on the theme's light surfaces. */
html:not([data-theme="dark"]) body .home-favorite-item time,
html:not([data-theme="dark"]) body .home-related-item time,
html:not([data-theme="dark"]) body .si-shared-sidebar .home-favorite-item time,
html:not([data-theme="dark"]) body .si-shared-sidebar .home-related-item time,
html:not([data-theme="dark"]) body .si-read-also .si-read-also-meta,
html:not([data-theme="dark"]) body .si-read-also .si-read-also-meta time,
html:not([data-theme="dark"]) body .si-read-also .si-read-also-comments,
html:not([data-theme="dark"]) body.single-post .comment-notes,
html:not([data-theme="dark"]) body.single-post .comment-form label,
html:not([data-theme="dark"]) body.single-post .si-post-tags,
html:not([data-theme="dark"]) body.single-post .si-post-tags strong,
html:not([data-theme="dark"]) body .home-newsletter-widget p,
html:not([data-theme="dark"]) body .home-newsletter-widget .newsletter-setup-note,
html:not([data-theme="dark"]) body .si-shared-sidebar .home-newsletter-widget p,
html:not([data-theme="dark"]) body .si-shared-sidebar .newsletter-setup-note {
  color: #334155 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

/* Dark mode: pale neutral text on dark surfaces. */
html[data-theme="dark"] body .home-favorite-item time,
html[data-theme="dark"] body .home-related-item time,
html[data-theme="dark"] body .si-shared-sidebar .home-favorite-item time,
html[data-theme="dark"] body .si-shared-sidebar .home-related-item time,
html[data-theme="dark"] body .si-read-also .si-read-also-meta,
html[data-theme="dark"] body .si-read-also .si-read-also-meta time,
html[data-theme="dark"] body .si-read-also .si-read-also-comments,
html[data-theme="dark"] body.single-post .comment-notes,
html[data-theme="dark"] body.single-post .comment-form label,
html[data-theme="dark"] body.single-post .si-post-tags,
html[data-theme="dark"] body.single-post .si-post-tags strong,
html[data-theme="dark"] body .home-newsletter-widget p,
html[data-theme="dark"] body .home-newsletter-widget .newsletter-setup-note,
html[data-theme="dark"] body .si-shared-sidebar .home-newsletter-widget p,
html[data-theme="dark"] body .si-shared-sidebar .newsletter-setup-note {
  color: #e2e8f0 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

/* Read Also panel: explicit foregrounds for all text, links and metadata. */
html:not([data-theme="dark"]) body .si-read-also,
html:not([data-theme="dark"]) body .si-read-also h2,
html:not([data-theme="dark"]) body .si-read-also h3,
html:not([data-theme="dark"]) body .si-read-also h3 a {
  color: #1f2937 !important;
}
html[data-theme="dark"] body .si-read-also,
html[data-theme="dark"] body .si-read-also h2,
html[data-theme="dark"] body .si-read-also h3,
html[data-theme="dark"] body .si-read-also h3 a {
  color: #f8fafc !important;
}

/* Widget titles and post titles remain high contrast on their own surfaces. */
html:not([data-theme="dark"]) body .home-favorite-widget,
html:not([data-theme="dark"]) body .home-related-widget,
html:not([data-theme="dark"]) body .home-newsletter-widget,
html:not([data-theme="dark"]) body .home-favorite-widget h2,
html:not([data-theme="dark"]) body .home-related-widget h2,
html:not([data-theme="dark"]) body .home-favorite-item h3,
html:not([data-theme="dark"]) body .home-related-item h3 {
  color: #1f2937;
}
html[data-theme="dark"] body .home-favorite-widget,
html[data-theme="dark"] body .home-related-widget,
html[data-theme="dark"] body .home-newsletter-widget,
html[data-theme="dark"] body .home-favorite-widget h2,
html[data-theme="dark"] body .home-related-widget h2,
html[data-theme="dark"] body .home-favorite-item h3,
html[data-theme="dark"] body .home-related-item h3 {
  color: #f1f5f9;
}

/* Comment submit: dark enough red to maintain AA contrast with white text. */
body.single-post .comment-form .si-comment-submit,
body.single-post input#submit.si-comment-submit {
  color: #ffffff !important;
  background: #b4233b !important;
  border: 1px solid #8f1d30 !important;
  opacity: 1 !important;
}
body.single-post .comment-form .si-comment-submit:hover,
body.single-post input#submit.si-comment-submit:hover,
body.single-post .comment-form .si-comment-submit:focus-visible,
body.single-post input#submit.si-comment-submit:focus-visible {
  color: #ffffff !important;
  background: #8f1d30 !important;
}

/* Form helper text and placeholders should not rely on low-opacity defaults. */
body.single-post .comment-form textarea::placeholder,
body.single-post .comment-form input::placeholder {
  opacity: 1 !important;
}
html:not([data-theme="dark"]) body.single-post .comment-form textarea::placeholder,
html:not([data-theme="dark"]) body.single-post .comment-form input::placeholder {
  color: #475569 !important;
}
html[data-theme="dark"] body.single-post .comment-form textarea::placeholder,
html[data-theme="dark"] body.single-post .comment-form input::placeholder {
  color: #cbd5e1 !important;
}

/* v2.10.79 — sitewide metadata contrast (WCAG AA for normal-size text).
   Keep image-overlay metadata white; these rules target metadata on page/card surfaces. */
html:not([data-theme="dark"]) body .traditional-meta,
html:not([data-theme="dark"]) body .traditional-meta > *,
html:not([data-theme="dark"]) body .traditional-meta a,
html:not([data-theme="dark"]) body .meta-line,
html:not([data-theme="dark"]) body .archive-card-copy .meta-line,
html:not([data-theme="dark"]) body .si-archive-card__body .traditional-meta,
html:not([data-theme="dark"]) body .si-archive-card__body .traditional-meta *,
html:not([data-theme="dark"]) body .si-single-published,
html:not([data-theme="dark"]) body .si-single-meta-row,
html:not([data-theme="dark"]) body .si-single-meta-row *,
html:not([data-theme="dark"]) body .si-single-reading-time,
html:not([data-theme="dark"]) body .single-meta,
html:not([data-theme="dark"]) body .single-meta small,
html:not([data-theme="dark"]) body .si-mobile-byline-copy small,
html:not([data-theme="dark"]) body .si-read-also-meta,
html:not([data-theme="dark"]) body .si-read-also-meta *,
html:not([data-theme="dark"]) body .si-related-copy small,
html:not([data-theme="dark"]) body .si-homepage--hero_only .hero-only-meta,
html:not([data-theme="dark"]) body .si-homepage--hero_only .hero-only-meta *,
html:not([data-theme="dark"]) body .si-static-feature-date,
html:not([data-theme="dark"]) body .si-author-profile-copy .si-author-profile-meta,
html:not([data-theme="dark"]) body .si-author-profile-copy .si-author-profile-meta * {
  color: #475569 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-theme="dark"] body .traditional-meta,
html[data-theme="dark"] body .traditional-meta > *,
html[data-theme="dark"] body .traditional-meta a,
html[data-theme="dark"] body .meta-line,
html[data-theme="dark"] body .archive-card-copy .meta-line,
html[data-theme="dark"] body .si-archive-card__body .traditional-meta,
html[data-theme="dark"] body .si-archive-card__body .traditional-meta *,
html[data-theme="dark"] body .si-single-published,
html[data-theme="dark"] body .si-single-meta-row,
html[data-theme="dark"] body .si-single-meta-row *,
html[data-theme="dark"] body .si-single-reading-time,
html[data-theme="dark"] body .single-meta,
html[data-theme="dark"] body .single-meta small,
html[data-theme="dark"] body .si-mobile-byline-copy small,
html[data-theme="dark"] body .si-read-also-meta,
html[data-theme="dark"] body .si-read-also-meta *,
html[data-theme="dark"] body .si-related-copy small,
html[data-theme="dark"] body .si-homepage--hero_only .hero-only-meta,
html[data-theme="dark"] body .si-homepage--hero_only .hero-only-meta *,
html[data-theme="dark"] body .si-static-feature-date,
html[data-theme="dark"] body .si-author-profile-copy .si-author-profile-meta,
html[data-theme="dark"] body .si-author-profile-copy .si-author-profile-meta * {
  color: #cbd5e1 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

/* Homepage compact/list bylines and ordinary card dates not using traditional-meta. */
html:not([data-theme="dark"]) body .latest-byline,
html:not([data-theme="dark"]) body .strip-card time,
html:not([data-theme="dark"]) body .editor-card time,
html:not([data-theme="dark"]) body .brief-copy time,
html:not([data-theme="dark"]) body .si-home-cards--list .latest-byline,
html:not([data-theme="dark"]) body .si-home-cards--list .strip-card time,
html:not([data-theme="dark"]) body .si-home-cards--list .editor-card time,
html:not([data-theme="dark"]) body .si-home-cards--list .editor-card .eyebrow {
  color: #475569 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] body .latest-byline,
html[data-theme="dark"] body .strip-card time,
html[data-theme="dark"] body .editor-card time,
html[data-theme="dark"] body .brief-copy time,
html[data-theme="dark"] body .si-home-cards--list .latest-byline,
html[data-theme="dark"] body .si-home-cards--list .strip-card time,
html[data-theme="dark"] body .si-home-cards--list .editor-card time,
html[data-theme="dark"] body .si-home-cards--list .editor-card .eyebrow {
  color: #cbd5e1 !important;
  opacity: 1 !important;
}

/* Image-overlay metadata retains its deliberately light foreground. */
.home .home-strip-section .story-strip.si-home-cards--grid > .strip-card .strip-card-meta,
.home .home-strip-section .story-strip.si-home-cards--grid > .strip-card .strip-card-meta *,
.si-homepage--hero_only .hero-only-feature-meta,
.si-homepage--hero_only .hero-only-feature-meta * {
  color: rgba(255,255,255,.96) !important;
  opacity: 1 !important;
}
