/* OmniSolver Code editorial product system
 * Loaded last on the chat and subscription surfaces. It intentionally changes
 * presentation only: no layout hooks used by the application are renamed. */
:root {
    --osc-paper: #f2efe8;
    --osc-paper-deep: #e9e5dc;
    --osc-paper-bright: #fffdf7;
    --osc-ink: #151515;
    --osc-ink-soft: #3e3d39;
    --osc-muted: #77736b;
    --osc-line: #cbc6bb;
    --osc-line-dark: #343330;
    --osc-signal: #f05a32;
    --osc-signal-dark: #c84120;
    --osc-acid: #d9ff43;
    --osc-good: #2d8a49;
    --osc-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.osc-lang-switch {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 3px;
    border: 1px solid var(--osc-line);
    background: rgba(255, 253, 247, .72);
}
.osc-lang-switch button {
    min-width: 38px;
    height: 26px;
    padding: 0 8px;
    border: 0;
    color: var(--osc-muted);
    background: transparent;
    font: 650 10px/1 var(--osc-mono);
    letter-spacing: .08em;
    cursor: pointer;
}
.osc-lang-switch button:hover { color: var(--osc-ink); }
.osc-lang-switch button.is-active {
    color: var(--osc-paper-bright);
    background: var(--osc-ink);
}

/* ================================================================
   Chat / application shell
   ================================================================ */
body.osc-editorial-app {
    --bg: var(--osc-paper);
    --bg-card: var(--osc-paper-bright);
    --bg-hover: #e3ded4;
    --bg-input: var(--osc-paper-bright);
    --bg-secondary: var(--osc-paper-deep);
    --border: var(--osc-line);
    --border-light: #aaa499;
    --text: var(--osc-ink);
    --text-secondary: var(--osc-ink-soft);
    --text-muted: var(--osc-muted);
    --primary: var(--osc-signal);
    --primary-light: var(--osc-signal);
    --primary-dark: var(--osc-signal-dark);
    --primary-glow: rgba(240, 90, 50, .16);
    --accent: var(--osc-signal);
    --accent-light: var(--osc-acid);
    --gradient: linear-gradient(135deg, var(--osc-signal), var(--osc-signal));
    --gradient-text: linear-gradient(135deg, var(--osc-ink), var(--osc-ink));
    --code-bg: #171716;
    --code-border: #343330;
    --msg-user: var(--osc-ink);
    --msg-ai: transparent;
    --success: var(--osc-good);
    --warning: #a96600;
    --danger: #c5362c;
    --radius: 4px;
    --radius-lg: 6px;
    --shadow: 0 20px 60px rgba(21, 21, 21, .16);
    --transition: .18s ease;
    background-color: var(--osc-paper);
    background-image:
        linear-gradient(to right, rgba(21,21,21,.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(21,21,21,.035) 1px, transparent 1px);
    background-size: 48px 48px;
    color: var(--osc-ink);
}

body.osc-editorial-app::before {
    content: "OSC / WORKSPACE";
    position: fixed;
    right: 8px;
    bottom: 102px;
    z-index: 0;
    color: rgba(21,21,21,.35);
    font: 8px/1 var(--osc-mono);
    letter-spacing: .14em;
    writing-mode: vertical-rl;
    pointer-events: none;
}

.osc-editorial-app .osc-boot-overlay {
    background: var(--osc-paper);
}
.osc-editorial-app .osc-boot-card {
    min-height: 170px;
    border: 1px solid var(--osc-ink);
    border-radius: 0;
    color: var(--osc-paper-bright);
    background: var(--osc-ink);
    box-shadow: 12px 12px 0 var(--osc-signal);
    backdrop-filter: none;
}
.osc-editorial-app .osc-boot-card img { border-radius: 0; box-shadow: none; }
.osc-editorial-app .osc-boot-title { color: var(--osc-paper-bright); font-family: var(--osc-mono); font-size: 12px; letter-spacing: .06em; }
.osc-editorial-app .osc-boot-line { border-radius: 0; background: #373632; }
.osc-editorial-app .osc-boot-line span { background: var(--osc-acid); border-radius: 0; }

.osc-editorial-app .chat-screen { background: rgba(242,239,232,.93); }
.osc-editorial-app .sidebar {
    background: var(--osc-paper-deep);
    border-right: 1px solid var(--osc-ink);
    box-shadow: none;
}
.osc-editorial-app .sidebar-header {
    min-height: 58px;
    padding: 11px 14px;
    border-bottom-color: var(--osc-ink);
}
.osc-editorial-app .sidebar-logo {
    color: var(--osc-ink);
    font-family: inherit;
    font-size: 14px;
}
.osc-editorial-app .sidebar-logo img,
.osc-editorial-app .chat-topbar-logo img { border-radius: 6px !important; filter: none; }
.osc-editorial-app .sidebar-logo::after {
    content: "WORKSPACE";
    margin-left: 2px;
    color: var(--osc-muted);
    font: 8px/1 var(--osc-mono);
    letter-spacing: .11em;
}
.osc-editorial-app .sidebar-toggle,
.osc-editorial-app .sidebar-mobile-close,
.osc-editorial-app .sidebar-open-btn {
    border: 1px solid transparent;
    border-radius: 0;
    color: var(--osc-ink-soft);
}
.osc-editorial-app .sidebar-toggle:hover,
.osc-editorial-app .sidebar-mobile-close:hover,
.osc-editorial-app .sidebar-open-btn:hover { color: var(--osc-ink); border-color: var(--osc-ink); background: transparent; }
.osc-editorial-app .sidebar-resize-grip:hover,
.osc-editorial-app .sidebar-resize-grip.dragging { background: var(--osc-signal); }
.osc-editorial-app .sidebar-resize-grip:hover::after,
.osc-editorial-app .sidebar-resize-grip.dragging::after { background: var(--osc-ink); }

.osc-editorial-app .btn-new-chat {
    min-height: 42px;
    margin: 12px;
    border: 1px solid var(--osc-ink);
    border-radius: 0;
    color: var(--osc-paper-bright);
    background: var(--osc-ink);
    box-shadow: 4px 4px 0 var(--osc-signal);
    font-weight: 650;
}
.osc-editorial-app .btn-new-chat:hover { color: var(--osc-ink); background: var(--osc-acid); border-color: var(--osc-ink); transform: translate(-1px,-1px); box-shadow: 6px 6px 0 var(--osc-signal); }
.osc-editorial-app #chat-search {
    border-color: var(--osc-line) !important;
    border-radius: 0 !important;
    color: var(--osc-ink) !important;
    background: rgba(255,253,247,.55) !important;
}
.osc-editorial-app #chat-search:focus { border-color: var(--osc-ink) !important; box-shadow: 0 0 0 1px var(--osc-ink); }
.osc-editorial-app .sidebar-section-title,
.osc-editorial-app .codex-environment-kicker,
.osc-editorial-app .model-selector-label,
.osc-editorial-app .token-bar-label {
    color: var(--osc-muted);
    font-family: var(--osc-mono);
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.osc-editorial-app .sidebar-divider { background: var(--osc-line); }
.osc-editorial-app .sidebar-divider:hover::after,
.osc-editorial-app .sidebar-divider.dragging::after { background: var(--osc-signal); }
.osc-editorial-app .chat-item,
.osc-editorial-app .project-item {
    border-radius: 0;
    border-left: 2px solid transparent;
}
.osc-editorial-app .chat-item:hover,
.osc-editorial-app .project-item:hover { background: rgba(255,253,247,.55); }
.osc-editorial-app .chat-item.active,
.osc-editorial-app .project-item.active { color: var(--osc-ink); background: var(--osc-paper-bright); border-left-color: var(--osc-signal); }
.osc-editorial-app .chat-archive-toggle {
    border: 1px solid var(--osc-line);
    border-radius: 0;
    font-family: var(--osc-mono);
    text-transform: uppercase;
}
.osc-editorial-app .chat-archive-toggle:hover,
.osc-editorial-app .chat-archive-toggle.active { border-color: var(--osc-ink); background: var(--osc-ink); color: var(--osc-paper-bright); }

.osc-editorial-app .sidebar-bottom { border-top-color: var(--osc-line); }
.osc-editorial-app .codex-environment-head { border-bottom-color: var(--osc-line); }
.osc-editorial-app .codex-environment-head strong { color: var(--osc-ink); font-size: 13px; }
.osc-editorial-app .model-selector-btn {
    min-height: 42px;
    border: 1px solid var(--osc-ink);
    border-radius: 0;
    color: var(--osc-ink);
    background: var(--osc-paper-bright);
}
.osc-editorial-app .model-selector-btn:hover { border-color: var(--osc-signal); box-shadow: inset 3px 0 0 var(--osc-signal); }
.osc-editorial-app .model-selector-cost,
.osc-editorial-app .chat-topbar-model {
    border: 1px solid var(--osc-line);
    border-radius: 0;
    color: var(--osc-ink-soft);
    background: transparent;
    font-family: var(--osc-mono);
}
.osc-editorial-app .model-selector-cost { color: var(--osc-signal-dark); border: 0; background: transparent; }
.osc-editorial-app .sidebar-settings { border-top: 1px solid var(--osc-line); }
.osc-editorial-app .setting-toggle { border-radius: 0; }
.osc-editorial-app .setting-toggle:hover { background: rgba(255,253,247,.55); }
.osc-editorial-app .toggle-slider { border-radius: 999px; border: 1px solid var(--osc-line-dark); background: transparent; }
.osc-editorial-app .toggle-slider::before,
.osc-editorial-app .toggle-slider::after { border-radius: 50%; background: var(--osc-ink); }
.osc-editorial-app .setting-toggle input:checked + .toggle-slider { background: var(--osc-acid); border-color: var(--osc-ink); }
.osc-editorial-app .setting-toggle input:checked + .toggle-slider::before { background: var(--osc-ink); }

.osc-editorial-app .token-bar,
.osc-editorial-app .proj-mem-bar,
.osc-editorial-app .sidebar-user {
    border: 1px solid var(--osc-line);
    border-radius: 0;
    background: rgba(255,253,247,.42);
}
.osc-editorial-app .token-bar-track { height: 3px; border-radius: 0; background: #d7d1c6; }
.osc-editorial-app .token-bar-fill { border-radius: 0; background: var(--osc-signal); box-shadow: none; }
.osc-editorial-app .token-bar-bonus .token-bar-fill { background: var(--osc-acid); }
.osc-editorial-app .token-live-pulse { background: var(--osc-signal); box-shadow: none; }
.osc-editorial-app .sidebar-subscribe-btn,
.osc-editorial-app .sidebar .btn-primary { border-radius: 0; color: var(--osc-paper-bright); background: var(--osc-signal); border-color: var(--osc-signal); box-shadow: none; }

.osc-editorial-app .chat-main { position: relative; background: rgba(242,239,232,.84); }
.osc-editorial-app .chat-topbar {
    min-height: 58px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--osc-ink);
    background: rgba(242,239,232,.94);
    backdrop-filter: blur(14px);
}
.osc-editorial-app .chat-topbar::after {
    content: "LIVE";
    position: absolute;
    left: 50%;
    top: 50%;
    color: var(--osc-muted);
    font: 8px/1 var(--osc-mono);
    letter-spacing: .14em;
    transform: translate(-50%,-50%);
}
.osc-editorial-app .chat-topbar::before {
    content: "";
    position: absolute;
    left: calc(50% - 32px);
    top: calc(50% - 3px);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--osc-good);
}
.osc-editorial-app .chat-topbar-brand { color: var(--osc-ink); background: none; -webkit-text-fill-color: currentColor; }
.osc-editorial-app .chat-topbar-title { color: var(--osc-ink); font-weight: 650; }
.osc-editorial-app .chat-topbar-model:hover { color: var(--osc-paper-bright); border-color: var(--osc-ink); background: var(--osc-ink); }
.osc-editorial-app .topbar-btn,
.osc-editorial-app .topbar-tool-btn {
    border: 1px solid transparent;
    border-radius: 0;
    color: var(--osc-ink-soft);
    background: transparent;
}
.osc-editorial-app .topbar-btn:hover,
.osc-editorial-app .topbar-tool-btn:hover { color: var(--osc-ink); border-color: var(--osc-ink); background: transparent; }

.osc-editorial-app .chat-messages {
    background:
        linear-gradient(to right, transparent calc(50% - 481px), rgba(21,21,21,.07) calc(50% - 480px), transparent calc(50% - 479px)),
        linear-gradient(to right, transparent calc(50% + 479px), rgba(21,21,21,.07) calc(50% + 480px), transparent calc(50% + 481px));
}
.osc-editorial-app .chat-welcome {
    position: relative;
    align-items: flex-start;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(56px,9vh,110px) clamp(24px,5vw,64px) 42px;
    text-align: left;
}
.osc-editorial-app .chat-welcome::before {
    content: "01 / READY";
    width: 100%;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--osc-line);
    color: var(--osc-muted);
    font: 10px/1 var(--osc-mono);
    letter-spacing: .11em;
}
.osc-editorial-app .welcome-icon { display: none; }
.osc-editorial-app .chat-welcome h2 {
    max-width: 850px;
    margin: 30px 0 18px;
    color: var(--osc-ink);
    font-family: inherit;
    font-size: clamp(48px, 7vw, 96px);
    font-weight: 560;
    line-height: .92;
    letter-spacing: -.07em;
}
.osc-editorial-app .chat-welcome h2::after { content: "."; color: var(--osc-signal); }
.osc-editorial-app .chat-welcome > p {
    max-width: 610px;
    margin: 0 0 38px;
    color: var(--osc-ink-soft);
    font-size: clamp(16px,1.4vw,20px);
    line-height: 1.5;
}
.osc-editorial-app .welcome-accent { color: var(--osc-signal-dark); font-weight: 650; }
.osc-editorial-app .welcome-suggestions {
    max-width: none;
    width: 100%;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 0;
    border-top: 1px solid var(--osc-ink);
    border-left: 1px solid var(--osc-ink);
}
.osc-editorial-app .suggestion-chip {
    min-height: 118px;
    padding: 16px;
    border: 0;
    border-right: 1px solid var(--osc-ink);
    border-bottom: 1px solid var(--osc-ink);
    border-radius: 0;
    color: var(--osc-ink-soft);
    background: rgba(255,253,247,.52);
    box-shadow: none;
}
.osc-editorial-app .suggestion-chip::before { top: auto; right: 0; width: auto; height: 3px; background: var(--osc-signal); opacity: 0; }
.osc-editorial-app .suggestion-chip:hover { color: var(--osc-ink); border-color: var(--osc-ink); background: var(--osc-acid); box-shadow: none; transform: none; }
.osc-editorial-app .suggestion-chip:hover::before { width: auto; opacity: 1; }
.osc-editorial-app .chip-icon { width: 28px; height: 28px; border: 1px solid var(--osc-line); border-radius: 0; background: transparent; }
.osc-editorial-app .chip-icon svg { width: 15px; height: 15px; color: var(--osc-ink) !important; stroke: currentColor; }
.osc-editorial-app .chip-text { align-self: flex-end; font-size: 12px; font-weight: 600; }

.osc-editorial-app .message { box-sizing: border-box; max-width: 960px; padding: 10px 18px; gap: 14px; }
.osc-editorial-app .message-avatar { width: 28px; height: 28px; border-radius: 0; font-family: var(--osc-mono); font-size: 10px; }
.osc-editorial-app .message-avatar.msg-user-avatar { color: white; background: var(--osc-signal); }
.osc-editorial-app .message-avatar.msg-ai-avatar { color: var(--osc-paper-bright); border-color: var(--osc-ink); background: var(--osc-ink); }
.osc-editorial-app .message-user .message-bubble {
    max-width: 72%;
    padding: 11px 15px;
    border: 1px solid var(--osc-ink);
    border-radius: 0;
    color: var(--osc-paper-bright);
    background: var(--osc-ink);
    box-shadow: 4px 4px 0 var(--osc-signal);
}
.osc-editorial-app .message-ai .message-body {
    padding: 0 0 18px;
    border-bottom: 1px solid var(--osc-line);
}
.osc-editorial-app .message-content { color: var(--osc-ink); }
.osc-editorial-app .message-content a { color: var(--osc-signal-dark); text-decoration-thickness: 1px; }
.osc-editorial-app .message-content code:not(pre code) { color: var(--osc-signal-dark); border: 1px solid var(--osc-line); border-radius: 0; background: var(--osc-paper-deep); }
.osc-editorial-app .message-content pre { border: 1px solid var(--osc-ink); border-radius: 0; background: #171716; box-shadow: 6px 6px 0 var(--osc-line); }
.osc-editorial-app .message-content pre .code-header { border-radius: 0; border-bottom-color: var(--osc-line-dark); background: #222220; }
.osc-editorial-app .message-actions { opacity: 1; }
.osc-editorial-app .msg-action { border-radius: 0; color: var(--osc-muted); }
.osc-editorial-app .msg-action:hover { color: var(--osc-ink); border-color: var(--osc-line); background: var(--osc-paper-deep); }
.osc-editorial-app .message-tokens { color: var(--osc-muted); font-family: var(--osc-mono); }
.osc-editorial-app .notice-bubble,
.osc-editorial-app .agent-panel,
.osc-editorial-app .tool-call-card {
    border-radius: 0;
    border-color: var(--osc-line);
    background: rgba(255,253,247,.55);
    box-shadow: none;
}
body.osc-editorial-app.light-theme .message-user .message-bubble {
    color: var(--osc-ink);
    border-color: #d5d0c6;
    background: #eceae4;
    box-shadow: none;
}
.osc-editorial-app .agent-panel::before { border-radius: 0; background: var(--osc-signal); }

.osc-editorial-app .chat-input-area {
    padding: 12px 22px 16px;
    border-top: 1px solid var(--osc-ink);
    background: rgba(242,239,232,.97);
}
.osc-editorial-app .chat-input-area::before {
    content: "PROMPT / COMMAND";
    display: block;
    max-width: 960px;
    margin: 0 auto 7px;
    color: var(--osc-muted);
    font: 8px/1 var(--osc-mono);
    letter-spacing: .12em;
}
.osc-editorial-app .chat-input-wrapper {
    max-width: 960px;
    min-height: 56px;
    margin: 0 auto;
    padding: 7px 9px;
    border: 1px solid var(--osc-ink);
    border-radius: 0;
    background: var(--osc-paper-bright);
    box-shadow: 7px 7px 0 var(--osc-signal);
}
.osc-editorial-app .chat-input-wrapper:focus-within { border-color: var(--osc-ink); box-shadow: 7px 7px 0 var(--osc-acid); }
.osc-editorial-app #chat-input { color: var(--osc-ink); font-size: 14px; }
.osc-editorial-app #chat-input::placeholder { color: #8b867d; }
.osc-editorial-app .chat-input-wrapper button { border-radius: 0 !important; }
.osc-editorial-app .btn-send { color: var(--osc-paper-bright); background: var(--osc-ink); }
.osc-editorial-app .btn-send:hover { color: var(--osc-ink); background: var(--osc-acid); }
.osc-editorial-app .context-meter-ring { border-radius: 0; background: conic-gradient(var(--osc-signal) var(--context-used), #ddd7cc 0); }
.osc-editorial-app .context-meter-ring::before { border-radius: 0; background: var(--osc-paper-bright); }
.osc-editorial-app .chat-input-hint { color: var(--osc-muted); font-family: var(--osc-mono); font-size: 9px; }
.osc-editorial-app .guest-cta { border-radius: 0; border-color: var(--osc-ink); background: var(--osc-acid); }

/* Dropdowns, menus and every modal share the same material language. */
.osc-editorial-app .model-dropdown,
.osc-editorial-app .context-menu,
.osc-editorial-app .slash-cmd-menu,
.osc-editorial-app .lang-dropdown,
.osc-editorial-app .topbar-lang-menu {
    border: 1px solid var(--osc-ink);
    border-radius: 0;
    color: var(--osc-ink);
    background: var(--osc-paper-bright);
    box-shadow: 8px 8px 0 rgba(21,21,21,.16);
}
.osc-editorial-app .model-option { border-radius: 0; color: var(--osc-ink); }
.osc-editorial-app .model-option:hover { background: var(--osc-paper-deep); }
.osc-editorial-app .model-option.active { color: var(--osc-paper-bright); background: var(--osc-ink); }
.osc-editorial-app .model-option.model-option-new,
.osc-editorial-app .model-option.model-option-new:hover { background: var(--osc-acid); box-shadow: inset 3px 0 0 var(--osc-signal); }
.osc-editorial-app .model-option-icon { border-radius: 0; border-color: var(--osc-line); background: var(--osc-paper-deep); box-shadow: none; }
.osc-editorial-app .model-option.active .model-option-icon { border-color: var(--osc-paper-bright); background: var(--osc-paper-bright); }
.osc-editorial-app .model-option-cost { color: var(--osc-signal-dark); }

.osc-editorial-app .modal-overlay { background: rgba(21,21,21,.58); backdrop-filter: blur(3px); }
.osc-editorial-app .modal-content,
.osc-editorial-app .cost-warning-box,
.osc-editorial-app .fwin,
.osc-editorial-app .pretty-panel,
.osc-editorial-app .pp-panel,
.osc-editorial-app .mm-modal,
.osc-editorial-app .mm-shell {
    border: 1px solid var(--osc-ink);
    border-radius: 0;
    color: var(--osc-ink);
    background: var(--osc-paper);
    box-shadow: 12px 12px 0 var(--osc-signal);
}
.osc-editorial-app .modal-header,
.osc-editorial-app .pp-header,
.osc-editorial-app .mm-header {
    min-height: 58px;
    border-bottom: 1px solid var(--osc-ink);
    color: var(--osc-paper-bright);
    background: var(--osc-ink);
}
.osc-editorial-app .modal-header h3,
.osc-editorial-app .pp-header h3,
.osc-editorial-app .mm-header h3 { color: var(--osc-paper-bright) !important; font-weight: 600; letter-spacing: -.02em; }
.osc-editorial-app .modal-header h3 svg { stroke: var(--osc-acid) !important; }
.osc-editorial-app .modal-close,
.osc-editorial-app .pp-close,
.osc-editorial-app .mm-close { border-radius: 0; color: var(--osc-paper-bright); }
.osc-editorial-app .modal-close:hover,
.osc-editorial-app .pp-close:hover,
.osc-editorial-app .mm-close:hover { color: var(--osc-ink); background: var(--osc-acid); }
.osc-editorial-app .modal-section,
.osc-editorial-app .acc-section { border-color: var(--osc-line); border-radius: 0; background: rgba(255,253,247,.5); }
.osc-editorial-app .modal-section-title,
.osc-editorial-app .acc-label { color: var(--osc-muted); font-family: var(--osc-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.osc-editorial-app .modal-input,
.osc-editorial-app .modal-content input,
.osc-editorial-app .modal-content textarea,
.osc-editorial-app .modal-content select {
    border: 1px solid var(--osc-line) !important;
    border-radius: 0 !important;
    color: var(--osc-ink) !important;
    background: var(--osc-paper-bright) !important;
}
.osc-editorial-app .modal-content input:focus,
.osc-editorial-app .modal-content textarea:focus,
.osc-editorial-app .modal-content select:focus { border-color: var(--osc-ink) !important; box-shadow: 0 0 0 1px var(--osc-ink); }
.osc-editorial-app .btn { border-radius: 0; }
.osc-editorial-app .btn-primary { color: var(--osc-paper-bright); border-color: var(--osc-signal); background: var(--osc-signal); box-shadow: none; }
.osc-editorial-app .btn-primary:hover { color: var(--osc-ink); border-color: var(--osc-ink); background: var(--osc-acid); }
.osc-editorial-app .btn-ghost { color: var(--osc-ink); border-color: var(--osc-line); background: transparent; }
.osc-editorial-app .btn-ghost:hover { border-color: var(--osc-ink); background: var(--osc-paper-deep); }
.osc-editorial-app .sub-grid { gap: 0; border-top: 1px solid var(--osc-ink); border-left: 1px solid var(--osc-ink); }
.osc-editorial-app .sub-plan-card,
.osc-editorial-app .sub-card {
    border: 0;
    border-right: 1px solid var(--osc-ink);
    border-bottom: 1px solid var(--osc-ink);
    border-radius: 0;
    background: var(--osc-paper-bright);
    box-shadow: none;
}
.osc-editorial-app .sub-plan-card:hover,
.osc-editorial-app .sub-card:hover { border-color: var(--osc-ink); background: var(--osc-acid); transform: none; }
.osc-editorial-app .sub-plan-card.selected,
.osc-editorial-app .sub-card.selected { color: var(--osc-paper-bright); background: var(--osc-ink); box-shadow: inset 4px 0 0 var(--osc-signal); }
.osc-editorial-app .sub-period-segments { gap: 0; border: 1px solid var(--osc-ink); }
.osc-editorial-app .sub-period-seg { border: 0; border-right: 1px solid var(--osc-line); border-radius: 0; color: var(--osc-ink-soft); background: var(--osc-paper-bright); }
.osc-editorial-app .sub-period-seg:last-child { border-right: 0; }
.osc-editorial-app .sub-period-seg.sub-period-active { color: var(--osc-paper-bright); background: var(--osc-ink); }
.osc-editorial-app .gift-tab,
.osc-editorial-app .gift-sub-tier-btn { border-radius: 0; border-color: var(--osc-line); color: var(--osc-ink-soft); background: var(--osc-paper-bright); }
.osc-editorial-app .gift-tab.active,
.osc-editorial-app .gift-sub-tier-btn.active { color: var(--osc-paper-bright); border-color: var(--osc-ink); background: var(--osc-ink); }
.osc-editorial-app .tutorial-item { border-radius: 0; border-bottom-color: var(--osc-line); color: var(--osc-ink); background: transparent; }
.osc-editorial-app .tutorial-item:hover { background: var(--osc-acid); }
.osc-editorial-app .toast { border: 1px solid var(--osc-ink); border-radius: 0; color: var(--osc-ink); background: var(--osc-paper-bright); box-shadow: 6px 6px 0 var(--osc-ink); }
.osc-editorial-app .model-badge-new {
    border-radius: 0;
    color: var(--osc-paper-bright);
    background: var(--osc-signal);
    background-size: auto;
    box-shadow: none;
    animation: none;
}
.osc-editorial-app .mm-col-item.mm-col-item-new { border-color: var(--osc-signal); box-shadow: inset 3px 0 0 var(--osc-signal); }

.osc-editorial-app .welcome-overlay,
.osc-editorial-app .agreement-overlay,
.osc-editorial-app .servers-panel-overlay,
.osc-editorial-app .srv-wizard-overlay { background: rgba(21,21,21,.72); backdrop-filter: blur(3px); }
.osc-editorial-app .welcome-modal,
.osc-editorial-app .agreement-modal,
.osc-editorial-app .servers-panel,
.osc-editorial-app .srv-wizard {
    border: 1px solid var(--osc-ink);
    border-radius: 0;
    color: var(--osc-ink);
    background: var(--osc-paper);
    box-shadow: 10px 10px 0 var(--osc-signal);
}
.osc-editorial-app .welcome-title { color: var(--osc-ink); background: none; -webkit-text-fill-color: currentColor; font-size: 24px; letter-spacing: -.04em; }
.osc-editorial-app .welcome-title-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 8px; }
.osc-editorial-app .welcome-title-row .welcome-title { margin: 0; }
.osc-editorial-app .welcome-sub { color: var(--osc-muted); }
.osc-editorial-app .welcome-card {
    border: 1px solid var(--osc-line);
    border-radius: 0;
    color: var(--osc-ink);
    background: var(--osc-paper-bright);
}
.osc-editorial-app .welcome-card:hover { border-color: var(--osc-ink); background: var(--osc-paper-deep); transform: none; }
.osc-editorial-app .welcome-card.selected { border-color: var(--osc-ink); color: var(--osc-ink); background: var(--osc-acid); box-shadow: inset 4px 0 0 var(--osc-signal); }
.osc-editorial-app .welcome-card-title { color: var(--osc-ink); }
.osc-editorial-app .welcome-card-desc { color: var(--osc-muted); }
.osc-editorial-app .welcome-actions { border-top-color: var(--osc-line); }
.osc-editorial-app .welcome-btn { border-radius: 0; }
.osc-editorial-app .welcome-btn-primary { color: var(--osc-paper-bright); background: var(--osc-ink); }
.osc-editorial-app .welcome-btn-primary:not(:disabled):hover { color: var(--osc-ink); background: var(--osc-acid); }
.osc-editorial-app .welcome-btn-ghost,
.osc-editorial-app .welcome-btn-cancel { color: var(--osc-ink-soft); border: 1px solid var(--osc-line); background: transparent; }
.osc-editorial-app .agreement-title,
.osc-editorial-app .srv-panel-title { color: var(--osc-ink); }
.osc-editorial-app .agreement-text,
.osc-editorial-app .srv-panel-sub { color: var(--osc-muted); }
.osc-editorial-app .srv-btn,
.osc-editorial-app .srv-card,
.osc-editorial-app .srv-step-pane,
.osc-editorial-app .srv-input { border-radius: 0 !important; }

/* Auth is a product screen, not a floating neon card. */
.osc-editorial-app .auth-screen,
.osc-editorial-app .link-account-screen {
    color: var(--osc-ink);
    background:
        linear-gradient(to right, rgba(21,21,21,.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(21,21,21,.05) 1px, transparent 1px),
        var(--osc-paper);
    background-size: 48px 48px;
}
.osc-editorial-app .auth-container,
.osc-editorial-app .link-account-container { max-width: 460px; }
.osc-editorial-app .auth-logo { justify-content: flex-start; }
.osc-editorial-app .auth-logo img { border-radius: 0 !important; filter: grayscale(1) contrast(1.25); }
.osc-editorial-app .auth-logo h1 { color: var(--osc-ink); font-family: inherit; letter-spacing: -.05em; }
.osc-editorial-app .auth-logo .accent { color: var(--osc-signal); }
.osc-editorial-app .auth-box,
.osc-editorial-app .link-account-box {
    /* ОДНА карточка = .auth-container. Внутренний блок без своей рамки/тени —
       иначе «блок в блоке». Стиль как у OmniSolver Speech: единая чистая карточка. */
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
}
.osc-editorial-app .auth-choice-kicker { color: var(--osc-signal); font-family: var(--osc-mono); letter-spacing: .1em; text-transform: uppercase; }
.osc-editorial-app .auth-choice-head h2 { color: var(--osc-ink); letter-spacing: -.04em; }
.osc-editorial-app .auth-choice-head p,
.osc-editorial-app .auth-subtitle { color: var(--osc-muted); }
.osc-editorial-app .input-group label { color: var(--osc-ink-soft); font-family: var(--osc-mono); font-size: 10px; text-transform: uppercase; }
.osc-editorial-app .input-group input {
    border: 1px solid var(--osc-line);
    border-radius: 12px;
    color: var(--osc-ink);
    background: var(--osc-paper);
}
.osc-editorial-app .input-group input:focus { border-color: var(--osc-signal); box-shadow: 0 0 0 3px rgba(240, 90, 50, 0.18); }
.osc-editorial-app .auth-btn { border-radius: 999px; }
/* «Войти» = бренд-оранжевая заливка (как фиолетовая у Speech), не белый блок */
.osc-editorial-app .auth-btn-primary { color: #fff; border-color: var(--osc-signal); background: var(--osc-signal); }
.osc-editorial-app .auth-btn-primary:hover { color: #fff; background: #d94a25; border-color: #d94a25; }
.osc-editorial-app .auth-btn-ghost { color: var(--osc-ink); border-color: var(--osc-line); background: transparent; }
.osc-editorial-app .auth-btn-tg-oauth { border-color: transparent; border-radius: 999px; box-shadow: none; }
.osc-editorial-app .auth-divider::before,
.osc-editorial-app .auth-divider::after { background: var(--osc-line); }
.osc-editorial-app .auth-divider span { color: var(--osc-muted); background: var(--osc-paper-bright); }
.osc-editorial-app .auth-footer a { color: var(--osc-ink-soft); }

/* ================================================================
   Subscription page
   ================================================================ */
body.osc-editorial-sub {
    --bg: var(--osc-paper);
    --bg-card: var(--osc-paper-bright);
    --bg-card-hover: var(--osc-paper-deep);
    --bg-section-dark: #171716;
    --border: var(--osc-line);
    --border-light: var(--osc-ink);
    --text: var(--osc-ink);
    --text-secondary: var(--osc-ink-soft);
    --text-muted: var(--osc-muted);
    --primary: var(--osc-signal);
    --primary-light: var(--osc-signal);
    --accent: var(--osc-signal);
    --gradient: linear-gradient(135deg,var(--osc-signal),var(--osc-signal));
    margin: 0;
    color: var(--osc-ink);
    background: var(--osc-paper);
    font-family: "Inter", Arial, sans-serif;
}
.osc-editorial-sub .bg-grid,
.osc-editorial-sub .bg-glow { display: none; }
.osc-editorial-sub .container { width: min(100% - 68px, 1320px); max-width: 1320px; }
.osc-editorial-sub .nav {
    min-height: 72px;
    border-bottom: 1px solid var(--osc-line);
    color: var(--osc-ink);
    background: rgba(242,239,232,.94);
    backdrop-filter: blur(14px);
}
.osc-editorial-sub .nav-logo-img { border-radius: 0; filter: grayscale(1) contrast(1.25); }
.osc-editorial-sub .nav-logo-text { color: var(--osc-ink); letter-spacing: -.045em; }
.osc-editorial-sub .nav-logo-accent { color: var(--osc-signal); -webkit-text-fill-color: currentColor; background: none; }
.osc-editorial-sub .nav-links { gap: 28px; }
.osc-editorial-sub .nav-links a { color: var(--osc-ink-soft); font-size: 13px; }
.osc-editorial-sub .nav-links a:hover,
.osc-editorial-sub .nav-links a.is-current { color: var(--osc-ink); }
.osc-editorial-sub .nav-links a.is-current::after { background: var(--osc-signal); }
.osc-editorial-sub .nav .btn { border-radius: 0; color: var(--osc-paper-bright); background: var(--osc-ink); border-color: var(--osc-ink); }
.osc-editorial-sub .nav .btn:hover { color: var(--osc-ink); background: var(--osc-acid); }
.osc-editorial-sub .nav-burger { border-radius: 0; }

.osc-editorial-sub .sub-main { padding-top: 72px; }
.osc-editorial-sub .section { padding: 108px 0; }
.osc-editorial-sub .sub-hero-section { position: relative; padding-top: 104px; background: transparent; }
.osc-editorial-sub .sub-hero-section::before {
    content: "05 / ACCESS";
    display: block;
    width: min(100% - 68px,1320px);
    margin: 0 auto 38px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--osc-line);
    color: var(--osc-muted);
    font: 10px/1 var(--osc-mono);
    letter-spacing: .11em;
}
.osc-editorial-sub .section-header { max-width: 980px; margin-right: auto; margin-left: 0; text-align: left; }
.osc-editorial-sub .section-badge {
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--osc-signal-dark);
    background: transparent;
    font: 10px/1 var(--osc-mono);
    letter-spacing: .1em;
    text-transform: uppercase;
    outline: 0;
    box-shadow: none;
    -webkit-text-fill-color: currentColor;
}
.osc-editorial-sub .section-title {
    margin-top: 24px;
    color: var(--osc-ink);
    font-size: clamp(58px,8vw,118px);
    font-weight: 560;
    line-height: .9;
    letter-spacing: -.075em;
}
.osc-editorial-sub .section-subtitle { max-width: 700px; margin: 26px 0 0; color: var(--osc-ink-soft); font-size: 19px; line-height: 1.52; }

.osc-editorial-sub .period-slider-block {
    max-width: none;
    margin: 58px 0 46px;
    padding: 22px 26px 34px;
    border: 1px solid var(--osc-ink);
    border-radius: 0;
    background: var(--osc-paper-bright);
    box-shadow: 8px 8px 0 var(--osc-signal);
}
.osc-editorial-sub .period-display-label { color: var(--osc-ink); font-weight: 650; }
.osc-editorial-sub .period-kicker { color: var(--osc-muted); font-family: var(--osc-mono); }
.osc-editorial-sub .period-input-control { border-color: var(--osc-ink); background: var(--osc-paper); }
.osc-editorial-sub .period-input-control label { border-color: var(--osc-ink); }
.osc-editorial-sub .period-input-control button,
.osc-editorial-sub .period-input-control input { color: var(--osc-ink); }
.osc-editorial-sub .period-slider::-webkit-slider-runnable-track { border-radius: 0; background: var(--osc-line); }
.osc-editorial-sub .period-slider::-webkit-slider-thumb { border: 2px solid var(--osc-ink); border-radius: 0; background: var(--osc-acid); box-shadow: none; }
.osc-editorial-sub .period-stop { border-color: var(--osc-line); color: var(--osc-muted); font-family: var(--osc-mono); }
.osc-editorial-sub .period-stop.is-active { border-color: var(--osc-ink); background: var(--osc-acid); color: var(--osc-ink); }

.osc-editorial-sub .pricing-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 0;
    border-top: 1px solid var(--osc-ink);
    border-left: 1px solid var(--osc-ink);
}
.osc-editorial-sub .pricing-card,
.osc-editorial-sub .pricing-card-popular,
.osc-editorial-sub .pricing-card-ultra {
    min-height: 540px;
    margin: 0;
    padding: 25px 22px;
    border: 0;
    border-right: 1px solid var(--osc-ink);
    border-bottom: 1px solid var(--osc-ink);
    border-radius: 0;
    color: var(--osc-ink);
    background: rgba(255,253,247,.55);
    box-shadow: none;
    transform: none;
}
.osc-editorial-sub .pricing-card:hover,
.osc-editorial-sub .pricing-card-popular:hover,
.osc-editorial-sub .pricing-card-ultra:hover { border-color: var(--osc-ink); background: var(--osc-paper-bright); transform: none; box-shadow: inset 0 -5px 0 var(--osc-signal); }
.osc-editorial-sub .pricing-card-popular { color: var(--osc-paper-bright); background: var(--osc-ink); }
.osc-editorial-sub .pricing-card-popular:hover { color: var(--osc-ink); background: var(--osc-acid); }
.osc-editorial-sub .pricing-card-popular::before,
.osc-editorial-sub .pricing-card-ultra::before { display: none; }
.osc-editorial-sub .pricing-popular-badge,
.osc-editorial-sub .pricing-badge,
.osc-editorial-sub [class*="badge"] {
    border: 1px solid currentColor;
    border-radius: 0;
    box-shadow: none;
    font-family: var(--osc-mono);
    letter-spacing: .06em;
    text-transform: uppercase;
}
.osc-editorial-sub .pricing-card h3 { font-size: 28px; letter-spacing: -.05em; }
.osc-editorial-sub .pricing-price { color: inherit; font-size: 46px; letter-spacing: -.06em; }
.osc-editorial-sub .pricing-price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 7px; line-height: 1; }
.osc-editorial-sub .pricing-per { flex: 0 0 auto; margin: 0; color: inherit; font-family: var(--osc-mono); font-size: 9px; font-weight: 500; letter-spacing: 0; opacity: .68; white-space: nowrap; }
.osc-editorial-sub .pricing-period { display: block; min-height: 18px; margin-top: 8px; color: var(--osc-muted); }
.osc-editorial-sub .pricing-card-popular .pricing-period,
.osc-editorial-sub .pricing-card-popular .pricing-tokens-line,
.osc-editorial-sub .pricing-card-popular .pricing-tokens-line b { color: #bcb8b0; }
.osc-editorial-sub .pricing-features li { border-bottom-color: rgba(119,115,107,.35); color: inherit; }
.osc-editorial-sub .pricing-card .btn { margin-top: auto; border-radius: 0; }
.osc-editorial-sub .pricing-card .btn-primary,
.osc-editorial-sub .pricing-card .btn-outline { color: var(--osc-paper-bright); border-color: var(--osc-ink); background: var(--osc-ink); }
.osc-editorial-sub .pricing-card-popular .btn { color: var(--osc-ink); border-color: var(--osc-paper-bright); background: var(--osc-acid); }
.osc-editorial-sub .pricing-card .btn:hover { color: var(--osc-ink); border-color: var(--osc-ink); background: var(--osc-acid); }
.osc-editorial-sub .pricing-quote { border-radius: 0; border-color: var(--osc-line); background: var(--osc-paper-deep); }
.osc-editorial-sub .pricing-flagship-callout { border: 1px solid var(--osc-ink); border-radius: 0; color: var(--osc-ink); background: var(--osc-acid); box-shadow: none; }
.osc-editorial-sub .pricing-flagship-callout b,
.osc-editorial-sub .pricing-flagship-callout small { color: var(--osc-ink); }
.osc-editorial-sub .pricing-flagship-callout em { border-radius: 0; color: var(--osc-paper-bright); background: var(--osc-signal); }
.osc-editorial-sub .pricing-flagship-icon { border-radius: 0; }
.osc-editorial-sub .sub-model-new { border-radius: 0; color: var(--osc-paper-bright); background: var(--osc-signal); box-shadow: none; }
.osc-editorial-sub .sub-model-flag,
.osc-editorial-sub .sub-model-tier,
.osc-editorial-sub .sub-model-cost { border-radius: 0; }

.osc-editorial-sub .trust-block { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; margin-top: 58px; border-top: 1px solid var(--osc-line); border-left: 1px solid var(--osc-line); }
.osc-editorial-sub .trust-item { min-height: 155px; padding: 22px; border: 0; border-right: 1px solid var(--osc-line); border-bottom: 1px solid var(--osc-line); border-radius: 0; background: transparent; }
.osc-editorial-sub .trust-item:hover { border-color: var(--osc-line); background: var(--osc-paper-bright); transform: none; }
.osc-editorial-sub .trust-ico { width: 38px; height: 38px; border: 1px solid var(--osc-ink); border-radius: 0; color: var(--osc-ink); background: transparent; }
.osc-editorial-sub .trust-title { color: var(--osc-ink); }
.osc-editorial-sub .trust-desc { color: var(--osc-muted); }

.osc-editorial-sub .section-dark { color: var(--osc-paper-bright); background: #171716; }
.osc-editorial-sub .section-dark .section-title { color: var(--osc-paper-bright); }
.osc-editorial-sub .section-dark .section-subtitle { color: #9d9991; }
.osc-editorial-sub .section-dark .section-badge { color: var(--osc-acid); }
.osc-editorial-sub .models-filters { gap: 0; border: 1px solid var(--osc-line-dark); }
.osc-editorial-sub .models-filter { border: 0; border-right: 1px solid var(--osc-line-dark); border-radius: 0; color: #9d9991; background: transparent; }
.osc-editorial-sub .models-filter:last-child { border-right: 0; }
.osc-editorial-sub .models-filter:hover { color: white; border-color: var(--osc-line-dark); }
.osc-editorial-sub .models-filter.is-active { color: var(--osc-ink); background: var(--osc-acid); }
.osc-editorial-sub .models-grid-sub { gap: 0; border-top: 1px solid var(--osc-line-dark); border-left: 1px solid var(--osc-line-dark); }
.osc-editorial-sub .mg-card {
    min-height: 180px;
    border: 0;
    border-right: 1px solid var(--osc-line-dark);
    border-bottom: 1px solid var(--osc-line-dark);
    border-radius: 0;
    color: var(--osc-paper-bright);
    background: #1d1d1b;
    box-shadow: none;
}
.osc-editorial-sub .mg-card:hover { border-color: var(--osc-line-dark); background: #252522; transform: none; box-shadow: inset 0 -4px 0 var(--osc-signal); }
.osc-editorial-sub .mg-logo,
.osc-editorial-sub .mg-icon { border-radius: 0; }
.osc-editorial-sub .mg-tag { border-radius: 0; color: var(--osc-acid); border-color: #54524d; background: transparent; }
.osc-editorial-sub .sub-model-card,
.osc-editorial-sub .sub-model-card.sub-model-card-new {
    min-height: 190px;
    border: 0;
    border-right: 1px solid var(--osc-line-dark);
    border-bottom: 1px solid var(--osc-line-dark);
    border-radius: 0;
    color: var(--osc-paper-bright);
    background: #1d1d1b;
    box-shadow: none;
}
.osc-editorial-sub .sub-model-card:hover,
.osc-editorial-sub .sub-model-card.sub-model-card-new:hover { border-color: var(--osc-line-dark); background: #252522; box-shadow: inset 0 -4px 0 var(--osc-signal); transform: none; }
.osc-editorial-sub .sub-model-name { color: var(--osc-paper-bright); }
.osc-editorial-sub .sub-model-desc { color: #99968f; }
.osc-editorial-sub .sub-model-cost { color: var(--osc-acid); border-color: #514f4a; background: transparent; }
.osc-editorial-sub .sub-model-tier { color: #bcb8b0 !important; border-color: #514f4a !important; background: transparent !important; }
.osc-editorial-sub .sub-model-flag { color: #8f8c85; border-color: #44423e; background: transparent; }
.osc-editorial-sub .sub-model-flag-on { color: var(--osc-acid); }

.osc-editorial-sub .container-sm { width: min(100% - 68px,1000px); max-width: 1000px; }
.osc-editorial-sub .faq-list { border-top: 1px solid var(--osc-ink); }
.osc-editorial-sub .faq-item { margin: 0; border: 0; border-bottom: 1px solid var(--osc-line); border-radius: 0; background: transparent; }
.osc-editorial-sub .faq-question { padding: 24px 0; color: var(--osc-ink); font-size: 18px; }
.osc-editorial-sub .faq-question:hover { color: var(--osc-signal-dark); }
.osc-editorial-sub .faq-answer { color: var(--osc-ink-soft); }
.osc-editorial-sub .faq-item.active .faq-answer { padding: 0 0 25px; }
.osc-editorial-sub .faq-chevron { color: var(--osc-signal); }

.osc-editorial-sub .footer { border-top: 1px solid var(--osc-ink); color: var(--osc-paper-bright); background: var(--osc-ink); }
.osc-editorial-sub .footer-logo-text { color: var(--osc-paper-bright); }
.osc-editorial-sub .footer-desc,
.osc-editorial-sub .footer a { color: #a9a69e; }
.osc-editorial-sub .footer a:hover { color: var(--osc-acid); }
.osc-editorial-sub .footer-col-title { color: var(--osc-paper-bright); font-family: var(--osc-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 1100px) {
    .osc-editorial-app .welcome-suggestions { grid-template-columns: repeat(2,1fr); }
    .osc-editorial-sub .pricing-grid { grid-template-columns: repeat(2,1fr); }
    .osc-editorial-sub .models-grid-sub { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
    body.osc-editorial-app::before { display: none; }
    .osc-editorial-app .sidebar { border-right: 1px solid var(--osc-ink); box-shadow: 12px 0 0 rgba(240,90,50,.45); }
    .osc-editorial-app .chat-topbar { min-height: 54px; padding: 8px 12px; }
    .osc-editorial-app .chat-topbar::before,
    .osc-editorial-app .chat-topbar::after { display: none; }
    .osc-editorial-app .chat-welcome { padding: 40px 16px 28px; }
    .osc-editorial-app .chat-welcome h2 { margin-top: 24px; font-size: clamp(43px,15vw,72px); }
    .osc-editorial-app .chat-welcome > p { font-size: 15px; }
    .osc-editorial-app .welcome-suggestions { grid-template-columns: 1fr 1fr; }
    .osc-editorial-app .suggestion-chip { min-height: 100px; padding: 13px; }
    .osc-editorial-app .message { padding-right: 12px; padding-left: 12px; }
    .osc-editorial-app .message-user .message-bubble { max-width: 86%; }
    .osc-editorial-app .chat-input-area { padding: 9px 10px 14px; }
    .osc-editorial-app .chat-input-area::before { display: none; }
    .osc-editorial-app .chat-input-wrapper { min-height: 52px; box-shadow: 4px 4px 0 var(--osc-signal); }
    .osc-editorial-app .chat-input-wrapper:focus-within { box-shadow: 4px 4px 0 var(--osc-acid); }
    .osc-editorial-app .modal-content,
    .osc-editorial-app .pp-panel,
    .osc-editorial-app .mm-modal,
    .osc-editorial-app .mm-shell { box-shadow: 6px 6px 0 var(--osc-signal); }
    .osc-editorial-app .sub-grid { grid-template-columns: 1fr 1fr; }

    .osc-editorial-sub .container,
    .osc-editorial-sub .container-sm { width: min(100% - 32px,1320px); }
    .osc-editorial-sub .nav { min-height: 62px; }
    .osc-editorial-sub .nav-inner > .btn { display: none; }
    .osc-editorial-sub .sub-main { padding-top: 62px; }
    .osc-editorial-sub .sub-hero-section::before { width: min(100% - 32px,1320px); }
    .osc-editorial-sub .section { padding: 76px 0; }
    .osc-editorial-sub .section-title { font-size: clamp(51px,17vw,82px); }
    .osc-editorial-sub .section-subtitle { font-size: 16px; }
    .osc-editorial-sub .period-slider-block { margin-top: 40px; padding-right: 18px; padding-left: 18px; box-shadow: 5px 5px 0 var(--osc-signal); }
    .osc-editorial-sub .pricing-grid { grid-template-columns: 1fr; }
    .osc-editorial-sub .pricing-card,
    .osc-editorial-sub .pricing-card-popular,
    .osc-editorial-sub .pricing-card-ultra { min-height: 0; }
    .osc-editorial-sub .trust-block { grid-template-columns: 1fr; }
    .osc-editorial-sub .models-filters { overflow-x: auto; justify-content: flex-start; }
    .osc-editorial-sub .models-filter { white-space: nowrap; }
    .osc-editorial-sub .models-grid-sub { grid-template-columns: 1fr; }
    .osc-editorial-sub .osc-lang-switch { margin-left: auto; }
}

@media (max-width: 440px) {
    .osc-editorial-app .welcome-suggestions { grid-template-columns: 1fr; }
    .osc-editorial-app .suggestion-chip { min-height: 76px; }
    .osc-editorial-app .sub-grid { grid-template-columns: 1fr; }
    .osc-editorial-sub .nav .osc-lang-switch { min-height: 30px; }
    .osc-editorial-sub .nav .osc-lang-switch button { min-width: 33px; }
    .osc-editorial-app .welcome-title-row { align-items: flex-start; flex-wrap: wrap; }
    .osc-editorial-app .welcome-title-row .welcome-title { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .osc-editorial-app *,
    .osc-editorial-sub * { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ================================================================
   2026-07-10 — one binary theme system, compact controls and live agent trace
   ================================================================ */
.osc-editorial-app #btn-theme,
.osc-editorial-app #osc-theme-modal,
.osc-editorial-app .theme-picker,
.osc-editorial-app .adv-theme-picker { display: none !important; }

.osc-editorial-app .topbar-lang.osc-lang-switch {
    position: static;
    width: auto;
    min-width: 0;
    min-height: 30px;
    gap: 0;
    padding: 2px;
    border-color: var(--osc-line);
    background: transparent;
}
.osc-editorial-app .topbar-lang.osc-lang-switch button {
    display: inline-grid !important;
    place-items: center;
    min-width: 34px;
    height: 24px;
    padding: 0 6px;
}

.osc-editorial-app .setting-toggle .toggle-slider {
    width: 40px;
    height: 23px;
    border-radius: 999px !important;
}
.osc-editorial-app .setting-toggle .toggle-slider { background: transparent !important; border-color: var(--osc-line-dark) !important; }
.osc-editorial-app .setting-toggle input:checked + .toggle-slider { background: var(--osc-acid) !important; border-color: var(--osc-ink) !important; }
body.osc-editorial-app.light-theme .setting-toggle input:checked + .toggle-slider { background: var(--osc-acid) !important; border-color: var(--osc-ink) !important; }
body.osc-editorial-app.light-theme .setting-toggle input:checked + .toggle-slider::before,
body.osc-editorial-app.light-theme .setting-toggle input:checked + .toggle-slider::after { background: var(--osc-ink) !important; }
.osc-editorial-app .setting-toggle .toggle-slider::before,
.osc-editorial-app .setting-toggle .toggle-slider::after {
    width: 17px;
    height: 17px;
    border-radius: 50% !important;
}

/* Dark is a real palette, not the old Cosmos overlay. */
body.osc-editorial-app:not(.light-theme) {
    --osc-paper: #171716;
    --osc-paper-deep: #1d1c1a;
    --osc-paper-bright: #24221f;
    --osc-ink: #f2efe8;
    --osc-ink-soft: #c2beb4;
    --osc-muted: #9b968c;
    --osc-line: #403d37;
    --osc-line-dark: #d0cbc0;
    --bg: #171716;
    --bg-card: #211f1d;
    --bg-hover: #2c2a27;
    --bg-input: #1c1b19;
    --bg-secondary: #1d1c1a;
    --border: #403d37;
    --border-light: #57534b;
    --text: #f2efe8;
    --text-secondary: #c2beb4;
    --text-muted: #8f8b82;
    --code-bg: #111110;
    --code-border: #3b3833;
    color: #f2efe8;
    background-color: #171716;
    background-image:
        linear-gradient(to right, rgba(242,239,232,.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(242,239,232,.025) 1px, transparent 1px);
}
body.osc-editorial-app:not(.light-theme)::before { color: rgba(242,239,232,.22); }
body.osc-editorial-app:not(.light-theme) .osc-boot-overlay,
body.osc-editorial-app:not(.light-theme) .chat-screen,
body.osc-editorial-app:not(.light-theme) .chat-main { background: #171716; }
body.osc-editorial-app:not(.light-theme) .sidebar {
    color: #f2efe8;
    border-color: #4a463f;
    background: #1d1c1a;
}
body.osc-editorial-app:not(.light-theme) .sidebar-header,
body.osc-editorial-app:not(.light-theme) .sidebar-bottom,
body.osc-editorial-app:not(.light-theme) .sidebar-settings,
body.osc-editorial-app:not(.light-theme) .codex-environment-head { border-color: #403d37; }
body.osc-editorial-app:not(.light-theme) .sidebar-logo,
body.osc-editorial-app:not(.light-theme) .codex-environment-head strong,
body.osc-editorial-app:not(.light-theme) .chat-item.active,
body.osc-editorial-app:not(.light-theme) .project-item.active,
body.osc-editorial-app:not(.light-theme) .sidebar-user-name,
body.osc-editorial-app:not(.light-theme) .setting-toggle { color: #f2efe8; }
body.osc-editorial-app:not(.light-theme) .sidebar-logo::after,
body.osc-editorial-app:not(.light-theme) .sidebar-section-title,
body.osc-editorial-app:not(.light-theme) .codex-environment-kicker,
body.osc-editorial-app:not(.light-theme) .model-selector-label,
body.osc-editorial-app:not(.light-theme) .token-bar-label,
body.osc-editorial-app:not(.light-theme) .sidebar-user-sub { color: #918c82; }
body.osc-editorial-app:not(.light-theme) .chat-item:hover,
body.osc-editorial-app:not(.light-theme) .project-item:hover,
body.osc-editorial-app:not(.light-theme) .setting-toggle:hover { background: #292724; }
body.osc-editorial-app:not(.light-theme) .chat-item.active,
body.osc-editorial-app:not(.light-theme) .project-item.active { background: #302e2a; }
body.osc-editorial-app:not(.light-theme) #chat-search,
body.osc-editorial-app:not(.light-theme) .model-selector-btn,
body.osc-editorial-app:not(.light-theme) .token-bar,
body.osc-editorial-app:not(.light-theme) .proj-mem-bar,
body.osc-editorial-app:not(.light-theme) .sidebar-user {
    color: #f2efe8 !important;
    border-color: #403d37 !important;
    background: #211f1d !important;
}
body.osc-editorial-app:not(.light-theme) .model-selector-cost { color: var(--osc-acid); }
body.osc-editorial-app:not(.light-theme) .toggle-slider { border-color: #777168; background: #292724; }
body.osc-editorial-app:not(.light-theme) .setting-toggle .toggle-slider { border-color: #5b564d !important; background: #292724 !important; }
body.osc-editorial-app:not(.light-theme) .setting-toggle input:checked + .toggle-slider { border-color: var(--osc-acid) !important; background: var(--osc-acid) !important; }
body.osc-editorial-app:not(.light-theme) .toggle-slider::before,
body.osc-editorial-app:not(.light-theme) .toggle-slider::after { background: #f2efe8; }
body.osc-editorial-app:not(.light-theme) .setting-toggle input:checked + .toggle-slider { border-color: var(--osc-acid); background: var(--osc-acid); }
body.osc-editorial-app:not(.light-theme) .setting-toggle input:checked + .toggle-slider::before,
body.osc-editorial-app:not(.light-theme) .setting-toggle input:checked + .toggle-slider::after { background: #151515; }

body.osc-editorial-app:not(.light-theme) .chat-topbar {
    color: #f2efe8;
    border-color: #4a463f;
    background: rgba(23,23,22,.96);
}
body.osc-editorial-app:not(.light-theme) .chat-topbar-brand,
body.osc-editorial-app:not(.light-theme) .chat-topbar-title,
body.osc-editorial-app:not(.light-theme) .topbar-btn,
body.osc-editorial-app:not(.light-theme) .topbar-tool-btn { color: #f2efe8; }
body.osc-editorial-app:not(.light-theme) .chat-topbar-model { color: #c2beb4; border-color: #4a463f; }
body.osc-editorial-app:not(.light-theme) .topbar-lang.osc-lang-switch { border-color: #4a463f; }
body.osc-editorial-app:not(.light-theme) .topbar-lang.osc-lang-switch button { color: #918c82; }
body.osc-editorial-app:not(.light-theme) .topbar-lang.osc-lang-switch button.is-active { color: #151515; background: var(--osc-acid); }

body.osc-editorial-app:not(.light-theme) .chat-welcome,
body.osc-editorial-app:not(.light-theme) .chat-welcome h2,
body.osc-editorial-app:not(.light-theme) .welcome-title,
body.osc-editorial-app:not(.light-theme) .message,
body.osc-editorial-app:not(.light-theme) .message-body,
body.osc-editorial-app:not(.light-theme) .message-content,
body.osc-editorial-app:not(.light-theme) .answer-content { color: #f2efe8; }
body.osc-editorial-app:not(.light-theme) .chat-welcome > p,
body.osc-editorial-app:not(.light-theme) .welcome-subtitle,
body.osc-editorial-app:not(.light-theme) .message-meta { color: #a7a299; }
body.osc-editorial-app:not(.light-theme) .suggestion-chip {
    color: #f2efe8;
    border-color: #4a463f;
    background: #211f1d;
}
body.osc-editorial-app:not(.light-theme) .suggestion-chip:hover { color: #151515; background: var(--osc-acid); }
body.osc-editorial-app .agent-pill {
    color: var(--text-secondary);
    border-color: var(--border);
    background: transparent;
    box-shadow: none;
}
body.osc-editorial-app .agent-pill .agent-pill-glow { display: none; }
body.osc-editorial-app .agent-pill:hover { color: var(--text); border-color: var(--text); background: var(--bg-hover); box-shadow: none; }
body.osc-editorial-app .agent-pill.agent-pill-active { color: #151515; border-color: var(--osc-ink); background: var(--osc-acid); box-shadow: 4px 4px 0 var(--osc-signal); }
body.osc-editorial-app .agent-pill.agent-pill-active .agent-pill-sub,
body.osc-editorial-app .agent-pill.agent-pill-active .agent-pill-name { color: #151515; }
body.osc-editorial-app .agent-pill .agent-pill-ico { color: currentColor; border-color: currentColor; background: transparent; }
body.osc-editorial-app:not(.light-theme) .message-ai { border-color: #403d37; }
body.osc-editorial-app:not(.light-theme) .message-user .message-bubble { color: #151515; border-color: var(--osc-acid); background: var(--osc-acid); }

body.osc-editorial-app:not(.light-theme) .chat-input-area { border-color: #403d37; background: rgba(23,23,22,.97); }
body.osc-editorial-app:not(.light-theme) .chat-input-wrapper {
    color: #f2efe8;
    border-color: #5b564d;
    background: #211f1d;
    box-shadow: 7px 7px 0 var(--osc-signal);
}
body.osc-editorial-app:not(.light-theme) #chat-input { color: #f2efe8; }
body.osc-editorial-app:not(.light-theme) #chat-input::placeholder { color: #817d74; }
body.osc-editorial-app:not(.light-theme) .context-meter-ring::before { background: #211f1d; }

body.osc-editorial-app:not(.light-theme) .model-dropdown,
body.osc-editorial-app:not(.light-theme) .context-menu,
body.osc-editorial-app:not(.light-theme) .slash-cmd-menu,
body.osc-editorial-app:not(.light-theme) .lang-dropdown {
    color: #f2efe8;
    border-color: #5b564d;
    background: #211f1d;
    box-shadow: 8px 8px 0 rgba(0,0,0,.38);
}
body.osc-editorial-app:not(.light-theme) .model-option { color: #f2efe8; }
body.osc-editorial-app:not(.light-theme) .model-option:hover { background: #2c2a27; }
body.osc-editorial-app:not(.light-theme) .model-option.active { color: #151515; background: var(--osc-acid); }
body.osc-editorial-app:not(.light-theme) .osc-lang-switch { border-color: #4a463f; background: #211f1d; }
body.osc-editorial-app:not(.light-theme) .osc-boot-card {
    color: #f2efe8;
    border-color: #5b564d;
    background: #1d1c1a;
}
body.osc-editorial-app:not(.light-theme) .osc-boot-title { color: #f2efe8; }
body.osc-editorial-app:not(.light-theme) .btn-new-chat,
body.osc-editorial-app:not(.light-theme) .btn-send {
    color: #151515;
    border-color: var(--osc-acid);
    background: var(--osc-acid);
}
body.osc-editorial-app:not(.light-theme) .guest-cta,
body.osc-editorial-app:not(.light-theme) .guest-cta * { color: #151515; }
body.osc-editorial-app:not(.light-theme) .chat-topbar-model:hover,
body.osc-editorial-app:not(.light-theme) .btn-new-chat:hover,
body.osc-editorial-app:not(.light-theme) .btn-send:hover { color: #151515; border-color: var(--osc-acid); background: var(--osc-acid); }
body.osc-editorial-app:not(.light-theme) .mm-header { color: #f2efe8; background: #1d1c1a; }
body.osc-editorial-app:not(.light-theme) .mm-header h3,
body.osc-editorial-app:not(.light-theme) .mm-close { color: #f2efe8 !important; }
body.osc-editorial-app:not(.light-theme) .tutorial-item:hover,
body.osc-editorial-app:not(.light-theme) .sub-card:hover,
body.osc-editorial-app:not(.light-theme) .welcome-card.selected,
body.osc-editorial-app:not(.light-theme) .welcome-btn-primary:not(:disabled):hover,
body.osc-editorial-app:not(.light-theme) .auth-btn-primary:hover { color: #151515; }

body.osc-editorial-app:not(.light-theme) .modal-content,
body.osc-editorial-app:not(.light-theme) .cost-warning-box,
body.osc-editorial-app:not(.light-theme) .fwin,
body.osc-editorial-app:not(.light-theme) .pretty-panel,
body.osc-editorial-app:not(.light-theme) .pp-panel,
body.osc-editorial-app:not(.light-theme) .mm-modal,
body.osc-editorial-app:not(.light-theme) .mm-shell {
    color: #f2efe8;
    border-color: #5b564d;
    background: #1d1c1a;
}
body.osc-editorial-app:not(.light-theme) .modal-section,
body.osc-editorial-app:not(.light-theme) .acc-section { border-color: #403d37; background: #24221f; }
body.osc-editorial-app:not(.light-theme) .modal-content input,
body.osc-editorial-app:not(.light-theme) .modal-content textarea,
body.osc-editorial-app:not(.light-theme) .modal-content select,
body.osc-editorial-app:not(.light-theme) .modal-input {
    color: #f2efe8 !important;
    border-color: #4a463f !important;
    background: #171716 !important;
}
body.osc-editorial-app:not(.light-theme) .btn-ghost { color: #f2efe8; border-color: #4a463f; }
body.osc-editorial-app:not(.light-theme) .btn-ghost:hover { background: #2c2a27; }

.osc-editorial-app #token-reset-section { padding: 14px; border: 1px solid var(--border); background: var(--bg-card); }
.osc-editorial-app #token-reset-info { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; margin-top: 9px !important; }
.osc-editorial-app #token-reset-info strong { color: var(--text); font: 650 16px/1.2 var(--osc-mono); }
.osc-editorial-app #token-reset-info span { color: var(--text-muted); font-size: 11px; }
.osc-editorial-app #token-reset-info small { flex: 1 1 100%; color: var(--text-secondary); font-size: 12px; }

@media (max-width: 640px) {
    .osc-editorial-app .topbar-lang.osc-lang-switch { min-height: 28px; }
    .osc-editorial-app .topbar-lang.osc-lang-switch button { min-width: 30px; height: 22px; padding: 0 4px; }
}

/* ================================================================
   2026-07-10 — chronological agent flow + four-surface mobile QA
   ================================================================ */

/* Quiet user messages and readable file references in both palettes. */
.osc-editorial-app .message-user .message-bubble {
    color: #202120;
    border-color: #d7d8d5;
    background: #f3f4f1;
    box-shadow: none !important;
}
body.osc-editorial-app:not(.light-theme) .message-user .message-bubble {
    color: #f1efe9;
    border-color: #44423d;
    background: #252421;
}
.osc-editorial-app .message-content a:not(.msg-attach-act),
.osc-editorial-app .answer-content a:not(.msg-attach-act) {
    color: inherit;
    text-decoration-color: var(--osc-signal);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.osc-editorial-app .message-content :not(pre) > code,
.osc-editorial-app .answer-content :not(pre) > code {
    padding: .08em .28em;
    color: inherit;
    border: 0;
    border-radius: 4px;
    background: rgba(21,21,21,.065);
    box-shadow: none;
}
body.osc-editorial-app:not(.light-theme) .message-content :not(pre) > code,
body.osc-editorial-app:not(.light-theme) .answer-content :not(pre) > code { background: rgba(255,255,255,.075); }

/* Attachments: neutral document rows; no old gradient tiles or overflow. */
.osc-editorial-app .msg-attachments {
    width: 100%;
    min-width: 0;
    gap: 8px !important;
    margin: 0 0 10px !important;
}
.osc-editorial-app .msg-attach {
    box-sizing: border-box;
    width: min(100%, 520px);
    min-width: 0;
    max-width: 100%;
    flex: 0 1 520px;
    padding: 9px;
    color: var(--text);
    border-color: var(--border);
    border-radius: 11px;
    background: var(--bg-card);
    transform: none;
}
.osc-editorial-app .msg-attach:hover { border-color: var(--border-light); background: var(--bg-hover); transform: none; }
.osc-editorial-app .msg-attach-ext {
    width: 38px;
    height: 42px;
    color: var(--text) !important;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent !important;
    box-shadow: none;
}
.osc-editorial-app .msg-attach-ext::after { display: none; }
.osc-editorial-app .msg-attach-name { color: var(--text); }
.osc-editorial-app .msg-attach-actions { display: inline-flex; flex: 0 0 auto; gap: 4px; }
.osc-editorial-app .msg-attach-act,
.osc-editorial-app .msg-attach-dl {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
}
.osc-editorial-app .msg-attach-act:hover,
.osc-editorial-app .msg-attach-dl:hover { color: var(--text); border-color: var(--border-light); background: var(--bg-hover); }

/* One calm receipt line instead of the legacy blue/purple pill bar. */
.osc-editorial-app .msg-metrics,
body.osc-editorial-app.light-theme .msg-metrics {
    gap: 12px;
    margin-top: 14px;
    padding: 10px 0 0;
    color: var(--text-muted);
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
}
.osc-editorial-app .msg-metrics:hover { border-color: var(--border-light); background: transparent; }
.osc-editorial-app .msg-metric,
body.osc-editorial-app.light-theme .msg-metric,
.osc-editorial-app .msg-metric-tier,
.osc-editorial-app .msg-metric-tier-1,
.osc-editorial-app .msg-metric-tier-2 {
    gap: 4px;
    padding: 0;
    color: var(--text-secondary);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.osc-editorial-app .msg-metric-tier { color: var(--osc-signal-dark); letter-spacing: .06em; }
body.osc-editorial-app:not(.light-theme) .msg-metric-tier { color: var(--osc-acid); }

/* Chronological activity: plan once, then notes and real actions in order. */
.osc-editorial-app .osc-agent-flow { position: relative; gap: 0; margin: 3px 0 6px; }
.osc-editorial-app .osc-agent-flow::before {
    content: '';
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 16px;
    width: 1px;
    background: var(--border);
}
.osc-editorial-app .osc-agent-note {
    position: relative;
    display: grid;
    grid-template-columns: 33px minmax(0,1fr);
    padding: 4px 0;
}
/* 2026-07-14: плашка веб-поиска в трейсе выравнивается по рельсу (как шаги, отступ 33px)
   и не вылезает за правый край. Раньше сидела без отступа → «вылезала за палочку». */
.osc-editorial-app .message-events-stream .osc-websearch {
    margin-left: 33px;
    max-width: calc(100% - 33px);
    box-sizing: border-box;
}
/* 2026-07-12: ВЫРАВНИВАНИЕ трейса по одной вертикали. Замерено на проде:
   tool-строка «Читаю» начиналась на x=457, а think-строка «Думал» — на 446,
   и её иконка-облачко на 424, т.е. ЛЕВЕЕ самой линии rail (440). Причины:
   1) margin-left:33px у think-блока перебивался шорткатом
      `.think-block.think-summary-only { margin: 4px 0 6px !important }` —
      он обнулял margin-left (диагностировано через CDP getMatchedStylesForNode);
   2) иконка лежала В ПОТОКЕ и сдвигала текст вправо от края блока.
   Теперь: think-блок с тем же отступом 33px, что и tool-карточка (текст в одну
   вертикаль), а иконка — абсолютный узел НА линии rail, как точка у шагов. */
.osc-editorial-app .message-events-stream .think-block {
    margin-left: 33px !important;
    position: relative;
    z-index: 1;
}
.osc-editorial-app .message-events-stream .think-header { position: relative; }
.osc-editorial-app .message-events-stream .think-icon {
    position: absolute;
    left: -23px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin: 0;
    transform: translateY(-50%);
    opacity: .7;
}
/* Узел-точка у tool-строк: codex-shell.css:752 прячет её (display:none), поэтому
   на rail не было НИ ОДНОЙ отметки у действий — только облачка у «Думал».
   Возвращаем: каждое действие = узел на линии, как в VS Code. */
.osc-editorial-app .message-events-stream .cli-step-dot { display: block; }
.osc-editorial-app .osc-agent-note-mark {
    z-index: 1;
    width: 7px;
    height: 7px;
    margin: 8px auto 0;
    border: 2px solid var(--bg);
    border-radius: 50%;
    background: var(--text-muted);
    box-sizing: content-box;
}
.osc-editorial-app .osc-agent-note-content { min-width: 0; color: var(--text); line-height: 1.62; }
.osc-editorial-app .osc-agent-note-content > :first-child { margin-top: 0; }
.osc-editorial-app .osc-agent-note-content > :last-child { margin-bottom: 0; }

.osc-editorial-app .osc-agent-plan {
    position: relative;
    margin: 4px 0 10px 33px;
    overflow: hidden;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
}
.osc-editorial-app .osc-agent-plan-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    border-bottom: 1px solid var(--border);
}
.osc-editorial-app .osc-agent-plan-kicker { color: var(--osc-signal-dark); font: 700 9px/1 var(--osc-mono); letter-spacing: .08em; }
body.osc-editorial-app:not(.light-theme) .osc-agent-plan-kicker { color: var(--osc-acid); }
.osc-editorial-app .osc-agent-plan-head strong { font-size: 12px; }
.osc-editorial-app .osc-agent-plan-progress { color: var(--text-muted); font: 10px/1 var(--osc-mono); }
.osc-editorial-app .osc-agent-plan-list { margin: 0; padding: 6px 12px 9px; list-style: none; }
.osc-editorial-app .osc-agent-plan-item {
    display: grid;
    grid-template-columns: 25px minmax(0,1fr) 12px;
    align-items: start;
    gap: 8px;
    padding: 7px 0;
    color: var(--text-secondary);
}
.osc-editorial-app .osc-agent-plan-index { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 50%; font: 10px/1 var(--osc-mono); }
.osc-editorial-app .osc-agent-plan-copy { min-width: 0; }
.osc-editorial-app .osc-agent-plan-copy b { display: block; color: var(--text); font-size: 12px; line-height: 1.4; }
.osc-editorial-app .osc-agent-plan-copy small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 10.5px; }
.osc-editorial-app .osc-agent-plan-state { width: 8px; height: 8px; margin-top: 7px; border: 1px solid var(--text-muted); border-radius: 50%; }
.osc-editorial-app .osc-agent-plan-item.is-in_progress .osc-agent-plan-index { color: #151515; border-color: var(--osc-acid); background: var(--osc-acid); }
.osc-editorial-app .osc-agent-plan-item.is-in_progress .osc-agent-plan-state { border-color: var(--osc-signal); background: var(--osc-signal); animation: osc-agent-pulse 1s ease-in-out infinite; }
.osc-editorial-app .osc-agent-plan-item.is-completed .osc-agent-plan-index { color: #151515; border-color: var(--osc-acid); background: var(--osc-acid); }
.osc-editorial-app .osc-agent-plan-item.is-completed .osc-agent-plan-state { border-color: #2b8a55; background: #2b8a55; }

/* 2026-07-12: шаг-действие = КОМПАКТНАЯ СТРОКА на общем rail (стиль VS Code),
   а не крупная карточка. Rail — .osc-agent-flow::before на left:16px. Узел-точка
   сидит НА линии, текст (тип тула + деталь) в одну строку справа. Проверяется
   скриншотом через стенд, не grep. */
.osc-editorial-app .message-events-stream .cli-step-card.osc-tool-stripe {
    position: relative;
    margin: 0 0 0 33px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    /* !important обязателен: chat-eye-comfort.css красит
       body:not(.light-theme) .cli-step-card.osc-tool-stripe в var(--eye-surface)
       !important (серая полоса-фон под каждым шагом). Без !important наша выше
       по специфичности, но !important eye-comfort всё равно побеждает.
       Диагностировано через CDP getMatchedStylesForNode. */
    background: transparent !important;
}
.osc-editorial-app .message-events-stream .cli-step-card.osc-tool-stripe > .cli-step-header {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-height: 0;
    padding: 3px 0;
    border: 0;
    background: transparent;
}
/* шум убран: номер, бейдж-категория и таймер у tool-строк не нужны (как в VS Code) */
.osc-editorial-app .cli-step-num,
.osc-editorial-app .cli-step-badge,
.osc-editorial-app .cli-step-elapsed { display: none !important; }
/* узел-точка НА линии rail (линия left:16px; карточка от 33px → узел на -20px) */
.osc-editorial-app .cli-step-dot {
    position: absolute;
    left: -20px;
    top: 8px;
    width: 7px;
    height: 7px;
    border: 2px solid var(--bg);
    border-radius: 50%;
    background: var(--text-muted);
    box-shadow: none;
}
.osc-editorial-app .cli-step-done .cli-step-dot { background: #2b8a55; box-shadow: none; }
.osc-editorial-app .cli-step-error .cli-step-dot { background: #c0392b; box-shadow: none; }
.osc-editorial-app .cli-step-running .cli-step-dot { background: var(--osc-signal); }
/* 2026-07-12: error-шаг НЕ должен красить фон РЕЗУЛЬТАТ/заголовок в фиолетовый/красный
   (base CSS давал .cli-step-error .cli-step-out тёмно-фиолетовый фон — уродливо на скрине).
   Статус ошибки — только красный узел на rail, как в VS Code. Фоны нейтрализуем. */
.osc-editorial-app .cli-step-card.cli-step-error,
.osc-editorial-app .cli-step-card.cli-step-error .cli-step-header,
.osc-editorial-app .cli-step-card.cli-step-error .cli-step-in,
.osc-editorial-app .cli-step-card.cli-step-error .cli-step-out { background: transparent; border-color: transparent; }
/* тип тула жирным + деталь приглушённым — в ОДНУ строку (как "Read path" в VS Code) */
.osc-editorial-app .cli-step-copy { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: flex-start; gap: 7px; }
/* тип тула — фикс слева; путь/деталь — СРАЗУ после него (как "Read path" в VS Code),
   занимает остаток строки с ellipsis. flex-grow:0 у title обязателен — иначе базовый
   CSS растягивал его и толкал путь к правому краю (диагностировано скриншотом). */
/* 2026-07-14: специфичность поднята (+ .message-events-stream) чтобы БИТЬ editor.css:156
   `.cli-step-card .cli-step-title{flex:1}` (0,2,0), который лениво инжектится при первом
   открытии IDE и иначе перекрывал flex → заголовок «расцентровывался» после IDE-раунд-трипа. */
.osc-editorial-app .message-events-stream .cli-step-title,
.osc-editorial-app .cli-step-title { flex: 0 0 auto; overflow: visible; color: var(--text); font-size: 12.5px; font-weight: 650; line-height: 1.4; white-space: nowrap; }
/* Градиент-бокс хронологии — EAGER (был только в лениво-инжектируемом editor.css:11, из-за
   чего появлялся лишь ПОСЛЕ первого захода в IDE). Специфичность (0,2,0) бьёт
   chat-comfort.css:315 `.cli-agent-steps{background:transparent}` (0,1,0) при любом порядке. */
.osc-editorial-app .cli-agent-steps {
    background: linear-gradient(180deg, rgba(240,90,50,.04), rgba(0,206,201,.02));
    border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px;
}
.osc-editorial-app .cli-step-summary { flex: 1 1 auto; display: block; min-width: 0; overflow: hidden; margin: 0; text-align: left; color: var(--text-muted); font: 11px/1.4 var(--osc-mono); text-overflow: ellipsis; white-space: nowrap; }
.osc-editorial-app .cli-step-chevron { color: var(--text-muted); opacity: 0; transition: opacity .15s ease, transform .16s ease; }
.osc-editorial-app .cli-step-card:hover .cli-step-chevron { opacity: .6; }
.osc-editorial-app .cli-step-card.expanded .cli-step-chevron { transform: rotate(90deg); opacity: .6; }
.osc-editorial-app .cli-step-body { display: none; border-top: 0; padding: 1px 0 5px; }
.osc-editorial-app .cli-step-card.expanded .cli-step-body { display: block; }
.osc-editorial-app .cli-step-in,
.osc-editorial-app .cli-step-out { padding: 3px 0; border: 0; background: transparent; }
.osc-editorial-app .cli-step-out + .cli-step-in,
.osc-editorial-app .cli-step-in + .cli-step-out { border-top: 0; }
.osc-editorial-app .cli-step-code { max-height: 430px; border: 1px solid var(--border); background: #efeee9; }
body.osc-editorial-app:not(.light-theme) .cli-step-code { background: #151514; }
.osc-editorial-app .osc-agent-change-code code { white-space: pre; word-break: normal; }

/* Model selector: the same editorial material on mobile and desktop. */
.osc-editorial-app .pp-overlay { padding: 18px; background: rgba(15,15,14,.68); backdrop-filter: blur(5px); }
.osc-editorial-app .pp-panel.pp-wide {
    width: min(900px, calc(100vw - 36px));
    max-height: min(840px, calc(100dvh - 36px));
    border-color: var(--border);
    border-radius: 16px;
    background: var(--bg);
    box-shadow: 0 24px 70px rgba(0,0,0,.25);
}
.osc-editorial-app .pp-panel::before { display: none; }
.osc-editorial-app .pp-head { min-height: 62px; padding: 11px 14px; color: var(--text); border-bottom-color: var(--border); background: var(--bg-card); }
.osc-editorial-app .pp-head-icon { color: var(--text); border-color: var(--border); border-radius: 10px; background: transparent; box-shadow: none; }
.osc-editorial-app .pp-title { color: var(--text); }
.osc-editorial-app .pp-subtitle { color: var(--text-muted); }
.osc-editorial-app .pp-close { width: 34px; height: 34px; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 9px; background: transparent; }
.osc-editorial-app .pp-close:hover { color: var(--text); border-color: var(--border-light); background: var(--bg-hover); }
.osc-editorial-app .pp-body { padding: 12px; }
.osc-editorial-app .mm-tabs { gap: 0 !important; margin: 0 0 10px !important; padding: 3px !important; overflow-x: auto; border-color: var(--border) !important; border-radius: 10px !important; background: var(--bg-card) !important; }
.osc-editorial-app .mm-tab { min-width: max-content; border-radius: 7px !important; color: var(--text-muted) !important; }
.osc-editorial-app .mm-tab.mm-tab-active { color: var(--text) !important; background: var(--bg-hover) !important; box-shadow: inset 0 0 0 1px var(--border-light) !important; }
.osc-editorial-app .mm-spark-banner { border-color: var(--border) !important; border-radius: 11px !important; background: var(--bg-card) !important; box-shadow: none !important; }
.osc-editorial-app .mm-spark-bolt { color: var(--osc-signal) !important; filter: none !important; }
.osc-editorial-app .mm-spark-name { color: var(--text) !important; }
.osc-editorial-app .mm-spark-desc { color: var(--text-muted) !important; }
.osc-editorial-app .mm-spark-switch { overflow: hidden; border: 1px solid var(--border); background: var(--osc-acid) !important; box-shadow: none !important; }
.osc-editorial-app .mm-spark-knob { background: #151515 !important; box-shadow: none !important; }
.osc-editorial-app .mm-col,
.osc-editorial-app .mm-col[data-agent="2"] { padding: 10px !important; border-color: var(--border) !important; border-radius: 12px !important; background: var(--bg-card) !important; }
.osc-editorial-app .mm-col-head { border-bottom-color: var(--border) !important; }
.osc-editorial-app .mm-col-title,
.osc-editorial-app .mm-col[data-agent="2"] .mm-col-title { color: var(--text) !important; }
.osc-editorial-app .mm-col-sub,
.osc-editorial-app .mm-col[data-agent="2"] .mm-col-sub { color: var(--text-muted) !important; border-color: var(--border) !important; background: transparent !important; }
.osc-editorial-app .mm-col-item { border-radius: 9px !important; color: var(--text) !important; }
.osc-editorial-app .mm-col-item:hover { border-color: var(--border) !important; background: var(--bg-hover) !important; }
.osc-editorial-app .mm-col-item-active,
.osc-editorial-app .mm-col-item.mm-col-item-new { border-color: var(--border-light) !important; background: var(--bg-hover) !important; box-shadow: inset 3px 0 0 var(--osc-signal) !important; }
.osc-editorial-app .mm-col-item-ico { border-color: var(--border) !important; border-radius: 8px !important; background: transparent !important; box-shadow: none !important; }
.osc-editorial-app .mm-col-item-desc { color: var(--text-muted) !important; }
.osc-editorial-app .mm-col-item-cost { color: var(--text-secondary) !important; border-color: var(--border) !important; background: transparent !important; }

/* Composer controls are legible and never become a black square. */
.osc-editorial-app .btn-send,
body.osc-editorial-app.light-theme .btn-send {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    flex: 0 0 42px !important;
    color: #151515;
    border: 1px solid #151515;
    border-radius: 50% !important;
    background: var(--osc-acid);
    box-shadow: none;
}
.osc-editorial-app .btn-send:hover { color: #fff; background: var(--osc-signal); }
.osc-editorial-app .btn-send:disabled { color: var(--text-muted); border-color: var(--border); background: var(--bg-hover); }
/* 2026-07-12: кнопка висела на bottom:96px и оказывалась ЗАМЕТНО ВЫШЕ строки
   ввода (замер на проде: центр кнопки y=881, центр композера y=952 — разрыв 71px),
   отчего болталась сама по себе.
   Опускаем на уровень чата: 26px даёт центр кнопки ровно на центре строки ввода.
   По горизонтали она правее композера, поэтому кнопки «микрофон/отправить»
   не перекрывает. */
.osc-editorial-app .chat-main > .chat-bug-report-btn {
    right: 18px;
    bottom: 26px;
    width: 44px;
    height: 44px;
    color: var(--text-secondary);
    border-color: var(--border);
    background: var(--bg-card);
    box-shadow: none;
    backdrop-filter: none;
}
/* У гостя композер выше (плашка «войдите»), поэтому и кнопке нужен больший отступ.
   Держим ту же разницу, что была: гость = базовый + 60px. */
body.osc-editorial-app.osc-guest .chat-main > .chat-bug-report-btn { bottom: 86px; }

/* Mobile action sheet: labelled list, not the old 2×3 icon grid. */
.osc-editorial-app .osc-action-sheet-backdrop { background: rgba(15,15,14,.45); backdrop-filter: blur(3px); }
.osc-editorial-app .osc-action-sheet {
    top: auto;
    right: 10px;
    left: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: auto;
    height: auto;
    max-height: min(70dvh, 430px);
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    box-shadow: 0 18px 54px rgba(0,0,0,.34);
}
.osc-editorial-app .osc-action-sheet-item {
    display: grid;
    grid-template-columns: 24px minmax(0,1fr);
    align-items: center;
    gap: 9px;
    min-height: 46px;
    width: auto;
    height: auto;
    min-width: 0;
    padding: 8px 10px;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 9px;
    background: transparent;
    text-align: left;
    justify-content: start;
}
.osc-editorial-app .osc-action-sheet-item:hover { color: var(--text); background: var(--bg-hover); }
.osc-editorial-app .osc-action-sheet-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

/* Account is always above the chat topbar; its close control stays reachable. */
.osc-editorial-app #account-modal { z-index: 6000; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
body.osc-editorial-app.account-modal-open { overflow: hidden; }
body.osc-editorial-app.account-modal-open .sidebar-user,
body.osc-editorial-app.account-modal-open .chat-bug-report-btn,
body.osc-editorial-app.account-modal-open .chat-input-area,
body.osc-editorial-app.account-modal-open .scroll-to-top { visibility: hidden !important; pointer-events: none !important; }
body.osc-editorial-app.account-modal-open .sidebar,
body.osc-editorial-app.account-modal-open .chat-main { overflow: hidden !important; }
.osc-editorial-app #account-modal .modal-content { width: min(560px, 100%); max-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom))); border-color: var(--border); border-radius: 14px; background: var(--bg); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.osc-editorial-app #account-modal .modal-header { position: sticky; top: 0; z-index: 4; min-height: 58px; padding: 9px 12px 9px 16px; color: var(--text); border-bottom-color: var(--border); background: var(--bg-card); }
.osc-editorial-app #account-modal .modal-header h3 { color: var(--text) !important; }
.osc-editorial-app #account-modal .modal-close { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; color: var(--text); border: 1px solid var(--border); border-radius: 9px; background: transparent; font-size: 25px; }
.osc-editorial-app #account-modal .modal-close:hover { border-color: var(--border-light); background: var(--bg-hover); }

/* Subscription header and hamburger retain contrast in the shared mobile nav. */
.osc-editorial-sub .nav-burger {
    width: 46px;
    height: 46px;
    padding: 11px;
    border: 1px solid var(--osc-line-dark);
    border-radius: 12px;
    background: var(--osc-paper-bright);
    box-shadow: none;
}
.osc-editorial-sub .nav-burger span { width: 22px; height: 2px; background: var(--osc-ink); }
.osc-editorial-sub .mobile-menu { color: var(--osc-ink); border: 0; border-bottom: 1px solid var(--osc-line); background: var(--osc-paper); box-shadow: 0 18px 40px rgba(21,21,21,.14); }
.osc-editorial-sub .mobile-menu a { color: var(--osc-ink); border-bottom-color: var(--osc-line); }
.osc-editorial-sub .mobile-menu .btn { color: var(--osc-paper-bright); background: var(--osc-ink); }

@media (max-width: 640px) {
    body.osc-editorial-app.sidebar-open .sidebar { z-index: 160; }
    body.osc-editorial-app.sidebar-open .sidebar-overlay { z-index: 150; }
    .osc-editorial-app .chat-list-item { padding-right: 44px !important; }
    .osc-editorial-app .chat-list-item .chat-item-age { margin-left: auto; }
    .osc-editorial-app .chat-list-item .chat-item-delete { right: 7px; opacity: .82; }
    .osc-editorial-app .message-user .message-bubble { width: auto; max-width: min(92%, 330px); }
    .osc-editorial-app .message-user .msg-attachments { display: grid !important; grid-template-columns: minmax(0,1fr); }
    .osc-editorial-app .msg-attach { width: 100%; flex-basis: 100%; }
    .osc-editorial-app .msg-attach-ext { width: 34px; height: 38px; }
    .osc-editorial-app .msg-attach-actions { gap: 3px; }
    .osc-editorial-app .msg-attach-act,
    .osc-editorial-app .msg-attach-dl { width: 28px; height: 28px; }
    .osc-editorial-app .msg-metrics { gap: 8px; font-size: 9.5px; }
    .osc-editorial-app .osc-agent-flow::before { left: 12px; }
    .osc-editorial-app .osc-agent-note { grid-template-columns: 25px minmax(0,1fr); }
    .osc-editorial-app .osc-agent-plan,
    .osc-editorial-app .message-events-stream .cli-step-card.osc-tool-stripe { margin-left: 25px; }
    /* 2026-07-12: хедер теперь flex (строчный вид), grid-template больше не нужен.
       Узел двигаем под мобильный rail (линия на left:12px, карточка от 25px → узел -13px). */
    .osc-editorial-app .message-events-stream .cli-step-card.osc-tool-stripe > .cli-step-header { gap: 6px; }
    .osc-editorial-app .message-events-stream .cli-step-card.osc-tool-stripe .cli-step-dot { left: -13px; }
    .osc-editorial-app .cli-step-num,
    .osc-editorial-app .osc-tool-edit-btn { display: none !important; }
    .osc-editorial-app .cli-step-summary { max-width: 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .osc-editorial-app .cli-step-elapsed { align-self: start; margin-top: 3px; }
    .osc-editorial-app .pp-overlay { align-items: stretch; padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); }
    .osc-editorial-app .pp-panel.pp-wide { width: 100%; max-height: 100%; border-radius: 14px; }
    .osc-editorial-app .pp-head { min-height: 58px; }
    .osc-editorial-app .pp-body { padding: 9px; }
    .osc-editorial-app .mm-tabs { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; overflow: visible !important; }
    .osc-editorial-app .mm-tab { width: 100% !important; min-width: 0 !important; white-space: normal !important; }
    .osc-editorial-app .mm-twocol { grid-template-columns: 1fr !important; gap: 8px !important; }
    .osc-editorial-app .mm-col-list { max-height: none !important; overflow: visible !important; }
    .osc-editorial-app .mm-col-item { padding: 9px !important; }
    .osc-editorial-app .chat-main > .chat-bug-report-btn { right: auto; left: 14px; bottom: calc(102px + env(safe-area-inset-bottom)); width: 42px; height: 42px; }
    body.osc-editorial-app:has(#chat-input:focus) .chat-main > .chat-bug-report-btn { visibility: hidden; pointer-events: none; }
    .osc-editorial-app .sidebar-open-btn,
    .osc-editorial-app .mobile-menu-btn,
    .osc-editorial-app #mobile-menu-btn { opacity: 1 !important; color: var(--text) !important; border: 1px solid var(--border) !important; border-radius: 9px !important; background: var(--bg-card) !important; }
    .osc-editorial-sub .nav { min-height: 66px; background: rgba(242,239,232,.98); }
    .osc-editorial-sub .nav-inner { min-height: 66px; gap: 10px; }
    .osc-editorial-sub .nav-logo { max-width: 190px; }
    .osc-editorial-sub .nav-logo-text { font-size: 14px; white-space: nowrap; }
    .osc-editorial-sub .sub-main { padding-top: 66px; }
    .osc-editorial-sub .mobile-menu { top: 66px; padding: 12px 18px 20px; }
}
@media (max-width: 480px) {
    .osc-editorial-app .osc-action-sheet { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .osc-editorial-app .osc-action-sheet-label { white-space: normal; }
}

/* Subscription honours the same binary theme as chat.  The original
   editorial layer forced its paper palette even when osc_theme=dark. */
body.osc-editorial-sub:not(.light-theme) {
    --osc-paper: #171716;
    --osc-paper-bright: #211f1d;
    --osc-paper-deep: #2c2a27;
    --osc-ink: #f2efe8;
    --osc-ink-soft: #c2beb4;
    --osc-muted: #918c82;
    --osc-line: #403d37;
    --osc-line-dark: #57534b;
    color: #f2efe8;
    background: #171716;
}
body.osc-editorial-sub:not(.light-theme) .nav { background: rgba(23,23,22,.96); }
body.osc-editorial-sub:not(.light-theme) .nav-burger { color: #f2efe8; border-color: #57534b; background: #211f1d; }
body.osc-editorial-sub:not(.light-theme) .nav-burger span { background: #f2efe8; }
body.osc-editorial-sub:not(.light-theme) .osc-lang-switch { border-color: #57534b; background: #211f1d; }
body.osc-editorial-sub:not(.light-theme) .osc-lang-switch button { color: #918c82; }
body.osc-editorial-sub:not(.light-theme) .osc-lang-switch button.is-active { color: #151515; background: var(--osc-acid); }
body.osc-editorial-sub:not(.light-theme) .mobile-menu { color: #f2efe8; border-bottom-color: #403d37; background: #211f1d; box-shadow: 0 18px 40px rgba(0,0,0,.42); }
body.osc-editorial-sub:not(.light-theme) .mobile-menu a { color: #f2efe8; border-bottom-color: #403d37; }
body.osc-editorial-sub:not(.light-theme) .mobile-menu .btn { color: #151515; border-color: var(--osc-acid); background: var(--osc-acid); }
body.osc-editorial-sub:not(.light-theme) .period-slider-block,
body.osc-editorial-sub:not(.light-theme) .pricing-card,
body.osc-editorial-sub:not(.light-theme) .pricing-quote,
body.osc-editorial-sub:not(.light-theme) .trust-item,
body.osc-editorial-sub:not(.light-theme) .faq-item { background: transparent; }
body.osc-editorial-sub:not(.light-theme) .pricing-card-popular { color: #151515; background: #f2efe8; }
body.osc-editorial-sub:not(.light-theme) .pricing-card-popular .pricing-period,
body.osc-editorial-sub:not(.light-theme) .pricing-card-popular .pricing-tokens-line,
body.osc-editorial-sub:not(.light-theme) .pricing-card-popular .pricing-tokens-line b { color: #5e5a53; }
body.osc-editorial-sub:not(.light-theme) .section-dark { color: #f2efe8; background: #10100f; }
body.osc-editorial-sub:not(.light-theme) .section-dark .section-title,
body.osc-editorial-sub:not(.light-theme) .sub-model-name { color: #f2efe8; }
body.osc-editorial-sub:not(.light-theme) .footer { color: #f2efe8; border-top-color: #403d37; background: #10100f; }
body.osc-editorial-sub:not(.light-theme) .footer-logo-text,
body.osc-editorial-sub:not(.light-theme) .footer-col-title { color: #f2efe8; }
body.osc-editorial-sub:not(.light-theme) .sub-brand-ico,
body.osc-editorial-sub:not(.light-theme) .mg-logo,
body.osc-editorial-sub:not(.light-theme) .mg-icon { border-color: #57534b; background: #211f1d; }

/* ================================================================
   CHAT POLISH 2 — remove legacy glow/overlay artefacts
   ================================================================ */

/* One knob only; its checked coordinate must match the compact 40px track. */
.osc-editorial-app .setting-toggle .toggle-slider {
    box-sizing: border-box;
    overflow: hidden;
}
.osc-editorial-app .setting-toggle .toggle-slider::before { content: none !important; display: none !important; }
.osc-editorial-app .setting-toggle .toggle-slider::after {
    top: 2px !important;
    left: 2px !important;
    width: 17px !important;
    height: 17px !important;
    box-shadow: none !important;
}
.osc-editorial-app .setting-toggle input:checked + .toggle-slider::after { left: 19px !important; }

/* Messages are quiet surfaces. Signal colors no longer sit behind avatars/text. */
.osc-editorial-app .chat-messages { background: none; }
.osc-editorial-app .message-avatar {
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    box-shadow: none;
}
.osc-editorial-app .message-avatar .osc-avatar-img { border-radius: 50%; }
.osc-editorial-app .message-avatar.msg-user-avatar {
    color: var(--osc-ink-soft);
    background: #dedbd3;
}
.osc-editorial-app .message-avatar.msg-ai-avatar {
    width: 24px;
    height: 24px;
    color: var(--osc-signal-dark);
    border: 0;
    background: transparent;
}
.osc-editorial-app .message-avatar.msg-ai-avatar svg { width: 17px; height: 17px; }
.osc-editorial-app .message-user .message-bubble {
    color: var(--osc-ink);
    border: 1px solid var(--osc-line);
    border-radius: 14px 14px 4px 14px;
    background: #eceae4;
    box-shadow: none;
}
body.osc-editorial-app:not(.light-theme) .message-avatar.msg-user-avatar { color: #d8d4ca; background: #34322e; }
body.osc-editorial-app:not(.light-theme) .message-avatar.msg-ai-avatar { color: #f27a58; background: transparent; }
body.osc-editorial-app:not(.light-theme) .message-user .message-bubble {
    color: #f2efe8;
    border-color: #45413b;
    background: #292724;
    box-shadow: none;
}
.osc-editorial-app .message-user .user-actions { margin-top: 7px; }
.osc-editorial-app .chat-input-wrapper,
body.osc-editorial-app:not(.light-theme) .chat-input-wrapper { box-shadow: none; }
.osc-editorial-app .chat-input-wrapper:focus-within { box-shadow: 0 0 0 2px rgba(217,255,67,.28); }

/* 2026-07-12: КАРТОЧНЫЕ правила этого дубль-блока удалены (border/bg/radius/header
   min-height) — они перебивали строчный вид из блока 1374 (два конфликтующих блока
   — корень «карточек вместо строк»). Здесь остаётся ТОЛЬКО стилизация код-блока
   и компактные IN/OUT-метки. */
.osc-editorial-app .message-events-stream { gap: 1px; }
.osc-editorial-app .cli-step-label {
    color: var(--text-muted);
    border: 0;
    background: transparent;
    padding: 0 0 2px;
    font: 700 8.5px/1 var(--osc-mono);
    letter-spacing: .09em;
}
.osc-editorial-app .cli-step-code {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f0eee8;
}
.osc-editorial-app .cli-step-code code { color: #312f2a; }
body.osc-editorial-app:not(.light-theme) .cli-step-code { border-color: #3e3b35; background: #151514; }
body.osc-editorial-app:not(.light-theme) .cli-step-code code { color: #ddd9d0; }
body.osc-editorial-app:not(.light-theme) .cli-step-label { color: #9d988f; border-color: #45413b; background: #1b1a18; }
.osc-editorial-app .codex-activity-summary { min-height: 32px; border-radius: 9px; color: var(--text-muted); }

/* Thinking and agent cards: no accidental white slabs or black wells. */
.osc-editorial-app .think-block,
.osc-editorial-app .agent-panel,
.osc-editorial-app .tool-call-card {
    color: var(--text);
    border-color: var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: none;
}
.osc-editorial-app .think-header,
.osc-editorial-app .agent-panel-header { color: var(--text-secondary); background: transparent; }
body.osc-editorial-app:not(.light-theme) .think-block,
body.osc-editorial-app:not(.light-theme) .agent-panel,
body.osc-editorial-app:not(.light-theme) .tool-call-card { border-color: #403d37; background: #211f1d; }

/* Search results use solid theme surfaces instead of a translucent grey overlay. */
.osc-editorial-app .osc-websearch .osc-ws-bar {
    color: var(--text);
    border-color: var(--border);
    border-radius: 11px;
    background: var(--bg-card);
}
.osc-editorial-app .osc-websearch .osc-ws-bar:hover { border-color: var(--border-light); background: var(--bg-hover); }
.osc-editorial-app .osc-websearch .osc-ws-list {
    max-width: 760px;
    gap: 0;
    padding: 5px;
    border-color: var(--border);
    border-radius: 12px;
    background: #f5f3ed;
}
.osc-editorial-app .osc-websearch .osc-ws-item { min-height: 52px; border-radius: 8px; color: var(--text); }
.osc-editorial-app .osc-websearch .osc-ws-item + .osc-ws-item { border-top: 1px solid var(--border); }
.osc-editorial-app .osc-websearch .osc-ws-item:hover { background: #eae7df; }
.osc-editorial-app .osc-websearch .osc-ws-item-num {
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-secondary);
    background: var(--bg-card);
}
.osc-editorial-app .osc-websearch .osc-ws-item-title { color: var(--text); }
.osc-editorial-app .osc-websearch .osc-ws-item-host { color: var(--text-muted); }
body.osc-editorial-app:not(.light-theme) .osc-websearch .osc-ws-bar { border-color: #45413b; background: #211f1d; }
body.osc-editorial-app:not(.light-theme) .osc-websearch .osc-ws-list { border-color: #45413b; background: #1d1c1a; }
body.osc-editorial-app:not(.light-theme) .osc-websearch .osc-ws-item + .osc-ws-item { border-color: #393630; }
body.osc-editorial-app:not(.light-theme) .osc-websearch .osc-ws-item:hover { background: #292724; }
body.osc-editorial-app:not(.light-theme) .osc-websearch .osc-ws-item-num { border-color: #4b4740; background: #24221f; }

/* Product glyphs: small illustrations, not OS-dependent emoji. */
.osc-editorial-app .osc-feature-glyph {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    box-sizing: border-box;
    border: 1px solid currentColor;
    border-radius: 8px;
}
.osc-editorial-app .osc-feature-glyph svg { width: 15px; height: 15px; }
.osc-editorial-app .osc-feature-glyph-sub { color: #5d4b00; border-color: #d3b425; background: #f1dc63; }
.osc-editorial-app .osc-feature-glyph-vault { color: #006b64; border-color: #65bcb4; background: #d5f0ec; }
.osc-editorial-app .osc-feature-glyph-search { color: #225f88; border-color: #9bc3dc; background: #e1f0f8; }
.osc-editorial-app .osc-feature-glyph-zip { color: #8d3f23; border-color: #e5aa91; background: #f8e2d8; }
body.osc-editorial-app:not(.light-theme) .osc-feature-glyph-sub { color: #f4d84d; border-color: #76681f; background: #302c17; }
body.osc-editorial-app:not(.light-theme) .osc-feature-glyph-vault { color: #7cded5; border-color: #2c6964; background: #17302e; }
body.osc-editorial-app:not(.light-theme) .osc-feature-glyph-search { color: #8bc9ef; border-color: #355f77; background: #192a34; }
body.osc-editorial-app:not(.light-theme) .osc-feature-glyph-zip { color: #f0a586; border-color: #764d3c; background: #32231d; }
.osc-editorial-app .sub-btn-ico.osc-feature-glyph { width: 24px; height: 24px; margin-right: 8px; }

/* Client XML-agent uses the same chronological surface.  Its legacy global
   "Работа Агента" box is now a transparent per-turn host. */
.osc-editorial-app .message-events-stream > .codex-activity-summary { display: none !important; }
.osc-editorial-app .message-events-stream.codex-activity-collapsed > :not(.codex-activity-summary) { display: revert !important; }
.osc-editorial-app .message-events-stream .agent-panel { display: contents !important; }
.osc-editorial-app .message-events-stream .agent-panel-body,
.osc-editorial-app .message-events-stream .agent-panel-steps { display: contents !important; }
.osc-editorial-app .message-events-stream .agent-panel-status { display: none !important; }
.osc-editorial-app .message-events-stream .agent-panel:not(.history) .agent-panel-status {
    display: flex !important;
    margin: 5px 0 5px 33px;
    padding: 7px 9px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-card);
}
.osc-editorial-app .message-events-stream .agent-panel-header {
    min-height: 0;
    margin: 4px 0 4px 33px;
    padding: 0;
    border: 0;
    background: transparent;
}
.osc-editorial-app .message-events-stream .agent-panel-header > :not(.agent-stop-btn) { display: none !important; }
.osc-editorial-app .message-events-stream .agent-panel-header:has(.agent-stop-btn[style*="display: none"]) { display: none !important; }
.osc-editorial-app .message-events-stream .agent-stop-btn { margin: 0; padding: 6px 9px; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); font-size: 10px; }
.osc-editorial-app .message-events-stream .agent-step-item {
    margin: 3px 0 3px 33px;
    overflow: hidden;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--bg-card);
}
.osc-editorial-app .message-events-stream .agent-step-row { min-height: 44px; padding: 7px 10px; background: transparent; }
.osc-editorial-app .message-events-stream .agent-step-row:hover { background: var(--bg-hover); }
.osc-editorial-app .message-events-stream .agent-step-fn { color: var(--text); font-weight: 650; }
.osc-editorial-app .message-events-stream .agent-step-arg { color: var(--text-muted); background: transparent; white-space: normal; word-break: break-word; }
.osc-editorial-app .message-events-stream .agent-step-output { max-height: 430px; padding: 9px 10px; border-top: 1px solid var(--border); background: transparent; }
.osc-editorial-app .message-events-stream .agent-step-output pre { color: var(--text-secondary); white-space: pre; word-break: normal; }
@media (max-width: 640px) {
    .osc-editorial-app .chat-topbar,
    .osc-editorial-app .modal-overlay,
    .osc-editorial-app .welcome-overlay,
    .osc-editorial-app .agreement-overlay,
    .osc-editorial-app .servers-panel-overlay,
    .osc-editorial-app .srv-wizard-overlay,
    .osc-editorial-app .pp-overlay,
    .osc-editorial-app .osc-action-sheet-backdrop { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
    .osc-editorial-app .message-events-stream .agent-panel-header,
    .osc-editorial-app .message-events-stream .agent-step-item { margin-left: 25px; }
    .osc-editorial-app .message-events-stream .agent-step-row { gap: 7px; }
    .osc-editorial-app .message-events-stream .agent-step-icon-sm { display: none; }
}

/* File manager is a real themed panel, including its injected search controls. */
.osc-editorial-app .fm-overlay {
    inset: 0 0 0 auto;
    color: var(--text);
    border-color: var(--border);
    background: #f8f6f0;
    box-shadow: -12px 0 36px rgba(29,27,24,.12);
}
.osc-editorial-app .fm-panel { color: var(--text); background: inherit; }
.osc-editorial-app .fm-header { min-height: 62px; padding: 14px 18px; color: var(--text); border-color: var(--border); background: inherit; }
.osc-editorial-app .fm-header .modal-close {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    font-size: 20px;
    line-height: 1;
}
.osc-editorial-app .fm-header .modal-close:hover { color: var(--text); border-color: var(--border-light); background: var(--bg-hover); }
.osc-editorial-app #fm-search-bar { display: flex; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--border); background: inherit; }
.osc-editorial-app .fm-search-field {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 8px;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--bg-card);
}
.osc-editorial-app .fm-search-field .osc-feature-glyph { width: 25px; height: 25px; flex-basis: 25px; }
.osc-editorial-app #fm-search-input {
    width: 100%;
    min-width: 0;
    padding: 0;
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
    font: 13px/1.2 inherit;
}
.osc-editorial-app #fm-search-input::placeholder { color: var(--text-muted); }
.osc-editorial-app #fm-sort-select {
    min-width: 92px;
    padding: 6px 9px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: 0;
    background: var(--bg-card);
}
.osc-editorial-app .fm-toolbar { padding: 9px 12px; border-color: var(--border); background: inherit; }
.osc-editorial-app .fm-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border-color: var(--border); border-radius: 10px; color: var(--text-secondary); background: var(--bg-card); }
.osc-editorial-app .fm-btn:hover { color: var(--text); border-color: var(--border-light); background: var(--bg-hover); }
.osc-editorial-app .fm-btn .osc-feature-glyph { width: 26px; height: 26px; flex-basis: 26px; }
.osc-editorial-app .fm-zip-btn.is-loading .osc-feature-glyph { animation: osc-agent-pulse .65s ease-in-out infinite; }
.osc-editorial-app .fm-list { padding: 5px 10px 14px; }
.osc-editorial-app .fm-item { min-height: 44px; border-radius: 9px; color: var(--text); }
.osc-editorial-app .fm-item:hover { background: var(--bg-hover); }
.osc-editorial-app .fm-tree { color: var(--text); border-color: var(--border) !important; background: inherit; }
.osc-editorial-app .fm-ctx-menu { color: var(--text); border-color: var(--border); background: var(--bg-card); box-shadow: 0 16px 38px rgba(29,27,24,.18); }
body.osc-editorial-app:not(.light-theme) .fm-overlay { border-color: #403d37; background: #1d1c1a; box-shadow: -12px 0 38px rgba(0,0,0,.35); }
body.osc-editorial-app:not(.light-theme) .fm-search-field,
body.osc-editorial-app:not(.light-theme) #fm-sort-select,
body.osc-editorial-app:not(.light-theme) .fm-btn { border-color: #45413b; background: #24221f; }
body.osc-editorial-app:not(.light-theme) .fm-ctx-menu { border-color: #45413b; background: #211f1d; }

.osc-editorial-app .mobile-history-more {
    appearance: none;
    -webkit-appearance: none;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    background: var(--bg-card);
    font: inherit;
    box-shadow: none;
}
.osc-editorial-app .mobile-history-more {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    margin: 8px auto 18px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
}
.osc-editorial-app .mobile-history-more-icon {
    display: inline-grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.osc-editorial-app .mobile-history-more:disabled { opacity: .58; cursor: wait; }

@media (max-width: 640px) {
    .osc-editorial-app .message { gap: 9px; }
    .osc-editorial-app .message-avatar { width: 25px; height: 25px; }
    .osc-editorial-app .message-user .message-bubble { max-width: 90%; }
    .osc-editorial-app .osc-agent-event { grid-template-columns: 20px minmax(0,1fr); }
    .osc-editorial-app .osc-agent-event-status { display: none; }
    .osc-editorial-app .osc-agent-event-copy small { white-space: normal; }
    .osc-editorial-app #fm-search-bar { flex-wrap: wrap; }
    .osc-editorial-app #fm-sort-select { flex: 1 0 100%; }
    .osc-editorial-app .mobile-history-more { display: inline-flex; }
}

/* Mobile welcome must size by its content.  The generic welcome layout uses
   flex:1 and the suggestion renderer writes a measured min-height.  On a
   short phone viewport that combination allowed the browser to shrink the
   Spark/Forge switcher to a few pixels and wrap every suggestion at an
   unrelated width. */
@media (max-width: 640px) {
    .osc-editorial-app .chat-welcome {
        box-sizing: border-box;
        flex: 0 0 auto;
        justify-content: flex-start;
        min-height: 100%;
        padding: 24px 14px 112px !important;
        overflow: visible;
    }
    .osc-editorial-app .chat-welcome::before {
        flex: 0 0 auto;
        padding-bottom: 11px;
    }
    .osc-editorial-app .chat-welcome h2 {
        flex: 0 0 auto;
        margin: 22px 0 14px;
        font-size: clamp(42px, 13vw, 56px);
        line-height: .94;
    }
    .osc-editorial-app .chat-welcome > p {
        flex: 0 0 auto;
        margin-bottom: 22px;
        font-size: 14px;
        line-height: 1.45;
    }
    .osc-editorial-app .agent-switcher {
        box-sizing: border-box;
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        min-height: 66px;
        margin: 0 0 16px;
        padding: 5px !important;
        gap: 5px !important;
        overflow: hidden;
    }
    .osc-editorial-app .agent-pill {
        box-sizing: border-box;
        min-height: 56px;
        padding: 8px !important;
        gap: 7px !important;
    }
    .osc-editorial-app .agent-pill-ico {
        width: 27px !important;
        height: 27px !important;
        flex: 0 0 27px;
    }
    .osc-editorial-app .agent-pill-text {
        min-width: 0;
        gap: 3px;
    }
    .osc-editorial-app .agent-pill-name {
        font-size: 12px !important;
        line-height: 1.05;
    }
    .osc-editorial-app .agent-pill-sub {
        font-size: 8px !important;
        line-height: 1.1;
        letter-spacing: .03em;
    }
    .osc-editorial-app .suggestion-chips {
        box-sizing: border-box;
        display: grid;
        flex: 0 0 auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(72px, auto);
        align-items: stretch;
        align-content: start;
        justify-content: stretch;
        width: 100%;
        max-width: none;
        height: auto !important;
        min-height: 0 !important;
        margin: 0;
        padding: 0;
        gap: 8px;
        contain: layout;
    }
    .osc-editorial-app .suggestion-chip {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        min-height: 72px;
        padding: 10px !important;
        gap: 8px;
        border: 1px solid var(--border);
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .osc-editorial-app .suggestion-chip .chip-icon {
        width: 26px;
        height: 26px;
        flex: 0 0 26px;
    }
    .osc-editorial-app .suggestion-chip .chip-text,
    .osc-editorial-app .suggestion-chip > span:last-child {
        min-width: 0;
        align-self: center;
        font-size: 11px;
        line-height: 1.28;
        text-align: left;
    }
}

@media (max-width: 340px) {
    .osc-editorial-app .suggestion-chips { grid-template-columns: 1fr; }
    .osc-editorial-app .suggestion-chip { min-height: 58px; }
}

/* ── 2026-07-11 [claude] Fix: тёмный текст на acid-фоне в ТЁМНОЙ теме ──
   acid (#d9ff43) светлый и НЕ переопределяется по темам, а --osc-ink в тёмной
   теме становится near-white → текст на acid нечитаем. Chat (app) уже пропатчен
   точечно (#151515), но subscribe (sub) по pricing пропущен целиком, плюс
   несколько app-элементов без оверрайда. Acid всегда светлый → текст всегда тёмный. */
body.osc-editorial-sub:not(.light-theme) .pricing-card-popular .btn,
body.osc-editorial-sub:not(.light-theme) .pricing-card .btn:hover,
body.osc-editorial-sub:not(.light-theme) .pricing-card-popular:hover,
body.osc-editorial-sub:not(.light-theme) .nav .btn:hover,
/* 2026-07-12: .pricing-flagship-callout ВЫНЕСЕН отсюда.
   Здесь текст красился в тёмный (#151515), потому что плашка была залита СВЕТЛЫМ
   кислотным лаймом. Плашку сделали тёмной (см. блок в конце файла) — и тёмный
   текст на ней стал невидимкой. Цвета плашки теперь живут в её собственном блоке. */
body.osc-editorial-sub:not(.light-theme) .period-stop.is-active,
body.osc-editorial-sub:not(.light-theme) .models-filter.is-active {
    color: #151515;
}
body.osc-editorial-app:not(.light-theme) .guest-cta,
body.osc-editorial-app:not(.light-theme) .welcome-card.selected,
body.osc-editorial-app:not(.light-theme) .btn-new-chat:hover,
body.osc-editorial-app:not(.light-theme) .btn-primary:hover,
body.osc-editorial-app:not(.light-theme) .mm-close:hover,
body.osc-editorial-app:not(.light-theme) .sub-card:hover,
body.osc-editorial-app:not(.light-theme) .tutorial-item:hover,
body.osc-editorial-app:not(.light-theme) .welcome-btn-primary:not(:disabled):hover,
body.osc-editorial-app:not(.light-theme) .auth-btn-primary:hover {
    color: #151515;
}

/* ══════════════════════════════════════════════════════════════════════
   ОКНО «Открыть в окне» — редизайн (2026-07-12)
   Было: эмодзи-иконка (🌐/📜/🐍 — у каждой ОС свой рисунок, выбивается из
   дизайна), острые углы (border-radius обнулялся), зелёная кнопка «Запустить»
   мимо палитры. Приводим к нашему стилю.
   ══════════════════════════════════════════════════════════════════════ */

/* Скруглённые углы — окно должно выглядеть как окно, а не как таблица */
.osc-editorial-app .fwin {
    border-radius: 10px !important;
    overflow: hidden;
    border: 1px solid var(--border);
}
.osc-editorial-app .fwin-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px 9px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

/* Бейдж расширения вместо эмодзи — тот же язык, что в карточках файлов чата */
.osc-editorial-app .fwin-icon { display: inline-flex; align-items: center; }
/* 2026-07-15: иконка файла в шапке плавающего превью — чистый документ (как в ФМ),
   нейтральный приглушённый цвет, без бейджа расширения. */
.osc-editorial-app .fwin-fico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.osc-editorial-app .fwin-ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 19px;
    padding: 0 5px;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, .04);
    font: 600 9px/1 var(--osc-mono);
    letter-spacing: .04em;
}
/* Приглушённая расцветка по типу — подсказка, а не радуга */
.osc-editorial-app .fwin-ext[data-ext="html"],
.osc-editorial-app .fwin-ext[data-ext="htm"] { color: #f05a32; border-color: rgba(240,90,50,.35); }
.osc-editorial-app .fwin-ext[data-ext="js"],
.osc-editorial-app .fwin-ext[data-ext="ts"]  { color: #d9b23e; border-color: rgba(217,178,62,.32); }
.osc-editorial-app .fwin-ext[data-ext="py"]  { color: #ff7d5c; border-color: rgba(255, 125, 92,.32); }
.osc-editorial-app .fwin-ext[data-ext="css"] { color: #ff7d5c; border-color: rgba(255, 125, 92,.30); }
.osc-editorial-app .fwin-ext[data-ext="md"],
.osc-editorial-app .fwin-ext[data-ext="txt"],
.osc-editorial-app .fwin-ext[data-ext="json"] { color: var(--text-muted); }

.osc-editorial-app .fwin-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Кнопки окна (свернуть/развернуть/закрыть) — спокойные, подсветка по наведению */
.osc-editorial-app .fwin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 6px;
    color: var(--text-muted);
    background: transparent;
    transition: color .14s ease, background .14s ease;
}
.osc-editorial-app .fwin-btn:hover { color: var(--text); background: rgba(255,255,255,.07); }
.osc-editorial-app .fwin-btn[data-fwin-close]:hover { color: #fff; background: #c0392b; }

/* Тулбар окна: «Запустить» была неоново-зелёной (#4ade80) с градиентом —
   в editorial-стиле это выбивается. Оставляем зелёный (это универсальный
   смысл «запустить»), но берём наш --osc-good и убираем градиент/неон. */
.osc-editorial-app .fwin-toolbar {
    padding: 7px 10px;
    height: auto;
    background: transparent;
    border-bottom: 1px solid var(--border);
}
.osc-editorial-app .fwin-tool-btn {
    border-radius: 7px;
    font-weight: 600;
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
}
.osc-editorial-app .fwin-tool-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .05);
    border-color: var(--border-light, var(--border));
}
.osc-editorial-app .fwin-tool-btn-primary {
    color: #43a86a;
    background: rgba(45, 138, 73, .12);
    border-color: rgba(45, 138, 73, .40);
}
.osc-editorial-app .fwin-tool-btn-primary:hover {
    color: #56c17f;
    background: rgba(45, 138, 73, .20);
    border-color: rgba(45, 138, 73, .60);
}
.osc-editorial-app .fwin-tool-btn-active {
    color: #f05a32;
    background: rgba(240, 90, 50, .12);
    border-color: rgba(240, 90, 50, .42);
}

/* ══════════════════════════════════════════════════════════════════════
   РЕСАЙЗ САЙДБАРА (2026-07-12): рывки + слишком яркая ручка
   ══════════════════════════════════════════════════════════════════════ */

/* ЧЕСТНО: тут было глушение backdrop-filter/анимаций на время перетаскивания.
   A/B-замер на проде показал, что оно НЕ ДАЁТ НИЧЕГО (410 мс против 431 мс —
   разница в пределах шума). Настоящий пожиратель был другой: запись --sidebar-w
   в :root пересчитывала стили ВСЕГО документа. Это вылечено в chat.js (переменная
   пишется на сам сайдбар), RecalcStyle упал 361 -> 142 мс. Мёртвую оптимизацию
   не держим. Оставляем только отключение переходов — чтобы ширина не «доезжала»
   анимацией вслед за курсором. */
body.sidebar-resizing * {
    transition: none !important;
}

/* Ручка: была насыщенная оранжевая полоса/* Ручка: была насыщенная оранжевая полоса во всю высоту (после перекраски палитры
   она стала прямо кричащей). Делаем сдержанно: тонкая линия, приглушённый акцент,
   и только когда за неё реально взялись. */
.osc-editorial-app .sidebar-resize-grip:hover,
.osc-editorial-app .sidebar-resize-grip.dragging {
    background: linear-gradient(90deg,
        transparent,
        rgba(240, 90, 50, .28),
        transparent);
}
.osc-editorial-app .sidebar-resize-grip::after {
    width: 2px;
    height: 26px;
    border-radius: 2px;
    background: transparent;
    transition: background .14s ease;
}
.osc-editorial-app .sidebar-resize-grip:hover::after {
    background: rgba(255, 255, 255, .28);
}
.osc-editorial-app .sidebar-resize-grip.dragging::after {
    background: rgba(240, 90, 50, .75);
}

/* 🔴 РУЧКА РЕСАЙЗА БЫЛА ПОЧТИ НЕХВАТАЕМОЙ (2026-07-12).
   Она стояла на right:-3px (т.е. половина торчала за край сайдбара), но у
   .sidebar стоит overflow-x: hidden — он ЭТУ ПОЛОВИНУ ОБРЕЗАЛ, а дальше её
   перекрывала .chat-main. Замер по пикселям на проде:
       315px -> ручка | 318px -> chat-messages
       316px -> ручка | 319px -> chat-messages
       317px -> ручка | 320px -> chat-messages
   То есть хватать можно было ТРИ пикселя. Отсюда и «дёрганность»: курсор
   соскакивал, перетаскивание срывалось и начиналось заново.
   Решение: держим ручку ЦЕЛИКОМ внутри сайдбара (её никто не обрежет) и
   расширяем зону захвата до 10px. Визуальную риску прижимаем к самому краю,
   чтобы она по-прежнему читалась как граница. */
.osc-editorial-app .sidebar-resize-grip {
    right: 0;
    width: 10px;
    z-index: 60;
}
.osc-editorial-app .sidebar-resize-grip::after {
    left: auto;
    right: 1px;
    transform: translateY(-50%);
}

/* ══════════════════════════════════════════════════════════════════════
   ТОСТ «Новая версия» (2026-07-12)
   Был фиолетово-кислотный: фон rgba(25,24,44) (сине-фиолетовая тьма), рамка и
   кнопка на rgba(255, 125, 92) — ещё один фиолет старого дизайна, которого не было
   в первом списке (нашёлся только сейчас, вычищен по всему чату — 21 вхождение).
   Делаем спокойно и темно, под нашу поверхность: нейтральный фон, тонкая рамка,
   акцент только на кнопке действия.
   ══════════════════════════════════════════════════════════════════════ */
.osc-editorial-app #osc-reload-notice {
    background: rgba(24, 23, 21, .97);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
    font-weight: 500;
}
.osc-editorial-app .reload-notice-text {
    color: var(--text);
    font-weight: 500;
}
.osc-editorial-app .reload-notice-btn {
    color: #f05a32;
    background: rgba(240, 90, 50, .12);
    border: 1px solid rgba(240, 90, 50, .38);
    border-radius: 9px;
    font-weight: 600;
    transition: color .14s ease, background .14s ease, border-color .14s ease;
}
.osc-editorial-app .reload-notice-btn:hover {
    color: #fff;
    background: #f05a32;
    border-color: #f05a32;
}
.osc-editorial-app .reload-notice-close { color: var(--text-muted); }
.osc-editorial-app .reload-notice-close:hover { color: var(--text); }

/* ══════════════════════════════════════════════════════════════════════
   Флагманская плашка на карточке Премиума (2026-07-12)
   Была залита ЦЕЛИКОМ в --osc-acid (кислотный лайм во всю ширину) — самое
   режущее пятно на странице тарифов. Владелец дважды просил «не кислотно».
   Оставляем лайм как АКЦЕНТ (название модели, тонкая рамка), а плашку делаем
   тёмной, как остальные поверхности.
   ══════════════════════════════════════════════════════════════════════ */
.osc-editorial-sub .pricing-flagship-callout {
    color: var(--text, #e8e4da);
    background: rgba(217, 255, 67, .07);
    border: 1px solid rgba(217, 255, 67, .28);
    border-radius: 10px;
    box-shadow: none;
}
.osc-editorial-sub .pricing-flagship-callout b { color: #d9ff43; }
.osc-editorial-sub .pricing-flagship-callout small { color: var(--text-muted, #8a867c); }
/* Бейдж NEW — наш оранжевый, без заливки (он же и в списке моделей такой) */
.osc-editorial-sub .pricing-flagship-callout em {
    color: #f05a32;
    background: rgba(240, 90, 50, .12);
    border: 1px solid rgba(240, 90, 50, .34);
    border-radius: 5px;
    font-style: normal;
}

/* Светлая тема: лайм на белом почти не читается (проверено скриншотом).
   Плашке даём заметную лаймовую подложку, а тексту — тёмный оливковый. */
body.osc-editorial-sub.light-theme .pricing-flagship-callout {
    color: #151515;
    background: rgba(217, 255, 67, .30);
    border-color: rgba(150, 175, 35, .55);
}
body.osc-editorial-sub.light-theme .pricing-flagship-callout b { color: #46540f; }
body.osc-editorial-sub.light-theme .pricing-flagship-callout small { color: #6b675f; }

/* ══════════════════════════════════════════════════════════════════════
   СПИСКИ В ТЕКСТЕ АГЕНТА (2026-07-12)
   Браузер рисовал у них свой маркер (list-style: disc) — БЕЛЫЙ и мелкий.
   Он выбивался из трейса, где у каждой строки серый узел на линии rail.
   Делаем пункты списка такими же строками: текст в ту же вертикаль (457),
   а маркер — серый узел НА ЛИНИИ, как у «Изменяю» и у финального текста.
   ══════════════════════════════════════════════════════════════════════ */
/* ИСПРАВЛЕНО 2026-07-12. Была ошибка: пункты списка стилизовались как узлы НА RAIL
   (left:-22px, кольцо-обводка). Из-за этого список из трёх пунктов давал три кружка
   на линии, и выглядело так, будто «каждая строчка = отдельный узел». Плюс центр
   узла списка попадал на 438.5 при линии rail на 440.5 — те самые 2px «сдвига».
   Правильно: на rail ровно ОДИН узел на весь текстовый блок (.osc-agent-note-mark),
   а буллеты списка живут ВНУТРИ текстовой колонки как обычные скромные маркеры. */
.osc-editorial-app .osc-agent-note-content ul {
    margin: 3px 0;
    padding: 0 0 0 15px;       /* место под буллет ВНУТРИ колонки текста */
    list-style: none;          /* браузерный белый кружок не подходит по стилю */
}
.osc-editorial-app .osc-agent-note-content ul > li {
    position: relative;
    margin: 0 0 3px;
    padding: 0;
    line-height: 1.62;
}
.osc-editorial-app .osc-agent-note-content ul > li:last-child { margin-bottom: 0; }
.osc-editorial-app .osc-agent-note-content ul > li::before {
    content: '';
    position: absolute;
    left: -15px;               /* внутри колонки, НЕ на rail */
    top: .72em;
    width: 4px;
    height: 4px;
    border: 0;                 /* кольцо нужно только узлам, чтобы «прорезать» линию rail */
    border-radius: 50%;
    background: var(--text-muted);
    opacity: .72;
    box-sizing: border-box;
}
/* Вложенные списки — тире, ещё скромнее */
.osc-editorial-app .osc-agent-note-content ul ul {
    margin: 3px 0 3px 4px;
    padding-left: 13px;
}
.osc-editorial-app .osc-agent-note-content ul ul > li::before {
    left: -13px;
    top: .82em;
    width: 5px;
    height: 1px;
    border-radius: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   ТРЕЙС: «Думал» серым в ОБЕИХ темах + узлы покрупнее (2026-07-12)
   ══════════════════════════════════════════════════════════════════════ */

/* «Думал» в СВЕТЛОЙ теме оставался фиолетовым: chat-eye-comfort.css красит
   .think-header в var(--eye-primary) с !important, грузится ПОЗЖЕ chat-comfort
   и побеждал наш серый. Перебиваем отсюда (osc-editorial грузится последним).
   Сам --eye-primary тоже перекрашен, но «Думал» должен быть НЕ акцентным, а
   спокойным серым — это служебная строка, а не действие. */
body.osc-editorial-app .think-block.think-summary-only .think-header,
body.osc-editorial-app.light-theme .think-block.think-summary-only .think-header {
    color: var(--text-muted) !important;
}
body.osc-editorial-app.light-theme .think-block.think-summary-only .think-header {
    color: #6b6b6b !important;
}

/* Узлы на rail — чуть крупнее (7 -> 9px), чтобы читались.
   Линия rail на 440: карточка от 457, значит узел на -21px (457-21=436,
   центр 436+4.5=440.5). Так же и для текста агента / пунктов списка. */
.osc-editorial-app .message-events-stream .cli-step-dot {
    width: 9px;
    height: 9px;
    left: -21px;
}
.osc-editorial-app .osc-agent-note-mark {
    width: 9px;
    height: 9px;
}
/* (пункты списка на rail больше НЕ выносятся — см. блок про буллеты выше) */

/* ══════════════════════════════════════════════════════════════════════
   ПАНЕЛЬ «МОИ СЕРВЕРЫ» (2026-07-12)
   На неё падало общее editorial-правило для модалок:
       border: 1px solid var(--osc-ink)         -> в тёмной теме ink светлый => БЕЛАЯ обводка
       box-shadow: 10px 10px 0 var(--osc-signal) -> жёсткая ОРАНЖЕВАЯ плашка со смещением
   На маленьких модалках это смотрится как приём, но на большой панели с картами
   серверов — просто оранжевый блок сбоку и белая рамка. Убираем и то, и другое,
   оставляя обычную тёмную поверхность. Остальные модалки (welcome/agreement/wizard)
   свой editorial-вид сохраняют.
   ══════════════════════════════════════════════════════════════════════ */
.osc-editorial-app .servers-panel {
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: var(--bg-card);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
/* Внутренняя карточка сервера тоже была на editorial-рамке */
.osc-editorial-app .srv-panel-v2 {
    border: 1px solid var(--border);
    box-shadow: none;
}

/* Узлы на rail — ОДИН размер (2026-07-12).
   Точка шага (.cli-step-dot) считалась border-box: 9px = ИТОГОВЫЙ размер, а узел
   текста стоял на content-box: 9px + 2×2px рамки = 13px по факту, заметно крупнее.
   Переводим на border-box — видимый размер ровно 9px, как у зелёной точки шага. */
.osc-editorial-app .osc-agent-note-mark {
    box-sizing: border-box;
}

/* Нумерованные списки в тексте агента (2026-07-12).
   Раньше номера просто терялись (всё сваливалось в <ul>). Номер должен быть виден.
   Как и буллеты, номера живут ВНУТРИ текстовой колонки, а не на линии rail:
   на rail — один узел на весь блок. */
.osc-editorial-app .osc-agent-note-content ol {
    margin: 3px 0;
    padding: 0 0 0 22px;
    list-style: none;
    counter-reset: osc-ol;
}
.osc-editorial-app .osc-agent-note-content ol > li {
    position: relative;
    margin: 0 0 3px;
    padding: 0;
    line-height: 1.62;
    counter-increment: osc-ol;
}
.osc-editorial-app .osc-agent-note-content ol > li:last-child { margin-bottom: 0; }
.osc-editorial-app .osc-agent-note-content ol > li::before {
    content: counter(osc-ol) ".";
    position: absolute;
    left: -22px;               /* внутри колонки текста, НЕ на rail */
    top: 0;
    width: 17px;
    text-align: right;
    color: var(--text-muted);
    font: 600 11px/1.62 var(--osc-mono);
}
