.plans-page {
    --plans-accent: #A3A3A3;
    --plans-accent-strong: #F4C430;
}

@property --plans-master-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

.plans-page .plans-toast[hidden] {
    display: none !important;
}

.plans-pricing-section {
    padding: calc(var(--home-nav-height) + 52px) 0 86px;
    background: var(--home-bg);
}

.plans-interval-toggle {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-top: 24px;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius);
    background: #111111;
    padding: 4px;
}

.plans-interval-toggle button {
    min-width: 118px;
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--home-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 850;
}

.plans-interval-toggle button.active {
    background: #1A1A1A;
    color: var(--home-brand-strong);
}

.plans-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: min(100% - 48px, var(--home-max));
    margin: 0 auto;
}

.plans-card {
    position: relative;
    isolation: isolate;
    display: flex;
    min-width: 0;
    min-height: 560px;
    flex-direction: column;
    gap: 24px;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius);
    background: #111111;
    padding: 28px;
}

.plans-card.featured,
.plans-card.master {
    border-color: var(--home-line);
    background: #111111;
}

.plans-card.master {
    --plans-master-angle: 0deg;
    overflow: visible;
    border-color: rgba(250, 204, 21, 0.58);
    box-shadow:
        0 34px 100px rgba(0, 0, 0, 0.34),
        0 0 38px rgba(250, 204, 21, 0.13);
    animation: plans-master-neon-sweep 6.4s linear infinite;
}

.plans-card.master::before,
.plans-card.master::after {
    position: absolute;
    border-radius: inherit;
    pointer-events: none;
    content: "";
}

.plans-card.master::before {
    inset: -1px;
    z-index: 2;
    padding: 2px;
    background:
        conic-gradient(
            from var(--plans-master-angle),
            rgba(250, 204, 21, 0.18) 0deg,
            rgba(250, 204, 21, 0.18) 36deg,
            rgba(255, 247, 204, 0.98) 58deg,
            rgba(253, 230, 138, 0.96) 78deg,
            rgba(245, 158, 11, 0.9) 106deg,
            rgba(217, 119, 6, 0.44) 134deg,
            rgba(250, 204, 21, 0.16) 172deg,
            rgba(250, 204, 21, 0.14) 216deg,
            rgba(255, 247, 204, 0.82) 246deg,
            rgba(250, 204, 21, 0.95) 272deg,
            rgba(245, 158, 11, 0.68) 306deg,
            rgba(250, 204, 21, 0.18) 360deg
    );
    filter: saturate(1.12);
    opacity: 0.92;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.plans-card.master::after {
    inset: -5px;
    z-index: -1;
    padding: 6px;
    background:
        conic-gradient(
            from var(--plans-master-angle),
            rgba(250, 204, 21, 0) 0deg,
            rgba(250, 204, 21, 0.18) 38deg,
            rgba(255, 247, 204, 0.7) 62deg,
            rgba(245, 158, 11, 0.45) 102deg,
            rgba(250, 204, 21, 0.06) 156deg,
            rgba(250, 204, 21, 0) 214deg,
            rgba(255, 247, 204, 0.44) 250deg,
            rgba(250, 204, 21, 0.38) 284deg,
            rgba(250, 204, 21, 0) 360deg
        );
    filter: blur(10px);
    opacity: 0.5;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.plans-card.master:hover,
.plans-card.master:focus-within {
    box-shadow:
        0 34px 100px rgba(0, 0, 0, 0.36),
        0 0 56px rgba(250, 204, 21, 0.22);
}

.plans-card.master:hover::before,
.plans-card.master:focus-within::before {
    opacity: 1;
}

.plans-card.master:hover::after,
.plans-card.master:focus-within::after {
    opacity: 0.58;
}

@keyframes plans-master-neon-sweep {
    from {
        --plans-master-angle: 0deg;
    }

    to {
        --plans-master-angle: 360deg;
    }
}

.plans-card-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 116px;
    height: 116px;
    margin-bottom: -2px;
}

.plans-card-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.34));
}

.plans-ribbon,
.plans-card-head > span {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 30px;
    border: 1px solid #2A2A2A;
    border-radius: var(--home-radius);
    background: #111111;
    color: var(--home-brand-strong);
    padding: 0 10px;
    font-family: var(--font-mono, "JetBrains Mono", Consolas, monospace);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.plans-ribbon {
    position: absolute;
    top: 18px;
    right: 18px;
    color: var(--plans-accent);
}

.plans-ribbon.master {
    color: var(--plans-accent-strong);
}

.plans-card-head {
    display: grid;
    gap: 14px;
}

.plans-card-head strong {
    color: var(--home-text);
    font-size: clamp(2.35rem, 4vw, 3.35rem);
    line-height: 1;
}

.plans-card-head p {
    min-height: 78px;
    margin: 0;
    color: var(--home-muted);
    font-size: 0.96rem;
    line-height: 1.62;
}

.plans-feature-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.plans-feature-list li {
    position: relative;
    padding-left: 22px;
    color: var(--home-text);
    font-size: 0.95rem;
    line-height: 1.45;
}

.plans-feature-list li::before {
    position: absolute;
    left: 0;
    color: var(--plans-accent);
    content: "\2713";
}

.plans-card.master .plans-feature-list li::before {
    color: var(--plans-accent-strong);
}

.plans-card .home-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 100%;
    margin-top: auto;
    transform: translateZ(0);
    transition:
        background 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        color 180ms ease,
        opacity 180ms ease,
        transform 180ms ease;
}

.plans-card .home-button:disabled {
    opacity: 0.62;
    transform: none;
}

.plans-card .home-button.plans-button-committing {
    border-color: rgba(255, 209, 91, 0.62) !important;
    background-image:
        linear-gradient(90deg, rgba(255, 209, 91, 0.16), rgba(255, 209, 91, 0.28)),
        linear-gradient(180deg, rgba(255, 209, 91, 0.18), rgba(240, 191, 58, 0.075)),
        linear-gradient(180deg, #241c10, #11110f) !important;
    background-repeat: no-repeat !important;
    background-position: left center, center, center !important;
    background-size: 0% 100%, 100% 100%, 100% 100%;
    color: var(--home-text) !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 244, 203, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.42),
        0 16px 34px rgba(0, 0, 0, 0.28);
    animation: plans-button-gold-fill 820ms cubic-bezier(0.2, 0.82, 0.2, 1) forwards;
}

.plans-card .home-button.plans-button-committing::after {
    position: absolute;
    inset: -45% -35%;
    z-index: 0;
    background:
        linear-gradient(
            105deg,
            transparent 0%,
            rgba(255, 255, 255, 0) 36%,
            rgba(255, 244, 203, 0.24) 49%,
            rgba(255, 209, 91, 0.16) 56%,
            rgba(255, 255, 255, 0) 68%,
            transparent 100%
    );
    content: "";
    opacity: 0;
    pointer-events: none;
    transform: translateX(-120%) skewX(-14deg);
    animation: plans-button-commit-shine 820ms cubic-bezier(0.2, 0.82, 0.2, 1) forwards;
}

@keyframes plans-button-gold-fill {
    0% {
        background-size: 0% 100%, 100% 100%, 100% 100%;
        color: var(--home-text);
        transform: translateZ(0) scale(1);
    }

    68% {
        background-size: 100% 100%, 100% 100%, 100% 100%;
        color: var(--home-text);
        transform: translateZ(0) scale(1.006);
    }

    100% {
        background-size: 100% 100%, 100% 100%, 100% 100%;
        color: var(--home-text);
        transform: translateZ(0) scale(1);
    }
}

@keyframes plans-button-commit-shine {
    0% {
        opacity: 0;
        transform: translateX(-120%) skewX(-14deg);
    }

    30% {
        opacity: 0.95;
    }

    100% {
        opacity: 0;
        transform: translateX(120%) skewX(-14deg);
    }
}

.plans-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 80;
}

@media (max-width: 1040px) {
    .plans-card-grid {
        grid-template-columns: 1fr;
    }

    .plans-card {
        min-height: 0;
    }

    .plans-card-head p {
        min-height: 0;
    }
}

@media (max-width: 720px) {
    .plans-pricing-section {
        padding: calc(var(--home-nav-height) + 36px) 0 64px;
    }

    .plans-card-grid {
        width: min(100% - 32px, var(--home-max));
    }

    .plans-interval-toggle {
        width: 100%;
    }

    .plans-interval-toggle button {
        min-width: 0;
    }

    .plans-card {
        padding: 22px;
    }

    .plans-ribbon {
        position: static;
        width: max-content;
    }

    .plans-card-badge {
        width: 96px;
        height: 96px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .plans-card.master {
        animation: none;
        --plans-master-angle: 34deg;
    }

    .plans-card.master::before,
    .plans-card.master::after {
        animation: none;
        will-change: auto;
    }

    .plans-card .home-button.plans-button-committing {
        animation: none;
        background-size: 100% 100%, 100% 100%, 100% 100%;
    }

    .plans-card .home-button.plans-button-committing::after {
        display: none;
    }
}
