/* ============================================================
   PDF TO TEXT — extraction visual (PDF → TXT panels)
   ============================================================ */
.extract {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.ex-pdf, .ex-txt {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow:
    0 1px 0 rgba(10, 37, 64, 0.04),
    0 18px 36px -22px rgba(10, 37, 64, 0.28);
}
.ex-pdf {
  background: #fff;
  color: #0a2540;
  transform: rotate(-1.5deg);
}
.ex-txt {
  background: var(--bg-deep);
  color: #e8eef7;
  transform: rotate(1.5deg);
}
[data-theme="dark"] .ex-pdf { background: #f4f7fb; color: #0a2540; }

.ex-pdf-head, .ex-txt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px dashed rgba(10, 37, 64, 0.18);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.ex-txt-head { border-bottom-color: rgba(255,255,255,0.14); }
.ex-pdf-tag, .ex-txt-tag {
  font-weight: 600;
  letter-spacing: 0.1em;
  background: rgba(11, 102, 194, 0.12);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}
.ex-txt-tag {
  background: rgba(255,255,255,0.1);
  color: #c7e1ff;
}
.ex-pdf-file, .ex-txt-file {
  color: rgba(10, 37, 64, 0.6);
}
.ex-txt-file { color: rgba(255,255,255,0.55); }

.ex-pdf-body {
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ex-pdf-body h5 {
  margin: 8px 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  color: #0a2540;
}
.ex-pdf-body h5:first-child { margin-top: 0; }
.ex-line {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: #cbd5e1;
  opacity: 0.7;
}
.ex-line.ex-hl {
  background: rgba(11, 102, 194, 0.32);
  opacity: 1;
  position: relative;
}
.ex-line.w58 { width: 58%; }
.ex-line.w65 { width: 65%; }
.ex-line.w70 { width: 70%; }
.ex-line.w76 { width: 76%; }
.ex-line.w82 { width: 82%; }
.ex-line.w88 { width: 88%; }
.ex-line.w90 { width: 90%; }
.ex-line.w94 { width: 94%; }

.ex-pdf-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(10, 37, 64, 0.55);
}
.ex-cursor {
  display: inline-block;
  color: var(--accent);
  animation: ex-blink 1.1s steps(2) infinite;
}
@keyframes ex-blink { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

.ex-flow {
  width: 60px;
  height: 32px;
  color: var(--accent);
  flex-shrink: 0;
  opacity: 0.78;
}
.ex-flow svg { width: 100%; height: 100%; display: block; }

.ex-txt-body {
  margin: 0;
  padding: 14px 14px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.55;
  color: #c7e1ff;
  white-space: pre-wrap;
  word-break: break-word;
  height: 220px;
  overflow: hidden;
}
.ex-txt-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  border-top: 1px dashed rgba(255,255,255,0.14);
}
.ex-ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4ade80;
  font-weight: 600;
}
.ex-ok svg { width: 11px; height: 11px; }

@media (max-width: 1000px) {
  .extract { max-width: 460px; }
  .ex-txt-body { height: 200px; }
}
@media (max-width: 760px) {
  .extract { grid-template-columns: 1fr; gap: 14px; max-width: 340px; }
  .ex-flow { transform: rotate(90deg); margin: 0 auto; width: 40px; height: 20px; }
  .ex-pdf, .ex-txt { transform: none; }
  .ex-txt-body { height: auto; min-height: 140px; }
}
