/* SEOSEMPERE · Índice de lectura · 1.2.0 */
:root {
  --ss-toc-orange: #ca4d16;
  --ss-toc-blue: #455e78;
  --ss-toc-black: #14191d;
  --ss-toc-border: #e4e8ec;
  --ss-toc-header-offset: 116px;
}

.ss-toc, .ss-toc * { box-sizing: border-box; }
.ss-toc {
  width: 100%;
  min-width: 0;
  color: var(--ss-toc-black);
  font-family: "Lato", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  isolation: isolate;
  z-index: 39;
}
.ss-toc__shell {
  border: 1px solid var(--ss-toc-border);
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(20,25,29,.075);
}
.ss-toc__details { padding: 0; margin: 0; }
.ss-toc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  padding: 19px 18px 15px;
  margin: 0;
  color: var(--ss-toc-black);
  border: 0;
  background: #fff;
}
.ss-toc__summary::-webkit-details-marker { display: none; }
.ss-toc__summary::marker { content: ''; }
.ss-toc__summary-text {
  font-family: "Inter", Arial, sans-serif;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -.02em;
}
.ss-toc__summary-toggle { display: flex; align-items: center; color: var(--ss-toc-blue); transition: transform .2s ease; }
.ss-toc__details[open] .ss-toc__summary-toggle { transform: rotate(180deg); }
.ss-toc__nav {
  max-height: min(56vh, 535px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 9px 13px;
  scrollbar-width: thin;
  scrollbar-color: #cdd5dc transparent;
}
.ss-toc__list, .entry-content .ss-toc__list {
  padding: 0;
  margin: 0;
  list-style: none;
}
.ss-toc__item { position: relative; padding: 0; margin: 0; list-style: none; }
.ss-toc__link, .entry-content a.ss-toc__link {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr);
  column-gap: 9px;
  padding: 10px 10px;
  margin: 0;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #455e78;
  text-decoration: none;
  font-family: "Lato", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: 0;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.ss-toc__number { font-size: 11px; font-variant-numeric: tabular-nums; color: #8393a2; padding-top: 2px; }
.ss-toc__link-text { display: block; min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.ss-toc__item--title .ss-toc__link {
  color: var(--ss-toc-black);
  font-family: "Inter", Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 670;
  line-height: 1.45;
  margin-bottom: 3px;
  border-bottom: 1px solid #eff1f4;
  border-radius: 0;
  padding-bottom: 13px;
}
.ss-toc__link:hover, .entry-content a.ss-toc__link:hover {
  color: var(--ss-toc-orange);
  background: #fbf4f0;
  text-decoration: none;
}
.ss-toc__item.is-active > .ss-toc__link,
.entry-content .ss-toc__item.is-active > a.ss-toc__link {
  background: #fdf3ed;
  color: var(--ss-toc-orange);
  border-left-color: var(--ss-toc-orange);
  font-weight: 750;
}
.ss-toc__item.is-active .ss-toc__number { color: var(--ss-toc-orange); }
.ss-toc__link:focus-visible, .ss-toc__summary:focus-visible {
  outline: 2px solid var(--ss-toc-orange);
  outline-offset: -2px;
}
.ss-toc__footer { padding: 12px 18px 16px; border-top: 1px solid #eff1f4; }
.ss-toc__status {
  font-family: "Lato", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .015em;
  margin-bottom: 9px;
  color: #607589;
  font-weight: 600;
}
.ss-toc__meter { height: 4px; overflow: hidden; border-radius: 8px; background: #e5e9ed; }
.ss-toc__meter-fill { display: block; height: 100%; width: 0; background: var(--ss-toc-orange); border-radius: inherit; transition: width .14s ease-out; }
.ss-toc__start { display: block; width: 0; height: 0; overflow: hidden; pointer-events: none; }
body.single-post .entry-content h2[id],
body.single-post .wp-block-post-content h2[id],
body.single-post h1.entry-title[id] { scroll-margin-top: var(--ss-toc-header-offset); }

/* Columna editorial independiente de la sidebar nativa de Blocksy.
   Se crea DESPUÉS del hero, alrededor del cuerpo del artículo. */
body.single-post .ss-toc-layout {
  --ss-toc-column-width: 250px;
  --ss-toc-column-gap: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ss-toc-column-width);
  grid-template-areas: "article toc";
  align-items: stretch;
  column-gap: var(--ss-toc-column-gap);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1004px, calc(100vw - 48px));
  max-width: none;
  min-width: 0;
  margin-block: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: visible;
}
body.single-post .ss-toc-layout > .ss-toc-layout__content {
  grid-area: article;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  align-self: stretch;
}
body.single-post .ss-toc-layout > .ss-toc {
  grid-area: toc;
  align-self: stretch;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 100%;
  margin: 0;
  position: relative;
  z-index: 2;
}
body.single-post .ss-toc[data-placement="sidebar"] .ss-toc__shell {
  position: sticky;
  top: var(--ss-toc-header-offset);
  max-height: calc(100vh - var(--ss-toc-header-offset) - 15px);
  display: flex;
  flex-direction: column;
}
body.single-post .ss-toc[data-placement="sidebar"] .ss-toc__details {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.single-post .ss-toc[data-placement="sidebar"] .ss-toc__details-body {
  min-height: 0;
}
body.single-post .ss-toc[data-placement="sidebar"] .ss-toc__nav {
  max-height: min(56vh, 535px);
}
body.single-post .ss-toc[data-placement="inline"] {
  margin-bottom: 28px;
}
body.single-post .ss-toc[data-placement="inline"] .ss-toc__shell {
  box-shadow: 0 6px 20px rgba(20,25,29,.04);
}
body.single-post .ss-toc[data-placement="inline"] .ss-toc__summary {
  padding: 14px 17px;
}
body.single-post .ss-toc[data-placement="inline"] .ss-toc__footer {
  padding: 10px 17px 13px;
}
@media (max-width: 1023px) {
  body.single-post .ss-toc-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    left: auto;
    transform: none;
    max-width: 100%;
  }
  body.single-post .ss-toc-layout > .ss-toc {
    order: 0;
    height: auto;
    width: 100%;
  }
  body.single-post .ss-toc-layout > .ss-toc-layout__content {
    order: 1;
  }
  .ss-toc[data-placement="inline"] .ss-toc__nav { max-height: 390px; }
  .ss-toc[data-placement="inline"] .ss-toc__link { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ss-toc *, .ss-toc *::before, .ss-toc *::after { transition: none !important; scroll-behavior: auto !important; }
}
