/* OmniSolverCode — model picker + My Skills redesign (2026-08-03).
   Dark workbench, one orange signal, border-only depth. */

.pp-model-redesign,
.pp-skills-redesign {
    --osc-workbench-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bg: #111110;
    --bg-card: #181817;
    --bg-hover: #211f1d;
    --border: rgba(255,255,255,.09);
    --border-light: rgba(255,255,255,.15);
    --text: #f2efe8;
    --text-secondary: #c8c2b8;
    --text-muted: #9a958c;
    width: min(1220px, calc(100vw - 32px)) !important;
    max-width: 1220px !important;
    max-height: min(900px, calc(100dvh - 32px)) !important;
    border-radius: 15px !important;
    font-family: var(--osc-workbench-ui) !important;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body.osc-editorial-app .pp-model-redesign,
body.osc-editorial-app .pp-skills-redesign {
    color: #f2efe8 !important;
    background: #111110 !important;
    border-color: rgba(255,255,255,.12) !important;
    box-shadow: 0 24px 64px rgba(0,0,0,.62) !important;
}
body.osc-editorial-app .pp-model-redesign .pp-head,
body.osc-editorial-app .pp-skills-redesign .pp-head {
    color: #f2efe8 !important;
    background: #181817 !important;
    border-bottom-color: rgba(255,255,255,.09) !important;
}
body.osc-editorial-app .pp-model-redesign .pp-title,
body.osc-editorial-app .pp-skills-redesign .pp-title {
    color: #f2efe8 !important;
    font-family: var(--osc-workbench-ui) !important;
    font-weight: 600 !important;
    letter-spacing: -.015em !important;
}
body.osc-editorial-app .pp-model-redesign .pp-subtitle,
body.osc-editorial-app .pp-skills-redesign .pp-subtitle { color: #9a958c !important; }
body.osc-editorial-app .pp-model-redesign .pp-head-icon,
body.osc-editorial-app .pp-skills-redesign .pp-head-icon,
body.light-theme .pp-model-redesign .pp-head-icon,
body.light-theme .pp-skills-redesign .pp-head-icon {
    color: #f2efe8 !important;
    background: transparent !important;
    border-color: rgba(255,255,255,.11) !important;
}
body.osc-editorial-app .pp-model-redesign .pp-close,
body.osc-editorial-app .pp-skills-redesign .pp-close {
    color: #c8c2b8 !important;
    border-color: rgba(255,255,255,.11) !important;
    background: transparent !important;
}
body.osc-editorial-app .pp-model-redesign .pp-close:hover,
body.osc-editorial-app .pp-skills-redesign .pp-close:hover {
    color: #f2efe8 !important;
    border-color: rgba(255,255,255,.2) !important;
    background: #211f1d !important;
}
.pp-model-redesign::before,
.pp-skills-redesign::before { display: none !important; }
.pp-model-redesign .pp-head,
.pp-skills-redesign .pp-head { padding: 14px 18px !important; }
/* ⚠️ `min-height: 0` ОБЯЗАТЕЛЕН, и без него список не прокручивался.
   У элемента flex-колонки min-height по умолчанию `auto`, то есть он НЕ
   сжимается ниже своего содержимого. Тело панели вырастало под весь список
   моделей, панель (overflow:hidden) обрезала низ — и прокручивать становилось
   нечего: внутренний список исправно умел скроллиться, но места под скролл у
   него не оставалось. Владелец 2026-08-03: «в выборе моделей не прокручивается
   вниз». */
.pp-model-redesign .pp-body,
.pp-skills-redesign .pp-body {
    padding: 0 !important;
    overflow: hidden !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}
.pp-model-redesign .pp-head-icon,
.pp-skills-redesign .pp-head-icon {
    width: 38px !important; height: 38px !important; border-radius: 9px !important;
    background: transparent !important; border-color: var(--border, rgba(255,255,255,.1)) !important;
}

/* ── Model picker ─────────────────────────────────────────────────────── */
.mmx-shell {
    --mmx-surface: var(--bg-card, #181817);
    --mmx-raised: var(--bg-hover, #211f1d);
    --mmx-inset: rgba(0,0,0,.18);
    --mmx-border: var(--border, rgba(255,255,255,.09));
    --mmx-border-strong: var(--border-light, rgba(255,255,255,.15));
    --mmx-text: var(--text, #f2efe8);
    --mmx-muted: var(--text-muted, #9a958c);
    --mmx-orange: #f05a32;
    color: var(--mmx-text);
    /* ⚠️ `height`, а НЕ `min-height`: с min-height оболочка растёт под
       содержимое и вылезает за панель, а низ обрезается. Здесь задан желаемый
       размер, но сжиматься она обязана — иначе внутреннему списку негде
       прокручиваться. */
    height: min(690px, calc(100dvh - 140px));
    min-height: 0;
    max-height: 100%;
    flex: 1 1 auto;
    display: flex; flex-direction: column;
    background: var(--bg, #111110);
}
.mmx-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: 58px; padding: 8px 18px;
    border-bottom: 1px solid var(--mmx-border);
}
.mmx-tabs { display: flex; align-self: stretch; gap: 24px; min-width: 0; }
.mmx-tab {
    position: relative; appearance: none; border: 0; background: transparent;
    color: var(--mmx-muted); padding: 0; font-family: var(--osc-workbench-ui);
    font-size: 12.5px; font-weight: 500; line-height: 1;
    cursor: pointer; white-space: nowrap;
    transition: color 150ms cubic-bezier(.23,1,.32,1);
}
.mmx-tab::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -9px; height: 2px;
    background: var(--mmx-orange); opacity: 0; transform: scaleX(.35);
    transition: opacity 150ms, transform 150ms cubic-bezier(.23,1,.32,1);
}
.mmx-tab:hover,
.mmx-tab.is-active { color: var(--mmx-text); }
.mmx-tab.is-active::after { opacity: 1; transform: scaleX(1); }
.mmx-tab:focus-visible,
.mmx-tools input:focus-visible,
.mmx-taskbar button:focus-visible,
.mmx-row:focus-visible,
.mmx-pick:focus-visible { outline: 2px solid var(--mmx-orange); outline-offset: 2px; }
.mmx-tools { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.mmx-search {
    display: flex; align-items: center; gap: 8px; width: 220px; height: 36px; padding: 0 11px;
    border: 1px solid var(--mmx-border); border-radius: 8px; background: var(--mmx-inset);
}
.mmx-search svg { width: 15px; height: 15px; fill: none; stroke: var(--mmx-muted); stroke-width: 1.8; flex: 0 0 auto; }
.mmx-search input {
    width: 100%; min-width: 0; border: 0; outline: 0; background: transparent;
    color: var(--mmx-text); font-family: var(--osc-workbench-ui);
    font-size: 12px; font-weight: 400; line-height: 1;
}
.mmx-search input::placeholder { color: var(--mmx-muted); }
.mmx-available-toggle { display: flex; align-items: center; gap: 9px; color: var(--mmx-muted); font-size: 11.5px; cursor: pointer; }
.mmx-available-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.mmx-available-toggle i {
    width: 34px; height: 19px; border-radius: 12px; border: 1px solid var(--mmx-border-strong);
    background: var(--mmx-raised); position: relative; transition: background-color 150ms, border-color 150ms;
}
.mmx-available-toggle i::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; border-radius: 50%;
    background: var(--mmx-muted); transition: transform 150ms cubic-bezier(.23,1,.32,1), background-color 150ms;
}
.mmx-available-toggle input:checked + i { background: var(--mmx-orange); border-color: var(--mmx-orange); }
.mmx-available-toggle input:checked + i::after { background: #fff; transform: translateX(15px); }
.mmx-available-toggle input:focus-visible + i { outline: 2px solid var(--mmx-orange); outline-offset: 2px; }
.mmx-workspace {
    flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(330px, .82fr);
}
.mmx-browser { min-width: 0; padding: 18px; border-right: 1px solid var(--mmx-border); overflow: hidden; display: flex; flex-direction: column; }
.mmx-taskbar { padding: 0 0 15px; }
.mmx-taskbar > span { display: block; margin-bottom: 9px; color: var(--mmx-text); font-size: 12px; font-weight: 600; }
.mmx-taskbar > div { display: flex; flex-wrap: wrap; gap: 8px; }
.mmx-taskbar button {
    appearance: none; border: 1px solid var(--mmx-border); border-radius: 8px; background: transparent;
    color: var(--mmx-muted); min-height: 34px; padding: 0 12px; font-family: var(--osc-workbench-ui);
    font-size: 11.5px; font-weight: 500; line-height: 1; cursor: pointer;
    transition: color 140ms, border-color 140ms, background-color 140ms, transform 100ms;
}
.mmx-taskbar button:hover { color: var(--mmx-text); border-color: var(--mmx-border-strong); }
.mmx-taskbar button.is-active { color: var(--mmx-orange); border-color: var(--mmx-orange); background: rgba(240,90,50,.07); }
.mmx-taskbar button:active { transform: scale(.97); }
.mmx-list-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 0 2px 11px; }
.mmx-list-head h3 { margin: 0; color: var(--mmx-text); font-size: 16px; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
.mmx-list-head p { margin: 4px 0 0; color: var(--mmx-muted); font-size: 11.5px; line-height: 1.35; }
.mmx-list-head > span { color: var(--mmx-muted); font: 600 10.5px/1 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.mmx-list { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; padding-right: 4px; scrollbar-width: thin; }
.mmx-row {
    position: relative; appearance: none; width: 100%; min-height: 92px; display: flex; align-items: center; gap: 12px;
    padding: 12px 13px 12px 16px; border: 1px solid var(--mmx-border); border-radius: 10px;
    background: rgba(255,255,255,.015); color: var(--mmx-text); text-align: left; cursor: pointer; font-family: inherit;
    transition: background-color 140ms, border-color 140ms, transform 100ms;
}
.mmx-row:hover { background: var(--mmx-raised); border-color: var(--mmx-border-strong); }
.mmx-row:active { transform: scale(.995); }
.mmx-row.is-focused { background: var(--mmx-raised); border-color: rgba(240,90,50,.65); }
.mmx-row.is-active { border-color: rgba(240,90,50,.5); }
.mmx-row.is-locked,
.mmx-row.is-offline { opacity: .62; }
.mmx-signal { position: absolute; top: 9px; bottom: 9px; left: -1px; width: 3px; border-radius: 0 2px 2px 0; background: transparent; }
.mmx-row.is-focused .mmx-signal,
.mmx-row.is-active .mmx-signal { background: var(--mmx-orange); }
.mmx-model-icon {
    width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; overflow: hidden;
    border: 1px solid var(--mmx-border); border-radius: 9px; background: transparent;
}
.mmx-model-icon .brand-ico { width: 100%; height: 100%; }
.mmx-model-icon svg { width: 24px; height: 24px; }
.mmx-row-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mmx-row-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; line-height: 1.15; letter-spacing: -.012em; }
.mmx-row-title em { color: var(--mmx-orange); font: 700 8px/1 ui-monospace, monospace; letter-spacing: .08em; font-style: normal; }
.mmx-row-desc { max-width: 560px; color: var(--mmx-muted); font-size: 11.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mmx-row-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.mmx-row-tags i {
    border: 1px solid var(--mmx-border); border-radius: 5px; color: var(--mmx-muted); padding: 2px 6px;
    font-family: var(--osc-workbench-ui); font-size: 9.5px; font-weight: 500; line-height: 1.2;
    font-style: normal; font-variant-numeric: tabular-nums;
}
.mmx-row-status { flex: 0 0 auto; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.mmx-row-status::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.mmx-row-status.is-available { color: #65cf99; }
.mmx-row-status.is-selected { color: var(--mmx-orange); }
.mmx-row-status.is-locked { color: #d7b568; }
.mmx-row-status.is-offline { color: #d87973; }
.mmx-row-arrow { color: var(--mmx-muted); font-size: 20px; line-height: 1; }
.mmx-quota { display: block; width: min(190px, 38%); height: 2px; overflow: hidden; background: var(--mmx-border); border-radius: 1px; }
.mmx-quota i { display: block; height: 100%; background: var(--mmx-orange); }
.mmx-detail { min-width: 0; padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; background: rgba(0,0,0,.08); }
.mmx-detail-kicker { color: var(--mmx-muted); font: 600 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; }
.mmx-detail-head { display: flex; align-items: center; gap: 12px; }
.mmx-detail-icon { width: 46px; height: 46px; flex: 0 0 46px; border: 1px solid var(--mmx-border); border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.mmx-detail-icon .brand-ico { width: 100%; height: 100%; }
.mmx-detail-icon svg { width: 28px; height: 28px; }
.mmx-detail-heading { min-width: 0; flex: 1; }
.mmx-detail-heading h3 { margin: 0 0 5px; color: var(--mmx-text); font-size: 19px; font-weight: 600; line-height: 1.15; letter-spacing: -.025em; }
.mmx-status { color: var(--mmx-muted); font-size: 10.5px; font-weight: 600; }
.mmx-status.is-available { color: #65cf99; }
.mmx-status.is-selected { color: var(--mmx-orange); }
.mmx-status.is-locked { color: #d7b568; }
.mmx-status.is-offline { color: #d87973; }
.mmx-detail-summary { margin: 0; padding-bottom: 15px; border-bottom: 1px solid var(--mmx-border); color: var(--mmx-muted); font-size: 12.5px; line-height: 1.55; }
.mmx-detail-section h4 { margin: 0 0 8px; font-size: 12.5px; }
.mmx-detail-section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.mmx-detail-section li { color: var(--mmx-muted); font-size: 11.5px; }
.mmx-detail-section li::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 9px 2px 1px; border-radius: 50%; background: var(--mmx-orange); }
.mmx-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--mmx-border); border-radius: 8px; }
.mmx-metrics > div { min-width: 0; padding: 10px 6px; text-align: center; }
.mmx-metrics > div + div { border-left: 1px solid var(--mmx-border); }
.mmx-metrics span { display: block; color: var(--mmx-muted); font-size: 9.5px; }
.mmx-metrics b { display: block; margin-top: 5px; color: var(--mmx-text); font-size: 11px; line-height: 1.15; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.mmx-capabilities { border: 1px solid var(--mmx-border); border-radius: 8px; overflow: hidden; }
.mmx-capabilities > div { display: flex; align-items: center; justify-content: space-between; min-height: 37px; padding: 0 11px; color: var(--mmx-muted); font-size: 11.5px; }
.mmx-capabilities > div + div { border-top: 1px solid var(--mmx-border); }
.mmx-capabilities .is-on b { color: #78d642; }
.mmx-capabilities .is-off b { color: var(--mmx-muted); }
.mmx-detail-note { margin: 0; color: #d7b568; font-size: 11px; line-height: 1.45; }
.mmx-pick {
    appearance: none; width: 100%; min-height: 44px; margin-top: auto; border: 1px solid var(--mmx-orange); border-radius: 8px;
    background: var(--mmx-orange); color: #fff; font-family: var(--osc-workbench-ui);
    font-size: 12.5px; font-weight: 600; line-height: 1; cursor: pointer;
    transition: background-color 140ms, color 140ms, transform 100ms, opacity 140ms;
}
.mmx-pick:hover:not(:disabled) { background: #d94d28; }
.mmx-pick:active:not(:disabled) { transform: scale(.985); }
.mmx-pick:disabled { cursor: default; opacity: .48; background: transparent; color: var(--mmx-muted); border-color: var(--mmx-border-strong); }
.mmx-empty { min-height: 150px; display: grid; place-content: center; gap: 6px; color: var(--mmx-muted); text-align: center; font-size: 12px; }
.mmx-empty b { color: var(--mmx-text); }
.mmx-empty span { display: block; }

/* ── My Skills ────────────────────────────────────────────────────────── */
.skx-shell {
    --skx-raised: var(--bg-hover, #211f1d);
    --skx-inset: rgba(0,0,0,.18);
    --skx-border: var(--border, rgba(255,255,255,.09));
    --skx-border-strong: var(--border-light, rgba(255,255,255,.15));
    --skx-text: var(--text, #f2efe8);
    --skx-muted: var(--text-muted, #9a958c);
    --skx-orange: #f05a32;
    /* Та же беда, что у выбора моделей: с min-height оболочка вылезает за
       панель и низ обрезается. Желаемый размер задаём height, но сжиматься
       обязана. */
    height: min(690px, calc(100dvh - 140px));
    min-height: 0; max-height: 100%; flex: 1 1 auto;
    color: var(--skx-text); background: var(--bg, #111110);
    display: flex; flex-direction: column;
}
.skx-navline { min-height: 58px; display: flex; justify-content: space-between; align-items: stretch; gap: 16px; padding: 0 18px; border-bottom: 1px solid var(--skx-border); }
.skx-tabs { display: flex; gap: 26px; }
.skx-tabs button {
    position: relative; appearance: none; border: 0; background: transparent; color: var(--skx-muted);
    font-family: var(--osc-workbench-ui); font-size: 12.5px; font-weight: 500; line-height: 1;
    cursor: pointer; padding: 0;
}
.skx-tabs button::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--skx-orange); opacity: 0; transform: scaleX(.35); transition: opacity 150ms, transform 150ms cubic-bezier(.23,1,.32,1); }
.skx-tabs button:hover,
.skx-tabs button.is-active { color: var(--skx-text); }
.skx-tabs button.is-active::after { opacity: 1; transform: scaleX(1); }
.skx-tabs button span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; border: 1px solid var(--skx-border); border-radius: 10px; color: var(--skx-muted); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.skx-connection { appearance: none; align-self: center; min-height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--skx-border); border-radius: 8px; background: transparent; color: var(--skx-muted); font-family: var(--osc-workbench-ui); font-size: 11.5px; font-weight: 500; line-height: 1; cursor: pointer; }
.skx-connection i,
.skx-account-row span i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.skx-connection.is-on { color: #65cf99; }
.skx-connection.is-off { color: #d7b568; }
.skx-connection b { color: var(--skx-text); border: 1px solid var(--skx-border); border-radius: 5px; padding: 3px 6px; font-size: 9px; }
.skx-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.skx-controls,
.skx-catalog-controls { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--skx-border); }
.skx-search { min-width: 240px; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--skx-border); border-radius: 8px; background: var(--skx-inset); color: var(--skx-muted); }
.skx-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--skx-text); font-family: var(--osc-workbench-ui); font-size: 11.5px; font-weight: 400; line-height: 1; }
.skx-search input::placeholder { color: var(--skx-muted); }
.skx-scope { margin-left: auto; display: flex; align-items: center; gap: 9px; color: var(--skx-muted); font-size: 10.5px; }
.skx-scope > div { display: flex; border: 1px solid var(--skx-border); border-radius: 8px; overflow: hidden; }
.skx-scope button { appearance: none; min-height: 34px; border: 0; background: transparent; color: var(--skx-muted); padding: 0 11px; font-family: var(--osc-workbench-ui); font-size: 10.5px; font-weight: 500; line-height: 1; cursor: pointer; }
.skx-scope button + button { border-left: 1px solid var(--skx-border); }
.skx-scope button.is-active { color: var(--skx-text); background: var(--skx-raised); box-shadow: inset 0 -2px 0 var(--skx-orange); }
.skx-count { padding: 12px 18px 0; color: var(--skx-muted); font: 600 10.5px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.skx-workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(330px, .82fr); padding: 12px 18px 18px; gap: 14px; }
.skx-list { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; padding-right: 4px; }
.skx-card { position: relative; min-height: 96px; display: flex; align-items: stretch; border: 1px solid var(--skx-border); border-radius: 10px; background: rgba(255,255,255,.015); overflow: hidden; transition: background-color 140ms, border-color 140ms; }
.skx-card::before { content: ''; width: 3px; flex: 0 0 3px; background: transparent; }
.skx-card.is-selected { background: var(--skx-raised); border-color: rgba(240,90,50,.58); }
.skx-card.is-selected::before { background: var(--skx-orange); }
.skx-card-main { appearance: none; min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; border: 0; background: transparent; color: var(--skx-text); padding: 13px 12px; text-align: left; cursor: pointer; font-family: inherit; }
.skx-card:hover { background: var(--skx-raised); border-color: var(--skx-border-strong); }
.skx-card-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; letter-spacing: -.012em; }
.skx-card-title em { color: var(--skx-orange); font: 700 8px/1 ui-monospace, monospace; font-style: normal; letter-spacing: .08em; }
.skx-card-summary { color: var(--skx-muted); font-size: 11.5px; line-height: 1.38; }
.skx-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.skx-card-meta i,
.skx-trust { border: 1px solid var(--skx-border); border-radius: 5px; color: var(--skx-muted); padding: 2px 6px; font-family: var(--osc-workbench-ui); font-size: 9.5px; font-weight: 500; line-height: 1.2; font-style: normal; }
.skx-trust.is-trusted { color: #65cf99; }
.skx-trust.is-review { color: #d7b568; }
.skx-trust.is-danger { color: #d87973; }
.skx-more { appearance: none; align-self: center; width: 40px; height: 40px; margin-right: 7px; border: 0; border-radius: 8px; background: transparent; color: var(--skx-muted); cursor: pointer; letter-spacing: 1px; }
.skx-more:hover { color: var(--skx-text); background: rgba(255,255,255,.04); }
.skx-install { appearance: none; align-self: center; min-height: 34px; margin: 0 11px 0 4px; border: 1px solid var(--skx-orange); border-radius: 7px; background: transparent; color: var(--skx-orange); padding: 0 11px; font-family: var(--osc-workbench-ui); font-size: 10.5px; font-weight: 600; line-height: 1; cursor: pointer; }
.skx-install:hover { background: var(--skx-orange); color: #fff; }
.skx-installed { align-self: center; margin: 0 12px; color: #65cf99; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.skx-detail { min-height: 0; padding: 18px; border: 1px solid var(--skx-border); border-radius: 10px; background: rgba(0,0,0,.08); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.skx-detail-kicker { color: var(--skx-muted); font: 600 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; }
.skx-detail-title { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.skx-detail-title h3 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
.skx-detail > p { margin: 0; padding-bottom: 14px; border-bottom: 1px solid var(--skx-border); color: var(--skx-muted); font-size: 12px; line-height: 1.52; }
.skx-detail section h4 { margin: 0 0 6px; font-size: 12px; }
.skx-detail section p { margin: 0; color: var(--skx-muted); font-size: 11.5px; line-height: 1.48; }
.skx-detail dl { margin: 0; border: 1px solid var(--skx-border); border-radius: 8px; overflow: hidden; }
.skx-detail dl div { display: flex; justify-content: space-between; gap: 12px; min-height: 36px; align-items: center; padding: 0 10px; font-size: 10.5px; }
.skx-detail dl div + div { border-top: 1px solid var(--skx-border); }
.skx-detail dt { color: var(--skx-muted); }
.skx-detail dd { margin: 0; color: var(--skx-text); text-align: right; overflow-wrap: anywhere; }
.skx-source { color: var(--skx-orange); font-size: 11px; text-decoration: none; }
.skx-detail-actions { margin-top: auto; display: flex; align-items: center; gap: 9px; }
.skx-primary { appearance: none; width: 100%; min-height: 42px; border: 1px solid var(--skx-orange); border-radius: 8px; background: var(--skx-orange); color: #fff; font-family: var(--osc-workbench-ui); font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; }
.skx-danger-quiet { appearance: none; border: 0; background: transparent; color: #d87973; padding: 8px 0; font-family: var(--osc-workbench-ui); font-size: 10.5px; font-weight: 500; line-height: 1; cursor: pointer; }
.skx-detail-empty { place-content: center; text-align: center; color: var(--skx-muted); font-size: 11.5px; }
.skx-catalog-controls { flex-wrap: wrap; }
.skx-catalog-controls .skx-search { width: min(480px, 100%); }
.skx-categories { display: flex; gap: 7px; flex-wrap: wrap; }
.skx-categories button { appearance: none; min-height: 31px; border: 1px solid var(--skx-border); border-radius: 7px; background: transparent; color: var(--skx-muted); padding: 0 10px; font-family: var(--osc-workbench-ui); font-size: 10.5px; font-weight: 500; line-height: 1; cursor: pointer; }
.skx-categories button:hover { color: var(--skx-text); border-color: var(--skx-border-strong); }
.skx-categories button.is-active { color: var(--skx-orange); border-color: var(--skx-orange); }
.skx-catalog-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr); gap: 14px; padding: 14px 18px 18px; }
.skx-catalog-main { min-width: 0; min-height: 0; overflow-y: auto; }
.skx-catalog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.skx-catalog-head h3 { margin: 0; font-size: 15px; }
.skx-catalog-head span { color: var(--skx-muted); font: 600 10px/1 ui-monospace, monospace; }
.skx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.skx-grid .skx-card { min-height: 132px; flex-direction: column; }
.skx-grid .skx-card::before { position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; }
.skx-grid .skx-install,
.skx-grid .skx-installed { align-self: flex-end; margin: 0 10px 10px; }
.skx-grid .skx-card-main { width: 100%; }
.skx-custom-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 15px 18px; border-bottom: 1px solid var(--skx-border); }
.skx-custom-head > div:first-child { min-width: 0; }
.skx-custom-head > div:first-child > span,
.skx-custom-editor header span { color: var(--skx-orange); font: 700 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .11em; }
.skx-custom-head h3 { margin: 5px 0 3px; font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.skx-custom-head p { max-width: 620px; margin: 0; color: var(--skx-muted); font-size: 10.5px; line-height: 1.45; }
.skx-custom-quota { width: min(350px, 36%); min-width: 290px; display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--skx-border); border-radius: 9px; background: var(--skx-inset); }
.skx-quota-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; color: var(--skx-muted); font-size: 9.5px; }
.skx-quota-row b { color: var(--skx-text); font: 600 9.5px/1 ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums; }
.skx-quota-row > div { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: var(--skx-border); overflow: hidden; }
.skx-quota-row > div i { display: block; height: 100%; border-radius: inherit; background: var(--skx-orange); }
.skx-custom-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(270px, .82fr) minmax(390px, 1.18fr); gap: 14px; padding: 14px 18px 18px; }
.skx-custom-library,
.skx-custom-editor { min-width: 0; min-height: 0; border: 1px solid var(--skx-border); border-radius: 10px; background: rgba(255,255,255,.012); overflow: hidden; }
.skx-custom-library { display: flex; flex-direction: column; }
.skx-custom-library > header { min-height: 54px; display: flex; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--skx-border); }
.skx-custom-library header > div { width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.skx-custom-library h4,
.skx-custom-editor h4 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.skx-custom-library header span { color: var(--skx-muted); font: 600 9.5px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.skx-custom-list { min-height: 0; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; padding: 10px; }
.skx-custom-card { min-width: 0; display: flex; align-items: stretch; border: 1px solid var(--skx-border); border-radius: 8px; background: var(--skx-inset); transition: border-color 140ms, background-color 140ms; }
.skx-custom-card:hover { border-color: var(--skx-border-strong); background: var(--skx-raised); }
.skx-custom-card > div { min-width: 0; flex: 1; padding: 11px 12px; }
.skx-custom-card b { display: block; overflow: hidden; color: var(--skx-text); font-size: 12px; font-weight: 600; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.skx-custom-card p { display: -webkit-box; margin: 5px 0 8px; overflow: hidden; color: var(--skx-muted); font-size: 10.5px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.skx-custom-card span { display: flex; align-items: center; gap: 8px; color: var(--skx-muted); font-size: 9px; }
.skx-custom-card code { min-width: 0; overflow: hidden; color: var(--skx-muted); font: 500 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.skx-custom-card span i { margin-left: auto; font-style: normal; white-space: nowrap; }
.skx-custom-card > button { appearance: none; width: 42px; flex: 0 0 42px; border: 0; border-left: 1px solid var(--skx-border); background: transparent; color: var(--skx-muted); cursor: pointer; }
.skx-custom-card > button:hover { color: #d87973; background: rgba(216,121,115,.06); }
.skx-custom-card > button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skx-custom-empty { min-height: 180px; display: grid; place-content: center; gap: 5px; padding: 22px; color: var(--skx-muted); text-align: center; }
.skx-custom-empty b { color: var(--skx-text); font-size: 12px; }
.skx-custom-empty span { max-width: 260px; font-size: 10.5px; line-height: 1.45; }
.skx-custom-editor { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--skx-inset); overflow-y: auto; }
.skx-custom-editor header { display: flex; justify-content: space-between; align-items: end; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--skx-border); }
.skx-custom-editor header h4 { margin-top: 5px; }
.skx-custom-editor header small { max-width: 200px; color: var(--skx-muted); font-size: 9.5px; line-height: 1.35; text-align: right; }
.skx-custom-editor label { display: flex; flex-direction: column; gap: 6px; color: var(--skx-text); font-size: 10.5px; font-weight: 600; }
.skx-custom-editor input,
.skx-custom-editor textarea { box-sizing: border-box; width: 100%; border: 1px solid var(--skx-border); border-radius: 8px; outline: 0; background: rgba(0,0,0,.16); color: var(--skx-text); padding: 9px 10px; font-family: var(--osc-workbench-ui); font-size: 11.5px; font-weight: 400; line-height: 1.45; resize: vertical; }
.skx-custom-editor input { height: 38px; resize: none; }
.skx-custom-editor textarea::placeholder,
.skx-custom-editor input::placeholder { color: color-mix(in srgb, var(--skx-muted) 76%, transparent); }
.skx-custom-editor label > small { display: flex; justify-content: space-between; gap: 12px; color: var(--skx-muted); font-size: 9.5px; font-weight: 400; }
.skx-custom-editor label > small b { color: var(--skx-muted); font: 600 9.5px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums; }
.skx-custom-rules { min-height: 150px; flex: 1; }
.skx-custom-rules textarea { min-height: 132px; flex: 1; }
.skx-custom-editor footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 2px; }
.skx-custom-editor footer > span { color: var(--skx-muted); font: 600 9.5px/1 ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums; }
.skx-custom-editor footer > span.is-over { color: #d87973; }
.skx-custom-editor footer button,
.skx-custom-gate button { appearance: none; min-height: 38px; border: 1px solid var(--skx-orange); border-radius: 8px; background: var(--skx-orange); color: #fff; padding: 0 16px; font-family: var(--osc-workbench-ui); font-size: 11px; font-weight: 600; line-height: 1; cursor: pointer; }
.skx-custom-editor footer button:hover,
.skx-custom-gate button:hover { background: #ff6840; border-color: #ff6840; }
.skx-custom-editor footer button:disabled { border-color: var(--skx-border); background: var(--skx-raised); color: var(--skx-muted); cursor: not-allowed; }
.skx-custom-error { padding: 9px 10px; border: 1px solid rgba(216,121,115,.42); border-radius: 8px; background: rgba(216,121,115,.07); color: #e19a94; font-size: 10.5px; line-height: 1.42; }
.skx-custom-gate { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px; text-align: center; }
.skx-custom-gate-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 16px; border: 1px solid var(--skx-border-strong); border-radius: 12px; color: var(--skx-orange); background: var(--skx-inset); }
.skx-custom-gate-icon svg { width: 22px; height: 22px; }
.skx-custom-gate > p { margin: 0 0 8px; color: var(--skx-orange); font: 700 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .12em; }
.skx-custom-gate h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.skx-custom-gate > span:not(.skx-custom-gate-icon) { max-width: 520px; margin: 9px 0 18px; color: var(--skx-muted); font-size: 11.5px; line-height: 1.52; }
.skx-settings-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.skx-settings-nav { padding: 18px 14px; border-right: 1px solid var(--skx-border); display: flex; flex-direction: column; gap: 4px; }
.skx-settings-nav > b { padding: 0 8px 12px; color: var(--skx-muted); font: 600 9.5px/1 ui-monospace, monospace; letter-spacing: .08em; }
.skx-settings-nav button,
.skx-settings-nav span { min-height: 38px; display: flex; align-items: center; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--skx-muted); font-family: var(--osc-workbench-ui); font-size: 11.5px; font-weight: 500; line-height: 1; text-align: left; }
.skx-settings-nav button.is-active { color: var(--skx-text); background: var(--skx-raised); box-shadow: inset 3px 0 0 var(--skx-orange); }
.skx-settings-content { min-width: 0; padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.skx-settings-section { padding: 15px; border: 1px solid var(--skx-border); border-radius: 10px; }
.skx-settings-heading { display: flex; justify-content: space-between; gap: 12px; }
.skx-settings-heading h3 { margin: 0; font-size: 14px; }
.skx-settings-heading p { margin: 4px 0 0; color: var(--skx-muted); font-size: 11px; line-height: 1.4; }
.skx-settings-heading > b { color: var(--skx-muted); font-size: 10.5px; }
.skx-account-row { display: grid; grid-template-columns: 1fr auto minmax(170px, auto) auto; align-items: center; gap: 12px; margin-top: 12px; min-height: 42px; padding: 0 10px; border: 1px solid var(--skx-border); border-radius: 8px; }
.skx-account-row span { display: flex; align-items: center; gap: 7px; color: #65cf99; font-size: 11px; }
.skx-account-row b { font-size: 10px; }
.skx-account-row code { color: var(--skx-muted); font-size: 10.5px; }
.skx-account-row button,
.skx-key-form button { appearance: none; min-height: 32px; border: 1px solid var(--skx-border-strong); border-radius: 7px; background: transparent; color: var(--skx-text); padding: 0 10px; font-family: var(--osc-workbench-ui); font-size: 10.5px; font-weight: 500; line-height: 1; cursor: pointer; }
.skx-key-form { display: flex; gap: 8px; margin-top: 12px; }
.skx-key-form input { min-width: 0; flex: 1; height: 36px; border: 1px solid var(--skx-border); border-radius: 8px; background: var(--skx-inset); color: var(--skx-text); padding: 0 11px; font: 500 11px/1 ui-monospace, monospace; outline: 0; }
.skx-key-form #sk-connect { border-color: var(--skx-orange); background: var(--skx-orange); color: #fff; }
.skx-key-links { margin: 8px 0 0; color: var(--skx-muted); font-size: 10.5px; }
.skx-key-links a { color: var(--skx-orange); text-decoration: none; }
.skx-progress { height: 4px; margin-top: 12px; border-radius: 2px; background: var(--skx-border); overflow: hidden; }
.skx-progress i { display: block; height: 100%; background: var(--skx-orange); }
.skx-radio-list { margin-top: 12px; border: 1px solid var(--skx-border); border-radius: 8px; overflow: hidden; }
.skx-radio-list button { appearance: none; width: 100%; display: flex; align-items: flex-start; gap: 10px; min-height: 58px; padding: 11px; border: 0; background: transparent; color: var(--skx-text); text-align: left; font-family: inherit; cursor: pointer; }
.skx-radio-list button + button { border-top: 1px solid var(--skx-border); }
.skx-radio-list button.is-active { background: rgba(240,90,50,.06); box-shadow: inset 3px 0 0 var(--skx-orange); }
.skx-radio-list button > i { width: 14px; height: 14px; margin-top: 1px; border: 1px solid var(--skx-border-strong); border-radius: 50%; position: relative; }
.skx-radio-list button.is-active > i { border-color: var(--skx-orange); }
.skx-radio-list button.is-active > i::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--skx-orange); }
.skx-radio-list span { display: flex; flex-direction: column; gap: 3px; }
.skx-radio-list b { font-size: 11.5px; }
.skx-radio-list small { color: var(--skx-muted); font-size: 10.5px; line-height: 1.35; }
.skx-security-note b { font-size: 11.5px; }
.skx-security-note p { margin: 5px 0 0; color: var(--skx-muted); font-size: 10.5px; line-height: 1.45; }
.skx-disconnect { appearance: none; align-self: flex-start; border: 0; background: transparent; color: #d87973; padding: 7px 0; font-family: var(--osc-workbench-ui); font-size: 10.5px; font-weight: 500; line-height: 1; cursor: pointer; }
.skx-empty,
.skx-loading { flex: 1; min-height: 220px; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 24px; color: var(--skx-muted); text-align: center; font-size: 11.5px; }
.skx-empty b { color: var(--skx-text); font-size: 14px; }
.skx-empty span { max-width: 380px; line-height: 1.5; }
.skx-empty button { appearance: none; min-height: 36px; margin-top: 4px; border: 1px solid var(--skx-orange); border-radius: 7px; background: transparent; color: var(--skx-orange); padding: 0 12px; font-family: var(--osc-workbench-ui); font-size: 11px; font-weight: 600; line-height: 1; cursor: pointer; }
.skx-empty-inline { min-height: 150px; }
.skx-tabs button:focus-visible,
.skx-connection:focus-visible,
.skx-search input:focus-visible,
.skx-scope button:focus-visible,
.skx-card-main:focus-visible,
.skx-install:focus-visible,
.skx-more:focus-visible,
.skx-categories button:focus-visible,
.skx-settings-content button:focus-visible,
.skx-settings-content input:focus-visible,
.skx-custom-editor input:focus-visible,
.skx-custom-editor textarea:focus-visible,
.skx-custom-editor button:focus-visible,
.skx-custom-card button:focus-visible,
.skx-custom-gate button:focus-visible { outline: 2px solid var(--skx-orange); outline-offset: 2px; }

@media (max-width: 920px) {
    .pp-model-redesign,
    .pp-skills-redesign { width: calc(100vw - 20px) !important; max-width: calc(100vw - 20px) !important; max-height: calc(100dvh - 24px) !important; }
    .mmx-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; padding-top: 12px; }
    .mmx-tabs { width: 100%; justify-content: space-between; gap: 12px; overflow-x: auto; min-height: 30px; }
    .mmx-tab::after { bottom: -6px; }
    .mmx-tools { width: 100%; }
    .mmx-search { flex: 1; width: auto; }
    .mmx-workspace,
    .skx-workspace,
    .skx-catalog-layout,
    .skx-custom-layout { grid-template-columns: 1fr; overflow-y: auto; }
    .mmx-browser { overflow: visible; border-right: 0; border-bottom: 1px solid var(--mmx-border); }
    .mmx-list { max-height: none; overflow: visible; }
    .mmx-detail,
    .skx-detail { min-height: 430px; }
    .skx-workspace,
    .skx-catalog-layout,
    .skx-custom-layout { overflow: visible; }
    .skx-pane { overflow-y: auto; }
    .skx-list,
    .skx-catalog-main,
    .skx-custom-list { overflow: visible; }
    .skx-custom-head { align-items: stretch; flex-direction: column; gap: 12px; }
    .skx-custom-quota { box-sizing: border-box; width: 100%; min-width: 0; }
    .skx-settings-layout { grid-template-columns: 170px minmax(0, 1fr); }
}

@media (max-width: 620px) {
    .pp-model-redesign .pp-head,
    .pp-skills-redesign .pp-head { padding: 12px !important; }
    /* На телефоне тоже height, а не min-height: иначе низ списка опять
       окажется за краем экрана и прокрутки не будет. */
    .mmx-shell,
    .skx-shell { height: calc(100dvh - 108px); min-height: 0; }
    .mmx-toolbar { padding: 10px 12px; }
    .mmx-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; overflow: visible; }
    .mmx-tab { min-height: 34px; text-align: left; }
    .mmx-tab::after { bottom: 2px; }
    .mmx-tools { align-items: stretch; flex-direction: column; }
    .mmx-available-toggle { min-height: 30px; justify-content: space-between; }
    .mmx-browser,
    .mmx-detail { padding: 14px 12px; }
    .mmx-taskbar > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mmx-taskbar button { padding: 0 8px; }
    .mmx-row { min-height: 86px; gap: 9px; padding: 10px 9px 10px 13px; }
    .mmx-row-status { display: none; }
    .mmx-row-desc { max-width: 100%; }
    .mmx-metrics { grid-template-columns: repeat(2, 1fr); }
    .mmx-metrics > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--mmx-border); }
    .mmx-metrics > div:nth-child(4) { border-top: 1px solid var(--mmx-border); }
    .skx-navline { min-height: 96px; align-items: stretch; flex-direction: column-reverse; gap: 0; padding: 8px 12px 0; }
    .skx-tabs { min-height: 46px; justify-content: flex-start; gap: 22px; overflow-x: auto; }
    .skx-connection { align-self: flex-end; }
    .skx-controls,
    .skx-catalog-controls { align-items: stretch; flex-direction: column; padding: 12px; }
    .skx-search { width: 100%; min-width: 0; box-sizing: border-box; }
    .skx-scope { width: 100%; align-items: stretch; flex-direction: column; }
    .skx-scope > div { display: grid; grid-template-columns: 1fr 1fr; }
    .skx-count { padding-left: 12px; }
    .skx-workspace,
    .skx-catalog-layout,
    .skx-custom-layout { padding: 10px 12px 14px; }
    .skx-custom-head { padding: 12px; }
    .skx-custom-editor header { align-items: flex-start; flex-direction: column; }
    .skx-custom-editor header small { max-width: none; text-align: left; }
    .skx-custom-editor footer { align-items: stretch; flex-direction: column; }
    .skx-custom-editor footer button { width: 100%; }
    .skx-grid { grid-template-columns: 1fr; }
    .skx-settings-layout { grid-template-columns: 1fr; }
    .skx-settings-nav { display: none; }
    .skx-settings-content { padding: 12px; overflow: visible; }
    .skx-account-row { grid-template-columns: 1fr auto; padding: 8px 10px; }
    .skx-account-row code { grid-column: 1 / -1; }
    .skx-key-form { flex-direction: column; }
    .skx-detail-title { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .mmx-tab,
    .mmx-tab::after,
    .mmx-taskbar button,
    .mmx-row,
    .mmx-pick,
    .mmx-available-toggle i,
    .mmx-available-toggle i::after,
    .skx-tabs button::after,
    .skx-card,
    .skx-custom-card { transition: none !important; }
}
