/* Стили модуля js/pricing.js. До 19.09.2026 скрипт вставлял их тегом <style>;
   с 19.09.2026 CSP сайта без 'unsafe-inline' такие теги не применяет, поэтому стили — здесь.
   Правите стили раздела — правьте этот файл и поднимайте его ?v=N в index.html. */

      /* Пошире контейнер под 4 карточки */
      body[data-page="pricingPage"] .container { max-width: 1240px; }

      .tp-wrap { padding: 4px 2px 28px; }
      .tp-head { text-align: center; margin-bottom: 24px; }
      .tp-title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em;
        background: linear-gradient(90deg, var(--color-primary), var(--color-primary-2));
        -webkit-background-clip: text; background-clip: text; color: transparent; }
      .tp-sub { margin-top: 8px; font-size: 14.5px; opacity: .8; }

      /* Сегментированный переключатель периода */
      .tp-seg-wrap { display: inline-flex; gap: 4px; margin-top: 16px; padding: 5px;
        border-radius: 999px; background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.12);
        -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
      .tp-seg { border: none; background: transparent; color: inherit; cursor: pointer;
        padding: 8px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
        opacity: .7; transition: all .2s var(--ease-standard, ease); }
      .tp-seg:hover { opacity: 1; }
      .tp-seg.is-active { opacity: 1; color: #2a1e05;
        background: linear-gradient(135deg, var(--color-primary), var(--color-primary-2));
        box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), .3); }

      /* Сетка карточек */
      .tp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px,100%), 1fr)); gap: 18px; }

      /* Карточка — сглаженная, органичная */
      .tp-card { position: relative; display: flex; flex-direction: column;
        padding: 24px 22px; border-radius: 26px;
        background: linear-gradient(165deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
        border: 1px solid rgba(255,255,255,0.12);
        -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 18px 42px rgba(0,0,0,0.28);
        transition: transform .28s var(--ease-standard, ease), box-shadow .28s var(--ease-standard, ease), border-color .28s; }
      .tp-card:hover { transform: translateY(-6px);
        border-color: color-mix(in srgb, var(--tp-accent) 55%, transparent);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 26px 60px rgba(0,0,0,0.4); }
      .tp-card--prime { border-color: rgba(255,207,92,0.5);
        background: linear-gradient(165deg, rgba(255,207,92,0.16), rgba(255,255,255,0.02)); }

      .tp-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
      .tp-card__icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
        font-size: 22px; color: var(--tp-accent);
        background: color-mix(in srgb, var(--tp-accent) 16%, transparent);
        border: 1px solid color-mix(in srgb, var(--tp-accent) 32%, transparent);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); }
      .tp-badge { font-size: 11.5px; font-weight: 700; letter-spacing: .3px; padding: 5px 11px; border-radius: 999px;
        color: #6a4a00; background: linear-gradient(135deg, #ffe9a8, #ffcf5c); }

      .tp-card__name { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
      .tp-card__tagline { margin-top: 5px; font-size: 13px; line-height: 1.45; opacity: .72; min-height: 38px; }

      .tp-card__price { display: flex; align-items: baseline; gap: 7px; margin: 16px 0 16px; }
      .tp-price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
      .tp-per { font-size: 13px; opacity: .6; }

      /* Кнопка-пилюля с круглой стрелкой (как в примере) */
      .tp-cta { display: flex; align-items: center; justify-content: space-between; gap: 10px;
        width: 100%; padding: 7px 8px 7px 20px; border: none; cursor: pointer;
        border-radius: 999px; font-size: 15px; font-weight: 700; color: #2a1e05;
        background: linear-gradient(135deg, #ffe9b0, var(--color-primary) 45%, var(--color-primary-2));
        box-shadow: 0 12px 26px rgba(var(--color-primary-rgb), 0.32);
        transition: filter .18s ease, transform .18s ease; }
      .tp-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
      .tp-cta__arrow { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
        font-size: 14px; color: #fff; background: rgba(42,30,5,0.9); transition: transform .18s ease; }
      .tp-cta:hover .tp-cta__arrow { transform: translateX(3px); }
      .tp-cta--prime { color: #3a2600; background: linear-gradient(135deg, #fff0c0, #ffcf5c 55%, #f0a23c); }

      /* Список фич — иконка у каждого пункта */
      .tp-feats { list-style: none; margin: 20px 0 18px; padding: 16px 0 0; display: flex; flex-direction: column; gap: 13px;
        border-top: 1px solid rgba(255,255,255,0.10); }
      .tp-feat { display: flex; align-items: flex-start; gap: 11px; font-size: 13.8px; line-height: 1.4; }
      .tp-feat__ic { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
        font-size: 12px; color: var(--tp-accent); margin-top: 1px;
        background: color-mix(in srgb, var(--tp-accent) 14%, transparent); }
      .tp-feat__tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
      .tp-feat__t { font-weight: 700; font-size: 13.8px; }
      .tp-feat__d { font-size: 12px; line-height: 1.4; opacity: .62; }

      .tp-more { margin-top: auto; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        padding: 11px; border-radius: 999px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: inherit;
        background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.16); transition: all .18s ease; }
      .tp-more:hover { background: rgba(255,255,255,0.11); }
      .tp-more i { opacity: .7; }

      /* ===== Модалка «Подробнее» ===== */
      .tp-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
        padding: 20px; opacity: 0; transition: opacity .2s ease; }
      .tp-modal.is-open { opacity: 1; }
      .tp-modal[hidden] { display: none; }
      .tp-modal__scrim { position: absolute; inset: 0; background: rgba(6,5,16,0.55);
        -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
      .tp-modal__panel { position: relative; z-index: 1; width: min(640px, 100%); max-height: 88vh; overflow-y: auto;
        padding: 26px 26px 24px; border-radius: 28px;
        background: linear-gradient(165deg, rgba(34,28,54,0.96), rgba(22,18,38,0.98));
        border: 1px solid rgba(255,255,255,0.14);
        box-shadow: 0 40px 90px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.12);
        transform: translateY(10px) scale(.98); transition: transform .24s var(--ease-standard, ease); color: #efeafb; }
      .tp-modal.is-open .tp-modal__panel { transform: none; }
      .tp-modal__close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
        display: grid; place-items: center; line-height: 1; margin: 0; padding: 0;
        border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.06); color: #fff; cursor: pointer; font-size: 15px; }
      .tp-modal__close i { display: block; }
      .tp-modal__close:hover { background: rgba(255,255,255,0.14); }

      /* Ключевые возможности в модалке — те же описания, что на карточке */
      .tp-d-feats { margin-bottom: 16px; }
      .tp-d-feats__h { font-size: 13px; font-weight: 700; margin-bottom: 10px; opacity: .8; }
      .tp-d-feats__grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
      @media (min-width: 560px) { .tp-d-feats__grid { grid-template-columns: 1fr 1fr; } }
      .tp-d-feat { display: flex; align-items: flex-start; gap: 11px;
        background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10);
        border-radius: 14px; padding: 11px 13px; }
      .tp-d-feat__ic { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
        font-size: 13px; color: var(--tp-accent); margin-top: 1px;
        background: color-mix(in srgb, var(--tp-accent) 16%, transparent);
        border: 1px solid color-mix(in srgb, var(--tp-accent) 30%, transparent); }
      .tp-d-feat__tx { min-width: 0; }
      .tp-d-feat__t { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
      .tp-d-feat__d { font-size: 12px; line-height: 1.4; opacity: .68; margin-top: 3px; }

      .tp-d-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-right: 40px; }
      .tp-d-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 24px;
        color: var(--tp-accent); background: color-mix(in srgb, var(--tp-accent) 18%, transparent);
        border: 1px solid color-mix(in srgb, var(--tp-accent) 34%, transparent); }
      .tp-d-name { font-size: 22px; font-weight: 800; }
      .tp-d-tag { font-size: 13px; opacity: .75; margin-top: 3px; }

      .tp-d-cols { display: grid; grid-template-columns: 1fr; gap: 14px; }
      @media (min-width: 560px) { .tp-d-cols:has(.tp-d-col--free) { grid-template-columns: 1fr 1fr; } }
      .tp-d-col { border-radius: 16px; padding: 14px 15px; }
      .tp-d-col--free { background: rgba(69,224,168,0.08); border: 1px solid rgba(69,224,168,0.24); }
      .tp-d-col--pro { background: rgba(124,92,255,0.10); border: 1px solid rgba(124,92,255,0.3); }
      .tp-d-col__h { font-size: 12.5px; font-weight: 800; letter-spacing: .2px; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
      .tp-d-col--free .tp-d-col__h { color: #7ff0c8; }
      .tp-d-col--pro .tp-d-col__h { color: #cbbcff; }
      .tp-d-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
      .tp-d-li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.45; }
      .tp-d-li i { margin-top: 3px; font-size: 11px; flex: 0 0 auto; }
      .tp-d-li--free i { color: #45e0a8; }
      .tp-d-li--pro i { color: #a89bff; }
      .tp-d-li--prime i { color: #ffcf5c; }

      .tp-d-note { margin-top: 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.5;
        background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10); border-radius: 14px; padding: 12px 14px; opacity: .9; }
      .tp-d-note i { color: var(--color-primary); margin-top: 2px; flex: 0 0 auto; }

      .tp-d-prices { margin-top: 16px; }
      .tp-d-prices__h { font-size: 13px; font-weight: 700; margin-bottom: 8px; opacity: .8; }
      .tp-d-prows { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
      .tp-d-prow { display: flex; flex-direction: column; gap: 2px; background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.10); border-radius: 12px; padding: 9px 12px; }
      .tp-d-prow span { font-size: 11.5px; opacity: .6; }
      .tp-d-prow b { font-size: 15px; }
      .tp-d-cta { margin-top: 18px; }

      @media (max-width: 560px) { .tp-title { font-size: 24px; } .tp-card { padding: 22px 18px; } }

      /* ===== Светлая тема ===== */
      html[data-theme="light"] .tp-seg-wrap { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.10); }
      html[data-theme="light"] .tp-card {
        background: linear-gradient(165deg, rgba(255,255,255,0.9), rgba(255,255,255,0.72));
        border-color: rgba(0,0,0,0.08);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 18px 40px rgba(90,40,140,0.12); color: #20203a; }
      html[data-theme="light"] .tp-card--prime {
        background: linear-gradient(165deg, rgba(255,240,200,0.95), rgba(255,255,255,0.78));
        border-color: rgba(240,164,60,0.5); }
      html[data-theme="light"] .tp-feats { border-top-color: rgba(0,0,0,0.08); }
      html[data-theme="light"] .tp-feat__d { opacity: .72; }
      html[data-theme="light"] .tp-more { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.12); }
      html[data-theme="light"] .tp-more:hover { background: rgba(0,0,0,0.08); }
      html[data-theme="light"] .tp-d-feat { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
      html[data-theme="light"] .tp-d-feat__d { opacity: .72; }

      /* ----- Светлая тема: модалка «Подробнее» ----- */
      html[data-theme="light"] .tp-modal__scrim { background: rgba(20,12,40,0.34); }
      html[data-theme="light"] .tp-modal__panel {
        background: linear-gradient(165deg, rgba(255,255,255,0.99), rgba(247,245,252,0.99));
        border-color: rgba(0,0,0,0.10);
        box-shadow: 0 40px 90px rgba(60,30,90,0.26), inset 0 1px 0 rgba(255,255,255,0.9);
        color: #20203a; }
      html[data-theme="light"] .tp-modal__close {
        background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.12); color: #20203a; }
      html[data-theme="light"] .tp-modal__close:hover { background: rgba(0,0,0,0.10); }
      html[data-theme="light"] .tp-d-col--free { background: rgba(31,158,110,0.10); border-color: rgba(31,158,110,0.28); }
      html[data-theme="light"] .tp-d-col--pro  { background: rgba(124,92,255,0.10); border-color: rgba(124,92,255,0.28); }
      html[data-theme="light"] .tp-d-col--free .tp-d-col__h { color: #16855c; }
      html[data-theme="light"] .tp-d-col--pro  .tp-d-col__h { color: #6a4fd0; }
      html[data-theme="light"] .tp-d-li--free i { color: #1e9e6e; }
      html[data-theme="light"] .tp-d-li--pro  i { color: #6a4fd0; }
      html[data-theme="light"] .tp-d-note { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
      html[data-theme="light"] .tp-d-prow { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }

      /* ===== Правки по фидбеку: заголовок выше, карточки плотнее (меньше прокрутки страницы),
         модалка «Подробнее» шире и выше — всё содержимое умещается без прокрутки ===== */
      /* Шапка компактная: кнопка «Назад» вне потока (не занимает отдельную строку),
         заголовок поднят к верху панели */
      body[data-page="pricingPage"] .page { position: relative; padding: 14px 26px 16px; }
      body[data-page="pricingPage"] .back-button { position: absolute; top: 14px; left: 16px; margin: 0; z-index: 5; padding: 9px 16px; font-size: 14px; }
      .tp-wrap { padding: 0 2px 8px; }
      .tp-title { font-size: 24px; }
      .tp-head { margin-bottom: 8px; }
      .tp-sub { margin-top: 4px; font-size: 13.5px; }
      .tp-seg-wrap { margin-top: 9px; padding: 4px; }
      .tp-seg { padding: 7px 15px; font-size: 13px; }

      /* Карточки — максимально плотно (с описаниями): 4 штуки без прокрутки страницы */
      .tp-grid { gap: 12px; }
      .tp-card { padding: 14px 16px; border-radius: 20px; }
      .tp-card__top { margin-bottom: 10px; }
      .tp-card__icon { width: 42px; height: 42px; font-size: 18px; border-radius: 13px; }
      .tp-card__name { font-size: 18px; }
      .tp-card__tagline { margin-top: 3px; min-height: 22px; font-size: 12.5px; }
      .tp-card__price { font-size: 25px; margin: 6px 0 6px; }
      .tp-cta { padding: 6px 8px 6px 16px; font-size: 14px; }
      .tp-cta__arrow { width: 34px; height: 34px; }
      .tp-feats { margin: 10px 0 8px; padding-top: 10px; gap: 5px; }
      .tp-feat { gap: 9px; font-size: 12.8px; }
      .tp-feat__ic { width: 24px; height: 24px; }
      .tp-feat__t { font-size: 12.8px; }
      .tp-feat__d { font-size: 11.3px; line-height: 1.28; }
      .tp-more { padding: 8px; font-size: 12.8px; }

      /* Футер на странице тарифов — компактнее (боковые зоны и так скрыты вне меню) */
      body[data-page="pricingPage"] .legal-footer { margin-top: 8px; padding-top: 10px; padding-bottom: 12px; }
      body[data-page="pricingPage"] .legal-footer__note { font-size: 11.5px; margin-bottom: 4px; }

      /* На узких экранах кнопку «Назад» возвращаем в поток, чтобы не наезжала на заголовок */
      @media (max-width: 640px) {
        body[data-page="pricingPage"] .back-button { position: static; margin: 0 0 10px; }
      }

      /* Модалка «Подробнее» — шире и выше; блок «Что вы получаете» в 3 колонки на широком экране */
      .tp-modal__panel { width: min(940px, 96vw); max-height: 94vh; padding: 22px 24px 20px; }
      .tp-d-head { margin-bottom: 14px; }
      .tp-d-feats { margin-bottom: 12px; }
      .tp-d-feats__grid { gap: 8px; }
      @media (min-width: 720px) { .tp-d-feats__grid { grid-template-columns: 1fr 1fr 1fr; } }
      .tp-d-feat { padding: 9px 11px; }
      .tp-d-cols { gap: 12px; }
      .tp-d-col { padding: 12px 14px; }
      .tp-d-list { gap: 7px; }
      .tp-d-note { margin-top: 12px; padding: 10px 13px; }
      .tp-d-prices { margin-top: 12px; }
      .tp-d-prices__h { margin-bottom: 6px; }
      .tp-d-cta { margin-top: 14px; }
      
