@media screen and (not (forced-colors: active)) {
  /* Resolve the separator in its own palette. Keeping the original line tokens
     available preserves card outlines, input boundaries, charts and focus rings. */
  body.li-editorial-site,
  body.li-editorial-site :is(.li-footer, .li-assistant, .li-article, .li-library-index, .li-entry-page, .li-home-page, .li-home-hero) {
    --li-separador: color-mix(in srgb, var(--li-line) 30%, transparent);
  }

  /* Each of these pseudo-elements paints only a rule. Fading the whole paint
     keeps its central stroke and full-width extension at the same opacity. */
  body.li-editorial-site .li-primary > li::after,
  body.li-editorial-site :is(.li-footer-top, .li-footer-grid, .li-footer-capture)::after,
  body.li-editorial-site .li-footer-bottom::before,
  body.li-editorial-site .li-entry-native .li-entry-section::before,
  body.li-editorial-site .li-entry-native .li-home-system::before,
  body.li-editorial-site .li-entry-native .li-home-hero::after,
  body.li-blog-index :is(.li-blog-index-hero, .li-blog-controls)::after,
  body.li-blog-index .li-blog-pagination::before,
  body.li-blog-single .li-blog-article-body :is(h2, [class*="-pathways-head"], .li-blog-return)::before,
  body.li-blog-single .li-blog-article-body .li-blog-return::after,
  body.li-editorial-site .li-help-options-label::after,
  body.li-editorial-site .li-privacy-consolidated :is(.li-privacy-section, .li-privacy-close)::before,
  #li-masterclasses-index .li-masterclass-upcoming::after,
  #b2c-guide .bc-phase::before,
  body.li-editorial-site:not(.li-library-reading) .li-article :is(.li-divider, .li-glossary-section-heading, .li-section, .li-reference, .li-back, .sp-nav, .sh-nav, .sp-conn, .li-ai-info, .li-continuum-body > section)::before,
  body.li-editorial-site:not(.li-library-reading) .li-article .li-definition::after,
  body.li-editorial-site:not(.li-library-reading) .li-article :is(.li-references, .li-reference) + :is(.li-label, .li-pills)::before,
  body.li-editorial-site:not(.li-library-reading) .li-article .li-migrated-content.gl-page > h2::before,
  body.li-editorial-site:not(.li-library-reading) .li-article :is(.gl-nosi-col, .hub-nosi-col, .sh-incl-col) > ul > li + li::after,
  body.li-editorial-site:not(.li-library-reading) :is(.li-toc, .li-mobile-toc) li + li::before,
  body.li-editorial-site #li-main hr:not(.li-rule),
  body.li-editorial-site:not(.li-library-reading) #li-main hr.li-rule,
  body.li-editorial-site #li-main .wp-block-separator:not(hr),
  body.single-que-es .li-reading-capture::before {
    opacity: .3;
  }

  /* Only the designated edge changes. A zero-width or hidden separator stays hidden. */
  body.li-editorial-site #li-main :is(.li-blog-author, .li-blog-more, .li-audit-facts, .li-audit-deliverables > li, .li-audit-process > section + section, .li-entry-page details, .about-facts, .about-hero-wide-image, .about-continuing, .about-timeline, .li-privacy-summary, .li-privacy-mobile-index li),
  body.li-editorial-site #li-main .li-library-index :is(.lb-hierarchy li, .lb-article-list, .lb-article-list a),
  body.li-editorial-site #li-main .li-home-system > ol > li,
  #li-agents-index :is(.li-agent-detail, .li-agent-card + .li-agent-card),
  #li-tools-index :is(.li-tool-question, .li-tool-modes li),
  #b2c-guide :is(.bc-field, .bc-sources),
  body.li-editorial-site .li-assistant > nav,
  body.li-editorial-site .li-footer,
  body.li-visual-pilot-glossary #li-main :is(.gl-paso, .li-v3-benchmarks > .gl-tipo, .li-v3-outcomes > .gl-tipo, .li-v3-rate-change > dl) {
    border-block-start-color: var(--li-separador);
  }

  body.li-editorial-site #li-main :is(.li-entry-hero, .li-blog-article-hero, .li-blog-card > .li-blog-media, .li-courses-header, .li-courses-survey-section, .li-courses-continue, .about-hero, .about-section, .about-step),
  body.li-editorial-site #li-main .li-library-index :is(.lb-hero, .lb-explorer, .lb-area-section),
  body.li-editorial-site #li-main .li-home-system > ol > li:last-child,
  body.li-editorial-site:not(.li-library-reading) #li-main .li-article :is(table th, table td),
  body.li-visual-pilot-glossary #li-main .gl-error-item.li-v3-error,
  #b2c-guide .bc-glossary > div,
  #li-agents-index .li-agents-hero,
  body.li-editorial-site .li-assistant > header {
    border-block-end-color: var(--li-separador);
  }

  body.li-editorial-site #li-main .li-privacy-consolidated .table-scroll :is(th, td, tr) {
    border-color: var(--li-separador);
  }
  body.li-blog-index #li-main .li-blog-featured > .li-blog-media {
    border-inline-end-color: var(--li-separador);
    border-block-end-color: var(--li-separador);
  }
  body.li-blog-single #li-main .li-blog-toc {
    border-inline-start-color: var(--li-separador);
    border-block-end-color: var(--li-separador);
  }
  body.li-editorial-site #li-main .li-audit-price,
  body.li-editorial-site .li-sidebar details details { border-inline-start-color: var(--li-separador); }
  body.li-editorial-site .li-sidebar { border-inline-end-color: var(--li-separador); }
  body.li-editorial-site #li-main .li-entry-link-stack a,
  body.li-native-home #li-main .li-home-path .li-entry-link-stack a {
    border-block-start-color: color-mix(in srgb, var(--inicio-linea, var(--li-line)) 30%, transparent);
  }
  body.li-editorial-site .li-head:has(> .li-nav-desktop) {
    border-block-end-color: color-mix(in srgb, var(--li-header-rule) 30%, transparent);
  }
  body.li-editorial-site .li-megamenu-guides {
    border-inline-start-color: color-mix(in srgb, var(--li-header-rule) 30%, transparent);
  }
  body.li-editorial-site #li-main .li-ci-step { border-block-end-color: rgb(160 139 73 / 30%); }
  body.li-editorial-site .lic-guide :is(.licg-keep, .licg-reading-tools, .licg-footer) {
    border-block-start-color: color-mix(in srgb, var(--licg-line) 30%, transparent);
  }
  body.li-editorial-site .lic-guide .licg-progress {
    border-block-end-color: color-mix(in srgb, var(--licg-line) 30%, transparent);
  }
  body.li-editorial-site #li-agents-index .li-agents-grid {
    background-color: var(--li-separador);
    border-color: var(--li-separador);
  }
}

/* Editorial dividers are separate from controls, graph marks and card outlines. */
@media screen {
  body.li-library-reading #li-main .li-library-document > hr.li-rule:has(
    + .li-section > .li-references,
    + .li-ai-assist + .li-section > .li-references
  ) {
    display: none;
  }

  /* Some source documents place an explicit rule directly before their sources. */
  body.li-library-reading #li-main .li-library-document > hr.li-rule + .li-section:has(> .li-references)::before {
    content: "";
  }

}

@media screen and (not (forced-colors: active)) {
  /* Paint across both gutters without extending the layout box or covering focus. */
  body.li-library-reading #li-main .li-library-document > :is(.li-section, .li-library-continuation)::before {
    background: var(--li-separador) !important;
    box-shadow: 0 0 0 100vmax var(--li-separador) !important;
    clip-path: inset(0 -100vmax);
  }

  body.li-editorial-site #li-main .li-reading-index li + li {
    border-block-start-color: rgb(24 19 29 / 30%);
  }

  body.li-editorial-site #li-main .li-article details.li-faq + details.li-faq::before,
  body.li-library-reading #li-main :is(.li-toc, .li-mobile-toc) li + li::before,
  body.li-library-reading #li-main .li-library-guides::after,
  body.li-library-reading #li-main .li-library-document > hr.li-rule,
  body.li-library-reading #li-main :is(.li-library-index-paths, .li-lista-editorial > li, .li-section[aria-labelledby=fallas] > ul > li, .li-hub-capacity, .li-hub-comparison-3 .li-hub-option, .li-hub-original-table, .li-hub-option dl > div + div, .li-proposal-comparison .li-hub-reading-step, .li-v2-mistakes > li, .li-v3-directory .li-v3-guide, .li-v3-source-data),
  body.li-library-reading #li-main .li-article :is(.lh-table, .li-table-scroll, .sp-table-wrap) :is(td, th),
  body.li-library-reading #li-main .li-article :is(.li-references, .li-reference) + :is(.li-label, .li-pills)::before {
    border-block-color: var(--li-separador);
  }

  body.li-library-reading #li-main .li-matriz-editorial tbody th[scope=row] {
    border-block-end-color: color-mix(in srgb, var(--li-matriz-regla) 30%, transparent);
  }
}
