/* ==========================================================================
   Front-Page Selected Publications: Frameless Interactive 3D Canvas2D Plates
   Bootstrap 3 safe: explicit px / % / vw only (ZERO rem).
   Zero text captions; seamless transparent float over archival parchment #f5f0e4.
   ========================================================================== */

#post-index .article-entry .paper-item {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: 18px;
  row-gap: 0;
}

#post-index .article-entry .paper-item .paper-content {
  flex: 1 1 0%;
  min-width: 0;
}

#post-index .article-entry .paper-item > .paper-cite-note {
  margin: 12px 0 2px;
}

#post-index .article-entry .paper-schematic-stage {
  position: relative;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 180px;
  width: 180px;
  height: 120px;
  aspect-ratio: 3 / 2;
  align-self: flex-start;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
  line-height: 0;
  font-size: 0;
  overflow: visible;
  z-index: auto;
  cursor: pointer;
  touch-action: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 240ms ease;
}

#post-index .article-entry .paper-schematic-stage:hover,
#post-index .article-entry .paper-schematic-stage:active {
  background: transparent;
  border: 0;
  box-shadow: none;
}

#post-index .article-entry .paper-schematic-stage:focus {
  outline: none;
}

#post-index .article-entry .paper-schematic-stage:focus-visible {
  outline: 1.5px solid rgba(140, 21, 21, 0.58);
  outline-offset: 3px;
  border-radius: 2px;
}

#post-index .article-entry .paper-schematic-canvas {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}

/* JS-gated desktop hover focus: only non-hovered sibling stages soften */
#post-index .article-entry .paper-list.has-active-stage .paper-schematic-stage:not(.is-stage-active) {
  opacity: 0.72;
}

/* Standard Desktop: 1160px to 1359px */
@media (max-width: 1359px) and (min-width: 1160px) {
  #post-index .article-entry .paper-item {
    column-gap: 16px;
  }

  #post-index .article-entry .paper-schematic-stage {
    flex: 0 0 clamp(150px, 12.2vw, 174px);
    width: clamp(150px, 12.2vw, 174px);
    height: clamp(100px, 8.1333vw, 116px);
  }
}

/* Compact Desktop: 961px to 1159px (floor 138x92px -> >= 0.48x virtual) */
@media (max-width: 1159px) and (min-width: 961px) {
  #post-index .article-entry .paper-item {
    column-gap: 14px;
  }

  #post-index .article-entry .paper-schematic-stage {
    flex: 0 0 clamp(138px, 13.5vw, 150px);
    width: clamp(138px, 13.5vw, 150px);
    height: clamp(92px, 9vw, 100px);
  }
}

/* Tablet (1-column home-split stack): 768px to 960px */
@media (max-width: 960px) and (min-width: 768px) {
  #post-index .article-entry .paper-item {
    column-gap: 18px;
  }

  #post-index .article-entry .paper-schematic-stage {
    flex: 0 0 180px;
    width: 180px;
    height: 120px;
  }
}

/* Phablet / Large Mobile: 521px to 767px */
@media (max-width: 767px) and (min-width: 521px) {
  #post-index .article-entry .paper-item {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: 14px;
    row-gap: 0;
  }

  #post-index .article-entry .paper-schematic-stage {
    flex: 0 0 156px;
    width: 156px;
    height: 104px;
    margin-top: 2px;
  }
}

/* Mobile (<= 520px, including 390x844 iPhone & 320px): Centered 216x144px stack */
@media (max-width: 520px) {
  #post-index .article-entry .paper-item {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    column-gap: 0;
    row-gap: 0;
    padding: 12px 0 18px;
  }

  #post-index .article-entry .paper-schematic-stage {
    flex: 0 0 auto;
    width: min(216px, 100%);
    height: auto;
    aspect-ratio: 3 / 2;
    align-self: center;
    margin: 0 auto 6px;
  }

  #post-index .article-entry .paper-item .paper-content {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #post-index .article-entry .paper-schematic-stage {
    transition: none;
  }
}
