/* protectindiana.org — device-reveal ("takeover") screen. Loaded on every page; inert until
   takeover.js inserts #pi-reveal. Terminal look on purpose: system monospace, phosphor green,
   scanlines. The gold Continue button uses the site's own type to bridge back to the brand. */
html.pi-lock { overflow: hidden; }
html.pi-lock body { overflow: hidden; }

.pi-reveal {
  position: fixed; inset: 0; z-index: 2147483000;
  background: #050806; color: #8df59a;
  font: 15px/1.5 ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  outline: none;
  -webkit-font-smoothing: antialiased;
}
.pi-reveal.pi-instant { animation: pi-cut .32s steps(1, end) both; }
/* takeover phase: transparent over the frozen page; the terminal pieces carry their own black backing */
.pi-reveal.pi-glitching { background: transparent; touch-action: none; }
.pi-reveal.pi-glitching .pi-scan { opacity: 0; }
.pi-glitching .pi-top, .pi-glitching .pi-log, .pi-glitching .pi-facts > *, .pi-glitching .pi-map, .pi-glitching .pi-warn { background: #050806; box-shadow: 0 0 0 6px #050806; }
.pi-bands, .pi-noise, .pi-fx { position: fixed; inset: 0; pointer-events: none; display: block; }
.pi-bands { overflow: hidden; }
.pi-band { position: absolute; left: -4%; width: 108%; height: 12px; background: rgba(141,245,154,.12);
  -webkit-backdrop-filter: invert(1) hue-rotate(110deg) contrast(1.4); backdrop-filter: invert(1) hue-rotate(110deg) contrast(1.4); transition: opacity .2s; }
body.pi-glitch-page > :not(#pi-reveal) { animation: pi-jitter .16s steps(3, end) infinite, pi-invert 1.1s steps(1, end) infinite; }
body.pi-glitch-page > :not(#pi-reveal) * { text-shadow: -2px 0 rgba(255,0,90,.75), 2px 0 rgba(0,255,210,.75) !important; }
@keyframes pi-jitter { 0% { transform: translate(0,0); } 30% { transform: translate(-5px,1px) skewX(-.8deg); } 55% { transform: translate(6px,-2px); } 70% { transform: translate(-2px,3px) skewX(.6deg); } 100% { transform: translate(0,0); } }
@keyframes pi-invert { 0%, 100% { filter: none; } 82% { filter: invert(1) hue-rotate(90deg); } 90% { filter: none; } }
.pi-reveal::before { /* passing scan bar */
  content: ""; position: fixed; left: 0; right: 0; top: -20vh; height: 18vh; pointer-events: none;
  background: linear-gradient(180deg, rgba(141,245,154,0) 0%, rgba(141,245,154,.10) 50%, rgba(141,245,154,0) 100%);
  animation: pi-sweep 2.4s linear .1s 2;
}
.pi-scan { /* CRT scanlines + vignette */
  pointer-events: none; position: fixed; inset: 0; transition: opacity 1.4s linear;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(0,0,0,0) 55%, rgba(0,0,0,.65) 100%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.30) 0 1px, rgba(0,0,0,0) 1px 3px);
}
.pi-term { position: relative; max-width: 780px; margin: 0 auto; }

.pi-top {
  display: flex; align-items: center; gap: .7em; flex-wrap: wrap;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #5fbf6a;
  border-bottom: 1px solid #1a3320; padding-bottom: 9px; margin-bottom: 12px;
}
.pi-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 10px #ff3b3b; animation: pi-blink 1s steps(2, end) infinite; }
.pi-sid { color: #8df59a; letter-spacing: .06em; }
.pi-host { margin-left: auto; color: #3f8f4a; letter-spacing: .04em; text-transform: none; }

.pi-log { margin: 0 0 14px; font: inherit; color: #8df59a; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.5em; }
.pi-log::after { content: "▌"; animation: pi-blink 1s steps(2, end) infinite; }

.pi-head { display: flex; gap: 14px; align-items: flex-start; }
.pi-head .pi-log { flex: 1 1 auto; min-width: 0; }
.pi-map { flex: none; width: 76px; margin-top: -4px; text-align: center; }
.pi-map svg { display: block; width: 76px; height: 86px; overflow: visible; filter: drop-shadow(0 0 6px rgba(63,191,90,.35)); }
.pi-map path { fill: #0b1a10; stroke: #3fbf5a; stroke-width: 1.1; stroke-linejoin: round; }
.pi-pin { fill: #ff3b3b; }
.pi-zone { fill: rgba(255,59,59,.22); stroke: rgba(255,59,59,.55); stroke-width: .6; stroke-dasharray: 1.2 1; }
.pi-ping { fill: none; stroke: #ff3b3b; stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: pi-ping 1.5s ease-out infinite; }
.pi-map-cap { display: block; white-space: nowrap; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: #ff6b6b; margin-top: 2px; }
@media (min-width: 640px) {
  .pi-map { width: 112px; margin-top: -8px; }
  .pi-map svg { width: 112px; height: 126px; }
}

.pi-facts { display: grid; grid-template-columns: minmax(92px, 27%) 1fr; gap: 7px 12px; margin: 0; }
.pi-facts dt { color: #5fbf6a; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding-top: 3px; }
.pi-facts dd { margin: 0; color: #eafbea; overflow-wrap: anywhere; }
.pi-facts dd small { display: block; font-size: 12px; color: #7fa886; }
.pi-tag { display: inline-block; vertical-align: 2px; margin-left: 8px; padding: 1px 6px; border: 1px solid #b98a2a; border-radius: 3px;
  font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: #ffc65c; animation: pi-breathe 1.6s ease-in-out infinite; }

.pi-warn { margin-top: 24px; padding-top: 18px; border-top: 1px solid #3a1414; }
.pi-warn-title {
  margin: 0 0 12px; font: 800 clamp(44px, 13vw, 72px)/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .06em; color: #ff3b3b; text-shadow: 0 0 22px rgba(255,59,59,.55), 0 0 2px rgba(255,255,255,.4);
  animation: pi-slam .38s cubic-bezier(.2,.9,.25,1.25) both;
}
.pi-warn-text { margin: 0 0 8px; max-width: 58ch; font-size: 16px; line-height: 1.55; color: #f4f7f4; }
.pi-warn-sub { margin: 0 0 18px; color: #9fb8a4; }
.pi-continue {
  display: inline-block; appearance: none; -webkit-appearance: none; cursor: pointer;
  border: 2px solid #c69b27; border-radius: 999px; background: #c69b27; color: #091c34;
  font: 700 17px/1.2 "Literata", Charter, Georgia, serif; padding: 15px 24px; min-height: 52px;
  box-shadow: 0 0 0 0 rgba(198,155,39,.55); animation: pi-pulse 1.8s ease-out .6s infinite;
}
.pi-continue:hover, .pi-continue:focus-visible { background: #d8ad39; border-color: #d8ad39; outline: 3px solid #fff; outline-offset: 3px; }
.pi-continue:active { transform: translateY(1px); }
.pi-fine { margin: 16px 0 0; max-width: 64ch; font-size: 11.5px; line-height: 1.5; color: #6f8f75; }
.pi-fine a { color: inherit; }
.pi-flash { animation: pi-flash .26s steps(1, end) both; }
.pi-reveal.pi-out { animation: pi-out .5s cubic-bezier(.4,0,.6,1) both; overflow: hidden; }
@keyframes pi-out { 0% { clip-path: inset(0 0 0 0); opacity: 1; filter: none; } 60% { clip-path: inset(49.4% 0 49.4% 0); opacity: 1; filter: brightness(2.4) saturate(1.4); } 100% { clip-path: inset(50% 0 50% 0); opacity: 0; filter: brightness(3); } }

@keyframes pi-cut { 0% { background: #ffffff; } 40% { background: #000; } 100% { background: #050806; } }
@keyframes pi-sweep { from { top: -20vh; } to { top: 110vh; } }
@keyframes pi-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes pi-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes pi-ping { 0% { transform: scale(.25); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes pi-slam { 0% { transform: scale(1.5); opacity: 0; filter: blur(3px); } 100% { transform: scale(1); opacity: 1; filter: none; } }
@keyframes pi-pulse { 0% { box-shadow: 0 0 0 0 rgba(198,155,39,.55); } 100% { box-shadow: 0 0 0 14px rgba(198,155,39,0); } }
@keyframes pi-flash { 0% { background: #ff3b3b; } 45% { background: #fff; } 100% { background: #050806; } }

.pi-reduced, .pi-reduced *, .pi-reduced::before, .pi-reduced .pi-log::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .pi-reveal, .pi-reveal *, .pi-reveal::before { animation: none !important; } }
@media print { .pi-reveal { display: none !important; } }
