﻿:root {
    --bg: #0a0b12;
    --card: #12141f;
    --card2: #0f1119;
    --line: #232637;
    --txt: #eceefb;
    --dim: #8f93ad;
    --acc: #7c5cff;
    --acc2: #a78bfa;
    --ok: #7ee2b0;
    --bad: #ef6a6a;
    --warn: #e8c76a;
}
html { min-height: 100%; scrollbar-gutter: stable; overflow-y: scroll; scroll-behavior: smooth; }
/* якоря не прячутся под липким хедером */
[id] { scroll-margin-top: 84px; }
* { box-sizing: border-box; }
/* картинки не растягиваются по атрибуту height: высоту задаёт CSS (aspect-ratio) */
img { max-width: 100%; height: auto; }
.jp-body {
    background: var(--bg) radial-gradient(900px 520px at 50% -10%, #1a1633 0%, #0d0e18 55%, #0a0b12 100%) no-repeat fixed;
    color: var(--txt);
    font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.5;
}
.jp-container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- шапка ---------- */
.jp-nav { border-bottom: 1px solid var(--line); background: rgba(10, 11, 18, .86); position: sticky; top: 0; z-index: 40; backdrop-filter: blur(10px); }
.jp-nav-inner { max-width: 1120px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 14px; min-height: 60px; }
.jp-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--txt); font-weight: 700; text-decoration: none; font-size: .98rem; white-space: nowrap; }
.jp-brand-text span { color: var(--acc2); }
/* на маленьких экранах название сокращается до JKC */
.jp-brand-short { display: none; }
.jp-logo { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(124, 92, 255, .1); border: 1px solid rgba(124, 92, 255, .3); }
.jp-links { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.jp-links a { color: #a9adc7; text-decoration: none; font-weight: 600; font-size: .85rem; padding: 7px 11px; border-radius: 9px; }
.jp-links a:hover { color: #fff; background: rgba(124, 92, 255, .14); }
.jp-user { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.jp-email { color: #c3c7de; font-size: .8rem; }
.jp-role { color: var(--acc2); font-size: .68rem; border: 1px solid rgba(124, 92, 255, .35); border-radius: 999px; padding: 1px 8px; }
.jp-burger {
    display: none; background: #171a27; color: var(--txt); border: 1px solid var(--line);
    border-radius: 10px; width: 40px; height: 38px; font-size: 1.1rem; cursor: pointer;
}
.jp-menu { position: relative; }
.jp-menu-btn {
    display: inline-flex; align-items: center; gap: 8px; background: #171a27; color: var(--txt);
    border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; cursor: pointer; font-size: .82rem; font-weight: 600;
}
.jp-menu-list {
    display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; z-index: 60;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 20px 40px -18px #000;
}
.jp-menu.open .jp-menu-list { display: block; }
.jp-menu-list a, .jp-menu-list button {
    display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
    color: #c3c7de; text-decoration: none; font-size: .85rem; padding: 8px 10px; border-radius: 8px; font-family: inherit;
}
.jp-menu-list a:hover, .jp-menu-list button:hover { background: rgba(124, 92, 255, .14); color: #fff; }

/* ---------- каркас: сайдбар + контент ---------- */
.jp-shell { width: 100%; max-width: 1120px; margin: 0 auto; padding: 20px 16px 0; display: flex; gap: 22px; align-items: flex-start; flex: 1 0 auto; }
.jp-main { flex: 1 1 auto; width: 100%; min-width: 0; padding: 0 0 48px; }
.jp-main > * { max-width: 100%; }
.jp-sidebar { width: 216px; flex: 0 0 216px; position: sticky; top: 76px; }
.jp-side { display: grid; gap: 2px; background: linear-gradient(180deg, var(--card) 0%, #0e1018 100%); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.jp-side-title { color: #6f7391; font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; margin: 10px 8px 4px; }
.jp-side-title:first-child { margin-top: 2px; }
.jp-side a, .jp-side button {
    display: block; text-align: left; color: #b6bad2; text-decoration: none; font-size: .85rem; font-weight: 600;
    padding: 8px 10px; border-radius: 9px; border: 0; background: none; cursor: pointer; font-family: inherit;
}
.jp-side a:hover, .jp-side button:hover { background: rgba(124, 92, 255, .12); color: #fff; }
.jp-side a.active { background: rgba(124, 92, 255, .18); color: #fff; }
.jp-side-danger { color: #ff9db0 !important; }
.jp-side-danger:hover { background: rgba(239, 106, 106, .12) !important; }
.jp-overlay { display: none; }

/* ---------- контент ---------- */
.jp-card { background: linear-gradient(180deg, var(--card) 0%, #0e1018 100%); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: 0 20px 50px -30px #000; }
.jp-card + .jp-card { margin-top: 14px; }
.jp-h1 { font-size: 1.2rem; margin: 0 0 4px; }
.jp-h2 { font-size: .95rem; margin: 0 0 10px; }
.jp-muted { color: var(--dim); }
.jp-a { color: var(--acc2); text-decoration: none; }
.jp-a:hover { color: #fff; }
.jp-grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.jp-grid2 > * { min-width: 0; }
@media (min-width: 880px) { .jp-grid2 { grid-template-columns: 360px 1fr; align-items: start; } }

.jp-table-wrap { overflow-x: auto; margin-top: 10px; }
table.jp-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.jp-table th, .jp-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.jp-table th { color: var(--dim); font-weight: 600; }
.jp-table a { color: var(--acc2); text-decoration: none; }
.jp-table tr:hover td { background: rgba(124, 92, 255, .05); }
/* таблицы документации: текст переносится и не вылезает за карточку */
.jp-table-docs th, .jp-table-docs td { white-space: normal; vertical-align: top; }
.jp-table-docs td code { word-break: break-word; }
.jp-ok { color: var(--ok); } .jp-bad { color: var(--bad); } .jp-warn { color: var(--warn); }

.jp-btn, .jp-btn-ghost, .jp-btn-danger {
    display: inline-block;
    border-radius: 9px; padding: 7px 13px; font-weight: 600; cursor: pointer; font-size: .82rem;
    transition: background .15s, border-color .15s, color .15s; line-height: 1.2; font-family: inherit;
}
.jp-btn { background: var(--acc); color: #fff; border: 0; }
.jp-btn:hover { background: #6a49f2; }
.jp-btn-ghost { background: #171a27; color: #c3c7de; border: 1px solid var(--line); }
.jp-btn-ghost:hover { background: #1e2233; color: #fff; }
.jp-btn-danger { background: #1f1220; color: #ff9db0; border: 1px solid #46223a; }
.jp-btn-danger:hover { background: #2a1626; }
.jp-btn-mini { padding: 3px 8px; font-size: .72rem; border-radius: 7px; }

.jp-input, .jp-select {
    width: 100%; background: #0d0f18; color: var(--txt); border: 1px solid var(--line); border-radius: 9px;
    padding: 8px 11px; outline: none; font-size: .86rem; font-family: inherit;
}
.jp-input:focus, .jp-select:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(124, 92, 255, .16); }

/* выпадающие списки: своя стрелка, размер как у кнопок, опции в тёмной теме */
.jp-select {
    appearance: none; -webkit-appearance: none;
    padding: 7px 32px 7px 11px; font-size: .82rem; line-height: 1.2; min-height: 33px; cursor: pointer;
    background: #0d0f18 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238f93ad' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 11px;
    transition: background-color .15s, border-color .15s;
}
.jp-select:hover { border-color: rgba(124, 92, 255, .5); }
.jp-select option { background: #12141f; color: var(--txt); }
/* компактный список внутри таблиц */
.jp-select-mini {
    width: auto; min-width: 104px; padding: 4px 26px 4px 8px; font-size: .76rem; min-height: 0;
    background-position: right 7px center; background-size: 9px; border-radius: 7px;
}
/* сортировка в тулбаре — справа от поиска, размер как у кнопок */
.jp-sort { width: auto; min-width: 165px; margin-left: auto; }
@media (max-width: 640px) {
    .jp-sort { margin-left: 0; width: 100%; }
    .jp-search { max-width: none; flex: 1 1 100%; }
    /* на тач-экранах поля и списки чуть выше */
    .jp-select { min-height: 38px; }
    .jp-input { padding: 10px 12px; }
    .jp-btn, .jp-btn-ghost, .jp-btn-danger { padding: 9px 14px; }
}
.jp-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.jp-row > * { min-width: 0; }
.jp-field { margin-bottom: 10px; }
.jp-field label { display: block; color: var(--dim); font-size: .78rem; margin-bottom: 4px; }
.jp-slider { width: 100%; accent-color: var(--acc); }
.jp-msg { margin-top: 10px; padding: 9px 11px; border-radius: 9px; font-size: .85rem; }
.jp-msg-ok { background: #14251f; color: var(--ok); border: 1px solid #1f4a37; }
.jp-msg-err { background: #2a1620; color: #ff9db0; border: 1px solid #4a2233; }
.jp-code { background: #0c0e16; border: 1px solid var(--line); border-radius: 9px; padding: 11px; overflow: auto; max-width: 100%; font-family: Consolas, monospace; font-size: .76rem; color: #d7dcf5; }

.jp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 9px; }
.jp-stat { background: var(--card2); border: 1px solid var(--line); border-radius: 11px; padding: 11px; }
.jp-stat b { display: block; font-size: 1.25rem; }
.jp-stat span { color: var(--dim); font-size: .74rem; }

.jp-kv { display: grid; grid-template-columns: 170px 1fr; gap: 5px 12px; font-size: .85rem; }
.jp-kv dt { color: var(--dim); } .jp-kv dd { margin: 0; word-break: break-word; }
@media (max-width: 640px) { .jp-kv { grid-template-columns: 1fr; gap: 2px; } .jp-kv dd { margin-bottom: 8px; } }

.jp-badge { display: inline-block; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.jp-badge-ok { background: #14251f; color: var(--ok); border: 1px solid #1f4a37; }
.jp-badge-bad { background: #2a1620; color: #ff9db0; border: 1px solid #4a2233; }
.jp-badge-warn { background: #2a2416; color: var(--warn); border: 1px solid #4a3f22; }

.jp-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.jp-search { flex: 1; min-width: 170px; max-width: 320px; }
.jp-pager { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.jp-pager a, .jp-pager span {
    display: inline-block; min-width: 28px; text-align: center; padding: 4px 8px; border-radius: 8px;
    border: 1px solid var(--line); color: #b6bad2; text-decoration: none; font-size: .78rem; background: #151827;
}
.jp-pager a:hover { background: #1e2233; color: #fff; }
.jp-pager .cur { background: var(--acc); border-color: var(--acc); color: #fff; font-weight: 700; }
.jp-pager .off { opacity: .4; }

/* живая капча в панелях */
.jp-preview-wrap { position: relative; line-height: 0; width: min(256px, 100%); max-width: 100%; }
.jp-preview { border-radius: 12px; border: 1px solid var(--line); background: #0b0f18; display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; max-width: 100%; }
.jp-preview-side { max-width: 200px; }
.jp-preview-side p { font-size: .76rem; margin: 8px 0 0; }
.jp-preview-solved {
    position: absolute; inset: 0; background: #0a0b12; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    clip-path: inset(0 0 100% 0); transition: clip-path .5s ease; pointer-events: none;
}
.jp-preview-solved.show { clip-path: inset(0 0 0 0); }
.jp-preview-solved p { margin: 8px 0 0; color: #d9e2ff; font-weight: 600; font-size: .85rem; padding: 0 10px; }
.jp-ps-circle {
    width: 64px; height: 64px; margin: 0 auto; border-radius: 50%;
    background: rgba(124, 92, 255, .16); border: 2px solid var(--acc2);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 22px rgba(124, 92, 255, .3);
}

/* модальные окна */
.jp-modal {
    display: none; position: fixed; inset: 0; z-index: 70;
    background: rgba(6, 6, 12, .74); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 16px;
}
.jp-modal.show { display: flex; }
.jp-modal-box {
    background: linear-gradient(180deg, var(--card) 0%, #0e1018 100%);
    border: 1px solid var(--line); border-radius: 16px; padding: 18px;
    max-width: 340px; width: 100%; text-align: center;
    box-shadow: 0 30px 60px -20px #000;
}
.jp-modal-box .jp-preview-wrap { width: min(280px, 72vw); }
.jp-modal-box .jp-preview { width: 100%; height: auto; aspect-ratio: 1/1; }

/* лендинг */
.jp-hero { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; padding: 24px 0 8px; }
@media (min-width: 900px) { .jp-hero { grid-template-columns: 1.05fr .95fr; } }
.jp-hero h1 { font-size: 1.8rem; line-height: 1.22; margin: 0 0 10px; }
.jp-hero p { color: var(--dim); font-size: .95rem; margin: 0 0 16px; max-width: 540px; }

/* объект капчи в блоке героя: без фона, парит вверх-вниз, мягкое свечение по контуру */
.jp-hero-obj {
    width: 100%; height: auto; display: block; max-width: 350px; margin: 0 auto;
    animation: jpFloat 7s ease-in-out infinite;
    filter: drop-shadow(-40px 40px 80px rgba(124, 92, 255, .45));
}
@media (prefers-reduced-motion: reduce) { .jp-hero-obj { animation: none; } }
.jp-banner { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); display: block; margin-top: 14px; background: var(--card2); }
.jp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.jp-feature { background: var(--card2); border: 1px solid var(--line); border-radius: 13px; padding: 14px; }
.jp-feature h3 { margin: 0 0 6px; font-size: .9rem; }
.jp-feature p { margin: 0; color: var(--dim); font-size: .8rem; }
.jp-section { margin-top: 28px; }
.jp-section > h2 { font-size: 1.05rem; margin: 0 0 12px; }
/* у блока живой капчи увеличенный отступ от заголовка */
#live > h2 { margin-bottom: 24px; }
.jp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.jp-step { background: var(--card2); border: 1px solid var(--line); border-radius: 13px; padding: 14px; }
.jp-step b { color: var(--acc2); font-size: .78rem; }
.jp-step h3 { margin: 4px 0 6px; font-size: .9rem; }
.jp-step p { margin: 0; color: var(--dim); font-size: .8rem; }
.jp-quicklinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.jp-quicklink { display: block; background: var(--card2); border: 1px solid var(--line); border-radius: 13px; padding: 14px; text-decoration: none; transition: border-color .15s, transform .15s; }
.jp-quicklink:hover { border-color: rgba(124, 92, 255, .5); transform: translateY(-1px); }
.jp-quicklink b { display: block; color: var(--txt); font-size: .9rem; margin-bottom: 4px; }
.jp-quicklink span { color: var(--dim); font-size: .8rem; }

/* футер */
.jp-footer { border-top: 1px solid var(--line); background: rgba(9, 10, 16, .9); margin-top: 36px; padding: 28px 0 16px; }
.jp-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 22px; }
.jp-footer h4 { margin: 0 0 10px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #6f7391; font-weight: 700; }
.jp-footer-grid a:not(.jp-brand) { display: block; color: #a9adc7; text-decoration: none; font-size: .84rem; padding: 3px 0; }
.jp-footer-grid a:not(.jp-brand):hover { color: #fff; }
.jp-footer-desc { color: #6f7391; font-size: .82rem; margin: 10px 0 0; max-width: 320px; }
.jp-footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 14px; color: #6f7391; font-size: .78rem; }
@media (max-width: 860px) { .jp-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .jp-footer-grid { grid-template-columns: 1fr; } }

/* ---------- мобильная версия ---------- */
@media (max-width: 980px) {
    .jp-burger { display: inline-flex; align-items: center; justify-content: center; }
    .jp-links { display: none; }
    .jp-shell { display: block; }
    .jp-sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; width: 262px; z-index: 65; flex: none;
        background: #0d0f18; border-right: 1px solid var(--line); padding: 14px; overflow-y: auto;
        transform: translateX(-102%); transition: transform .22s ease;
    }
    body.jp-menu-open .jp-sidebar { transform: none; }
    body.jp-menu-open .jp-overlay { display: block; position: fixed; inset: 0; background: rgba(4, 4, 10, .6); z-index: 60; }
    .jp-side { border: 0; background: none; padding: 0; }
    .jp-main { padding-top: 0; }
    .jp-email { display: none; }
    .jp-nav-inner { gap: 10px; }
    .jp-brand-text { font-size: .92rem; }
}
@media (max-width: 560px) {
    .jp-hero h1 { font-size: 1.45rem; }
    .jp-user .jp-btn, .jp-user .jp-btn-ghost, .jp-user .jp-menu-btn { padding: 6px 10px; font-size: .78rem; }
    .jp-lang { height: 29px; }
    .jp-lang a { padding: 0 8px; }
    .jp-brand-long { display: none; }
    .jp-brand-short { display: inline; }
    .jp-card { padding: 13px; }
}

/* хронология сессии */
.jp-timeline { display: grid; gap: 12px; }
.jp-tl-item { display: flex; gap: 10px; align-items: flex-start; }
.jp-tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--acc2); margin-top: 5px; flex: 0 0 10px; box-shadow: 0 0 0 3px rgba(124, 92, 255, .15); }
.jp-tl-dot.dim { background: #3a3f57; box-shadow: none; }
.jp-tl-item b { font-size: .85rem; }
.jp-tl-item p { margin: 2px 0 0; font-size: .82rem; }

/* компактные элементы админки */
.jp-badge-btn { cursor: pointer; border-width: 1px; border-style: solid; font-family: inherit; }
.jp-badge-btn:hover { filter: brightness(1.15); }

/* ---------- подсветка кода ---------- */
.tok-c { color: #6f7391; font-style: italic; }
.tok-s { color: #7ee2b0; }
.tok-n { color: #f5c860; }
.tok-k { color: #a78bfa; font-weight: 600; }
.tok-m { color: #7cb7ff; font-weight: 700; }

/* вкладки кода */
.jp-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.jp-tab {
    background: #151827; color: #b6bad2; border: 1px solid var(--line); border-radius: 9px;
    padding: 6px 12px; font-size: .78rem; font-weight: 600; cursor: pointer; font-family: inherit;
}
.jp-tab:hover { color: #fff; }
.jp-tab.active { background: rgba(124, 92, 255, .18); border-color: rgba(124, 92, 255, .5); color: #fff; }

/* ---------- анимации лендинга ---------- */
@keyframes jpRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes jpFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes jpGlow { 0%, 100% { opacity: .45; } 50% { opacity: .85; } }
.jp-hero > * { animation: jpRise .6s ease both; }
.jp-hero > *:nth-child(2) { animation-delay: .1s; }
.jp-section { animation: jpRise .55s ease both; }
.jp-quicklinks > * { animation: jpRise .5s ease both; }
.jp-quicklinks > *:nth-child(2) { animation-delay: .06s; }
.jp-quicklinks > *:nth-child(3) { animation-delay: .12s; }
.jp-quicklinks > *:nth-child(4) { animation-delay: .18s; }
.jp-btn, .jp-btn-ghost, .jp-quicklink { transition: transform .15s ease, background .15s, border-color .15s, box-shadow .15s; }
.jp-btn:hover, .jp-btn-ghost:hover { transform: translateY(-1px); }
.jp-card { transition: border-color .2s ease, box-shadow .2s ease; }

/* факты на главной */
.jp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 20px; }
.jp-fact { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.jp-fact b { display: block; font-size: 1.05rem; color: var(--acc2); }
.jp-fact span { color: var(--dim); font-size: .76rem; }

/* сцена с живой капчей: на мобильных панель компактная и по центру */
.jp-stage { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; }
@media (min-width: 900px) { .jp-stage { grid-template-columns: 360px 1fr; } }
.jp-tilt { perspective: 1000px; position: relative; width: min(340px, 74vw); margin: 0; }
.jp-tilt::before {
    content: ''; position: absolute; inset: -18px; border-radius: 28px; z-index: -1;
    background: radial-gradient(closest-side, rgba(124, 92, 255, .35), transparent 70%);
    animation: jpGlow 5s ease-in-out infinite;
}
.jp-tilt .jvc4-wrap {
    transform: rotateY(-14deg) rotateX(7deg);
    border-radius: 16px;
    box-shadow: 0 34px 80px -34px rgba(124, 92, 255, .75);
    animation: jpFloat 8s ease-in-out infinite;
}
.jp-tilt .jvc4-wrap iframe { border: 1px solid var(--line); border-radius: 16px; background: #0b0f18; }
@media (max-width: 900px) {
    .jp-tilt { width: min(320px, 72vw); margin: 0 auto; }
    .jp-tilt .jvc4-wrap { transform: none; }
}
@media (max-width: 560px) {
    .jp-tilt { width: min(280px, 70vw); }
}
.jp-stage-side p { color: var(--dim); font-size: .9rem; margin: 0 0 12px; }

/* ---------- схема работы ---------- */
.jp-flow { display: grid; margin-top: 14px; }
.jp-flow-step { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.jp-flow-step:last-child { padding-bottom: 0; }
.jp-flow-step::before {
    content: ''; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px;
    background: linear-gradient(180deg, rgba(124, 92, 255, .55), rgba(124, 92, 255, .12));
}
.jp-flow-step:last-child::before { display: none; }
.jp-flow-num {
    width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
    background: rgba(124, 92, 255, .16); border: 1px solid rgba(124, 92, 255, .5);
    color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 1; font-size: .9rem;
}
.jp-flow-body { padding-top: 4px; min-width: 0; }
.jp-flow-body h3 { margin: 0 0 4px; font-size: .92rem; }
.jp-flow-body p { margin: 0; color: var(--dim); font-size: .84rem; }
.jp-flow-body code { color: #d7dcf5; }
.jp-flow-tag {
    display: inline-block; font-size: .68rem; border: 1px solid var(--line); border-radius: 999px;
    padding: 1px 8px; color: #b6bad2; margin-left: 8px; vertical-align: middle; font-weight: 600;
}

/* ---------- FAQ ---------- */
.jp-faq { display: grid; gap: 8px; }
.jp-faq details { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; transition: border-color .15s; }
.jp-faq details:hover { border-color: rgba(124, 92, 255, .35); }
.jp-faq summary { cursor: pointer; font-weight: 600; font-size: .9rem; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.jp-faq summary::-webkit-details-marker { display: none; }
.jp-faq summary::after { content: '+'; color: var(--acc2); font-weight: 700; }
.jp-faq details[open] summary::after { content: '–'; }
.jp-faq p { margin: 10px 0 0; color: var(--dim); font-size: .84rem; }

/* ---------- контакты ---------- */
.jp-contacts { display: flex; gap: 12px; flex-wrap: wrap; }
.jp-contact {
    display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
    background: var(--card2); border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 14px; color: #d7dcf5; font-size: .86rem; font-weight: 600;
}
.jp-contact:hover { border-color: rgba(124, 92, 255, .5); color: #fff; }
.jp-contact svg { width: 18px; height: 18px; flex: 0 0 18px; }
.jp-footer-contacts { display: inline-flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.jp-footer-contacts a {
    display: inline-flex; align-items: center; gap: 7px;
    color: #a9adc7; text-decoration: none; line-height: 1;
}
.jp-footer-contacts a:hover { color: #fff; }
.jp-footer-contacts svg { display: block; flex: 0 0 auto; }

/* защита от наложения текста в финальных блоках */
.jvc4-done { overflow: hidden; }
.jvc4-done p { max-width: calc(100% - 20px); word-break: break-word; }
.jp-preview-solved { overflow: hidden; }
.jp-preview-solved p { max-width: 100%; word-break: break-word; }
.done-inner { max-width: 100%; }
.done-text { word-break: break-word; }

/* заголовки секций в формах настроек */
.jp-form-h {
    font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: #6f7391; margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.jp-form-h:first-of-type { margin-top: 4px; }
/* широкая колонка формы настроек виджета */
@media (min-width: 880px) { .jp-grid2-wide { grid-template-columns: 430px 1fr; } }

/* ---------- чекбоксы в общем стиле приложения ---------- */
input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px; flex: 0 0 18px; margin: 0;
    border: 1px solid var(--line); border-radius: 5px; background: #0d0f18;
    cursor: pointer; display: inline-grid; place-content: center;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
input[type="checkbox"]:hover { border-color: rgba(124, 92, 255, .55); }
input[type="checkbox"]:checked { background: var(--acc); border-color: var(--acc); }
input[type="checkbox"]:checked::after {
    content: ''; width: 10px; height: 10px; background: #fff;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(124, 92, 255, .25); }
.jp-check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: .86rem; color: #d7dcf5; }
.jp-check span { color: var(--dim); font-size: .78rem; }

/* системные виджеты в таблице — другим фоном */
.jp-table tr.jp-row-sys td { background: rgba(124, 92, 255, .07); }
.jp-table tr.jp-row-sys:hover td { background: rgba(124, 92, 255, .13); }

/* вертикальный ритм блоков (детали сессии и т.п.) */
.jp-stack { display: grid; gap: 14px; }
.jp-stack .jp-card + .jp-card { margin-top: 0; }
.jp-stack > * { margin-top: 0; }

/* переключатель языка — по высоте как кнопки рядом */
.jp-lang {
    display: inline-flex; align-items: center; gap: 2px; padding: 2px;
    border: 1px solid var(--line); border-radius: 9px; background: #151827;
    height: 32px; box-sizing: border-box;
}
.jp-lang a {
    display: inline-flex; align-items: center; align-self: stretch;
    padding: 0 10px; border-radius: 7px; font-size: .74rem; font-weight: 700;
    color: #b6bad2; text-decoration: none; line-height: 1;
}
.jp-lang a:hover { color: #fff; background: rgba(124, 92, 255, .16); }
.jp-lang a.on { background: var(--acc); color: #fff; }

/* замаскированный секрет + кнопка «скопировать» */
.jp-key {
    flex: 1 1 220px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    background: #0d0f18; border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px;
    font-family: Consolas, monospace; font-size: .8rem; color: #d7dcf5; line-height: 1.2;
}
