/* Вкладка «Опционы», этап 1 (09.10.2026): доска страйков, карточка контракта.
   Цвета и размеры — те же переменные, что у «Арбитража», чтобы разделы
   выглядели одной программой. */
.opt-page { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); }
.opt-wrap { width: 100%; padding: 12px 14px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.opt-wrap.has-card { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.opt-main { min-width: 0; display: grid; gap: 8px; }
.opt-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 150 (20.10.2026): заголовок раздела — H1 (один на странице), без полей заголовка по умолчанию */
.opt-title { font-size: 20px; font-weight: 700; margin: 0 6px 0 0; line-height: 1.3; }
.opt-seg { display: inline-flex; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.opt-seg button { background: none; border: 0; color: var(--text-muted); padding: 6px 10px; font-size: 12px; cursor: pointer; font-family: var(--font-body); white-space: nowrap; }
.opt-seg button.on { background: rgba(59, 130, 246, .18); color: var(--text); }
.opt-seg button:focus-visible, .opt-btn:focus-visible, .opt-sel:focus-visible, .opt-cell:focus-visible { outline: 2px solid #3b82f6; outline-offset: -2px; }
.opt-seg-label { color: var(--text-faint); font-size: 11px; padding: 0 4px 0 8px; }
.opt-sel {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm);
    padding: 6px 8px; font-size: 12px; font-family: var(--font-body); max-width: 100%;
}
.opt-btn {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    border-radius: var(--radius-sm); padding: 6px 11px; font-size: 12px; cursor: pointer; font-family: var(--font-body);
}
.opt-btn:hover { background: var(--surface-3); }
.opt-btn.on { border-color: rgba(59, 130, 246, .6); background: rgba(59, 130, 246, .15); }
.opt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.opt-status {
    display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; font-size: 12px; color: var(--text-muted);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 7px 10px;
}
.opt-status b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.opt-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: #64748b; }
.opt-dot.live { background: #26a69a; }
.opt-dot.warn { background: #f59e0b; }
.opt-dot.bad { background: #ef5350; }
.opt-note {
    padding: 9px 12px; border-radius: var(--radius-md); font-size: 13px;
    background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .35);
}
.opt-note .opt-btn { margin-left: 8px; }
.opt-scroll { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--border); border-radius: var(--radius-md); scrollbar-width: thin; scrollbar-color: var(--surface-3, #2a2e39) transparent; }
.opt-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.opt-table th {
    position: sticky; top: 0; z-index: 2; background: var(--surface); color: var(--text-muted); font-weight: 500;
    padding: 6px 6px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap;
}
.opt-table thead tr:first-child th { top: 0; }
.opt-table thead tr:nth-child(2) th { top: 27px; }
.opt-table th.opt-grp { text-align: center; color: var(--text); font-weight: 600; letter-spacing: .02em; }
.opt-table td { padding: 4px 6px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.opt-table td.opt-k, .opt-table th.opt-k {
    text-align: center; font-weight: 700; background: var(--surface-2); color: var(--text);
    border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}
.opt-table tr.atm td.opt-k { background: rgba(59, 130, 246, .22); }
/* 114k (14.10.2026): страйк закреплён при прокрутке доски вбок — у левого и у правого края */
.opt-table td.opt-k { position: sticky; left: 0; right: 0; z-index: 1; }
.opt-table th.opt-k { left: 0; right: 0; z-index: 3; }
#opt-dense:empty { display: none; }
.opt-table td.itm { background: rgba(127, 127, 127, .07); }
.opt-cell { cursor: pointer; }
.opt-cell:hover { background: rgba(59, 130, 246, .08); }
.opt-cell.sel { box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .7); }
.opt-bid { color: #26a69a; }
.opt-ask { color: #ef5350; }
.opt-sz { color: var(--text-faint); font-size: 10px; margin-left: 3px; }
.opt-none { color: var(--text-faint); }
.opt-old { opacity: .55; }
.opt-diff-up { color: #ef5350; }
.opt-diff-dn { color: #26a69a; }
.opt-ex { color: var(--text-muted); }
.opt-frow td { padding: 0; border-bottom: 0; height: 0; position: relative; }
.opt-fmark {
    position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: #f59e0b; z-index: 1;
}
/* deploy105b: ячейка страйка в строке цены — над соседними линиями, метка не обрезается */
.opt-frow td.opt-fk { overflow: visible; z-index: 2; }
.opt-fmark span {
    position: absolute; left: 50%; transform: translate(-50%, -50%); top: 1px; background: #f59e0b; color: #111; z-index: 2;
    font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; white-space: nowrap;
}
.opt-foot { color: var(--text-faint); font-size: 11px; line-height: 1.45; }
.opt-skel { color: var(--text-muted); padding: 24px 12px; text-align: center; }

/* карточка контракта */
.opt-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px;
    position: sticky; top: 8px; max-height: calc(100vh - 24px); overflow: auto; font-size: 12px;
}
.opt-card-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.opt-card-title { font-size: 15px; font-weight: 700; }
.opt-card-code { color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; }
.opt-card-close { margin-left: auto; background: none; border: 0; color: var(--text-muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 2px 4px; }
.opt-kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.opt-kv dt { color: var(--text-muted); }
.opt-kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.opt-card h4 { margin: 10px 0 4px; font-size: 12px; color: var(--text); font-weight: 600; }
.opt-card .opt-foot { margin-top: 8px; }
.opt-backdrop { display: none; }

/* Конструктор позиций, этап 2 (09.10.2026). Тот же набор переменных, что у доски */
.opt-view { margin-left: auto; }
#opt-series { width: auto; flex: 0 1 auto; min-width: 0; }
.opt-view[hidden], .ok-wrap[hidden], #opt-board-view[hidden] { display: none; }
.opt-card-act { display: flex; gap: 6px; margin: 4px 0 8px; flex-wrap: wrap; }
.opt-card-act .opt-btn { flex: 1; }
.ok-buy { border-color: rgba(38, 166, 154, .55); }
.ok-sell { border-color: rgba(239, 83, 80, .55); }
.opt-card-added { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.opt-card-added .opt-btn { margin-top: 6px; }
.ok-wrap { display: grid; gap: 10px; min-width: 0; }
.ok-bar, .ok-sliders { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.ok-field { display: grid; gap: 3px; font-size: 11px; color: var(--text-faint); }
.ok-in {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm);
    padding: 6px 8px; font-size: 12px; font-family: var(--font-body); font-variant-numeric: tabular-nums;
}
.ok-in:focus-visible { outline: 2px solid #3b82f6; outline-offset: -2px; }
.ok-in-s { width: 92px; }
.ok-in-xs { width: 58px; text-align: right; }
.ok-in.est::placeholder { color: #f59e0b; }
.ok-legs { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
.ok-table td, .ok-table th { vertical-align: middle; }
.ok-table .ok-l { text-align: left; }
.ok-table td.ok-warn { white-space: normal; min-width: 160px; max-width: 280px; color: var(--text-muted); font-size: 11px; }
.ok-exp { color: var(--text-faint); font-size: 11px; margin-left: 4px; }
.ok-side { border: 1px solid var(--border); border-radius: var(--radius-sm); background: none; font-size: 12px; padding: 4px 9px; cursor: pointer; font-family: var(--font-body); font-weight: 600; }
.ok-side.buy { color: #26a69a; border-color: rgba(38, 166, 154, .55); }
.ok-side.sell { color: #ef5350; border-color: rgba(239, 83, 80, .55); }
.ok-del { background: none; border: 0; color: var(--text-muted); font-size: 17px; cursor: pointer; padding: 2px 6px; line-height: 1; }
.ok-del:hover { color: #ef5350; }
.ok-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ok-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 7px 10px; display: grid; gap: 2px; min-width: 0; }
.ok-tile span { color: var(--text-muted); font-size: 11px; }
.ok-tile b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ok-tile.up b { color: #26a69a; }
.ok-tile.dn b { color: #ef5350; }
.ok-chart-box { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px 8px 4px; }
.ok-chart { display: block; width: 100%; height: 320px; touch-action: pan-y; cursor: crosshair; }
.ok-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 11px; color: var(--text-muted); padding: 0 4px 6px; }
.ok-legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ok-lg::before { content: ''; display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--text); vertical-align: 3px; margin-right: 6px; }
.ok-lg-day::before { border-top: 2px dashed #3b82f6; }
.ok-lg-s::before { border-top: 2px dotted #f59e0b; }
.ok-tip {
    position: absolute; z-index: 3; pointer-events: none; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 6px 8px; font-size: 11px; line-height: 1.5; font-variant-numeric: tabular-nums; min-width: 140px;
}
.ok-slide { display: grid; gap: 3px; font-size: 11px; color: var(--text-faint); min-width: 180px; flex: 1; }
.ok-slide b { color: var(--text); font-weight: 600; }
.ok-slide input { width: 100%; accent-color: #3b82f6; }
.ok-notes { margin: 0; padding-left: 18px; font-size: 12px; color: var(--text-muted); display: grid; gap: 3px; }

/* Улыбка и сроки, этап 3 (09.10.2026) */
.os-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.os-head h3 { margin: 4px 0 0; font-size: 14px; font-weight: 600; }
.os-head .opt-btn { margin-left: auto; }
.os-lg::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.os-c::before { background: #3b82f6; }
.os-p::before { background: #a78bfa; }
.os-lg-ex::before { border-top: 2px dashed #94a3b8; }
.os-lg-note { color: var(--text-faint); }
.os-term-chart { height: 220px; }
.os-act { cursor: default; display: inline-block; }
.ok-table tr.atm td { background: rgba(59, 130, 246, .08); }

@media (max-width: 1100px) {
    .opt-wrap.has-card { grid-template-columns: minmax(0, 1fr); }
    .opt-card {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; max-height: 72vh;
        border-radius: 14px 14px 0 0; padding-bottom: calc(12px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 30px rgba(0, 0, 0, .35);
    }
    .opt-backdrop.on { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(0, 0, 0, .35); }
}
@media (max-width: 760px) {
    .opt-wrap { padding: 8px 8px 28px; }
    .opt-title { font-size: 17px; }
    .opt-table { font-size: 11.5px; }
    .opt-table td, .opt-table th { padding: 4px 4px; }
    .opt-wide { display: none; }
    .opt-sz { display: none; }
    .opt-scroll { max-height: none; }
    .opt-seg button { padding: 6px 8px; }
    .opt-view { margin-left: 0; }
    .ok-wide { display: none; }
    .ok-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ok-slide { min-width: 140px; }
    .ok-bar .opt-btn { flex: 1 1 auto; }
    .ok-table td.ok-warn { min-width: 130px; }
}

/* Журнал позиций (этап 5, 09.10.2026) */
/* Элемент сетки по умолчанию не уже содержимого: широкие таблицы журнала
   растягивали вид на телефоне. Ширину держит вид, таблицы прокручиваются внутри. */
#opt-journal, #opt-journal > * { min-width: 0; max-width: 100%; }
.oj-card { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 0 0 8px; background: var(--surface, transparent); min-width: 0; overflow: hidden; }
.oj-card.closed { opacity: .85; }
.oj-card > *:not(.oj-head) { margin: 8px 10px; }
.oj-head { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; background: none; border: 0; color: inherit;
    padding: 10px; cursor: pointer; text-align: left; font-family: var(--font-body); font-size: 13px; }
.oj-name { min-width: 0; overflow-wrap: anywhere; }
.oj-nums { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.oj-badge { font-size: 11px; border: 1px solid var(--border); border-radius: 10px; padding: 2px 8px; color: var(--text-muted); }
.oj-badge.ok { color: #26a69a; border-color: #26a69a; }
.oj-badge.bad { color: #ef5350; border-color: #ef5350; }
.oj-close { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.oj-close .ok-in-s { width: 70px; }
.oj-edit .ok-field { min-width: 0; }
.oj-note { flex: 1 1 220px; }
.oj-note .ok-in { width: 100%; }
.oj-del[data-sure="1"], .oj-x[data-sure="1"] { color: #ef5350; border-color: #ef5350; }
.oj-imp { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 8px 10px; margin: 8px 0; }
.oj-csv { width: 100%; box-sizing: border-box; font-family: var(--font-mono, monospace); font-size: 12px; background: var(--bg, transparent);
    color: inherit; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px; margin-top: 6px; }
.oj-file { font-size: 12px; max-width: 100%; }
.oj-sel { max-width: 320px; }
.oj-skip ul { margin: 4px 0; padding-left: 18px; font-size: 12px; }
@media (max-width: 640px) {
    .oj-head { flex-direction: column; align-items: flex-start; }
    .oj-sel { max-width: 200px; }
}

/* Алерты опционов (этап 6, 09.10.2026) */
#opt-alerts, #opt-alerts > * { min-width: 0; max-width: 100%; }
.oa-form { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; margin: 0 0 8px; display: grid; gap: 8px; }
.oa-note { flex: 1 1 220px; }
.oa-note .ok-in { width: 100%; }
.oa-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding-bottom: 7px; }
.oa-off td { opacity: .55; }

/* ---------- этап 7 (09.10.2026): сканер, ролл, ссылка на конструкцию ---------- */
.sc-flt { margin: 0 0 8px; }
.sc-flt > summary { cursor: pointer; font-size: var(--text-xs); color: var(--text-muted); padding: 2px 0 6px; }
#opt-scan .ok-table td .opt-btn { white-space: nowrap; }
#ok-view { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.ok-share-url { width: min(440px, 100%); font-family: var(--font-mono, monospace); }
.ok-roll-from { display: inline-block; padding: 6px 0; }
.oj-roll { margin: 8px 0 0; }
#ok-roll-box .ok-table, .oj-roll .ok-table { min-width: 0; }
/* Колонка сетки не шире экрана: широкая таблица ролла прокручивается внутри
   своего блока, а не раздвигает страницу на телефоне */
.opt-main, .ok-wrap, .oa-form { grid-template-columns: minmax(0, 1fr); }
.opt-btn:disabled, .ok-side:disabled, .ok-del:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 640px) {
  /* семь видов на 390 px не помещаются — список прокручивается по горизонтали */
  #opt-view { max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #opt-view::-webkit-scrollbar { display: none; }
  #opt-scan .ok-legs { overflow-x: auto; }
  .ok-roll-t th, .ok-roll-t td { white-space: normal; }
  .ok-roll-t td .ok-exp { display: block; }
  .ok-share-url { width: 100%; }
}

/* Этап 8.1 (10.10.2026): пояснения «?» и вид «Теория».
   Значок вместо title: на телефоне title не открывается, а лишнее место
   в заголовках доски недопустимо — поэтому значок маленький и без рамки
   на узком экране. Окно пояснения у значка на компьютере, лист снизу
   на телефоне. */
.opt-q {
    display: inline-flex; align-items: center; justify-content: center; vertical-align: 1px;
    width: 14px; height: 14px; margin-left: 3px; padding: 0; border-radius: 50%;
    border: 1px solid var(--border); background: none; color: var(--text-faint);
    font: 600 9px/1 var(--font-body); cursor: pointer; flex: none;
}
.opt-q:hover, .opt-q:focus-visible { color: var(--text); border-color: rgba(59, 130, 246, .6); outline: none; }
.opt-tl {
    background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
    text-decoration: underline dotted rgba(59, 130, 246, .7); text-underline-offset: 3px;
}
.opt-tl:hover, .opt-tl:focus-visible { color: #60a5fa; outline: none; }
.opt-term {
    position: fixed; z-index: 1000; max-height: min(70vh, 460px); overflow-y: auto;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .35); padding: 10px 12px; font-size: 13px; line-height: 1.45;
}
.opt-term p { margin: 6px 0; }
.opt-term-head { display: flex; align-items: flex-start; gap: 8px; }
.opt-term-head b { font-size: 14px; }
.opt-term-x { margin-left: auto; background: none; border: 0; color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.opt-term-k { color: var(--text-muted); font-weight: 600; }
.opt-term-f { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); background: var(--surface-2); border-radius: var(--radius-sm); padding: 4px 6px; overflow-wrap: anywhere; }
.opt-term-now { border-left: 2px solid rgba(59, 130, 246, .6); padding-left: 8px; }
.opt-term-more { margin-top: 4px; width: 100%; text-align: left; white-space: normal; }
.opt-term.sheet {
    left: 0; right: 0; bottom: 0; top: auto; width: auto !important; max-height: 75vh;
    border-radius: 14px 14px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    transition: transform .15s ease-out;
}
.opt-term.sheet::before { content: ''; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--border); margin: -6px auto 8px; }

.ot-wrap { display: grid; gap: 10px; max-width: 980px; }
.ot-nav { flex-wrap: wrap; max-width: 100%; }
.ot-body { display: grid; gap: 6px; font-size: 13px; line-height: 1.55; color: var(--text); }
.ot-body h3 { margin: 10px 0 0; font-size: 15px; font-weight: 600; }
.ot-body p { margin: 0; max-width: 72ch; }
.ot-ex { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 10px; align-items: start; }
.ot-ex .ok-chart { height: 260px; }
.ot-ex-ctl { display: grid; gap: 10px; }
.ot-ex-ctl input[type="range"] { width: 100%; }
.ot-ex-ctl b.up { color: #26a69a; }
.ot-ex-ctl b.dn { color: #ef5350; }
.ot-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ot-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px 10px; display: grid; gap: 6px; min-width: 0; }
.ot-mini { display: block; width: 100%; height: 90px; }
.ot-nums { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11px; color: var(--text-muted); }
.ot-nums b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ot-nums b.up { color: #26a69a; }
.ot-nums b.dn { color: #ef5350; }
.ot-scroll { max-height: none; }
@media (max-width: 760px) {
  .opt-table th .opt-q { width: 12px; height: 12px; margin-left: 1px; font-size: 8px; border-color: transparent; }
  .ot-ex { grid-template-columns: minmax(0, 1fr); }
  .ot-ex .ok-chart { height: 220px; }
  .ot-nav { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  /* 15.10.2026: кнопки разделов «Теории» сжимались уже текста (nowrap) — «Волатильность» и «Греки»
     наезжали друг на друга на 390 px. Ширина по тексту, лишнее уходит в прокрутку полосы. */
  .ot-nav button { flex: 0 0 auto; }
  .ot-cards { grid-template-columns: minmax(0, 1fr); }
}

/* Доска 2.0 (deploy91, 10.10.2026): фильтры, колонки, подсветка, стакан страйка.
   Подсветка — заливка клетки, а не цвет текста: бид и аск уже окрашены. */
.opt-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; display: grid; gap: 10px; }
.opt-panel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.opt-panel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.opt-panel-t { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.opt-panel .ok-in, .ob-qty .ok-in { width: 100%; height: 34px; padding: 4px 8px; font-size: 13px; }
.ob-qty .ok-in { max-width: 120px; }
.opt-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); cursor: pointer; }
.opt-collist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; }
.opt-collist li { display: flex; align-items: center; gap: 4px; min-height: 28px; }
.opt-collist li.off .opt-check { color: var(--text-muted); }
.opt-colmv { margin-left: auto; display: inline-flex; gap: 3px; }
.opt-colmv .opt-btn { padding: 2px 7px; }
.opt-fcount { font-size: 12px; color: var(--text-muted); padding: 0 2px; }
.opt-fcount b { color: var(--text); }
.opt-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--text-muted); align-items: center; }
.opt-legend span { display: inline-flex; align-items: center; gap: 4px; }
.opt-legend-note { color: var(--text-faint); font-size: 11px; }
.opt-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--border); }
.opt-sw.opt-oibar { background: linear-gradient(90deg, rgba(59, 130, 246, .35) 60%, transparent 60%); }
.opt-sw.opt-untrust { background: var(--surface-2); }
.opt-sw.itm { background: rgba(127, 127, 127, .18); }
.opt-table td.hl-buy, .opt-sw.hl-buy { background: rgba(38, 166, 154, .22); }
.opt-table td.hl-sell, .opt-sw.hl-sell { background: rgba(239, 83, 80, .2); }
.opt-table td.opt-untrust .opt-bid, .opt-table td.opt-untrust .opt-ask { color: var(--text-faint); }
.opt-table td.opt-dim { opacity: .32; }
.opt-table td.opt-oibar { background-image: linear-gradient(90deg, transparent calc(100% - var(--oi)), rgba(59, 130, 246, .16) calc(100% - var(--oi))); }
.opt-table td.opt-oibar[data-side="put"] { background-image: linear-gradient(90deg, rgba(59, 130, 246, .16) var(--oi), transparent var(--oi)); }
@keyframes opt-flash { from { box-shadow: inset 0 0 0 2px rgba(250, 204, 21, .9); } to { box-shadow: inset 0 0 0 2px transparent; } }
.opt-table td.opt-flash { animation: opt-flash 1.2s ease-out; }
@media (prefers-reduced-motion: reduce) { .opt-table td.opt-flash { animation: none; } }
.opt-table td.opt-kbtn { cursor: pointer; }
.opt-table td.opt-kbtn:hover { text-decoration: underline dotted; }
.opt-table td.opt-kbtn:focus-visible { outline: 2px solid #3b82f6; outline-offset: -2px; }
.opt-code { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.ob-qty { margin: 4px 0 8px; }
.ob-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-two h4 { margin: 4px 0; }
.ob-t { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.ob-t td { padding: 2px 4px; text-align: right; border-bottom: 1px solid var(--border); }
.ob-t td.ob-v { background-image: linear-gradient(90deg, transparent calc(100% - var(--w)), var(--obc) calc(100% - var(--w))); }
.ob-t tr.ob-ask { --obc: rgba(239, 83, 80, .16); }
.ob-t tr.ob-bid { --obc: rgba(38, 166, 154, .16); }
.ob-t tr.ob-ask .ob-p { color: #ef5350; }
.ob-t tr.ob-bid .ob-p { color: #26a69a; }
.ob-t tr.ob-ask + tr.ob-bid td { border-top: 2px solid var(--border); }
.ob-sum, .ob-ex { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.45; }
.ob-ex b { color: var(--text); }
.ob-two .opt-card-act { flex-direction: column; }
@media (max-width: 760px) {
  .opt-panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt-collist { grid-template-columns: minmax(0, 1fr); }
  .opt-toolbar .opt-btn { padding: 6px 9px; }
}

/* deploy92 (10.10.2026): конструктор 2.0 — закрытые ноги, фильтр ног,
   выбор базовой ноги SBER, легенда кривых по экспирациям */
.ok-lf { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.ok-basewrap { position: relative; display: inline-flex; }
.ok-basemenu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; display: grid; gap: 4px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); white-space: nowrap; }
.ok-basemenu[hidden] { display: none; }
.ok-table tr.ok-closed td { color: var(--text-muted); background: rgba(127, 127, 127, .06); }
.ok-side.off { opacity: .6; cursor: default; }
.ok-tag { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 9px; border: 1px solid var(--border); color: var(--text-muted); margin-left: 4px; vertical-align: 1px; }
.ok-up { color: #26a69a !important; }
.ok-dn { color: #ef5350 !important; }
.ok-acts { white-space: nowrap; }
.ok-closebtn { font-size: 11px; padding: 3px 8px; }
.ok-closeform td { background: rgba(59, 130, 246, .06); }
.ok-closeform .ok-bar { margin: 0; flex-wrap: wrap; }
.ok-lg-exps { display: contents; }
.ok-lgx { display: inline-flex; align-items: center; gap: 4px; }
.ok-lgx-eye { width: 14px; height: 14px; border-radius: 3px; border: 2px solid var(--c); background: var(--c); cursor: pointer; padding: 0; }
.ok-lgx.off .ok-lgx-eye { background: none; }
.ok-lgx.off .ok-lgx-name { opacity: .5; text-decoration: line-through; }
.ok-lgx-name { background: none; border: 0; color: var(--text-muted); font: inherit; cursor: pointer; padding: 2px 0; }
.ok-lgx.sel .ok-lgx-name { color: var(--text); text-decoration: underline; text-decoration-color: var(--c); text-underline-offset: 3px; }

/* deploy95 (10.10.2026): классы A/B/C в сканере */
.sc-cls { display: inline-grid; place-items: center; min-width: 22px; height: 20px; border-radius: 4px; font-size: 11px; font-weight: 700; border: 1px solid var(--border); color: var(--text-muted); cursor: help; }
.sc-cls-A { color: #fff; background: #1f8f84; border-color: #1f8f84; }
.sc-cls-B { color: #8a5a00; background: rgba(245, 158, 11, .16); border-color: rgba(245, 158, 11, .55); }
.sc-cls-C { color: var(--text-muted); }
[data-theme="dark"] .sc-cls-B { color: #fbbf24; }

/* Н3 (deploy97, 10.10.2026): пояснения внутри рамок «Проверки улыбки» и
   «Реализованная и подразумеваемая» — с отступами, иначе на 390 текст
   упирается в край рамки */
#os-checks > .opt-foot, #os-vol > .opt-foot, #os-term > .opt-foot { margin: 0; padding: 8px 10px; overflow-wrap: anywhere; }

/* Н4 (deploy98, 10.10.2026): статусы сравнения премиальных и маржируемых —
   рамка без заливки, чтобы не путать с классами A/B/C сканера */
.os-st { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--border); white-space: nowrap; cursor: help; }
.os-st-m { color: var(--text); border-color: var(--text-muted); }
.os-st-a { color: var(--text-muted); border-style: dashed; }
.os-st-n { color: var(--text-muted); opacity: .7; }
#os-cmp > .opt-foot { margin: 0; padding: 8px 10px; overflow-wrap: anywhere; }

/* Д8 (deploy93, 10.10.2026): в колонках уровней текст переносится — на 390
   таблица ключевых страйков иначе уходила за край на 70 px */
[data-testid="og-keys-lv"] td.ok-l, [data-testid="og-keys-lv"] th.ok-l { white-space: normal; }
@media (max-width: 640px) {
    [data-testid="og-keys-lv"] td, [data-testid="og-keys-lv"] th { padding-left: 4px; padding-right: 4px; }
    [data-testid="og-keys-lv"] td.ok-l { min-width: 0; font-size: 12px; }
}

/* ---------- deploy94 (10.10.2026): «Опционы» на телефоне ----------
   Класс .opt-m ставит opmobile.js на #opt-page при ширине до 760 px. Все правила
   ниже — только под ним: компьютерный вид не меняется. Высота листов — из
   Telegram (--opm-vh), в браузере — 100vh. */
#opm-nav, #opm-series, #opm-bar, #opm-acts, #opm-more, #opm-back, #opm-kmore, .opm-tb-h { display: none; }
.opt-m #opt-view, .opt-m #opt-series { display: none; }
.opt-m .opt-wrap { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
.opt-m.opm-has-acts .opt-wrap { padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
.opt-m .opt-title-row { gap: 6px; }
.opt-m .opt-title { font-size: 17px; margin-right: 2px; }
.opt-m .opt-scroll { max-height: none; }
.opt-m .opt-card { max-height: calc(var(--opm-vh, 100vh) * .72); overflow-y: auto; }

/* Нижняя панель видов */
.opt-m #opm-nav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 58;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
}
.opm-nav button {
    position: relative; min-height: 48px; background: none; border: 0; border-radius: 10px;
    color: var(--text-muted); font: 500 12px/1.1 var(--font-body); cursor: pointer; padding: 4px 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.opm-nav button.on { color: var(--text); background: rgba(59, 130, 246, .16); }
/* «Конструктор» — самое длинное слово панели: на 360 px кнопка ~70 px, поэтому
   шрифт чуть меньше, а число ног — значком в углу, не в строке */
.opm-nav button { font-size: 11px; letter-spacing: -.2px; padding: 4px 0; text-overflow: clip; }
.opm-badge {
    position: absolute; top: 2px; right: 2px; min-width: 16px; padding: 1px 4px; border-radius: 8px;
    background: #3b82f6; color: #fff; font-size: 10px; line-height: 14px; letter-spacing: 0;
}
/* Ноги в карточке стратегии помещаются в ширину экрана */
.opt-m #opt-konstr:not(.opm-kfull) .ok-table td, .opt-m #opt-konstr:not(.opm-kfull) .ok-table th { padding: 4px 3px; }
.opt-m #opt-konstr .ok-table .ok-in-xs { width: 40px; }
.opt-m #opt-konstr .ok-table .ok-in-s { width: 56px; }
.opt-m #opt-konstr:not(.opm-kfull) .ok-table td:nth-child(3) { white-space: normal; min-width: 0; font-size: 11px; line-height: 1.25; }
.opt-m #opt-konstr:not(.opm-kfull) .ok-table td.ok-acts { white-space: nowrap; }
.opt-m #opt-konstr:not(.opm-kfull) .ok-table td.ok-acts .ok-closebtn { font-size: 11px; }
/* Удалить ногу — в «Подробно»: в свёрнутом виде кнопка «×» не помещается на 360 px */
.opt-m #opt-konstr:not(.opm-kfull) .ok-table tr:not(.ok-closed) td.ok-acts .ok-del { display: none; }
.opt-m #opt-konstr .ok-table .ok-side { padding: 4px 6px; }
.opt-m #opt-konstr .ok-table .ok-closebtn { padding: 4px 6px; }

/* Лента серий */
.opt-m #opm-series {
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin: 0 -8px; padding: 0 8px 2px;
}
.opt-m #opm-series::-webkit-scrollbar { display: none; }
.opm-series button {
    flex: none; min-height: 40px; padding: 4px 12px; border-radius: 20px; cursor: pointer;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
    font: 500 13px var(--font-body); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.opm-series button small { font-size: 11px; color: var(--text-faint); }
.opm-series button.on { color: var(--text); border-color: rgba(59, 130, 246, .7); background: rgba(59, 130, 246, .16); }

/* Строка доски и стороны */
.opt-m #opm-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.opt-m #opm-bar .opt-btn { flex: 1 1 auto; }
.opt-m.opm-only-call #opt-scroll [data-side="put"], .opt-m.opm-only-put #opt-scroll [data-side="call"] { display: none; }

/* Листы снизу: «Ещё», настройки доски, фильтры, колонки */
.opt-m #opm-back.on { display: block; position: fixed; inset: 0; z-index: 61; background: rgba(0, 0, 0, .35); }
.opt-m #opm-more:not([hidden]), .opt-m.opm-tb-open .opt-toolbar,
.opt-m #opt-flt:not([hidden]), .opt-m #opt-cols:not([hidden]) {
    display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 62; margin: 0;
    max-height: calc(var(--opm-vh, 100vh) * .72); overflow-y: auto;
    background: var(--surface); border-top: 1px solid var(--border); border-radius: 14px 14px 0 0;
    padding: 14px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .35);
}
.opt-m #opt-flt:not([hidden]), .opt-m #opt-cols:not([hidden]) { display: block; }
.opt-m .opt-toolbar { display: none; }
.opt-m.opm-tb-open .opm-tb-h, #opm-more .opm-sheet-h { display: block; width: 100%; font-weight: 600; font-size: 14px; margin: 0 0 4px; }
.opm-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.opm-list .opt-btn { min-height: 48px; font-size: 14px; }
.opm-list .opt-btn.on { border-color: rgba(59, 130, 246, .6); background: rgba(59, 130, 246, .15); }

/* Зоны нажатия не меньше 40 × 40 (кроме ячеек таблиц и значков «?») */
#opt-page.opt-m button:not(.opt-q), #opt-page.opt-m select,
#opt-page.opt-m input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) { min-height: 40px; }
#opt-page.opt-m button:not(.opt-q) { min-width: 40px; }
#opt-page.opt-m .opt-seg button { padding: 6px 10px; }
/* Значок «?» остаётся маленьким, но нажимается пальцем: невидимая зона вокруг */
#opt-page.opt-m .opt-q { position: relative; }
#opt-page.opt-m .opt-q::before { content: ''; position: absolute; inset: -13px; }
.opt-m ~ .opt-term .opt-term-x, .opt-term.sheet .opt-term-x { min-width: 40px; min-height: 40px; }

/* Конструктор — карточка стратегии: сводка и график сверху, ноги ниже,
   действия закреплены, остальное — по «Подробно» */
.opt-m #opt-konstr #ok-view, .opt-m #opt-konstr #ok-msg { order: 0; }
.opt-m #opt-konstr .ok-tiles { order: 1; }
.opt-m #opt-konstr .ok-chart-box { order: 2; }
.opt-m #opt-konstr #ok-lf { order: 3; }
.opt-m #opt-konstr .ok-legs { order: 4; }
.opt-m #opt-konstr #opm-kmore { order: 5; display: block; }
.opt-m #opt-konstr .ok-sliders { order: 6; }
.opt-m #opt-konstr .ok-bar, .opt-m #opt-konstr #ok-roll-box { order: 7; }
.opt-m #opt-konstr .ok-notes { order: 8; }
.opt-m #opt-konstr .opt-foot { order: 9; }
.opt-m.opm-kempty #opt-konstr .ok-bar { order: -1; }
.opt-m.opm-kempty #opt-konstr #opm-kmore { display: none; }
.opt-m #opt-konstr .ok-chart { height: 240px; }
.opt-m #opt-konstr .ok-tile { padding: 5px 8px; }
.opt-m #opt-konstr:not(.opm-kfull) .ok-tile:nth-child(n+7),
.opt-m #opt-konstr:not(.opm-kfull) .ok-notes,
.opt-m #opt-konstr:not(.opm-kfull) .opt-foot { display: none; }
.opt-m #opt-konstr:not(.opm-kfull) .ok-table tr:not(.ok-closed):not(.ok-closeform) > :is(th, td):is(:nth-child(4), :nth-child(5), :nth-child(8), :nth-child(10)) { display: none; }
#opm-kfull { width: 100%; }
.opt-m #opm-acts:not([hidden]) {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
    position: fixed; left: 0; right: 0; z-index: 57; bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border-top: 1px solid var(--border); padding: 6px 8px;
}

/* Журнал: кнопки позиции крупнее */
.opt-m .oj-card .opt-btn { min-height: 44px; }

/* deploy101 (10.10.2026): подписи групп видов — «Рынок», «Идеи», «Мои» */
.opt-vg { align-self: center; padding: 0 4px 0 10px; color: var(--text-muted); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.opt-vg:first-child { padding-left: 4px; }
.opt-vg:not(:first-child) { margin-left: 4px; border-left: 1px solid var(--border); }

/* deploy102 (10.10.2026): «Основной» в «Опционах». Конструктор на компьютере —
   как на телефоне: 6 плиток, без заметок и подписей; всё — «Все показатели и ноги» */
#opt-uimode { margin-left: auto; }
#opt-kfull-pc { align-self: flex-start; margin: 0 0 6px; }
.opt-m #opt-kfull-pc { display: none !important; }
html[data-ui-mode="basic"] #opt-page:not(.opt-m) #opt-konstr:not(.opm-kfull) .ok-tile:nth-child(n+7),
html[data-ui-mode="basic"] #opt-page:not(.opt-m) #opt-konstr:not(.opm-kfull) .ok-notes { display: none; }

/* deploy106a (10.10.2026): все опционы биржи — список «Все активы» и строка справочника */
.opt-asset-all { max-width: 280px; }
.opt-instr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 2px; font-size: 12px; color: var(--text-muted); }
.opt-instr-g { color: var(--text); font-weight: 600; }
.opt-instr-k { color: var(--text-faint); font-weight: 400; }
.opt-instr-os { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.opt-instr-o, .opt-instr-main { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 11px; padding: 2px 7px; cursor: pointer; font-family: var(--font-body); }
.opt-instr-o.on { background: rgba(59, 130, 246, .18); color: var(--text); }
.opt-instr-bg { font-size: 11px; color: #b58900; border: 1px solid rgba(181, 137, 0, .45); border-radius: var(--radius-sm); padding: 1px 6px; }
.opt-instr-main { margin-left: auto; }
.opt-m .opt-assets { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.opt-m .opt-assets::-webkit-scrollbar { display: none; }
.opt-m .opt-asset-all { max-width: 100%; flex: 1 1 160px; }
.opt-m .opt-instr-main { margin-left: 0; }
.opt-m .opt-instr.opt-instr-off { display: none; }

/* 109 (11.10.2026): графики греков в конструкторе — четыре малых графика
   с теми же кривыми, что профиль P/L; на телефоне по одному, переключателем */
.ok-gk { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 10px 6px; display: grid; gap: 8px; }
.ok-gk[hidden] { display: none; }
.ok-gk-head { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: 13px; }
.ok-gk-seg { margin-left: auto; }
.ok-gk-seg button[aria-pressed="true"] { background: var(--accent, #3b82f6); color: #fff; border-color: transparent; }
.ok-gk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ok-gk-grid.one { grid-template-columns: minmax(0, 1fr); }
.ok-gk-cell { position: relative; border: 1px solid var(--border); border-radius: 10px; padding: 6px 6px 2px; min-width: 0; }
.ok-gk-cell canvas { display: block; width: 100%; height: 190px; touch-action: pan-y; cursor: crosshair; }
.ok-gk-t { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 0 2px 4px; }
.ok-gk-t span { color: var(--text-muted); }
.ok-gk-t i { font-style: normal; color: var(--text-faint); }
.ok-gk-t b { font-variant-numeric: tabular-nums; font-weight: 600; color: #3b82f6; }
.ok-gk-foot { margin: 0; font-size: 11px; color: var(--text-faint); }
@media (max-width: 760px) {
    .ok-gk-grid { grid-template-columns: minmax(0, 1fr); }
    .ok-gk-seg { margin-left: 0; width: 100%; display: flex; }
    .ok-gk-seg button { flex: 1; padding: 6px 4px; }
}
.opt-m #opt-konstr .ok-gk { order: 6; }

/* 113b (12.10.2026): кнопка «Скопировать ссылку на актив и серию» */
.opt-link { display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; min-width: 32px; }
.opt-link svg { display: block; }
.opt-link.is-done { color: var(--green, #26a69a); border-color: currentColor; }

/* 113c (12.10.2026): виды опционов, которых нет в подписке */
.opt-view button.is-locked { opacity: .62; }
.opt-view button.is-locked::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 5px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 10V7a6 6 0 0 1 12 0v3h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1zm2 0h8V7a4 4 0 0 0-8 0v3z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 10V7a6 6 0 0 1 12 0v3h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1zm2 0h8V7a4 4 0 0 0-8 0v3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.opt-locked { padding: 18px 0; }
.opt-locked-card { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 16px 18px; font-size: 13px; line-height: 1.55; background: var(--surface-2); max-width: 720px; }
.opt-more { color: var(--accent, #14b8a6); font-weight: 600; white-space: nowrap; }

/* 114f (13.10.2026): переключатель вида опционов у одной кнопки актива и
   пометка ноги второго вида в конструкторе */
.opt-style button { font-size: 12px; }
.ok-exp.ok-kind { color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.opt-m .opt-style { max-width: 100%; }

/* 114j (14.10.2026): «Две базы» — нога Si у CNY, курс USDCNY, таблица «CR × USDCNY» */
.ok-x2 { margin: 8px 0; }
.ok-x2-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; }
.ok-x2-hint { font-size: 12.5px; color: var(--text-muted); margin: 8px 0 0; line-height: 1.4; }
.ok-x2-hint.ok-dn { color: #ef5350; }
.ok-x2r { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 10px 0; display: grid; gap: 8px; }
.ok-x2-hh { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; }
.ok-x2-m { font-size: 11.5px; color: var(--text-muted); font-weight: 400; }
.ok-x2-sl { max-width: 520px; }
.ok-x2-tw { overflow-x: auto; }
.ok-x2-t { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 100%; }
.ok-x2-t caption { text-align: left; font-size: 12px; color: var(--text-muted); padding-bottom: 6px; }
.ok-x2-t th, .ok-x2-t td { padding: 4px 8px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ok-x2-t th:first-child { text-align: left; }
.ok-x2-t thead th, .ok-x2-t tr:first-child th { font-weight: 600; }
.ok-x2-t .is-sel { outline: 1px solid var(--primary, #3b82f6); outline-offset: -1px; }
.ok-x2-t tr.is-now th, .ok-x2-t tr.is-now td { border-top: 1px solid #f59e0b; border-bottom: 1px solid #f59e0b; }
.ok-x2-link { background: none; border: 0; padding: 0; color: var(--primary, #3b82f6); font: inherit; cursor: pointer; text-decoration: underline; }
.opt-table tr.atm td.opt-k { background: linear-gradient(rgba(59, 130, 246, .22), rgba(59, 130, 246, .22)), var(--surface-2); }

/* 125 (17.10.2026): этап 13 — матрица P/L на соседних зонах ASC в конструкторе */
.ok-zm { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px 10px; display: grid; gap: 6px; }
.ok-zm-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; justify-content: space-between; font-size: 13px; }
.ok-zm-scroll { overflow-x: auto; }
.ok-zm-t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.ok-zm-t th, .ok-zm-t td { padding: 6px 8px; border-top: 1px solid var(--border); text-align: right; white-space: nowrap; }
.ok-zm-t thead th { border-top: 0; color: var(--text-muted); font-weight: 500; font-size: 12px; }
.ok-zm-t th[scope=row], .ok-zm-t thead th:first-child { text-align: left; white-space: normal; min-width: 150px; }
.ok-zm-m { display: block; color: var(--text-muted); font-size: 11px; font-weight: 400; }
.ok-zm-t td.up { color: #26a69a; }
.ok-zm-t td.dn { color: #ef5350; }
.ok-zm-f { margin: 0; font-size: 11px; color: var(--text-faint); }
.ok-zm-f b { color: #b7791f; font-weight: 600; }
@media (max-width: 600px) {
  /* 126: на телефоне матрица плотнее — четыре срока помещаются без прокрутки чаще */
  .ok-zm { padding: 8px; }
  .ok-zm-t { font-size: 12px; }
  .ok-zm-t th, .ok-zm-t td { padding: 5px 4px; }
  .ok-zm-t th[scope=row], .ok-zm-t thead th:first-child { min-width: 112px; }
}
/* 136 (18.10.2026): цепочка «по середине → по исполнимым ценам → с издержками» во всю ширину плиток */
.ok-tiles .ok-rz { grid-column: 1 / -1; }
.ok-tiles .ok-rz .rz { margin: 0; }
/* 140 (18.10.2026): этап 13 — «Соответствие ограничениям профиля» (Strategy Fit) в конструкторе */
.ok-fit { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px 10px; display: grid; gap: 6px; }
.ok-fit-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; justify-content: space-between; font-size: 13px; }
.ok-fit-s { color: var(--text-muted); font-size: 12px; }
.ok-fit-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.ok-fit-i { display: grid; grid-template-columns: 18px 1fr; gap: 6px; align-items: start; color: var(--text); }
.ok-fit-m { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; }
.ok-fit-ok .ok-fit-m { background: #26a69a; }
.ok-fit-warn .ok-fit-m { background: #d97706; }
.ok-fit-na .ok-fit-m { background: var(--text-faint); }
.ok-fit-na { color: var(--text-muted); }
.ok-fit-f { margin: 0; font-size: 11px; color: var(--text-faint); }
