
:root {
    --ink: #101a32;
    --muted: #657792;
    --line: #dce5f2;
    --blue: #2859e8;
    --purple: #5a46f5;
    --green: #0aaf67;
    --page: #f4f7fc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--page);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.plan-page {
    width: min(100%, 1800px);
    margin: 0 auto;
    padding: 34px clamp(20px, 3.7vw, 58px) 24px;
    overflow: hidden;
    background: radial-gradient(circle at 74% 4%, rgba(106,126,255,.10), transparent 26%), var(--page);
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 36px;
}

.heading-copy { min-width: 0; }

.heading-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    flex-shrink: 0;
}

.kicker, .section-kicker, .eyebrow, .note-kicker {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
    color: #45669c;
}

.page-heading h1 {
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
    letter-spacing: -1.4px;
    margin: 8px 0 12px;
    font-weight: 800;
}

.page-heading p { font-size: 16px; color: var(--muted); }

.back-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 19px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 8px 20px rgba(70,82,220,.22);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.back-login-button:hover {
    transform: translateY(-2px);
    filter: saturate(1.2) brightness(1.05);
    box-shadow: 0 12px 26px rgba(70,82,220,.32);
}

.back-login-button:focus-visible,
.plan-button:focus-visible,
.login-message-card button:focus-visible {
    outline: 3px solid #9db8ff;
    outline-offset: 3px;
}

.expiry-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    padding: 11px 17px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 5px 18px rgba(37,59,102,.04);
    font-size: 13px;
    font-weight: 700;
    color: #29456d;
}

.status-dot {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #19c76b;
    box-shadow: 0 0 0 5px rgba(25,199,107,.12);
}

.hero-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 42px;
    padding: 44px clamp(26px,3vw,46px);
    border: 1px solid #dce5fa;
    border-radius: 29px;
    background: linear-gradient(112deg, #fff 0%, #f9fbff 57%, #e1e7ff 100%);
    box-shadow: 0 16px 45px rgba(49,72,126,.045);
    margin-bottom: 46px;
}

.hero-copy { max-width: 900px; }
.eyebrow { color: #2859e8; margin-bottom: 16px; }

.hero-copy h2 {
    max-width: 900px;
    font-size: clamp(30px,3.25vw,46px);
    line-height: 1.18;
    letter-spacing: -1.8px;
    font-weight: 800;
    margin-bottom: 18px;
}

.hero-copy p {
    max-width: 900px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.9;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 25px;
    font-size: 13px;
    font-weight: 750;
    color: #263957;
}

.hero-points b {
    font-size: 20px;
    color: var(--green);
    vertical-align: -2px;
    margin-right: 5px;
}

.hero-value {
    flex: 0 0 225px;
    min-height: 210px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 25px;
    background: rgba(255,255,255,.85);
    box-shadow: 0 10px 28px rgba(50,67,130,.05);
}

.value-label { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: #637796; }

.hero-value strong {
    font-size: 54px;
    line-height: 1.2;
    letter-spacing: -2px;
    color: var(--blue);
    margin: 8px 0 2px;
}

.hero-value > span:last-child { font-size: 13px; color: var(--muted); }

.plans-section { margin-bottom: 42px; }

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 26px;
}

.section-kicker { margin-bottom: 7px; }
.section-heading h2 { font-size: 28px; line-height: 1.25; letter-spacing: -.8px; }
.section-note { font-size: 13px; font-weight: 700; color: #5b7190; padding-bottom: 5px; }

.plans-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 24px;
    align-items: stretch;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px 25px 25px;
    background: #fff;
    border: 1px solid #dce5f0;
    border-radius: 25px;
    box-shadow: 0 12px 30px rgba(34,57,97,.045);
    overflow: hidden;
}

.plan-card.featured {
    border: 2px solid #7779ff;
    padding: 27px 24px 24px;
    box-shadow: 0 14px 34px rgba(87,92,246,.12);
}

.popular-ribbon {
    position: absolute;
    right: 0;
    top: 0;
    padding: 9px 15px 8px;
    border-radius: 0 20px 0 16px;
    background: #5143f4;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .4px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
}

.credit-count {
    display: grid;
    place-items: center;
    min-width: 56px;
    height: 56px;
    padding: 0 10px;
    border-radius: 17px;
    background: #eef5ff;
    color: var(--blue);
    font-size: 19px;
    font-weight: 800;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 7px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
}

.neutral { background: #f0f4f8; color: #43546d; }
.starter { background: #e9fff5; color: #07865c; }
.popular { background: #eef0ff; color: #4f46e5; }
.best { background: #fff5e9; color: #d64b09; }
.starter-card .credit-count { background: #eafbf4; color: #07865c; }
.growth-card .credit-count { background: #eef0ff; color: #5143f4; }
.pro-card .credit-count { background: #fff5e9; color: #d64b09; }

.plan-card h3 { font-size: 23px; letter-spacing: -.5px; line-height: 1.25; margin-bottom: 9px; }
.plan-description { font-size: 14px; color: var(--muted); min-height: 23px; }

.price {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-top: 46px;
    margin-bottom: 9px;
}

.price span { font-size: 21px; font-weight: 750; margin-top: 7px; }
.price strong { font-size: 51px; line-height: 1; letter-spacing: -1.5px; font-weight: 800; }

.credit-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-bottom: 21px;
    border-bottom: 1px solid #e8edf5;
    font-size: 13px;
}

.credit-info strong { color: #30415d; font-size: 13px; }
.credit-info span { color: var(--muted); }

.features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 25px 0 27px;
    color: #536783;
    font-size: 13px;
    flex: 1;
}

.features li { position: relative; padding-left: 27px; }

.features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: -1px;
    color: var(--green);
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
}

/* COLORFUL PLAN BUTTONS */
.plan-button {
    position: relative;
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 15px;
    color: #fff;
    font: 800 13px Inter,Arial,sans-serif;
    cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.plan-button:hover { transform: translateY(-3px); filter: brightness(1.08) saturate(1.12); }
.plan-button:active { transform: translateY(0) scale(.99); }

.single-button { background: linear-gradient(135deg,#2878f0,#18b6d9); box-shadow: 0 7px 16px rgba(40,120,240,.18); }
.starter-button { background: linear-gradient(135deg,#08a878,#36c77b); box-shadow: 0 7px 16px rgba(8,168,120,.18); }
.growth-button { background: linear-gradient(135deg,#6548f5,#a34ef3); box-shadow: 0 7px 18px rgba(101,72,245,.24); }
.pro-button { background: linear-gradient(135deg,#f07824,#e43f73); box-shadow: 0 7px 18px rgba(228,63,115,.22); }

.single-button:hover { box-shadow: 0 13px 26px rgba(40,120,240,.34); }
.starter-button:hover { box-shadow: 0 13px 26px rgba(8,168,120,.32); }
.growth-button:hover { box-shadow: 0 13px 28px rgba(101,72,245,.36); }
.pro-button:hover { box-shadow: 0 13px 28px rgba(228,63,115,.34); }

.credits-note {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 30px 34px;
    border: 1px solid #d8e5fa;
    border-radius: 24px;
    background: linear-gradient(110deg,#fff 0%,#f0f5ff 100%);
    margin-bottom: 34px;
}

.note-icon {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #d9fbe7;
    color: #0a9658;
    font-size: 29px;
    font-weight: 700;
}

.note-kicker { margin: 2px 0 8px; }
.credits-note h2 { font-size: 20px; letter-spacing: -.3px; margin-bottom: 10px; }
.credits-note p { color: var(--muted); font-size: 15px; line-height: 1.8; }

.page-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-top: 20px;
    border-top: 1px solid #dce5f0;
    color: #71819b;
    font-size: 12px;
}

/* LOGIN POPUP */
body.modal-open { overflow: hidden; }
.login-message[hidden] { display: none !important; }

.login-message {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(5px);
}

.login-message-card {
    position: relative;
    width: min(100%,420px);
    padding: 32px 26px;
    text-align: center;
    border: 1px solid #e5eaf3;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0,0,0,.22);
    animation: loginMessageIn .2s ease-out;
}

.login-message-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #eef2ff;
    font-size: 27px;
}

.login-message-card h2 { margin: 0 0 10px; color: #14213d; font-size: 23px; line-height: 1.3; }
.login-message-card p { margin: 0 0 24px; color: #64748b; font-size: 15px; line-height: 1.6; }

.login-message-card #login-message-ok {
    width: 100%;
    min-height: 46px;
    padding: 13px 20px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg,#2563eb,#7048ef);
    color: #fff;
    font: 700 15px Inter,Arial,sans-serif;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(58,88,225,.25);
    transition: transform .2s ease, filter .2s ease;
}

.login-message-card #login-message-ok:hover { filter: brightness(1.08); transform: translateY(-1px); }

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    font: 400 28px/1 Arial,sans-serif;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.modal-close:hover { background: #fee2e2; color: #b91c1c; transform: rotate(90deg); }

@keyframes loginMessageIn {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* TABLET */
@media (max-width: 1200px) {
    .plans-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .hero-panel { gap: 24px; }
    .hero-value { flex-basis: 190px; }
    .plan-card { padding: 25px 22px; }
    .plan-card.featured { padding: 24px 21px; }
}

/* MOBILE */
@media (max-width: 700px) {
    .plan-page { padding: 24px 16px; }
    .page-heading { align-items: stretch; flex-direction: column; margin-bottom: 25px; }
    .heading-actions { align-items: flex-start; width: 100%; }
    .expiry-pill { align-self: flex-start; }
    .hero-panel { flex-direction: column; align-items: stretch; padding: 28px 22px; border-radius: 23px; margin-bottom: 34px; }
    .hero-copy h2 { font-size: 31px; letter-spacing: -1.1px; }
    .hero-copy p { font-size: 14px; line-height: 1.75; }
    .hero-points { gap: 11px; flex-direction: column; }
    .hero-value { flex: initial; min-height: 150px; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
    .section-heading h2 { font-size: 24px; }
    .plans-grid { grid-template-columns: 1fr; gap: 18px; }
    .plan-card,.plan-card.featured { padding: 25px 23px; border-radius: 22px; }
    .price { margin-top: 30px; }
    .features { gap: 13px; }
    .credits-note { padding: 22px 18px; gap: 14px; }
    .note-icon { flex-basis: 42px; width: 42px; height: 42px; }
    .credits-note h2 { font-size: 17px; }
    .credits-note p { font-size: 13px; }
    .page-footer { flex-direction: column; text-align: center; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
    .login-message-card,.plan-button,.back-login-button,.modal-close { animation: none; transition: none; }
}
