.briefly-keystone .ks-card.ks-plan,
.briefly-showcase .sc-card.sc-pricing-card {
    overflow: visible;
}

@supports selector(:has(*)) {

    [class*="briefly-"] :is(
        [class*="card"], [class*="plan"], [class*="tier"],
        [class*="pricing"], [class*="package"], [class*="panel"]
    ):has(> :is(
        [class*="flag"], [class*="badge"], [class*="ribbon"],
        [class*="pill"], [class*="chip"]
    )):not(:has(img)):not(:has(picture)):not(:has(video)):not(:has(iframe)) {
        overflow: visible;
    }

    [class*="briefly-"] :is(
        [class*="card"], [class*="plan"], [class*="tier"],
        [class*="pricing"], [class*="package"], [class*="panel"]
    ) > :is(
        [class*="flag"], [class*="badge"], [class*="ribbon"],
        [class*="pill"], [class*="chip"]
    ) {
        z-index: 2;
    }
}

@media (max-width: 600px) {
    .briefly-keystone .ks-plan-flag,
    .briefly-showcase .sc-pricing-badge {
        white-space: nowrap;
        max-width: calc(100% - 1.5rem);
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.briefly-page [data-briefly-img][src^="data:image/gif"],
.briefly-page [data-briefly-img][src=""],
[class*="briefly-"] [data-briefly-img][src^="data:image/gif"],
[class*="briefly-"] [data-briefly-img][src=""] {
    background-image:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--ewpk-brand-override,
                      var(--wp--preset--color--primary,
                      var(--global-palette1,
                      var(--ast-global-color-0, #2F6E4E)))) 14%, transparent),
            color-mix(in srgb, var(--ewpk-brand-override,
                      var(--wp--preset--color--primary,
                      var(--global-palette1,
                      var(--ast-global-color-0, #2F6E4E)))) 5%, transparent)
        );
    background-size: cover;
    background-position: center;
}

@supports not (color-mix(in srgb, red 10%, transparent)) {
    .briefly-page [data-briefly-img][src^="data:image/gif"],
    .briefly-page [data-briefly-img][src=""],
    [class*="briefly-"] [data-briefly-img][src^="data:image/gif"],
    [class*="briefly-"] [data-briefly-img][src=""] {
        background-image: linear-gradient(135deg, rgba(15, 23, 42, .07), rgba(15, 23, 42, .03));
    }
}

@media (prefers-reduced-motion: reduce) {
	[class*="briefly-"] [class*="-rise"],
	[class*="briefly-"] [class*="-observe"],
	[class*="briefly-"] [class*="-out"],
	[class*="briefly-"] [class*="-layer"] {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
		animation: none !important;
	}
}

.ewpk-reveal-all [class*="-rise"],
.ewpk-reveal-all [class*="-observe"],
.ewpk-reveal-all [class*="-out"],
.ewpk-reveal-all [class*="-layer"] {
	opacity: 1 !important;
	transform: none !important;
	animation: none !important;
}

.ewpk-grid {
	display: grid;
	grid-template-columns: var(--ewpk-cols, 1fr);
}

@media (max-width: 760px) {
	.ewpk-grid { grid-template-columns: 1fr; }

	.ewpk-grid.ewpk-grid-wide {
		grid-template-columns: var(--ewpk-cols, 1fr);
		font-size: 0.82rem;
		gap: 0.4rem;
	}
}

.ewpk-g {
	display: grid;

	grid-template-columns: repeat( auto-fit, minmax( var( --ewpk-min, 240px ), 1fr ) );
}

@supports selector(:has(*)) {

	.ewpk-g, [class*="briefly-"] [class*="-grid-2"], [class*="briefly-"] [class*="-grid-3"], [class*="briefly-"] [class*="-grid-4"], [class*="briefly-"] [class*="-grid-5"] {
		grid-template-columns: minmax(0, 1fr);
	}

	@media (min-width: 640px) {

		.ewpk-g:has(> :nth-child(1):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(1):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(1):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(1):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(1):last-child) {
			grid-template-columns: repeat(1, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(2):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(2):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(2):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(2):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(2):last-child) {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(3):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(3):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(3):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(3):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(3):last-child) {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(4):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(4):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(4):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(4):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(4):last-child) {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(5):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(5):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(5):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(5):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(5):last-child) {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(6):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(6):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(6):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(6):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(6):last-child) {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(7):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(7):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(7):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(7):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(7):last-child) {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(7):last-child) > :last-child,
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(7):last-child) > :last-child,
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(7):last-child) > :last-child,
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(7):last-child) > :last-child,
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(7):last-child) > :last-child {
			grid-column: 1 / -1;
		}
		.ewpk-g:has(> :nth-child(8):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(8):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(8):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(8):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(8):last-child) {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(9):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(9):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(9):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(9):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(9):last-child) {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(10):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(10):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(10):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(10):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(10):last-child) {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(11):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(11):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(11):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(11):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(11):last-child) {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(12):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(12):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(12):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(12):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(12):last-child) {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
	}

	@media (min-width: 1024px) {

		.ewpk-g:has(> :nth-child(1):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(1):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(1):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(1):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(1):last-child) {
			grid-template-columns: repeat(1, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(2):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(2):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(2):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(2):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(2):last-child) {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(3):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(3):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(3):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(3):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(3):last-child) {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(4):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(4):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(4):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(4):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(4):last-child) {
			grid-template-columns: repeat(4, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(5):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(5):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(5):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(5):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(5):last-child) {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(6):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(6):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(6):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(6):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(6):last-child) {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(7):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(7):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(7):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(7):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(7):last-child) {
			grid-template-columns: repeat(4, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(8):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(8):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(8):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(8):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(8):last-child) {
			grid-template-columns: repeat(4, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(9):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(9):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(9):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(9):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(9):last-child) {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(10):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(10):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(10):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(10):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(10):last-child) {
			grid-template-columns: repeat(4, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(11):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(11):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(11):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(11):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(11):last-child) {
			grid-template-columns: repeat(4, minmax(0, 1fr));
		}
		.ewpk-g:has(> :nth-child(12):last-child),
		[class*="briefly-"] [class*="-grid-2"]:has(> :nth-child(12):last-child),
		[class*="briefly-"] [class*="-grid-3"]:has(> :nth-child(12):last-child),
		[class*="briefly-"] [class*="-grid-4"]:has(> :nth-child(12):last-child),
		[class*="briefly-"] [class*="-grid-5"]:has(> :nth-child(12):last-child) {
			grid-template-columns: repeat(4, minmax(0, 1fr));
		}
	}
}
