/* Editoria: linkify ref link appearance */
.editoria-linkref-wrap { margin-left: .35em; }

a.editoria-linkref{
  font-size: .85em;
  opacity: .75;
  text-decoration: underline;
}

a.editoria-linkref:hover{
  opacity: 1;
}

/* Related image carousel */
.editoria-gallery{
  position: relative;
  margin: 1.25rem 0 2rem;
}

.editoria-gallery-viewport{
  overflow: hidden;
}

.editoria-gallery-track{
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
}

.editoria-gallery-track::-webkit-scrollbar{
  height: 8px;
}

.editoria-gallery-track::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.2);
  border-radius: 999px;
}

.editoria-figure-gallery{
  flex: 0 0 min(78vw, 340px);
  margin: 0;
  scroll-snap-align: start;
}

.editoria-gallery-link{
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.editoria-gallery-link img{
  display: block;
  width: 100%;
  height: auto;
}

.editoria-gallery-nav{
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(20,20,20,.72);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.editoria-gallery-prev{ left: -8px; }
.editoria-gallery-next{ right: -8px; }

.editoria-gallery-nav[disabled]{
  opacity: .35;
  cursor: default;
}

.editoria-gallery-dots{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.editoria-gallery-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.2);
}

.editoria-gallery-dot.is-active{
  background: rgba(0,0,0,.65);
}

/* Lightbox */
.editoria-lightbox{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.82);
  z-index: 99999;
  padding: 24px;
}

.editoria-lightbox.is-open{
  display: flex;
}

.editoria-lightbox-stage{
  position: relative;
  max-width: min(92vw, 1200px);
  max-height: 88vh;
}

.editoria-lightbox-image{
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  background: #fff;
}

.editoria-lightbox-close,
.editoria-lightbox-prev,
.editoria-lightbox-next{
  position: absolute;
  border: 0;
  border-radius: 999px;
  background: rgba(20,20,20,.72);
  color: #fff;
  cursor: pointer;
}

.editoria-lightbox-close{
  top: -16px;
  right: -16px;
  width: 42px;
  height: 42px;
  font-size: 24px;
}

.editoria-lightbox-prev,
.editoria-lightbox-next{
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  font-size: 28px;
}

.editoria-lightbox-prev{ left: -58px; }
.editoria-lightbox-next{ right: -58px; }

@media (max-width: 767px){
  .editoria-gallery-nav{
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
  .editoria-lightbox-prev{ left: 8px; }
  .editoria-lightbox-next{ right: 8px; }
  .editoria-lightbox-close{ top: 8px; right: 8px; }
}


/* Common article structure blocks */
.editoria-overview-list,
.editoria-source-facts,
.editoria-key-points{
  margin: 1rem 0 1.5rem;
  padding-left: 1.2rem;
}

.editoria-overview-list li,
.editoria-source-facts li,
.editoria-key-points li{
  margin: .35rem 0;
}

.editoria-key-points-wrap,
.editoria-plan-table-wrap{
  margin: 1rem 0 1.5rem;
}

.editoria-plan-table{
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

.editoria-plan-table th,
.editoria-plan-table td{
  border: 1px solid rgba(0,0,0,.12);
  padding: .65rem .75rem;
  text-align: left;
  vertical-align: top;
}

.editoria-plan-table th{
  background: rgba(0,0,0,.04);
}

@media (max-width: 767px){
  .editoria-plan-table{
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.editoria-inline-meta{
  margin: 1.1rem 0 1.6rem;
}

.editoria-inline-heading{
  margin: 0 0 .6rem;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .02em;
}
