/* =========================================================================
   PsyGrow24 — каркас сайта и страницы
   Шапка, подвал, главная, блог, подкасты, термины, о проекте, контакты, вход.
   Токены и компоненты — в theme.css.
   ========================================================================= */

/* ---------------------------------------------------------------- Шапка */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}

.site-header.is-stuck {
    border-bottom-color: var(--line);
    box-shadow: 0 6px 24px rgba(23, 36, 29, .06);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    min-height: var(--header-height);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.logo:hover { color: var(--brand-strong); }

.logo__mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(145deg, var(--brand-bright), var(--brand-strong));
    color: #fff;
    flex-shrink: 0;
}

.logo__mark svg { width: 20px; height: 20px; }
.logo__accent { color: var(--brand); }

.site-nav { margin-left: auto; }

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__link {
    display: inline-block;
    padding: 9px 14px;
    border-radius: var(--radius-pill);
    color: var(--ink-soft);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav__link:hover { background: var(--brand-soft); color: var(--brand-strong); }

.site-nav__link.is-active {
    color: var(--brand-strong);
    font-weight: 600;
    background: var(--brand-soft);
}

.site-header__actions { display: flex; align-items: center; gap: var(--space-3); }

.site-header__account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--ink);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    max-width: 210px;
}

.site-header__account:hover { border-color: var(--brand); color: var(--brand-strong); }

.site-header__avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: var(--text-xs);
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
}

.site-header__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.burger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
}

.burger span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 3px auto;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .2s var(--ease), opacity .2s var(--ease);
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Мобильное меню */

.drawer {
    position: fixed;
    inset: var(--header-height) 0 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    padding: var(--space-5) var(--space-5) var(--space-8);
    background: var(--paper);
    overflow-y: auto;
    animation: psyFade .18s var(--ease);
}

.drawer[hidden] { display: none; }

.drawer__list {
    margin: 0 0 var(--space-5);
    padding: 0;
    list-style: none;
}

.drawer__list a {
    display: block;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    text-decoration: none;
}

.drawer__list a:hover { color: var(--brand-strong); }
.drawer__actions { display: grid; gap: var(--space-3); }

/* --------------------------------------------------------------- Подвал */

.site-footer {
    margin-top: var(--space-8);
    padding-top: var(--space-8);
    background: #16241c;
    color: #cbd6ce;
    font-size: var(--text-sm);
}

.site-footer a { color: #e7efe9; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer__top {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-6);
    padding-bottom: var(--space-7);
}

.site-footer .logo { color: #fff; }
.site-footer .logo:hover { color: #fff; }

.site-footer__about { margin: var(--space-4) 0 0; max-width: 34ch; color: #a9b8ae; }

.site-footer__title {
    margin: 0 0 var(--space-3);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #8fa296;
}

.site-footer__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-5);
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: #8fa296;
    font-size: var(--text-xs);
}

.site-footer__disclaimer {
    padding: var(--space-4) 0 var(--space-6);
    color: #8fa296;
    font-size: var(--text-xs);
    line-height: 1.6;
}

/* ------------------------------------------------------- Шапка страницы */

.page-head {
    padding: var(--space-6) 0 var(--space-5);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--brand-tint), var(--paper));
}

.page-head__title { margin: var(--space-4) 0 0; }
.page-head__lead { margin: var(--space-4) 0 0; max-width: 62ch; font-size: var(--text-lg); color: var(--ink-soft); }

.page-body { padding-block: var(--space-7); }

/* ---------------------------------------------------------- Главная: герой */

.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(var(--space-7), 7vw, var(--space-9));
    background:
        radial-gradient(900px 420px at 85% -10%, var(--brand-soft), transparent 60%),
        radial-gradient(700px 380px at 5% 110%, var(--accent-soft), transparent 55%),
        var(--paper);
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(var(--space-6), 5vw, var(--space-8));
    align-items: center;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    margin-bottom: var(--space-5);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--ink-soft);
}

.hero__eyebrow b { color: var(--brand-strong); font-weight: 700; }

.hero__title { margin-bottom: var(--space-5); }
.hero__title em { font-style: italic; color: var(--brand); }

.hero__text {
    max-width: 52ch;
    margin-bottom: var(--space-6);
    font-size: var(--text-lg);
    color: var(--ink-soft);
}

.hero__actions { gap: var(--space-4); margin-bottom: var(--space-6); }

.hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5) var(--space-7);
    margin: 0;
    padding: var(--space-5) 0 0;
    border-top: 1px solid var(--line);
}

.hero__fact dt {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--brand-strong);
    line-height: 1.1;
}

.hero__fact dd {
    margin: 4px 0 0;
    font-size: var(--text-xs);
    color: var(--ink-muted);
    max-width: 18ch;
}

/* Карточка-визуал справа */

.hero__panel {
    position: relative;
    padding: var(--space-6);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero__panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--space-5);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.hero__panel-title::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--brand-bright);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.hero__quote {
    margin: 0 0 var(--space-5);
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    line-height: 1.45;
    color: var(--ink);
}

.hero__quote-author { font-size: var(--text-xs); color: var(--ink-muted); }

.hero__panel-list { margin: var(--space-5) 0 0; padding: var(--space-5) 0 0; border-top: 1px solid var(--line); display: grid; gap: var(--space-3); }

.hero__panel-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: var(--text-sm);
    color: var(--ink-soft);
}

.hero__panel-item::before {
    content: '';
    flex-shrink: 0;
    width: 18px; height: 18px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f6b4f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ------------------------------------------------- Главная: шаги, разделы */

.steps { counter-reset: step; }

.step { position: relative; padding-top: var(--space-5); }

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 700;
}

.step { padding-left: 0; }
.step__body { padding-top: var(--space-6); }
.step__title { margin-bottom: var(--space-2); font-size: var(--text-lg); }
.step__text { margin: 0; color: var(--ink-soft); font-size: var(--text-sm); }

/* Тарифы */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--space-6) var(--space-5);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
}

.plan--featured {
    border-color: var(--brand);
    box-shadow: 0 18px 40px rgba(47, 107, 79, .14);
}

.plan__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    background: var(--brand);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 700;
    white-space: nowrap;
}

.plan__name { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600; color: var(--ink-muted); margin-bottom: var(--space-3); }

.plan__price {
    font-family: var(--font-serif);
    font-size: var(--text-3xl);
    font-weight: 600;
    line-height: 1;
    color: var(--ink);
}

.plan__note { margin: var(--space-3) 0 var(--space-5); font-size: var(--text-sm); color: var(--ink-soft); }
.plan__cta { margin-top: auto; }

/* Блок с тёмным фоном */

.panel-dark {
    position: relative;
    overflow: hidden;
    padding: clamp(var(--space-6), 5vw, var(--space-8));
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #1d3b2c, #16241c 60%);
    color: #e7efe9;
}

.panel-dark h2, .panel-dark h3 { color: #fff; }
.panel-dark p { color: #bccdc2; }

.panel-dark::after {
    content: '';
    position: absolute;
    right: -80px;
    top: -80px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(185, 140, 70, .35), transparent 65%);
}

.panel-dark__inner { position: relative; z-index: 1; }

/* -------------------------------------------------------- Карточки статей */

.post-card { padding: 0; overflow: hidden; }

.post-card__media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--line);
}

/* обложка статьи и выпуска */
.article__cover {
    width: 100%;
    max-width: 760px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    background: var(--surface-alt);
}

/* миниатюра в списке на главной */
.post-thumb {
    display: block;
    width: 96px;
    height: 72px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
}

.post-row { display: flex; gap: var(--space-4); align-items: flex-start; }

.post-card__body { padding: var(--space-5); display: flex; flex-direction: column; flex: 1; }
.post-card__meta { display: flex; gap: var(--space-3); align-items: center; margin-bottom: var(--space-3); font-size: var(--text-xs); color: var(--ink-muted); }
.post-card__title { margin-bottom: var(--space-3); font-size: var(--text-lg); }
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__text { margin: 0 0 var(--space-4); color: var(--ink-soft); font-size: var(--text-sm); }
.post-card__foot { margin-top: auto; font-size: var(--text-sm); }

/* Подкасты */

.episode {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: var(--space-5);
    align-items: start;
    padding: var(--space-5);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.episode__cover {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--surface-alt);
}

/* обложка выпуска на детальной странице */
.episode-detail {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
    max-width: 900px;
}

.episode-detail__cover {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    background: var(--surface-alt);
}

.episode-detail .prose { max-width: none; font-size: var(--text-base); }

/* миниатюра выпуска в блоке на главной */
.episode--compact { grid-template-columns: 72px 1fr; gap: var(--space-4); }
.episode--compact .episode__cover { width: 72px; height: 72px; border-radius: var(--radius-sm); }

.episode__icon {
    display: grid;
    place-items: center;
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.episode__icon svg { width: 24px; height: 24px; }
.episode__title { margin-bottom: var(--space-2); font-size: var(--text-lg); }
.episode__title a { color: inherit; text-decoration: none; }
.episode__text { margin: 0 0 var(--space-4); color: var(--ink-soft); font-size: var(--text-sm); }

.audio-player { margin-top: var(--space-4); }

.audio-player audio {
    width: 100%;
    height: 44px;
    border-radius: var(--radius-pill);
    background: var(--surface-alt);
}

/* ------------------------------------------------------------ Термины */

.terms-search { position: relative; max-width: 520px; margin-top: var(--space-5); }

.terms-search .input { padding-left: 44px; height: 52px; border-radius: var(--radius-pill); }

.terms-search::before {
    content: '';
    position: absolute;
    left: 16px; top: 50%;
    width: 18px; height: 18px;
    transform: translateY(-50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6e64' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
}

.terms-list { display: grid; gap: var(--space-3); margin: 0; }

.term {
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.term__name { margin: 0 0 4px; font-family: var(--font-serif); font-size: var(--text-lg); font-weight: 600; }
.term__def { margin: 0; color: var(--ink-soft); font-size: var(--text-sm); }
.term[hidden] { display: none; }

.terms-empty { padding: var(--space-6); text-align: center; color: var(--ink-muted); }

/* ------------------------------------------------------- Контакты, о проекте */

.info-card {
    padding: var(--space-5);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.info-card__label {
    margin: 0 0 6px;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.info-card__value { margin: 0; font-size: var(--text-lg); color: var(--ink); }
.info-card__note { margin: 6px 0 0; font-size: var(--text-sm); color: var(--ink-muted); }

.value-card { display: flex; gap: var(--space-4); align-items: flex-start; }

.value-card__icon {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    flex-shrink: 0;
    border-radius: 13px;
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.value-card__icon svg { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ 404 */

.error-page { padding-block: var(--space-9); text-align: center; }
.error-page__code { font-family: var(--font-serif); font-size: clamp(5rem, 18vw, 10rem); line-height: 1; color: var(--brand-soft); margin: 0; }
.error-page__title { margin-top: calc(var(--space-5) * -1); }

/* ---------------------------------------------------------------- Формы входа */

.auth-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-5); align-items: start; }

.auth-card {
    padding: var(--space-6);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.auth-card__title { margin-bottom: var(--space-5); font-size: var(--text-xl); }
.auth-card .btn { width: 100%; }
.auth-links { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-4); font-size: var(--text-sm); }

/* Битриксовые формы авторизации/регистрации приводим к общему виду */
.bx-auth-form input[type="text"],
.bx-auth-form input[type="email"],
.bx-auth-form input[type="password"],
.bx-auth-form input[type="tel"] {
    display: block;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: var(--space-4);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font: inherit;
    font-size: var(--text-sm);
}

.bx-auth-form input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 26px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
}

.bx-auth-form input[type="submit"]:hover { background: var(--brand-strong); }
.bx-auth-form table { width: 100%; }
.bx-auth-form td { padding-bottom: var(--space-2); }

/* ------------------------------------------------------------ Адаптив */

@media (max-width: 1024px) {
    /* одна колонка: сначала заголовок и кнопки, карточка — под ними */
    .hero__inner { grid-template-columns: 1fr; }
    .hero__facts { order: 1; }
}

@media (max-width: 900px) {
    :root { --header-height: 64px; }
    /* на узких экранах кнопки входа и регистрации живут в выдвижном меню */
    .site-nav,
    .site-header__actions > .btn,
    .site-header__account .site-header__name { display: none; }
    .burger { display: block; }
    .site-header__actions { margin-left: auto; }
    .site-header__account { padding: 5px; }
}

@media (max-width: 640px) {
    .container { padding-inline: var(--space-4); }
    .site-footer__top { grid-template-columns: 1fr; gap: var(--space-5); }
    .hero__facts { gap: var(--space-4) var(--space-5); }
    .episode { grid-template-columns: 96px 1fr; gap: var(--space-4); }
    .episode__cover { width: 96px; height: 96px; }
    .episode__icon { width: 44px; height: 44px; }
    .episode-detail { grid-template-columns: 1fr; gap: var(--space-5); }
    .episode-detail__cover { width: 200px; height: 200px; }
}

/* ----------------------------------------------------------- Окно опроса */

.survey { max-width: 560px; }
.survey__step { margin: 0 0 8px; font-size: var(--text-xs); font-weight: 600; color: var(--ink-muted); }

.survey__progress {
    height: 4px;
    margin-bottom: var(--space-5);
    border-radius: 2px;
    background: var(--surface-alt);
    overflow: hidden;
}

.survey__progress span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    background: var(--brand);
    transition: width .25s var(--ease);
}

.survey__title { margin-bottom: var(--space-5); font-size: var(--text-xl); }
.survey__question { margin: 0 0 var(--space-4); font-size: var(--text-lg); color: var(--ink); }
.survey__loading, .survey__done { color: var(--ink-soft); }

.survey__message {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius);
    background: var(--brand-tint);
    color: var(--ink-soft);
}

.survey__options { display: grid; gap: var(--space-2); }

.survey__option {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: border-color .15s var(--ease), background .15s var(--ease);
}

.survey__option:hover { border-color: var(--brand-bright); }
.survey__option:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.survey__option input { margin: 3px 0 0; flex-shrink: 0; }

.survey__error { margin: var(--space-4) 0 0; }

.survey__actions {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    margin-top: var(--space-6);
}

.survey__actions .btn { min-width: 120px; }

/* --------------------------------------------------------- Личный кабинет */

.cabinet-nav { margin-bottom: var(--space-6); border-bottom: 1px solid var(--line); }

.cabinet-nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cabinet-nav__link {
    display: inline-block;
    padding: 10px 16px;
    border-bottom: 2px solid transparent;
    color: var(--ink-soft);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.cabinet-nav__link:hover { color: var(--brand-strong); }

.cabinet-nav__link.is-active {
    border-bottom-color: var(--brand);
    color: var(--brand-strong);
    font-weight: 600;
}

/* Форма профиля Битрикса */

.profile-form table { width: 100%; max-width: 620px; border-collapse: collapse; }
.profile-form td { padding: 6px 0; vertical-align: middle; }
.profile-form td:first-child { padding-right: var(--space-4); color: var(--ink-soft); font-size: var(--text-sm); }

.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form input[type="password"],
.profile-form input[type="tel"],
.profile-form select,
.profile-form textarea {
    width: 100%;
    max-width: 380px;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font: inherit;
    font-size: var(--text-sm);
}

.profile-form input[type="submit"],
.profile-form input[type="reset"],
.profile-form button[type="submit"] {
    margin-top: var(--space-4);
    padding: 12px 24px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
}

.profile-form input[type="reset"] { background: var(--surface-alt); color: var(--ink-soft); }
.profile-form input[type="submit"]:hover { background: var(--brand-strong); }
.profile-form .bx-auth-title, .profile-form h3 { font-size: var(--text-lg); }

/* --------------------------------------------------------- Статья, выпуск */

.article { max-width: 760px; }
.article__meta { margin: 0 0 var(--space-5); font-size: var(--text-sm); color: var(--ink-muted); }
.article .prose { max-width: none; }

.article__foot {
    max-width: 760px;
    margin-top: var(--space-8);
    padding-top: var(--space-5);
    border-top: 1px solid var(--line);
}

/* карточки тарифов внутри тёмного блока: цвет текста не наследуем */
.panel-dark .plan,
.panel-dark .plan p { color: var(--ink); }
.panel-dark .plan__name { color: var(--ink-muted); }
.panel-dark .plan__note { color: var(--ink-soft); }

/* Стандартные формы Битрикса (регистрация, смена пароля, профиль) */

.bx-auth-reg, .bx-auth {
    max-width: 620px;
    padding: var(--space-6);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.bx-auth-reg table, .bx-auth table { width: 100%; border-collapse: collapse; }
.bx-auth-reg td, .bx-auth td { padding: 6px 0; }
.bx-auth-reg td:first-child, .bx-auth td:first-child { padding-right: var(--space-4); color: var(--ink-soft); font-size: var(--text-sm); }

.bx-auth-reg input[type="text"],
.bx-auth-reg input[type="email"],
.bx-auth-reg input[type="password"],
.bx-auth-reg input[type="tel"],
.bx-auth input[type="text"],
.bx-auth input[type="email"],
.bx-auth input[type="password"] {
    width: 100%;
    max-width: 360px;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font: inherit;
    font-size: var(--text-sm);
}

.bx-auth-reg input[type="submit"],
.bx-auth input[type="submit"] {
    margin-top: var(--space-4);
    padding: 13px 26px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
}

.bx-auth-reg input[type="submit"]:hover,
.bx-auth input[type="submit"]:hover { background: var(--brand-strong); }

.bx-auth-reg .starrequired, .starrequired { color: var(--danger); }
.errortext { color: var(--danger); }
.notetext { color: var(--brand-strong); }

/* ------------------------------------------------------ Поиск и карта сайта */

.search-form {
    display: flex;
    gap: var(--space-3);
    max-width: 620px;
    margin-bottom: var(--space-6);
}

.search-form .input { height: 48px; border-radius: var(--radius-pill); padding-inline: 20px; }
.search-form .btn { flex-shrink: 0; }

.search-results { max-width: 760px; }
.search-results .search-item { margin-bottom: var(--space-5); }
.search-results b { color: var(--brand-strong); }

.sitemap__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: var(--text-sm); }
.sitemap__list a { text-decoration: none; }
.sitemap__list a:hover { text-decoration: underline; }

/* ------------------------------------------------------- Мои достижения */

.achievement-form {
    max-width: 640px;
    padding: var(--space-5);
    margin-bottom: var(--space-6);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.achievement-form .textarea { min-height: 96px; margin-top: 6px; }

.achievement-form__foot {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.achievements {
    display: grid;
    gap: var(--space-3);
    max-width: 640px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.achievement {
    position: relative;
    padding: var(--space-4) var(--space-5) var(--space-4) calc(var(--space-5) + 18px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

/* галочка слева от записи */
.achievement::before {
    content: '';
    position: absolute;
    left: var(--space-4);
    top: calc(var(--space-4) + 4px);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f6b4f' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.achievement__date {
    margin: 0 0 4px;
    font-size: var(--text-xs);
    color: var(--ink-muted);
}

.achievement__text { font-size: var(--text-sm); line-height: 1.6; color: var(--ink); }
.achievement__text p { margin: 0 0 .6em; }
.achievement__text > *:last-child { margin-bottom: 0; }

@media (max-width: 480px) {
    .achievement-form__foot { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
    .achievement-form__foot .btn { width: 100%; }
}

/* ------------------------------------------- Вопросы для достижений */

.achievement-form__item + .achievement-form__item {
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--line);
}

.achievement-form__item .textarea { min-height: 84px; margin-top: 6px; }
.achievement-form__foot { flex-wrap: wrap; }

.achievement__question {
    margin: 0 0 4px;
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--brand-strong);
}

.question-picker { max-width: 640px; }

.question-list {
    display: grid;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.question-option {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s var(--ease), background .15s var(--ease);
}

.question-option:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.question-option:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.question-option input { margin: 3px 0 0; flex-shrink: 0; }
.question-option__name { display: block; font-weight: 600; }
.question-option__hint { display: block; margin-top: 4px; font-size: var(--text-sm); color: var(--ink-soft); }
