/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE PERSONALIDADES — v3.0
   Uses expedition hero system + persona-specific photo/intel grid
   ═══════════════════════════════════════════════════════════════════════════ */

.bufo-persona-wrap {
  --pd-green: #00ff41;
  --pd-green-rgb: 0,255,65;
  --pd-text: rgba(230,236,246,.95);
  --pd-text-dim: rgba(167,177,194,.85);
  --pd-mono: var(--bufo-mono, 'JetBrains Mono', 'Fira Code', monospace);
  position: relative;
}

.bufo-persona-hero {
  position: relative;
  padding: clamp(24px, 4vw, 48px) 0 0;
}

/* ── Top bar ── */
.pd-topbar {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  margin-bottom: 24px;
}
.pd-topbar__left {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--pd-mono); font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--pd-text-dim);
}
.pd-topbar__back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--pd-text-dim); text-decoration: none;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.03);
  transition: all .25s;
}
.pd-topbar__back:hover {
  color: var(--pd-text);
  border-color: rgba(var(--pd-green-rgb),.2);
  background: rgba(var(--pd-green-rgb),.04);
}
.pd-topbar__sep { opacity: .3; }
.pd-topbar__current { color: var(--pd-text); }
.pd-topbar__right { flex-shrink: 0; }

/* ── Profession ── */
.pd-profession {
  font-family: var(--pd-mono); font-size: 14px;
  letter-spacing: .03em; color: rgba(var(--pd-green-rgb),.55);
  margin: -8px 0 16px; max-width: 60ch;
}

/* ═══ HERO GRID ═══ */
.pd-hero-grid {
  display: grid; grid-template-columns: 300px 1fr;
  gap: clamp(24px, 3vw, 40px); align-items: start;
  margin: 32px 0; padding: 28px;
  border-radius: 20px;
  border: 1px solid rgba(var(--pd-green-rgb),.08);
  background: linear-gradient(135deg, rgba(var(--pd-green-rgb),.03) 0%, transparent 40%), rgba(0,0,0,.35);
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
  position: relative; overflow: hidden;
}
.pd-hero-grid::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, transparent, transparent 2px, rgba(255,255,255,.008) 3px);
  pointer-events: none;
}
@media (max-width: 900px) { .pd-hero-grid { grid-template-columns: 1fr; padding: 20px; } }
.pd-hero-grid__photo { position: relative; }
.pd-hero-grid__intel { min-width: 0; }

/* ═══ POLAROID ═══ */
.bufo-polaroid {
  position: relative; width: min(300px, 100%); margin: 0 auto;
  transform: rotate(-2deg);
  filter: drop-shadow(0 16px 48px rgba(0,0,0,.5));
  transition: transform .5s cubic-bezier(.16,1,.3,1);
}
.bufo-polaroid:hover { transform: rotate(0deg) scale(1.02); }
.bufo-polaroid::before, .bufo-polaroid::after {
  content: ""; position: absolute; top: -10px;
  width: 72px; height: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 5;
}
.bufo-polaroid::before { left: 14px; transform: rotate(5deg); }
.bufo-polaroid::after { right: 12px; transform: rotate(-5deg); }
.bufo-polaroid__frame {
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02)), rgba(8,9,12,.9);
  border: 1px solid rgba(255,255,255,.08); border-radius: 14px;
  padding: 10px; position: relative;
}
.bufo-polaroid__photo {
  border-radius: 10px; overflow: hidden; position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255,255,255,.06); background: rgba(0,0,0,.4);
}
.bufo-polaroid__photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.08) saturate(0.9); transition: filter .5s;
}
.bufo-polaroid:hover .bufo-polaroid__photo img { filter: contrast(1.04) saturate(1); }
.bufo-polaroid__photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.3) 100%),
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.1), transparent 50%);
  pointer-events: none;
}
.bufo-polaroid__biometric {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  opacity: 0; transition: opacity .5s;
}
.bufo-polaroid:hover .bufo-polaroid__biometric { opacity: 1; }
.bufo-polaroid__biometric::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 50px; height: 50px; transform: translate(-50%, -50%);
  border: 1px solid rgba(var(--pd-green-rgb),.35); border-radius: 50%;
  animation: pd-bioPulse 2s ease-out infinite;
}
@keyframes pd-bioPulse {
  0% { width: 30px; height: 30px; opacity: .7; }
  100% { width: 90px; height: 90px; opacity: 0; }
}
.bufo-polaroid__corners {
  position: absolute; inset: 10px; z-index: 2; pointer-events: none;
  opacity: 0; transition: opacity .5s;
}
.bufo-polaroid:hover .bufo-polaroid__corners { opacity: 1; }
.bufo-polaroid__corners::before, .bufo-polaroid__corners::after,
.bufo-polaroid__corners span::before, .bufo-polaroid__corners span::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border-color: rgba(var(--pd-green-rgb),.45); border-style: solid; border-width: 0;
}
.bufo-polaroid__corners::before { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.bufo-polaroid__corners::after { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.bufo-polaroid__corners span::before { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.bufo-polaroid__corners span::after { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.bufo-polaroid__caption {
  margin-top: 8px; display: flex; align-items: baseline;
  justify-content: space-between; gap: 8px;
  font-family: var(--pd-mono); color: var(--pd-text);
}
.bufo-polaroid__caption strong { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; opacity: .5; }
.bufo-polaroid__caption span { font-size: 11px; letter-spacing: .04em; opacity: .7; }

/* ═══ DATA TABLE ═══ */
.bufo-data {
  border-radius: 12px;
  border: 1px solid rgba(var(--pd-green-rgb),.06);
  background: rgba(0,0,0,.2); overflow: hidden;
}
.bufo-data__row {
  display: grid; grid-template-columns: 150px 1fr;
  gap: 14px; padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,.03);
  transition: background .2s; position: relative;
}
.bufo-data__row:first-child { border-top: 0; }
.bufo-data__row:hover { background: rgba(var(--pd-green-rgb),.02); }
.bufo-data__row::before {
  content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 100%;
  background: var(--pd-green); opacity: 0; transition: opacity .2s;
}
.bufo-data__row:hover::before { opacity: .5; }
.bufo-data__label {
  font-family: var(--pd-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(var(--pd-green-rgb),.4); padding-top: 3px;
}
.bufo-data__value { font-size: 14px; line-height: 1.6; color: var(--pd-text); word-break: break-word; }
.bufo-data__value strong { color: rgba(var(--pd-green-rgb),.8); font-weight: 700; }
.bufo-data__value p { margin: 0; }
@media (max-width: 520px) { .bufo-data__row { grid-template-columns: 1fr; gap: 3px; } }

/* ═══ CLEARANCE BAR ═══ */
.bufo-clearance {
  margin-top: 14px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid rgba(var(--pd-green-rgb),.06); background: rgba(0,0,0,.18);
}
.bufo-clearance__label {
  font-family: var(--pd-mono); font-size: 9px; letter-spacing: .15em;
  text-transform: uppercase; color: rgba(var(--pd-green-rgb),.35); margin-bottom: 6px;
}
.bufo-clearance__bar { display: flex; gap: 3px; height: 3px; }
.bufo-clearance__seg { flex: 1; border-radius: 2px; background: rgba(255,255,255,.05); }
.bufo-clearance__seg--active { background: var(--pd-green); box-shadow: 0 0 6px rgba(var(--pd-green-rgb),.25); }
.bufo-clearance--high .bufo-clearance__seg--active { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,.25); }
.bufo-clearance--medium .bufo-clearance__seg--active { background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,.25); }
.bufo-clearance__level {
  font-family: var(--pd-mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; margin-top: 5px; color: rgba(167,177,194,.5);
}

/* ═══ CONTENT BODY ═══ */
.single-expedition--personalidad .prose-content {
  position: relative; padding: 28px 24px; border-radius: 16px;
  border: 1px solid rgba(var(--pd-green-rgb),.06);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.008)), rgba(0,0,0,.2);
  box-shadow: 0 16px 50px rgba(0,0,0,.3);
}
.single-expedition--personalidad .prose-content::before {
  content: ""; position: absolute; inset: 0; border-radius: 16px;
  background: radial-gradient(ellipse 50% 30% at 6% 0%, rgba(var(--pd-green-rgb),.05), transparent 50%);
  pointer-events: none;
}
.single-expedition--personalidad .expedition-sidebar { margin-top: 10px; }

/* ═══ NETWORK + SOURCES ═══ */
.pd-network { margin-top: 32px; border-radius: 16px; border: 1px solid rgba(var(--pd-green-rgb),.06); background: rgba(0,0,0,.18); overflow: hidden; }
.pd-network__header { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid rgba(var(--pd-green-rgb),.06); background: rgba(var(--pd-green-rgb),.02); }
.pd-network__header svg { width: 15px; height: 15px; color: rgba(var(--pd-green-rgb),.4); }
.pd-network__header span { font-family: var(--pd-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--pd-text-dim); }
.pd-network__header strong { margin-left: auto; font-family: var(--pd-mono); font-size: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(var(--pd-green-rgb),.06); color: rgba(var(--pd-green-rgb),.6); border: 1px solid rgba(var(--pd-green-rgb),.1); }
.pd-network__group { padding: 14px 18px; }
.pd-network__group + .pd-network__group { border-top: 1px solid rgba(255,255,255,.03); }
.pd-network__gtitle { font-family: var(--pd-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(var(--pd-green-rgb),.35); margin-bottom: 10px; }
.pd-network__items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.pd-network__item { display: flex; gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.04); background: rgba(255,255,255,.015); text-decoration: none; color: inherit; transition: all .25s; }
.pd-network__item:hover { background: rgba(var(--pd-green-rgb),.03); border-color: rgba(var(--pd-green-rgb),.1); transform: translateX(3px); }
.pd-network__thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.05); flex-shrink: 0; }
.pd-network__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-network__info { min-width: 0; }
.pd-network__name { font-size: 13px; font-weight: 600; color: var(--pd-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.pd-network__item:hover .pd-network__name { color: var(--pd-green); }
.pd-network__date { font-family: var(--pd-mono); font-size: 10px; color: var(--pd-text-dim); margin-top: 1px; }
.pd-network__excerpt { font-size: 12px; color: rgba(167,177,194,.5); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.pd-sources { margin-top: 24px; border-radius: 16px; border: 1px solid rgba(var(--pd-green-rgb),.06); background: rgba(0,0,0,.18); overflow: hidden; }
.pd-sources__header { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid rgba(var(--pd-green-rgb),.06); background: rgba(var(--pd-green-rgb),.02); }
.pd-sources__header svg { width: 15px; height: 15px; color: rgba(var(--pd-green-rgb),.4); }
.pd-sources__header span { font-family: var(--pd-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--pd-text-dim); }
.pd-sources__list { padding: 10px 18px; }
.pd-sources__item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.025); }
.pd-sources__item:last-child { border-bottom: none; }
.pd-sources__idx { font-family: var(--pd-mono); font-size: 10px; color: rgba(var(--pd-green-rgb),.25); flex-shrink: 0; width: 28px; }
.pd-sources__link { font-size: 13px; color: rgba(var(--pd-green-rgb),.55); text-decoration: none; word-break: break-all; transition: color .2s; }
.pd-sources__link:hover { color: var(--pd-green); }
.pd-sources__domain { font-family: var(--pd-mono); font-size: 10px; color: rgba(167,177,194,.4); margin-left: auto; flex-shrink: 0; padding-left: 12px; }

/* ═══ TESTIMONY VISUAL (left column) ═══ */
.bufo-testimonio-wrap { --pd-green: #fbbf24; --pd-green-rgb: 251,191,36; }

.tst-visual {
  width: min(300px, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 16px 48px rgba(0,0,0,.5));
}
.tst-visual__frame {
  background:
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    rgba(8,9,12,.9);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 10px;
  position: relative;
  overflow: hidden;
}
.tst-visual__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  filter: contrast(1.05) saturate(.85);
}
.tst-visual__icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  aspect-ratio: 4/3;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  background:
    radial-gradient(circle at 50% 40%, rgba(251,191,36,.06), transparent 60%),
    rgba(0,0,0,.4);
  color: rgba(251,191,36,.3);
}
.tst-visual__waves {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
}
.tst-visual__waves span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: rgba(251,191,36,.35);
  animation: tst-wave 1.2s ease-in-out infinite;
}
.tst-visual__waves span:nth-child(1) { height: 8px; animation-delay: 0s; }
.tst-visual__waves span:nth-child(2) { height: 18px; animation-delay: .1s; }
.tst-visual__waves span:nth-child(3) { height: 28px; animation-delay: .2s; }
.tst-visual__waves span:nth-child(4) { height: 32px; animation-delay: .3s; }
.tst-visual__waves span:nth-child(5) { height: 24px; animation-delay: .4s; }
.tst-visual__waves span:nth-child(6) { height: 14px; animation-delay: .5s; }
.tst-visual__waves span:nth-child(7) { height: 6px; animation-delay: .6s; }
@keyframes tst-wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(.4); }
}

/* Persona chip overlay */
.tst-visual__persona,
.tst-visual__anon {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.3);
  text-decoration: none;
  color: var(--pd-text);
  font-size: 12px;
  transition: all .25s;
}
.tst-visual__persona:hover {
  border-color: rgba(251,191,36,.15);
  background: rgba(251,191,36,.04);
}
.tst-visual__persona img {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.1);
}
.tst-visual__persona svg,
.tst-visual__anon svg {
  width: 28px; height: 28px;
  padding: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  color: rgba(251,191,36,.4);
}
.tst-visual__persona span,
.tst-visual__anon span {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tst-visual__anon {
  opacity: .5;
  font-style: italic;
}

.tst-visual__caption {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--pd-mono);
  color: var(--pd-text);
}
.tst-visual__caption strong {
  font-size: 9px; letter-spacing: .2em;
  text-transform: uppercase; opacity: .5;
}
.tst-visual__caption span {
  font-size: 11px; letter-spacing: .04em; opacity: .7;
}

/* Testimony amber overrides */
.bufo-testimonio-wrap .bufo-clearance--high .bufo-clearance__seg--active {
  background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.25);
}
.bufo-testimonio-wrap .bufo-clearance--medium .bufo-clearance__seg--active {
  background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,.25);
}
.bufo-testimonio-wrap .bufo-clearance--low .bufo-clearance__seg--active {
  background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,.25);
}

@media (prefers-reduced-motion: reduce) {
  .tst-visual__waves span { animation: none; }
}
.perf-tier-3 .tst-visual__waves { display: none; }

/* ═══ EVENT VISUAL (left column) ═══ */
.bufo-evento-wrap { --pd-green: #06b6d4; --pd-green-rgb: 6,182,212; }

.evt-visual {
  width: min(300px, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 16px 48px rgba(0,0,0,.5));
}
.evt-visual__frame {
  background:
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    rgba(8,9,12,.9);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 10px;
  position: relative;
  overflow: hidden;
}
.evt-visual__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  filter: contrast(1.05) saturate(.9);
}

/* Calendar card (when no thumbnail) */
.evt-visual__calendar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  aspect-ratio: 4/3;
  border-radius: 10px;
  border: 1px solid rgba(6,182,212,.1);
  background:
    radial-gradient(circle at 50% 30%, rgba(6,182,212,.08), transparent 60%),
    rgba(0,0,0,.4);
  padding: 16px;
}
.evt-visual__cal-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--pd-mono);
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(6,182,212,.5);
}
.evt-visual__cal-day {
  font-family: var(--pd-mono);
  font-size: clamp(56px, 10vw, 80px);
  font-weight: 800;
  line-height: 1;
  color: rgba(230,236,246,.9);
  text-shadow: 0 0 30px rgba(6,182,212,.15);
}
.evt-visual__cal-time {
  font-family: var(--pd-mono);
  font-size: 14px;
  letter-spacing: .06em;
  color: rgba(6,182,212,.4);
  margin-top: 4px;
}
.evt-visual__cal-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 6px;
  font-family: var(--pd-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.evt-visual__cal-status--live {
  background: rgba(34,197,94,.1);
  color: rgba(34,197,94,.8);
  border: 1px solid rgba(34,197,94,.2);
}
.evt-visual__cal-status--scheduled {
  background: rgba(6,182,212,.08);
  color: rgba(6,182,212,.7);
  border: 1px solid rgba(6,182,212,.15);
}
.evt-visual__cal-status--past {
  background: rgba(255,255,255,.04);
  color: rgba(167,177,194,.5);
  border: 1px solid rgba(255,255,255,.06);
}
.evt-visual__cal-pulse {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34,197,94,.4);
  animation: evt-pulse 1.5s ease-in-out infinite;
}
@keyframes evt-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.7); }
}

/* Official link */
.evt-visual__link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(6,182,212,.1);
  background: rgba(6,182,212,.04);
  text-decoration: none;
  color: rgba(6,182,212,.7);
  font-family: var(--pd-mono);
  font-size: 12px;
  transition: all .25s;
}
.evt-visual__link:hover {
  border-color: rgba(6,182,212,.25);
  background: rgba(6,182,212,.08);
  color: rgba(6,182,212,.9);
}
.evt-visual__link span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evt-visual__caption {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--pd-mono);
  color: var(--pd-text);
}
.evt-visual__caption strong {
  font-size: 9px; letter-spacing: .2em;
  text-transform: uppercase; opacity: .5;
}
.evt-visual__caption span {
  font-size: 11px; letter-spacing: .04em; opacity: .7;
}

/* Evento cyan overrides for clearance bar */
.bufo-evento-wrap .bufo-clearance__seg--active {
  background: #06b6d4; box-shadow: 0 0 6px rgba(6,182,212,.25);
}

@media (prefers-reduced-motion: reduce) {
  .evt-visual__cal-pulse { animation: none; }
}

/* ═══ DOCUMENT VISUAL (left column) ═══ */
.bufo-documento-wrap { --pd-green: #ef4444; --pd-green-rgb: 239,68,68; }

.doc-visual {
  width: min(300px, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 16px 48px rgba(0,0,0,.5));
}
.doc-visual__frame {
  background:
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    rgba(8,9,12,.9);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 10px;
  position: relative;
  overflow: hidden;
}
.doc-visual__img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  filter: contrast(1.05) saturate(.85);
}

/* Document icon (when no thumbnail) */
.doc-visual__icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  aspect-ratio: 3/4;
  border-radius: 10px;
  border: 1px solid rgba(239,68,68,.08);
  background:
    radial-gradient(circle at 50% 35%, rgba(239,68,68,.06), transparent 55%),
    rgba(0,0,0,.4);
  color: rgba(239,68,68,.3);
  position: relative;
  overflow: hidden;
}

/* Classification stamp */
.doc-visual__stamp {
  position: absolute;
  top: 20px; right: -28px;
  transform: rotate(35deg);
  font-family: var(--pd-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2em;
  padding: 4px 40px;
  border: 2px solid currentColor;
  opacity: .25;
}
.doc-visual__stamp--green { color: #22c55e; }
.doc-visual__stamp--cyan { color: #06b6d4; }
.doc-visual__stamp--amber { color: #fbbf24; }
.doc-visual__stamp--red { color: #ef4444; }

.doc-visual__ext {
  font-family: var(--pd-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  color: rgba(239,68,68,.35);
  padding: 3px 10px;
  border: 1px solid rgba(239,68,68,.15);
  border-radius: 6px;
  background: rgba(239,68,68,.04);
}

/* Fake document lines */
.doc-visual__lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 60%;
  margin-top: 4px;
}
.doc-visual__lines span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: rgba(255,255,255,.04);
}
.doc-visual__lines span:nth-child(1) { width: 100%; }
.doc-visual__lines span:nth-child(2) { width: 85%; }
.doc-visual__lines span:nth-child(3) { width: 92%; }
.doc-visual__lines span:nth-child(4) { width: 70%; }
.doc-visual__lines span:nth-child(5) { width: 55%; }

/* Download button */
.doc-visual__download {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(239,68,68,.1);
  background: rgba(239,68,68,.04);
  text-decoration: none;
  color: rgba(239,68,68,.7);
  font-family: var(--pd-mono);
  font-size: 12px;
  transition: all .25s;
}
.doc-visual__download:hover {
  border-color: rgba(239,68,68,.25);
  background: rgba(239,68,68,.08);
  color: rgba(239,68,68,.9);
}
.doc-visual__download span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-visual__download em {
  font-style: normal;
  font-size: 10px;
  color: rgba(167,177,194,.4);
  flex-shrink: 0;
}

.doc-visual__caption {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--pd-mono);
  color: var(--pd-text);
}
.doc-visual__caption strong {
  font-size: 9px; letter-spacing: .2em;
  text-transform: uppercase; opacity: .5;
}
.doc-visual__caption span {
  font-size: 11px; letter-spacing: .04em; opacity: .7;
}

/* Documento red overrides for clearance bar */
.bufo-documento-wrap .bufo-clearance__seg--active {
  background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,.25);
}

/* ═══ EXPEDIENTES LIST (hero) ═══ */
.pd-exp-list {
  margin: 28px 0 8px;
  border-radius: 16px;
  border: 1px solid rgba(var(--pd-green-rgb),.08);
  background: rgba(0,0,0,.3);
  overflow: hidden;
}
.pd-exp-list__header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(var(--pd-green-rgb),.06);
  background: rgba(var(--pd-green-rgb),.02);
}
.pd-exp-list__header svg { color: rgba(var(--pd-green-rgb),.4); }
.pd-exp-list__header span {
  font-family: var(--pd-mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--pd-text-dim);
}
.pd-exp-list__header strong {
  margin-left: auto;
  font-family: var(--pd-mono); font-size: 10px;
  padding: 2px 8px; border-radius: 6px;
  background: rgba(var(--pd-green-rgb),.06);
  color: rgba(var(--pd-green-rgb),.6);
  border: 1px solid rgba(var(--pd-green-rgb),.1);
}
.pd-exp-list__rows { padding: 4px; }
.pd-exp-list__row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none; color: inherit;
  transition: all .2s;
}
.pd-exp-list__row:hover {
  background: rgba(var(--pd-green-rgb),.03);
}
.pd-exp-list__row + .pd-exp-list__row {
  border-top: 1px solid rgba(255,255,255,.025);
}
.pd-exp-list__id {
  display: flex; align-items: center; gap: 10px;
  min-width: 0; flex: 1;
}
.pd-exp-list__id img {
  width: 36px; height: 36px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.06);
}
.pd-exp-list__id svg { flex-shrink: 0; color: rgba(var(--pd-green-rgb),.3); }
.pd-exp-list__id > div { min-width: 0; }
.pd-exp-list__case {
  display: block;
  font-family: var(--pd-mono); font-size: 10px;
  letter-spacing: .08em; color: rgba(var(--pd-green-rgb),.4);
}
.pd-exp-list__title {
  display: block;
  font-size: 13px; font-weight: 600; color: var(--pd-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .2s;
}
.pd-exp-list__row:hover .pd-exp-list__title { color: var(--pd-green); }
.pd-exp-list__meta {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.pd-exp-list__loc {
  font-size: 11px; color: var(--pd-text-dim);
  max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pd-exp-list__date {
  font-family: var(--pd-mono); font-size: 10px; color: rgba(167,177,194,.4);
}
.pd-exp-list__arrow {
  flex-shrink: 0; color: rgba(255,255,255,.15);
  transition: color .2s, transform .2s;
}
.pd-exp-list__row:hover .pd-exp-list__arrow {
  color: var(--pd-green); transform: translateX(3px);
}

/* ba-status reuse for hero context */
.pd-exp-list .ba-status {
  font-size: 9px; padding: 2px 6px;
}

@media (max-width: 768px) {
  .pd-exp-list__meta { display: none; }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .bufo-polaroid { transform: rotate(0); }
  .bufo-polaroid:hover { transform: scale(1.01); }
  .pd-topbar { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .pd-hero-grid { padding: 14px; }
  .pd-topbar__back { font-size: 11px; padding: 5px 8px; }
  .pd-network__items { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .bufo-polaroid__biometric::before { animation: none; }
}
.perf-tier-3 .bufo-polaroid__biometric,
.perf-tier-3 .bufo-polaroid__corners,
.perf-tier-3 .pd-hero-grid::before { display: none; }