/* PUGX shared contrast system. Loaded after page and seasonal styles.
   Pair foreground/background explicitly; never recolor backgrounds alone. */
html[data-pugx-ui] body {
  --read-primary:#276e72; --read-primary-hover:#20585c; --read-primary-text:#fff;
  --read-secondary:#fff; --read-secondary-text:#294651; --read-secondary-border:#879da5;
  --read-secondary-hover:#e5efef; --read-danger:#a52f42; --read-danger-hover:#812436;
  --read-focus:#16718c; --read-muted:#4c626d;
}
html[data-pugx-ui].pugx-holiday-season body {
  --read-primary:#2c5945; --read-primary-hover:#1e4635;
}
html[data-pugx-ui="dark"] body,
html[data-pugx-ui] body:is([data-theme-preset="original"],[data-theme-preset="custom"],[data-draft-theme-preset="original"],[data-draft-theme-preset="custom"],[data-staff-theme="original"]) {
  --read-primary:#285e93; --read-primary-hover:#204b76;
  --read-secondary:#243346; --read-secondary-text:#f0f5fb; --read-secondary-border:#71849b;
  --read-secondary-hover:#354a61; --read-focus:#a9dcff; --read-muted:#aebccd;
}
/* Cover anchors, buttons, dynamically created controls, and all theme presets. */
html[data-pugx-ui] body .button.button,
html[data-pugx-ui] body .button.button.large,
html[data-pugx-ui="ranked"] body button:not(.secondary,.ghost,.danger),
html[data-pugx-ui="dark"] body button {
  color:var(--read-primary-text)!important;background:var(--read-primary)!important;
  border-color:var(--read-primary)!important;text-shadow:none!important;
}
html[data-pugx-ui] body .button.button:hover,
html[data-pugx-ui="ranked"] body button:not(.secondary,.ghost,.danger):hover,
html[data-pugx-ui="dark"] body button:hover {
  color:var(--read-primary-text)!important;background:var(--read-primary-hover)!important;
  border-color:var(--read-primary-hover)!important;filter:none!important;
}
html[data-pugx-ui] body .button.button:is(.secondary,.ghost,.outline),
html[data-pugx-ui="ranked"] body button:is(.secondary,.ghost,.outline),
html[data-pugx-ui="dark"] body button:is(.secondary,.ghost,.outline) {
  color:var(--read-secondary-text)!important;background:var(--read-secondary)!important;
  border-color:var(--read-secondary-border)!important;text-shadow:none!important;
}
html[data-pugx-ui] body .button.button:is(.secondary,.ghost,.outline):hover,
html[data-pugx-ui="ranked"] body button:is(.secondary,.ghost,.outline):hover,
html[data-pugx-ui="dark"] body button:is(.secondary,.ghost,.outline):hover {
  color:var(--read-secondary-text)!important;background:var(--read-secondary-hover)!important;
  border-color:var(--read-secondary-border)!important;
}
html[data-pugx-ui] body .button.button.danger,
html[data-pugx-ui] body button.danger {
  color:#fff!important;background:var(--read-danger)!important;border-color:var(--read-danger)!important;
}
html[data-pugx-ui] body .button.button.danger:hover,
html[data-pugx-ui] body button.danger:hover {
  color:#fff!important;background:var(--read-danger-hover)!important;border-color:var(--read-danger-hover)!important;
}
html[data-pugx-ui] body :is(a,button,input,select,textarea,summary):focus-visible {
  outline:3px solid var(--read-focus)!important;outline-offset:3px!important;
}
/* Don't fade disabled labels until they become illegible. */
html[data-pugx-ui] body .button.button:disabled,
html[data-pugx-ui] body .button.button[aria-disabled="true"],
html[data-pugx-ui="ranked"] body button:disabled,
html[data-pugx-ui="dark"] body button:disabled {
  opacity:1!important;color:var(--read-secondary-text)!important;background:var(--read-secondary-hover)!important;
  border-color:var(--read-secondary-border)!important;cursor:not-allowed!important;box-shadow:none!important;filter:none!important;
}
/* Improve small text on the standard light surfaces; keep custom and dark themes intact. */
html[data-pugx-ui="public"] body .site-header nav a,
html[data-pugx-ui="public"] body .brand small,
html[data-pugx-ui="public"] body .hero p,
html[data-pugx-ui="public"] body .page p,
html[data-pugx-ui="public"] body .card p,
html[data-pugx-ui="public"] body footer,
html[data-pugx-ui="public"] body th,
html[data-pugx-ui="ranked"] body .muted,
html[data-pugx-ui="ranked"] body .topbar nav {color:#4c626d!important}
html[data-pugx-ui] body[data-theme-preset="aero"] :is(.muted,.sidebar-footer),
html[data-pugx-ui] body[data-draft-theme-preset="aero"] .muted,
html[data-pugx-ui] body[data-staff-theme="aero"] .muted {color:#4c626d!important}
html[data-pugx-ui="christmas"] body .section-head .eyebrow {color:#78522d}
html[data-pugx-ui="christmas"] body :is(.intro-bar p,.section-head p,.small-muted,.event-item p,.badge-item p,.advent-item div>span) {color:#4e6155}
html[data-pugx-ui="christmas"] body :is(.event-index,.format,.event-item small,.advent-item small) {color:#765537}
html[data-pugx-ui="christmas"] body .primary-link {color:#17241a!important;background:#d7a461!important}
html[data-pugx-ui="christmas"] body .primary-link:hover {background:#eac38a!important}
html[data-pugx-ui="christmas"] body :is(.holiday-nav,.holiday-hero,footer) :is(a,button):focus-visible {outline-color:#f3d59c!important}
@media(forced-colors:active){html[data-pugx-ui] body :is(a,button,input,select,textarea,summary):focus-visible{outline-color:Highlight!important}}
