/* Shared by the approved preview and the day -2 school surface only. */
.display-fault-layer { display:none; }
.fault-filter-defs { position:absolute;overflow:hidden;pointer-events:none; }
.is-severe .visual-preview-controls { flex-wrap:wrap; }
.is-severe .display-fault-controls { flex-basis:100%;padding-top:3px;border-top:1px dotted #b7bec4; }
.is-severe .display-fault-controls select { max-width:170px;font:12px/1.7 "SimSun",serif;color:#244d70;background:#f0f2f3;border:1px solid #aeb6bf;padding:3px; }
.is-severe .display-fault-controls button[aria-pressed="true"] { background:#d3d9dc;box-shadow:inset 1px 1px 2px #9aa7b0; }
.is-severe .fault-filter-defs { position:absolute;overflow:hidden;pointer-events:none; }
.is-severe .display-fault-layer { display:block;position:fixed;inset:0;z-index:40;pointer-events:none;overflow:hidden;user-select:none;contain:strict; }
.is-severe .display-fault-layer:empty { display:none; }
.is-severe .fault-view { position:absolute;overflow:hidden;isolation:isolate; }
.is-severe :is(.fault-tear,.fault-block,.fault-hole,.fault-separation,.fault-color,.fault-invert,.fault-echo,.fault-mono) { position:absolute;pointer-events:none; }
.is-severe .fault-pixels { position:absolute;overflow:hidden;transform-origin:top left;background:#d6dfd8; }
.is-severe .fault-snapshot,.is-severe .fault-snapshot * { pointer-events:none!important;animation:none!important;transition:none!important;caret-color:transparent!important; }
.is-severe .fault-snapshot { box-shadow:none!important; }
.is-severe .fault-snapshot img { visibility:visible; }

/* 120ms frame loss. Present at the first frame, then removed in one step. */
.is-severe .fault-dropout { position:absolute;inset:0;background:#070b10; }

/* Misaddressed horizontal lines: no easing, no lead-in, independently sized slices. */
.is-severe .fault-tear { z-index:4;overflow:hidden;animation:fault-tear 320ms steps(1,end) both; }
.is-severe .fault-tear-b { animation-direction:reverse; }
@keyframes fault-tear {
  0% { transform:translateX(calc(-1 * var(--tear-shift,27px))); }
  71%,100% { transform:translateX(7px); }
}

/* Contents drop away and leave three isolated scan lines. */
.is-severe .fault-hole { background:#0c1113;animation:fault-hole 880ms steps(1,end) both; }
.is-severe .fault-block { z-index:6;animation:fault-fall 880ms steps(1,end) both; }
.is-severe .fault-block>.fault-pixels { filter:saturate(.8) contrast(1.15);animation:fault-pixel-loss 880ms steps(1,end) both; }
.is-severe .fault-block-1,.is-severe .fault-hole-1,.is-severe .fault-block-1>.fault-pixels { animation-delay:80ms; }
.is-severe .fault-rgb { position:absolute;overflow:visible;opacity:0;animation:fault-rgb 880ms steps(1,end) both; }
.is-severe .fault-block-1 .fault-rgb { animation-delay:80ms; }
.is-severe .fault-channel { position:absolute;left:0;right:0;display:block;height:2px; }
.is-severe .fault-channel-red { top:0;right:6%;transform:translateX(-5px);background:#d41936; }
.is-severe .fault-channel-green { top:4px;left:12%;transform:translateX(3px);background:#17bd79; }
.is-severe .fault-channel-blue { top:9px;right:17%;transform:translateX(8px);background:#274ee7; }
@keyframes fault-fall {
  0% { transform:translate(8px,0);opacity:1; }
  18%,100% { transform:translate(-7px,18px);opacity:1; }
}
@keyframes fault-pixel-loss {
  0% { clip-path:inset(0);opacity:1; }
  18% { clip-path:inset(0 0 70%); }
  27%,100% { clip-path:inset(0 0 98%);opacity:0; }
}
@keyframes fault-rgb { 0% { opacity:0; } 27%,79% { opacity:1; } 80%,100% { opacity:0; } }
@keyframes fault-hole { 0%,59% { opacity:1; } 60%,100% { opacity:0; } }

/* Real RGB channel copies, recombined at the wrong offsets. */
.is-severe .fault-separation { overflow:hidden;background:#000;isolation:isolate; }
.is-severe .fault-color { mix-blend-mode:screen; }
.is-severe .fault-color-red { transform:translate(-5px,0);animation:fault-red 400ms steps(1,end) both; }
.is-severe .fault-color-green { transform:translate(0,1px); }
.is-severe .fault-color-blue { transform:translate(7px,-1px);animation:fault-blue 400ms steps(1,end) both; }
.is-severe .fault-color-red .fault-pixels { filter:url(#severe-channel-red); }
.is-severe .fault-color-green .fault-pixels { filter:url(#severe-channel-green); }
.is-severe .fault-color-blue .fault-pixels { filter:url(#severe-channel-blue); }
@keyframes fault-red { 0% { transform:translate(-5px,0); } 23%,100% { transform:translate(-8px,1px); } }
@keyframes fault-blue { 0% { transform:translate(7px,-1px); } 23%,100% { transform:translate(5px,-1px); } }

/* A negative fragment and two stale repaint fragments use hard cuts throughout. */
.is-severe .fault-invert { overflow:hidden; }
.is-severe .fault-invert .fault-pixels { filter:invert(1) contrast(1.2); }
.is-severe .fault-echo { overflow:hidden; }
.is-severe .fault-echo .fault-pixels { filter:saturate(.2) contrast(1.3); }
.is-severe .fault-echo-line { filter:contrast(2); }

/* Ten seconds of stuck monochrome pixels, anchored to the page while scrolling. */
.is-severe .fault-mono { overflow:hidden;background:#070b0a; }
.is-severe .fault-mono .fault-pixels { filter:grayscale(1) invert(1) contrast(1.4) brightness(.72); }

/* Preview-only freeze: representative frames, never a frozen full black screen. */
.is-severe .fault-held * { animation:none!important; }
.is-severe .fault-held .fault-dropout { inset:25% 12% 30%; }
.is-severe .fault-held .fault-tear-a { transform:translateX(-27px); }
.is-severe .fault-held .fault-tear-b { transform:translateX(18px); }
.is-severe .fault-held .fault-block { transform:translate(-7px,18px);opacity:1; }
.is-severe .fault-held .fault-block>.fault-pixels { clip-path:inset(0 0 70%); }
.is-severe .fault-held .fault-rgb { transform:translateY(32px);opacity:1; }
.is-severe .fault-held .fault-hole { opacity:.92; }
@media(prefers-reduced-motion:reduce) {
  .is-severe .display-fault-layer * { animation:none!important; }
  .is-severe .display-fault-layer:not(.fault-held) { display:none; }
}
