/* ============================================================
   PDF TO IMAGE — rasterization visual (PDF → 4 image tiles)
   ============================================================ */
.rastr {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
}
.rastr-pdf {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow:
    0 1px 0 rgba(10, 37, 64, 0.04),
    0 18px 36px -22px rgba(10, 37, 64, 0.28);
  color: #0a2540;
  overflow: hidden;
  transform: rotate(-1deg);
}
[data-theme="dark"] .rastr-pdf { background: #f4f7fb; color: #0a2540; }
.rastr-pdf-head,
.rastr-pdf-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(10, 37, 64, 0.6);
}
.rastr-pdf-head { border-bottom: 1px dashed rgba(10, 37, 64, 0.18); }
.rastr-pdf-foot { border-top: 1px dashed rgba(10, 37, 64, 0.18); }
.rastr-tag {
  font-weight: 600;
  letter-spacing: 0.1em;
  background: rgba(11, 102, 194, 0.12);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}
.rastr-file {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(10, 37, 64, 0.6);
}
.rastr-pdf-pages {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 16px;
}
.rastr-pp {
  display: block;
  height: 26px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, #f1f5f9 0 100%);
  border: 1px solid #e2e8f0;
  position: relative;
}
.rastr-pp::after {
  content: "";
  position: absolute;
  top: 6px; left: 6px;
  right: 30%;
  height: 3px;
  background: #cbd5e1;
  border-radius: 2px;
  opacity: 0.7;
}
.rastr-pp:nth-child(2)::after { right: 20%; }
.rastr-pp:nth-child(3)::after { right: 40%; }
.rastr-pp:nth-child(4)::after { right: 15%; }

.rastr-flow {
  width: 50px;
  height: 80px;
  color: var(--accent);
  opacity: 0.65;
  flex-shrink: 0;
}
.rastr-flow svg { width: 100%; height: 100%; display: block; }

.rastr-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
}
.rastr-tile {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 12px -8px rgba(10, 37, 64, 0.18);
  transition: transform .25s;
}
.rastr-t1 { transform: rotate(-2deg) translateY(-4px); }
.rastr-t2 { transform: rotate(1.5deg) translateY(-2px); }
.rastr-t3 { transform: rotate(-1deg) translateY(2px); }
.rastr-t4 { transform: rotate(2deg) translateY(4px); }
.rastr-thumb {
  height: 56px;
  background: linear-gradient(135deg, rgba(11, 102, 194, 0.08), rgba(11, 102, 194, 0.02));
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}
.rastr-th-bar {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: rgba(11, 102, 194, 0.42);
}
.rastr-th-bar.w50 { width: 50%; }
.rastr-th-bar.w55 { width: 55%; }
.rastr-th-bar.w62 { width: 62%; }
.rastr-th-bar.w64 { width: 64%; }
.rastr-th-bar.w68 { width: 68%; }
.rastr-th-bar.w70 { width: 70%; }
.rastr-th-bar.w75 { width: 75%; }
.rastr-th-bar.w76 { width: 76%; }
.rastr-th-bar.w80 { width: 80%; }
.rastr-th-bar.w82 { width: 82%; }
.rastr-th-bar.w88 { width: 88%; }
.rastr-th-bar.w90 { width: 90%; }
.rastr-th-bar.w92 { width: 92%; }
.rastr-th-bar.w95 { width: 95%; }
.rastr-tile-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--text-mute);
}
.rastr-tile-fmt {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

@media (max-width: 1000px) {
  .rastr { max-width: 460px; }
}
@media (max-width: 760px) {
  .rastr { grid-template-columns: 1fr; gap: 14px; max-width: 340px; }
  .rastr-flow { transform: rotate(90deg); margin: 0 auto; width: 36px; height: 18px; }
  .rastr-pdf { transform: none; }
  .rastr-tile { transform: none; }
}
