/* The worn vinyl plastic sleeve on the lanyard card.
   The plastic is drawn on the holder around the card, so the card itself renders exactly as it always has
   and stays smooth. The hole is cut through the plastic alone. */
html[data-plastic="d"]{--t:34px;--m:16px;--r:20px;--pl-fill:rgba(255,255,255,.15);--pl-edge:rgba(255,255,255,.38);--pl-sheen:rgba(255,255,255,.04)}

html[data-plastic] .lanyard #hero-badge{position:relative;isolation:isolate;margin-top:var(--t)}
/* after the swing lands, drawn normally instead of on a graphics layer: sharper, like the Faculty card */
html[data-plastic][data-plastic-settled] .lanyard #hero-badge,
html[data-plastic][data-plastic-settled] .lanyard #hero-badge>.badge{will-change:auto;-webkit-mask:none;mask:none}
html[data-plastic] .lanyard #hero-badge::before,html[data-plastic] .lanyard #hero-badge::after{
  content:"";position:absolute;pointer-events:none;
  /* an invisible 2px border keeps the visible edge away from the edge of its layer, so it stays smooth when tilted */
  inset:calc(var(--t)*-1 - 2px) calc(var(--m)*-1 - 2px) calc(var(--m)*-1 - 2px);
  border:2px solid transparent;background-clip:padding-box;
  border-radius:calc(var(--r) + 2px);
  -webkit-mask-origin:padding-box;mask-origin:padding-box;
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 7' preserveAspectRatio='none'%3E%3Crect width='44' height='7' rx='3.5'/%3E%3C/svg%3E"),linear-gradient(#000,#000);
          mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 7' preserveAspectRatio='none'%3E%3Crect width='44' height='7' rx='3.5'/%3E%3C/svg%3E"),linear-gradient(#000,#000);
  -webkit-mask-position:50% 8px,0 0;mask-position:50% 8px,0 0;
  -webkit-mask-size:44px 7px,100% 100%;mask-size:44px 7px,100% 100%;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-composite:xor;mask-composite:exclude}

/* behind the card: the clear plastic and its edge */
html[data-plastic] .lanyard #hero-badge::before{z-index:-1;background:var(--pl-fill);box-shadow:inset 0 0 0 1.5px var(--pl-edge)}
/* over the card: one faint, soft sheen, no streaks */
html[data-plastic] .lanyard #hero-badge::after{z-index:9;background:linear-gradient(135deg,var(--pl-sheen),transparent 45%)}

/* a solid card under the plastic: the same kind of mask as before, without the hole */
html[data-plastic] .lanyard .badge{
  -webkit-mask:linear-gradient(#000,#000);mask:linear-gradient(#000,#000)}
html[data-plastic] .lanyard .badge::after{display:none}


/* plastic is on the lanyard card only; the Faculty and tall Assistant cards have no plastic and no hole */
html[data-plastic-preview] .fac-badge .badge::before,html[data-plastic-preview] .as-tall .badge::before{display:none}
