/* ============================================================
   Психологические тесты — премиум-каталог (палитра Ауры)
   Кастомный, без Bootstrap. Manrope наследуется из main.css.
   ============================================================ */

html,
body,
.app-wrap,
.pt-page {
    --pt-bg: #FAF6F1;
    --pt-surface: #ffffff;
    --pt-ink: #2D2D2D;
    --pt-ink-2: #5A5A5A;
    --pt-ink-3: #948c81;
    --pt-primary: #FF9966;
    --pt-primary-d: #E8804D;
    --pt-line: #ECE3D8;
    --pt-radius: 22px;
    --pt-radius-s: 14px;
    --pt-wrap: 1200px;
    --pt-shadow: 0 4px 18px rgba(72, 52, 38, .06);
    --pt-shadow-lg: 0 18px 50px rgba(72, 52, 38, .14);
}

.pt-page {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    color: var(--pt-ink);
    background: var(--pt-bg);
    overflow-x: clip;
}

/* страница перекрывает белый фон из старого инлайна */
html, body, .app-wrap { background: var(--pt-bg) !important; }

.pt-wrap {
    width: 100%;
    max-width: var(--pt-wrap);
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 32px);
}
.pt-page *, .pt-page *::before, .pt-page *::after { box-sizing: border-box; }

/* ─────────────────────── HERO ─────────────────────── */
.pt-hero {
    position: relative;
    padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 44px);
    background:
        radial-gradient(120% 90% at 100% 0%, #FFF1E8 0%, rgba(255, 241, 232, 0) 55%),
        radial-gradient(110% 80% at 0% 0%, #F3ECFF 0%, rgba(243, 236, 255, 0) 50%),
        var(--pt-bg);
    overflow: clip;
}
.pt-hero__glow {
    position: absolute;
    inset: -30% -10% auto -10%;
    height: 480px;
    background:
        radial-gradient(closest-side, rgba(255, 153, 102, .35), transparent 70%) 12% 30%/360px 360px no-repeat,
        radial-gradient(closest-side, rgba(92, 99, 216, .22), transparent 70%) 78% 8%/420px 420px no-repeat,
        radial-gradient(closest-side, rgba(224, 115, 155, .22), transparent 70%) 52% 60%/380px 380px no-repeat;
    filter: blur(18px);
    opacity: .85;
    pointer-events: none;
    z-index: 0;
}
.pt-hero__inner { position: relative; z-index: 1; text-align: center; }

.pt-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    border: 1px solid var(--pt-line);
    box-shadow: var(--pt-shadow);
    font-size: 14px;
    font-weight: 600;
    color: var(--pt-ink-2);
    backdrop-filter: blur(8px);
}
.pt-hero__title {
    margin: 18px auto 0;
    max-width: 14ch;
    font-size: clamp(32px, 6vw, 62px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, #2D2D2D 30%, #B5582E 75%, #FF9966 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.pt-hero__lead {
    margin: 18px auto 0;
    max-width: 56ch;
    font-size: clamp(15px, 2vw, 19px);
    line-height: 1.55;
    color: var(--pt-ink-2);
}

/* поиск */
.pt-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 640px;
    margin: 26px auto 0;
    padding: 6px 6px 6px 20px;
    background: var(--pt-surface);
    border: 1.5px solid var(--pt-line);
    border-radius: 999px;
    box-shadow: var(--pt-shadow-lg);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.pt-search:focus-within {
    border-color: var(--pt-primary);
    box-shadow: 0 18px 50px rgba(232, 128, 77, .22);
}
.pt-search__icon { flex: none; color: var(--pt-primary-d); }
.pt-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: clamp(15px, 2vw, 17px);
    color: var(--pt-ink);
    padding: 14px 0;
}
.pt-search__input::placeholder { color: #a89f93; }
.pt-search__input::-webkit-search-cancel-button { display: none; }
.pt-search__clear {
    flex: none;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #F2EAE0;
    color: var(--pt-ink-2);
    font-size: 15px;
    cursor: pointer;
    transition: background .2s;
}
.pt-search__clear:hover { background: #e7ddd0; }

.pt-hero__quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 18px auto 0;
}
.pt-hero__quick-label { font-size: 14px; color: var(--pt-ink-3); }
.pt-qchip {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--pt-line);
    background: rgba(255, 255, 255, .7);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--pt-ink-2);
    cursor: pointer;
    transition: all .18s;
}
.pt-qchip:hover { border-color: var(--pt-primary); color: var(--pt-primary-d); transform: translateY(-1px); }

.pt-hero__stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(20px, 5vw, 54px);
    margin: 30px auto 0;
}
.pt-stat { display: flex; flex-direction: column; align-items: center; }
.pt-stat__num {
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--pt-primary-d);
}
.pt-stat__lbl { font-size: 13px; color: var(--pt-ink-3); margin-top: 2px; }

/* ─────────────────── STICKY ФИЛЬТРЫ ─────────────────── */
.pt-filters {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(250, 246, 241, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--pt-line);
    margin-top: 8px;
}
.pt-filters__inner {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 13px clamp(16px, 4vw, 32px);
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}
.pt-filters__inner::-webkit-scrollbar { display: none; }
.pt-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 999px;
    border: 1.5px solid var(--pt-line);
    background: var(--pt-surface);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--pt-ink-2);
    white-space: nowrap;
    cursor: pointer;
    scroll-snap-align: start;
    transition: all .18s;
}
.pt-chip:hover { border-color: var(--c, var(--pt-primary)); transform: translateY(-1px); }
.pt-chip__n {
    font-size: 12px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 999px;
    background: #F2EAE0;
    color: var(--pt-ink-3);
}
.pt-chip.is-active {
    color: #fff;
    border-color: var(--c, var(--pt-primary));
    background: var(--c, var(--pt-primary));
    box-shadow: 0 6px 18px rgba(232, 128, 77, .25);
}
.pt-chip.is-active .pt-chip__n { background: rgba(255, 255, 255, .25); color: #fff; }
.pt-chip--star.is-active { box-shadow: 0 6px 18px rgba(232, 128, 77, .3); }

/* ─────────────────── ПРОГРЕСС ─────────────────── */
.pt-progress { margin: 22px 0 4px; }
.pt-progress__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pt-progress__label { font-size: 14px; color: var(--pt-ink-2); }
.pt-progress__label b { color: var(--pt-primary-d); }
.pt-progress__reset {
    border: 0; background: none; font: inherit; font-size: 13px;
    color: var(--pt-ink-3); cursor: pointer; text-decoration: underline;
}
.pt-progress__bar { height: 8px; border-radius: 999px; background: #EFE6DA; margin-top: 8px; overflow: hidden; }
.pt-progress__fill {
    display: block; height: 100%; width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pt-primary), var(--pt-primary-d));
    transition: width .6s cubic-bezier(.2, .7, .2, 1);
}

/* ─────────────────── СЕКЦИИ ─────────────────── */
.pt-section { padding: clamp(28px, 4vw, 44px) 0 4px; scroll-margin-top: 72px; }
.pt-h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(21px, 3vw, 28px);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 20px;
    color: var(--pt-ink);
}
.pt-h2__emoji {
    display: inline-grid;
    place-items: center;
    width: 44px; height: 44px;
    flex: none;
    border-radius: 13px;
    font-size: 22px;
    background: color-mix(in srgb, var(--c, var(--pt-primary)) 16%, white);
}
.pt-h2__count {
    font-size: 14px; font-weight: 700;
    padding: 2px 11px; border-radius: 999px;
    background: color-mix(in srgb, var(--c, var(--pt-primary)) 16%, white);
    color: color-mix(in srgb, var(--c, var(--pt-primary)) 70%, #2D2D2D);
}
.pt-h2__hint { font-size: 14px; font-weight: 600; color: var(--pt-ink-3); }
.pt-h2--center { justify-content: center; text-align: center; }

/* ─────────────────── СЕТКА + КАРТОЧКИ ─────────────────── */
.pt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
}
.pt-popular .pt-h2 { --c: var(--pt-primary); }

.pt-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--pt-surface);
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius);
    overflow: hidden;
    box-shadow: var(--pt-shadow);
    transition: transform .22s cubic-bezier(.2, .7, .2, 1), box-shadow .22s, border-color .22s;
}
.pt-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--pt-shadow-lg);
    border-color: color-mix(in srgb, var(--c) 45%, var(--pt-line));
}
.pt-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: color-mix(in srgb, var(--c) 12%, white);
}
.pt-card__media::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--c);
    z-index: 2;
}
.pt-card__img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.pt-card:hover .pt-card__img { transform: scale(1.05); }
.pt-card__media--ph { display: grid; place-items: center; }
.pt-card__ph-emoji { font-size: 56px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .12)); }

.pt-card__cat {
    position: absolute;
    left: 12px; bottom: 12px;
    z-index: 2;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12.5px; font-weight: 700;
    color: #fff;
    background: color-mix(in srgb, var(--c) 88%, black 4%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.pt-card__method {
    position: absolute;
    right: 12px; top: 16px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px; font-weight: 700;
    letter-spacing: .01em;
    color: var(--pt-ink);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}
.pt-card__done {
    position: absolute;
    right: 12px; bottom: 12px;
    z-index: 2;
    width: 26px; height: 26px;
    display: none;
    place-items: center;
    border-radius: 50%;
    background: #2FA862;
    color: #fff;
    font-size: 14px; font-weight: 800;
    box-shadow: 0 3px 9px rgba(47, 168, 98, .4);
}
.pt-card.is-done .pt-card__done { display: grid; }
.pt-card.is-done .pt-card__media { opacity: .92; }

.pt-card__body { display: flex; flex-direction: column; flex: 1; padding: 16px 17px 17px; }
.pt-card__title {
    margin: 0 0 7px;
    font-size: 16.5px; line-height: 1.3; font-weight: 700;
    letter-spacing: -0.01em;
}
.pt-card__link { color: var(--pt-ink); text-decoration: none; }
.pt-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pt-card:hover .pt-card__link { color: var(--pt-primary-d); }
.pt-card__excerpt {
    margin: 0 0 14px;
    font-size: 13.5px; line-height: 1.5;
    color: var(--pt-ink-2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.pt-card__foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--pt-line);
}
.pt-card__free { font-size: 12px; font-weight: 600; color: var(--pt-ink-3); }
.pt-card__go {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13.5px; font-weight: 700;
    color: var(--c);
}
.pt-card__go svg { transition: transform .2s; }
.pt-card:hover .pt-card__go svg { transform: translateX(3px); }

/* пустой результат */
.pt-empty { display: none; text-align: center; padding: 60px 20px; }
.pt-empty.is-shown { display: block; }
.pt-empty__emoji { font-size: 48px; }
.pt-empty p { font-size: 17px; color: var(--pt-ink-2); margin: 14px 0 18px; }
.pt-empty__btn {
    padding: 12px 24px; border: 0; border-radius: 999px;
    background: var(--pt-primary); color: #fff; font: inherit; font-weight: 700;
    cursor: pointer; transition: background .2s;
}
.pt-empty__btn:hover { background: var(--pt-primary-d); }

/* секция скрыта фильтром / без совпадений */
.pt-section.is-hidden, .pt-card.is-filtered { display: none; }

/* ─────────────────── BENTO: АУРА ─────────────────── */
.pt-aura {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
    margin: clamp(40px, 6vw, 72px) 0 0;
    padding: clamp(28px, 4vw, 52px);
    border-radius: 28px;
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(255, 153, 102, .18), transparent 60%),
        linear-gradient(160deg, #3A2E28 0%, #2B221C 60%, #241C18 100%);
    background-color: #2B221C;
    color: #fff;
    overflow: hidden;
}
.pt-aura__kicker {
    display: inline-block;
    font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--pt-primary);
    margin-bottom: 12px;
}
.pt-aura__title {
    margin: 0 0 14px;
    font-size: clamp(22px, 3.4vw, 33px);
    line-height: 1.15; font-weight: 800; letter-spacing: -0.02em;
}
.pt-aura__desc {
    margin: 0 0 24px;
    font-size: clamp(14.5px, 2vw, 16.5px); line-height: 1.6;
    color: rgba(255, 255, 255, .82);
    max-width: 46ch;
}
.pt-aura__cta, .pt-final__cta {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 15px 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #FFB08A, #FF9966 55%, #E8804D);
    color: #fff !important;
    font-weight: 800; font-size: 16px; text-decoration: none;
    box-shadow: 0 12px 30px rgba(232, 128, 77, .4);
    transition: transform .2s, box-shadow .2s;
}
.pt-aura__cta:hover, .pt-final__cta:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(232, 128, 77, .52); }
.pt-aura__hint, .pt-final__hint {
    margin: 14px 0 0; font-size: 13px;
    color: rgba(255, 255, 255, .6);
}

/* чат-мокап */
.pt-aura__chat {
    display: flex; flex-direction: column; gap: 12px;
    padding: 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(6px);
}
.pt-msg {
    max-width: 84%;
    padding: 12px 16px;
    font-size: 14px; line-height: 1.45;
    border-radius: 16px;
}
.pt-msg--in { align-self: flex-end; background: linear-gradient(135deg, #FFB08A, #FF9966); color: #3a2418; border-bottom-right-radius: 5px; }
.pt-msg--out { align-self: flex-start; background: rgba(255, 255, 255, .12); color: #fff; border-bottom-left-radius: 5px; }
.pt-typing { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .12); }
.pt-typing span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .6); animation: pt-bounce 1.3s infinite; }
.pt-typing span:nth-child(2) { animation-delay: .18s; }
.pt-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes pt-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ─────────────────── SEO-БЛОК ─────────────────── */
.pt-about { margin: clamp(40px, 6vw, 64px) 0 0; }
.pt-about .pt-h2 { --c: var(--pt-primary); }
.pt-about__cols { columns: 2; column-gap: 40px; }
.pt-about__cols p {
    margin: 0 0 16px; break-inside: avoid;
    font-size: 15px; line-height: 1.65; color: var(--pt-ink-2);
}
.pt-about__cols a { color: var(--pt-primary-d); text-decoration: underline; text-underline-offset: 2px; }
.pt-about__cols strong { color: var(--pt-ink); }

/* ─────────────────── FAQ ─────────────────── */
.pt-faq { margin: clamp(44px, 6vw, 72px) 0 0; }
.pt-faq__list { max-width: 820px; margin: 22px auto 0; display: flex; flex-direction: column; gap: 12px; }
.pt-faq__item {
    background: var(--pt-surface);
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius-s);
    box-shadow: var(--pt-shadow);
    overflow: hidden;
}
.pt-faq__q {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 20px;
    font-size: clamp(15px, 2vw, 16.5px); font-weight: 700;
    color: var(--pt-ink); cursor: pointer; list-style: none;
}
.pt-faq__q::-webkit-details-marker { display: none; }
.pt-faq__plus { position: relative; flex: none; width: 18px; height: 18px; }
.pt-faq__plus::before, .pt-faq__plus::after {
    content: ""; position: absolute; inset: 0; margin: auto;
    background: var(--pt-primary-d); border-radius: 2px;
    transition: transform .25s;
}
.pt-faq__plus::before { width: 100%; height: 2.5px; }
.pt-faq__plus::after { width: 2.5px; height: 100%; }
.pt-faq__item[open] .pt-faq__plus::after { transform: rotate(90deg); opacity: 0; }
.pt-faq__a {
    padding: 0 20px 20px;
    font-size: 14.5px; line-height: 1.65; color: var(--pt-ink-2);
}

/* ─────────────────── ФИНАЛ CTA ─────────────────── */
.pt-final {
    text-align: center;
    margin: clamp(44px, 6vw, 72px) 0 clamp(40px, 6vw, 64px);
    padding: clamp(36px, 5vw, 60px) clamp(20px, 4vw, 40px);
    border-radius: 28px;
    background:
        radial-gradient(80% 120% at 50% 0%, #FFF1E8, transparent 70%),
        linear-gradient(180deg, #FFF7F2, #FBEFE6);
    border: 1px solid var(--pt-line);
}
.pt-final__title { margin: 0 0 12px; font-size: clamp(24px, 4vw, 36px); font-weight: 800; letter-spacing: -0.02em; }
.pt-final__sub { margin: 0 auto 26px; max-width: 52ch; font-size: clamp(15px, 2vw, 17px); line-height: 1.55; color: var(--pt-ink-2); }

/* ─────────────────── REVEAL-АНИМАЦИИ ─────────────────── */
.pt-reveal { opacity: 1; transform: none; }
.pt-page.is-js .pt-reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1); }
.pt-page.is-js .pt-reveal.is-visible { opacity: 1; transform: none; }
.pt-grid .pt-card:nth-child(1) { transition-delay: .02s; }
.pt-grid .pt-card:nth-child(2) { transition-delay: .06s; }
.pt-grid .pt-card:nth-child(3) { transition-delay: .10s; }
.pt-grid .pt-card:nth-child(4) { transition-delay: .14s; }
.pt-grid .pt-card:nth-child(5) { transition-delay: .06s; }
.pt-grid .pt-card:nth-child(6) { transition-delay: .10s; }
.pt-grid .pt-card:nth-child(7) { transition-delay: .14s; }
.pt-grid .pt-card:nth-child(8) { transition-delay: .18s; }

@media (prefers-reduced-motion: reduce) {
    .pt-reveal, .pt-page.is-js .pt-reveal { opacity: 1; transform: none; transition: none; }
    .pt-card, .pt-card__img { transition: none; }
}

/* ─────────────────── АДАПТИВ ─────────────────── */
@media (max-width: 860px) {
    .pt-aura { grid-template-columns: 1fr; }
    .pt-aura__chat { order: -1; }
    .pt-about__cols { columns: 1; }
}
@media (max-width: 560px) {
    .pt-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 13px; }
    .pt-card__body { padding: 12px 13px 13px; }
    .pt-card__title { font-size: 14.5px; }
    .pt-card__excerpt { display: none; }
    .pt-card__foot { padding-top: 10px; }
    .pt-card__free { font-size: 11px; }
    .pt-grid--pop { grid-template-columns: 1fr 1fr; }
    .pt-hero__stats { gap: 22px; }
    .pt-h2__emoji { width: 38px; height: 38px; font-size: 19px; }
}
