/* ═══ MCP-C5: «MCP · Плагины» — /plugins (A3 §3) ═══════════════════════════
   Герой с «живым перламутром» (.pf-*), вкладки клиентов, заголовок с плашками
   логотипов, кнопки подключения, панель шагов (правая шторка), живое демо,
   примеры промптов, «Подключённые приложения», «Кредиты в плагинах».
   Акцент — только у главной кнопки героя; всё остальное нейтральное стекло. */

.plg { --sec-gap: clamp(64px, 9vw, 120px); }
.plg > section { scroll-margin-top: calc(var(--nav-h) + var(--tabs-h) + 16px); }
.plg > section + section { margin-top: var(--sec-gap); }
.plg-sec-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; max-width: 760px; }
.plg-sec-head .h2 { font-size: clamp(24px, 2.8vw, 34px); }
.plg-sec-head .muted { font-size: var(--fs-lg); line-height: 1.5; }

/* ── Перламутр (components/pearl-flow.js) ─────────────────────────────── */
.pf {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: #000;
    -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent);
    mask-image: linear-gradient(to bottom, #000 62%, transparent);
}
/* Перелив героя — чистый CSS (владелец 27.09): течёт всегда, без WebGL, курсора
   и стоп-кадров. Три готовых слоя пятен палитры страницы (--a1…--a4 + жемчуг)
   плывут каждый по своей траектории с разным периодом — рисунок не повторяется
   на глазах. Двигается только transform: видеокарта сдвигает готовые текстуры,
   перерисовки нет. color-mix нет — просто чёрный. */
.pf-fallback {
    position: absolute;
    inset: -24%;
    background: #000;
    background:
        radial-gradient(30% 44% at 24% 40%, color-mix(in srgb, var(--a1) 82%, transparent), transparent 70%),
        radial-gradient(28% 42% at 76% 32%, color-mix(in srgb, var(--a2) 78%, transparent), transparent 70%),
        radial-gradient(34% 48% at 50% 70%, color-mix(in srgb, var(--a3) 74%, transparent), transparent 70%),
        #000;
    will-change: transform;
    animation: pf-drift-a 14s ease-in-out infinite alternate;
}
.pf-fallback::before,
.pf-fallback::after {
    content: "";
    position: absolute;
    inset: 0;
    will-change: transform;
}
.pf-fallback::before {
    background:
        radial-gradient(24% 36% at 30% 78%, color-mix(in srgb, var(--a4) 72%, transparent), transparent 70%),
        radial-gradient(22% 32% at 70% 74%, rgba(233, 228, 244, 0.40), transparent 70%),
        radial-gradient(20% 30% at 62% 24%, color-mix(in srgb, var(--a1) 56%, transparent), transparent 70%);
    animation: pf-drift-b 10s ease-in-out infinite alternate;
}
.pf-fallback::after {
    background:
        radial-gradient(26% 38% at 40% 30%, color-mix(in srgb, var(--a3) 50%, transparent), transparent 70%),
        radial-gradient(22% 34% at 84% 62%, color-mix(in srgb, var(--a2) 58%, transparent), transparent 70%),
        radial-gradient(18% 28% at 16% 58%, rgba(233, 228, 244, 0.28), transparent 70%);
    mix-blend-mode: screen;
    animation: pf-drift-c 17s ease-in-out infinite alternate;
}
@keyframes pf-drift-a {
    0%   { transform: translate3d(-6%, -3%, 0) rotate(-6deg) scale(1); }
    50%  { transform: translate3d(6%, 4%, 0) rotate(4deg) scale(1.1); }
    100% { transform: translate3d(-3%, 6%, 0) rotate(8deg) scale(1.03); }
}
@keyframes pf-drift-b {
    0%   { transform: translate3d(8%, 4%, 0) rotate(6deg) scale(1.04); }
    50%  { transform: translate3d(-7%, -5%, 0) rotate(-4deg) scale(0.96); }
    100% { transform: translate3d(4%, -8%, 0) rotate(-9deg) scale(1.08); }
}
@keyframes pf-drift-c {
    0%   { transform: translate3d(-8%, 6%, 0) rotate(-3deg); }
    50%  { transform: translate3d(7%, -3%, 0) rotate(7deg) scale(1.08); }
    100% { transform: translate3d(2%, 5%, 0) rotate(-6deg); }
}
.pf-canvas, .pf-still {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 400ms ease;
}
.pf-canvas.is-live, .pf-still.is-live { opacity: 1; }

/* ── Герой ──────────────────────────────────────────────────────────────── */
.plg-hero {
    position: relative;
    isolation: isolate;
    padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(56px, 7vw, 96px);
}
.plg-hero-in {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
/* Панель — во всю ширину колонки: иначе длинная команда (white-space: pre) раздувает
   её по своему min-content, и на телефоне появляется горизонтальная прокрутка. */
.plg-panel { align-self: stretch; min-width: 0; }
.plg-clients {
    max-width: 100%;
    margin-bottom: clamp(28px, 4vw, 44px);
    background: rgba(8, 8, 12, 0.55);
    overflow-x: auto;
    scrollbar-width: none;
}
.plg-clients::-webkit-scrollbar { display: none; }
.plg-clients > button { flex: 0 0 auto; min-height: 40px; font-size: var(--fs-md); color: var(--text-2); }
.plg-clients > button[aria-selected="true"] { color: var(--text); }
.plg-clients > button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

.plg-title {
    font-family: var(--font-display);
    font-size: clamp(34px, 4.7vw, 70px);
    line-height: 1.06;
    letter-spacing: -0.02em;
    font-weight: 600;
    text-wrap: balance;
    min-height: 2.12em;
    margin: 0;
}
.plg-cl { display: inline-flex; align-items: baseline; white-space: nowrap; transition: opacity 120ms ease, transform 120ms ease; }
.plg-cl .cl-plq { align-self: center; margin: 0 0.16em 0 0.04em; transform: translateY(0.02em); }
.plg-cl.is-out { opacity: 0; transform: translateY(-6px); }
.plg-cl.is-in { animation: plg-in 220ms var(--ease-out) both; }
.plg-cl.is-in .cl-plq { animation: plg-plq 320ms var(--ease-spring) both; }
.plg-title.is-out { opacity: 0; transform: translateY(-6px); transition: opacity 120ms ease, transform 120ms ease; }
.plg-title.is-in { animation: plg-in 220ms var(--ease-out) both; }
@keyframes plg-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes plg-plq { from { transform: scale(0.9); } }

.plg-sub { max-width: 620px; margin: 18px auto 0; color: var(--text-2); font-size: var(--fs-lg); line-height: 1.55; }
.plg-cta { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.plg-cta.is-swap { animation: plg-fade 150ms ease both; }
@keyframes plg-fade { from { opacity: 0.2; } }
.plg-cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.plg-cta-row .btn { min-width: 248px; }
.plg-cta-row .btn-primary .cl-mark { background: currentColor; }
.plg-vs { width: 18px; height: 18px; }
.plg-link {
    border: 0;
    background: none;
    padding: 2px 0;
    color: var(--text-2);
    font: inherit;
    font-size: var(--fs-md);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--line-3);
    cursor: pointer;
}
.plg-link:hover { color: var(--text); }
.plg-link svg { vertical-align: -2px; }
/* «Как подключить?» под кнопками (вкладка Cursor · VS Code) — отдельная цель нажатия:
   26 px текста, зона — 44 через ::after, вид прежний (ревью UX, р. 3). */
.plg-cta > .plg-link { position: relative; }
.plg-cta > .plg-link::after { content: ""; position: absolute; inset: -9px -10px; }
.plg-hint {
    max-width: 560px;
    margin: 14px auto 0;
    padding: 10px 14px;
    border-radius: var(--r-md);
    background: rgba(12, 12, 18, 0.72);
    box-shadow: inset 0 0 0 1px var(--line-2);
    color: var(--text-2);
    font-size: var(--fs-sm);
    line-height: 1.5;
    animation: plg-in 220ms var(--ease-out) both;
}
.plg-hint .plg-link { font-size: inherit; }
.plg-under { margin-top: 18px; display: flex; justify-content: center; width: 100%; }
.plg-trust { margin-top: 16px; color: var(--text-4); font-size: var(--fs-xs); line-height: 1.4; }
.plg-tm {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: clamp(36px, 5vw, 56px) auto 0;
    text-align: center;
    color: var(--text-4);
    font-size: var(--fs-xs);
    line-height: 1.5;
}

/* Адрес сервера: нажатие копирует. */
.plg-url {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--r-md);
    background: transparent;
    color: var(--text-3);
    font: inherit;
    cursor: pointer;
    transition: color var(--dur-2) ease, background var(--dur-2) ease;
}
.plg-url:hover { color: var(--text-2); background: var(--glass-2); }
.plg-url:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.plg-url-l { font-size: var(--fs-sm); }
.plg-url code { font-family: var(--font-mono); font-size: var(--fs-md); color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plg-ic { display: inline-flex; }
.plg-ic svg { width: 16px; height: 16px; }

/* Карточка команды: «$» не копируется, длинная строка — прокрутка с маской. */
.plg-cmd {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    width: min(100%, 680px);
    padding: 10px 8px 10px 16px;
    border-radius: var(--r-md);
    background: var(--panel-solid);
    box-shadow: inset 0 0 0 1px var(--line-2);
    text-align: left;
}
.plg-cmd-lines {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
    padding-right: 18px;
}
.plg-cmd pre { margin: 0; font-family: var(--font-mono); font-size: var(--fs-md); line-height: 1.55; white-space: pre; color: var(--text); }
.plg-cmd code { font: inherit; }
.plg-cmd-p { color: var(--text-4); user-select: none; }
.plg-cmd.is-cfg pre { font-size: 13px; }
.plg-copy { flex: 0 0 auto; align-self: flex-start; }

/* ── Плашки логотипов (core/mcp-clients.js → plaque) ─────────────────── */
.cl-plq {
    --plq: 0.94em;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: var(--plq);
    height: var(--plq);
    border-radius: calc(var(--plq) * 0.26);
    background: #1a1a22;
    color: var(--text-2);
    vertical-align: -0.12em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.cl-plq > .cl-mark, .cl-plq > img, .cl-plq > svg { width: 60%; height: 60%; }
.cl-mark {
    display: inline-block;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: var(--m) center / contain no-repeat;
    mask: var(--m) center / contain no-repeat;
}
.cl-plq-claude, .cl-plq-claude_code { background: #d97757; box-shadow: none; }
.cl-plq-claude .cl-mark, .cl-plq-claude_code .cl-mark { background: #faf3ea; }
.cl-plq-chatgpt, .cl-plq-codex, .cl-plq-cursor { background: #000; box-shadow: inset 0 0 0 1px var(--line-2); }
.cl-plq-chatgpt .cl-mark, .cl-plq-codex .cl-mark, .cl-plq-cursor .cl-mark { background: #fff; }
.cl-plq-vscode { background: #0b0b10; box-shadow: inset 0 0 0 1px var(--line-2); }
.cl-plq-astra { background: none; box-shadow: none; }
.cl-plq-astra > img { width: 100%; height: 100%; }

/* ── Панель «Как подключить?»: правая шторка (телефон — снизу) ──────────── */
.modal-root.plg-drawer:not(.is-sheet) { place-items: stretch end; padding: 0; }
.modal-root.plg-drawer:not(.is-sheet) .modal {
    width: min(100vw, var(--modal-w));
    height: 100dvh;
    max-height: 100dvh;
    border-radius: var(--r-2xl) 0 0 var(--r-2xl);
    transform: translate3d(24px, 0, 0);
    transform-origin: right center;
    transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out);
}
.modal-root.plg-drawer.is-open:not(.is-sheet) .modal { transform: none; }
@media (max-width: 640px) { .modal-root.plg-drawer.is-sheet .modal { max-height: 88svh; } }
.plg-drawer-in { padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 18px; text-align: left; }
.plg-dr-head { display: flex; align-items: center; gap: 12px; padding-right: 40px; }
.plg-dr-title { font-size: var(--fs-xl); font-weight: 600; line-height: 1.3; margin: 0; }
.plg-dr-body { display: flex; flex-direction: column; gap: 16px; }
.plg-dr-sub { font-size: var(--fs-base); font-weight: 600; margin: 6px 0 -4px; }
.plg-dr-label { font-size: var(--fs-sm); color: var(--text-3); margin: 4px 0 -6px; }
.plg-steps { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; }
.plg-steps > li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; }
.plg-step-n {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--glass-3);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.plg-step-b { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.plg-step-b p, .plg-note, .plg-verify p, .plg-plugin p { margin: 0; color: var(--text-2); font-size: var(--fs-base); line-height: 1.55; }
.plg-note.is-soft { color: var(--text-3); font-size: var(--fs-sm); }
.plg-drawer-in code { font-family: var(--font-mono); font-size: 0.92em; color: var(--text); background: var(--glass-2); padding: 1px 5px; border-radius: 6px; }
.plg-drawer-in .plg-cmd code, .plg-drawer-in .plg-inline-url code { background: none; padding: 0; }
.plg-drawer-in .plg-cmd { width: 100%; }
.ui-label {
    display: inline-block;
    padding: 0 6px;
    border-radius: 6px;
    background: var(--glass-3);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--text);
    font-size: 0.92em;
    line-height: 1.5;
    white-space: nowrap;
}
.plg-inline-url {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 0 6px;
    border: 0;
    border-radius: 6px;
    background: var(--glass-2);
    color: var(--text);
    font: inherit;
    vertical-align: baseline;
    cursor: pointer;
}
.plg-inline-url:hover { background: var(--glass-3); }
.plg-inline-url code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plg-inline-url.is-prompt { font-style: normal; }
.plg-cfg { display: flex; flex-direction: column; gap: 8px; }
.plg-cfg-file { margin: 0; color: var(--text-3); font-size: var(--fs-sm); }
.plg-other-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.plg-other-chips .chip-btn { height: 36px; font-size: var(--fs-sm); }
.plg-other-body { display: flex; flex-direction: column; gap: 12px; }
.plg-agent, .plg-plugin, .plg-verify {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: var(--r-lg);
    background: var(--glass-1);
    box-shadow: inset 0 0 0 1px var(--line);
}
.plg-agent h3, .plg-plugin h3, .plg-verify h3 { margin: 0; font-size: var(--fs-base); font-weight: 600; }
.plg-agent .plg-ex-p { font-size: var(--fs-sm); color: var(--text-2); }
.plg-agent .btn { align-self: flex-start; }
.plg-trouble { border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); }
.plg-trouble summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
}
.plg-trouble summary::-webkit-details-marker { display: none; }
.plg-trouble summary svg { color: var(--text-3); transition: transform var(--dur-2) ease; }
.plg-trouble[open] summary svg { transform: rotate(180deg); }
.plg-trouble ul { margin: 0; padding: 0 16px 14px 34px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.plg-trouble a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.plg-dr-url { display: flex; justify-content: flex-start; }
.plg-dr-url .plg-url { padding-left: 0; }

/* ── Живое демо ──────────────────────────────────────────────────────── */
.plg-demo > .plg-sec-head { align-items: center; text-align: center; margin-left: auto; margin-right: auto; }
.mcpd-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.mcpd-chips .chip-btn[aria-pressed="true"],
.plg-ex-filter .chip-btn[aria-pressed="true"],
.plg-other-chips .chip-btn[aria-pressed="true"] {
    color: var(--text);
    background: rgba(201, 193, 230, 0.18);
    box-shadow: inset 0 0 0 1px rgba(201, 193, 230, 0.4);
}
.mcpd-window {
    --w-bg: #161618;
    --w-text: #f4f4f7;
    --w-text-2: rgba(244, 244, 247, 0.72);
    --w-line: rgba(255, 255, 255, 0.1);
    --w-bubble: rgba(255, 255, 255, 0.07);
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    height: clamp(560px, 64vw, 660px);
    display: flex;
    flex-direction: column;
    border-radius: var(--r-xl);
    background: var(--w-bg);
    color: var(--w-text);
    box-shadow: var(--sh-3);
    overflow: hidden;
    transition: background var(--dur-3) ease, color var(--dur-3) ease;
}
.mcpd-window[data-host="claude"] { --w-bg: #262624; --w-text: #f5f4ef; --w-text-2: rgba(245, 244, 239, 0.74); --w-line: rgba(245, 244, 239, 0.12); --w-bubble: #3a3a37; }
.mcpd-window[data-host="chatgpt"] { --w-bg: #ffffff; --w-text: #0d0d0d; --w-text-2: rgba(13, 13, 13, 0.7); --w-line: rgba(0, 0, 0, 0.09); --w-bubble: #f1f1f2; }
.mcpd-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 44px;
    flex: 0 0 auto;
    padding: 0 8px 0 14px;
    border-bottom: 1px solid var(--w-line);
}
.mcpd-host { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 600; min-width: 0; }
.mcpd-host .badge { text-transform: lowercase; letter-spacing: 0.02em; }
.mcpd-window[data-host="chatgpt"] .badge-soft { color: rgba(13, 13, 13, 0.7); background: rgba(0, 0, 0, 0.06); }
.mcpd-bar-end { display: inline-flex; gap: 2px; }
.mcpd-bar .btn { --h: 32px; color: var(--w-text-2); }
.mcpd-bar .btn:hover { color: var(--w-text); background: var(--w-bubble); }
.mcpd-bar .btn svg { width: 15px; height: 15px; }
.mcpd-thread {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px clamp(14px, 3vw, 28px) 26px;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28px);
    mask-image: linear-gradient(to bottom, transparent, #000 28px);
    transition: opacity 300ms ease;
}
.mcpd-thread::-webkit-scrollbar { display: none; }
/* Окно чата прокручивается с клавиатуры (Tab → стрелки); рамка — только при фокусе с клавиатуры. */
.mcpd-thread:focus { outline: none; }
.mcpd-thread:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.mcpd-thread.is-fading { opacity: 0; }
.mcpd-thread > * { flex: 0 0 auto; animation: mcpd-in 260ms var(--ease-out) both; }
@keyframes mcpd-in { from { opacity: 0; transform: translateY(12px); } }
.mcpd-msg p { margin: 0; font-size: var(--fs-base); line-height: 1.55; }
.mcpd-msg.is-user { align-self: flex-end; max-width: min(78%, 520px); }
.mcpd-bubble { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 14px; border-radius: 18px; background: var(--w-bubble); }
.mcpd-bubble img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.mcpd-msg.is-ai { max-width: 92%; color: var(--w-text); }
.mcpd-tool { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 12px 6px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--w-line); color: var(--w-text-2); font-size: var(--fs-sm); }
.mcpd-tool-ic { display: inline-grid; place-items: center; width: 18px; height: 18px; }
.mcpd-tool-ic svg { width: 16px; height: 16px; }
.mcpd-tool .spinner { width: 14px; height: 14px; border-width: 2px; }
.mcpd-widget { opacity: 0; transform: translateY(8px); transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); animation: none; }
.mcpd-widget.is-in { opacity: 1; transform: none; }
.mcpd-frame { display: block; width: 100%; border: 0; border-radius: 18px; background: transparent; color-scheme: normal; transition: height 220ms ease; }
.mcpd-static { opacity: 0; transition: opacity 260ms ease; border-radius: 18px; padding: 12px; box-shadow: inset 0 0 0 1px var(--w-line); display: flex; flex-direction: column; gap: 10px; animation: none; }
.mcpd-static.is-in { opacity: 1; }
.mcpd-static-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--fs-sm); color: var(--w-text-2); }
.mcpd-static-head b { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.mcpd-window[data-host="chatgpt"] .mcpd-static-head .text-aurora {
    background-image: linear-gradient(90deg, #5d5596 0%, #4e6399 17%, #3a7275 33%, #7d5f44 50%, #3a7275 67%, #4e6399 83%, #5d5596 100%);
}
.mcpd-static-media { display: grid; border-radius: 14px; overflow: hidden; }
.mcpd-static-media img { width: 100%; max-height: 380px; object-fit: cover; display: block; }
.mcpd-static-media.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.mcpd-static-media.is-grid img { aspect-ratio: 1; max-height: none; border-radius: 10px; }
.mcpd-static-cap { margin: 0; font-size: var(--fs-sm); color: var(--w-text-2); }

/* ── Примеры промптов ─────────────────────────────────────────────────── */
.plg-ex-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.plg-ex-filter .chip-btn { height: 36px; font-size: var(--fs-sm); }
.plg-ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.plg-ex-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--r-lg); }
.plg-ex-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.plg-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--glass-2); color: var(--text-2); font-size: 12px; }
.plg-chip svg { width: 13px; height: 13px; }
.plg-ex-t { margin: 0; font-size: var(--fs-base); font-weight: 600; }
.plg-ex-p {
    margin: 0;
    color: var(--text-2);
    font-size: var(--fs-base);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.plg-ex-card.is-open .plg-ex-p, .plg-agent .plg-ex-p { -webkit-line-clamp: unset; display: block; }
.plg-more { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; margin-top: -4px; }
.plg-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.plg-ex-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.plg-ex-foot .btn svg { width: 14px; height: 14px; }

/* ── Подключённые приложения ─────────────────────────────────────────── */
.plg-conn-head { flex-direction: row; align-items: flex-end; justify-content: space-between; max-width: 980px; }
.plg-conn-head > div { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.plg-conn-card { max-width: 980px; border-radius: var(--r-xl); }
.plg-list { list-style: none; margin: 0; padding: 6px 0; }
.plg-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    padding: 14px 16px;
    transition: opacity 220ms ease, transform 220ms ease, background 1200ms ease;
}
.plg-row + .plg-row { border-top: 1px solid var(--line); }
.plg-row.is-new { background: var(--glass-3); transition: none; }
.plg-row.is-leaving { opacity: 0; transform: translateX(8px); }
.plg-row.is-skel { display: block; }
.plg-row.is-skel .skeleton { display: block; height: 44px; }
.plg-row-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.plg-row-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.plg-row-t { font-size: var(--fs-base); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plg-row-meta { margin: 0; color: var(--text-3); font-size: var(--fs-sm); line-height: 1.45; }
.plg-row-meta svg { display: inline-block; vertical-align: -1px; margin-right: 3px; color: var(--text-2); }
.plg-row-meta b { font-weight: 600; color: var(--text-2); }
.plg-row-end { display: flex; align-items: center; gap: 6px; }
.plg-scopes { display: inline-flex; gap: 2px; }
.plg-scope { display: inline-grid; place-items: center; width: 28px; height: 28px; color: var(--text-3); }
.plg-scopes-m { display: none; }
.plg-off:hover:not(:disabled) { color: var(--danger); }
.plg-conn-guest, .plg-conn-empty, .plg-conn-err { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 36px 20px; text-align: center; }
.plg-conn-guest p, .plg-conn-err p { margin: 0; color: var(--text-2); }
.plg-conn-err > svg { color: var(--text-3); width: 22px; height: 22px; }
.plg-empty-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--glass-2); color: var(--text-2); }
.plg-empty-ic svg { width: 24px; height: 24px; }
.plg-empty-t { margin: 0; font-weight: 600; font-size: var(--fs-lg); }
.plg-conn-empty .muted { margin: 0; max-width: 460px; }

/* ── Кредиты в плагинах ──────────────────────────────────────────────── */
.plg-cr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 40px; max-width: 980px; margin-bottom: 20px; }
.plg-cr-grid p { margin: 0; color: var(--text-2); font-size: var(--fs-base); line-height: 1.6; }

/* ── Телефон и планшет ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .plg-title { max-width: 18ch; }
}
@media (max-width: 640px) {
    .plg-hero { padding-top: 20px; }
    .plg-clients {
        align-self: stretch;
        justify-content: flex-start;
        -webkit-mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 14px), transparent);
        mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 14px), transparent);
    }
    .plg-clients > button { min-height: 36px; position: relative; }
    .plg-clients > button::after { content: ''; position: absolute; inset: -4px 0; }
    .plg-title { min-height: 0; max-width: none; }
    .plg-sub { font-size: var(--fs-base); }
    .plg-cta-row { flex-direction: column; align-items: stretch; width: 100%; }
    .plg-cta-row .btn { min-width: 0; width: 100%; }
    .plg-url { flex-wrap: wrap; justify-content: center; row-gap: 2px; }
    /* Подпись — своей строкой: адрес и значок копирования не разрываются
       (на fr/es/pt значок уходил один на третью строку — ревью UX р. 2). */
    .plg-url-l { flex-basis: 100%; text-align: center; }
    .plg-url code { font-size: 13px; }
    .mcpd-window { height: 600px; border-radius: var(--r-lg); }
    .plg-ex-grid { grid-template-columns: minmax(0, 1fr); }
    /* Мета-строка переносится, «Отключить» — справа на уровне названия (A3 §3.5.2). */
    .plg-row { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 14px 12px 14px 14px; }
    .plg-row-end { align-self: start; margin-top: -6px; }
    .plg-row-end .plg-scopes { display: none; }
    .plg-scopes-m { display: inline-flex; flex: 0 0 auto; gap: 2px; }
    .plg-scopes-m .plg-scope { width: 18px; height: 18px; }
    .plg-row-name { flex-wrap: wrap; row-gap: 4px; }
    .plg-conn-head { flex-direction: column; align-items: flex-start; }
    .plg-cr-grid { grid-template-columns: minmax(0, 1fr); }
    .plg-drawer-in { padding: 26px 16px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .plg-cl, .plg-title, .plg-cta, .plg-hint, .mcpd-thread > *, .mcpd-widget, .mcpd-static, .plg-row, .pf-canvas, .pf-still, .pf-fallback, .pf-fallback::before, .pf-fallback::after { transition: none !important; animation: none !important; }
}
