/* Biblioteca: estilos aislados; el contenido nunca depende de animaciones. */
.sx-page { background: var(--color-cream); }
.sx-page a:focus-visible, .sx-page button:focus-visible, .sx-page input:focus-visible, .sx-page summary:focus-visible { outline: 3px solid #7B4ACC; outline-offset: 5px; }
.sx-skip { position: fixed; top: -100px; left: 16px; z-index: 1000; background: white; padding: 12px; }
.sx-skip:focus { top: 12px; }
.sx-header { background: var(--color-cream); border-bottom: 1px solid #ddd8e8; }
.sx-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.sx-nav { display: flex; gap: 24px; align-items: center; font-size: .875rem; font-weight: 600; }
.sx-nav a[aria-current] { color: var(--color-primary-deep); border-bottom: 2px solid var(--color-accent-mid); padding-block: 8px; }
.sx-hero { background: var(--color-ink); color: white; padding: 30px 0 64px; }
.sx-breadcrumb { display: flex; flex-wrap: wrap; gap: 12px; color: #d9c7f0; font-size: .8rem; margin-bottom: 44px; }
.sx-breadcrumb a { text-decoration: underline; text-underline-offset: 4px; }
.sx-eyebrow { text-transform: uppercase; font-size: .72rem; font-weight: 700; letter-spacing: .13em; color: var(--color-primary-deep); margin-bottom: 16px; }
.sx-hero .sx-eyebrow { color: #d9c7f0; }
.sx-hero h1 { color: white; font-family: var(--font-heading); font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.12; margin-bottom: 18px; }
.sx-lead { font-size: clamp(1.2rem, 3vw, 1.65rem); color: #eee7f9; margin-bottom: 20px; }
.sx-intro { max-width: 680px; line-height: 1.8; color: #d5d5de; }
.sx-meta { font-size: .85rem; color: #c7c7d7; }
.sx-draft { background: #f0ebf7; border-left: 3px solid #7B4ACC; padding: 18px 24px; margin: 28px 0; font-size: .875rem; line-height: 1.6; color: #454057; }
.sx-draft p { margin-top: 6px; }
.sx-layout { display: grid; grid-template-columns: 245px minmax(0, 760px); gap: 65px; align-items: start; padding-block: 18px 72px; }
.sx-sidebar { position: sticky; top: 24px; font-size: .85rem; }
.sx-sidebar details { border-block: 1px solid #d5d5de; padding: 16px 0; }
.sx-sidebar summary { cursor: pointer; font-weight: 700; margin-bottom: 12px; }
.sx-sidebar nav { display: grid; gap: 3px; }
.sx-sidebar nav a { padding: 8px 10px; border-left: 2px solid transparent; color: #55556e; line-height: 1.4; }
.sx-sidebar nav a:hover, .sx-sidebar nav a:focus-visible { background: #eee8f6; border-color: #7b4acc; color: #00009d; }
.sx-index-back { display: inline-block; margin-top: 20px; color: #00009d; }
.sx-reading { min-width: 0; font-size: 1.0625rem; line-height: 1.85; color: #2c2c3a; overflow-wrap: anywhere; }
.sx-reading .sx-section { padding: 0 0 36px; margin-bottom: 32px; border-bottom: 1px solid #ded9e5; scroll-margin-top: 24px; }
.sx-reading h2 { font-family: var(--font-heading); color: #00009d; font-size: clamp(1.5rem, 3vw, 1.95rem); line-height: 1.3; margin: 0 0 24px; }
.sx-reading h3 { font-size: 1.15rem; margin: 28px 0 14px; line-height: 1.5; }
.sx-reading p { margin-bottom: 20px; }
.sx-reading ul { padding-left: 24px; list-style: disc; }
.sx-reading ol { padding-left: 24px; list-style: decimal; }
.sx-reading p a { color: #00009d; text-decoration: underline; text-underline-offset: 4px; }
.sx-reading li { margin-bottom: 16px; }
.sx-reading li::marker { color: #7b4acc; }
.sx-reading li p { margin-bottom: 12px; }
.sx-reading li > p:first-child { font-weight: 500; }
.sx-table { overflow-x: auto; border: 1px solid #ded9e5; border-radius: 12px; }
.sx-table table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.sx-table th, .sx-table td { padding: 18px; border-bottom: 1px solid #ded9e5; text-align: left; vertical-align: top; }
.sx-table th { background: #ede8f8; color: #00009d; }
.sx-table td:first-child { width: 26%; font-weight: 600; }
.sx-table p:last-child { margin: 0; }
#bibliografia { font-size: .9rem; }
#bibliografia .sx-source-link { display: inline-block; color: #00009d; text-decoration: underline; text-underline-offset: 4px; margin-bottom: 12px; }
#bibliografia .sx-reference-note { font-size: .85rem; line-height: 1.6; padding: 12px 16px; background: #f0ebf7; border-left: 3px solid #7b4acc; color: #454057; }
#bibliografia .sx-reference-intro { color: #55556e; }
.sx-next { background: #eee8f6; padding: 30px; border-radius: 16px; margin: 40px 0 24px; }
.sx-next a { display: block; color: #00009d; text-decoration: underline; text-underline-offset: 4px; margin: 12px 0; }
.sx-top { color: #00009d; font-size: .9rem; text-decoration: underline; }
.sx-footer { border-top: 1px solid #ded9e5; padding: 32px 0; font-size: .8rem; color: #55556e; line-height: 1.8; }
.sx-footer p { margin-bottom: 10px; }
.sx-footer a { color: #00009d; text-decoration: underline; }
.sx-library { padding-bottom: 80px; max-width: 1000px; }
.sx-search { margin: 36px 0 24px; }
.sx-search label { display: block; font-family: var(--font-heading); font-size: 1.6rem; margin-bottom: 14px; }
.sx-search > div { display: flex; gap: 12px; }
.sx-search input { flex: 1; min-width: 0; border: 1px solid #a6a1b4; border-radius: 10px; background: white; padding: 14px 16px; font: inherit; }
.sx-alphabet { display: flex; flex-wrap: wrap; gap: 6px; padding: 24px 0 12px; }
.sx-alphabet > * { width: 38px; height: 42px; display: grid; place-items: center; border-radius: 8px; font-weight: 600; }
.sx-alphabet span { color: #777384; background: #eeebef; }
.sx-alphabet a { color: white; background: #00009d; }
.sx-muted, #sx-count { color: #55556e; font-size: .85rem; margin: 12px 0 24px; }
.sx-letter { padding: 16px 0; display: grid; grid-template-columns: 70px 1fr; gap: 20px; scroll-margin-top: 20px; }
.sx-letter > h2 { font: 3rem var(--font-heading); color: #7b4acc; }
.sx-concept-list { display: grid; gap: 18px; }
.sx-concept { display: block; background: white; padding: 32px; border: 1px solid #ded9e5; border-radius: 16px; box-shadow: var(--shadow-card); }
.sx-concept:hover { border-color: #7b4acc; }
.sx-concept h3 { font: 1.8rem var(--font-heading); color: #00009d; margin: 12px 0; }
.sx-concept p { color: #55556e; line-height: 1.7; margin: 12px 0 20px; }
.sx-card-link { color: #00009d; font-weight: 600; }
.sx-page [hidden] { display: none !important; }
#sx-empty { padding: 24px; background: #eee8f6; border-radius: 12px; }
#sx-clear { font: inherit; color: #00009d; text-decoration: underline; cursor: pointer; background: transparent; border: 0; }
.sx-teaser { background: #ede8f8; }
.sx-teaser .container { max-width: 1000px; }
.sx-teaser p { max-width: 680px; line-height: 1.8; margin-bottom: 24px; }
.sx-teaser small { display: block; color: #55556e; margin-top: 14px; }
@media (max-width: 900px) {
  .sx-header-inner { flex-wrap: wrap; gap: 14px; }
  .sx-nav { flex-wrap: wrap; gap: 20px; }
  .sx-layout { grid-template-columns: 1fr; gap: 32px; }
  .sx-sidebar { position: static; }
  .sx-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .sx-header .logo-name { font-size: .95rem; }
  .sx-header .logo-title { font-size: .6rem; }
  .sx-header .header-logo { gap: 10px; }
  .sx-header .header-logo img { width: 30px; }
  .sx-nav { font-size: .8rem; gap: 18px; }
  .sx-hero { padding-bottom: 40px; }
  .sx-breadcrumb { margin-bottom: 30px; }
  .sx-sidebar nav { grid-template-columns: 1fr; }
  .sx-search > div { flex-direction: column; }
  .sx-letter { grid-template-columns: 1fr; gap: 8px; }
  .sx-concept, .sx-next { padding: 24px; }
  .sx-table th, .sx-table td { padding: 10px; }
}
/* Portada editorial: conserva la paleta y no altera las entradas. */
.sx-library-hero { padding-bottom: 110px; background: radial-gradient(ellipse at 85% 15%, #382057 0, transparent 55%), radial-gradient(ellipse at 5% 100%, #18185a 0, transparent 60%), #0b0b1f; }
.sx-library-heading { max-width: 850px; padding: 14px 0 12px; }
.sx-library-hero h1 { font-size: clamp(2.65rem, 8vw, 6.5rem); letter-spacing: -.055em; margin-bottom: 24px; }
.sx-library-hero h1 > span:first-child { color: #d9baf6; }
.sx-title-dot { color: #b522ff; }
.sx-library-hero .sx-lead { font-family: var(--font-heading); font-size: clamp(1.45rem, 3vw, 2rem); }
.sx-index-jump { display: inline-flex; gap: 24px; margin-top: 28px; color: #eee7f9; font-size: .9rem; text-decoration: underline; text-underline-offset: 6px; }
.sx-search-panel { position: relative; margin-top: -56px; background: #fff; border: 1px solid #ded9e5; border-radius: 20px; padding: 32px 36px 22px; box-shadow: 0 16px 50px #16102c12; }
.sx-search-panel .sx-search { margin: 0; }
.sx-search-panel label { color: #0b0b1f; font-size: clamp(1.4rem, 3vw, 1.85rem); }
#sx-search-help { color: #55556e; line-height: 1.6; margin-bottom: 20px; }
.sx-search-panel input { background: #faf8f5; }
.sx-search-panel .btn { gap: 18px; }
.sx-search-note { margin-top: 14px; font-size: .75rem; color: #55556e; }
.sx-welcome { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 64px 0; border-bottom: 1px solid #ded9e5; align-items: center; }
.sx-welcome h2, .sx-index-heading h2, .sx-planned h2 { font-family: var(--font-heading); font-size: clamp(1.65rem, 3vw, 2.25rem); color: #0b0b1f; line-height: 1.3; }
.sx-welcome > p, .sx-planned > p:not(.sx-eyebrow) { color: #55556e; line-height: 1.8; }
#indice { padding-top: 48px; scroll-margin-top: 24px; }
.sx-index-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.sx-library-tag { border: 1px solid #d6cbe6; padding: 9px 14px; border-radius: 30px; color: #5f397f; font-size: .75rem; }
.sx-planned { margin-top: 44px; padding-top: 32px; border-top: 1px solid #ded9e5; }
.sx-planned h2 { margin-bottom: 16px; }
.sx-topic-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; list-style: none; padding: 0; margin-top: 24px; }
.sx-topic-list li { border: 1px solid #ded9e5; border-radius: 10px; padding: 18px 20px; color: #55556e; background: #f3eff6; }
@media (max-width: 600px) {
  .sx-library-hero { padding-bottom: 88px; }
  .sx-search-panel { padding: 24px 20px 20px; }
  .sx-welcome { grid-template-columns: 1fr; gap: 24px; padding-block: 40px; }
  .sx-index-heading { align-items: flex-start; flex-direction: column; }
  .sx-topic-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-topic-list li { padding: 16px 12px; }
}
@media print {
  .sx-header, .sx-sidebar, .sx-next, .sx-top, .sx-footer, .sx-skip { display: none; }
  .sx-layout { display: block; }
  .sx-hero { background: white; padding: 20px 0; }
  .sx-hero h1, .sx-hero p, .sx-breadcrumb { color: black; }
}
