/* Day/night global theme vs dark-hub / light-doc shell contrast fixes */

html.mc-theme-night {
  --mc-warm-panel-ink: #111110;
  --mc-warm-panel-muted: rgba(17, 17, 16, 0.55);
  --mc-warm-panel-faint: rgba(17, 17, 16, 0.22);
}

/* -------------------------------------------------------------------------- */
/* Day mode: dark overview hubs (shell stays "dark" but page is light)        */
/* -------------------------------------------------------------------------- */

html.mc-theme-day body.mc-assets-overview,
html.mc-day-mode body.mc-assets-overview {
  --mc-assets-overview-bg: var(--mc-day-hub-bg);
  --mc-assets-overview-ink: var(--mc-day-hub-ink);
  background: var(--mc-day-hub-bg);
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-assets-overview .mc-page,
html.mc-day-mode body.mc-assets-overview .mc-page,
html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark,
html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-gl-main,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-gl-main {
  background: var(--mc-day-hub-bg);
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-gl-sidebar,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-gl-sidebar {
  background: var(--mc-day-hub-bg);
  border-right-color: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-gl-sidebar__kicker,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-gl-sidebar__kicker,
html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__group-toggle,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__group-toggle,
html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__link,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__link,
html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__link--overview,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__link--overview {
  color: var(--mc-day-hub-muted);
}

html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__group-toggle,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__group-toggle {
  border-top-color: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__group-toggle:hover,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__group-toggle:hover,
html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__link:hover,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__link:hover {
  background: var(--mc-day-hub-hover);
  color: var(--mc-day-hub-ink);
  text-decoration-color: currentColor;
}

html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__link.is-active,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__link.is-active,
html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__link--overview.is-active,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-gl-nav__link--overview.is-active {
  background: transparent;
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-id-page__rule,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-id-page__rule,
html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-id-explore-rows li,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-id-explore-rows li,
html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-id-straight,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-id-straight {
  border-color: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark .mc-assets-straight .mc-gl-card,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark .mc-assets-straight .mc-gl-card {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-assets-overview .mc-gl--assets-dark a:not(.mc-cta-pill-host--ready) .mc-id-explore-rows__cta,
html.mc-day-mode body.mc-assets-overview .mc-gl--assets-dark a:not(.mc-cta-pill-host--ready) .mc-id-explore-rows__cta {
  border-color: var(--mc-day-hub-ink);
  background: var(--mc-day-hub-surface);
  color: var(--mc-day-hub-ink);
}

/* Dark overview hubs - body + sidebar (identity, guidelines, learn, diy) */
html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) {
  background: var(--mc-day-hub-bg);
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) .mc-page,
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) .mc-page,
html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) [class*="mc-gl--"][class*="-dark"] .mc-gl-main,
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) [class*="mc-gl--"][class*="-dark"] .mc-gl-main {
  background: var(--mc-day-hub-bg);
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) [class*="mc-gl--"][class*="-dark"] .mc-gl-sidebar,
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) [class*="mc-gl--"][class*="-dark"] .mc-gl-sidebar {
  background: var(--mc-day-hub-bg);
  border-right-color: var(--mc-day-hub-border);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) [class*="mc-gl--"][class*="-dark"] :is(
    .mc-gl-sidebar__kicker,
    .mc-gl-nav__group-toggle,
    .mc-gl-nav__group-label,
    .mc-gl-nav__section-label,
    .mc-gl-nav__link,
    .mc-gl-nav__link--overview,
    .mc-gl-nav__link--group-page
  ),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) [class*="mc-gl--"][class*="-dark"] :is(
    .mc-gl-sidebar__kicker,
    .mc-gl-nav__group-toggle,
    .mc-gl-nav__group-label,
    .mc-gl-nav__section-label,
    .mc-gl-nav__link,
    .mc-gl-nav__link--overview,
    .mc-gl-nav__link--group-page
  ) {
  color: var(--mc-day-hub-muted);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) [class*="mc-gl--"][class*="-dark"] .mc-gl-nav__group-toggle,
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) [class*="mc-gl--"][class*="-dark"] .mc-gl-nav__group-toggle {
  border-top-color: var(--mc-day-hub-border);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) [class*="mc-gl--"][class*="-dark"] :is(
    .mc-gl-nav__group-toggle:hover,
    .mc-gl-nav__link:hover
  ),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) [class*="mc-gl--"][class*="-dark"] :is(
    .mc-gl-nav__group-toggle:hover,
    .mc-gl-nav__link:hover
  ) {
  background: var(--mc-day-hub-hover);
  color: var(--mc-day-hub-ink);
  text-decoration-color: currentColor;
  opacity: 1;
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) [class*="mc-gl--"][class*="-dark"] :is(
    .mc-gl-nav__link.is-active,
    .mc-gl-nav__link--overview.is-active,
    .mc-gl-nav__link--group-page.is-active
  ),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) [class*="mc-gl--"][class*="-dark"] :is(
    .mc-gl-nav__link.is-active,
    .mc-gl-nav__link--overview.is-active,
    .mc-gl-nav__link--group-page.is-active
  ) {
  background: transparent;
  color: var(--mc-day-hub-ink);
  opacity: 1;
}

/* Guidelines overview content */
html.mc-theme-day body.mc-guidelines-overview :is(
    .mc-gl-page--overview,
    .mc-gl-overview-head__title,
    .mc-gl-page__title
  ),
html.mc-day-mode body.mc-guidelines-overview :is(
    .mc-gl-page--overview,
    .mc-gl-overview-head__title,
    .mc-gl-page__title
  ) {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-guidelines-overview :is(
    .mc-gl-overview-head__lead,
    .mc-gl-page__lead
  ),
html.mc-day-mode body.mc-guidelines-overview :is(
    .mc-gl-overview-head__lead,
    .mc-gl-page__lead
  ) {
  color: var(--mc-day-hub-soft);
  border-left-color: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-guidelines-overview .mc-gl-overview-head__lead,
html.mc-day-mode body.mc-guidelines-overview .mc-gl-overview-head__lead {
  border-left-color: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-guidelines-overview .mc-gl-explore :is(a, .mc-gl-explore__label),
html.mc-day-mode body.mc-guidelines-overview .mc-gl-explore :is(a, .mc-gl-explore__label) {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-guidelines-overview .mc-gl-explore li,
html.mc-day-mode body.mc-guidelines-overview .mc-gl-explore li {
  border-color: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-guidelines-overview a:not(.mc-cta-pill-host--ready) .mc-gl-explore__cta,
html.mc-day-mode body.mc-guidelines-overview a:not(.mc-cta-pill-host--ready) .mc-gl-explore__cta {
  border: 1px solid var(--mc-day-hub-ink);
  background: var(--mc-day-hub-surface);
  color: var(--mc-day-hub-ink);
}

/* DIY overview content */
html.mc-theme-day body.mc-diy-overview :is(
    .mc-gl-page--overview,
    .mc-gl-page__title,
    .mc-gl-page__head--diy .mc-gl-page__title
  ),
html.mc-day-mode body.mc-diy-overview :is(
    .mc-gl-page--overview,
    .mc-gl-page__title,
    .mc-gl-page__head--diy .mc-gl-page__title
  ) {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-diy-overview :is(.mc-gl-page__lead, .mc-gl-page__body, .mc-gl-intro__lead--diy),
html.mc-day-mode body.mc-diy-overview :is(.mc-gl-page__lead, .mc-gl-page__body, .mc-gl-intro__lead--diy) {
  color: var(--mc-day-hub-soft);
}

/* Identity / Guidelines / Learn / DIY dark hub content in day mode */
html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) .mc-id-page,
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) .mc-id-page {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) :is(
    .mc-id-page__title,
    .mc-id-page__lead,
    .mc-id-page__kicker,
    .mc-id-explore-rows a,
    .mc-id-explore-rows__label,
    .mc-id-straight__label,
    .mc-id-card__label,
    .mc-gl-card__label,
    .mc-gl-pillar__title,
    .mc-learn-hub-block__title
  ),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) :is(
    .mc-id-page__title,
    .mc-id-page__lead,
    .mc-id-page__kicker,
    .mc-id-explore-rows a,
    .mc-id-explore-rows__label,
    .mc-id-straight__label,
    .mc-id-card__label,
    .mc-gl-card__label,
    .mc-gl-pillar__title,
    .mc-learn-hub-block__title
  ) {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) :is(
    .mc-gl-pillar__desc,
    .mc-learn-hub-block__kicker,
    .mc-gl-section-label--learn
  ),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) :is(
    .mc-gl-pillar__desc,
    .mc-learn-hub-block__kicker,
    .mc-gl-section-label--learn
  ) {
  color: var(--mc-day-hub-soft);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) :is(
    .mc-id-page__rule,
    .mc-id-explore-rows li,
    .mc-id-straight
  ),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) :is(
    .mc-id-page__rule,
    .mc-id-explore-rows li,
    .mc-id-straight
  ) {
  border-color: var(--mc-day-hub-border);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) a:not(.mc-cta-pill-host--ready) .mc-id-explore-rows__cta,
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) a:not(.mc-cta-pill-host--ready) .mc-id-explore-rows__cta {
  border-color: var(--mc-day-hub-ink);
  background: var(--mc-day-hub-surface);
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) .mc-id-explore-rows li,
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) .mc-id-explore-rows li {
  border-color: var(--mc-day-hub-border);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) .mc-id-page__kicker,
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview) .mc-id-page__kicker {
  color: var(--mc-day-hub-soft);
}

/* Legacy learn-only sidebar block superseded by unified hub sidebar rules above */
html.mc-theme-day body.mc-learn-overview .mc-gl--learn-dark .mc-gl-sidebar,
html.mc-day-mode body.mc-learn-overview .mc-gl--learn-dark .mc-gl-sidebar {
  background: var(--mc-day-hub-bg);
  border-right-color: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-learn-overview .mc-gl--learn-dark .mc-gl-sidebar__kicker,
html.mc-day-mode body.mc-learn-overview .mc-gl--learn-dark .mc-gl-sidebar__kicker,
html.mc-theme-day body.mc-learn-overview .mc-gl--learn-dark .mc-gl-nav__group-toggle,
html.mc-day-mode body.mc-learn-overview .mc-gl--learn-dark .mc-gl-nav__group-toggle,
html.mc-theme-day body.mc-learn-overview .mc-gl--learn-dark .mc-gl-nav__link,
html.mc-day-mode body.mc-learn-overview .mc-gl--learn-dark .mc-gl-nav__link {
  color: var(--mc-day-hub-muted);
}

html.mc-theme-day body.mc-learn-overview .mc-gl--learn-dark .mc-gl-nav__group-toggle,
html.mc-day-mode body.mc-learn-overview .mc-gl--learn-dark .mc-gl-nav__group-toggle {
  border-top-color: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-learn-overview .mc-gl--learn-dark .mc-gl-nav__link:hover,
html.mc-day-mode body.mc-learn-overview .mc-gl--learn-dark .mc-gl-nav__link:hover {
  background: var(--mc-day-hub-hover);
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-learn-overview .mc-gl--learn-dark .mc-gl-nav__link.is-active,
html.mc-day-mode body.mc-learn-overview .mc-gl--learn-dark .mc-gl-nav__link.is-active {
  background: transparent;
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-id-pager__link:not(.mc-cta-pill-host--ready) .mc-id-pager__label,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-id-pager__link:not(.mc-cta-pill-host--ready) .mc-id-pager__label,
html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-pager__link:not(.mc-cta-pill-host--ready) .mc-gl-pager__label,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-pager__link:not(.mc-cta-pill-host--ready) .mc-gl-pager__label,
html.mc-theme-day body.mc-diy-overview .mc-gl--diy-dark .mc-id-pager__label,
html.mc-day-mode body.mc-diy-overview .mc-gl--diy-dark .mc-id-pager__label,
html.mc-theme-day body.mc-diy-overview .mc-gl--diy-dark .mc-gl-pager__label,
html.mc-day-mode body.mc-diy-overview .mc-gl--diy-dark .mc-gl-pager__label {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-id-pager__link:not(.mc-cta-pill-host--ready) .mc-id-pager__kicker,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-id-pager__link:not(.mc-cta-pill-host--ready) .mc-id-pager__kicker,
html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-pager__link:not(.mc-cta-pill-host--ready) .mc-gl-pager__kicker,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-pager__link:not(.mc-cta-pill-host--ready) .mc-gl-pager__kicker {
  color: var(--mc-day-hub-muted);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-id-pager__link.mc-cta-pill-host--ready,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-id-pager__link.mc-cta-pill-host--ready,
html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-pager__link.mc-cta-pill-host--ready,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-pager__link.mc-cta-pill-host--ready {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-id-footer__line,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-id-footer__line,
html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-footer__line,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-footer__line,
html.mc-theme-day body.mc-diy-overview .mc-gl--diy-dark .mc-id-footer__line,
html.mc-day-mode body.mc-diy-overview .mc-gl--diy-dark .mc-id-footer__line,
html.mc-theme-day body.mc-diy-overview .mc-gl--diy-dark .mc-gl-footer__line,
html.mc-day-mode body.mc-diy-overview .mc-gl--diy-dark .mc-gl-footer__line {
  background: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-id-pager__divider,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-id-pager__divider,
html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-pager__divider,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-pager__divider {
  background: var(--mc-day-hub-border);
}

/* DIY doc pages (category / detail) in day mode */
html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-main :is(
    .mc-diy-doc-head__title,
    .mc-id-page__title,
    .mc-diy-straight__title,
    .mc-diy-straight__label,
    .mc-diy-detail__kicker,
    .mc-gl-page--diy-soon .mc-gl-page__title
  ),
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-main :is(
    .mc-diy-doc-head__title,
    .mc-id-page__title,
    .mc-diy-straight__title,
    .mc-diy-straight__label,
    .mc-diy-detail__kicker,
    .mc-gl-page--diy-soon .mc-gl-page__title
  ) {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-main :is(
    .mc-id-page__lead,
    .mc-diy-asset__label,
    .mc-diy-detail__feedback,
    .mc-gl-page--diy-soon .mc-gl-soon__lead,
    .mc-gl-page--diy-soon .mc-gl-page__kicker
  ),
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-main :is(
    .mc-id-page__lead,
    .mc-diy-asset__label,
    .mc-diy-detail__feedback,
    .mc-gl-page--diy-soon .mc-gl-soon__lead,
    .mc-gl-page--diy-soon .mc-gl-page__kicker
  ) {
  color: var(--mc-day-hub-soft);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark :is(
    .mc-diy-category__kicker,
    .mc-id-page__kicker,
    .mc-gl-sidebar__kicker
  ),
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark :is(
    .mc-diy-category__kicker,
    .mc-id-page__kicker,
    .mc-gl-sidebar__kicker
  ) {
  color: var(--mc-day-hub-muted);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-diy-asset:hover .mc-diy-asset__label,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-diy-asset:hover .mc-diy-asset__label {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark :is(
    .mc-diy-straight,
    .mc-diy-straight__block + .mc-diy-straight__block,
    .mc-diy-detail__hero
  ),
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark :is(
    .mc-diy-straight,
    .mc-diy-straight__block + .mc-diy-straight__block,
    .mc-diy-detail__hero
  ) {
  border-color: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-page__modified,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-page__modified {
  color: var(--mc-day-hub-muted);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-footer--diy :is(
    .mc-gl-footer__note,
    .mc-gl-footer__modified,
    .mc-gl-footer__next-kicker
  ),
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-footer--diy :is(
    .mc-gl-footer__note,
    .mc-gl-footer__modified,
    .mc-gl-footer__next-kicker
  ) {
  color: var(--mc-day-hub-muted);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-footer--diy .mc-gl-footer__next,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-footer--diy .mc-gl-footer__next {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-footer--diy .mc-gl-footer__watermark,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-footer--diy .mc-gl-footer__watermark {
  color: rgba(15, 23, 42, 0.06);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-page--diy-soon .mc-gl-soon__back,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-page--diy-soon .mc-gl-soon__back {
  border-color: var(--mc-day-hub-border);
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-section-diy .mc-gl--diy-dark .mc-gl-page--diy-soon .mc-gl-soon__back:hover,
html.mc-day-mode body.mc-section-diy .mc-gl--diy-dark .mc-gl-page--diy-soon .mc-gl-soon__back:hover {
  border-color: var(--mc-day-hub-ink);
}

/* Overview hub footers in day mode */
html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__watermark,
    .mc-id-footer__watermark
  ),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__watermark,
    .mc-id-footer__watermark
  ) {
  color: rgba(15, 23, 42, 0.06);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__note,
    .mc-id-footer__note
  ),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__note,
    .mc-id-footer__note
  ) {
  color: var(--mc-day-hub-soft);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__modified,
    .mc-id-doc-foot__modified
  ),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__modified,
    .mc-id-doc-foot__modified
  ) {
  color: var(--mc-day-hub-muted);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__line,
    .mc-id-footer__line
  ),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__line,
    .mc-id-footer__line
  ) {
  background: var(--mc-day-hub-border);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) .mc-gl-footer__next:not(.mc-cta-pill-host--ready),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) .mc-gl-footer__next:not(.mc-cta-pill-host--ready) {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) .mc-gl-footer__next:not(.mc-cta-pill-host--ready) .mc-gl-footer__next-kicker,
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) .mc-gl-footer__next:not(.mc-cta-pill-host--ready) .mc-gl-footer__next-kicker {
  color: var(--mc-day-hub-muted);
}

/* Doc pager pills on light shells in day mode */
html.mc-theme-day :is(
    .mc-gl--identity-light,
    .mc-gl--guidelines-light,
    .mc-gl--learn-light,
    .mc-gl--diy-light,
    .mc-gl--assets-light
  ) :is(
    .mc-id-pager__link.mc-cta-pill-host--ready,
    .mc-gl-pager__link.mc-cta-pill-host--ready
  ),
html.mc-day-mode :is(
    .mc-gl--identity-light,
    .mc-gl--guidelines-light,
    .mc-gl--learn-light,
    .mc-gl--diy-light,
    .mc-gl--assets-light
  ) :is(
    .mc-id-pager__link.mc-cta-pill-host--ready,
    .mc-gl-pager__link.mc-cta-pill-host--ready
  ) {
  --mc-cta-pill-ink-rest: #111827;
  --mc-cta-pill-ink: #f8fafc;
  --mc-cta-indicator-bg: rgba(15, 23, 42, 0.07);
  --mc-cta-indicator-ring: rgba(15, 23, 42, 0.12);
  --mc-cta-indicator-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  --mc-cta-indicator-bg-hover: rgba(15, 23, 42, 0.92);
  --mc-cta-indicator-ring-hover: rgba(15, 23, 42, 0.2);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__next.mc-cta-pill-host--ready,
    .mc-id-footer__next.mc-cta-pill-host--ready
  ),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__next.mc-cta-pill-host--ready,
    .mc-id-footer__next.mc-cta-pill-host--ready
  ) {
  --mc-cta-pill-ink-rest: #111827;
  --mc-cta-pill-ink: #f8fafc;
  --mc-cta-indicator-bg: rgba(15, 23, 42, 0.07);
  --mc-cta-indicator-ring: rgba(15, 23, 42, 0.12);
  --mc-cta-indicator-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  --mc-cta-indicator-bg-hover: rgba(15, 23, 42, 0.92);
  --mc-cta-indicator-ring-hover: rgba(15, 23, 42, 0.2);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__next.mc-cta-pill-host--ready,
    .mc-id-footer__next.mc-cta-pill-host--ready
  ) :is(.mc-gl-footer__next-label, .mc-id-footer__next-label),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__next.mc-cta-pill-host--ready,
    .mc-id-footer__next.mc-cta-pill-host--ready
  ) :is(.mc-gl-footer__next-label, .mc-id-footer__next-label) {
  color: var(--mc-cta-pill-ink-rest, #111827);
}

html.mc-theme-day body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__next.mc-cta-pill-host--ready,
    .mc-id-footer__next.mc-cta-pill-host--ready
  ) :is(.mc-gl-footer__next-kicker, .mc-id-footer__next-kicker),
html.mc-day-mode body:is(.mc-identity-overview, .mc-guidelines-overview, .mc-learn-overview, .mc-diy-overview, .mc-assets-overview) :is(
    .mc-gl-footer__next.mc-cta-pill-host--ready,
    .mc-id-footer__next.mc-cta-pill-host--ready
  ) :is(.mc-gl-footer__next-kicker, .mc-id-footer__next-kicker) {
  color: color-mix(in srgb, var(--mc-cta-pill-ink-rest, #111827) 72%, transparent);
}

html.mc-theme-day body.mc-section-home .mc-home-footer__watermark,
html.mc-day-mode body.mc-section-home .mc-home-footer__watermark {
  color: rgba(15, 23, 42, 0.06);
}

/* -------------------------------------------------------------------------- */
/* Night mode: light doc shells (hardcoded #111110 and warm panels)           */
/* -------------------------------------------------------------------------- */

html.mc-theme-night .mc-gl--identity-light .mc-gl-main :is(
    .mc-id-split--intro .mc-id-split__title,
    .mc-id-split--intro .mc-id-split__quote p,
    .mc-id-split--row .mc-id-split__title,
    .mc-id-split--row .mc-id-split__subtitle,
    .mc-id-split--row .mc-id-split__body,
    .mc-id-apply--foundation .mc-id-apply__title,
    .mc-id-apply--foundation .mc-id-apply__lead,
    .mc-id-doc-head__title,
    .mc-id-doc-head__lead,
    .mc-id-competency__title,
    .mc-id-competency__lead,
    .mc-id-culture-head__title,
    .mc-id-story__title,
    .mc-id-story__lead,
    .mc-id-bv-story__title,
    .mc-id-bv-story__body,
    .mc-id-personality__title,
    .mc-id-personality__lead
  ) {
  color: var(--mc-theme-ink);
}

html.mc-theme-night .mc-gl--identity-light .mc-gl-main :is(
    .mc-id-competency__body,
    .mc-id-competency__skills-label,
    .mc-id-competency__skills-list li,
    .mc-id-culture-head__body p,
    .mc-id-culture-head__closing,
    .mc-id-culture-head__intro
  ) {
  color: var(--mc-theme-soft);
}

html.mc-theme-night .mc-gl--identity-light .mc-gl-main :is(
    .mc-id-split--intro .mc-id-split__body,
    .mc-id-culture-head__body,
    .mc-id-split--row,
    .mc-id-competency--bordered
  ) {
  border-color: var(--mc-theme-border);
}

html.mc-theme-night .mc-gl--identity-light .mc-id-focus .mc-id-focus__word.is-active,
html.mc-theme-night .mc-gl--identity-light .mc-id-focus .mc-id-focus__word.is-active:hover {
  color: var(--mc-warm-panel-ink);
}

html.mc-theme-night .mc-gl--identity-light .mc-id-focus .mc-id-focus__word:not(.is-active) {
  color: var(--mc-warm-panel-faint);
}

html.mc-theme-night .mc-gl--identity-light .mc-id-focus .mc-id-focus__word:hover:not(.is-active) {
  color: var(--mc-warm-panel-muted);
}

html.mc-theme-night .mc-gl--identity-light .mc-gl-main .mc-id-pillar__banner,
html.mc-theme-night .mc-gl--identity-light .mc-gl-main .mc-id-pillar__banner .mc-id-pillar__headline {
  color: var(--mc-warm-panel-ink);
}

html.mc-theme-night .mc-gl--guidelines-light .mc-gl-page,
html.mc-theme-night .mc-gl--learn-light .mc-gl-page,
html.mc-theme-night .mc-gl--assets-light .mc-gl-page,
html.mc-theme-night .mc-gl--diy-light .mc-gl-page {
  color: var(--mc-theme-soft);
}

html.mc-theme-night .mc-gl--guidelines-light .mc-gl-page :is(
    [class*="__title"],
    [class*="__head__title"],
    .mc-gl-doc-head__title,
    .mc-gl-principle-head__title,
    .mc-gl-page__title
  ),
html.mc-theme-night .mc-gl--learn-light .mc-gl-page :is(
    [class*="__title"],
    .mc-learn-doc-head__title,
    .mc-gl-page__title
  ),
html.mc-theme-night .mc-gl--assets-light .mc-gl-page :is(
    .mc-assets-library__title,
    .mc-assets-collection-head__title,
    .mc-gl-page__title
  ),
html.mc-theme-night .mc-gl--diy-light .mc-gl-page :is(
    [class*="__title"],
    .mc-gl-page__title
  ) {
  color: var(--mc-theme-ink);
}

html.mc-theme-night .mc-gl--guidelines-light .mc-gl-page :is(
    [class*="__lead"],
    [class*="__body"],
    .mc-gl-doc-head__body,
    .mc-gl-page__body
  ),
html.mc-theme-night .mc-gl--learn-light .mc-gl-page :is(
    [class*="__lead"],
    [class*="__body"],
    .mc-learn-doc-head__lead
  ),
html.mc-theme-night .mc-gl--assets-light .mc-gl-page :is(
    .mc-assets-library__count,
    .mc-assets-collection-head__lead
  ),
html.mc-theme-night .mc-gl--diy-light .mc-gl-page :is(
    [class*="__lead"],
    [class*="__body"]
  ) {
  color: var(--mc-theme-soft);
}

/* Assets hub library pages - night: sidebar, panels, tiles */
html.mc-theme-night body.mc-section-assets-hub .mc-gl--assets-light .mc-gl-sidebar__kicker,
html.mc-theme-night body.mc-section-assets-hub .mc-gl--assets-light .mc-gl-nav__group-toggle,
html.mc-theme-night body.mc-section-assets-hub .mc-gl--assets-light .mc-gl-nav__link {
  color: var(--mc-theme-soft);
}

html.mc-theme-night body.mc-section-assets-hub .mc-gl--assets-light .mc-gl-nav__link.is-active,
html.mc-theme-night body.mc-section-assets-hub .mc-gl--assets-light .mc-gl-nav__link:hover,
html.mc-theme-night body.mc-section-assets-hub .mc-gl--assets-light .mc-gl-nav__group-toggle:hover {
  color: var(--mc-theme-ink);
}

html.mc-theme-night body.mc-section-assets-hub .mc-gl--assets-light .mc-gl-nav__link--group-page {
  color: var(--mc-theme-muted);
}

html.mc-theme-night body.mc-section-assets-hub .mc-gl--assets-light .mc-gl-nav__link--group-page.is-active,
html.mc-theme-night body.mc-section-assets-hub .mc-gl--assets-light .mc-gl-nav__link--group-page:hover {
  color: var(--mc-theme-ink);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images :is(
    .mc-assets-page-intro__lead,
    .mc-assets-library__count,
    .mc-assets-collection-head__kicker,
    .mc-assets-collection__count,
    .mc-assets-collection__category
  ) {
  color: var(--mc-theme-soft);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-section-panel {
  background: var(--mc-theme-surface);
  border-color: var(--mc-theme-border);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-image-tile {
  border-color: var(--mc-theme-border);
  background: var(--mc-theme-surface);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-image-tile__bar {
  background: var(--mc-theme-surface);
  border-top-color: var(--mc-theme-border);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-image-tile__filename {
  color: var(--mc-theme-ink);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-image-tile__meta {
  color: var(--mc-theme-muted);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-search {
  border-color: var(--mc-theme-border);
  background: color-mix(in srgb, var(--mc-theme-surface) 88%, transparent);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-search__input {
  color: var(--mc-theme-ink);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-search__input::placeholder {
  color: var(--mc-theme-muted);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-search__icon {
  color: var(--mc-theme-muted);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-filter {
  border-color: var(--mc-theme-border);
  background: color-mix(in srgb, var(--mc-theme-surface) 88%, transparent);
  color: var(--mc-theme-ink);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-sort__toggle {
  border-color: var(--mc-theme-border);
  background: color-mix(in srgb, var(--mc-theme-surface) 88%, transparent);
  color: var(--mc-theme-ink);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-sort__value,
html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-sort__icon,
html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-sort__glyph {
  color: var(--mc-theme-ink);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-action-btn {
  background: color-mix(in srgb, var(--mc-theme-ink) 12%, var(--mc-theme-surface));
  color: var(--mc-theme-ink);
  border: 1px solid var(--mc-theme-border);
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-action-btn:hover {
  background: color-mix(in srgb, var(--mc-theme-ink) 18%, var(--mc-theme-surface));
}

html.mc-theme-night .mc-gl--assets-light .mc-gl-page--images .mc-assets-collection__label {
  color: var(--mc-theme-ink);
}

/* Light illustration panels inside night doc pages keep dark ink on warm surfaces */
html.mc-theme-night .mc-gl--guidelines-light .mc-gl-page :is(
    [class*="--card-bg"],
    [class*="__card"]
  ) {
  --mc-gl-illus-workflow-card-bg: #eceae4;
}

html.mc-theme-night .mc-gl--guidelines-light .mc-gl-page [style*="background: #f0f0eb"],
html.mc-theme-night .mc-gl--guidelines-light .mc-gl-page [style*="background:#f0f0eb"] {
  color: var(--mc-warm-panel-ink);
}

/* About section - night: beat hardcoded slate copy */
html.mc-theme-night body.mc-section-about :is(
    .mc-ab-doc__title,
    .mc-ab-doc__headline,
    .mc-ab-doc__tagline,
    .mc-ab-purpose-block__title,
    .mc-ab-statement,
    .mc-ab-proof__title,
    .mc-ab-vision__title,
    .mc-ab-pyramid__text,
    .mc-ab-related__label
  ) {
  color: var(--mc-theme-ink);
}

html.mc-theme-night body.mc-section-about :is(
    .mc-ab-doc__lead,
    .mc-ab-doc__p,
    .mc-ab-list__item,
    .mc-ab-proof__item,
    .mc-ab-vision__text,
    .mc-ab-pyramid__tag,
    .mc-ab-related__link
  ) {
  color: var(--mc-theme-soft);
}

html.mc-theme-night body.mc-section-about .mc-ab-nav__link {
  color: var(--mc-theme-muted);
}

html.mc-theme-night body.mc-section-about .mc-ab-nav__link:hover,
html.mc-theme-night body.mc-section-about .mc-ab-nav__link.is-active {
  color: var(--mc-theme-ink);
}

html.mc-theme-night body.mc-section-about .mc-ab-nav__link--sub {
  color: var(--mc-theme-soft);
}

html.mc-theme-night body.mc-section-about .mc-ab-nav__link--sub.is-active {
  color: var(--mc-theme-ink);
}

/* -------------------------------------------------------------------------- */
/* Day mode: dark portal shells (wiki + developer)                            */
/* -------------------------------------------------------------------------- */

html.mc-theme-day body.mc-section-wiki .mc-wiki,
html.mc-day-mode body.mc-section-wiki .mc-wiki,
html.mc-theme-day body.mc-section-wiki .mc-gl--wiki-dark,
html.mc-day-mode body.mc-section-wiki .mc-gl--wiki-dark {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-section-wiki .mc-wiki :is(
    .mc-wiki-portals__title,
    .mc-wiki-portals__link,
    .mc-wiki-section-title,
    .mc-wiki-recent__link,
    .mc-wiki-doc__title,
    .mc-wiki-doc-head__title,
    .mc-wiki-changelog__summary,
    .mc-wiki-glossary__term,
    .mc-wiki-faq__q,
    .mc-wiki-playbook-card__title,
    .mc-wiki-handoff-card__title,
    .mc-wiki-search-results__title,
    .mc-wiki-empty
  ),
html.mc-day-mode body.mc-section-wiki .mc-wiki :is(
    .mc-wiki-portals__title,
    .mc-wiki-portals__link,
    .mc-wiki-section-title,
    .mc-wiki-recent__link,
    .mc-wiki-doc__title,
    .mc-wiki-doc-head__title,
    .mc-wiki-changelog__summary,
    .mc-wiki-glossary__term,
    .mc-wiki-faq__q,
    .mc-wiki-playbook-card__title,
    .mc-wiki-handoff-card__title,
    .mc-wiki-search-results__title,
    .mc-wiki-empty
  ) {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-section-wiki .mc-wiki :is(
    .mc-wiki-portals__desc,
    .mc-wiki-recent__date,
    .mc-wiki-recent__more,
    .mc-wiki-doc__lead,
    .mc-wiki-doc-head__lead,
    .mc-wiki-changelog__meta,
    .mc-wiki-glossary__def,
    .mc-wiki-glossary__related,
    .mc-wiki-faq__a,
    .mc-wiki-playbook-card__excerpt,
    .mc-wiki-playbook-card__duration,
    .mc-wiki-handoff-card__lead,
    .mc-wiki-search-results__summary,
    .mc-wiki-search-count,
    .mc-wiki-foot__modified,
    .mc-wiki-foot__dna,
    .mc-wiki-crumb a
  ),
html.mc-day-mode body.mc-section-wiki .mc-wiki :is(
    .mc-wiki-portals__desc,
    .mc-wiki-recent__date,
    .mc-wiki-recent__more,
    .mc-wiki-doc__lead,
    .mc-wiki-doc-head__lead,
    .mc-wiki-changelog__meta,
    .mc-wiki-glossary__def,
    .mc-wiki-glossary__related,
    .mc-wiki-faq__a,
    .mc-wiki-playbook-card__excerpt,
    .mc-wiki-playbook-card__duration,
    .mc-wiki-handoff-card__lead,
    .mc-wiki-search-results__summary,
    .mc-wiki-search-count,
    .mc-wiki-foot__modified,
    .mc-wiki-foot__dna,
    .mc-wiki-crumb a
  ) {
  color: var(--mc-day-hub-soft);
}

html.mc-theme-day body.mc-section-wiki .mc-wiki-topbar__icon,
html.mc-day-mode body.mc-section-wiki .mc-wiki-topbar__icon {
  color: var(--mc-day-hub-muted);
}

html.mc-theme-day body.mc-section-wiki .mc-wiki-topbar__icon:hover,
html.mc-day-mode body.mc-section-wiki .mc-wiki-topbar__icon:hover {
  color: var(--mc-day-hub-ink);
  background: var(--mc-day-hub-hover);
}

html.mc-theme-day body.mc-section-wiki .mc-wiki :is(
    .mc-wiki-rule,
    .mc-wiki-changelog__item,
    .mc-wiki-glossary__row,
    .mc-wiki-faq__item
  ),
html.mc-day-mode body.mc-section-wiki .mc-wiki :is(
    .mc-wiki-rule,
    .mc-wiki-changelog__item,
    .mc-wiki-glossary__row,
    .mc-wiki-faq__item
  ) {
  border-color: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-section-developer .mc-dev,
html.mc-day-mode body.mc-section-developer .mc-dev {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-section-developer .mc-dev :is(
    .mc-dev-home__col-title,
    .mc-dev-extend__title,
    .mc-dev-extend__card-title,
    .mc-dev-connectors__title,
    .mc-dev-connectors__label,
    .mc-dev-section__title,
    .mc-dev-ref-type__name,
    .mc-dev-search__title,
    .mc-dev-assistant__msg--user,
    .mc-dev-assistant__msg--bot
  ),
html.mc-day-mode body.mc-section-developer .mc-dev :is(
    .mc-dev-home__col-title,
    .mc-dev-extend__title,
    .mc-dev-extend__card-title,
    .mc-dev-connectors__title,
    .mc-dev-connectors__label,
    .mc-dev-section__title,
    .mc-dev-ref-type__name,
    .mc-dev-search__title,
    .mc-dev-assistant__msg--user,
    .mc-dev-assistant__msg--bot
  ) {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-section-developer .mc-dev :is(
    .mc-dev-home__kicker,
    .mc-dev-extend__kicker,
    .mc-dev-nav__group-toggle,
    .mc-dev-quicktools__link,
    .mc-dev-search__count,
    .mc-dev-explorer__label,
    .mc-dev-foot__modified,
    .mc-dev-empty
  ),
html.mc-day-mode body.mc-section-developer .mc-dev :is(
    .mc-dev-home__kicker,
    .mc-dev-extend__kicker,
    .mc-dev-nav__group-toggle,
    .mc-dev-quicktools__link,
    .mc-dev-search__count,
    .mc-dev-explorer__label,
    .mc-dev-foot__modified,
    .mc-dev-empty
  ) {
  color: var(--mc-day-hub-muted);
}

html.mc-theme-day body.mc-section-developer .mc-dev :is(
    .mc-dev-home__col-desc,
    .mc-dev-extend__card-desc,
    .mc-dev-connectors__desc,
    .mc-dev-section__body,
    .mc-dev-search__summary,
    .mc-dev-ref-list
  ),
html.mc-day-mode body.mc-section-developer .mc-dev :is(
    .mc-dev-home__col-desc,
    .mc-dev-extend__card-desc,
    .mc-dev-connectors__desc,
    .mc-dev-section__body,
    .mc-dev-search__summary,
    .mc-dev-ref-list
  ) {
  color: var(--mc-day-hub-soft);
}

html.mc-theme-day body.mc-section-developer .mc-dev-nav__group-toggle:hover,
html.mc-day-mode body.mc-section-developer .mc-dev-nav__group-toggle:hover,
html.mc-theme-day body.mc-section-developer .mc-dev-quicktools__link:hover,
html.mc-day-mode body.mc-section-developer .mc-dev-quicktools__link:hover,
html.mc-theme-day body.mc-section-developer .mc-dev-quicktools__link.is-active,
html.mc-day-mode body.mc-section-developer .mc-dev-quicktools__link.is-active {
  color: var(--mc-day-hub-ink);
}

html.mc-theme-day body.mc-section-developer .mc-dev :is(
    .mc-dev-rule,
    .mc-dev-quicktools,
    .mc-dev-connectors__item
  ),
html.mc-day-mode body.mc-section-developer .mc-dev :is(
    .mc-dev-rule,
    .mc-dev-quicktools,
    .mc-dev-connectors__item
  ) {
  border-color: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-section-developer .mc-dev :is(
    .mc-dev-search__input,
    .mc-dev-explorer__input,
    .mc-dev-assistant__input
  ),
html.mc-day-mode body.mc-section-developer .mc-dev :is(
    .mc-dev-search__input,
    .mc-dev-explorer__input,
    .mc-dev-assistant__input
  ) {
  background: var(--mc-day-hub-surface);
  color: var(--mc-day-hub-ink);
  border: 1px solid var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-section-developer .mc-dev-assistant__chip,
html.mc-day-mode body.mc-section-developer .mc-dev-assistant__chip {
  color: var(--mc-day-hub-muted);
  border-color: var(--mc-day-hub-border);
}

html.mc-theme-day body.mc-section-developer .mc-dev-assistant__chip:hover,
html.mc-day-mode body.mc-section-developer .mc-dev-assistant__chip:hover {
  color: var(--mc-day-hub-ink);
  border-color: rgba(0, 48, 222, 0.35);
}

/* -------------------------------------------------------------------------- */
/* Night mode: light portal shells (enablement + security)                    */
/* -------------------------------------------------------------------------- */

html.mc-theme-night body.mc-section-enablement .mc-en :is(
    .mc-en-hero__title,
    .mc-en-whatsnew__title,
    .mc-en-page__title,
    .mc-en-page__lead,
    .mc-en-page__body,
    .mc-en-intro__lead,
    .mc-en-list__link,
    .mc-en-foot__modified
  ) {
  color: var(--mc-theme-ink);
}

html.mc-theme-night body.mc-section-enablement .mc-en :is(
    .mc-en-page__lead,
    .mc-en-page__body,
    .mc-en-intro__lead,
    .mc-en-foot__modified
  ) {
  color: var(--mc-theme-soft);
}

html.mc-theme-night body.mc-section-enablement .mc-en-rule,
html.mc-theme-night body.mc-section-enablement .mc-en-foot,
html.mc-theme-night body.mc-section-enablement .mc-en-list__item {
  border-color: var(--mc-theme-border);
}

html.mc-theme-night body.mc-section-enablement .mc-en-topnav__menu {
  background: var(--mc-theme-surface);
  border-color: var(--mc-theme-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

html.mc-theme-night body.mc-section-enablement .mc-en-topnav__menu-link {
  color: var(--mc-theme-muted);
}

html.mc-theme-night body.mc-section-enablement .mc-en-topnav__menu-link:hover {
  background: var(--mc-theme-hover);
  color: var(--mc-theme-ink);
}

html.mc-theme-night body.mc-section-enablement .mc-en :is(
    .mc-en-news-card,
    .mc-en-card
  ) {
  background: #ebe8e2;
  color: var(--mc-warm-panel-ink);
}

html.mc-theme-night body.mc-section-enablement .mc-en-news-card__media {
  background: #ddd8d0;
}

html.mc-theme-night body.mc-section-enablement .mc-en :is(
    .mc-en-news-card__title,
    .mc-en-card__title
  ) {
  color: var(--mc-warm-panel-ink);
}

html.mc-theme-night body.mc-section-enablement .mc-en :is(
    .mc-en-news-card__excerpt,
    .mc-en-news-card__tag,
    .mc-en-card__desc
  ) {
  color: var(--mc-warm-panel-muted);
}

html.mc-theme-night body.mc-section-enablement .mc-en-news-card__date {
  color: var(--mc-warm-panel-faint);
}

html.mc-theme-night body.mc-section-security .mc-sec :is(
    .mc-sec-hero__title,
    .mc-sec-doc__title,
    .mc-sec-section__title,
    .mc-sec-spotlight__title,
    .mc-sec-pillars__title,
    .mc-sec-spotlight__label,
    .mc-sec-pillar__label,
    .mc-sec-playbook__title,
    .mc-sec-search__title,
    .mc-sec-compliance__name,
    .mc-sec-faq__q
  ) {
  color: var(--mc-theme-ink);
}

html.mc-theme-night body.mc-section-security .mc-sec :is(
    .mc-sec-home__lead,
    .mc-sec-doc__lead,
    .mc-sec-section__body,
    .mc-sec-pillar__desc,
    .mc-sec-playbook__text,
    .mc-sec-compliance__note,
    .mc-sec-faq__a,
    .mc-sec-search__summary,
    .mc-sec-foot__modified,
    .mc-sec-trust__label
  ) {
  color: var(--mc-theme-soft);
}

html.mc-theme-night body.mc-section-security .mc-sec-sidebar {
  background: var(--mc-theme-surface);
  border-right-color: var(--mc-theme-border);
}

html.mc-theme-night body.mc-section-security .mc-sec :is(
    .mc-sec-quicktools__link,
    .mc-sec-nav__link,
    .mc-sec-nav__group-toggle
  ) {
  color: var(--mc-theme-muted);
}

html.mc-theme-night body.mc-section-security .mc-sec-quicktools__link:hover,
html.mc-theme-night body.mc-section-security .mc-sec-quicktools__link.is-active,
html.mc-theme-night body.mc-section-security .mc-sec-nav__link:hover,
html.mc-theme-night body.mc-section-security .mc-sec-nav__link.is-active,
html.mc-theme-night body.mc-section-security .mc-sec-nav__group-toggle:hover {
  color: var(--mc-theme-ink);
  background: var(--mc-theme-hover);
}

html.mc-theme-night body.mc-section-security .mc-sec :is(
    .mc-sec-spotlight__card,
    .mc-sec-pillar,
    .mc-sec-compliance__card,
    .mc-sec-faq__item,
    .mc-sec-playbook__step
  ) {
  background: var(--mc-theme-surface);
  border-color: var(--mc-theme-border);
}

/* Doc foot last-updated strip */
html.mc-theme-night .mc-doc-last-updated {
  border-top-color: var(--mc-theme-border);
}

html.mc-theme-night .mc-doc-last-updated__label,
html.mc-theme-night .mc-doc-last-updated__icon {
  color: var(--mc-theme-muted);
}

html.mc-theme-night .mc-doc-last-updated__time,
html.mc-theme-night .mc-doc-last-updated__value {
  color: var(--mc-theme-ink);
}

html.mc-theme-day .mc-doc-last-updated,
html.mc-day-mode .mc-doc-last-updated {
  border-top-color: var(--mc-day-hub-border);
}

html.mc-theme-day .mc-doc-last-updated__label,
html.mc-day-mode .mc-doc-last-updated__label {
  color: var(--mc-day-hub-muted);
}

html.mc-theme-day .mc-doc-last-updated__time,
html.mc-day-mode .mc-doc-last-updated__time {
  color: var(--mc-day-hub-ink);
}

/* CTA pills + anchor tabs: no hover ink or fill shift */
.mc-cta-pill-host--ready:is(:hover, :focus-within),
.mc-cta-pill-host--ready.mc-cta-pill--surface:is(:hover, :focus-within) {
  color: var(--mc-cta-pill-ink-rest, var(--mc-ink));
}

.mc-cta-pill-host--ready:is(:hover, :focus-within) .mc-cta-indicator {
  background: var(--mc-cta-indicator-bg);
  border-color: var(--mc-cta-indicator-ring);
  box-shadow: var(--mc-cta-indicator-shadow);
}

.mc-chrome-tabs--ready:is(:hover, :focus-within):not(.mc-chrome-tabs--underline) .mc-tab-indicator {
  background: var(--mc-tab-indicator-bg, var(--mc-chrome-indicator-bg, rgba(15, 23, 42, 0.08)));
  border-color: var(--mc-tab-indicator-ring, var(--mc-chrome-indicator-ring, rgba(255, 255, 255, 0.62)));
  box-shadow: var(--mc-tab-indicator-shadow, var(--mc-chrome-indicator-shadow, inset 0 1px 0 rgba(255, 255, 255, 0.55)));
}

.mc-chrome-anchor-nav__link:hover,
.mc-chrome-anchor-nav__link:focus-visible,
.mc-chrome-anchor-nav__link.is-active,
.mc-chrome-anchor-nav__link[aria-selected="true"] {
  color: var(--mc-tab-ink-muted, rgba(15, 23, 42, 0.56));
}

.mc-chrome-anchor-nav__link.is-active,
.mc-chrome-anchor-nav__link[aria-selected="true"] {
  color: var(--mc-tab-ink, #0f172a);
}

/* Mobile page gutter SSOT - matches home; wins over section doc padding */
@media (max-width: 1023px) {
  .mc-gl.mc-gl--guidelines-light .mc-gl-main,
  .mc-gl.mc-gl--guidelines-dark .mc-gl-main,
  .mc-gl.mc-gl--identity-dark .mc-gl-main,
  .mc-gl.mc-gl--identity-light .mc-gl-main,
  .mc-gl.mc-gl--learn-dark .mc-gl-main,
  .mc-gl.mc-gl--learn-light .mc-gl-main,
  .mc-gl.mc-gl--learn-inspiration-board .mc-gl-main,
  .mc-gl.mc-gl--diy-dark .mc-gl-main,
  .mc-gl.mc-gl--diy-light .mc-gl-main,
  .mc-gl.mc-gl--assets-dark .mc-gl-main,
  .mc-gl.mc-gl--assets-light .mc-gl-main {
    padding-left: max(0px, env(safe-area-inset-left, 0px));
    padding-right: max(0px, env(safe-area-inset-right, 0px));
  }

  .mc-gl.mc-gl--identity-dark,
  .mc-gl.mc-gl--identity-light,
  .mc-gl.mc-gl--guidelines-dark,
  .mc-gl.mc-gl--guidelines-light,
  .mc-gl.mc-gl--learn-dark,
  .mc-gl.mc-gl--learn-light,
  .mc-gl.mc-gl--diy-dark,
  .mc-gl.mc-gl--assets-dark,
  .mc-gl.mc-gl--assets-light {
    width: min(var(--mc-shell-width), var(--mc-page-width));
    margin-left: auto;
    margin-right: auto;
  }
}
