/* ============================================================
   PDF IMAGES EXTRACTOR — PDF with image rects → tile grid
   ============================================================ */
.iex {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}
.iex-pdf {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0;
  color: #0a2540;
  overflow: hidden;
  font-family: var(--font-mono);
  box-shadow:
    0 1px 0 rgba(10, 37, 64, 0.04),
    0 18px 36px -22px rgba(10, 37, 64, 0.3);
}
[data-theme="dark"] .iex-pdf { background: #f4f7fb; }
.iex-head, .iex-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(10, 37, 64, 0.6);
}
.iex-head { border-bottom: 1px dashed rgba(10, 37, 64, 0.18); }
.iex-foot { border-top: 1px dashed rgba(10, 37, 64, 0.18); }
.iex-tag {
  font-weight: 600;
  letter-spacing: 0.1em;
  background: var(--accent);
  color: white;
  padding: 2px 6px;
  font-size: 9px;
  border-radius: 4px;
}
.iex-body {
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.iex-row {
  display: block;
  height: 3px;
  background: rgba(10, 37, 64, 0.18);
  border-radius: 1px;
}
.iex-row.w90 { width: 90%; }
.iex-row.w80 { width: 80%; }
.iex-row.w72 { width: 72%; }
.iex-row.w60 { width: 60%; }
.iex-img-rect {
  display: block;
  height: 38px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(11, 102, 194, 0.22), rgba(11, 102, 194, 0.06));
  border: 1.5px dashed var(--accent);
  position: relative;
  margin: 4px 0;
}
.iex-img-rect::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}
.iex-img-rect.small { height: 24px; width: 60%; }
.iex-flow {
  width: 44px;
  height: 120px;
  color: var(--accent);
  flex-shrink: 0;
}
.iex-flow svg { width: 100%; height: 100%; display: block; }
.iex-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.iex-tile {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow:
    0 1px 0 rgba(10, 37, 64, 0.04),
    0 6px 12px -8px rgba(10, 37, 64, 0.2);
}
.iex-tile-img {
  height: 42px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(11, 102, 194, 0.20), rgba(11, 102, 194, 0.04));
  position: relative;
}
.iex-tile-img.alt { background: linear-gradient(135deg, rgba(180, 83, 9, 0.20), rgba(180, 83, 9, 0.04)); }
.iex-tile-img::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  height: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
}
.iex-tile-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-mute);
}
.iex-tile-fmt {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 9px;
  letter-spacing: 0.06em;
}
.iex-tile-fmt.jpg { color: #b45309; background: rgba(180, 83, 9, 0.08); border-color: rgba(180, 83, 9, 0.32); }

@media (max-width: 1000px) {
  .iex { max-width: 380px; }
}
@media (max-width: 760px) {
  .iex { grid-template-columns: 1fr; gap: 14px; }
  .iex-flow { transform: rotate(90deg); height: 36px; width: 60px; margin: 0 auto; }
}
