:root {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --panel-2: #f1f3f9;
    --border: #e2e6ef;
    --text: #16202c;
    --muted: #6b7382;
    --accent: #1f4ed8;
    --accent-2: #8e7bff;
    --ok: #4ec07b;
    --err: #d83838;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --shadow-strong: 0 8px 32px rgba(31, 78, 216, 0.20);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0d12;
        --panel: #131722;
        --panel-2: #1a1f2e;
        --border: #232a3b;
        --text: #e7ecf3;
        --muted: #8c95a8;
        --accent: #6aa9ff;
        --accent-2: #8e7bff;
        --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
        --shadow-strong: 0 8px 32px rgba(106, 169, 255, 0.20);
    }
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.pricing-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
}
.pricing-back, .pricing-account {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.pricing-back:hover, .pricing-account:hover { color: var(--accent); }

.pricing {
    max-width: 1080px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}

.pricing-hero { text-align: center; margin-bottom: 40px; }
.pricing-hero__title {
    margin: 0 0 14px;
    font-size: 36px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.pricing-hero__lede {
    margin: 0 auto;
    max-width: 600px;
    color: var(--muted);
    font-size: 16px;
}

.pricing-flash {
    max-width: 720px;
    margin: 0 auto 28px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
}
.pricing-flash--ok  { background: rgba(78, 192, 123, 0.12); color: var(--ok); border: 1px solid rgba(78, 192, 123, 0.40); }
.pricing-flash--err { background: rgba(216, 56, 56, 0.10); color: var(--err); border: 1px solid rgba(216, 56, 56, 0.40); }

.tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 32px;
}
@media (max-width: 880px) {
    .tiers { grid-template-columns: 1fr; }
}

.tier {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}
.tier--premium {
    border-color: var(--accent);
    box-shadow: var(--shadow-strong);
    transform: translateY(-4px);
}
.tier--current {
    border-color: var(--ok);
}
.tier__ribbon {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.tier__head { text-align: center; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.tier__name {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--muted);
    margin-bottom: 8px;
}
.tier__price {
    font-size: 16px;
    color: var(--muted);
}
.tier__price-amount {
    font-size: 38px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.tier__price > span:first-child:not(.tier__price-amount) {
    font-size: 38px;
    font-weight: 700;
    color: var(--text);
}
.tier__price-alt {
    margin: 4px 0 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
}
.tier__lede {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    min-height: 36px;
}

.tier__features {
    list-style: none;
    padding: 18px 0;
    margin: 0;
    flex: 1;
}
.tier__features li {
    padding: 6px 0 6px 24px;
    position: relative;
    font-size: 14px;
}
.tier__features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--ok);
    font-weight: 700;
}
.tier__features li strong { color: var(--text); font-weight: 700; }

.tier__cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-2);
    color: var(--text);
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s, border-color .15s, background .15s;
}
.tier__cta:hover { border-color: var(--accent); }
.tier__cta--primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.tier__cta--primary:hover { filter: brightness(1.08); }
.tier__cta--ghost {
    background: transparent;
}
.tier__cta--current {
    background: rgba(78, 192, 123, 0.12);
    color: var(--ok);
    border-color: rgba(78, 192, 123, 0.40);
    cursor: default;
}
.tier__cta--disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.tier__cta:disabled { opacity: 0.5; cursor: not-allowed; }

.tier__small {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.pricing-footnote {
    max-width: 740px;
    margin: 32px auto 48px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}
.pricing-footnote strong { color: var(--accent); }

.pricing-faq {
    max-width: 740px;
    margin: 0 auto;
}
.pricing-faq h2 {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
}
.pricing-faq details {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 10px;
}
.pricing-faq summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}
.pricing-faq summary::-webkit-details-marker { display: none; }
.pricing-faq summary::before {
    content: "+";
    display: inline-block;
    width: 18px;
    color: var(--accent);
    font-weight: 700;
}
.pricing-faq details[open] summary::before { content: "−"; }
.pricing-faq details p {
    margin: 12px 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}
