.mag-article-gate {
  position: relative;
}

.mag-article-gate:not(.is-unlocked):not(.is-initialized) [data-mag-article-body] > p:nth-of-type(3) ~ * {
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.mag-article-gate-locked {
  position: relative;
  margin-top: 4px;
}

.mag-article-gate-locked-content {
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
  max-height: 240px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 100%);
}

.mag-article-gate.is-unlocking .mag-article-gate-locked-content,
.mag-article-gate.is-unlocked .mag-article-gate-locked-content {
  filter: blur(0);
  max-height: none;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
  transition: filter 0.55s ease, -webkit-mask-image 0.4s ease, mask-image 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .mag-article-gate.is-unlocking .mag-article-gate-locked-content {
    transition: none;
  }

  .mag-article-gate-panel-inner {
    animation: none;
  }
}

.mag-article-gate-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 0 12px 4px;
  pointer-events: auto;
}

.mag-article-gate-panel[hidden] {
  display: none !important;
}

.mag-article-gate.is-unlocked .mag-article-gate-panel {
  display: none !important;
}

.mag-article-gate.is-unlocking .mag-article-gate-panel {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.mag-article-gate-panel-inner {
  width: 100%;
  max-width: 560px;
  background-color: #fff;
  border: 1px solid var(--gray-02);
  padding: 20px 18px 16px;
  box-shadow: 0 16px 48px rgba(20, 22, 24, 0.1);
  transform: rotate(-0.6deg);
  animation: mag-gate-attention 4.5s ease-in-out infinite;
}

@keyframes mag-gate-attention {
  0%,
  88%,
  100% {
    transform: rotate(-0.6deg) translateX(0);
  }

  90% {
    transform: rotate(-0.6deg) translateX(-6px);
  }

  92% {
    transform: rotate(-0.6deg) translateX(6px);
  }

  94% {
    transform: rotate(-0.6deg) translateX(-4px);
  }

  96% {
    transform: rotate(-0.6deg) translateX(4px);
  }
}

.mag-article-gate-lead {
  margin: 0 0 16px;
  text-align: center;
  line-height: 1.6;
}

.mag-article-gate-lead .highlighted-mid {
  background-color: var(--cyen-light);
  color: var(--black);
}

.mag-article-gate-lead .highlighted-mid:hover {
  background-color: var(--cyen-light);
}

.mag-article-gate-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.mag-article-gate-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.mag-article-gate-label {
  color: var(--gray-04);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.mag-article-gate-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--gray-02);
  background-color: var(--gray-highlight);
  color: var(--black);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.mag-article-gate-input::placeholder {
  color: var(--gray-03);
  opacity: 1;
}

.mag-article-gate-input:focus {
  border-color: var(--blue);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(61, 184, 245, 0.18);
}

.mag-article-gate-input.is-invalid {
  border-color: var(--magenta);
  background-color: #fff5f8;
}

.mag-article-gate-error {
  color: var(--magenta);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  min-height: 1.1em;
}

.mag-article-gate-submit {
  width: 100%;
  height: 38px;
  border: none;
  font: inherit;
  font-weight: 600;
}

.mag-article-gate-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mag-article-gate-submit:not(:disabled):hover {
  background-color: var(--black);
}

@media screen and (max-width: 767px) {
  .mag-article-gate-locked-content {
    max-height: 200px;
  }

  .mag-article-gate-fields {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mag-article-gate-panel-inner {
    padding: 16px 14px 14px;
  }
}
