/* ATLAS — contrast repairs, November 2026.
 * Load after the existing public/admin stylesheets. This layer changes colours
 * and keyboard-focus indicators only; layout, image sizing and behaviour stay
 * in the existing stylesheets. Scoped !important declarations below counter
 * legacy !important colour rules; they are not a global text-colour reset.
 */

/* Small text must remain readable on white and pale institutional surfaces. */
body.atlas-v5{
  --atlas-muted:#52667a;
  --atlas-faint:#52667a;
  --muted:#52667a;
}
body.atlas-v5 .eyebrow,
body.atlas-v5 .more,
body.atlas-v5 .section-head .link{color:#006f86!important}

/* v5 made these heroes white, while older category rules retained pale text. */
body.atlas-v5 .page-hero .eyebrow,
body.atlas-v5 .partner-hero .eyebrow,
body.atlas-v5 .partner-intro-grid .eyebrow{color:#0b6076!important}

/* v5 also made both academy pathway cards white. The second card's previous
 * dark-surface typography had higher specificity than the new theme. */
body.atlas-v5 .pathway-card{color:#34495f}
body.atlas-v5 .pathway-card:nth-child(2) h1,
body.atlas-v5 .pathway-card:nth-child(2) h2,
body.atlas-v5 .pathway-card:nth-child(2) h3{color:#10243c!important}
body.atlas-v5 .pathway-card:nth-child(2) p{color:#52667a!important}
body.atlas-v5 .pathway-card:nth-child(2) .eyebrow{color:#006f86!important}
body.atlas-v5 .pathway-card:nth-child(2) .tag-cloud span{
  color:#41576c!important;
  background:#f7f9fb!important;
  border-color:#dfe7ee!important;
}
body.atlas-v5 .tag-cloud a.brand-tag{color:#193b57}
body.atlas-v5 .tag-cloud a.brand-tag:hover{color:#10243c}

/* Header, cards, documents, membership and report metadata. */
body.atlas-v5 .language-switch,
body.atlas-v5 .language-switch a:not(.active),
body.atlas-v5 .mega-intro p,
body.atlas-v5 .mega-links span,
body.atlas-v5 .mega-columns span,
body.atlas-v5 .event-meta,
body.atlas-v5 .article-meta,
body.atlas-v5 .academy-detail summary small,
body.atlas-v5 .level-track span,
body.atlas-v5 .membership-card small,
body.atlas-v5 .person p,
body.atlas-v5 .doc p,
body.atlas-v5 .brand-tile:not(.dark) span,
body.atlas-v5 .partner-facts small,
body.atlas-v5 .info-box>span,
body.atlas-v5 .atlas-home-hero .stat span,
body.atlas-v5 .working-group-home-card>span,
body.atlas-v5 .institutional-facts dt,
body.atlas-v5 .wg-chair-public>span,
body.atlas-v5 .report-meta span,
body.atlas-v5 .report-chapter small,
body.atlas-v5 .report-home-facts span{color:#52667a}
body.atlas-v5 .ecosystem-code{color:#52667a!important}
body.atlas-v5 .mega-intro small,
body.atlas-v5 .mega-columns small,
body.atlas-v5 .committee .doc-type,
body.atlas-v5 .doc .doc-type,
body.atlas-v5 .doc a,
body.atlas-v5 .partner-feature b,
body.atlas-v5 .report-cover-card span b,
body.atlas-v5 .report-principle>span,
body.atlas-v5 .report-reader-fallback a,
body.atlas-v5 .check a{color:#006f86}
body.atlas-v5 .membership-card .vote{color:#00677d}

/* Working-group accent colours remain on borders and illustrations. Darken
 * small numeric/category text so a bright custom accent cannot obscure it. */
body.atlas-v5 .wg-goal-item>span,
body.atlas-v5 .wg-list-body>span,
body.atlas-v5 .wg-roadmap b,
body.atlas-v5 .wg-axis-card>span{
  color:#174b75;
  color:color-mix(in srgb,var(--wg-accent,#006f86) 30%,#10243c);
}

/* Preserve genuinely dark sections, including existing congress heroes. */
body.atlas-v5 :is(.ecosystem-band,.academy-dark,.ecosystem-cta,.trust-main,.partner-dark,.partner-band-grid,.partner-cta,.catalog-promo,.wg-dark,.wg-leadership-card) .eyebrow,
body.atlas-v5 :is(.ecosystem-band,.academy-dark,.ecosystem-cta,.trust-main,.partner-dark,.partner-band-grid,.partner-cta,.catalog-promo,.wg-dark,.wg-leadership-card) .more,
body.atlas-v5 :is(.ecosystem-band,.academy-dark,.ecosystem-cta,.trust-main,.partner-dark,.partner-band-grid,.partner-cta,.catalog-promo,.wg-dark) .section-head .link{color:#73ecf7!important}
body.atlas-v5 .wg-leadership-card h3{color:#fff}

/* White text on turquoise controls previously fell below 4.5:1. */
body.atlas-v5 .btn-teal{background:#006f86;color:#fff}
body.atlas-v5 .btn-teal:hover{background:#00586b;color:#fff}
body.atlas-v5 .academy-num{background:linear-gradient(135deg,#071b35,#006f86);color:#fff}

/* Congress listing/detail labels: keep the poster and dark hero untouched. */
body.atlas-v5 .atlas-event-period-links a:not(.is-active),
body.atlas-v5 .atlas-event-result-count,
body.atlas-v5 .atlas-feature-facts dt,
body.atlas-v5 .atlas-feature-top>span:last-child,
body.atlas-v5 .atlas-catalog-location,
body.atlas-v5 .atlas-catalog-tags span+span,
body.atlas-v5 .atlas-detail-section-heading>span:last-child,
body.atlas-v5 .atlas-detail-info-card dt,
body.atlas-v5 .atlas-event-contact-card p{color:#52667a}

/* Administrative surfaces are separate from the public theme. */
.admin-shell{--muted:#52667a}
.admin-shell .table th,
.admin-shell .settings-section-head p,
.admin-shell .dashboard-stat small,
.admin-shell .health-list small,
.admin-shell .catalog-admin-copy small,
.admin-shell .catalog-order,
.admin-shell .repair-stats span,
.admin-shell .sentinel-meta span,
.admin-shell .sentinel-policy p,
.admin-shell .sentinel-capabilities span,
.admin-shell .bulk-chip.ghost,
.admin-shell .bulk-counter,
.admin-shell .empty-state,
.admin-shell .event-admin-item div span,
.admin-shell .event-poster-help,
.admin-shell .admin-brand-card small{color:#52667a}
.admin-shell .badge:not(.live){color:#52667a}
.admin-shell .event-admin-banner .badge{color:#fff}
.admin-shell .risk-badge.medium{color:#70590a}
.admin-shell .admin-kicker,
.admin-shell .row-link,
.admin-shell .empty-state a,
.admin-shell .quick-grid a b,
.admin-shell .admin-brand-card a{color:#006f86}
.admin-shell .btn.teal{background:linear-gradient(135deg,#006f86,#07566b);color:#fff}
.admin-shell .admin-nav .sep{color:#a6bdcf}
.admin-shell .dashboard-welcome .admin-kicker,
.admin-shell .sentinel-hero .admin-kicker{color:#73ecf7}
.admin-shell .event-admin-item .date-chip span{color:#d7f8fc}

/* Login uses its own header but the same stylesheet can be loaded there. */
.login-page-v2 .login-kicker.dark{color:#006f86}
.login-page-v2 .login-intro,
.login-page-v2 .login-input-wrap>span,
.login-page-v2 .login-links,
.login-page-v2 .login-security-note{color:#52667a}

body.atlas-v5 input::placeholder,
body.atlas-v5 textarea::placeholder,
.admin-shell input::placeholder,
.admin-shell textarea::placeholder,
.login-page-v2 input::placeholder{color:#52667a;opacity:1}

/* Solid focus rings replace the low-contrast translucent public outline.
 * Explicit light/dark scopes keep keyboard focus visible in both contexts. */
body.atlas-v5 :is(a,button,input,select,textarea,summary):focus-visible,
.admin-shell :is(a,button,input,select,textarea,summary):focus-visible,
.login-page-v2 :is(a,button,input,select,textarea,summary):focus-visible{
  outline:3px solid #007995!important;
  outline-offset:3px!important;
}
body.atlas-v5 :is(.site-footer,.ecosystem-band,.academy-dark,.ecosystem-cta,.trust-main,.partner-dark,.partner-band-grid,.partner-cta,.catalog-promo,.wg-dark,.wg-leadership-card,.atlas-events-hero,.atlas-detail-hero,.atlas-poster-dialog) :is(a,button,input,select,textarea,summary):focus-visible,
.admin-shell :is(.sidebar,.dashboard-welcome,.sentinel-hero,.save-dock) :is(a,button,input,select,textarea,summary):focus-visible,
.login-page-v2 .login-brand-panel :is(a,button):focus-visible{outline-color:#73ecf7!important}

/* Honour the visitor's operating-system high-contrast colour palette. */
@media(forced-colors:active){
  body.atlas-v5 :is(a,button,input,select,textarea,summary):focus-visible,
  .admin-shell :is(a,button,input,select,textarea,summary):focus-visible,
  .login-page-v2 :is(a,button,input,select,textarea,summary):focus-visible{
    outline-color:Highlight!important;
  }
}
