/* Раздел «Арбитраж» (08.10.2026). Выбор пары повторяет обозреватель бумаг
   (классы inst-*), поэтому здесь только то, чего у него нет: лепестки пар,
   панель кнопок, карточки итогов, графики и диалоги. */
.arb-page { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); }
.arb-wrap { width: 100%; margin: 0; padding: 12px 14px 40px; }
.arb-head { display: grid; gap: 8px; margin-bottom: 10px; }
.arb-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* 150 (20.10.2026): заголовок раздела — H1 (один на странице) */
.arb-title { font-size: 20px; font-weight: 700; margin: 0 4px 0 0; line-height: 1.3; }
.arb-pair-open { width: auto; min-width: 220px; max-width: 100%; }
.arb-star {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
    border-radius: var(--radius-sm); width: 34px; height: 34px; font-size: 17px; cursor: pointer;
}
.arb-star.is-on { color: #f59e0b; border-color: rgba(245, 158, 11, .5); }
.arb-source { color: var(--text-muted); font-size: 12px; margin-left: auto; }
.arb-chips { padding: 0; }
/* Полоса прокрутки лепестков — тонкая и тёмная: белая системная полоса
   резала тёмную тему (снимок владельца 08.10.2026) */
.arb-petals { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: var(--surface-3, #2a2e39) transparent; }
.arb-petals::-webkit-scrollbar { height: 6px; }
.arb-petals::-webkit-scrollbar-track { background: transparent; }
.arb-petals::-webkit-scrollbar-thumb { background: var(--surface-3, #2a2e39); border-radius: 3px; }
.arb-petals::-webkit-scrollbar-thumb:hover { background: var(--border, #3a3f4b); }
.arb-petal {
    flex: none; background: var(--surface); border: 1px solid var(--border); color: var(--text);
    border-radius: 999px; padding: 5px 12px; font-size: 12px; font-family: var(--font-mono); cursor: pointer;
    border-left-width: 3px;
}
.arb-petal.up { border-left-color: #26a69a; }
.arb-petal.dn { border-left-color: #ef5350; }
.arb-petal.on { background: rgba(59, 130, 246, .15); border-color: rgba(59, 130, 246, .6); }
.arb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.arb-spacer { flex: 1; }
.arb-seg { display: inline-flex; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.arb-seg button { background: none; border: 0; color: var(--text-muted); padding: 6px 10px; font-size: 12px; cursor: pointer; font-family: var(--font-body); }
.arb-seg button.on { background: rgba(59, 130, 246, .18); color: var(--text); }
.arb-seg-label { color: var(--text-faint); font-size: 11px; padding: 0 4px 0 8px; }
.arb-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);
}
.arb-btn:hover { background: var(--surface-3); }
.arb-btn-main { background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%); color: #fff; border-color: transparent; }
.arb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.arb-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px 10px; min-width: 0; }
.arb-card-k { color: var(--text-muted); font-size: 11px; }
.arb-card-v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arb-card-s { color: var(--text-faint); font-size: 11px; line-height: 1.3; }
.arb-chart-box { position: relative; }
.arb-legend {
    position: absolute; z-index: 3; left: 8px; top: 6px; right: 70px; font-size: 11px; color: var(--text-muted);
    pointer-events: none; line-height: 1.4; text-shadow: 0 0 3px var(--bg);
}
.arb-chart { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; min-height: 300px; }
.arb-sub { min-height: 170px; margin-top: 4px; }
.arb-sub-head { margin-top: 8px; }
.arb-note {
    margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-md); font-size: 13px;
    background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .35);
}
/* 08.10.2026: фандинг и ставки — свёрнутые строки над графиком, таблица раскрывается и прокручивается внутри */
.arb-panels { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 8px; margin-top: 8px; align-items: start; }
.arb-panels:not(:has(.arb-panel:not([hidden]) + .arb-panel:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
.arb-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0; min-width: 0; }
.arb-strip-head {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; width: 100%; padding: 7px 10px;
    background: none; border: 0; color: var(--text-muted); font: inherit; font-size: 12px; text-align: left; cursor: pointer;
    border-radius: var(--radius-md);
}
.arb-strip-head:hover { background: var(--surface-2, rgba(127, 127, 127, .08)); }
.arb-strip-head b { color: var(--text); font-variant-numeric: tabular-nums; }
.arb-strip-caret { width: 10px; color: var(--text-muted); }
.arb-strip-more { margin-left: auto; color: var(--primary, #3b82f6); }
.arb-strip-body { padding: 0 12px 10px; }
.arb-fund-scroll { max-height: 38vh; overflow: auto; }
.arb-fund-scroll thead th { position: sticky; top: 0; background: var(--surface); }
.arb-bad { color: #ef5350; }
.arb-good { color: #26a69a; }
.arb-journalzone { margin-top: 10px; }
.arb-jr-btns { white-space: nowrap; }
.arb-jr-btns .arb-btn { padding: 3px 8px; font-size: 12px; margin-left: 4px; }
.arb-bt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 12px; }
.arb-bt-cards { flex-wrap: wrap; margin: 10px 0 6px; }
.arb-bt-cards .arb-card { flex: 1 1 140px; }
.arb-equity { width: 100%; height: 120px; display: block; margin: 6px 0; color: var(--text-muted); }
.arb-book-legs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.arb-book-legs h4 { font-size: 13px; margin-bottom: 4px; }
.arb-book-t td.ask { color: #ef5350; }
.arb-book-t td.bid { color: #26a69a; }
.arb-panel h3 { font-size: 14px; margin-bottom: 8px; }
.arb-fund-top { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.arb-fund-top b { color: var(--text); font-variant-numeric: tabular-nums; }
.arb-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.arb-table th { text-align: left; color: var(--text-muted); font-weight: 500; padding: 4px 6px; border-bottom: 1px solid var(--border); }
.arb-table td { padding: 4px 6px; border-bottom: 1px solid var(--border); }
.arb-table tr.arb-partial td { color: var(--text-muted); }
.arb-muted { color: var(--text-muted); font-size: 12px; line-height: 1.45; margin-top: 6px; }
.arb-foot { color: var(--text-faint); font-size: 11px; margin-top: 12px; }
.arb-up { color: #26a69a; }
.arb-dn { color: #ef5350; }
.arb-box-wide { max-width: 680px; }
.arb-dlg-title { font-size: 15px; flex: 1; }
.arb-dlg-body { overflow-y: auto; padding: 4px 14px 16px; }
.arb-form { display: grid; gap: 8px; }
.arb-form h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-top: 8px; }
.arb-field { display: grid; grid-template-columns: minmax(0, 1fr) 170px; align-items: center; gap: 10px; font-size: 13px; }
.arb-field input, .arb-field select, .arb-div input, .arb-div select {
    width: 100%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    border-radius: var(--radius-sm); padding: 6px 8px; font-size: 13px; font-family: var(--font-body);
}
.arb-check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.arb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.arb-admin { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--border); }
.arb-x { background: none; border: 0; color: var(--text-muted); cursor: pointer; }
.arb-row { gap: 10px; }
.arb-row-nums { display: grid; text-align: right; font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.arb-al-list { display: grid; gap: 6px; }
.arb-al { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.arb-al.off { opacity: .6; }
.arb-al-btns { display: flex; gap: 6px; flex: none; }
.arb-calc-out { display: grid; gap: 4px; margin-top: 8px; padding: 10px; background: var(--surface-2); border-radius: var(--radius-md); }
.arb-calc-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.arb-calc-row b { font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 700px) {
    .arb-panels { grid-template-columns: minmax(0, 1fr); }
    .arb-book-legs { grid-template-columns: 1fr; }
    .arb-wrap { padding: 10px 8px 30px; }
    .arb-field { grid-template-columns: 1fr; gap: 4px; }
    .arb-source { margin-left: 0; width: 100%; }
    .arb-pair-open { flex: 1; min-width: 0; }
    .arb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .arb-legend { right: 8px; font-size: 10px; }
    .arb-toolbar .arb-spacer { display: none; }
    .arb-al { flex-direction: column; align-items: stretch; }
}

/* Сетка окон 1/2/4 — как в «Акциях». Высота сетки задаётся скриптом по
   свободной высоте экрана, окна делят её поровну; график внутри окна
   занимает всю площадь (autoSize). */
.arb-title-row .arb-layout, .arb-title-row .arb-link { flex: none; }
.arb-chartzone { min-width: 0; }
.arb-grid { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); min-height: 260px; }
.arb-grid[data-layout="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.arb-grid[data-layout="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.arb-cell { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.arb-cell.is-active { border-color: rgba(59, 130, 246, .7); box-shadow: 0 0 0 1px rgba(59, 130, 246, .35); }
.arb-cell-head { display: flex; gap: 6px; padding: 4px 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex: none; }
/* Общий select в styles.css растянут на 100% ширины — здесь ширину делим
   сами: пара забирает остаток, таймфрейм узкий */
.arb-cell-head select { min-width: 0; background-color: var(--surface); font-size: 12px; padding: 3px 24px 3px 8px; background-position: right 7px center; }
.arb-cell-head .arb-cell-pair { flex: 1 1 auto; width: auto; max-width: 260px; }
.arb-cell-head .arb-cell-tf { flex: none; width: 76px; }
.arb-cell-body { position: relative; flex: 1; min-height: 0; }
.arb-cell-chart { position: absolute; inset: 0; }
.arb-subzone { margin-top: 4px; }
.arb-sub { min-height: 100px; }
.arb-mode { flex: none; }
/* Режим «Таблица» */
.arb-tablezone { min-width: 0; }
.arb-table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.arb-cols { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px; margin-bottom: 8px; }
.arb-cols-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 14px; }
.arb-col-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.arb-col-move { display: inline-flex; gap: 2px; flex: none; }
.arb-col-move button:disabled { opacity: .3; cursor: default; }
.arb-table-scroll { overflow: auto; max-width: 100%; }
.arb-tablezone .arb-table-scroll { max-height: calc(100vh - 220px); border: 1px solid var(--border); border-radius: var(--radius-md); }
.arb-screen th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); white-space: nowrap; }
.arb-screen td { white-space: nowrap; }
.arb-screen td:first-child, .arb-screen th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 2; }
.arb-screen th:first-child { background: var(--surface-2); z-index: 3; }
.arb-th-sort { cursor: pointer; user-select: none; }
.arb-th-sort:hover { color: var(--text); }
.arb-screen tbody tr { cursor: pointer; }
.arb-screen tbody tr:hover td { background: var(--surface-2); }
.arb-table-scroll { scrollbar-width: thin; scrollbar-color: var(--surface-3, #2a2e39) transparent; }
/* Исполнение вечного фьючерса в калькуляторе */
.arb-exec-note { font-size: 12px; line-height: 1.45; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; background: var(--surface-2); }
.arb-exec-note b { color: var(--text); }
.arb-exec-note ul { margin: 6px 0 6px 18px; padding: 0; display: grid; gap: 3px; }
.arb-exec-note a { color: #60a5fa; }
@media (max-width: 860px) {
    /* На узком экране всегда одно окно — кнопки 1/2/4 и скрепка не нужны */
    .arb-title-row .arb-layout, .arb-title-row .arb-link { display: none; }
}
@media (max-width: 700px) {
    .arb-title { font-size: 17px; }
    .arb-mode { order: 5; }
    .arb-tablezone .arb-table-scroll { max-height: none; }
    .arb-cols-list { grid-template-columns: 1fr; }
    /* Карточки на телефоне — одна прокручиваемая лента: столбик из девяти
       карточек уводил график за пределы экрана */
    .arb-cards { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .arb-cards::-webkit-scrollbar { display: none; }
    .arb-card { flex: 0 0 auto; min-width: 128px; max-width: 170px; }
    .arb-card-v { font-size: 15px; }
}
.arb-bt-grid .arb-field { display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
.arb-bt-grid .arb-field > span { white-space: normal; font-size: 12px; color: var(--text-muted); }
.arb-bt-grid .arb-field input, .arb-bt-grid .arb-field select { width: 100%; min-width: 0; }
@media (max-width: 700px) {
    .arb-bt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .arb-bt-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
    .arb-bt-cards .arb-card { min-width: 0; max-width: none; }
}
.arb-dlg-body { min-width: 0; overflow-x: hidden; }
.arb-dlg-body .arb-form, .arb-dlg-body .arb-form > * { min-width: 0; max-width: 100%; }
.arb-dlg-body .arb-table-scroll { max-width: 100%; overflow-x: auto; }
/* 08.10.2026: ненадёжная модель справедливого */
.arb-card-warn { border-color: rgba(245, 158, 11, .6); background: rgba(245, 158, 11, .08); }
.arb-card-warn .arb-card-v { color: #d97706; }
.arb-card-warn .arb-card-s { white-space: normal; }
.arb-unrel { color: #d97706; font-weight: 600; }

/* 08.10.2026: телефон, окно Telegram и горизонтальный телефон. До графика
   было ~900 px кнопок (снимки владельца из Telegram): теперь каждая группа
   управления — одна прокручиваемая строка, заголовок раздела скрыт (он уже
   есть во вкладке), блоки фандинга и ставок переезжают под график. */
.arb-update {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 10px;
    border-radius: var(--radius-md); font-size: 13px;
    background: rgba(59, 130, 246, .12); border: 1px solid rgba(59, 130, 246, .45);
}
.arb-update[hidden] { display: none; }
@media (max-width: 700px), (max-height: 520px) and (orientation: landscape) {
    .arb-wrap { padding: 6px 8px 24px; }
    .arb-head, .arb-top { gap: 6px; }
    .arb-title { display: none; }
    .arb-title-row { flex-wrap: nowrap; gap: 6px; margin-bottom: 6px; }
    .arb-pair-open { flex: 1 1 auto; min-width: 0; height: 34px; }
    .arb-pair-open .inst-open-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .arb-star { flex: none; }
    .arb-mode { order: 0; flex: none; }
    .arb-mode button { padding: 6px 8px; }
    .arb-mode button span { display: none; }
    .arb-mode button::after { content: attr(data-short); }
    /* Строки-ленты: группы, пары, инструменты, карточки */
    .arb-chips, .arb-toolbar {
        display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin-bottom: 6px;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
        padding-right: 20px;
    }
    .arb-chips::-webkit-scrollbar, .arb-toolbar::-webkit-scrollbar { display: none; }
    .arb-chips > *, .arb-toolbar > * { flex: none; }
    .arb-chips .inst-chip, .arb-chips button { padding: 4px 10px; font-size: 12px; white-space: nowrap; }
    .arb-petals { margin-bottom: 6px; padding-bottom: 0; scrollbar-width: none; }
    .arb-petals::-webkit-scrollbar { display: none; }
    .arb-petal { padding: 5px 10px; }
    .arb-toolbar .arb-spacer { display: none; }
    .arb-toolbar .arb-btn, .arb-toolbar .arb-seg button { white-space: nowrap; padding: 6px 9px; }
    .arb-cards { gap: 6px; margin-bottom: 6px; padding-right: 20px;
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
    .arb-card { min-width: 112px; max-width: 160px; padding: 6px 8px; }
    .arb-card-k { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .arb-card-v { font-size: 15px; margin: 1px 0; }
    .arb-card-s { font-size: 10.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    /* Подпись графика — одна строка поверх графика с подложкой, не закрывает свечи */
    .arb-legend {
        right: 64px; left: 4px; top: 2px; font-size: 10px; line-height: 1.35;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        background: color-mix(in srgb, var(--bg) 72%, transparent); border-radius: 4px; padding: 1px 4px;
        text-shadow: none;
    }
    .arb-panels { margin-top: 8px; }
    .arb-strip-head { gap: 2px 10px; padding: 6px 8px; }
    .arb-note { font-size: 12px; padding: 8px 10px; }
    .arb-sub-head { margin-top: 6px; }
}
/* Горизонтальный телефон: ширины много, высоты мало — карточки в одну ленту,
   кнопки инструментов не повторяют подписи, нижний график ниже */
@media (max-height: 520px) and (orientation: landscape) {
    .arb-cards { display: flex; overflow-x: auto; scrollbar-width: none; }
    .arb-cards::-webkit-scrollbar { display: none; }
    .arb-card { flex: 0 0 auto; }
    .arb-card-s { -webkit-line-clamp: 1; }
}
/* Планшет и ноутбук с невысоким экраном: карточки в одну ленту, чтобы
   графики начинались в первой половине экрана */
@media (min-width: 701px) and (max-width: 1100px) and (min-height: 521px), (min-width: 701px) and (max-height: 820px) and (min-height: 521px) {
    .arb-cards { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: thin; padding-bottom: 4px; }
    .arb-card { flex: 0 0 auto; min-width: 140px; max-width: 200px; padding: 6px 9px; }
    .arb-card-v { font-size: 15px; }
    .arb-card-s { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* 08.10.2026: «Что показывать» — каждый сам выбирает карточки, строки и
   кнопки. arb-off сильнее hidden, который ставят режимы раздела */
.arb-off { display: none !important; }
.arb-card-cfg {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left;
    cursor: pointer; font: inherit; color: var(--text); border-style: dashed; background: transparent;
}
.arb-card-cfg:hover { background: var(--surface-2); border-color: rgba(59, 130, 246, .6); }
.arb-card-cfg .arb-card-v { color: var(--primary, #3b82f6); }
.arb-card-v-long { font-size: 14px; }
.arb-card-up .arb-card-v { color: #26a69a; }
.arb-card-dn .arb-card-v { color: #ef5350; }
.arb-vcards td:first-child { width: 28px; }
.arb-vcards td.arb-vc-v { white-space: nowrap; font-weight: 600; }
.arb-vcards td.arb-vc-s { color: var(--text-muted); }
.arb-vcards tbody tr:hover td { background: var(--surface-2); }
.arb-vbtns { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 12px; }
.arb-vpresets .arb-btn { padding: 7px 12px; }
.arb-form .arb-check input { width: 18px; height: 18px; flex: none; }
@media (max-width: 700px) {
    .arb-vcards td.arb-vc-s, .arb-vcards th:last-child { display: none; }
    .arb-vcards td { padding: 7px 6px; }
    .arb-form .arb-check { padding: 4px 0; }
    .arb-card-cfg { min-width: 96px; }
    /* Вкладки нижнего графика — короткие подписи в одну строку */
    #arb-subsel button span { display: none; }
    #arb-subsel button::after { content: attr(data-short); }
    #arb-subsel button { white-space: nowrap; padding: 6px 12px; }
}

/* 08.10.2026: рабочий экран без прокрутки страницы. Шапка — только
   управление: выбор пары, группы и лента пар в одной строке, инструменты —
   во второй. Показатели — панелью справа (широкий экран) или одной строкой
   (узкий). График и нижний график делят остаток экрана по flex, высоту
   нижнего меняет разделитель. */
.arb-title-row { flex-wrap: nowrap; }
.arb-nav {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); padding-right: 20px;
}
.arb-nav::-webkit-scrollbar { display: none; }
.arb-nav .arb-chips { display: flex; flex: none; flex-wrap: nowrap; gap: 4px; padding: 0; margin: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.arb-nav .arb-chips .inst-chip { padding: 4px 9px; font-size: 12px; white-space: nowrap; }
.arb-nav .arb-petals { flex: none; display: flex; overflow: visible; padding: 0; margin: 0; gap: 4px; }
.arb-nav .arb-petal { padding: 4px 10px; }
.arb-nav .arb-chips:not(.arb-off) + .arb-petals:not(.arb-off)::before { content: ''; flex: none; width: 1px; align-self: stretch; background: var(--border); margin: 2px 4px; }
.arb-linkbtn { background: none; border: 0; padding: 0; color: var(--primary, #3b82f6); font: inherit; font-size: 12px; cursor: pointer; }

/* Строка показателей */
.arb-cards[data-mlay="strip"] {
    display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; margin-bottom: 6px; padding-bottom: 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); padding-right: 20px;
}
.arb-cards[data-mlay="strip"]::-webkit-scrollbar { display: none; }
.arb-cards[data-mlay="side"] { display: none; }
.arb-m {
    flex: none; display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px; white-space: nowrap;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font: inherit; font-size: 12px; cursor: pointer;
}
.arb-m span { color: var(--text-muted); font-size: 11px; }
.arb-m b { font-variant-numeric: tabular-nums; font-size: 13px; }
.arb-m:hover { border-color: rgba(59, 130, 246, .6); }
.arb-m.arb-card-warn { border-color: rgba(245, 158, 11, .6); background: rgba(245, 158, 11, .08); }
.arb-m.arb-card-warn b { color: #d97706; }
.arb-m.arb-card-up b { color: #26a69a; }
.arb-m.arb-card-dn b { color: #ef5350; }
.arb-m-act { color: var(--primary, #3b82f6); border-style: dashed; }
.arb-m-act span { color: var(--primary, #3b82f6); }

/* Панель справа */
.arb-side {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 8px;
    scrollbar-width: thin; scrollbar-color: var(--surface-3, #2a2e39) transparent;
}
.arb-side[hidden] { display: none !important; }
.arb-side-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 2px 4px; font-size: 13px; border-bottom: 1px solid var(--border); }
.arb-srow { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; padding: 4px 2px; border-bottom: 1px solid var(--border); }
.arb-srow:last-child { border-bottom: 0; }
.arb-srow-k { color: var(--text-muted); font-size: 12px; align-self: baseline; }
.arb-srow-v { font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.arb-srow-s { grid-column: 1 / -1; color: var(--text-faint); font-size: 11px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arb-srow.arb-card-warn .arb-srow-v { color: #d97706; }
.arb-srow.arb-card-up .arb-srow-v { color: #26a69a; }
.arb-srow.arb-card-dn .arb-srow-v { color: #ef5350; }
.arb-side .arb-panels { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
.arb-side .arb-strip-head { padding: 6px 4px; }
.arb-side .arb-strip-body { padding: 0 4px 8px; }
.arb-side .arb-fund-scroll { max-height: 40vh; }
.arb-side .arb-foot { margin-top: 0; }
#arb-paneldlg-body .arb-panels { grid-template-columns: minmax(0, 1fr); }
#arb-paneldlg-body .arb-foot { margin-top: 10px; }

/* Разделитель графиков */
.arb-split { display: none; }
.arb-fit .arb-split { display: block; flex: none; height: 10px; cursor: row-resize; touch-action: none; position: relative; }
.arb-fit .arb-split[hidden] { display: none; }
.arb-split::before { content: ''; position: absolute; left: 50%; top: 4px; width: 44px; height: 3px; margin-left: -22px; border-radius: 2px; background: var(--border); }
.arb-split:hover::before, .arb-split.drag::before { background: #3b82f6; }

/* Вписывание в экран */
.arb-page.arb-fit { overflow: hidden; display: flex; flex-direction: column; }
.arb-fit > .arb-wrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 6px; }
.arb-fit .arb-top { flex: none; }
.arb-fit .arb-title { display: none; }
.arb-fit .arb-title-row { margin-bottom: 6px; }
.arb-fit .arb-toolbar { margin-bottom: 6px; }
.arb-fit .arb-body { flex: 1 1 auto; min-height: 0; display: flex; gap: 8px; }
.arb-fit .arb-chartzone { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.arb-fit .arb-chartzone[hidden] { display: none; }
.arb-fit .arb-grid { flex: 1 1 0; min-height: 140px; height: auto; }
.arb-fit .arb-note { flex: none; margin: 4px 0 0; }
.arb-fit .arb-subzone { flex: none; margin-top: 0; }
.arb-fit .arb-sub-head { margin-top: 0; margin-bottom: 4px; }
.arb-fit .arb-sub-head .arb-seg button { padding: 4px 10px; }
.arb-fit .arb-sub { min-height: 0; margin-top: 0; }
.arb-fit .arb-side { flex: 0 0 300px; min-height: 0; overflow-y: auto; }
.arb-fit .arb-update { flex: none; }
@media (min-width: 1600px) { .arb-fit .arb-side { flex-basis: 330px; } }

@media (max-width: 700px) {
    .arb-title-row { flex-wrap: wrap; row-gap: 6px; }
    .arb-nav { order: 9; flex: 1 1 100%; }
    .arb-fit > .arb-wrap { padding: 6px 8px 4px; }
    .arb-fit .arb-title-row, .arb-fit .arb-toolbar, .arb-fit .arb-cards[data-mlay="strip"] { margin-bottom: 5px; }
    .arb-m { padding: 4px 8px; }
}
@media (max-width: 700px) {
    /* Пара забирает остаток строки, «График / Табл. / Журнал» — рядом с ней */
    .arb-title-row .arb-pair-open { flex: 1 1 0; min-width: 96px; }
}
/* Горизонтальный телефон (высота до 520): шапка в две строки — пара с
   группами, затем инструменты и показатели рядом, — остальное графикам */
@media (max-height: 520px) and (orientation: landscape) {
    .arb-fit > .arb-wrap { padding: 4px 8px 2px; }
    .arb-fit .arb-top { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); column-gap: 6px; align-items: center; }
    .arb-fit .arb-title-row { grid-column: 1 / -1; margin-bottom: 4px; flex-wrap: nowrap; }
    .arb-fit .arb-title-row .arb-nav { order: 0; flex: 1 1 auto; }
    .arb-fit .arb-title-row .arb-pair-open { flex: 0 1 200px; min-width: 110px; height: 32px; }
    .arb-fit .arb-toolbar { max-width: 50vw; margin-bottom: 4px; }
    .arb-fit .arb-cards[data-mlay="strip"] { margin-bottom: 4px; }
    .arb-fit .arb-grid { min-height: 100px; }
    .arb-fit .arb-split { height: 8px; }
    .arb-fit .arb-sub-head .arb-seg button { padding: 3px 9px; }
}
@media (max-height: 520px) and (orientation: landscape) {
    #arb-subsel button span { display: none; }
    #arb-subsel button::after { content: attr(data-short); }
    .arb-fit .arb-legend { -webkit-line-clamp: 1; }
}

/* Н2 (deploy96, 10.10.2026): «Итог к экспирации», «Ставка в паре», классы */
.arb-panels > .arb-panel-wide { grid-column: 1 / -1; }
.arb-cls { display: inline-grid; place-items: center; min-width: 20px; height: 18px; border-radius: 4px; font-size: 11px; font-weight: 700; border: 1px solid var(--border); cursor: help; }
.arb-cls-A { color: #fff; background: #1f8f84; border-color: #1f8f84; }
.arb-cls-B { color: #8a5a00; background: rgba(245, 158, 11, .16); border-color: rgba(245, 158, 11, .55); }
.arb-cls-C { color: var(--text-muted); }
[data-theme="dark"] .arb-cls-B { color: #fbbf24; }
.arb-tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; border: 1px solid rgba(239, 83, 80, .5); color: #ef5350; white-space: nowrap; }
.arb-carry-t td, .arb-carry-t th { text-align: right; white-space: nowrap; }
.arb-carry-t td:first-child, .arb-carry-t th:first-child { text-align: left; }
.arb-row-main td { font-weight: 600; }
#arb-fwin { font-size: 12px; }
.arb-carry-t { margin-bottom: 8px; }
.arb-carry-t td:first-child { white-space: normal; }

/* deploy102 (10.10.2026): режим «Основной / Подробный» */
#arb-uimode { margin-left: 4px; }
.arb-card.arb-cards-more { display: grid; place-content: center; gap: 2px; cursor: pointer; color: var(--accent, #2962ff); font-weight: 600; }
.arb-card.arb-cards-more b { font-size: 12px; }
.arb-linkbtn.arb-cards-more { display: block; margin: 6px 0 0 auto; }
#arb-tools-more[aria-expanded="true"] { background: var(--surface-2, rgba(0,0,0,.05)); }

/* 113b (12.10.2026): кнопка «Скопировать ссылку на пару» рядом со звездой */
.arb-link { display: inline-flex; align-items: center; justify-content: center; }
.arb-link svg { display: block; }

/* 113c (12.10.2026): режимы «Арбитража», которых нет в подписке */
#arb-mode button.is-locked { opacity: .55; }
.arb-more { color: var(--accent, #14b8a6); font-weight: 600; white-space: nowrap; }
.arb-lock { margin: 0 0 10px; padding: 9px 12px; border: 1px dashed var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface-2); }
.arb-lock[hidden] { display: none; }
/* 114k (14.10.2026): ноги с расхождением котировок от 30 с или котировкой старше 60 с */
.arb-card-warn { box-shadow: inset 3px 0 0 #f59e0b; }
.arb-m.arb-card-warn { box-shadow: inset 0 -2px 0 #f59e0b; }
.arb-table-tools #arb-dense:empty { display: none; }
.arb-table a.u-hq { cursor: help; }

/* 118 (17.10.2026): предварительный фандинг — в свёрнутой полосе и раскрытием */
.arb-fund-pre b { font-variant-numeric: tabular-nums; }
.arb-fund-prelim { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin: 0 0 10px; }
.arb-fund-prelim p { margin: 0 0 6px; font-size: 12px; }
/* 158 (26.10.2026): строка сегодняшнего дня в таблице фандинга */
.arb-fund-table tr.arb-today td { background: color-mix(in srgb, var(--accent, #2563eb) 7%, transparent); }
.arb-fund-table td { white-space: nowrap; }
.arb-warn { color: #e8a63a; }

/* Этап 11 плана 118 (17.10.2026): полоса Net Edge — цепочка издержек, размеры, своя комиссия брокера */
.arb-net-chain td:nth-child(2) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: top; }
.arb-net-chain td:first-child { white-space: normal; }
.arb-net-why { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); margin-top: 1px; }
.arb-side .arb-net-why { display: none; }
.arb-net-sizes { margin: 8px 0; }
.arb-net-sizes td, .arb-net-sizes th { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.arb-net-sizes td:first-child, .arb-net-sizes th:first-child { text-align: left; }
.arb-net-short td { color: var(--text-muted); }
.arb-net-short td.arb-muted { white-space: normal; text-align: left; font-size: 12px; }
.arb-net-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 14px; align-items: end; margin: 8px 0; }
.arb-net-form .arb-field { display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
.arb-net-form .arb-field > span { font-size: 12px; color: var(--text-muted); white-space: normal; }
.arb-net-form .arb-field input, .arb-net-form .arb-field select { width: 100%; min-width: 0; }
.arb-net-form .arb-actions { margin: 0; }
.arb-net-side { font-size: 11px; white-space: nowrap; }
.arb-al-ne-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.arb-al-ne-grid .arb-field { display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
.arb-al-ne-grid .arb-field input { width: 100%; min-width: 0; }
@media (max-width: 560px) {
    .arb-al-ne-grid { grid-template-columns: 1fr; }
}

/* 174z (31.10.2026): «Как собрать спред» у межрыночной пары */
.arb-xm .arb-table td { vertical-align: top; }
.arb-xm-list { margin: 4px 0 8px 18px; padding: 0; font-size: 13px; line-height: 1.45; }
.arb-xm-list li { margin: 2px 0; }
