:root {
    --page: #070a0f;
    --page-soft: #0b1018;
    --panel: #101722;
    --panel-raised: #141d2a;
    --line: #222d3c;
    --line-bright: #344258;
    --text: #f5f7fa;
    --muted: #9ba8b9;
    --subtle: #6f7d90;
    --brand: #68e0a3;
    --brand-dark: #162e25;
    --brand-strong: #45c989;
    --blue: #7c91ff;
    --danger: #ff7c85;
    --warning: #f4c66a;
    --radius-sm: 9px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -10%, rgba(76, 115, 98, 0.18), transparent 34rem),
        var(--page);
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.checkout-active {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.page-container {
    width: min(1480px, calc(100% - 48px));
    margin-inline: auto;
}

/* Header */
.purchase-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 72px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(7, 10, 15, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.purchase-header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand__mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(104, 224, 163, 0.35);
    border-radius: 10px;
    color: #092217;
    background: var(--brand);
    box-shadow: 0 8px 22px rgba(69, 201, 137, 0.18);
    font-size: 16px;
    font-weight: 800;
}

.purchase-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.purchase-nav a {
    padding: 9px 13px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.purchase-nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.purchase-nav .purchase-nav__manage {
    border: 1px solid var(--line);
    color: #d9e1ea;
}

.purchase-nav .purchase-nav__manage:hover {
    border-color: var(--line-bright);
}

/* Hero */
.purchase-hero {
    position: relative;
    padding: 34px 0 32px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.purchase-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.purchase-hero__layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 48px;
    align-items: center;
}

.purchase-hero__copy {
    max-width: 680px;
}

.eyebrow,
.section-kicker {
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.eyebrow__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 5px rgba(104, 224, 163, 0.1);
}

.purchase-hero h1 {
    max-width: 650px;
    margin: 10px 0 10px;
    font-size: clamp(36px, 3.5vw, 48px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.purchase-hero__copy > p {
    max-width: 610px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.purchase-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-top: 16px;
}

.purchase-highlights span {
    color: #c9d2dd;
    font-size: 12px;
    font-weight: 600;
}

.purchase-highlights span::first-letter {
    color: var(--brand);
}

/* Account */
.account-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(20, 29, 42, 0.96), rgba(12, 18, 27, 0.96));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.account-card__top {
    display: flex;
    gap: 14px;
    align-items: center;
}

.account-card__icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: #5865f2;
}

.account-card__icon svg {
    width: 25px;
    fill: currentColor;
}

.account-card__label {
    display: block;
    margin-bottom: 4px;
    color: var(--subtle);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.account-card p {
    margin: 0;
    color: #dce3eb;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.account-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.button {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button--primary {
    color: #092217;
    background: var(--brand);
}

.button--primary:hover,
.button--plan:hover {
    transform: translateY(-1px);
    background: #7de8b3;
    box-shadow: 0 10px 26px rgba(69, 201, 137, 0.18);
}

.button--quiet {
    border-color: var(--line);
    color: #d4dce6;
    background: rgba(255, 255, 255, 0.035);
}

.button--quiet:hover {
    border-color: var(--line-bright);
    background: rgba(255, 255, 255, 0.07);
}

.button:disabled,
.button.btn--loading {
    opacity: 0.48;
    pointer-events: none;
    transform: none;
}

.status-message {
    min-height: 0;
    color: var(--brand);
    font-size: 12px;
    line-height: 1.5;
}

.purchase-passkey-status:not(:empty) {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.checkout-auth__status--error,
.status-message--error {
    color: var(--danger);
}

/* Plans */
.plans-section {
    padding: 28px 0 54px;
    background: var(--page-soft);
}

.plans-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 18px;
}

.plans-heading h2 {
    margin: 7px 0 0;
    font-size: 27px;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.plans-heading > p {
    max-width: 440px;
    margin: 0 0 3px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.pricing-card {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.pricing-card:hover {
    z-index: 2;
    transform: translateY(-4px);
    border-color: var(--line-bright);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.22);
}

.pricing-card--featured {
    border-color: rgba(104, 224, 163, 0.5);
    background: linear-gradient(160deg, rgba(22, 46, 37, 0.9), var(--panel) 55%);
    box-shadow: 0 0 0 1px rgba(104, 224, 163, 0.08), 0 18px 44px rgba(0, 0, 0, 0.2);
}

.pricing-card--longterm .pricing-card__term,
.pricing-card--lifetime .pricing-card__term {
    color: var(--warning);
    background: rgba(244, 198, 106, 0.08);
}

.pricing-card__flag {
    padding: 8px 12px;
    color: #0c261b;
    background: var(--brand);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-align: center;
    text-transform: uppercase;
}

.pricing-header {
    padding: 17px 18px 15px;
    border-bottom: 1px solid var(--line);
}

.pricing-card__term {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 6px;
    color: var(--brand);
    background: rgba(104, 224, 163, 0.075);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.pricing-plan {
    margin: 11px 0 8px;
    color: #dce3eb;
    font-size: 13px;
    font-weight: 600;
}

.pricing-price {
    color: #fff;
    font-size: clamp(30px, 2.7vw, 39px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.055em;
}

.pricing-price sup {
    position: relative;
    top: -0.65em;
    margin-right: 2px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
}

.pricing-per-month {
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
}

.pricing-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px 18px 18px;
}

.pricing-features {
    flex: 1;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.pricing-features li {
    position: relative;
    margin: 0 0 8px;
    padding-left: 18px;
    color: #b8c3d0;
    font-size: 10.5px;
    line-height: 1.4;
}

.pricing-features li::before {
    content: '✓';
    position: absolute;
    top: 0;
    left: 0;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
}

.pricing-features strong {
    color: #d8e0e8;
    font-weight: 600;
}

.button--plan {
    width: 100%;
    border-color: rgba(104, 224, 163, 0.28);
    color: #bff4d8;
    background: rgba(104, 224, 163, 0.08);
}

.pricing-card .button--plan {
    min-height: 38px;
    padding-inline: 10px;
    font-size: 10.5px;
}

.pricing-card--featured .button--plan {
    color: #092217;
    background: var(--brand);
}

/* Existing licenses returned by the API */
.user-plans {
    margin-bottom: 30px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
}

.user-plans__header,
.user-plan__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.user-plans__header {
    margin-bottom: 17px;
}

.user-plans__header h2 {
    margin: 5px 0 0;
    font-size: 20px;
    letter-spacing: -0.025em;
}

.user-plans__trial,
.user-plan__status {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.user-plans__trial {
    color: var(--warning);
    background: rgba(244, 198, 106, 0.1);
}

.user-plans__notice {
    margin-bottom: 15px;
    padding: 12px 14px;
    border: 1px solid rgba(244, 198, 106, 0.2);
    border-radius: var(--radius-sm);
    color: #dfc58e;
    background: rgba(244, 198, 106, 0.06);
    font-size: 12px;
    line-height: 1.55;
}

.user-plans__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.user-plan {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.025);
}

.user-plan--active {
    border-color: rgba(104, 224, 163, 0.3);
    background: rgba(104, 224, 163, 0.045);
}

.user-plan__title {
    font-size: 14px;
    font-weight: 700;
}

.user-plan__status {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
    text-transform: capitalize;
}

.user-plan--active .user-plan__status {
    color: var(--brand);
    background: rgba(104, 224, 163, 0.09);
}

.user-plan__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.user-plan .success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.user-plan .success-actions .button {
    min-height: 38px;
    flex: 1 1 140px;
}

.user-plan__detail {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.user-plan__detail-label {
    color: var(--subtle);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.user-plan__detail strong {
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.user-plans__empty {
    color: var(--muted);
    font-size: 12px;
}

/* Consent and reassurance */
.checkout-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: stretch;
    margin-top: 28px;
}

.checkout-consent,
.secure-checkout {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(16, 23, 34, 0.7);
}

.checkout-consent {
    padding: 18px;
}

.checkout-consent__label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.65;
}

.checkout-consent__label input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.checkout-consent__check {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    margin-top: 1px;
    border: 1px solid var(--line-bright);
    border-radius: 6px;
    color: transparent;
    background: var(--page);
    font-size: 12px;
    font-weight: 800;
    transition: all 150ms ease;
}

.checkout-consent__label input:checked + .checkout-consent__check {
    border-color: var(--brand);
    color: #092217;
    background: var(--brand);
}

.checkout-consent__label input:focus-visible + .checkout-consent__check {
    outline: 3px solid rgba(104, 224, 163, 0.2);
}

.checkout-consent__label strong {
    display: block;
    margin-bottom: 3px;
    color: #e0e6ed;
    font-size: 12px;
}

.checkout-consent__label a {
    color: #bff4d8;
    font-weight: 600;
}

.checkout-consent .status-message--error {
    margin: 12px 0 0 33px;
}

.secure-checkout {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 18px;
    color: var(--subtle);
    font-size: 11px;
    line-height: 1.55;
}

.secure-checkout svg {
    width: 27px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--brand);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.secure-checkout strong {
    display: block;
    color: #dbe3eb;
    font-size: 12px;
}

/* Footer */
.purchase-footer {
    border-top: 1px solid var(--line);
    background: var(--page);
}

.purchase-footer__inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--subtle);
    font-size: 11px;
}

.purchase-footer__inner div {
    display: flex;
    gap: 20px;
}

.purchase-footer a {
    color: var(--muted);
    text-decoration: none;
}

.purchase-footer a:hover {
    color: var(--text);
}

/* Paddle checkout */
.paddle-checkout-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 5, 8, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.paddle-checkout-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.paddle-checkout-shell {
    width: min(1160px, 100%);
    min-height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line-bright);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.paddle-checkout-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 17px;
    border-bottom: 1px solid var(--line);
}

.paddle-checkout-title {
    margin: 0;
    font-size: 15px;
}

.paddle-checkout-close {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}

.paddle-checkout-close:hover {
    border-color: var(--line-bright);
    color: var(--text);
}

.paddle-inline-frame {
    width: 100%;
    height: 100%;
    min-height: 0;
}

@media (max-width: 1180px) {
    .purchase-hero__layout {
        grid-template-columns: minmax(0, 1fr) 350px;
        gap: 38px;
    }

    .checkout-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .page-container {
        width: min(100% - 32px, 600px);
    }

    .purchase-header {
        height: 64px;
    }

    .purchase-nav > a:first-child {
        display: none;
    }

    .purchase-hero {
        padding: 52px 0;
    }

    .purchase-hero__layout {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .purchase-hero h1 {
        font-size: clamp(39px, 12vw, 52px);
    }

    .account-card {
        width: 100%;
    }

    .plans-section {
        padding: 54px 0 60px;
    }

    .plans-heading {
        display: block;
    }

    .plans-heading > p {
        margin-top: 13px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .page-container {
        width: calc(100% - 24px);
    }

    .brand__name {
        font-size: 14px;
    }

    .purchase-nav a {
        padding: 8px 10px;
        font-size: 11px;
    }

    .purchase-hero h1 {
        font-size: 38px;
    }

    .purchase-hero__copy > p {
        font-size: 15px;
    }

    .purchase-highlights {
        display: grid;
        gap: 9px;
    }

    .account-card__actions {
        grid-template-columns: 1fr;
    }

    .plans-heading h2 {
        font-size: 29px;
    }

    .pricing-header,
    .pricing-content {
        padding-inline: 22px;
    }

    .user-plans {
        padding: 18px;
    }

    .user-plans__header,
    .user-plan__head {
        flex-direction: column;
    }

    .user-plan__meta {
        grid-template-columns: 1fr;
    }

    .checkout-consent,
    .secure-checkout {
        padding: 15px;
    }

    .purchase-footer__inner {
        min-height: 84px;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
    }

    .paddle-checkout-overlay {
        padding: 0;
    }

    .paddle-checkout-shell {
        border: 0;
        border-radius: 0;
    }
}
