/* =========================
   DESIGN TOKENS (light theme)
========================= */
:root {
    /* Surfaces */
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-soft: #fbfbfe;

    /* Ink */
    --ink: #1b1e2b;
    --ink-soft: #565c72;
    --ink-faint: #8a90a6;

    /* Lines */
    --line: #ebecf4;
    --line-strong: #dcdeec;

    /* Accent (refined indigo -> violet) */
    --accent: #5b63f0;
    --accent-2: #8b5cf6;
    --accent-soft: rgba(91, 99, 240, 0.10);
    --accent-ring: rgba(91, 99, 240, 0.22);

    /* Recommended highlight */
    --rec: #8b5cf6;
    --rec-ring: rgba(139, 92, 246, 0.20);

    /* Buy CTA (warm amber) */
    --buy-a: #f59e0b;
    --buy-b: #fbbf24;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(24, 28, 50, 0.04), 0 1px 3px rgba(24, 28, 50, 0.05);
    --shadow-md: 0 8px 20px rgba(24, 28, 50, 0.06), 0 2px 6px rgba(24, 28, 50, 0.04);
    --shadow-lg: 0 26px 50px rgba(91, 99, 240, 0.14), 0 8px 22px rgba(24, 28, 50, 0.06);

    /* Radii */
    --radius: 16px;
    --radius-lg: 20px;

    /* Overlays / ambient */
    --bar-bg: rgba(255, 255, 255, 0.92);
    --glow-a: rgba(91, 99, 240, 0.07);
    --glow-b: rgba(139, 92, 246, 0.06);
    --gen-text: #ffffff;
    --buy-text: #3a2606;

    /* Layout */
    --controls-width: 380px;
    --sticky-top: 22px;

    color-scheme: light;
}

/* =========================
   DARK THEME OVERRIDES
========================= */
[data-theme="dark"] {
    /* Surfaces */
    --bg: #0b0e17;
    --surface: #151a28;
    --surface-soft: #1b2130;

    /* Ink */
    --ink: #e9edf7;
    --ink-soft: #aab2c6;
    --ink-faint: #7c849a;

    /* Lines */
    --line: #242c3c;
    --line-strong: #323b50;

    /* Accent (a touch brighter for dark) */
    --accent: #6e76ff;
    --accent-2: #9d7bff;
    --accent-soft: rgba(110, 118, 255, 0.16);
    --accent-ring: rgba(110, 118, 255, 0.30);

    /* Recommended highlight */
    --rec: #9d7bff;
    --rec-ring: rgba(157, 123, 255, 0.30);

    /* Elevation (deeper shadows + visible glow) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30), 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.40), 0 2px 8px rgba(0, 0, 0, 0.30);
    --shadow-lg: 0 26px 54px rgba(110, 118, 255, 0.24), 0 10px 24px rgba(0, 0, 0, 0.45);

    /* Overlays / ambient */
    --bar-bg: rgba(17, 21, 33, 0.90);
    --glow-a: rgba(110, 118, 255, 0.16);
    --glow-b: rgba(157, 123, 255, 0.14);
    --gen-text: #ffffff;
    --buy-text: #3a2606;

    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Soft ambient tint — barely-there color on a clean canvas */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(720px circle at 12% -10%, var(--glow-a), transparent 60%),
        radial-gradient(620px circle at 100% 0%, var(--glow-b), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* =========================
   MAIN APP CONTAINER
========================= */
.app {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: auto;
    padding: 32px 30px 64px;
}

/* =========================
   TOP BAR
========================= */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.user-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--ink-soft);
}

.user-status button {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    cursor: pointer;
    background: var(--surface);
    color: var(--ink);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.user-status button:hover {
    background: var(--surface-soft);
    border-color: var(--line-strong);
}

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 17px;
    line-height: 1;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    background: var(--surface-soft);
    border-color: var(--line-strong);
}

.theme-toggle:active {
    transform: scale(0.94);
}

/* =========================
   HEADER TEXT
========================= */
.header {
    margin-bottom: 24px;
}

.header h1 {
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: var(--ink);
}

.header p {
    margin: 0;
    color: var(--ink-faint);
    font-size: 15px;
}

/* =========================
   WORKSPACE LAYOUT
   left = sticky controls, right = scrollable voices
========================= */
.workspace {
    display: grid;
    grid-template-columns: var(--controls-width) 1fr;
    gap: 28px;
    align-items: start;
}

/* =========================
   CONTROLS PANEL (sticky)
========================= */
.controls {
    position: sticky;
    top: var(--sticky-top);
    align-self: start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    letter-spacing: 0.01em;
}

/* =========================
   TEXTAREA
========================= */
textarea {
    width: 100%;
    height: clamp(240px, 40vh, 360px);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--ink);
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.5;
    outline: none;
    resize: vertical;
    display: block;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea::placeholder {
    color: var(--ink-faint);
}

textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
}

/* =========================
   COUNTER
========================= */
#counter {
    color: var(--ink-faint);
    font-size: 12px;
    text-align: right;
    margin-top: -6px;
}

/* =========================
   FILTERS
========================= */
.filters {
    display: flex;
    gap: 10px;
}

/* =========================
   DROPDOWNS
========================= */
select {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:hover {
    border-color: var(--line-strong);
}

select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
}

select option {
    background: var(--surface);
    color: var(--ink);
}

/* =========================
   ACTION (always-visible buttons)
========================= */
.action {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

/* =========================
   VOICES PANEL
========================= */
.voices-panel {
    min-width: 0;
}

.voices-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 4px;
}

.voices-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}

.voices-hint {
    font-size: 13px;
    color: var(--ink-faint);
}

/* =========================
   VOICE GRID (auto-fits the panel)
========================= */
.voices {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 14px 0 0;
}

/* =========================
   VOICE CARD
========================= */
.voice-card {
    width: 100%;
    min-height: 196px;
    background: var(--surface);
    border-radius: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.voice-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--line-strong);
}

.voice-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-md);
}

.voice-card.recommended {
    border-color: var(--rec);
    box-shadow: 0 0 0 4px var(--rec-ring), var(--shadow-md);
}

/* =========================
   AVATAR
========================= */
@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.voice-card img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
    animation: breathe 4s ease-in-out infinite;
}

/* =========================
   TEXT
========================= */
.voice-name {
    font-weight: 600;
    font-size: 14px;
    margin-top: 8px;
    color: var(--ink);
}

.voice-desc {
    font-size: 11px;
    color: var(--ink-faint);
    margin-top: 3px;
    line-height: 1.4;
}

/* =========================
   WAVE
========================= */
.wave {
    width: 100%;
    height: 32px;
    margin-top: 8px;
    opacity: 0.8;
}

/* =========================
   PLAY BUTTON
========================= */
.play-btn {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.play-btn:hover {
    background: rgba(91, 99, 240, 0.16);
}

/* =========================
   GENERATE BUTTON
========================= */
.generate-btn {
    padding: 15px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 14px;
    border: none;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: var(--gen-text);
    cursor: pointer;
    width: 100%;
    box-shadow: 0 10px 24px rgba(91, 99, 240, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(91, 99, 240, 0.34);
}

/* =========================
   BUY BUTTON
========================= */
.buy-btn {
    padding: 13px;
    width: 100%;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 12px;
    border: none;
    background: linear-gradient(90deg, var(--buy-a), var(--buy-b));
    color: var(--buy-text);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.26);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.32);
}

/* =========================
   FOCUS (accessibility)
========================= */
button:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1040px) {
    :root { --controls-width: 320px; }
    .voices {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

/* Collapse to single column; pin the action bar to the bottom */
@media (max-width: 860px) {
    .app {
        padding: 24px 18px 24px;
    }

    .workspace {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .controls {
        position: static;
    }

    /* Always-visible bottom action bar on small screens */
    .action {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        flex-direction: row;
        gap: 12px;
        margin: 0;
        padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--line);
        background: var(--bar-bg);
        backdrop-filter: blur(12px);
        box-shadow: 0 -8px 24px rgba(24, 28, 50, 0.08);
    }

    .action .generate-btn,
    .action .buy-btn {
        flex: 1;
        width: auto;
        padding: 14px 16px;
        box-shadow: none;
    }

    /* Voices panel is full width now — 4 per row again */
    .voices {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    /* Keep page content clear of the fixed bar */
    body {
        padding-bottom: 92px;
    }
}

@media (max-width: 600px) {
    .voices {
        grid-template-columns: repeat(2, 1fr);
    }
    .header h1 {
        font-size: 26px;
    }
}

/* =========================
   AUTH PAGES (login / signup)
   Split layout: promo panel + form
========================= */
.auth-split {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

/* ---------- PROMO PANEL ---------- */
.auth-promo {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 48px;
    color: #ffffff;
    background: radial-gradient(130% 130% at 0% 0%, #6e76ff 0%, #5b63f0 40%, #7c4dff 100%);
}

/* soft floating light blobs */
.auth-promo::before,
.auth-promo::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}
.auth-promo::before {
    width: 360px;
    height: 360px;
    background: rgba(255, 255, 255, 0.22);
    top: -130px;
    right: -90px;
}
.auth-promo::after {
    width: 300px;
    height: 300px;
    background: rgba(157, 123, 255, 0.45);
    bottom: -110px;
    left: -70px;
}

.promo-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
}

.promo-main {
    max-width: 460px;
}

.promo-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 14px;
}

.promo-headline {
    font-size: 38px;
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-weight: 700;
    margin: 0 0 16px;
}

.promo-sub {
    font-size: 16px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 28px;
}

.promo-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}
.promo-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.92);
}
.promo-features li::before {
    content: "\2713";
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 700;
    margin-top: 1px;
}

/* equalizer signature — evokes a live voice waveform */
.promo-foot {
    display: flex;
    align-items: center;
    gap: 14px;
}
.eq {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 34px;
}
.eq span {
    width: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.9);
    transform-origin: bottom;
    animation: eq 1.1s ease-in-out infinite;
}
.eq span:nth-child(1) { height: 30%;  animation-delay: 0s;    }
.eq span:nth-child(2) { height: 65%;  animation-delay: .12s;  }
.eq span:nth-child(3) { height: 100%; animation-delay: .24s;  }
.eq span:nth-child(4) { height: 50%;  animation-delay: .36s;  }
.eq span:nth-child(5) { height: 82%;  animation-delay: .48s;  }
.eq span:nth-child(6) { height: 40%;  animation-delay: .60s;  }
.eq span:nth-child(7) { height: 70%;  animation-delay: .72s;  }
@keyframes eq {
    0%, 100% { transform: scaleY(0.35); }
    50%      { transform: scaleY(1);    }
}
.promo-foot-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- FORM SIDE ---------- */
.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    background: var(--bg);
    transition: background 0.3s ease;
}
.auth-form {
    width: 100%;
    max-width: 360px;
}

/* brand inside the form — shown only on the smallest screens (promo hidden) */
.auth-brand {
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 20px;
}

.auth-title {
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: var(--ink);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--ink-faint);
    margin: 0 0 24px;
}

.auth-field {
    margin-bottom: 16px;
}
.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.auth-input-wrap {
    position: relative;
}

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--ink);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-input-wrap input {
    padding-right: 64px;
}
.auth-form input::placeholder {
    color: var(--ink-faint);
}
.auth-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
}

.pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--ink-faint);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    padding: 6px 10px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}
.pw-toggle:hover {
    color: var(--ink-soft);
    background: var(--surface);
}

.auth-error {
    font-size: 13px;
    line-height: 1.4;
    color: #e5484d;
    background: rgba(229, 72, 77, 0.10);
    border: 1px solid rgba(229, 72, 77, 0.28);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    display: none;
}
.auth-error.show {
    display: block;
}

.auth-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: var(--gen-text);
    cursor: pointer;
    margin-top: 4px;
    box-shadow: 0 10px 24px rgba(91, 99, 240, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}
.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(91, 99, 240, 0.34);
}
.auth-btn:disabled {
    opacity: 0.65;
    cursor: progress;
}

.auth-link {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--ink-faint);
}
.auth-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.auth-link a:hover {
    text-decoration: underline;
}

/* Theme toggle pinned to the corner on auth pages */
.auth-theme-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 5;
}

/* ---------- AUTH RESPONSIVE ---------- */
@media (max-width: 920px) {
    .auth-split {
        grid-template-columns: 1fr;
    }
    .auth-promo {
        padding: 40px 32px;
        gap: 22px;
        min-height: auto;
    }
    .promo-headline {
        font-size: 28px;
    }
    .promo-sub {
        margin-bottom: 0;
        font-size: 15px;
    }
    .promo-features,
    .promo-foot {
        display: none;
    }
    .auth-form-side {
        padding: 34px 24px 56px;
    }
}

@media (max-width: 560px) {
    .auth-promo {
        display: none;
    }
    .auth-brand {
        display: flex;
    }
    .auth-theme-toggle {
        top: 12px;
        right: 12px;
    }
}


/* =========================
   PRICING PAGE
========================= */
.pricing-page {
    position: relative;
    z-index: 1;
    max-width: 1040px;
    margin: auto;
    padding: 64px 24px 72px;
}

.pricing-head {
    text-align: center;
    margin-bottom: 40px;
}
.pricing-title {
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--ink);
}
.pricing-sub {
    font-size: 15px;
    color: var(--ink-faint);
    margin: 0;
}

.pricing-note {
    max-width: 460px;
    margin: 0 auto 28px;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 12px;
    padding: 12px 16px;
    display: none;
}
.pricing-note.show { display: block; }
.pricing-note.error {
    color: #e5484d;
    background: rgba(229, 72, 77, 0.10);
    border: 1px solid rgba(229, 72, 77, 0.28);
}
.pricing-note.success {
    color: #1f9d57;
    background: rgba(31, 157, 87, 0.12);
    border: 1px solid rgba(31, 157, 87, 0.30);
}
[data-theme="dark"] .pricing-note.success {
    color: #45d488;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    align-items: stretch;
}

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.plan:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--line-strong);
}

.plan.featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-md);
}

.plan-badge {
    position: absolute;
    top: -11px;
    left: 24px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(91, 99, 240, 0.30);
}

.plan-name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ink-soft);
    margin: 0 0 10px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}
.plan-price .num {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1;
}
.plan-price .unit {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-faint);
}

.plan-desc {
    font-size: 13px;
    color: var(--ink-faint);
    margin: 0 0 18px;
}

.plan-features {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    display: grid;
    gap: 11px;
}
.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--ink-soft);
}
.plan-features li::before {
    content: "\2713";
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
}

.plan-btn {
    margin-top: auto;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s ease, opacity 0.2s ease;
}
/* secondary (non-featured) */
.plan-btn {
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
}
.plan-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}
/* primary (featured) */
.plan.featured .plan-btn {
    border: none;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: var(--gen-text);
    box-shadow: 0 10px 24px rgba(91, 99, 240, 0.28);
}
.plan.featured .plan-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(91, 99, 240, 0.34);
    color: var(--gen-text);
}
.plan-btn:disabled {
    opacity: 0.65;
    cursor: progress;
}

.pricing-back {
    display: inline-block;
    margin: 36px auto 0;
    font-size: 14px;
    color: var(--ink-faint);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s ease;
}
.pricing-back:hover {
    color: var(--ink);
}

/* ---------- PRICING RESPONSIVE ---------- */
@media (max-width: 860px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .plan.featured {
        order: -1;
    }
}
@media (max-width: 580px) {
    .pricing-page {
        padding: 52px 18px 64px;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
    }
    .pricing-title {
        font-size: 27px;
    }
}

/* =========================
   REDUCED MOTION
========================= */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}