/* ─── CISPE TACTICAL PRELOADER ─────────────────────────────── */
#cispe-pl {
  position: fixed;
  inset: 0;
  z-index: 99999;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
}

/* ─ Blast door panels ─ */
.pl-door {
  position: absolute;
  left: 0;
  right: 0;
  background: #080808;
  transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}
.pl-door-top    { top: 0;    height: 50.5%; transform: translateY(0); }
.pl-door-bottom { bottom: 0; height: 50.5%; transform: translateY(0); }
#cispe-pl.pl-exit .pl-door-top    { transform: translateY(-100%); }
#cispe-pl.pl-exit .pl-door-bottom { transform: translateY(100%); }

/* ─ Corner brackets ─ */
.pl-corner {
  position: absolute;
  width: 36px;
  height: 36px;
}
.pl-door-top    .pl-corner-tl { top: 22px;    left: 22px;    border-top: 2px solid #FF5B1F; border-left: 2px solid #FF5B1F; }
.pl-door-top    .pl-corner-tr { top: 22px;    right: 22px;   border-top: 2px solid #FF5B1F; border-right: 2px solid #FF5B1F; }
.pl-door-bottom .pl-corner-bl { bottom: 22px; left: 22px;    border-bottom: 2px solid #FF5B1F; border-left: 2px solid #FF5B1F; }
.pl-door-bottom .pl-corner-br { bottom: 22px; right: 22px;   border-bottom: 2px solid #FF5B1F; border-right: 2px solid #FF5B1F; }

.pl-corner { opacity: 0; animation: pl-corner-in 0.35s ease forwards; }
.pl-door-top    .pl-corner-tl { animation-delay: 0.05s; }
.pl-door-top    .pl-corner-tr { animation-delay: 0.10s; }
.pl-door-bottom .pl-corner-bl { animation-delay: 0.15s; }
.pl-door-bottom .pl-corner-br { animation-delay: 0.20s; }
@keyframes pl-corner-in { to { opacity: 1; } }

/* Corner tick marks */
.pl-corner::before,
.pl-corner::after {
  content: '';
  position: absolute;
  background: #FF5B1F;
  opacity: 0.4;
}
.pl-corner-tl::before { width: 1px; height: 6px; top: -1px; right: -8px; }
.pl-corner-tl::after  { width: 6px; height: 1px; bottom: -8px; left: -1px; }
.pl-corner-tr::before { width: 1px; height: 6px; top: -1px; left: -8px; }
.pl-corner-tr::after  { width: 6px; height: 1px; bottom: -8px; right: -1px; }
.pl-corner-bl::before { width: 1px; height: 6px; bottom: -1px; right: -8px; }
.pl-corner-bl::after  { width: 6px; height: 1px; top: -8px; left: -1px; }
.pl-corner-br::before { width: 1px; height: 6px; bottom: -1px; left: -8px; }
.pl-corner-br::after  { width: 6px; height: 1px; top: -8px; right: -1px; }

/* ─ Scan line ─ */
.pl-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #FF5B1F 30%, #fff 50%, #FF5B1F 70%, transparent 100%);
  box-shadow: 0 0 12px 2px rgba(255, 91, 31, 0.5);
  animation: pl-scan-sweep 1.1s cubic-bezier(0.4, 0, 0.6, 1) 0.1s forwards;
  opacity: 0;
  z-index: 5;
}
@keyframes pl-scan-sweep {
  0%   { top: 0;    opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100vh; opacity: 0; }
}

/* ─ Grid overlay ─ */
.pl-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,91,31,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,91,31,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0;
  animation: pl-fade-in 0.6s ease 0.2s forwards;
}

/* ─ Center content ─ */
.pl-center {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
#cispe-pl.pl-exit .pl-center { opacity: 0; }

/* ─ Crosshair rings ─ */
.pl-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 91, 31, 0.08);
  animation: pl-ring-pulse 3s ease-in-out infinite;
}
.pl-ring-1 { width: 360px; height: 360px; animation-delay: 0s; }
.pl-ring-2 { width: 560px; height: 560px; animation-delay: 0.6s; border-style: dashed; }
.pl-ring-3 { width: 720px; height: 720px; animation-delay: 1.2s; }
@keyframes pl-ring-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.15; transform: scale(1.02); }
}

/* ─ Logo ─ */
.pl-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0;
  transform: scale(0.75);
  animation: pl-logo-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
  position: relative;
  z-index: 2;
}
@keyframes pl-logo-in {
  to { opacity: 1; transform: scale(1); }
}

/* ─ Brand label ─ */
.pl-brand {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.42em;
  color: #FF5B1F;
  text-transform: uppercase;
  opacity: 0;
  animation: pl-fade-in 0.4s ease 0.55s forwards;
  position: relative;
  z-index: 2;
}

/* ─ Divider ─ */
.pl-divider {
  width: 220px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #FF5B1F40, #FF5B1F, #FF5B1F40, transparent);
  margin: 18px 0 16px;
  opacity: 0;
  animation: pl-fade-in 0.4s ease 0.65s forwards;
  position: relative;
  z-index: 2;
}

/* ─ Terminal ─ */
.pl-terminal {
  width: min(460px, 88vw);
  font-size: 10.5px;
  color: #444;
  line-height: 2;
  letter-spacing: 0.04em;
  min-height: 110px;
  position: relative;
  z-index: 2;
}
.pl-line {
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(4px);
  animation: pl-line-in 0.25s ease forwards;
}
@keyframes pl-line-in {
  to { opacity: 1; transform: translateY(0); }
}
.pl-line-prompt { color: #FF5B1F; opacity: 0.5; }
.pl-line-ok     { color: #FF5B1F; margin-left: auto; }
.pl-line-final  { color: #FF5B1F; font-weight: bold; letter-spacing: 0.15em; justify-content: center; padding-top: 2px; }

/* ─ Progress bar ─ */
.pl-bar-wrap {
  margin-top: 16px;
  width: min(460px, 88vw);
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: pl-fade-in 0.4s ease 0.75s forwards;
}
.pl-bar-segments {
  display: flex;
  gap: 3px;
  height: 4px;
}
.pl-seg {
  flex: 1;
  background: #1c1c1c;
  border-radius: 1px;
  transition: background 0.3s ease;
}
.pl-seg.lit { background: #FF5B1F; }
.pl-seg.dim { background: #7a2e10; }

.pl-bar-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 9px;
  color: #2e2e2e;
  letter-spacing: 0.25em;
}
#pl-pct { color: #FF5B1F; }

/* ─ Status row ─ */
.pl-status-row {
  margin-top: 10px;
  width: min(460px, 88vw);
  display: flex;
  justify-content: space-between;
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: #2a2a2a;
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: pl-fade-in 0.4s ease 0.8s forwards;
}
.pl-status-row span:last-child { color: #FF5B1F; opacity: 0.4; }

/* ─ Shared fade ─ */
@keyframes pl-fade-in { to { opacity: 1; } }
